=============================================================================== ffc0e180 : int IMFS_chown( const rtems_filesystem_location_info_t *loc, uid_t owner, gid_t group ) { ffc0e180: 94 21 ff d8 stwu r1,-40(r1) ffc0e184: 7c 08 02 a6 mflr r0 ffc0e188: 90 01 00 2c stw r0,44(r1) ffc0e18c: 93 e1 00 24 stw r31,36(r1) IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) loc->node_access; ffc0e190: 83 e3 00 08 lwz r31,8(r3) int IMFS_chown( const rtems_filesystem_location_info_t *loc, uid_t owner, gid_t group ) { ffc0e194: 93 a1 00 1c stw r29,28(r1) ffc0e198: 7c 9d 23 78 mr r29,r4 ffc0e19c: 93 c1 00 20 stw r30,32(r1) ffc0e1a0: 7c be 2b 78 mr r30,r5 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); ffc0e1a4: 48 00 0b f5 bl ffc0ed98 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) ffc0e1a8: a1 3f 00 3c lhz r9,60(r31) ffc0e1ac: 7f 89 18 00 cmpw cr7,r9,r3 ffc0e1b0: 41 9e 00 0c beq- cr7,ffc0e1bc ffc0e1b4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e1b8: 40 9e 00 40 bne- cr7,ffc0e1f8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; ffc0e1bc: b3 bf 00 3c sth r29,60(r31) jnode->st_gid = group; IMFS_update_ctime( jnode ); ffc0e1c0: 38 61 00 08 addi r3,r1,8 ffc0e1c4: 38 80 00 00 li r4,0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; jnode->st_gid = group; ffc0e1c8: b3 df 00 3e sth r30,62(r31) IMFS_update_ctime( jnode ); ffc0e1cc: 4b ff 6a 89 bl ffc04c54 ffc0e1d0: 81 21 00 08 lwz r9,8(r1) return 0; ffc0e1d4: 38 60 00 00 li r3,0 #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); ffc0e1d8: 91 3f 00 48 stw r9,72(r31) return 0; } ffc0e1dc: 80 01 00 2c lwz r0,44(r1) ffc0e1e0: 83 a1 00 1c lwz r29,28(r1) ffc0e1e4: 7c 08 03 a6 mtlr r0 ffc0e1e8: 83 c1 00 20 lwz r30,32(r1) ffc0e1ec: 83 e1 00 24 lwz r31,36(r1) ffc0e1f0: 38 21 00 28 addi r1,r1,40 ffc0e1f4: 4e 80 00 20 blr #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); ffc0e1f8: 48 00 4e 81 bl ffc13078 <__errno> ffc0e1fc: 39 20 00 01 li r9,1 ffc0e200: 91 23 00 00 stw r9,0(r3) ffc0e204: 38 60 ff ff li r3,-1 ffc0e208: 4b ff ff d4 b ffc0e1dc =============================================================================== ffc06e90 : */ static void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { ffc06e90: 94 21 ff c0 stwu r1,-64(r1) ffc06e94: 7c 08 02 a6 mflr r0 ffc06e98: 7d 80 00 26 mfcr r12 ffc06e9c: 90 01 00 44 stw r0,68(r1) ffc06ea0: 93 61 00 2c stw r27,44(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc06ea4: 83 63 00 50 lwz r27,80(r3) ffc06ea8: 93 41 00 28 stw r26,40(r1) RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( const Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Immutable_tail( the_chain )); ffc06eac: 3b 43 00 54 addi r26,r3,84 IMFS_assert( level >= 0 ); IMFS_assert( IMFS_is_directory( the_directory ) ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); ffc06eb0: 7f 9b d0 00 cmpw cr7,r27,r26 */ static void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { ffc06eb4: 92 81 00 10 stw r20,16(r1) ffc06eb8: 92 a1 00 14 stw r21,20(r1) ffc06ebc: 92 c1 00 18 stw r22,24(r1) ffc06ec0: 92 e1 00 1c stw r23,28(r1) ffc06ec4: 93 01 00 20 stw r24,32(r1) ffc06ec8: 93 21 00 24 stw r25,36(r1) ffc06ecc: 93 81 00 30 stw r28,48(r1) ffc06ed0: 93 a1 00 34 stw r29,52(r1) ffc06ed4: 93 c1 00 38 stw r30,56(r1) ffc06ed8: 93 e1 00 3c stw r31,60(r1) ffc06edc: 91 81 00 0c stw r12,12(r1) IMFS_assert( level >= 0 ); IMFS_assert( IMFS_is_directory( the_directory ) ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); ffc06ee0: 41 9e 00 c4 beq- cr7,ffc06fa4 ffc06ee4: 2e 04 00 00 cmpwi cr4,r4,0 ffc06ee8: 3f c0 00 00 lis r30,0 ffc06eec: 3f 80 ff c2 lis r28,-62 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); ffc06ef0: 3e 80 ff c2 lis r20,-62 return; } puts(""); ffc06ef4: 3f 20 ff c2 lis r25,-62 case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); ffc06ef8: 3e a0 ff c2 lis r21,-62 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); ffc06efc: 3e e0 ff c2 lis r23,-62 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", ffc06f00: 3e c0 ff c2 lis r22,-62 ffc06f04: 7c 9d 23 78 mr r29,r4 ffc06f08: 3b de 28 30 addi r30,r30,10288 ffc06f0c: 3b 9c 78 40 addi r28,r28,30784 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); ffc06f10: 3a 94 78 a0 addi r20,r20,30880 ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( IMFS_type( the_jnode ) ) { ffc06f14: 3f 00 ff c2 lis r24,-62 default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); return; } puts(""); ffc06f18: 3b 39 6a b0 addi r25,r25,27312 case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); ffc06f1c: 3a b5 78 8c addi r21,r21,30860 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); ffc06f20: 3a f7 78 78 addi r23,r23,30840 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", ffc06f24: 3a d6 78 6c addi r22,r22,30828 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) ffc06f28: 41 90 00 2c blt- cr4,ffc06f54 <== NEVER TAKEN ffc06f2c: 3b e0 00 00 li r31,0 fprintf(stdout, "...." ); ffc06f30: 81 3e 00 00 lwz r9,0(r30) ffc06f34: 7f 83 e3 78 mr r3,r28 ffc06f38: 38 80 00 01 li r4,1 ffc06f3c: 80 c9 00 08 lwz r6,8(r9) ffc06f40: 38 a0 00 04 li r5,4 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) ffc06f44: 3b ff 00 01 addi r31,r31,1 fprintf(stdout, "...." ); ffc06f48: 48 01 1f a1 bl ffc18ee8 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) ffc06f4c: 7f 9d f8 00 cmpw cr7,r29,r31 ffc06f50: 40 9c ff e0 bge+ cr7,ffc06f30 IMFS_jnode_t *the_jnode ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); ffc06f54: 81 3e 00 00 lwz r9,0(r30) ffc06f58: 38 7b 00 0c addi r3,r27,12 ffc06f5c: 80 89 00 08 lwz r4,8(r9) ffc06f60: 48 01 11 29 bl ffc18088 rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; ffc06f64: 81 3b 00 4c lwz r9,76(r27) ffc06f68: 80 a9 00 00 lwz r5,0(r9) switch( IMFS_type( the_jnode ) ) { ffc06f6c: 2b 85 00 06 cmplwi cr7,r5,6 ffc06f70: 40 9d 00 7c ble- cr7,ffc06fec <== ALWAYS TAKEN case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); ffc06f74: 81 3e 00 00 lwz r9,0(r30) <== NOT EXECUTED ffc06f78: 7e 84 a3 78 mr r4,r20 <== NOT EXECUTED ffc06f7c: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED ffc06f80: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc06f84: 48 01 0f 09 bl ffc17e8c <== NOT EXECUTED } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; ffc06f88: 81 3b 00 4c lwz r9,76(r27) the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) ffc06f8c: 81 29 00 00 lwz r9,0(r9) ffc06f90: 2f 89 00 00 cmpwi cr7,r9,0 ffc06f94: 41 9e 00 98 beq- cr7,ffc0702c the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { ffc06f98: 83 7b 00 00 lwz r27,0(r27) IMFS_assert( level >= 0 ); IMFS_assert( IMFS_is_directory( the_directory ) ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); ffc06f9c: 7f 9b d0 00 cmpw cr7,r27,r26 ffc06fa0: 40 9e ff 88 bne+ cr7,ffc06f28 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) IMFS_dump_directory( the_jnode, level + 1 ); } } ffc06fa4: 80 01 00 44 lwz r0,68(r1) ffc06fa8: 81 81 00 0c lwz r12,12(r1) ffc06fac: 7c 08 03 a6 mtlr r0 ffc06fb0: 82 81 00 10 lwz r20,16(r1) ffc06fb4: 82 a1 00 14 lwz r21,20(r1) ffc06fb8: 7d 80 81 20 mtcrf 8,r12 ffc06fbc: 82 c1 00 18 lwz r22,24(r1) ffc06fc0: 82 e1 00 1c lwz r23,28(r1) ffc06fc4: 83 01 00 20 lwz r24,32(r1) ffc06fc8: 83 21 00 24 lwz r25,36(r1) ffc06fcc: 83 41 00 28 lwz r26,40(r1) ffc06fd0: 83 61 00 2c lwz r27,44(r1) ffc06fd4: 83 81 00 30 lwz r28,48(r1) ffc06fd8: 83 a1 00 34 lwz r29,52(r1) ffc06fdc: 83 c1 00 38 lwz r30,56(r1) ffc06fe0: 83 e1 00 3c lwz r31,60(r1) ffc06fe4: 38 21 00 40 addi r1,r1,64 ffc06fe8: 4e 80 00 20 blr ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( IMFS_type( the_jnode ) ) { ffc06fec: 39 38 78 24 addi r9,r24,30756 ffc06ff0: 54 a5 10 3a rlwinm r5,r5,2,0,29 ffc06ff4: 7d 49 28 2e lwzx r10,r9,r5 ffc06ff8: 7d 2a 4a 14 add r9,r10,r9 ffc06ffc: 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" ); ffc07000: 81 3e 00 00 lwz r9,0(r30) ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( IMFS_type( the_jnode ) ) { ffc07004: 4e 80 04 20 bctr case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); ffc07008: 80 c9 00 08 lwz r6,8(r9) ffc0700c: 7e e3 bb 78 mr r3,r23 ffc07010: 38 80 00 01 li r4,1 ffc07014: 38 a0 00 13 li r5,19 ffc07018: 48 01 1e d1 bl ffc18ee8 ffc0701c: 81 3b 00 4c lwz r9,76(r27) the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) ffc07020: 81 29 00 00 lwz r9,0(r9) ffc07024: 2f 89 00 00 cmpwi cr7,r9,0 ffc07028: 40 9e ff 70 bne+ cr7,ffc06f98 <== ALWAYS TAKEN IMFS_dump_directory( the_jnode, level + 1 ); ffc0702c: 7f 63 db 78 mr r3,r27 ffc07030: 38 9d 00 01 addi r4,r29,1 ffc07034: 4b ff fe 5d bl ffc06e90 ffc07038: 4b ff ff 60 b ffc06f98 fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", ffc0703c: 3c 80 ff c2 lis r4,-62 ffc07040: 80 69 00 08 lwz r3,8(r9) ffc07044: 80 bb 00 54 lwz r5,84(r27) ffc07048: 38 84 78 5c addi r4,r4,30812 ffc0704c: 80 db 00 58 lwz r6,88(r27) ffc07050: 4c c6 31 82 crclr 4*cr1+eq ffc07054: 48 01 0e 39 bl ffc17e8c default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); return; } puts(""); ffc07058: 7f 23 cb 78 mr r3,r25 ffc0705c: 48 01 31 01 bl ffc1a15c ffc07060: 4b ff ff 28 b ffc06f88 case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", ffc07064: 80 69 00 08 lwz r3,8(r9) ffc07068: 3c 80 ff c2 lis r4,-62 ffc0706c: 80 bb 00 50 lwz r5,80(r27) ffc07070: 38 84 78 48 addi r4,r4,30792 ffc07074: 80 db 00 54 lwz r6,84(r27) ffc07078: 4c c6 31 82 crclr 4*cr1+eq ffc0707c: 48 01 0e 11 bl ffc17e8c ffc07080: 4b ff ff d8 b ffc07058 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( IMFS_type( the_jnode ) ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); ffc07084: 80 89 00 08 lwz r4,8(r9) ffc07088: 38 60 00 2f li r3,47 ffc0708c: 48 01 0e e5 bl ffc17f70 ffc07090: 4b ff ff c8 b ffc07058 case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); ffc07094: 80 c9 00 08 lwz r6,8(r9) ffc07098: 7e a3 ab 78 mr r3,r21 ffc0709c: 38 80 00 01 li r4,1 ffc070a0: 38 a0 00 12 li r5,18 ffc070a4: 48 01 1e 45 bl ffc18ee8 ffc070a8: 4b ff fe e0 b ffc06f88 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", ffc070ac: 80 bb 00 54 lwz r5,84(r27) ffc070b0: 7e c4 b3 78 mr r4,r22 ffc070b4: 80 69 00 08 lwz r3,8(r9) ffc070b8: 4c c6 31 82 crclr 4*cr1+eq ffc070bc: 48 01 0d d1 bl ffc17e8c ffc070c0: 4b ff ff 98 b ffc07058 =============================================================================== ffc0e3dc : rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { ffc0e3dc: 94 21 ff e0 stwu r1,-32(r1) ffc0e3e0: 7c 08 02 a6 mflr r0 rtems_filesystem_eval_path_generic_status status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE; rtems_filesystem_location_info_t *currentloc = rtems_filesystem_eval_path_get_currentloc( ctx ); IMFS_jnode_t *dir = currentloc->node_access; bool access_ok = rtems_filesystem_eval_path_check_access( ffc0e3e4: 38 80 00 01 li r4,1 rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { ffc0e3e8: 90 01 00 24 stw r0,36(r1) ffc0e3ec: 93 a1 00 14 stw r29,20(r1) rtems_filesystem_eval_path_generic_status status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE; rtems_filesystem_location_info_t *currentloc = rtems_filesystem_eval_path_get_currentloc( ctx ); IMFS_jnode_t *dir = currentloc->node_access; ffc0e3f0: 83 a3 00 20 lwz r29,32(r3) rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { ffc0e3f4: 93 61 00 0c stw r27,12(r1) ffc0e3f8: 7c bb 2b 78 mr r27,r5 ffc0e3fc: 93 c1 00 18 stw r30,24(r1) ffc0e400: 7c de 33 78 mr r30,r6 rtems_filesystem_eval_path_generic_status status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE; rtems_filesystem_location_info_t *currentloc = rtems_filesystem_eval_path_get_currentloc( ctx ); IMFS_jnode_t *dir = currentloc->node_access; bool access_ok = rtems_filesystem_eval_path_check_access( ffc0e404: 80 bd 00 30 lwz r5,48(r29) ffc0e408: a0 dd 00 3c lhz r6,60(r29) ffc0e40c: a0 fd 00 3e lhz r7,62(r29) rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { ffc0e410: 93 81 00 10 stw r28,16(r1) ffc0e414: 7c 7c 1b 78 mr r28,r3 ffc0e418: 93 41 00 08 stw r26,8(r1) ffc0e41c: 93 e1 00 1c stw r31,28(r1) rtems_filesystem_eval_path_generic_status status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE; rtems_filesystem_location_info_t *currentloc = rtems_filesystem_eval_path_get_currentloc( ctx ); IMFS_jnode_t *dir = currentloc->node_access; bool access_ok = rtems_filesystem_eval_path_check_access( ffc0e420: 48 00 10 05 bl ffc0f424 dir->st_mode, dir->st_uid, dir->st_gid ); if ( access_ok ) { ffc0e424: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e428: 40 9e 00 30 bne- cr7,ffc0e458 void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = ffc0e42c: 38 60 00 01 li r3,1 status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; } } return status; } ffc0e430: 80 01 00 24 lwz r0,36(r1) ffc0e434: 83 41 00 08 lwz r26,8(r1) ffc0e438: 7c 08 03 a6 mtlr r0 ffc0e43c: 83 61 00 0c lwz r27,12(r1) ffc0e440: 83 81 00 10 lwz r28,16(r1) ffc0e444: 83 a1 00 14 lwz r29,20(r1) ffc0e448: 83 c1 00 18 lwz r30,24(r1) ffc0e44c: 83 e1 00 1c lwz r31,28(r1) ffc0e450: 38 21 00 20 addi r1,r1,32 ffc0e454: 4e 80 00 20 blr static inline bool rtems_filesystem_is_current_directory( const char *token, size_t tokenlen ) { return tokenlen == 1 && token [0] == '.'; ffc0e458: 2f 9e 00 01 cmpwi cr7,r30,1 ffc0e45c: 41 9e 01 5c beq- cr7,ffc0e5b8 static inline bool rtems_filesystem_is_parent_directory( const char *token, size_t tokenlen ) { return tokenlen == 2 && token [0] == '.' && token [1] == '.'; ffc0e460: 2f 9e 00 02 cmpwi cr7,r30,2 ffc0e464: 41 9e 00 c8 beq- cr7,ffc0e52c */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0e468: 83 fd 00 50 lwz r31,80(r29) if ( rtems_filesystem_is_parent_directory( token, tokenlen ) ) { return dir->Parent; } else { rtems_chain_control *entries = &dir->info.directory.Entries; rtems_chain_node *current = rtems_chain_first( entries ); rtems_chain_node *tail = rtems_chain_tail( entries ); ffc0e46c: 3b 5d 00 54 addi r26,r29,84 while ( current != tail ) { ffc0e470: 7f 9f d0 00 cmpw cr7,r31,r26 ffc0e474: 41 9e 00 b0 beq- cr7,ffc0e524 IMFS_jnode_t *entry = (IMFS_jnode_t *) current; bool match = strncmp( entry->name, token, tokenlen ) == 0 ffc0e478: 38 7f 00 0c addi r3,r31,12 ffc0e47c: 7f 64 db 78 mr r4,r27 ffc0e480: 7f c5 f3 78 mr r5,r30 ffc0e484: 48 00 64 e5 bl ffc14968 && entry->name [tokenlen] == '\0'; ffc0e488: 7d 3f f2 14 add r9,r31,r30 ffc0e48c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e490: 40 9e 00 88 bne- cr7,ffc0e518 ffc0e494: 89 29 00 0c lbz r9,12(r9) ffc0e498: 2f 89 00 00 cmpwi cr7,r9,0 ffc0e49c: 40 9e 00 7c bne- cr7,ffc0e518 rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; ffc0e4a0: 81 3f 00 4c lwz r9,76(r31) static inline void rtems_filesystem_eval_path_clear_token( rtems_filesystem_eval_path_context_t *ctx ) { ctx->tokenlen = 0; ffc0e4a4: 39 40 00 00 li r10,0 if ( access_ok ) { IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen ); if ( entry != NULL ) { bool terminal = !rtems_filesystem_eval_path_has_path( ctx ); ffc0e4a8: 80 7c 00 04 lwz r3,4(r28) ffc0e4ac: 81 29 00 00 lwz r9,0(r9) ffc0e4b0: 7c 63 00 34 cntlzw r3,r3 }; void IMFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { rtems_filesystem_eval_path_generic( ctx, NULL, &IMFS_eval_config ); } ffc0e4b4: 81 1c 00 10 lwz r8,16(r28) bool follow_sym_link = (eval_flags & RTEMS_FS_FOLLOW_SYM_LINK) != 0; IMFS_jnode_types_t type = IMFS_type( entry ); rtems_filesystem_eval_path_clear_token( ctx ); if ( type == IMFS_HARD_LINK && (follow_hard_link || !terminal)) { ffc0e4b8: 2f 89 00 02 cmpwi cr7,r9,2 ffc0e4bc: 91 5c 00 0c stw r10,12(r28) if ( access_ok ) { IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen ); if ( entry != NULL ) { bool terminal = !rtems_filesystem_eval_path_has_path( ctx ); ffc0e4c0: 54 63 d9 7e rlwinm r3,r3,27,5,31 bool follow_sym_link = (eval_flags & RTEMS_FS_FOLLOW_SYM_LINK) != 0; IMFS_jnode_types_t type = IMFS_type( entry ); rtems_filesystem_eval_path_clear_token( ctx ); if ( type == IMFS_HARD_LINK && (follow_hard_link || !terminal)) { ffc0e4c4: 41 9e 01 08 beq- cr7,ffc0e5cc entry = entry->info.hard_link.link_node; } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { ffc0e4c8: 2f 89 00 03 cmpwi cr7,r9,3 ffc0e4cc: 41 9e 00 8c beq- cr7,ffc0e558 IMFS_jnode_types_t type ) { rtems_filesystem_global_location_t **fs_root_ptr = NULL; if ( type == IMFS_DIRECTORY ) { ffc0e4d0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0e4d4: 40 9e 00 94 bne- cr7,ffc0e568 if ( node->info.directory.mt_fs != NULL ) { ffc0e4d8: 83 df 00 5c lwz r30,92(r31) ffc0e4dc: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0e4e0: 41 9e 00 88 beq- cr7,ffc0e568 if ( !terminal ) { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE; } } else { access_ok = rtems_filesystem_eval_path_check_access( ffc0e4e4: 80 bf 00 30 lwz r5,48(r31) ffc0e4e8: 7f 83 e3 78 mr r3,r28 ffc0e4ec: a0 df 00 3c lhz r6,60(r31) ffc0e4f0: 38 80 00 01 li r4,1 ffc0e4f4: a0 ff 00 3e lhz r7,62(r31) ffc0e4f8: 48 00 0f 2d bl ffc0f424 RTEMS_FS_PERMS_EXEC, entry->st_mode, entry->st_uid, entry->st_gid ); if ( access_ok ) { ffc0e4fc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e500: 41 9e ff 2c beq+ cr7,ffc0e42c <== NEVER TAKEN rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); ffc0e504: 7f 83 e3 78 mr r3,r28 ffc0e508: 38 9e 00 24 addi r4,r30,36 ffc0e50c: 4b ff 7e d1 bl ffc063dc void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = ffc0e510: 38 60 00 01 li r3,1 ffc0e514: 4b ff ff 1c b ffc0e430 }; void IMFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { rtems_filesystem_eval_path_generic( ctx, NULL, &IMFS_eval_config ); } ffc0e518: 83 ff 00 00 lwz r31,0(r31) } else { rtems_chain_control *entries = &dir->info.directory.Entries; rtems_chain_node *current = rtems_chain_first( entries ); rtems_chain_node *tail = rtems_chain_tail( entries ); while ( current != tail ) { ffc0e51c: 7f 9a f8 00 cmpw cr7,r26,r31 ffc0e520: 40 9e ff 58 bne+ cr7,ffc0e478 rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); } } } } else { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; ffc0e524: 38 60 00 02 li r3,2 ffc0e528: 4b ff ff 08 b ffc0e430 static inline bool rtems_filesystem_is_parent_directory( const char *token, size_t tokenlen ) { return tokenlen == 2 && token [0] == '.' && token [1] == '.'; ffc0e52c: 89 3b 00 00 lbz r9,0(r27) ffc0e530: 2f 89 00 2e cmpwi cr7,r9,46 ffc0e534: 40 9e ff 34 bne+ cr7,ffc0e468 ffc0e538: 89 3b 00 01 lbz r9,1(r27) ffc0e53c: 2f 89 00 2e cmpwi cr7,r9,46 ffc0e540: 40 9e ff 28 bne+ cr7,ffc0e468 <== NEVER TAKEN { if ( rtems_filesystem_is_current_directory( token, tokenlen ) ) { return dir; } else { if ( rtems_filesystem_is_parent_directory( token, tokenlen ) ) { return dir->Parent; ffc0e544: 83 fd 00 08 lwz r31,8(r29) ); if ( access_ok ) { IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen ); if ( entry != NULL ) { ffc0e548: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0e54c: 40 be ff 54 bne- cr7,ffc0e4a0 rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); } } } } else { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; ffc0e550: 38 60 00 02 li r3,2 ffc0e554: 4b ff fe dc b ffc0e430 if ( type == IMFS_HARD_LINK && (follow_hard_link || !terminal)) { entry = entry->info.hard_link.link_node; } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { ffc0e558: 71 09 00 10 andi. r9,r8,16 ffc0e55c: 40 82 00 90 bne- ffc0e5ec ffc0e560: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e564: 41 9e 00 88 beq- cr7,ffc0e5ec } else { rtems_filesystem_global_location_t **fs_root_ptr = IMFS_is_mount_point( entry, type ); if ( fs_root_ptr == NULL ) { --dir->reference_count; ffc0e568: a1 3d 00 34 lhz r9,52(r29) status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; } } return status; } ffc0e56c: 80 01 00 24 lwz r0,36(r1) } else { rtems_filesystem_global_location_t **fs_root_ptr = IMFS_is_mount_point( entry, type ); if ( fs_root_ptr == NULL ) { --dir->reference_count; ffc0e570: 39 29 ff ff addi r9,r9,-1 static inline void IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { IMFS_jnode_t *node = (IMFS_jnode_t *) loc->node_access; loc->handlers = node->control->handlers; ffc0e574: 81 5f 00 4c lwz r10,76(r31) ffc0e578: b1 3d 00 34 sth r9,52(r29) status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; } } return status; } ffc0e57c: 7c 08 03 a6 mtlr r0 rtems_filesystem_global_location_t **fs_root_ptr = IMFS_is_mount_point( entry, type ); if ( fs_root_ptr == NULL ) { --dir->reference_count; ++entry->reference_count; ffc0e580: a1 3f 00 34 lhz r9,52(r31) ffc0e584: 81 4a 00 04 lwz r10,4(r10) ffc0e588: 39 29 00 01 addi r9,r9,1 status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; } } return status; } ffc0e58c: 83 41 00 08 lwz r26,8(r1) rtems_filesystem_global_location_t **fs_root_ptr = IMFS_is_mount_point( entry, type ); if ( fs_root_ptr == NULL ) { --dir->reference_count; ++entry->reference_count; ffc0e590: b1 3f 00 34 sth r9,52(r31) status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; } } return status; } ffc0e594: 83 61 00 0c lwz r27,12(r1) IMFS_is_mount_point( entry, type ); if ( fs_root_ptr == NULL ) { --dir->reference_count; ++entry->reference_count; currentloc->node_access = entry; ffc0e598: 93 fc 00 20 stw r31,32(r28) ffc0e59c: 91 5c 00 28 stw r10,40(r28) status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; } } return status; } ffc0e5a0: 83 a1 00 14 lwz r29,20(r1) ffc0e5a4: 83 81 00 10 lwz r28,16(r1) ffc0e5a8: 83 c1 00 18 lwz r30,24(r1) ffc0e5ac: 83 e1 00 1c lwz r31,28(r1) ffc0e5b0: 38 21 00 20 addi r1,r1,32 ffc0e5b4: 4e 80 00 20 blr static inline bool rtems_filesystem_is_current_directory( const char *token, size_t tokenlen ) { return tokenlen == 1 && token [0] == '.'; ffc0e5b8: 89 3b 00 00 lbz r9,0(r27) ffc0e5bc: 2f 89 00 2e cmpwi cr7,r9,46 ffc0e5c0: 40 9e fe a8 bne+ cr7,ffc0e468 ffc0e5c4: 7f bf eb 78 mr r31,r29 ffc0e5c8: 4b ff fe d8 b ffc0e4a0 bool follow_sym_link = (eval_flags & RTEMS_FS_FOLLOW_SYM_LINK) != 0; IMFS_jnode_types_t type = IMFS_type( entry ); rtems_filesystem_eval_path_clear_token( ctx ); if ( type == IMFS_HARD_LINK && (follow_hard_link || !terminal)) { ffc0e5cc: 71 09 00 08 andi. r9,r8,8 ffc0e5d0: 41 82 00 0c beq- ffc0e5dc entry = entry->info.hard_link.link_node; ffc0e5d4: 83 ff 00 50 lwz r31,80(r31) ffc0e5d8: 4b ff ff 90 b ffc0e568 bool follow_sym_link = (eval_flags & RTEMS_FS_FOLLOW_SYM_LINK) != 0; IMFS_jnode_types_t type = IMFS_type( entry ); rtems_filesystem_eval_path_clear_token( ctx ); if ( type == IMFS_HARD_LINK && (follow_hard_link || !terminal)) { ffc0e5dc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e5e0: 40 be ff 88 bne- cr7,ffc0e568 <== ALWAYS TAKEN entry = entry->info.hard_link.link_node; ffc0e5e4: 83 ff 00 50 lwz r31,80(r31) <== NOT EXECUTED ffc0e5e8: 4b ff ff 80 b ffc0e568 <== NOT EXECUTED } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { const char *target = entry->info.sym_link.name; ffc0e5ec: 83 ff 00 50 lwz r31,80(r31) rtems_filesystem_eval_path_recursive( ctx, target, strlen( target ) ); ffc0e5f0: 7f e3 fb 78 mr r3,r31 ffc0e5f4: 48 00 62 d9 bl ffc148cc ffc0e5f8: 7f e4 fb 78 mr r4,r31 ffc0e5fc: 7c 65 1b 78 mr r5,r3 ffc0e600: 7f 83 e3 78 mr r3,r28 ffc0e604: 4b ff 7e 79 bl ffc0647c ffc0e608: 4b ff fe 24 b ffc0e42c =============================================================================== ffc0e61c : int IMFS_fchmod( const rtems_filesystem_location_info_t *loc, mode_t mode ) { ffc0e61c: 94 21 ff e0 stwu r1,-32(r1) ffc0e620: 7c 08 02 a6 mflr r0 ffc0e624: 90 01 00 24 stw r0,36(r1) ffc0e628: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; ffc0e62c: 83 e3 00 08 lwz r31,8(r3) int IMFS_fchmod( const rtems_filesystem_location_info_t *loc, mode_t mode ) { ffc0e630: 93 c1 00 18 stw r30,24(r1) ffc0e634: 7c 9e 23 78 mr r30,r4 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); ffc0e638: 48 00 07 61 bl ffc0ed98 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) ffc0e63c: a1 3f 00 3c lhz r9,60(r31) ffc0e640: 7f 89 18 00 cmpw cr7,r9,r3 ffc0e644: 41 9e 00 0c beq- cr7,ffc0e650 ffc0e648: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e64c: 40 9e 00 48 bne- cr7,ffc0e694 <== ALWAYS TAKEN /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); ffc0e650: 81 3f 00 30 lwz r9,48(r31) jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); ffc0e654: 57 de 05 3e clrlwi r30,r30,20 IMFS_update_ctime( jnode ); ffc0e658: 38 61 00 08 addi r3,r1,8 /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); ffc0e65c: 55 29 00 26 rlwinm r9,r9,0,0,19 jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); ffc0e660: 7f c9 4b 78 or r9,r30,r9 ffc0e664: 91 3f 00 30 stw r9,48(r31) IMFS_update_ctime( jnode ); ffc0e668: 38 80 00 00 li r4,0 ffc0e66c: 4b ff 65 e9 bl ffc04c54 ffc0e670: 81 21 00 08 lwz r9,8(r1) return 0; ffc0e674: 38 60 00 00 li r3,0 */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); ffc0e678: 91 3f 00 48 stw r9,72(r31) return 0; } ffc0e67c: 80 01 00 24 lwz r0,36(r1) ffc0e680: 83 c1 00 18 lwz r30,24(r1) ffc0e684: 7c 08 03 a6 mtlr r0 ffc0e688: 83 e1 00 1c lwz r31,28(r1) ffc0e68c: 38 21 00 20 addi r1,r1,32 ffc0e690: 4e 80 00 20 blr */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); ffc0e694: 48 00 49 e5 bl ffc13078 <__errno> ffc0e698: 39 20 00 01 li r9,1 ffc0e69c: 91 23 00 00 stw r9,0(r3) ffc0e6a0: 38 60 ff ff li r3,-1 ffc0e6a4: 4b ff ff d8 b ffc0e67c =============================================================================== ffc04d24 : static ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { ffc04d24: 94 21 ff e0 stwu r1,-32(r1) ffc04d28: 7c 08 02 a6 mflr r0 ffc04d2c: 7c 66 1b 78 mr r6,r3 ffc04d30: 90 01 00 24 stw r0,36(r1) ffc04d34: 93 c1 00 18 stw r30,24(r1) ffc04d38: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *jnode = iop->pathinfo.node_access; ffc04d3c: 83 e3 00 1c lwz r31,28(r3) int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); ffc04d40: 80 7f 00 50 lwz r3,80(r31) ffc04d44: 48 00 ca 49 bl ffc1178c if (err > 0) { ffc04d48: 7c 7e 1b 79 mr. r30,r3 ffc04d4c: 40 81 00 38 ble- ffc04d84 IMFS_mtime_ctime_update(jnode); ffc04d50: 38 61 00 08 addi r3,r1,8 ffc04d54: 38 80 00 00 li r4,0 ffc04d58: 48 00 12 29 bl ffc05f80 ffc04d5c: 81 21 00 08 lwz r9,8(r1) ffc04d60: 91 3f 00 44 stw r9,68(r31) ffc04d64: 91 3f 00 48 stw r9,72(r31) } IMFS_FIFO_RETURN(err); } ffc04d68: 80 01 00 24 lwz r0,36(r1) ffc04d6c: 7f c3 f3 78 mr r3,r30 ffc04d70: 83 e1 00 1c lwz r31,28(r1) ffc04d74: 7c 08 03 a6 mtlr r0 ffc04d78: 83 c1 00 18 lwz r30,24(r1) ffc04d7c: 38 21 00 20 addi r1,r1,32 ffc04d80: 4e 80 00 20 blr int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); ffc04d84: 41 82 ff e4 beq+ ffc04d68 <== NEVER TAKEN ffc04d88: 7f de 00 d0 neg r30,r30 ffc04d8c: 48 01 04 e5 bl ffc15270 <__errno> ffc04d90: 93 c3 00 00 stw r30,0(r3) ffc04d94: 3b c0 ff ff li r30,-1 ffc04d98: 4b ff ff d0 b ffc04d68 =============================================================================== ffc0e6a8 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) void IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc0e6a8: 94 21 ff d0 stwu r1,-48(r1) ffc0e6ac: 7c 08 02 a6 mflr r0 ffc0e6b0: 90 01 00 34 stw r0,52(r1) /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; ffc0e6b4: 81 03 00 24 lwz r8,36(r3) ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) void IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc0e6b8: 93 e1 00 2c stw r31,44(r1) /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; ffc0e6bc: 80 e8 00 08 lwz r7,8(r8) ffc0e6c0: 81 68 00 00 lwz r11,0(r8) ffc0e6c4: 81 27 00 4c lwz r9,76(r7) jnode = (IMFS_jnode_t *)loc.node_access; ffc0e6c8: 7c ff 3b 78 mr r31,r7 /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; ffc0e6cc: 80 68 00 04 lwz r3,4(r8) ffc0e6d0: 81 49 00 00 lwz r10,0(r9) ffc0e6d4: 80 88 00 0c lwz r4,12(r8) ffc0e6d8: 80 a8 00 10 lwz r5,16(r8) ffc0e6dc: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0e6e0: 80 c8 00 14 lwz r6,20(r8) /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root->location.node_access = NULL; ffc0e6e4: 39 40 00 00 li r10,0 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) void IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc0e6e8: 93 c1 00 28 stw r30,40(r1) /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; ffc0e6ec: 91 61 00 08 stw r11,8(r1) ffc0e6f0: 90 61 00 0c stw r3,12(r1) ffc0e6f4: 90 e1 00 10 stw r7,16(r1) ffc0e6f8: 90 81 00 14 stw r4,20(r1) ffc0e6fc: 90 a1 00 18 stw r5,24(r1) ffc0e700: 90 c1 00 1c stw r6,28(r1) /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root->location.node_access = NULL; ffc0e704: 91 48 00 08 stw r10,8(r8) ffc0e708: 81 29 00 04 lwz r9,4(r9) do { next = jnode->Parent; ffc0e70c: 83 df 00 08 lwz r30,8(r31) loc.node_access = (void *)jnode; ffc0e710: 93 e1 00 10 stw r31,16(r1) ffc0e714: 91 21 00 18 stw r9,24(r1) IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { ffc0e718: 40 9e 00 40 bne- cr7,ffc0e758 <== NEVER TAKEN ffc0e71c: 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 ); ffc0e720: 39 5f 00 54 addi r10,r31,84 ffc0e724: 7f 89 50 00 cmpw cr7,r9,r10 ffc0e728: 41 9e 00 30 beq- cr7,ffc0e758 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0e72c: 7d 3f 4b 78 mr r31,r9 if ( IMFS_is_directory( jnode ) ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); ffc0e730: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0e734: 41 9e 00 74 beq- cr7,ffc0e7a8 <== NEVER TAKEN ffc0e738: 81 3f 00 4c lwz r9,76(r31) */ temp_mt_entry->mt_fs_root->location.node_access = NULL; do { next = jnode->Parent; ffc0e73c: 83 df 00 08 lwz r30,8(r31) ffc0e740: 81 49 00 00 lwz r10,0(r9) ffc0e744: 81 29 00 04 lwz r9,4(r9) ffc0e748: 2f 8a 00 00 cmpwi cr7,r10,0 loc.node_access = (void *)jnode; ffc0e74c: 93 e1 00 10 stw r31,16(r1) ffc0e750: 91 21 00 18 stw r9,24(r1) IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { ffc0e754: 41 9e ff c8 beq+ cr7,ffc0e71c result = IMFS_rmnod( NULL, &loc ); ffc0e758: 38 60 00 00 li r3,0 ffc0e75c: 38 81 00 08 addi r4,r1,8 ffc0e760: 4b ff 5c dd bl ffc0443c if ( result != 0 ) ffc0e764: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e768: 40 9e 00 58 bne- cr7,ffc0e7c0 <== NEVER TAKEN rtems_fatal_error_occurred( 0xdeadbeef ); IMFS_node_destroy( jnode ); ffc0e76c: 7f e3 fb 78 mr r3,r31 ffc0e770: 4b ff 58 f9 bl ffc04068 jnode = next; } if ( jnode != NULL ) { ffc0e774: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0e778: 41 9e 00 30 beq- cr7,ffc0e7a8 ffc0e77c: 81 3e 00 4c lwz r9,76(r30) if ( IMFS_is_directory( jnode ) ) { ffc0e780: 7f df f3 78 mr r31,r30 ffc0e784: 81 49 00 00 lwz r10,0(r9) ffc0e788: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0e78c: 40 9e ff 7c bne+ cr7,ffc0e708 <== NEVER TAKEN ffc0e790: 83 fe 00 50 lwz r31,80(r30) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0e794: 39 5e 00 54 addi r10,r30,84 if ( jnode_has_children( jnode ) ) ffc0e798: 7f 1f 50 00 cmpw cr6,r31,r10 ffc0e79c: 40 ba ff 94 bne- cr6,ffc0e730 ffc0e7a0: 7f df f3 78 mr r31,r30 ffc0e7a4: 4b ff ff 64 b ffc0e708 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); } ffc0e7a8: 80 01 00 34 lwz r0,52(r1) ffc0e7ac: 83 c1 00 28 lwz r30,40(r1) ffc0e7b0: 7c 08 03 a6 mtlr r0 ffc0e7b4: 83 e1 00 2c lwz r31,44(r1) ffc0e7b8: 38 21 00 30 addi r1,r1,48 ffc0e7bc: 4e 80 00 20 blr IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { result = IMFS_rmnod( NULL, &loc ); if ( result != 0 ) rtems_fatal_error_occurred( 0xdeadbeef ); ffc0e7c0: 3c 60 de ad lis r3,-8531 <== NOT EXECUTED ffc0e7c4: 60 63 be ef ori r3,r3,48879 <== NOT EXECUTED ffc0e7c8: 4b ff bb d5 bl ffc0a39c <== NOT EXECUTED =============================================================================== ffc03f00 : int IMFS_initialize_support( rtems_filesystem_mount_table_entry_t *mt_entry, const rtems_filesystem_operations_table *op_table, const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT] ) { ffc03f00: 94 21 ff e8 stwu r1,-24(r1) ffc03f04: 7c 08 02 a6 mflr r0 ffc03f08: 93 81 00 08 stw r28,8(r1) ffc03f0c: 7c 9c 23 78 mr r28,r4 static int imfs_instance; int rv = 0; IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); ffc03f10: 38 80 00 24 li r4,36 int IMFS_initialize_support( rtems_filesystem_mount_table_entry_t *mt_entry, const rtems_filesystem_operations_table *op_table, const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT] ) { ffc03f14: 93 a1 00 0c stw r29,12(r1) ffc03f18: 7c 7d 1b 78 mr r29,r3 static int imfs_instance; int rv = 0; IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); ffc03f1c: 38 60 00 01 li r3,1 int IMFS_initialize_support( rtems_filesystem_mount_table_entry_t *mt_entry, const rtems_filesystem_operations_table *op_table, const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT] ) { ffc03f20: 93 c1 00 10 stw r30,16(r1) ffc03f24: 93 e1 00 14 stw r31,20(r1) ffc03f28: 7c bf 2b 78 mr r31,r5 ffc03f2c: 90 01 00 1c stw r0,28(r1) static int imfs_instance; int rv = 0; IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); ffc03f30: 48 00 08 89 bl ffc047b8 if ( fs_info != NULL ) { ffc03f34: 7c 7e 1b 79 mr. r30,r3 ffc03f38: 41 82 01 04 beq- ffc0403c IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; ffc03f3c: 3d 00 00 00 lis r8,0 ffc03f40: 81 48 29 30 lwz r10,10544(r8) fs_info->node_controls, node_controls, sizeof( fs_info->node_controls ) ); root_node = IMFS_allocate_node( ffc03f44: 3c a0 ff c2 lis r5,-62 ffc03f48: 38 a5 f6 a4 addi r5,r5,-2396 IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); if ( fs_info != NULL ) { IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; ffc03f4c: 38 ea 00 01 addi r7,r10,1 ffc03f50: 91 5e 00 00 stw r10,0(r30) fs_info->node_controls, node_controls, sizeof( fs_info->node_controls ) ); root_node = IMFS_allocate_node( ffc03f54: 38 c0 00 00 li r6,0 IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); if ( fs_info != NULL ) { IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; ffc03f58: 90 e8 29 30 stw r7,10544(r8) memcpy( ffc03f5c: 80 ff 00 00 lwz r7,0(r31) ffc03f60: 80 9f 00 04 lwz r4,4(r31) ffc03f64: 81 1f 00 08 lwz r8,8(r31) ffc03f68: 81 5f 00 0c lwz r10,12(r31) ffc03f6c: 90 fe 00 08 stw r7,8(r30) fs_info->node_controls, node_controls, sizeof( fs_info->node_controls ) ); root_node = IMFS_allocate_node( ffc03f70: 38 e0 41 ed li r7,16877 if ( fs_info != NULL ) { IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; memcpy( ffc03f74: 91 1e 00 10 stw r8,16(r30) fs_info->node_controls, node_controls, sizeof( fs_info->node_controls ) ); root_node = IMFS_allocate_node( ffc03f78: 39 00 00 00 li r8,0 if ( fs_info != NULL ) { IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; memcpy( ffc03f7c: 90 9e 00 0c stw r4,12(r30) ffc03f80: 91 5e 00 14 stw r10,20(r30) ffc03f84: 80 9f 00 14 lwz r4,20(r31) ffc03f88: 81 7f 00 10 lwz r11,16(r31) ffc03f8c: 81 5f 00 18 lwz r10,24(r31) ffc03f90: 90 9e 00 1c stw r4,28(r30) ffc03f94: 91 7e 00 18 stw r11,24(r30) ffc03f98: 91 5e 00 20 stw r10,32(r30) fs_info->node_controls, node_controls, sizeof( fs_info->node_controls ) ); root_node = IMFS_allocate_node( ffc03f9c: 80 9e 00 08 lwz r4,8(r30) ffc03fa0: 48 00 a2 6d bl ffc0e20c "", 0, (S_IFDIR | 0755), NULL ); if ( root_node != NULL ) { ffc03fa4: 2c 03 00 00 cmpwi r3,0 ffc03fa8: 41 82 00 94 beq- ffc0403c <== NEVER TAKEN errno = ENOMEM; rv = -1; } if ( rv == 0 ) { IMFS_determine_bytes_per_block( ffc03fac: 3d 40 00 00 lis r10,0 static inline void IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { IMFS_jnode_t *node = (IMFS_jnode_t *) loc->node_access; loc->handlers = node->control->handlers; ffc03fb0: 80 e3 00 4c lwz r7,76(r3) ffc03fb4: 81 4a 27 94 lwz r10,10132(r10) NULL ); if ( root_node != NULL ) { mt_entry->fs_info = fs_info; mt_entry->ops = op_table; mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; ffc03fb8: 3c c0 ff c2 lis r6,-62 ffc03fbc: 80 e7 00 04 lwz r7,4(r7) ffc03fc0: 38 c6 fe 80 addi r6,r6,-384 /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { ffc03fc4: 2f 8a 00 10 cmpwi cr7,r10,16 ); if ( root_node != NULL ) { mt_entry->fs_info = fs_info; mt_entry->ops = op_table; mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; mt_entry->mt_fs_root->location.node_access = root_node; ffc03fc8: 81 1d 00 24 lwz r8,36(r29) 0, (S_IFDIR | 0755), NULL ); if ( root_node != NULL ) { mt_entry->fs_info = fs_info; ffc03fcc: 93 dd 00 08 stw r30,8(r29) mt_entry->ops = op_table; ffc03fd0: 93 9d 00 0c stw r28,12(r29) mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; ffc03fd4: 90 dd 00 2c stw r6,44(r29) mt_entry->mt_fs_root->location.node_access = root_node; ffc03fd8: 90 68 00 08 stw r3,8(r8) ffc03fdc: 90 e8 00 10 stw r7,16(r8) /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { ffc03fe0: 41 9e 00 30 beq- cr7,ffc04010 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) ffc03fe4: 2f 8a 00 0f cmpwi cr7,r10,15 ffc03fe8: 40 9d 00 24 ble- cr7,ffc0400c ffc03fec: 39 00 00 05 li r8,5 ffc03ff0: 7d 09 03 a6 mtctr r8 ffc03ff4: 39 20 00 20 li r9,32 /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { ffc03ff8: 7f 8a 48 00 cmpw cr7,r10,r9 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { ffc03ffc: 55 29 08 3c rlwinm r9,r9,1,0,30 if (bit_mask == requested_bytes_per_block) { ffc04000: 41 9e 00 10 beq- cr7,ffc04010 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) ffc04004: 41 9c 00 08 blt- cr7,ffc0400c <== NEVER TAKEN int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { ffc04008: 42 00 ff f0 bdnz+ ffc03ff8 if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); ffc0400c: 39 40 00 80 li r10,128 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ffc04010: 3d 20 00 00 lis r9,0 ffc04014: 91 49 28 44 stw r10,10308(r9) const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT] ) { static int imfs_instance; int rv = 0; ffc04018: 38 60 00 00 li r3,0 IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK ); } return rv; } ffc0401c: 80 01 00 1c lwz r0,28(r1) ffc04020: 83 81 00 08 lwz r28,8(r1) ffc04024: 7c 08 03 a6 mtlr r0 ffc04028: 83 a1 00 0c lwz r29,12(r1) ffc0402c: 83 c1 00 10 lwz r30,16(r1) ffc04030: 83 e1 00 14 lwz r31,20(r1) ffc04034: 38 21 00 18 addi r1,r1,24 ffc04038: 4e 80 00 20 blr } else { errno = ENOMEM; rv = -1; } } else { errno = ENOMEM; ffc0403c: 48 00 f0 3d bl ffc13078 <__errno> ffc04040: 39 20 00 0c li r9,12 ffc04044: 91 23 00 00 stw r9,0(r3) if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); ffc04048: 38 60 ff ff li r3,-1 ffc0404c: 4b ff ff d0 b ffc0401c =============================================================================== ffc0621c : const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { ffc0621c: 94 21 ff 88 stwu r1,-120(r1) ffc06220: 7c 08 02 a6 mflr r0 int rv = 0; mode &= ~rtems_filesystem_umask; ffc06224: 3d 20 00 00 lis r9,0 ffc06228: 81 29 27 90 lwz r9,10128(r9) const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { ffc0622c: 90 01 00 7c stw r0,124(r1) ffc06230: 93 e1 00 74 stw r31,116(r1) int rv = 0; mode &= ~rtems_filesystem_umask; ffc06234: 83 e9 00 08 lwz r31,8(r9) const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { ffc06238: 93 a1 00 6c stw r29,108(r1) ffc0623c: 7c dd 33 78 mr r29,r6 int rv = 0; mode &= ~rtems_filesystem_umask; ffc06240: 7c 9f f8 78 andc r31,r4,r31 switch (mode & S_IFMT) { ffc06244: 57 e9 04 26 rlwinm r9,r31,0,16,19 const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { ffc06248: 93 c1 00 70 stw r30,112(r1) int rv = 0; mode &= ~rtems_filesystem_umask; switch (mode & S_IFMT) { ffc0624c: 2f 89 20 00 cmpwi cr7,r9,8192 const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { ffc06250: 93 81 00 68 stw r28,104(r1) ffc06254: 7c be 2b 78 mr r30,r5 int rv = 0; mode &= ~rtems_filesystem_umask; switch (mode & S_IFMT) { ffc06258: 41 9e 00 5c beq- cr7,ffc062b4 ffc0625c: 2b 89 20 00 cmplwi cr7,r9,8192 ffc06260: 41 9d 00 40 bgt- cr7,ffc062a0 <== ALWAYS TAKEN ffc06264: 2f 89 10 00 cmpwi cr7,r9,4096 <== NOT EXECUTED ffc06268: 41 9e 00 4c beq- cr7,ffc062b4 <== NOT EXECUTED rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); } else { errno = EINVAL; ffc0626c: 48 01 28 f5 bl ffc18b60 <__errno> rv = -1; } } return rv; } ffc06270: 80 01 00 7c lwz r0,124(r1) } rtems_filesystem_eval_path_cleanup( &ctx ); } else { errno = EINVAL; rv = -1; ffc06274: 3b e0 ff ff li r31,-1 } } return rv; } ffc06278: 83 81 00 68 lwz r28,104(r1) ffc0627c: 7c 08 03 a6 mtlr r0 rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); } else { errno = EINVAL; ffc06280: 39 20 00 16 li r9,22 ffc06284: 91 23 00 00 stw r9,0(r3) rv = -1; } } return rv; } ffc06288: 7f e3 fb 78 mr r3,r31 ffc0628c: 83 a1 00 6c lwz r29,108(r1) ffc06290: 83 c1 00 70 lwz r30,112(r1) ffc06294: 83 e1 00 74 lwz r31,116(r1) ffc06298: 38 21 00 78 addi r1,r1,120 ffc0629c: 4e 80 00 20 blr { int rv = 0; mode &= ~rtems_filesystem_umask; switch (mode & S_IFMT) { ffc062a0: 2f 89 60 00 cmpwi cr7,r9,24576 ffc062a4: 41 9e 00 10 beq- cr7,ffc062b4 ffc062a8: 6d 2a ff ff xoris r10,r9,65535 ffc062ac: 2f 8a 80 00 cmpwi cr7,r10,-32768 ffc062b0: 40 9e ff bc bne+ cr7,ffc0626c <== ALWAYS TAKEN rv = -1; break; } if ( rv == 0 ) { if ( node_control->imfs_type == IMFS_GENERIC ) { ffc062b4: 81 3e 00 00 lwz r9,0(r30) ffc062b8: 2f 89 00 07 cmpwi cr7,r9,7 ffc062bc: 40 be ff b0 bne- cr7,ffc0626c rtems_filesystem_eval_path_context_t ctx; int eval_flags = RTEMS_FS_FOLLOW_LINK | RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE; const rtems_filesystem_location_info_t *currentloc = ffc062c0: 7c 64 1b 78 mr r4,r3 ffc062c4: 38 a0 00 78 li r5,120 ffc062c8: 38 61 00 08 addi r3,r1,8 ffc062cc: 48 00 25 29 bl ffc087f4 ffc062d0: 7c 7c 1b 78 mr r28,r3 rtems_filesystem_eval_path_start( &ctx, path, eval_flags ); if ( IMFS_is_imfs_instance( currentloc ) ) { ffc062d4: 4b ff fe d5 bl ffc061a8 ffc062d8: 2f 83 00 00 cmpwi cr7,r3,0 ffc062dc: 40 9e 00 40 bne- cr7,ffc0631c IMFS_update_mtime( parent ); } else { rv = -1; } } else { rtems_filesystem_eval_path_error( &ctx, ENOTSUP ); ffc062e0: 38 61 00 08 addi r3,r1,8 ffc062e4: 38 80 00 86 li r4,134 ffc062e8: 48 00 21 3d bl ffc08424 rv = -1; ffc062ec: 3b e0 ff ff li r31,-1 } rtems_filesystem_eval_path_cleanup( &ctx ); ffc062f0: 38 61 00 08 addi r3,r1,8 ffc062f4: 48 00 26 49 bl ffc0893c rv = -1; } } return rv; } ffc062f8: 80 01 00 7c lwz r0,124(r1) ffc062fc: 7f e3 fb 78 mr r3,r31 ffc06300: 83 81 00 68 lwz r28,104(r1) ffc06304: 7c 08 03 a6 mtlr r0 ffc06308: 83 a1 00 6c lwz r29,108(r1) ffc0630c: 83 c1 00 70 lwz r30,112(r1) ffc06310: 83 e1 00 74 lwz r31,116(r1) ffc06314: 38 21 00 78 addi r1,r1,120 ffc06318: 4e 80 00 20 blr if ( IMFS_is_imfs_instance( currentloc ) ) { IMFS_types_union info; IMFS_jnode_t *new_node; info.generic.context = context; new_node = IMFS_create_node_with_control( ffc0631c: 80 a1 00 10 lwz r5,16(r1) ffc06320: 7f e7 fb 78 mr r7,r31 ffc06324: 80 c1 00 14 lwz r6,20(r1) ffc06328: 7f 83 e3 78 mr r3,r28 ffc0632c: 7f c4 f3 78 mr r4,r30 if ( IMFS_is_imfs_instance( currentloc ) ) { IMFS_types_union info; IMFS_jnode_t *new_node; info.generic.context = context; ffc06330: 93 a1 00 40 stw r29,64(r1) new_node = IMFS_create_node_with_control( ffc06334: 39 01 00 40 addi r8,r1,64 ffc06338: 48 00 da 01 bl ffc13d38 IMFS_jnode_t *parent = currentloc->node_access; IMFS_update_ctime( parent ); IMFS_update_mtime( parent ); } else { rv = -1; ffc0633c: 3b e0 ff ff li r31,-1 rtems_filesystem_eval_path_get_tokenlen( &ctx ), mode, &info ); if ( new_node != NULL ) { ffc06340: 2f 83 00 00 cmpwi cr7,r3,0 ffc06344: 41 be ff ac beq- cr7,ffc062f0 IMFS_jnode_t *parent = currentloc->node_access; IMFS_update_ctime( parent ); ffc06348: 38 80 00 00 li r4,0 mode, &info ); if ( new_node != NULL ) { IMFS_jnode_t *parent = currentloc->node_access; ffc0634c: 83 dc 00 08 lwz r30,8(r28) IMFS_update_ctime( parent ); ffc06350: 38 61 00 58 addi r3,r1,88 ffc06354: 48 00 09 a5 bl ffc06cf8 ffc06358: 81 21 00 58 lwz r9,88(r1) IMFS_update_mtime( parent ); ffc0635c: 38 61 00 58 addi r3,r1,88 ); if ( new_node != NULL ) { IMFS_jnode_t *parent = currentloc->node_access; IMFS_update_ctime( parent ); ffc06360: 91 3e 00 48 stw r9,72(r30) IMFS_update_mtime( parent ); ffc06364: 38 80 00 00 li r4,0 ffc06368: 3b e0 00 00 li r31,0 ffc0636c: 48 00 09 8d bl ffc06cf8 ffc06370: 81 21 00 58 lwz r9,88(r1) ffc06374: 91 3e 00 44 stw r9,68(r30) ffc06378: 4b ff ff 78 b ffc062f0 =============================================================================== ffc115b4 : */ MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { ffc115b4: 94 21 ff f0 stwu r1,-16(r1) ffc115b8: 7c 08 02 a6 mflr r0 IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); ffc115bc: 38 a0 00 01 li r5,1 */ MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { ffc115c0: 93 e1 00 0c stw r31,12(r1) ffc115c4: 90 01 00 14 stw r0,20(r1) IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); ffc115c8: 4b ff fa 49 bl ffc11010 ffc115cc: 7c 7f 1b 78 mr r31,r3 if ( *block_entry_ptr ) ffc115d0: 81 23 00 00 lwz r9,0(r3) return 0; ffc115d4: 38 60 00 00 li r3,0 /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); if ( *block_entry_ptr ) ffc115d8: 2f 89 00 00 cmpwi cr7,r9,0 ffc115dc: 41 9e 00 18 beq- cr7,ffc115f4 if ( !memory ) return 1; *block_entry_ptr = memory; return 0; } ffc115e0: 80 01 00 14 lwz r0,20(r1) ffc115e4: 83 e1 00 0c lwz r31,12(r1) ffc115e8: 7c 08 03 a6 mtlr r0 ffc115ec: 38 21 00 10 addi r1,r1,16 ffc115f0: 4e 80 00 20 blr return 0; /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); ffc115f4: 4b ff f9 d9 bl ffc10fcc if ( !memory ) ffc115f8: 2c 03 00 00 cmpwi r3,0 ffc115fc: 41 82 00 10 beq- ffc1160c <== NEVER TAKEN return 1; *block_entry_ptr = memory; ffc11600: 90 7f 00 00 stw r3,0(r31) return 0; ffc11604: 38 60 00 00 li r3,0 ffc11608: 4b ff ff d8 b ffc115e0 /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); if ( !memory ) return 1; ffc1160c: 38 60 00 01 li r3,1 <== NOT EXECUTED ffc11610: 4b ff ff d0 b ffc115e0 <== NOT EXECUTED =============================================================================== ffc118bc : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { ffc118bc: 94 21 ff b8 stwu r1,-72(r1) IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc118c0: 39 00 00 00 li r8,0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { ffc118c4: 7d 80 00 26 mfcr r12 IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc118c8: 7f 88 28 00 cmpw cr7,r8,r5 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { ffc118cc: 93 21 00 2c stw r25,44(r1) IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc118d0: 3f 20 00 00 lis r25,0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { ffc118d4: 7c 08 02 a6 mflr r0 ffc118d8: 93 e1 00 44 stw r31,68(r1) IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc118dc: 83 f9 28 44 lwz r31,10308(r25) MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { ffc118e0: 92 c1 00 20 stw r22,32(r1) ffc118e4: 7c 96 23 78 mr r22,r4 IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc118e8: 57 e9 f0 be rlwinm r9,r31,30,2,31 ffc118ec: 39 49 00 01 addi r10,r9,1 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { ffc118f0: 92 e1 00 24 stw r23,36(r1) IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc118f4: 7d 4a 49 d6 mullw r10,r10,r9 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { ffc118f8: 93 41 00 30 stw r26,48(r1) ffc118fc: 7c d7 33 78 mr r23,r6 IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc11900: 39 4a 00 01 addi r10,r10,1 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { ffc11904: 93 c1 00 40 stw r30,64(r1) IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc11908: 7d 2a 49 d6 mullw r9,r10,r9 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { ffc1190c: 90 01 00 4c stw r0,76(r1) ffc11910: 7c ba 2b 78 mr r26,r5 IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc11914: 39 29 ff ff addi r9,r9,-1 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { ffc11918: 93 01 00 28 stw r24,40(r1) ffc1191c: 7c 7e 1b 78 mr r30,r3 ffc11920: 93 61 00 34 stw r27,52(r1) IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc11924: 7d 29 f9 d6 mullw r9,r9,r31 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { ffc11928: 93 81 00 38 stw r28,56(r1) ffc1192c: 93 a1 00 3c stw r29,60(r1) ffc11930: 91 81 00 1c stw r12,28(r1) IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc11934: 40 9d 01 f8 ble- cr7,ffc11b2c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFBIG ); /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) ffc11938: 83 7e 00 50 lwz r27,80(r30) ffc1193c: 83 1e 00 54 lwz r24,84(r30) ffc11940: 7f 9a d8 00 cmpw cr7,r26,r27 ffc11944: 40 9d 01 28 ble- cr7,ffc11a6c <== ALWAYS TAKEN return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11948: 7f fc fe 70 srawi r28,r31,31 ffc1194c: 7f 85 e3 78 mr r5,r28 ffc11950: 7f e6 fb 78 mr r6,r31 ffc11954: 7f 43 d3 78 mr r3,r26 ffc11958: 7e e4 bb 78 mr r4,r23 ffc1195c: 48 00 af 35 bl ffc1c890 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11960: 7f 63 db 78 mr r3,r27 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11964: 7c 9d 23 78 mr r29,r4 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11968: 7f 85 e3 78 mr r5,r28 ffc1196c: 7f e6 fb 78 mr r6,r31 ffc11970: 7f 04 c3 78 mr r4,r24 ffc11974: 48 00 af 1d bl ffc1c890 <__divdi3> /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( !IMFS_memfile_addblock( the_jnode, block ) ) { if ( zero_fill ) { ffc11978: 2e 16 00 00 cmpwi cr4,r22,0 offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ffc1197c: 7f 9d 20 40 cmplw cr7,r29,r4 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11980: 7f 84 f9 d6 mullw r28,r4,r31 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11984: 7c 9b 23 78 mr r27,r4 offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ffc11988: 7c 9f 23 78 mr r31,r4 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; ffc1198c: 7f 9c c0 50 subf r28,r28,r24 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ffc11990: 40 bc 00 14 bge+ cr7,ffc119a4 <== ALWAYS TAKEN ffc11994: 48 00 00 64 b ffc119f8 <== NOT EXECUTED ffc11998: 3b ff 00 01 addi r31,r31,1 ffc1199c: 7f 9d f8 40 cmplw cr7,r29,r31 ffc119a0: 41 9c 00 58 blt- cr7,ffc119f8 if ( !IMFS_memfile_addblock( the_jnode, block ) ) { ffc119a4: 7f e4 fb 78 mr r4,r31 ffc119a8: 7f c3 f3 78 mr r3,r30 ffc119ac: 4b ff fc 09 bl ffc115b4 ffc119b0: 2f 83 00 00 cmpwi cr7,r3,0 ffc119b4: 40 9e 01 08 bne- cr7,ffc11abc <== NEVER TAKEN if ( zero_fill ) { ffc119b8: 41 92 ff e0 beq+ cr4,ffc11998 size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; block_p *block_ptr = ffc119bc: 7f e4 fb 78 mr r4,r31 * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( !IMFS_memfile_addblock( the_jnode, block ) ) { if ( zero_fill ) { size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; ffc119c0: 83 19 28 44 lwz r24,10308(r25) block_p *block_ptr = ffc119c4: 38 a0 00 00 li r5,0 ffc119c8: 7f c3 f3 78 mr r3,r30 ffc119cc: 4b ff f6 45 bl ffc11010 * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( !IMFS_memfile_addblock( the_jnode, block ) ) { if ( zero_fill ) { size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; ffc119d0: 7f 1c c0 50 subf r24,r28,r24 block_p *block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); memset( &(*block_ptr) [offset], 0, count); ffc119d4: 80 63 00 00 lwz r3,0(r3) ffc119d8: 38 80 00 00 li r4,0 ffc119dc: 7f 05 c3 78 mr r5,r24 ffc119e0: 7c 63 e2 14 add r3,r3,r28 offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ffc119e4: 3b ff 00 01 addi r31,r31,1 if ( zero_fill ) { size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; block_p *block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); memset( &(*block_ptr) [offset], 0, count); ffc119e8: 48 00 24 89 bl ffc13e70 offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ffc119ec: 7f 9d f8 40 cmplw cr7,r29,r31 size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; block_p *block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); memset( &(*block_ptr) [offset], 0, count); offset = 0; ffc119f0: 3b 80 00 00 li r28,0 offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ffc119f4: 40 9c ff b0 bge+ cr7,ffc119a4 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; ffc119f8: 93 5e 00 50 stw r26,80(r30) IMFS_update_ctime(the_jnode); ffc119fc: 38 80 00 00 li r4,0 ffc11a00: 38 61 00 08 addi r3,r1,8 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; ffc11a04: 92 fe 00 54 stw r23,84(r30) IMFS_update_ctime(the_jnode); ffc11a08: 4b ff 32 4d bl ffc04c54 ffc11a0c: 81 21 00 08 lwz r9,8(r1) IMFS_update_mtime(the_jnode); ffc11a10: 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); ffc11a14: 91 3e 00 48 stw r9,72(r30) IMFS_update_mtime(the_jnode); ffc11a18: 38 80 00 00 li r4,0 ffc11a1c: 4b ff 32 39 bl ffc04c54 return 0; } ffc11a20: 80 01 00 4c lwz r0,76(r1) * Set the new length of the file. */ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); ffc11a24: 81 21 00 08 lwz r9,8(r1) return 0; ffc11a28: 38 60 00 00 li r3,0 } ffc11a2c: 7c 08 03 a6 mtlr r0 ffc11a30: 81 81 00 1c lwz r12,28(r1) * Set the new length of the file. */ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); ffc11a34: 91 3e 00 44 stw r9,68(r30) return 0; } ffc11a38: 7d 80 81 20 mtcrf 8,r12 ffc11a3c: 82 c1 00 20 lwz r22,32(r1) ffc11a40: 82 e1 00 24 lwz r23,36(r1) ffc11a44: 83 01 00 28 lwz r24,40(r1) ffc11a48: 83 21 00 2c lwz r25,44(r1) ffc11a4c: 83 41 00 30 lwz r26,48(r1) ffc11a50: 83 61 00 34 lwz r27,52(r1) ffc11a54: 83 81 00 38 lwz r28,56(r1) ffc11a58: 83 a1 00 3c lwz r29,60(r1) ffc11a5c: 83 c1 00 40 lwz r30,64(r1) ffc11a60: 83 e1 00 44 lwz r31,68(r1) ffc11a64: 38 21 00 48 addi r1,r1,72 ffc11a68: 4e 80 00 20 blr rtems_set_errno_and_return_minus_one( EFBIG ); /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) ffc11a6c: 40 9e 00 0c bne- cr7,ffc11a78 <== NEVER TAKEN ffc11a70: 7f 97 c0 40 cmplw cr7,r23,r24 ffc11a74: 41 9d fe d4 bgt+ cr7,ffc11948 <== ALWAYS TAKEN return 0; ffc11a78: 38 60 00 00 li r3,0 <== NOT EXECUTED the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } ffc11a7c: 80 01 00 4c lwz r0,76(r1) ffc11a80: 81 81 00 1c lwz r12,28(r1) ffc11a84: 7c 08 03 a6 mtlr r0 ffc11a88: 82 c1 00 20 lwz r22,32(r1) ffc11a8c: 82 e1 00 24 lwz r23,36(r1) ffc11a90: 7d 80 81 20 mtcrf 8,r12 ffc11a94: 83 01 00 28 lwz r24,40(r1) ffc11a98: 83 21 00 2c lwz r25,44(r1) ffc11a9c: 83 41 00 30 lwz r26,48(r1) ffc11aa0: 83 61 00 34 lwz r27,52(r1) ffc11aa4: 83 81 00 38 lwz r28,56(r1) ffc11aa8: 83 a1 00 3c lwz r29,60(r1) ffc11aac: 83 c1 00 40 lwz r30,64(r1) ffc11ab0: 83 e1 00 44 lwz r31,68(r1) ffc11ab4: 38 21 00 48 addi r1,r1,72 ffc11ab8: 4e 80 00 20 blr memset( &(*block_ptr) [offset], 0, count); offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { ffc11abc: 7f 9f d8 40 cmplw cr7,r31,r27 <== NOT EXECUTED ffc11ac0: 41 9c 00 1c blt- cr7,ffc11adc <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); ffc11ac4: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc11ac8: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED memset( &(*block_ptr) [offset], 0, count); offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { ffc11acc: 3b ff ff ff addi r31,r31,-1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); ffc11ad0: 4b ff fd b1 bl ffc11880 <== NOT EXECUTED memset( &(*block_ptr) [offset], 0, count); offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { ffc11ad4: 7f 9b f8 40 cmplw cr7,r27,r31 <== NOT EXECUTED ffc11ad8: 40 9d ff ec ble+ cr7,ffc11ac4 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); ffc11adc: 48 00 15 9d bl ffc13078 <__errno> <== NOT EXECUTED the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } ffc11ae0: 80 01 00 4c lwz r0,76(r1) <== NOT EXECUTED ffc11ae4: 81 81 00 1c lwz r12,28(r1) <== NOT EXECUTED } } else { for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); ffc11ae8: 39 20 00 1c li r9,28 <== NOT EXECUTED the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } ffc11aec: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED } } else { for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); ffc11af0: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } ffc11af4: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED } } else { for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); ffc11af8: 38 60 ff ff li r3,-1 <== NOT EXECUTED the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } ffc11afc: 82 c1 00 20 lwz r22,32(r1) <== NOT EXECUTED ffc11b00: 82 e1 00 24 lwz r23,36(r1) <== NOT EXECUTED ffc11b04: 83 01 00 28 lwz r24,40(r1) <== NOT EXECUTED ffc11b08: 83 21 00 2c lwz r25,44(r1) <== NOT EXECUTED ffc11b0c: 83 41 00 30 lwz r26,48(r1) <== NOT EXECUTED ffc11b10: 83 61 00 34 lwz r27,52(r1) <== NOT EXECUTED ffc11b14: 83 81 00 38 lwz r28,56(r1) <== NOT EXECUTED ffc11b18: 83 a1 00 3c lwz r29,60(r1) <== NOT EXECUTED ffc11b1c: 83 c1 00 40 lwz r30,64(r1) <== NOT EXECUTED ffc11b20: 83 e1 00 44 lwz r31,68(r1) <== NOT EXECUTED ffc11b24: 38 21 00 48 addi r1,r1,72 <== NOT EXECUTED ffc11b28: 4e 80 00 20 blr <== NOT EXECUTED IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc11b2c: 40 9e 00 0c bne- cr7,ffc11b38 <== NEVER TAKEN ffc11b30: 7f 89 30 40 cmplw cr7,r9,r6 ffc11b34: 41 9d fe 04 bgt+ cr7,ffc11938 rtems_set_errno_and_return_minus_one( EFBIG ); ffc11b38: 48 00 15 41 bl ffc13078 <__errno> ffc11b3c: 39 20 00 1b li r9,27 ffc11b40: 91 23 00 00 stw r9,0(r3) ffc11b44: 38 60 ff ff li r3,-1 ffc11b48: 4b ff ff 34 b ffc11a7c =============================================================================== ffc11010 : my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc11010: 3d 20 00 00 lis r9,0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc11014: 94 21 ff e0 stwu r1,-32(r1) ffc11018: 7c 08 02 a6 mflr r0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc1101c: 81 29 28 44 lwz r9,10308(r9) #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc11020: 93 e1 00 1c stw r31,28(r1) ffc11024: 7c 7f 1b 78 mr r31,r3 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc11028: 55 29 f0 be rlwinm r9,r9,30,2,31 ffc1102c: 39 49 ff ff addi r10,r9,-1 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc11030: 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 ) { ffc11034: 7f 84 50 40 cmplw cr7,r4,r10 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc11038: 93 81 00 10 stw r28,16(r1) ffc1103c: 93 a1 00 14 stw r29,20(r1) ffc11040: 93 c1 00 18 stw r30,24(r1) my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc11044: 41 9d 00 40 bgt- cr7,ffc11084 p = info->indirect; if ( malloc_it ) { ffc11048: 2f 85 00 00 cmpwi cr7,r5,0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; ffc1104c: 80 63 00 58 lwz r3,88(r3) if ( malloc_it ) { ffc11050: 40 9e 01 3c bne- cr7,ffc1118c info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) ffc11054: 2f 83 00 00 cmpwi cr7,r3,0 ffc11058: 41 9e 01 e8 beq- cr7,ffc11240 <== NEVER TAKEN return 0; return &info->indirect[ my_block ]; ffc1105c: 54 84 10 3a rlwinm r4,r4,2,0,29 ffc11060: 7c 63 22 14 add r3,r3,r4 /* * This means the requested block number is out of range. */ return 0; } ffc11064: 80 01 00 24 lwz r0,36(r1) ffc11068: 83 81 00 10 lwz r28,16(r1) ffc1106c: 7c 08 03 a6 mtlr r0 ffc11070: 83 a1 00 14 lwz r29,20(r1) ffc11074: 83 c1 00 18 lwz r30,24(r1) ffc11078: 83 e1 00 1c lwz r31,28(r1) ffc1107c: 38 21 00 20 addi r1,r1,32 ffc11080: 4e 80 00 20 blr /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { ffc11084: 39 49 00 01 addi r10,r9,1 ffc11088: 7d 4a 49 d6 mullw r10,r10,r9 ffc1108c: 39 0a ff ff addi r8,r10,-1 ffc11090: 7f 84 40 40 cmplw cr7,r4,r8 ffc11094: 40 9d 00 98 ble- cr7,ffc1112c } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { ffc11098: 39 0a 00 01 addi r8,r10,1 ffc1109c: 7d 08 49 d6 mullw r8,r8,r9 ffc110a0: 39 08 ff ff addi r8,r8,-1 ffc110a4: 7f 84 40 40 cmplw cr7,r4,r8 ffc110a8: 41 9d 01 98 bgt- cr7,ffc11240 <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; ffc110ac: 7c 8a 20 50 subf r4,r10,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; ffc110b0: 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; ffc110b4: 7d 04 4b 96 divwu r8,r4,r9 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; ffc110b8: 7f c8 4b 96 divwu r30,r8,r9 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { ffc110bc: 2f 85 00 00 cmpwi cr7,r5,0 * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ffc110c0: 7d 48 49 d6 mullw r10,r8,r9 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; ffc110c4: 7d 3e 49 d6 mullw r9,r30,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; ffc110c8: 7f 8a 20 50 subf r28,r10,r4 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; ffc110cc: 7f a9 40 50 subf r29,r9,r8 p = info->triply_indirect; if ( malloc_it ) { ffc110d0: 41 9e 01 20 beq- cr7,ffc111f0 if ( !p ) { ffc110d4: 2f 83 00 00 cmpwi cr7,r3,0 ffc110d8: 41 9e 01 c0 beq- cr7,ffc11298 if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; ffc110dc: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc110e0: 7c c3 f0 2e lwzx r6,r3,r30 ffc110e4: 7f c3 f2 14 add r30,r3,r30 if ( !p1 ) { ffc110e8: 2f 86 00 00 cmpwi cr7,r6,0 ffc110ec: 41 9e 01 98 beq- cr7,ffc11284 if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; ffc110f0: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc110f4: 7c e6 e8 2e lwzx r7,r6,r29 ffc110f8: 7f a6 ea 14 add r29,r6,r29 if ( !p2 ) { ffc110fc: 2f 87 00 00 cmpwi cr7,r7,0 ffc11100: 41 9e 01 5c beq- cr7,ffc1125c /* * This means the requested block number is out of range. */ return 0; } ffc11104: 80 01 00 24 lwz r0,36(r1) p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; ffc11108: 57 83 10 3a rlwinm r3,r28,2,0,29 /* * This means the requested block number is out of range. */ return 0; } ffc1110c: 83 a1 00 14 lwz r29,20(r1) p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; ffc11110: 7c 67 1a 14 add r3,r7,r3 /* * This means the requested block number is out of range. */ return 0; } ffc11114: 7c 08 03 a6 mtlr r0 ffc11118: 83 81 00 10 lwz r28,16(r1) ffc1111c: 83 c1 00 18 lwz r30,24(r1) ffc11120: 83 e1 00 1c lwz r31,28(r1) ffc11124: 38 21 00 20 addi r1,r1,32 ffc11128: 4e 80 00 20 blr /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; ffc1112c: 7c 89 20 50 subf r4,r9,r4 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; ffc11130: 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; ffc11134: 7f c4 4b 96 divwu r30,r4,r9 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { ffc11138: 2f 85 00 00 cmpwi cr7,r5,0 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ffc1113c: 7d 3e 49 d6 mullw r9,r30,r9 ffc11140: 7f a9 20 50 subf r29,r9,r4 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { ffc11144: 41 9e 00 6c beq- cr7,ffc111b0 if ( !p ) { ffc11148: 2f 83 00 00 cmpwi cr7,r3,0 ffc1114c: 41 9e 01 24 beq- cr7,ffc11270 if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; ffc11150: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc11154: 7d 03 f0 2e lwzx r8,r3,r30 ffc11158: 7f c3 f2 14 add r30,r3,r30 if ( !p1 ) { ffc1115c: 2f 88 00 00 cmpwi cr7,r8,0 ffc11160: 41 9e 00 e8 beq- cr7,ffc11248 /* * This means the requested block number is out of range. */ return 0; } ffc11164: 80 01 00 24 lwz r0,36(r1) if ( !p1 ) return 0; p[ doubly ] = (block_p) p1; } return (block_p *)&p1[ singly ]; ffc11168: 57 a3 10 3a rlwinm r3,r29,2,0,29 /* * This means the requested block number is out of range. */ return 0; } ffc1116c: 83 81 00 10 lwz r28,16(r1) if ( !p1 ) return 0; p[ doubly ] = (block_p) p1; } return (block_p *)&p1[ singly ]; ffc11170: 7c 68 1a 14 add r3,r8,r3 /* * This means the requested block number is out of range. */ return 0; } ffc11174: 7c 08 03 a6 mtlr r0 ffc11178: 83 a1 00 14 lwz r29,20(r1) ffc1117c: 83 c1 00 18 lwz r30,24(r1) ffc11180: 83 e1 00 1c lwz r31,28(r1) ffc11184: 38 21 00 20 addi r1,r1,32 ffc11188: 4e 80 00 20 blr if ( my_block <= LAST_INDIRECT ) { p = info->indirect; if ( malloc_it ) { if ( !p ) { ffc1118c: 2f 83 00 00 cmpwi cr7,r3,0 ffc11190: 40 9e fe cc bne+ cr7,ffc1105c p = memfile_alloc_block(); ffc11194: 90 81 00 08 stw r4,8(r1) ffc11198: 4b ff fe 35 bl ffc10fcc if ( !p ) ffc1119c: 2c 03 00 00 cmpwi r3,0 ffc111a0: 80 81 00 08 lwz r4,8(r1) ffc111a4: 41 82 00 9c beq- ffc11240 <== NEVER TAKEN return 0; info->indirect = p; ffc111a8: 90 7f 00 58 stw r3,88(r31) ffc111ac: 4b ff fe b0 b ffc1105c } return (block_p *)&p1[ singly ]; } if ( !p ) ffc111b0: 2f 83 00 00 cmpwi cr7,r3,0 ffc111b4: 41 9e 00 8c beq- cr7,ffc11240 <== NEVER TAKEN return 0; p = (block_p *)p[ doubly ]; ffc111b8: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc111bc: 7d 43 f0 2e lwzx r10,r3,r30 if ( !p ) ffc111c0: 2f 8a 00 00 cmpwi cr7,r10,0 ffc111c4: 41 9e 00 7c beq- cr7,ffc11240 <== NEVER TAKEN /* * This means the requested block number is out of range. */ return 0; } ffc111c8: 80 01 00 24 lwz r0,36(r1) p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; ffc111cc: 57 a3 10 3a rlwinm r3,r29,2,0,29 /* * This means the requested block number is out of range. */ return 0; } ffc111d0: 83 81 00 10 lwz r28,16(r1) p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; ffc111d4: 7c 6a 1a 14 add r3,r10,r3 /* * This means the requested block number is out of range. */ return 0; } ffc111d8: 7c 08 03 a6 mtlr r0 ffc111dc: 83 a1 00 14 lwz r29,20(r1) ffc111e0: 83 c1 00 18 lwz r30,24(r1) ffc111e4: 83 e1 00 1c lwz r31,28(r1) ffc111e8: 38 21 00 20 addi r1,r1,32 ffc111ec: 4e 80 00 20 blr p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) ffc111f0: 2f 83 00 00 cmpwi cr7,r3,0 ffc111f4: 41 9e 00 4c beq- cr7,ffc11240 <== NEVER TAKEN return 0; p1 = (block_p *) p[ triply ]; ffc111f8: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc111fc: 7d 43 f0 2e lwzx r10,r3,r30 if ( !p1 ) ffc11200: 2f 8a 00 00 cmpwi cr7,r10,0 ffc11204: 41 9e 00 3c beq- cr7,ffc11240 <== NEVER TAKEN return 0; p2 = (block_p *)p1[ doubly ]; ffc11208: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc1120c: 7d 2a e8 2e lwzx r9,r10,r29 if ( !p2 ) ffc11210: 2f 89 00 00 cmpwi cr7,r9,0 ffc11214: 41 9e 00 2c beq- cr7,ffc11240 <== NEVER TAKEN /* * This means the requested block number is out of range. */ return 0; } ffc11218: 80 01 00 24 lwz r0,36(r1) p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; ffc1121c: 57 83 10 3a rlwinm r3,r28,2,0,29 /* * This means the requested block number is out of range. */ return 0; } ffc11220: 83 a1 00 14 lwz r29,20(r1) p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; ffc11224: 7c 69 1a 14 add r3,r9,r3 /* * This means the requested block number is out of range. */ return 0; } ffc11228: 7c 08 03 a6 mtlr r0 ffc1122c: 83 81 00 10 lwz r28,16(r1) ffc11230: 83 c1 00 18 lwz r30,24(r1) ffc11234: 83 e1 00 1c lwz r31,28(r1) ffc11238: 38 21 00 20 addi r1,r1,32 ffc1123c: 4e 80 00 20 blr if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) return 0; ffc11240: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc11244: 4b ff fe 20 b ffc11064 <== NOT EXECUTED info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); ffc11248: 4b ff fd 85 bl ffc10fcc if ( !p1 ) ffc1124c: 7c 68 1b 79 mr. r8,r3 ffc11250: 41 a2 ff f0 beq- ffc11240 <== NEVER TAKEN return 0; p[ doubly ] = (block_p) p1; ffc11254: 91 1e 00 00 stw r8,0(r30) ffc11258: 4b ff ff 0c b ffc11164 p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); ffc1125c: 4b ff fd 71 bl ffc10fcc if ( !p2 ) ffc11260: 7c 67 1b 79 mr. r7,r3 ffc11264: 41 a2 ff dc beq- ffc11240 <== NEVER TAKEN return 0; p1[ doubly ] = (block_p) p2; ffc11268: 90 fd 00 00 stw r7,0(r29) ffc1126c: 4b ff fe 98 b ffc11104 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); ffc11270: 4b ff fd 5d bl ffc10fcc if ( !p ) ffc11274: 2c 03 00 00 cmpwi r3,0 ffc11278: 41 a2 ff c8 beq- ffc11240 <== NEVER TAKEN return 0; info->doubly_indirect = p; ffc1127c: 90 7f 00 5c stw r3,92(r31) ffc11280: 4b ff fe d0 b ffc11150 info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); ffc11284: 4b ff fd 49 bl ffc10fcc if ( !p1 ) ffc11288: 7c 66 1b 79 mr. r6,r3 ffc1128c: 41 a2 ff b4 beq- ffc11240 <== NEVER TAKEN return 0; p[ triply ] = (block_p) p1; ffc11290: 90 de 00 00 stw r6,0(r30) ffc11294: 4b ff fe 5c b ffc110f0 p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); ffc11298: 4b ff fd 35 bl ffc10fcc if ( !p ) ffc1129c: 2c 03 00 00 cmpwi r3,0 ffc112a0: 41 a2 ff a0 beq- ffc11240 <== NEVER TAKEN return 0; info->triply_indirect = p; ffc112a4: 90 7f 00 60 stw r3,96(r31) ffc112a8: 4b ff fe 34 b ffc110dc =============================================================================== ffc112ac : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc112ac: 94 21 ff c0 stwu r1,-64(r1) ffc112b0: 7c 08 02 a6 mflr r0 ffc112b4: 93 01 00 20 stw r24,32(r1) ffc112b8: 7c f8 3b 78 mr r24,r7 ffc112bc: 90 01 00 44 stw r0,68(r1) ffc112c0: 93 41 00 28 stw r26,40(r1) ffc112c4: 7c 7a 1b 78 mr r26,r3 ffc112c8: 93 c1 00 38 stw r30,56(r1) ffc112cc: 7c be 2b 78 mr r30,r5 ffc112d0: 93 e1 00 3c stw r31,60(r1) ffc112d4: 7c df 33 78 mr r31,r6 ffc112d8: 92 e1 00 1c stw r23,28(r1) ffc112dc: 93 21 00 24 stw r25,36(r1) ffc112e0: 93 61 00 2c stw r27,44(r1) ffc112e4: 93 81 00 30 stw r28,48(r1) ffc112e8: 93 a1 00 34 stw r29,52(r1) rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; ffc112ec: 81 23 00 4c lwz r9,76(r3) * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) { ffc112f0: 81 29 00 00 lwz r9,0(r9) ffc112f4: 2f 89 00 05 cmpwi cr7,r9,5 ffc112f8: 41 9e 01 d8 beq- cr7,ffc114d0 /* * 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 ) ffc112fc: 81 23 00 50 lwz r9,80(r3) ffc11300: 39 40 00 00 li r10,0 ffc11304: 83 83 00 54 lwz r28,84(r3) ffc11308: 7f 8a 48 00 cmpw cr7,r10,r9 /* * 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; ffc1130c: 7c c9 33 78 mr r9,r6 ffc11310: 7d 48 32 14 add r10,r8,r6 if ( last_byte > the_jnode->info.file.size ) ffc11314: 40 9d 01 24 ble- cr7,ffc11438 <== ALWAYS TAKEN my_length = the_jnode->info.file.size - start; ffc11318: 7f 89 e0 50 subf r28,r9,r28 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc1131c: 3f 20 00 00 lis r25,0 ffc11320: 83 b9 28 44 lwz r29,10308(r25) ffc11324: 7f e4 fb 78 mr r4,r31 ffc11328: 7f c3 f3 78 mr r3,r30 ffc1132c: 7f bb fe 70 srawi r27,r29,31 ffc11330: 7f 65 db 78 mr r5,r27 ffc11334: 7f a6 eb 78 mr r6,r29 ffc11338: 48 00 b9 7d bl ffc1ccb4 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc1133c: 7f c3 f3 78 mr r3,r30 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11340: 7c 97 23 78 mr r23,r4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11344: 7f 65 db 78 mr r5,r27 ffc11348: 7f e4 fb 78 mr r4,r31 ffc1134c: 7f a6 eb 78 mr r6,r29 ffc11350: 48 00 b5 41 bl ffc1c890 <__divdi3> if ( start_offset ) { ffc11354: 2f 97 00 00 cmpwi cr7,r23,0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11358: 7c 9f 23 78 mr r31,r4 if ( start_offset ) { ffc1135c: 41 9e 00 e8 beq- cr7,ffc11444 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; ffc11360: 7f b7 e8 50 subf r29,r23,r29 ffc11364: 7f 9c e8 40 cmplw cr7,r28,r29 ffc11368: 7f 9b e3 78 mr r27,r28 ffc1136c: 41 9d 01 b4 bgt- cr7,ffc11520 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc11370: 7f 43 d3 78 mr r3,r26 ffc11374: 7f e4 fb 78 mr r4,r31 ffc11378: 38 a0 00 00 li r5,0 ffc1137c: 4b ff fc 95 bl ffc11010 if ( !block_ptr ) ffc11380: 7c 69 1b 79 mr. r9,r3 return copied; ffc11384: 38 60 00 00 li r3,0 if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) ffc11388: 41 82 00 7c beq- ffc11404 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); ffc1138c: 80 89 00 00 lwz r4,0(r9) ffc11390: 7f 03 c3 78 mr r3,r24 ffc11394: 7f 65 db 78 mr r5,r27 ffc11398: 7c 84 ba 14 add r4,r4,r23 ffc1139c: 48 00 29 e1 bl ffc13d7c ffc113a0: 83 b9 28 44 lwz r29,10308(r25) dest += to_copy; ffc113a4: 7f d8 da 14 add r30,r24,r27 block++; ffc113a8: 3b ff 00 01 addi r31,r31,1 my_length -= to_copy; ffc113ac: 7f 9b e0 50 subf r28,r27,r28 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc113b0: 7f 9c e8 40 cmplw cr7,r28,r29 ffc113b4: 40 bc 00 20 bge+ cr7,ffc113d4 ffc113b8: 48 00 00 98 b ffc11450 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); ffc113bc: 80 89 00 00 lwz r4,0(r9) dest += to_copy; block++; my_length -= to_copy; copied += to_copy; ffc113c0: 7f 7b ea 14 add r27,r27,r29 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); ffc113c4: 48 00 29 b9 bl ffc13d7c /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc113c8: 81 39 28 44 lwz r9,10308(r25) ffc113cc: 7f 89 e0 40 cmplw cr7,r9,r28 ffc113d0: 41 9d 00 80 bgt- cr7,ffc11450 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc113d4: 7f e4 fb 78 mr r4,r31 ffc113d8: 38 a0 00 00 li r5,0 ffc113dc: 7f 43 d3 78 mr r3,r26 ffc113e0: 4b ff fc 31 bl ffc11010 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; ffc113e4: 7f 9d e0 50 subf r28,r29,r28 * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) ffc113e8: 7c 69 1b 79 mr. r9,r3 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); ffc113ec: 7f a5 eb 78 mr r5,r29 ffc113f0: 7f c3 f3 78 mr r3,r30 dest += to_copy; block++; ffc113f4: 3b ff 00 01 addi r31,r31,1 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; ffc113f8: 7f de ea 14 add r30,r30,r29 * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) ffc113fc: 40 82 ff c0 bne+ ffc113bc <== ALWAYS TAKEN IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; ffc11400: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } ffc11404: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED ffc11408: 82 e1 00 1c lwz r23,28(r1) <== NOT EXECUTED ffc1140c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc11410: 83 01 00 20 lwz r24,32(r1) <== NOT EXECUTED ffc11414: 83 21 00 24 lwz r25,36(r1) <== NOT EXECUTED ffc11418: 83 41 00 28 lwz r26,40(r1) <== NOT EXECUTED ffc1141c: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc11420: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc11424: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc11428: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc1142c: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc11430: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc11434: 4e 80 00 20 blr <== NOT EXECUTED /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) ffc11438: 41 9e 00 f0 beq- cr7,ffc11528 <== ALWAYS TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; ffc1143c: 7d 1c 43 78 mr r28,r8 <== NOT EXECUTED ffc11440: 4b ff fe dc b ffc1131c <== NOT EXECUTED unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; ffc11444: 7f 1e c3 78 mr r30,r24 */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; copied = 0; ffc11448: 3b 60 00 00 li r27,0 ffc1144c: 4b ff ff 64 b ffc113b0 /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { ffc11450: 2f 9c 00 00 cmpwi cr7,r28,0 ffc11454: 41 9e 00 30 beq- cr7,ffc11484 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc11458: 7f 43 d3 78 mr r3,r26 ffc1145c: 7f e4 fb 78 mr r4,r31 ffc11460: 38 a0 00 00 li r5,0 ffc11464: 4b ff fb ad bl ffc11010 if ( !block_ptr ) ffc11468: 2c 03 00 00 cmpwi r3,0 ffc1146c: 41 a2 ff 94 beq- ffc11400 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); ffc11470: 80 83 00 00 lwz r4,0(r3) ffc11474: 7f 85 e3 78 mr r5,r28 ffc11478: 7f c3 f3 78 mr r3,r30 ffc1147c: 48 00 29 01 bl ffc13d7c copied += my_length; ffc11480: 7f 7b e2 14 add r27,r27,r28 } IMFS_update_atime( the_jnode ); ffc11484: 38 61 00 08 addi r3,r1,8 ffc11488: 38 80 00 00 li r4,0 ffc1148c: 4b ff 37 c9 bl ffc04c54 ffc11490: 81 21 00 08 lwz r9,8(r1) return copied; ffc11494: 7f 63 db 78 mr r3,r27 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); ffc11498: 91 3a 00 40 stw r9,64(r26) return copied; } ffc1149c: 80 01 00 44 lwz r0,68(r1) ffc114a0: 82 e1 00 1c lwz r23,28(r1) ffc114a4: 7c 08 03 a6 mtlr r0 ffc114a8: 83 01 00 20 lwz r24,32(r1) ffc114ac: 83 21 00 24 lwz r25,36(r1) ffc114b0: 83 41 00 28 lwz r26,40(r1) ffc114b4: 83 61 00 2c lwz r27,44(r1) ffc114b8: 83 81 00 30 lwz r28,48(r1) ffc114bc: 83 a1 00 34 lwz r29,52(r1) ffc114c0: 83 c1 00 38 lwz r30,56(r1) ffc114c4: 83 e1 00 3c lwz r31,60(r1) ffc114c8: 38 21 00 40 addi r1,r1,64 ffc114cc: 4e 80 00 20 blr if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) ffc114d0: 81 43 00 50 lwz r10,80(r3) ffc114d4: 39 20 00 00 li r9,0 ffc114d8: 81 63 00 54 lwz r11,84(r3) my_length = length; if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; ffc114dc: 80 83 00 58 lwz r4,88(r3) if (my_length > (the_jnode->info.linearfile.size - start)) ffc114e0: 7c ff 58 10 subfc r7,r31,r11 ffc114e4: 7c de 51 10 subfe r6,r30,r10 ffc114e8: 7f 89 30 00 cmpw cr7,r9,r6 ffc114ec: 40 9d 00 4c ble- cr7,ffc11538 <== ALWAYS TAKEN my_length = the_jnode->info.linearfile.size - start; ffc114f0: 7f 7f 58 50 subf r27,r31,r11 memcpy(dest, &file_ptr[start], my_length); ffc114f4: 7c 84 fa 14 add r4,r4,r31 ffc114f8: 7f 65 db 78 mr r5,r27 ffc114fc: 7f 03 c3 78 mr r3,r24 ffc11500: 48 00 28 7d bl ffc13d7c return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); ffc11504: 38 61 00 08 addi r3,r1,8 ffc11508: 38 80 00 00 li r4,0 ffc1150c: 4b ff 37 49 bl ffc04c54 ffc11510: 81 21 00 08 lwz r9,8(r1) return copied; ffc11514: 7f 63 db 78 mr r3,r27 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); ffc11518: 91 3a 00 40 stw r9,64(r26) ffc1151c: 4b ff ff 80 b ffc1149c ffc11520: 7f bb eb 78 mr r27,r29 ffc11524: 4b ff fe 4c b ffc11370 /* * 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 ) ffc11528: 7f 8a e0 40 cmplw cr7,r10,r28 ffc1152c: 41 bd fd ec bgt- cr7,ffc11318 /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; ffc11530: 7d 1c 43 78 mr r28,r8 ffc11534: 4b ff fd e8 b ffc1131c if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) ffc11538: 40 9e 00 0c bne- cr7,ffc11544 <== NEVER TAKEN ffc1153c: 7f 88 38 40 cmplw cr7,r8,r7 ffc11540: 41 9d ff b0 bgt+ cr7,ffc114f0 <== ALWAYS TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; ffc11544: 7d 1b 43 78 mr r27,r8 <== NOT EXECUTED ffc11548: 4b ff ff ac b ffc114f4 <== NOT EXECUTED =============================================================================== ffc116d4 : * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc116d4: 94 21 ff d8 stwu r1,-40(r1) ffc116d8: 7c 08 02 a6 mflr r0 ffc116dc: 90 01 00 2c stw r0,44(r1) * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { ffc116e0: 81 23 00 58 lwz r9,88(r3) * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc116e4: 93 c1 00 20 stw r30,32(r1) /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; ffc116e8: 3f c0 00 00 lis r30,0 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { ffc116ec: 2f 89 00 00 cmpwi cr7,r9,0 * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc116f0: 93 a1 00 1c stw r29,28(r1) /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; ffc116f4: 83 be 28 44 lwz r29,10308(r30) * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc116f8: 93 41 00 10 stw r26,16(r1) ffc116fc: 7c 7a 1b 78 mr r26,r3 /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; ffc11700: 57 bd f0 be rlwinm r29,r29,30,2,31 * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc11704: 93 21 00 0c stw r25,12(r1) ffc11708: 93 61 00 14 stw r27,20(r1) ffc1170c: 93 81 00 18 stw r28,24(r1) ffc11710: 93 e1 00 24 stw r31,36(r1) * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { ffc11714: 41 9e 00 10 beq- cr7,ffc11724 memfile_free_blocks_in_table( &info->indirect, to_free ); ffc11718: 38 63 00 58 addi r3,r3,88 ffc1171c: 7f a4 eb 78 mr r4,r29 ffc11720: 4b ff ff 25 bl ffc11644 } if ( info->doubly_indirect ) { ffc11724: 81 3a 00 5c lwz r9,92(r26) ffc11728: 2f 89 00 00 cmpwi cr7,r9,0 ffc1172c: 41 9e 00 68 beq- cr7,ffc11794 for ( i=0 ; i <== NEVER TAKEN ffc1173c: 3f 80 00 00 lis r28,0 ffc11740: 38 60 00 00 li r3,0 ffc11744: 3b e0 00 00 li r31,0 ffc11748: 3b 9c 28 44 addi r28,r28,10308 ffc1174c: 48 00 00 08 b ffc11754 ffc11750: 81 3a 00 5c lwz r9,92(r26) if ( info->doubly_indirect[i] ) { ffc11754: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc11758: 7d 49 18 2e lwzx r10,r9,r3 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { memfile_free_blocks_in_table( ffc11760: 7f a4 eb 78 mr r4,r29 memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { ffc11764: 2f 8a 00 00 cmpwi cr7,r10,0 ffc11768: 7c 69 1a 14 add r3,r9,r3 ffc1176c: 41 9e 00 08 beq- cr7,ffc11774 <== NEVER TAKEN memfile_free_blocks_in_table( ffc11770: 4b ff fe d5 bl ffc11644 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 ); ffc11788: 38 7a 00 5c addi r3,r26,92 ffc1178c: 7f a4 eb 78 mr r4,r29 ffc11790: 4b ff fe b5 bl ffc11644 } if ( info->triply_indirect ) { ffc11794: 80 7a 00 60 lwz r3,96(r26) ffc11798: 2f 83 00 00 cmpwi cr7,r3,0 ffc1179c: 41 9e 00 b4 beq- cr7,ffc11850 for ( i=0 ; i <== NEVER TAKEN p = (block_p *) info->triply_indirect[i]; ffc117ac: 83 c3 00 00 lwz r30,0(r3) if ( !p ) /* ensure we have a valid pointer */ ffc117b0: 2f 9e 00 00 cmpwi cr7,r30,0 ffc117b4: 41 9e 00 90 beq- cr7,ffc11844 <== NEVER TAKEN ffc117b8: 3f 80 00 00 lis r28,0 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; ffc117bc: 3b 20 00 00 li r25,0 if ( !p ) /* ensure we have a valid pointer */ ffc117c0: 3b 60 00 00 li r27,0 ffc117c4: 3b 9c 28 44 addi r28,r28,10308 break; for ( j=0 ; j<== NEVER TAKEN ffc117d0: 39 20 00 00 li r9,0 ffc117d4: 3b e0 00 00 li r31,0 if ( p[j] ) { ffc117d8: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc117dc: 7d 5e 48 2e lwzx r10,r30,r9 if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; jtriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j<== NEVER TAKEN memfile_free_blocks_in_table( (block_p **)&p[j], to_free); ffc117f4: 4b ff fe 51 bl ffc11644 if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j ffc1180c: 80 7a 00 60 lwz r3,96(r26) if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( ffc11810: 7c 63 ca 14 add r3,r3,r25 ffc11814: 7f a4 eb 78 mr r4,r29 ffc11818: 4b ff fe 2d bl ffc11644 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i p = (block_p *) info->triply_indirect[i]; ffc11830: 80 7a 00 60 lwz r3,96(r26) * a significant difference in the performance of this routine. * * Regardless until the IMFS implementation is proven, it * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( ffc11834: 57 79 10 3a rlwinm r25,r27,2,0,29 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; ffc11838: 7f c3 c8 2e lwzx r30,r3,r25 if ( !p ) /* ensure we have a valid pointer */ ffc1183c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc11840: 40 9e ff 88 bne+ cr7,ffc117c8 <== ALWAYS TAKEN } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( ffc11844: 38 7a 00 60 addi r3,r26,96 ffc11848: 7f a4 eb 78 mr r4,r29 ffc1184c: 4b ff fd f9 bl ffc11644 (block_p **)&info->triply_indirect, to_free ); } return the_jnode; } ffc11850: 80 01 00 2c lwz r0,44(r1) ffc11854: 7f 43 d3 78 mr r3,r26 ffc11858: 83 21 00 0c lwz r25,12(r1) ffc1185c: 7c 08 03 a6 mtlr r0 ffc11860: 83 41 00 10 lwz r26,16(r1) ffc11864: 83 61 00 14 lwz r27,20(r1) ffc11868: 83 81 00 18 lwz r28,24(r1) ffc1186c: 83 a1 00 1c lwz r29,28(r1) ffc11870: 83 c1 00 20 lwz r30,32(r1) ffc11874: 83 e1 00 24 lwz r31,36(r1) ffc11878: 38 21 00 28 addi r1,r1,40 ffc1187c: 4e 80 00 20 blr =============================================================================== ffc11880 : */ MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { ffc11880: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED ffc11884: 7c 08 02 a6 mflr r0 <== NOT EXECUTED block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc11888: 38 a0 00 00 li r5,0 <== NOT EXECUTED */ MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { ffc1188c: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc11890: 4b ff f7 81 bl ffc11010 <== NOT EXECUTED ffc11894: 7c 69 1b 78 mr r9,r3 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; *block_ptr = 0; ffc11898: 39 40 00 00 li r10,0 <== NOT EXECUTED block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); IMFS_assert( block_ptr ); ptr = *block_ptr; ffc1189c: 80 63 00 00 lwz r3,0(r3) <== NOT EXECUTED *block_ptr = 0; ffc118a0: 91 49 00 00 stw r10,0(r9) <== NOT EXECUTED memfile_free_block( ptr ); ffc118a4: 4b ff fd 71 bl ffc11614 <== NOT EXECUTED return 1; } ffc118a8: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc118ac: 38 60 00 01 li r3,1 <== NOT EXECUTED ffc118b0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc118b4: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc118b8: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc11b4c : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ffc11b4c: 94 21 ff c0 stwu r1,-64(r1) ffc11b50: 7c 08 02 a6 mflr r0 * 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 ) { ffc11b54: 39 40 00 00 li r10,0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ffc11b58: 93 41 00 28 stw r26,40(r1) ffc11b5c: 7c 7a 1b 78 mr r26,r3 ffc11b60: 93 61 00 2c stw r27,44(r1) ffc11b64: 7c bb 2b 78 mr r27,r5 ffc11b68: 93 81 00 30 stw r28,48(r1) ffc11b6c: 7c fc 3b 78 mr r28,r7 ffc11b70: 93 a1 00 34 stw r29,52(r1) ffc11b74: 7d 1d 43 78 mr r29,r8 ffc11b78: 93 c1 00 38 stw r30,56(r1) ffc11b7c: 7c de 33 78 mr r30,r6 /* * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; ffc11b80: 7c c8 32 14 add r6,r8,r6 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ffc11b84: 90 01 00 44 stw r0,68(r1) ffc11b88: 92 e1 00 1c stw r23,28(r1) ffc11b8c: 93 01 00 20 stw r24,32(r1) ffc11b90: 93 21 00 24 stw r25,36(r1) ffc11b94: 93 e1 00 3c stw r31,60(r1) * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { ffc11b98: 81 23 00 50 lwz r9,80(r3) ffc11b9c: 7f 8a 48 00 cmpw cr7,r10,r9 ffc11ba0: 81 43 00 54 lwz r10,84(r3) ffc11ba4: 41 9d 01 b8 bgt- cr7,ffc11d5c <== NEVER TAKEN ffc11ba8: 41 9e 01 ac beq- cr7,ffc11d54 <== ALWAYS TAKEN */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11bac: 3f 20 00 00 lis r25,0 ffc11bb0: 83 f9 28 44 lwz r31,10308(r25) ffc11bb4: 7f 63 db 78 mr r3,r27 ffc11bb8: 7f c4 f3 78 mr r4,r30 ffc11bbc: 7f f8 fe 70 srawi r24,r31,31 ffc11bc0: 7f 05 c3 78 mr r5,r24 ffc11bc4: 7f e6 fb 78 mr r6,r31 ffc11bc8: 48 00 b0 ed bl ffc1ccb4 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11bcc: 7f 63 db 78 mr r3,r27 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11bd0: 7c 97 23 78 mr r23,r4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11bd4: 7f 05 c3 78 mr r5,r24 ffc11bd8: 7f c4 f3 78 mr r4,r30 ffc11bdc: 7f e6 fb 78 mr r6,r31 ffc11be0: 48 00 ac b1 bl ffc1c890 <__divdi3> if ( start_offset ) { ffc11be4: 2f 97 00 00 cmpwi cr7,r23,0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc11be8: 7c 9e 23 78 mr r30,r4 status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); if ( status ) return status; } copied = 0; ffc11bec: 3b 60 00 00 li r27,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 ) { ffc11bf0: 41 9e 00 54 beq- cr7,ffc11c44 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; ffc11bf4: 7f 77 f8 50 subf r27,r23,r31 ffc11bf8: 7f 9b e8 40 cmplw cr7,r27,r29 ffc11bfc: 40 9d 00 08 ble- cr7,ffc11c04 ffc11c00: 7f bb eb 78 mr r27,r29 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc11c04: 7f 43 d3 78 mr r3,r26 ffc11c08: 7f c4 f3 78 mr r4,r30 ffc11c0c: 38 a0 00 00 li r5,0 ffc11c10: 4b ff f4 01 bl ffc11010 if ( !block_ptr ) ffc11c14: 7c 69 1b 79 mr. r9,r3 return copied; ffc11c18: 38 60 00 00 li r3,0 if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) ffc11c1c: 41 82 00 7c beq- ffc11c98 <== NEVER TAKEN block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); ffc11c20: 80 69 00 00 lwz r3,0(r9) ffc11c24: 7f 84 e3 78 mr r4,r28 ffc11c28: 7f 65 db 78 mr r5,r27 ffc11c2c: 7c 63 ba 14 add r3,r3,r23 ffc11c30: 48 00 21 4d bl ffc13d7c ffc11c34: 83 f9 28 44 lwz r31,10308(r25) src += to_copy; ffc11c38: 7f 9c da 14 add r28,r28,r27 block++; ffc11c3c: 3b de 00 01 addi r30,r30,1 my_length -= to_copy; ffc11c40: 7f bb e8 50 subf r29,r27,r29 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc11c44: 7f 9d f8 40 cmplw cr7,r29,r31 ffc11c48: 40 bc 00 20 bge+ cr7,ffc11c68 ffc11c4c: 48 00 00 80 b ffc11ccc if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); ffc11c50: 80 63 00 00 lwz r3,0(r3) * IMFS_memfile_write * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( ffc11c54: 7f 7b fa 14 add r27,r27,r31 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); ffc11c58: 48 00 21 25 bl ffc13d7c /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc11c5c: 81 39 28 44 lwz r9,10308(r25) ffc11c60: 7f 89 e8 40 cmplw cr7,r9,r29 ffc11c64: 41 9d 00 68 bgt- cr7,ffc11ccc block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc11c68: 7f c4 f3 78 mr r4,r30 ffc11c6c: 38 a0 00 00 li r5,0 ffc11c70: 7f 43 d3 78 mr r3,r26 ffc11c74: 4b ff f3 9d bl ffc11010 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; ffc11c78: 7f bf e8 50 subf r29,r31,r29 */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) ffc11c7c: 2c 03 00 00 cmpwi r3,0 return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); ffc11c80: 7f 84 e3 78 mr r4,r28 ffc11c84: 7f e5 fb 78 mr r5,r31 src += to_copy; ffc11c88: 7f 9c fa 14 add r28,r28,r31 block++; ffc11c8c: 3b de 00 01 addi r30,r30,1 */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) ffc11c90: 40 82 ff c0 bne+ ffc11c50 <== ALWAYS TAKEN ffc11c94: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } ffc11c98: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED ffc11c9c: 82 e1 00 1c lwz r23,28(r1) <== NOT EXECUTED ffc11ca0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc11ca4: 83 01 00 20 lwz r24,32(r1) <== NOT EXECUTED ffc11ca8: 83 21 00 24 lwz r25,36(r1) <== NOT EXECUTED ffc11cac: 83 41 00 28 lwz r26,40(r1) <== NOT EXECUTED ffc11cb0: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc11cb4: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc11cb8: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc11cbc: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc11cc0: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc11cc4: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc11cc8: 4e 80 00 20 blr <== NOT EXECUTED * 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 ) { ffc11ccc: 2f 9d 00 00 cmpwi cr7,r29,0 ffc11cd0: 41 9e 00 34 beq- cr7,ffc11d04 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc11cd4: 7f 43 d3 78 mr r3,r26 ffc11cd8: 7f c4 f3 78 mr r4,r30 ffc11cdc: 38 a0 00 00 li r5,0 ffc11ce0: 4b ff f3 31 bl ffc11010 if ( !block_ptr ) ffc11ce4: 7c 69 1b 79 mr. r9,r3 ffc11ce8: 7f 63 db 78 mr r3,r27 ffc11cec: 41 a2 ff ac beq- ffc11c98 <== 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 ); ffc11cf0: 80 69 00 00 lwz r3,0(r9) ffc11cf4: 7f 84 e3 78 mr r4,r28 ffc11cf8: 7f a5 eb 78 mr r5,r29 ffc11cfc: 48 00 20 81 bl ffc13d7c my_length = 0; copied += to_copy; ffc11d00: 7f 7b ea 14 add r27,r27,r29 } IMFS_mtime_ctime_update( the_jnode ); ffc11d04: 38 61 00 08 addi r3,r1,8 ffc11d08: 38 80 00 00 li r4,0 ffc11d0c: 4b ff 2f 49 bl ffc04c54 return copied; } ffc11d10: 80 01 00 44 lwz r0,68(r1) memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); ffc11d14: 81 21 00 08 lwz r9,8(r1) return copied; ffc11d18: 7f 63 db 78 mr r3,r27 } ffc11d1c: 7c 08 03 a6 mtlr r0 ffc11d20: 82 e1 00 1c lwz r23,28(r1) memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); ffc11d24: 91 3a 00 44 stw r9,68(r26) ffc11d28: 91 3a 00 48 stw r9,72(r26) return copied; } ffc11d2c: 83 01 00 20 lwz r24,32(r1) ffc11d30: 83 21 00 24 lwz r25,36(r1) ffc11d34: 83 41 00 28 lwz r26,40(r1) ffc11d38: 83 61 00 2c lwz r27,44(r1) ffc11d3c: 83 81 00 30 lwz r28,48(r1) ffc11d40: 83 a1 00 34 lwz r29,52(r1) ffc11d44: 83 c1 00 38 lwz r30,56(r1) ffc11d48: 83 e1 00 3c lwz r31,60(r1) ffc11d4c: 38 21 00 40 addi r1,r1,64 ffc11d50: 4e 80 00 20 blr * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { ffc11d54: 7f 86 50 40 cmplw cr7,r6,r10 ffc11d58: 40 9d fe 54 ble+ cr7,ffc11bac bool zero_fill = start > the_jnode->info.file.size; ffc11d5c: 7f 9b 48 00 cmpw cr7,r27,r9 ffc11d60: 38 80 00 01 li r4,1 ffc11d64: 40 9d 00 50 ble- cr7,ffc11db4 <== ALWAYS TAKEN status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); ffc11d68: 7f 43 d3 78 mr r3,r26 ffc11d6c: 54 84 07 fe clrlwi r4,r4,31 ffc11d70: 38 a0 00 00 li r5,0 ffc11d74: 4b ff fb 49 bl ffc118bc if ( status ) ffc11d78: 2c 03 00 00 cmpwi r3,0 ffc11d7c: 41 82 fe 30 beq+ ffc11bac } IMFS_mtime_ctime_update( the_jnode ); return copied; } ffc11d80: 80 01 00 44 lwz r0,68(r1) ffc11d84: 82 e1 00 1c lwz r23,28(r1) ffc11d88: 7c 08 03 a6 mtlr r0 ffc11d8c: 83 01 00 20 lwz r24,32(r1) ffc11d90: 83 21 00 24 lwz r25,36(r1) ffc11d94: 83 41 00 28 lwz r26,40(r1) ffc11d98: 83 61 00 2c lwz r27,44(r1) ffc11d9c: 83 81 00 30 lwz r28,48(r1) ffc11da0: 83 a1 00 34 lwz r29,52(r1) ffc11da4: 83 c1 00 38 lwz r30,56(r1) ffc11da8: 83 e1 00 3c lwz r31,60(r1) ffc11dac: 38 21 00 40 addi r1,r1,64 ffc11db0: 4e 80 00 20 blr * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { bool zero_fill = start > the_jnode->info.file.size; ffc11db4: 41 9e 00 24 beq- cr7,ffc11dd8 <== ALWAYS TAKEN ffc11db8: 38 80 00 00 li r4,0 status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); ffc11dbc: 7f 43 d3 78 mr r3,r26 ffc11dc0: 54 84 07 fe clrlwi r4,r4,31 ffc11dc4: 38 a0 00 00 li r5,0 ffc11dc8: 4b ff fa f5 bl ffc118bc if ( status ) ffc11dcc: 2c 03 00 00 cmpwi r3,0 ffc11dd0: 41 82 fd dc beq+ ffc11bac ffc11dd4: 4b ff ff ac b ffc11d80 * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { bool zero_fill = start > the_jnode->info.file.size; ffc11dd8: 7f 9e 50 40 cmplw cr7,r30,r10 ffc11ddc: 41 bd ff 8c bgt- cr7,ffc11d68 ffc11de0: 4b ff ff d8 b ffc11db8 =============================================================================== ffc04168 : dev_t dev, IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { ffc04168: 54 c9 04 26 rlwinm r9,r6,0,16,19 const char *name, size_t namelen, mode_t mode, dev_t dev ) { ffc0416c: 94 21 ff d0 stwu r1,-48(r1) dev_t dev, IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { ffc04170: 2f 89 40 00 cmpwi cr7,r9,16384 const char *name, size_t namelen, mode_t mode, dev_t dev ) { ffc04174: 7c 08 02 a6 mflr r0 ffc04178: 93 e1 00 2c stw r31,44(r1) ffc0417c: 7c ca 33 78 mr r10,r6 ffc04180: 7c 7f 1b 78 mr r31,r3 ffc04184: 90 01 00 34 stw r0,52(r1) ffc04188: 7c 8b 23 78 mr r11,r4 ffc0418c: 7c a6 2b 78 mr r6,r5 dev_t dev, IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { ffc04190: 41 9e 00 b0 beq- cr7,ffc04240 *type = IMFS_DIRECTORY; } else if ( S_ISREG( mode ) ) { ffc04194: 6d 25 ff ff xoris r5,r9,65535 ffc04198: 2f 85 80 00 cmpwi cr7,r5,-32768 ffc0419c: 41 9e 00 ac beq- cr7,ffc04248 *type = IMFS_MEMORY_FILE; } else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) { ffc041a0: 2f 89 60 00 cmpwi cr7,r9,24576 ffc041a4: 41 9e 00 8c beq- cr7,ffc04230 ffc041a8: 2f 89 20 00 cmpwi cr7,r9,8192 ffc041ac: 41 9e 00 84 beq- cr7,ffc04230 rtems_filesystem_split_dev_t( dev, info->device.major, info->device.minor ); } else if (S_ISFIFO( mode )) { ffc041b0: 2f 89 10 00 cmpwi cr7,r9,4096 ffc041b4: 40 be 00 08 bne+ cr7,ffc041bc <== NEVER TAKEN *type = IMFS_FIFO; ffc041b8: 38 00 00 06 li r0,6 size_t namelen, mode_t mode, const IMFS_types_union *info ) { const IMFS_fs_info_t *fs_info = ffc041bc: 81 3f 00 14 lwz r9,20(r31) (const IMFS_fs_info_t *) parentloc->mt_entry->fs_info; return IMFS_create_node_with_control( ffc041c0: 54 08 10 3a rlwinm r8,r0,2,0,29 ffc041c4: 7f e3 fb 78 mr r3,r31 ffc041c8: 81 29 00 08 lwz r9,8(r9) ffc041cc: 7d 65 5b 78 mr r5,r11 ffc041d0: 7d 47 53 78 mr r7,r10 ffc041d4: 7d 29 42 14 add r9,r9,r8 ffc041d8: 80 89 00 08 lwz r4,8(r9) ffc041dc: 39 01 00 08 addi r8,r1,8 ffc041e0: 48 00 a1 89 bl ffc0e368 IMFS_jnode_t *new_node; get_type_and_info_by_mode_and_dev( mode, dev, &type, &info ); new_node = IMFS_create_node( parentloc, type, name, namelen, mode, &info ); if ( new_node != NULL ) { ffc041e4: 2f 83 00 00 cmpwi cr7,r3,0 ffc041e8: 41 9e 00 68 beq- cr7,ffc04250 IMFS_jnode_t *parent = parentloc->node_access; IMFS_update_ctime( parent ); ffc041ec: 38 80 00 00 li r4,0 get_type_and_info_by_mode_and_dev( mode, dev, &type, &info ); new_node = IMFS_create_node( parentloc, type, name, namelen, mode, &info ); if ( new_node != NULL ) { IMFS_jnode_t *parent = parentloc->node_access; ffc041f0: 83 ff 00 08 lwz r31,8(r31) IMFS_update_ctime( parent ); ffc041f4: 38 61 00 20 addi r3,r1,32 ffc041f8: 48 00 0a 5d bl ffc04c54 ffc041fc: 81 21 00 20 lwz r9,32(r1) IMFS_update_mtime( parent ); ffc04200: 38 61 00 20 addi r3,r1,32 new_node = IMFS_create_node( parentloc, type, name, namelen, mode, &info ); if ( new_node != NULL ) { IMFS_jnode_t *parent = parentloc->node_access; IMFS_update_ctime( parent ); ffc04204: 91 3f 00 48 stw r9,72(r31) IMFS_update_mtime( parent ); ffc04208: 38 80 00 00 li r4,0 ffc0420c: 48 00 0a 49 bl ffc04c54 ffc04210: 81 21 00 20 lwz r9,32(r1) size_t namelen, mode_t mode, dev_t dev ) { int rv = 0; ffc04214: 38 60 00 00 li r3,0 new_node = IMFS_create_node( parentloc, type, name, namelen, mode, &info ); if ( new_node != NULL ) { IMFS_jnode_t *parent = parentloc->node_access; IMFS_update_ctime( parent ); IMFS_update_mtime( parent ); ffc04218: 91 3f 00 44 stw r9,68(r31) } else { rv = -1; } return rv; } ffc0421c: 80 01 00 34 lwz r0,52(r1) ffc04220: 83 e1 00 2c lwz r31,44(r1) ffc04224: 7c 08 03 a6 mtlr r0 ffc04228: 38 21 00 30 addi r1,r1,48 ffc0422c: 4e 80 00 20 blr *type = IMFS_DIRECTORY; } else if ( S_ISREG( mode ) ) { *type = IMFS_MEMORY_FILE; } else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) { *type = IMFS_DEVICE; rtems_filesystem_split_dev_t( ffc04230: 90 e1 00 08 stw r7,8(r1) if ( S_ISDIR( mode ) ) { *type = IMFS_DIRECTORY; } else if ( S_ISREG( mode ) ) { *type = IMFS_MEMORY_FILE; } else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) { *type = IMFS_DEVICE; ffc04234: 38 00 00 01 li r0,1 rtems_filesystem_split_dev_t( ffc04238: 91 01 00 0c stw r8,12(r1) ffc0423c: 4b ff ff 80 b ffc041bc IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { *type = IMFS_DIRECTORY; ffc04240: 38 00 00 00 li r0,0 ffc04244: 4b ff ff 78 b ffc041bc } else if ( S_ISREG( mode ) ) { *type = IMFS_MEMORY_FILE; ffc04248: 38 00 00 04 li r0,4 ffc0424c: 4b ff ff 70 b ffc041bc IMFS_jnode_t *parent = parentloc->node_access; IMFS_update_ctime( parent ); IMFS_update_mtime( parent ); } else { rv = -1; ffc04250: 38 60 ff ff li r3,-1 ffc04254: 4b ff ff c8 b ffc0421c =============================================================================== ffc04258 : #endif #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { ffc04258: 94 21 ff f8 stwu r1,-8(r1) ffc0425c: 7c 08 02 a6 mflr r0 ffc04260: 90 01 00 0c stw r0,12(r1) int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; ffc04264: 81 23 00 20 lwz r9,32(r3) ffc04268: 81 29 00 08 lwz r9,8(r9) return node->control->imfs_type; } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; ffc0426c: 81 49 00 4c lwz r10,76(r9) if ( IMFS_is_directory( node ) ) { ffc04270: 81 4a 00 00 lwz r10,0(r10) ffc04274: 2f 8a 00 00 cmpwi cr7,r10,0 ffc04278: 40 9e 00 3c bne- cr7,ffc042b4 if ( node->info.directory.mt_fs == NULL ) { ffc0427c: 81 49 00 5c lwz r10,92(r9) ffc04280: 2f 8a 00 00 cmpwi cr7,r10,0 ffc04284: 40 9e 00 1c bne- cr7,ffc042a0 <== NEVER TAKEN node->info.directory.mt_fs = mt_entry; ffc04288: 90 69 00 5c stw r3,92(r9) #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; ffc0428c: 38 60 00 00 li r3,0 errno = ENOTDIR; rv = -1; } return rv; } ffc04290: 80 01 00 0c lwz r0,12(r1) ffc04294: 38 21 00 08 addi r1,r1,8 ffc04298: 7c 08 03 a6 mtlr r0 ffc0429c: 4e 80 00 20 blr if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == NULL ) { node->info.directory.mt_fs = mt_entry; } else { errno = EBUSY; ffc042a0: 48 00 ed d9 bl ffc13078 <__errno> <== NOT EXECUTED ffc042a4: 39 20 00 10 li r9,16 <== NOT EXECUTED ffc042a8: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED rv = -1; ffc042ac: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc042b0: 4b ff ff e0 b ffc04290 <== NOT EXECUTED } } else { errno = ENOTDIR; ffc042b4: 48 00 ed c5 bl ffc13078 <__errno> ffc042b8: 39 20 00 14 li r9,20 ffc042bc: 91 23 00 00 stw r9,0(r3) rv = -1; ffc042c0: 38 60 ff ff li r3,-1 ffc042c4: 4b ff ff cc b ffc04290 =============================================================================== ffc0e85c : } static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node ) { ffc0e85c: 94 21 ff f8 stwu r1,-8(r1) ffc0e860: 7c 08 02 a6 mflr r0 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0e864: 39 43 00 54 addi r10,r3,84 ffc0e868: 90 01 00 0c stw r0,12(r1) if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { ffc0e86c: 81 23 00 50 lwz r9,80(r3) ffc0e870: 7f 89 50 00 cmpw cr7,r9,r10 ffc0e874: 40 9e 00 20 bne- cr7,ffc0e894 errno = ENOTEMPTY; node = NULL; } else if ( IMFS_is_mount_point( node ) ) { ffc0e878: 81 23 00 5c lwz r9,92(r3) ffc0e87c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0e880: 40 9e 00 34 bne- cr7,ffc0e8b4 <== NEVER TAKEN errno = EBUSY; node = NULL; } return node; } ffc0e884: 80 01 00 0c lwz r0,12(r1) ffc0e888: 38 21 00 08 addi r1,r1,8 ffc0e88c: 7c 08 03 a6 mtlr r0 ffc0e890: 4e 80 00 20 blr static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node ) { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { errno = ENOTEMPTY; ffc0e894: 48 00 47 e5 bl ffc13078 <__errno> errno = EBUSY; node = NULL; } return node; } ffc0e898: 80 01 00 0c lwz r0,12(r1) static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node ) { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { errno = ENOTEMPTY; ffc0e89c: 39 20 00 5a li r9,90 errno = EBUSY; node = NULL; } return node; } ffc0e8a0: 7c 08 03 a6 mtlr r0 static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node ) { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { errno = ENOTEMPTY; ffc0e8a4: 91 23 00 00 stw r9,0(r3) node = NULL; ffc0e8a8: 38 60 00 00 li r3,0 errno = EBUSY; node = NULL; } return node; } ffc0e8ac: 38 21 00 08 addi r1,r1,8 ffc0e8b0: 4e 80 00 20 blr { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { errno = ENOTEMPTY; node = NULL; } else if ( IMFS_is_mount_point( node ) ) { errno = EBUSY; ffc0e8b4: 48 00 47 c5 bl ffc13078 <__errno> <== NOT EXECUTED node = NULL; } return node; } ffc0e8b8: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { errno = ENOTEMPTY; node = NULL; } else if ( IMFS_is_mount_point( node ) ) { errno = EBUSY; ffc0e8bc: 39 20 00 10 li r9,16 <== NOT EXECUTED node = NULL; } return node; } ffc0e8c0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { errno = ENOTEMPTY; node = NULL; } else if ( IMFS_is_mount_point( node ) ) { errno = EBUSY; ffc0e8c4: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED ffc0e8c8: 38 60 00 00 li r3,0 <== NOT EXECUTED node = NULL; } return node; } ffc0e8cc: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc0e8d0: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc042c8 : rtems_filesystem_node_types_t IMFS_node_type( const rtems_filesystem_location_info_t *loc ) { const IMFS_jnode_t *node = loc->node_access; ffc042c8: 81 43 00 08 lwz r10,8(r3) rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; ffc042cc: 81 2a 00 4c lwz r9,76(r10) ffc042d0: 81 29 00 00 lwz r9,0(r9) IMFS_jnode_types_t imfs_type = IMFS_type( node ); rtems_filesystem_node_types_t type; switch ( imfs_type ) { ffc042d4: 2f 89 00 02 cmpwi cr7,r9,2 ffc042d8: 41 9e 00 18 beq- cr7,ffc042f0 ffc042dc: 2f 89 00 05 cmpwi cr7,r9,5 case IMFS_HARD_LINK: type = IMFS_type( node->info.hard_link.link_node ); break; case IMFS_LINEAR_FILE: type = RTEMS_FILESYSTEM_MEMORY_FILE; ffc042e0: 38 60 00 04 li r3,4 { const IMFS_jnode_t *node = loc->node_access; IMFS_jnode_types_t imfs_type = IMFS_type( node ); rtems_filesystem_node_types_t type; switch ( imfs_type ) { ffc042e4: 41 9e 00 1c beq- cr7,ffc04300 <== NEVER TAKEN ffc042e8: 7d 23 4b 78 mr r3,r9 type = imfs_type; break; } return type; } ffc042ec: 4e 80 00 20 blr ffc042f0: 81 2a 00 50 lwz r9,80(r10) ffc042f4: 81 29 00 4c lwz r9,76(r9) ffc042f8: 80 69 00 00 lwz r3,0(r9) rtems_filesystem_node_types_t type; switch ( imfs_type ) { case IMFS_HARD_LINK: type = IMFS_type( node->info.hard_link.link_node ); break; ffc042fc: 4e 80 00 20 blr ffc04300: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc04304 : node = loc->node_access; IMFS_assert( node->control->imfs_type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) ffc04304: 2c 05 00 00 cmpwi r5,0 ) { IMFS_jnode_t *node; ssize_t i; node = loc->node_access; ffc04308: 81 03 00 08 lwz r8,8(r3) IMFS_assert( node->control->imfs_type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) ffc0430c: 41 82 00 4c beq- ffc04358 <== NEVER TAKEN ffc04310: 81 28 00 50 lwz r9,80(r8) ffc04314: 89 29 00 00 lbz r9,0(r9) ffc04318: 2f 89 00 00 cmpwi cr7,r9,0 ffc0431c: 41 9e 00 3c beq- cr7,ffc04358 <== NEVER TAKEN ffc04320: 39 40 00 00 li r10,0 ffc04324: 7c a9 03 a6 mtctr r5 ffc04328: 38 60 00 00 li r3,0 ffc0432c: 48 00 00 14 b ffc04340 ffc04330: 81 28 00 50 lwz r9,80(r8) ffc04334: 7d 29 18 ae lbzx r9,r9,r3 ffc04338: 2f 89 00 00 cmpwi cr7,r9,0 ffc0433c: 41 9e 00 18 beq- cr7,ffc04354 ffc04340: 38 63 00 01 addi r3,r3,1 buf[i] = node->info.sym_link.name[i]; ffc04344: 7d 24 51 ae stbx r9,r4,r10 node = loc->node_access; IMFS_assert( node->control->imfs_type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) ffc04348: 7c 6a 1b 78 mr r10,r3 ffc0434c: 42 00 ff e4 bdnz+ ffc04330 buf[i] = node->info.sym_link.name[i]; return i; } ffc04350: 4e 80 00 20 blr ffc04354: 4e 80 00 20 blr node = loc->node_access; IMFS_assert( node->control->imfs_type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) ffc04358: 38 60 00 00 li r3,0 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; return i; } ffc0435c: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc04360 : const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { ffc04360: 94 21 ff d8 stwu r1,-40(r1) ffc04364: 7c 08 02 a6 mflr r0 ffc04368: 90 01 00 2c stw r0,44(r1) ffc0436c: 93 e1 00 24 stw r31,36(r1) int rv = 0; IMFS_jnode_t *node = oldloc->node_access; ffc04370: 83 e4 00 08 lwz r31,8(r4) const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { ffc04374: 93 c1 00 20 stw r30,32(r1) /* * FIXME: Due to insufficient checks we can create inaccessible nodes with * this operation. */ if ( node->Parent != NULL ) { ffc04378: 81 3f 00 08 lwz r9,8(r31) const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { ffc0437c: 93 a1 00 1c stw r29,28(r1) /* * FIXME: Due to insufficient checks we can create inaccessible nodes with * this operation. */ if ( node->Parent != NULL ) { ffc04380: 2f 89 00 00 cmpwi cr7,r9,0 size_t namelen ) { int rv = 0; IMFS_jnode_t *node = oldloc->node_access; IMFS_jnode_t *new_parent = newparentloc->node_access; ffc04384: 83 c5 00 08 lwz r30,8(r5) /* * FIXME: Due to insufficient checks we can create inaccessible nodes with * this operation. */ if ( node->Parent != NULL ) { ffc04388: 41 9e 00 a0 beq- cr7,ffc04428 <== NEVER TAKEN if ( namelen < IMFS_NAME_MAX ) { ffc0438c: 2b 87 00 1f cmplwi cr7,r7,31 ffc04390: 7c fd 3b 78 mr r29,r7 ffc04394: 41 9d 00 80 bgt- cr7,ffc04414 <== NEVER TAKEN memcpy( node->name, name, namelen ); ffc04398: 7c c4 33 78 mr r4,r6 ffc0439c: 7c e5 3b 78 mr r5,r7 ffc043a0: 38 7f 00 0c addi r3,r31,12 ffc043a4: 48 00 f9 d9 bl ffc13d7c node->name [namelen] = '\0'; ffc043a8: 7f bf ea 14 add r29,r31,r29 ffc043ac: 39 20 00 00 li r9,0 ffc043b0: 99 3d 00 0c stb r9,12(r29) RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); ffc043b4: 38 fe 00 54 addi r7,r30,84 IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); ffc043b8: 38 61 00 08 addi r3,r1,8 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc043bc: 81 3f 00 00 lwz r9,0(r31) ffc043c0: 38 80 00 00 li r4,0 previous = the_node->previous; ffc043c4: 81 1f 00 04 lwz r8,4(r31) next->previous = previous; ffc043c8: 91 09 00 04 stw r8,4(r9) Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; ffc043cc: 81 5e 00 58 lwz r10,88(r30) Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; ffc043d0: 91 28 00 00 stw r9,0(r8) static inline void IMFS_add_to_directory( IMFS_jnode_t *dir, IMFS_jnode_t *node ) { node->Parent = dir; ffc043d4: 93 df 00 08 stw r30,8(r31) ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; ffc043d8: 90 ff 00 00 stw r7,0(r31) tail->previous = the_node; ffc043dc: 93 fe 00 58 stw r31,88(r30) old_last->next = the_node; ffc043e0: 93 ea 00 00 stw r31,0(r10) the_node->previous = old_last; ffc043e4: 91 5f 00 04 stw r10,4(r31) ffc043e8: 48 00 08 6d bl ffc04c54 ffc043ec: 81 21 00 08 lwz r9,8(r1) const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { int rv = 0; ffc043f0: 38 60 00 00 li r3,0 memcpy( node->name, name, namelen ); node->name [namelen] = '\0'; IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); ffc043f4: 91 3f 00 48 stw r9,72(r31) errno = EINVAL; rv = -1; } return rv; } ffc043f8: 80 01 00 2c lwz r0,44(r1) ffc043fc: 83 a1 00 1c lwz r29,28(r1) ffc04400: 7c 08 03 a6 mtlr r0 ffc04404: 83 c1 00 20 lwz r30,32(r1) ffc04408: 83 e1 00 24 lwz r31,36(r1) ffc0440c: 38 21 00 28 addi r1,r1,40 ffc04410: 4e 80 00 20 blr IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); } else { errno = ENAMETOOLONG; ffc04414: 48 00 ec 65 bl ffc13078 <__errno> <== NOT EXECUTED ffc04418: 39 20 00 5b li r9,91 <== NOT EXECUTED ffc0441c: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED rv = -1; ffc04420: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc04424: 4b ff ff d4 b ffc043f8 <== NOT EXECUTED } } else { errno = EINVAL; ffc04428: 48 00 ec 51 bl ffc13078 <__errno> <== NOT EXECUTED ffc0442c: 39 20 00 16 li r9,22 <== NOT EXECUTED ffc04430: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED rv = -1; ffc04434: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc04438: 4b ff ff c0 b ffc043f8 <== NOT EXECUTED =============================================================================== ffc04574 : #endif #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { ffc04574: 94 21 ff f8 stwu r1,-8(r1) ffc04578: 7c 08 02 a6 mflr r0 ffc0457c: 90 01 00 0c stw r0,12(r1) int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; ffc04580: 81 23 00 20 lwz r9,32(r3) ffc04584: 81 29 00 08 lwz r9,8(r9) return node->control->imfs_type; } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; ffc04588: 81 49 00 4c lwz r10,76(r9) if ( IMFS_is_directory( node ) ) { ffc0458c: 81 4a 00 00 lwz r10,0(r10) ffc04590: 2f 8a 00 00 cmpwi cr7,r10,0 ffc04594: 40 9e 00 3c bne- cr7,ffc045d0 <== NEVER TAKEN if ( node->info.directory.mt_fs == mt_entry ) { ffc04598: 81 09 00 5c lwz r8,92(r9) ffc0459c: 7f 88 18 00 cmpw cr7,r8,r3 ffc045a0: 40 9e 00 1c bne- cr7,ffc045bc <== NEVER TAKEN node->info.directory.mt_fs = NULL; ffc045a4: 91 49 00 5c stw r10,92(r9) #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; ffc045a8: 38 60 00 00 li r3,0 errno = ENOTDIR; rv = -1; } return rv; } ffc045ac: 80 01 00 0c lwz r0,12(r1) ffc045b0: 38 21 00 08 addi r1,r1,8 ffc045b4: 7c 08 03 a6 mtlr r0 ffc045b8: 4e 80 00 20 blr if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == mt_entry ) { node->info.directory.mt_fs = NULL; } else { errno = EINVAL; ffc045bc: 48 00 ea bd bl ffc13078 <__errno> <== NOT EXECUTED ffc045c0: 39 20 00 16 li r9,22 <== NOT EXECUTED ffc045c4: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED rv = -1; ffc045c8: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc045cc: 4b ff ff e0 b ffc045ac <== NOT EXECUTED } } else { errno = ENOTDIR; ffc045d0: 48 00 ea a9 bl ffc13078 <__errno> <== NOT EXECUTED ffc045d4: 39 20 00 14 li r9,20 <== NOT EXECUTED ffc045d8: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED rv = -1; ffc045dc: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc045e0: 4b ff ff cc b ffc045ac <== NOT EXECUTED =============================================================================== ffc04e84 : Heap_Initialization_or_extend_handler extend ) { Heap_Control *heap = RTEMS_Malloc_Heap; if ( !rtems_configuration_get_unified_work_area() ) { ffc04e84: 3d 20 ff c2 lis r9,-62 void RTEMS_Malloc_Initialize( const Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { ffc04e88: 94 21 ff d8 stwu r1,-40(r1) ffc04e8c: 7c 08 02 a6 mflr r0 Heap_Control *heap = RTEMS_Malloc_Heap; ffc04e90: 3d 40 00 00 lis r10,0 if ( !rtems_configuration_get_unified_work_area() ) { ffc04e94: 89 29 eb 29 lbz r9,-5335(r9) void RTEMS_Malloc_Initialize( const Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { ffc04e98: 93 81 00 18 stw r28,24(r1) Heap_Control *heap = RTEMS_Malloc_Heap; if ( !rtems_configuration_get_unified_work_area() ) { ffc04e9c: 2f 89 00 00 cmpwi cr7,r9,0 void RTEMS_Malloc_Initialize( const Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { ffc04ea0: 90 01 00 2c stw r0,44(r1) ffc04ea4: 93 21 00 0c stw r25,12(r1) ffc04ea8: 93 41 00 10 stw r26,16(r1) ffc04eac: 93 61 00 14 stw r27,20(r1) ffc04eb0: 93 a1 00 1c stw r29,28(r1) ffc04eb4: 93 c1 00 20 stw r30,32(r1) ffc04eb8: 93 e1 00 24 stw r31,36(r1) Heap_Control *heap = RTEMS_Malloc_Heap; ffc04ebc: 83 8a 27 90 lwz r28,10128(r10) if ( !rtems_configuration_get_unified_work_area() ) { ffc04ec0: 40 9e 00 64 bne- cr7,ffc04f24 Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t page_size = CPU_HEAP_ALIGNMENT; size_t i; for (i = 0; i < area_count; ++i) { ffc04ec4: 2f 84 00 00 cmpwi cr7,r4,0 ffc04ec8: 7c 9b 23 78 mr r27,r4 ffc04ecc: 41 9e 00 b8 beq- cr7,ffc04f84 ffc04ed0: 3f 20 ff c1 lis r25,-63 ffc04ed4: 3b 39 b0 60 addi r25,r25,-20384 ffc04ed8: 7c ba 2b 78 mr r26,r5 ffc04edc: 7c 7f 1b 78 mr r31,r3 ffc04ee0: 3b c0 00 00 li r30,0 ffc04ee4: 7f 3d cb 78 mr r29,r25 const Heap_Area *area = &areas [i]; uintptr_t space_available = (*init_or_extend)( ffc04ee8: 7f 83 e3 78 mr r3,r28 ffc04eec: 80 9f 00 00 lwz r4,0(r31) ffc04ef0: 80 bf 00 04 lwz r5,4(r31) ffc04ef4: 38 c0 00 08 li r6,8 ffc04ef8: 7f a9 03 a6 mtctr r29 ffc04efc: 4e 80 04 21 bctrl area->begin, area->size, page_size ); if ( space_available > 0 ) { ffc04f00: 2f 83 00 00 cmpwi cr7,r3,0 ffc04f04: 41 9e 00 08 beq- cr7,ffc04f0c <== NEVER TAKEN init_or_extend = extend; ffc04f08: 7f 5d d3 78 mr r29,r26 if ( !rtems_configuration_get_unified_work_area() ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t page_size = CPU_HEAP_ALIGNMENT; size_t i; for (i = 0; i < area_count; ++i) { ffc04f0c: 3b de 00 01 addi r30,r30,1 ffc04f10: 7f 9e d8 00 cmpw cr7,r30,r27 ffc04f14: 3b ff 00 08 addi r31,r31,8 ffc04f18: 40 9e ff d0 bne+ cr7,ffc04ee8 <== NEVER TAKEN if ( space_available > 0 ) { init_or_extend = extend; } } if ( init_or_extend == _Heap_Initialize ) { ffc04f1c: 7f 9d c8 00 cmpw cr7,r29,r25 ffc04f20: 41 9e 00 64 beq- cr7,ffc04f84 <== NEVER TAKEN } /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { ffc04f24: 3d 20 00 00 lis r9,0 ffc04f28: 81 29 28 08 lwz r9,10248(r9) ffc04f2c: 2f 89 00 00 cmpwi cr7,r9,0 ffc04f30: 41 9e 00 10 beq- cr7,ffc04f40 (*rtems_malloc_statistics_helpers->initialize)(); ffc04f34: 81 29 00 00 lwz r9,0(r9) ffc04f38: 7d 29 03 a6 mtctr r9 ffc04f3c: 4e 80 04 21 bctrl } MSBUMP( space_available, _Protected_heap_Get_size( heap ) ); ffc04f40: 3f e0 00 00 lis r31,0 ffc04f44: 7f 83 e3 78 mr r3,r28 ffc04f48: 83 df 2b a0 lwz r30,11168(r31) ffc04f4c: 48 00 6e c1 bl ffc0be0c <_Protected_heap_Get_size> } ffc04f50: 80 01 00 2c lwz r0,44(r1) */ if ( rtems_malloc_statistics_helpers != NULL ) { (*rtems_malloc_statistics_helpers->initialize)(); } MSBUMP( space_available, _Protected_heap_Get_size( heap ) ); ffc04f54: 7c 63 f2 14 add r3,r3,r30 } ffc04f58: 83 21 00 0c lwz r25,12(r1) ffc04f5c: 7c 08 03 a6 mtlr r0 ffc04f60: 83 41 00 10 lwz r26,16(r1) ffc04f64: 83 61 00 14 lwz r27,20(r1) ffc04f68: 83 81 00 18 lwz r28,24(r1) ffc04f6c: 83 a1 00 1c lwz r29,28(r1) ffc04f70: 83 c1 00 20 lwz r30,32(r1) */ if ( rtems_malloc_statistics_helpers != NULL ) { (*rtems_malloc_statistics_helpers->initialize)(); } MSBUMP( space_available, _Protected_heap_Get_size( heap ) ); ffc04f74: 90 7f 2b a0 stw r3,11168(r31) } ffc04f78: 83 e1 00 24 lwz r31,36(r1) ffc04f7c: 38 21 00 28 addi r1,r1,40 ffc04f80: 4e 80 00 20 blr init_or_extend = extend; } } if ( init_or_extend == _Heap_Initialize ) { _Internal_error_Occurred( ffc04f84: 38 60 00 00 li r3,0 ffc04f88: 38 80 00 01 li r4,1 ffc04f8c: 38 a0 00 17 li r5,23 ffc04f90: 48 00 63 e1 bl ffc0b370 <_Internal_error_Occurred> =============================================================================== ffc2a27c : static rtems_printk_plugin_t print_handler; static void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc2a27c: 94 21 ff c0 stwu r1,-64(r1) ffc2a280: 7c 08 02 a6 mflr r0 current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); ffc2a284: 39 43 00 c4 addi r10,r3,196 static rtems_printk_plugin_t print_handler; static void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc2a288: 90 01 00 44 stw r0,68(r1) { uintptr_t clsz = PPC_DEFAULT_CACHE_LINE_SIZE; uintptr_t mask = clsz - 1; uintptr_t addr = (uintptr_t) context; return (ppc_context *) ((addr & ~mask) + clsz); ffc2a28c: 55 4a 00 34 rlwinm r10,r10,0,0,26 ffc2a290: 93 81 00 30 stw r28,48(r1) stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); ffc2a294: 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); ffc2a298: 81 03 00 b8 lwz r8,184(r3) size = Stack_check_usable_stack_size(stack); ffc2a29c: 3b 9c ff 80 addi r28,r28,-128 static rtems_printk_plugin_t print_handler; static void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc2a2a0: 93 41 00 28 stw r26,40(r1) /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; ffc2a2a4: 39 28 01 00 addi r9,r8,256 for (ebase = base + length; base < ebase; base++) ffc2a2a8: 57 86 00 3a rlwinm r6,r28,0,0,29 static rtems_printk_plugin_t print_handler; static void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc2a2ac: 93 e1 00 3c stw r31,60(r1) * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) ffc2a2b0: 7c c9 32 14 add r6,r9,r6 ffc2a2b4: 7f 89 30 40 cmplw cr7,r9,r6 static rtems_printk_plugin_t print_handler; static void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc2a2b8: 92 e1 00 1c stw r23,28(r1) ffc2a2bc: 7c 7f 1b 78 mr r31,r3 ffc2a2c0: 93 01 00 20 stw r24,32(r1) ffc2a2c4: 93 21 00 24 stw r25,36(r1) ffc2a2c8: 93 61 00 2c stw r27,44(r1) ffc2a2cc: 93 a1 00 34 stw r29,52(r1) ffc2a2d0: 93 c1 00 38 stw r30,56(r1) current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); ffc2a2d4: 83 4a 00 20 lwz r26,32(r10) * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) ffc2a2d8: 40 9c 00 30 bge- cr7,ffc2a308 <== NEVER TAKEN if (*base != U32_PATTERN) ffc2a2dc: 80 a8 01 00 lwz r5,256(r8) ffc2a2e0: 6c aa 5a 5a xoris r10,r5,23130 ffc2a2e4: 2f 8a a5 a5 cmpwi cr7,r10,-23131 ffc2a2e8: 41 9e 00 14 beq- cr7,ffc2a2fc <== ALWAYS TAKEN ffc2a2ec: 48 00 00 f8 b ffc2a3e4 <== NOT EXECUTED ffc2a2f0: 81 49 00 00 lwz r10,0(r9) ffc2a2f4: 7f 8a 28 00 cmpw cr7,r10,r5 ffc2a2f8: 40 9e 00 ec bne- cr7,ffc2a3e4 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) ffc2a2fc: 39 29 00 04 addi r9,r9,4 ffc2a300: 7f 86 48 40 cmplw cr7,r6,r9 ffc2a304: 41 9d ff ec bgt+ cr7,ffc2a2f0 <== 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; ffc2a308: 3a e0 00 00 li r23,0 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) #endif { (*print_handler)( ffc2a30c: 3f a0 00 00 lis r29,0 ffc2a310: 83 7f 00 08 lwz r27,8(r31) ffc2a314: 3b dd 5d 48 addi r30,r29,23880 ffc2a318: 83 3d 5d 48 lwz r25,23880(r29) ffc2a31c: 83 1e 00 04 lwz r24,4(r30) ffc2a320: 38 80 00 05 li r4,5 ffc2a324: 38 a1 00 08 addi r5,r1,8 ffc2a328: 7f 63 db 78 mr r3,r27 ffc2a32c: 4b fe 8a 79 bl ffc12da4 ffc2a330: 3c 80 ff c6 lis r4,-58 ffc2a334: 7c 66 1b 78 mr r6,r3 ffc2a338: 7f 29 03 a6 mtctr r25 ffc2a33c: 38 84 76 b0 addi r4,r4,30384 ffc2a340: 7f 65 db 78 mr r5,r27 ffc2a344: 7f 03 c3 78 mr r3,r24 ffc2a348: 4c c6 31 82 crclr 4*cr1+eq ffc2a34c: 4e 80 04 21 bctrl (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, ffc2a350: 80 df 00 b4 lwz r6,180(r31) else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( ffc2a354: 81 5d 5d 48 lwz r10,23880(r29) ffc2a358: 3c 80 ff c6 lis r4,-58 print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, ffc2a35c: 80 bf 00 b8 lwz r5,184(r31) ffc2a360: 38 c6 ff ff addi r6,r6,-1 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( ffc2a364: 7d 49 03 a6 mtctr r10 ffc2a368: 80 7e 00 04 lwz r3,4(r30) ffc2a36c: 38 84 76 c0 addi r4,r4,30400 ffc2a370: 7c c5 32 14 add r6,r5,r6 ffc2a374: 7f 47 d3 78 mr r7,r26 ffc2a378: 7f 88 e3 78 mr r8,r28 ffc2a37c: 4c c6 31 82 crclr 4*cr1+eq ffc2a380: 4e 80 04 21 bctrl stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { ffc2a384: 81 5e 00 08 lwz r10,8(r30) (*print_handler)( print_context, "Unavailable\n" ); ffc2a388: 81 3d 5d 48 lwz r9,23880(r29) stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { ffc2a38c: 2f 8a 00 00 cmpwi cr7,r10,0 (*print_handler)( print_context, "Unavailable\n" ); ffc2a390: 80 7e 00 04 lwz r3,4(r30) stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { ffc2a394: 41 9e 00 60 beq- cr7,ffc2a3f4 <== NEVER TAKEN (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); ffc2a398: 3c 80 ff c6 lis r4,-58 ffc2a39c: 7d 29 03 a6 mtctr r9 ffc2a3a0: 7e e5 bb 78 mr r5,r23 ffc2a3a4: 38 84 76 f0 addi r4,r4,30448 ffc2a3a8: 4c c6 31 82 crclr 4*cr1+eq ffc2a3ac: 4e 80 04 21 bctrl } } ffc2a3b0: 80 01 00 44 lwz r0,68(r1) ffc2a3b4: 82 e1 00 1c lwz r23,28(r1) ffc2a3b8: 7c 08 03 a6 mtlr r0 ffc2a3bc: 83 01 00 20 lwz r24,32(r1) ffc2a3c0: 83 21 00 24 lwz r25,36(r1) ffc2a3c4: 83 41 00 28 lwz r26,40(r1) ffc2a3c8: 83 61 00 2c lwz r27,44(r1) ffc2a3cc: 83 81 00 30 lwz r28,48(r1) ffc2a3d0: 83 a1 00 34 lwz r29,52(r1) ffc2a3d4: 83 c1 00 38 lwz r30,56(r1) ffc2a3d8: 83 e1 00 3c lwz r31,60(r1) ffc2a3dc: 38 21 00 40 addi r1,r1,64 ffc2a3e0: 4e 80 00 20 blr { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); ffc2a3e4: 3a e8 00 80 addi r23,r8,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 ); ffc2a3e8: 7e f7 e2 14 add r23,r23,r28 ffc2a3ec: 7e e9 b8 50 subf r23,r9,r23 ffc2a3f0: 4b ff ff 1c b ffc2a30c current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); ffc2a3f4: 3c 80 ff c6 lis r4,-58 <== NOT EXECUTED ffc2a3f8: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED ffc2a3fc: 38 84 76 e0 addi r4,r4,30432 <== NOT EXECUTED ffc2a400: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc2a404: 4e 80 04 21 bctrl <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } ffc2a408: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED ffc2a40c: 82 e1 00 1c lwz r23,28(r1) <== NOT EXECUTED ffc2a410: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc2a414: 83 01 00 20 lwz r24,32(r1) <== NOT EXECUTED ffc2a418: 83 21 00 24 lwz r25,36(r1) <== NOT EXECUTED ffc2a41c: 83 41 00 28 lwz r26,40(r1) <== NOT EXECUTED ffc2a420: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc2a424: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc2a428: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc2a42c: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc2a430: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc2a434: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc2a438: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc2a504 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { ffc2a504: 94 21 ff c8 stwu r1,-56(r1) ffc2a508: 7c 08 02 a6 mflr r0 ffc2a50c: 93 e1 00 34 stw r31,52(r1) ffc2a510: 7c 7f 1b 78 mr r31,r3 Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); char name[32]; printk("BLOWN STACK!!!\n"); ffc2a514: 3c 60 ff c6 lis r3,-58 Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { ffc2a518: 90 01 00 3c stw r0,60(r1) Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); char name[32]; printk("BLOWN STACK!!!\n"); ffc2a51c: 38 63 76 f8 addi r3,r3,30456 Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { ffc2a520: 93 a1 00 2c stw r29,44(r1) ffc2a524: 93 c1 00 30 stw r30,48(r1) ffc2a528: 7c 9e 23 78 mr r30,r4 Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); ffc2a52c: 83 bf 00 b8 lwz r29,184(r31) char name[32]; printk("BLOWN STACK!!!\n"); ffc2a530: 4c c6 31 82 crclr 4*cr1+eq ffc2a534: 4b fd b1 11 bl ffc05644 printk("task control block: 0x%08" PRIxPTR "\n", running); ffc2a538: 3c 60 ff c6 lis r3,-58 ffc2a53c: 38 63 77 08 addi r3,r3,30472 ffc2a540: 7f e4 fb 78 mr r4,r31 ffc2a544: 4c c6 31 82 crclr 4*cr1+eq ffc2a548: 4b fd b0 fd bl ffc05644 printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); ffc2a54c: 80 9f 00 08 lwz r4,8(r31) ffc2a550: 3c 60 ff c6 lis r3,-58 ffc2a554: 38 63 77 24 addi r3,r3,30500 ffc2a558: 4c c6 31 82 crclr 4*cr1+eq ffc2a55c: 4b fd b0 e9 bl ffc05644 printk( ffc2a560: 80 9f 00 0c lwz r4,12(r31) ffc2a564: 3c 60 ff c6 lis r3,-58 ffc2a568: 38 63 77 38 addi r3,r3,30520 ffc2a56c: 4c c6 31 82 crclr 4*cr1+eq ffc2a570: 4b fd b0 d5 bl ffc05644 "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( ffc2a574: 80 7f 00 08 lwz r3,8(r31) ffc2a578: 38 a1 00 08 addi r5,r1,8 ffc2a57c: 38 80 00 20 li r4,32 ffc2a580: 4b fe 88 25 bl ffc12da4 ffc2a584: 7c 64 1b 78 mr r4,r3 ffc2a588: 3c 60 ff c6 lis r3,-58 ffc2a58c: 38 63 77 4c addi r3,r3,30540 ffc2a590: 4c c6 31 82 crclr 4*cr1+eq ffc2a594: 4b fd b0 b1 bl ffc05644 ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ffc2a598: 80 bf 00 b8 lwz r5,184(r31) ffc2a59c: 80 9f 00 b4 lwz r4,180(r31) ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( ffc2a5a0: 3c 60 ff c6 lis r3,-58 ffc2a5a4: 38 63 77 64 addi r3,r3,30564 ffc2a5a8: 7c c5 22 14 add r6,r5,r4 ffc2a5ac: 4c c6 31 82 crclr 4*cr1+eq ffc2a5b0: 4b fd b0 95 bl ffc05644 "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) { ffc2a5b4: 2f 9e 00 00 cmpwi cr7,r30,0 ffc2a5b8: 41 9e 00 10 beq- cr7,ffc2a5c8 <== ALWAYS TAKEN rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal( ffc2a5bc: 80 9f 00 0c lwz r4,12(r31) ffc2a5c0: 38 60 00 09 li r3,9 ffc2a5c4: 4b fd f6 7d bl ffc09c40 (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( ffc2a5c8: 3c 60 ff c6 lis r3,-58 ffc2a5cc: 38 63 77 94 addi r3,r3,30612 ffc2a5d0: 38 80 00 80 li r4,128 ffc2a5d4: 38 bd 00 08 addi r5,r29,8 ffc2a5d8: 38 dd 00 88 addi r6,r29,136 ffc2a5dc: 4c c6 31 82 crclr 4*cr1+eq ffc2a5e0: 4b fd b0 65 bl ffc05644 ffc2a5e4: 4b ff ff d8 b ffc2a5bc =============================================================================== ffc116ec : /** * 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(); ffc116ec: 3d 20 ff c3 lis r9,-61 ffc116f0: 81 49 97 b4 lwz r10,-26700(r9) ticks = microseconds / microseconds_per_tick; ffc116f4: 7d 23 53 96 divwu r9,r3,r10 if ( (microseconds % microseconds_per_tick) != 0 ) ffc116f8: 7d 49 51 d6 mullw r10,r9,r10 ffc116fc: 7f 83 50 00 cmpw cr7,r3,r10 ffc11700: 41 9e 00 08 beq- cr7,ffc11708 <== ALWAYS TAKEN ticks += 1; ffc11704: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED return ticks; } ffc11708: 7d 23 4b 78 mr r3,r9 ffc1170c: 4e 80 00 20 blr =============================================================================== ffc0b7a8 : /** * 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(); ffc0b7a8: 3d 20 ff c2 lis r9,-62 ffc0b7ac: 81 29 ff a4 lwz r9,-92(r9) ffc0b7b0: 3d 40 10 62 lis r10,4194 ffc0b7b4: 61 4a 4d d3 ori r10,r10,19923 ffc0b7b8: 7d 49 50 16 mulhwu r10,r9,r10 ffc0b7bc: 55 4a d1 be rlwinm r10,r10,26,6,31 ticks = milliseconds / milliseconds_per_tick; ffc0b7c0: 7d 23 53 96 divwu r9,r3,r10 if ( (milliseconds % milliseconds_per_tick) != 0 ) ffc0b7c4: 7d 49 51 d6 mullw r10,r9,r10 ffc0b7c8: 7f 83 50 00 cmpw cr7,r3,r10 ffc0b7cc: 41 9e 00 08 beq- cr7,ffc0b7d4 <== ALWAYS TAKEN ticks += 1; ffc0b7d0: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED return ticks; } ffc0b7d4: 7d 23 4b 78 mr r3,r9 ffc0b7d8: 4e 80 00 20 blr =============================================================================== ffc0a65c <_API_extensions_Run_postdriver>: } } #endif void _API_extensions_Run_postdriver( void ) { ffc0a65c: 94 21 ff f0 stwu r1,-16(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0a660: 3d 20 00 00 lis r9,0 ffc0a664: 7c 08 02 a6 mflr r0 ffc0a668: 93 c1 00 08 stw r30,8(r1) ffc0a66c: 3b c9 2e 34 addi r30,r9,11828 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc0a670: 3b de 00 04 addi r30,r30,4 } } #endif void _API_extensions_Run_postdriver( void ) { ffc0a674: 93 e1 00 0c stw r31,12(r1) ffc0a678: 83 e9 2e 34 lwz r31,11828(r9) ffc0a67c: 90 01 00 14 stw r0,20(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc0a680: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0a684: 41 9e 00 1c beq- cr7,ffc0a6a0 <_API_extensions_Run_postdriver+0x44><== NEVER TAKEN * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); ffc0a688: 81 3f 00 08 lwz r9,8(r31) ffc0a68c: 7d 29 03 a6 mtctr r9 ffc0a690: 4e 80 04 21 bctrl Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0a694: 83 ff 00 00 lwz r31,0(r31) void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); ffc0a698: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0a69c: 40 9e ff ec bne+ cr7,ffc0a688 <_API_extensions_Run_postdriver+0x2c> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } ffc0a6a0: 80 01 00 14 lwz r0,20(r1) ffc0a6a4: 83 c1 00 08 lwz r30,8(r1) ffc0a6a8: 7c 08 03 a6 mtlr r0 ffc0a6ac: 83 e1 00 0c lwz r31,12(r1) ffc0a6b0: 38 21 00 10 addi r1,r1,16 ffc0a6b4: 4e 80 00 20 blr =============================================================================== ffc0cf98 <_CORE_RWLock_Release>: #include CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { ffc0cf98: 94 21 ff f0 stwu r1,-16(r1) ffc0cf9c: 7c 08 02 a6 mflr r0 ISR_Level level; Thread_Control *executing = _Thread_Executing; ffc0cfa0: 3d 20 00 00 lis r9,0 #include CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { ffc0cfa4: 90 01 00 14 stw r0,20(r1) ffc0cfa8: 93 e1 00 0c stw r31,12(r1) ffc0cfac: 7c 7f 1b 78 mr r31,r3 ISR_Level level; Thread_Control *executing = _Thread_Executing; ffc0cfb0: 81 09 31 b0 lwz r8,12720(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0cfb4: 7d 40 00 a6 mfmsr r10 ffc0cfb8: 7d 30 42 a6 mfsprg r9,0 ffc0cfbc: 7d 49 48 78 andc r9,r10,r9 ffc0cfc0: 7d 20 01 24 mtmsr r9 * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ ffc0cfc4: 81 23 00 44 lwz r9,68(r3) ffc0cfc8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0cfcc: 41 9e 00 cc beq- cr7,ffc0d098 <_CORE_RWLock_Release+0x100> _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { ffc0cfd0: 2f 89 00 01 cmpwi cr7,r9,1 ffc0cfd4: 41 9e 00 94 beq- cr7,ffc0d068 <_CORE_RWLock_Release+0xd0> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; ffc0cfd8: 39 20 00 00 li r9,0 ffc0cfdc: 91 28 00 34 stw r9,52(r8) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; ffc0cfe0: 91 3f 00 44 stw r9,68(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0cfe4: 7d 40 01 24 mtmsr r10 _ISR_Enable( level ); next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); ffc0cfe8: 7f e3 fb 78 mr r3,r31 ffc0cfec: 48 00 23 0d bl ffc0f2f8 <_Thread_queue_Dequeue> if ( next ) { ffc0cff0: 2c 03 00 00 cmpwi r3,0 ffc0cff4: 41 82 00 5c beq- ffc0d050 <_CORE_RWLock_Release+0xb8> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { ffc0cff8: 81 23 00 30 lwz r9,48(r3) ffc0cffc: 2f 89 00 01 cmpwi cr7,r9,1 ffc0d000: 41 9e 00 bc beq- cr7,ffc0d0bc <_CORE_RWLock_Release+0x124> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; ffc0d004: 81 3f 00 48 lwz r9,72(r31) ffc0d008: 39 29 00 01 addi r9,r9,1 ffc0d00c: 91 3f 00 48 stw r9,72(r31) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; ffc0d010: 39 20 00 01 li r9,1 ffc0d014: 91 3f 00 44 stw r9,68(r31) ffc0d018: 48 00 00 20 b ffc0d038 <_CORE_RWLock_Release+0xa0> /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || ffc0d01c: 81 29 00 30 lwz r9,48(r9) ffc0d020: 2f 89 00 01 cmpwi cr7,r9,1 ffc0d024: 41 9e 00 2c beq- cr7,ffc0d050 <_CORE_RWLock_Release+0xb8><== NEVER TAKEN next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; ffc0d028: 81 3f 00 48 lwz r9,72(r31) ffc0d02c: 39 29 00 01 addi r9,r9,1 ffc0d030: 91 3f 00 48 stw r9,72(r31) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); ffc0d034: 48 00 27 8d bl ffc0f7c0 <_Thread_queue_Extract> /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); ffc0d038: 7f e3 fb 78 mr r3,r31 ffc0d03c: 48 00 28 e1 bl ffc0f91c <_Thread_queue_First> if ( !next || ffc0d040: 7c 69 1b 79 mr. r9,r3 next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); ffc0d044: 7f e3 fb 78 mr r3,r31 ffc0d048: 7d 24 4b 78 mr r4,r9 /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || ffc0d04c: 40 82 ff d0 bne+ ffc0d01c <_CORE_RWLock_Release+0x84> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } ffc0d050: 80 01 00 14 lwz r0,20(r1) ffc0d054: 38 60 00 00 li r3,0 ffc0d058: 83 e1 00 0c lwz r31,12(r1) ffc0d05c: 7c 08 03 a6 mtlr r0 ffc0d060: 38 21 00 10 addi r1,r1,16 ffc0d064: 4e 80 00 20 blr _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { the_rwlock->number_of_readers -= 1; ffc0d068: 81 23 00 48 lwz r9,72(r3) ffc0d06c: 39 29 ff ff addi r9,r9,-1 if ( the_rwlock->number_of_readers != 0 ) { ffc0d070: 2f 89 00 00 cmpwi cr7,r9,0 _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { the_rwlock->number_of_readers -= 1; ffc0d074: 91 23 00 48 stw r9,72(r3) if ( the_rwlock->number_of_readers != 0 ) { ffc0d078: 41 9e ff 60 beq+ cr7,ffc0cfd8 <_CORE_RWLock_Release+0x40> ffc0d07c: 7d 40 01 24 mtmsr r10 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } ffc0d080: 80 01 00 14 lwz r0,20(r1) ffc0d084: 38 60 00 00 li r3,0 ffc0d088: 83 e1 00 0c lwz r31,12(r1) ffc0d08c: 7c 08 03 a6 mtlr r0 ffc0d090: 38 21 00 10 addi r1,r1,16 ffc0d094: 4e 80 00 20 blr ffc0d098: 7d 40 01 24 mtmsr r10 ffc0d09c: 80 01 00 14 lwz r0,20(r1) */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; ffc0d0a0: 39 20 00 02 li r9,2 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } ffc0d0a4: 83 e1 00 0c lwz r31,12(r1) ffc0d0a8: 38 60 00 00 li r3,0 ffc0d0ac: 7c 08 03 a6 mtlr r0 */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; ffc0d0b0: 91 28 00 34 stw r9,52(r8) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } ffc0d0b4: 38 21 00 10 addi r1,r1,16 ffc0d0b8: 4e 80 00 20 blr next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); if ( next ) { if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; ffc0d0bc: 39 20 00 02 li r9,2 ffc0d0c0: 91 3f 00 44 stw r9,68(r31) return CORE_RWLOCK_SUCCESSFUL; ffc0d0c4: 4b ff ff 8c b ffc0d050 <_CORE_RWLock_Release+0xb8> =============================================================================== ffc0d0c8 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { ffc0d0c8: 94 21 ff e8 stwu r1,-24(r1) ffc0d0cc: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0d0d0: 38 81 00 08 addi r4,r1,8 void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { ffc0d0d4: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0d0d8: 48 00 1e 21 bl ffc0eef8 <_Thread_Get> switch ( location ) { ffc0d0dc: 81 21 00 08 lwz r9,8(r1) ffc0d0e0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d0e4: 40 9e 00 18 bne- cr7,ffc0d0fc <_CORE_RWLock_Timeout+0x34><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); ffc0d0e8: 48 00 29 49 bl ffc0fa30 <_Thread_queue_Process_timeout> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc0d0ec: 3d 20 00 00 lis r9,0 ffc0d0f0: 81 49 28 90 lwz r10,10384(r9) --level; ffc0d0f4: 39 4a ff ff addi r10,r10,-1 _Thread_Dispatch_disable_level = level; ffc0d0f8: 91 49 28 90 stw r10,10384(r9) _Thread_Unnest_dispatch(); break; } } ffc0d0fc: 80 01 00 1c lwz r0,28(r1) ffc0d100: 38 21 00 18 addi r1,r1,24 ffc0d104: 7c 08 03 a6 mtlr r0 ffc0d108: 4e 80 00 20 blr =============================================================================== ffc0aa44 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc0aa44: 94 21 ff d8 stwu r1,-40(r1) ffc0aa48: 7c 08 02 a6 mflr r0 ffc0aa4c: 93 e1 00 24 stw r31,36(r1) * This routine returns true if thread dispatch indicates * that we are in a critical section. */ RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void) { if ( _Thread_Dispatch_disable_level == 0 ) ffc0aa50: 3f e0 00 00 lis r31,0 ffc0aa54: 81 3f 28 68 lwz r9,10344(r31) ffc0aa58: 93 61 00 14 stw r27,20(r1) ffc0aa5c: 7c db 33 78 mr r27,r6 ffc0aa60: 2f 89 00 00 cmpwi cr7,r9,0 ffc0aa64: 93 81 00 18 stw r28,24(r1) ffc0aa68: 7c 9c 23 78 mr r28,r4 ffc0aa6c: 93 a1 00 1c stw r29,28(r1) ffc0aa70: 7c 7d 1b 78 mr r29,r3 ffc0aa74: 93 c1 00 20 stw r30,32(r1) ffc0aa78: 7c be 2b 78 mr r30,r5 ffc0aa7c: 90 01 00 2c stw r0,44(r1) ffc0aa80: 90 e1 00 08 stw r7,8(r1) ffc0aa84: 41 9e 00 88 beq- cr7,ffc0ab0c <_CORE_mutex_Seize+0xc8> _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc0aa88: 2f 85 00 00 cmpwi cr7,r5,0 ffc0aa8c: 41 9e 00 d4 beq- cr7,ffc0ab60 <_CORE_mutex_Seize+0x11c> ffc0aa90: 3d 20 00 00 lis r9,0 ffc0aa94: 81 29 28 90 lwz r9,10384(r9) ffc0aa98: 2b 89 00 01 cmplwi cr7,r9,1 ffc0aa9c: 41 9d 00 d8 bgt- cr7,ffc0ab74 <_CORE_mutex_Seize+0x130> ffc0aaa0: 38 81 00 08 addi r4,r1,8 ffc0aaa4: 48 00 5b 75 bl ffc10618 <_CORE_mutex_Seize_interrupt_trylock> ffc0aaa8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0aaac: 41 9e 00 3c beq- cr7,ffc0aae8 <_CORE_mutex_Seize+0xa4> <== ALWAYS TAKEN ffc0aab0: 3d 20 00 00 lis r9,0 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc0aab4: 81 5f 28 68 lwz r10,10344(r31) ffc0aab8: 81 29 31 b0 lwz r9,12720(r9) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc0aabc: 39 00 00 01 li r8,1 ffc0aac0: 91 1d 00 30 stw r8,48(r29) ++level; ffc0aac4: 39 4a 00 01 addi r10,r10,1 ffc0aac8: 93 a9 00 44 stw r29,68(r9) ffc0aacc: 93 89 00 20 stw r28,32(r9) _Thread_Dispatch_disable_level = level; ffc0aad0: 91 5f 28 68 stw r10,10344(r31) ffc0aad4: 81 21 00 08 lwz r9,8(r1) ffc0aad8: 7d 20 01 24 mtmsr r9 ffc0aadc: 7f a3 eb 78 mr r3,r29 ffc0aae0: 7f 64 db 78 mr r4,r27 ffc0aae4: 4b ff fe 81 bl ffc0a964 <_CORE_mutex_Seize_interrupt_blocking> } ffc0aae8: 80 01 00 2c lwz r0,44(r1) ffc0aaec: 83 61 00 14 lwz r27,20(r1) ffc0aaf0: 7c 08 03 a6 mtlr r0 ffc0aaf4: 83 81 00 18 lwz r28,24(r1) ffc0aaf8: 83 a1 00 1c lwz r29,28(r1) ffc0aafc: 83 c1 00 20 lwz r30,32(r1) ffc0ab00: 83 e1 00 24 lwz r31,36(r1) ffc0ab04: 38 21 00 28 addi r1,r1,40 ffc0ab08: 4e 80 00 20 blr bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc0ab0c: 38 81 00 08 addi r4,r1,8 ffc0ab10: 48 00 5b 09 bl ffc10618 <_CORE_mutex_Seize_interrupt_trylock> ffc0ab14: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ab18: 41 be ff d0 beq- cr7,ffc0aae8 <_CORE_mutex_Seize+0xa4> ffc0ab1c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0ab20: 40 be ff 90 bne- cr7,ffc0aab0 <_CORE_mutex_Seize+0x6c> ffc0ab24: 81 21 00 08 lwz r9,8(r1) ffc0ab28: 7d 20 01 24 mtmsr r9 } ffc0ab2c: 80 01 00 2c lwz r0,44(r1) bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc0ab30: 3d 20 00 00 lis r9,0 ffc0ab34: 81 29 31 b0 lwz r9,12720(r9) ffc0ab38: 39 40 00 01 li r10,1 } ffc0ab3c: 7c 08 03 a6 mtlr r0 ffc0ab40: 83 61 00 14 lwz r27,20(r1) ffc0ab44: 83 81 00 18 lwz r28,24(r1) ffc0ab48: 83 a1 00 1c lwz r29,28(r1) ffc0ab4c: 83 c1 00 20 lwz r30,32(r1) ffc0ab50: 83 e1 00 24 lwz r31,36(r1) bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc0ab54: 91 49 00 34 stw r10,52(r9) } ffc0ab58: 38 21 00 28 addi r1,r1,40 ffc0ab5c: 4e 80 00 20 blr bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc0ab60: 38 81 00 08 addi r4,r1,8 ffc0ab64: 48 00 5a b5 bl ffc10618 <_CORE_mutex_Seize_interrupt_trylock> ffc0ab68: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ab6c: 40 9e ff b8 bne+ cr7,ffc0ab24 <_CORE_mutex_Seize+0xe0> <== NEVER TAKEN ffc0ab70: 4b ff ff 78 b ffc0aae8 <_CORE_mutex_Seize+0xa4> ffc0ab74: 38 60 00 00 li r3,0 ffc0ab78: 38 80 00 00 li r4,0 ffc0ab7c: 38 a0 00 12 li r5,18 ffc0ab80: 48 00 07 f1 bl ffc0b370 <_Internal_error_Occurred> =============================================================================== ffc0ad14 <_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 ) { ffc0ad14: 94 21 ff f0 stwu r1,-16(r1) ffc0ad18: 7c 08 02 a6 mflr r0 ffc0ad1c: 93 e1 00 0c stw r31,12(r1) ffc0ad20: 7c 7f 1b 78 mr r31,r3 ffc0ad24: 90 01 00 14 stw r0,20(r1) ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { ffc0ad28: 48 00 21 b5 bl ffc0cedc <_Thread_queue_Dequeue> ffc0ad2c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ad30: 41 9e 00 1c beq- cr7,ffc0ad4c <_CORE_semaphore_Surrender+0x38> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc0ad34: 80 01 00 14 lwz r0,20(r1) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc0ad38: 38 60 00 00 li r3,0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc0ad3c: 83 e1 00 0c lwz r31,12(r1) ffc0ad40: 7c 08 03 a6 mtlr r0 ffc0ad44: 38 21 00 10 addi r1,r1,16 ffc0ad48: 4e 80 00 20 blr static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0ad4c: 7d 00 00 a6 mfmsr r8 ffc0ad50: 7d 30 42 a6 mfsprg r9,0 ffc0ad54: 7d 09 48 78 andc r9,r8,r9 ffc0ad58: 7d 20 01 24 mtmsr r9 (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) ffc0ad5c: 81 3f 00 48 lwz r9,72(r31) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; ffc0ad60: 38 60 00 04 li r3,4 (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) ffc0ad64: 81 5f 00 40 lwz r10,64(r31) ffc0ad68: 7f 89 50 40 cmplw cr7,r9,r10 ffc0ad6c: 40 9c 00 10 bge- cr7,ffc0ad7c <_CORE_semaphore_Surrender+0x68><== NEVER TAKEN the_semaphore->count += 1; ffc0ad70: 39 29 00 01 addi r9,r9,1 ffc0ad74: 91 3f 00 48 stw r9,72(r31) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc0ad78: 38 60 00 00 li r3,0 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0ad7c: 7d 00 01 24 mtmsr r8 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc0ad80: 80 01 00 14 lwz r0,20(r1) ffc0ad84: 83 e1 00 0c lwz r31,12(r1) ffc0ad88: 7c 08 03 a6 mtlr r0 ffc0ad8c: 38 21 00 10 addi r1,r1,16 ffc0ad90: 4e 80 00 20 blr =============================================================================== ffc0a83c <_Chain_Initialize>: Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc0a83c: 2f 85 00 00 cmpwi cr7,r5,0 Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; ffc0a840: 39 20 00 00 li r9,0 size_t node_size ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); ffc0a844: 39 03 00 04 addi r8,r3,4 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; ffc0a848: 91 23 00 04 stw r9,4(r3) while ( count-- ) { ffc0a84c: 38 e5 ff ff addi r7,r5,-1 ffc0a850: 41 9e 00 38 beq- cr7,ffc0a888 <_Chain_Initialize+0x4c> <== NEVER TAKEN ffc0a854: 7c a9 03 a6 mtctr r5 ffc0a858: 7c 89 23 78 mr r9,r4 ffc0a85c: 7c 6a 1b 78 mr r10,r3 current->next = next; ffc0a860: 91 2a 00 00 stw r9,0(r10) next->previous = current; ffc0a864: 91 49 00 04 stw r10,4(r9) ffc0a868: 7d 2a 4b 78 mr r10,r9 current = next; next = (Chain_Node *) ffc0a86c: 7d 29 32 14 add r9,r9,r6 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { ffc0a870: 42 00 ff f0 bdnz+ ffc0a860 <_Chain_Initialize+0x24> #include #include #include #include void _Chain_Initialize( ffc0a874: 7c c6 39 d6 mullw r6,r6,r7 ffc0a878: 7c c4 32 14 add r6,r4,r6 current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; ffc0a87c: 91 06 00 00 stw r8,0(r6) tail->previous = current; ffc0a880: 90 c3 00 08 stw r6,8(r3) ffc0a884: 4e 80 00 20 blr ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; ffc0a888: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED ffc0a88c: 4b ff ff f0 b ffc0a87c <_Chain_Initialize+0x40> <== NOT EXECUTED =============================================================================== ffc0952c <_Event_Surrender>: rtems_event_set event_in, Event_Control *event, Thread_blocking_operation_States *sync_state, States_Control wait_state ) { ffc0952c: 94 21 ff f0 stwu r1,-16(r1) ffc09530: 7c 08 02 a6 mflr r0 ffc09534: 90 01 00 14 stw r0,20(r1) ffc09538: 93 e1 00 0c stw r31,12(r1) ffc0953c: 7c 7f 1b 78 mr r31,r3 rtems_event_set pending_events; rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; option_set = the_thread->Wait.option; ffc09540: 81 63 00 30 lwz r11,48(r3) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc09544: 7d 40 00 a6 mfmsr r10 ffc09548: 7d 30 42 a6 mfsprg r9,0 ffc0954c: 7d 49 48 78 andc r9,r10,r9 ffc09550: 7d 20 01 24 mtmsr r9 RTEMS_INLINE_ROUTINE void _Event_sets_Post( rtems_event_set the_new_events, rtems_event_set *the_event_set ) { *the_event_set |= the_new_events; ffc09554: 81 25 00 00 lwz r9,0(r5) ffc09558: 7c 84 4b 78 or r4,r4,r9 ffc0955c: 90 85 00 00 stw r4,0(r5) _ISR_Disable( level ); _Event_sets_Post( event_in, &event->pending_events ); pending_events = event->pending_events; event_condition = the_thread->Wait.count; ffc09560: 81 23 00 24 lwz r9,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 ) ) { ffc09564: 7c 88 48 39 and. r8,r4,r9 ffc09568: 41 82 00 d4 beq- ffc0963c <_Event_Surrender+0x110> /* * 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() && ffc0956c: 3c 60 00 00 lis r3,0 ffc09570: 38 63 31 a0 addi r3,r3,12704 ffc09574: 80 03 00 08 lwz r0,8(r3) ffc09578: 2f 80 00 00 cmpwi cr7,r0,0 ffc0957c: 41 9e 00 10 beq- cr7,ffc0958c <_Event_Surrender+0x60> ffc09580: 80 63 00 10 lwz r3,16(r3) ffc09584: 7f 9f 18 00 cmpw cr7,r31,r3 ffc09588: 41 9e 00 74 beq- cr7,ffc095fc <_Event_Surrender+0xd0> RTEMS_INLINE_ROUTINE bool _States_Are_set ( States_Control the_states, States_Control mask ) { return ( (the_states & mask) != STATES_READY); ffc0958c: 80 df 00 10 lwz r6,16(r31) } /* * Otherwise, this is a normal send to another thread */ if ( _States_Are_set( the_thread->current_state, wait_state ) ) { ffc09590: 7c e3 30 39 and. r3,r7,r6 ffc09594: 41 82 00 a8 beq- ffc0963c <_Event_Surrender+0x110> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { ffc09598: 7f 89 40 00 cmpw cr7,r9,r8 ffc0959c: 41 9e 00 0c beq- cr7,ffc095a8 <_Event_Surrender+0x7c> ffc095a0: 71 69 00 02 andi. r9,r11,2 ffc095a4: 41 82 00 98 beq- ffc0963c <_Event_Surrender+0x110> <== NEVER TAKEN event->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc095a8: 81 3f 00 28 lwz r9,40(r31) RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); ffc095ac: 7c 84 40 78 andc r4,r4,r8 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { event->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; ffc095b0: 38 e0 00 00 li r7,0 /* * Otherwise, this is a normal send to another thread */ if ( _States_Are_set( the_thread->current_state, wait_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { event->pending_events = _Event_sets_Clear( ffc095b4: 90 85 00 00 stw r4,0(r5) pending_events, seized_events ); the_thread->Wait.count = 0; ffc095b8: 90 ff 00 24 stw r7,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc095bc: 91 09 00 00 stw r8,0(r9) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc095c0: 7d 20 00 a6 mfmsr r9 ffc095c4: 7d 40 01 24 mtmsr r10 ffc095c8: 7d 20 01 24 mtmsr r9 _ISR_Flash( level ); if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc095cc: 81 3f 00 50 lwz r9,80(r31) ffc095d0: 2f 89 00 02 cmpwi cr7,r9,2 ffc095d4: 41 9e 00 80 beq- cr7,ffc09654 <_Event_Surrender+0x128> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc095d8: 7d 40 01 24 mtmsr r10 } return; } } _ISR_Enable( level ); } ffc095dc: 80 01 00 14 lwz r0,20(r1) RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc095e0: 7f e3 fb 78 mr r3,r31 ffc095e4: 3c 80 10 07 lis r4,4103 ffc095e8: 83 e1 00 0c lwz r31,12(r1) ffc095ec: 7c 08 03 a6 mtlr r0 ffc095f0: 60 84 ff f8 ori r4,r4,65528 ffc095f4: 38 21 00 10 addi r1,r1,16 ffc095f8: 48 00 2f c8 b ffc0c5c0 <_Thread_Clear_state> * 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 ) && ((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || ffc095fc: 80 66 00 00 lwz r3,0(r6) ffc09600: 38 63 ff ff addi r3,r3,-1 /* * 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 ) && ffc09604: 2b 83 00 01 cmplwi cr7,r3,1 ffc09608: 41 9d ff 84 bgt+ cr7,ffc0958c <_Event_Surrender+0x60> ((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (*sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { ffc0960c: 7f 89 40 00 cmpw cr7,r9,r8 ffc09610: 41 9e 00 0c beq- cr7,ffc0961c <_Event_Surrender+0xf0> ffc09614: 71 63 00 02 andi. r3,r11,2 ffc09618: 41 82 00 24 beq- ffc0963c <_Event_Surrender+0x110> <== NEVER TAKEN event->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc0961c: 81 3f 00 28 lwz r9,40(r31) ffc09620: 7c 84 40 78 andc r4,r4,r8 if ( seized_events == event_condition || _Options_Is_any(option_set) ) { event->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; ffc09624: 38 e0 00 00 li r7,0 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (*sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { event->pending_events = _Event_sets_Clear( ffc09628: 90 85 00 00 stw r4,0(r5) pending_events, seized_events ); the_thread->Wait.count = 0; ffc0962c: 90 ff 00 24 stw r7,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc09630: 91 09 00 00 stw r8,0(r9) *sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; ffc09634: 39 20 00 03 li r9,3 ffc09638: 91 26 00 00 stw r9,0(r6) ffc0963c: 7d 40 01 24 mtmsr r10 } return; } } _ISR_Enable( level ); } ffc09640: 80 01 00 14 lwz r0,20(r1) ffc09644: 83 e1 00 0c lwz r31,12(r1) ffc09648: 7c 08 03 a6 mtlr r0 ffc0964c: 38 21 00 10 addi r1,r1,16 ffc09650: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; ffc09654: 39 20 00 03 li r9,3 ffc09658: 91 3f 00 50 stw r9,80(r31) ffc0965c: 7d 40 01 24 mtmsr r10 _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); ffc09660: 38 7f 00 48 addi r3,r31,72 ffc09664: 48 00 45 c9 bl ffc0dc2c <_Watchdog_Remove> ffc09668: 4b ff ff 74 b ffc095dc <_Event_Surrender+0xb0> =============================================================================== ffc0966c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *arg ) { ffc0966c: 94 21 ff e0 stwu r1,-32(r1) ffc09670: 7c 08 02 a6 mflr r0 ffc09674: 93 e1 00 1c stw r31,28(r1) ffc09678: 7c 9f 23 78 mr r31,r4 ISR_Level level; Thread_blocking_operation_States *sync_state; sync_state = arg; the_thread = _Thread_Get( id, &location ); ffc0967c: 38 81 00 08 addi r4,r1,8 void _Event_Timeout( Objects_Id id, void *arg ) { ffc09680: 90 01 00 24 stw r0,36(r1) ISR_Level level; Thread_blocking_operation_States *sync_state; sync_state = arg; the_thread = _Thread_Get( id, &location ); ffc09684: 48 00 34 59 bl ffc0cadc <_Thread_Get> switch ( location ) { ffc09688: 81 21 00 08 lwz r9,8(r1) ffc0968c: 2f 89 00 00 cmpwi cr7,r9,0 ffc09690: 40 9e 00 50 bne- cr7,ffc096e0 <_Event_Timeout+0x74> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc09694: 7d 40 00 a6 mfmsr r10 ffc09698: 7d 10 42 a6 mfsprg r8,0 ffc0969c: 7d 48 40 78 andc r8,r10,r8 ffc096a0: 7d 00 01 24 mtmsr r8 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc096a4: 3d 00 00 00 lis r8,0 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { ffc096a8: 81 08 31 b0 lwz r8,12720(r8) _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; ffc096ac: 91 23 00 24 stw r9,36(r3) if ( _Thread_Is_executing( the_thread ) ) { ffc096b0: 7f 83 40 00 cmpw cr7,r3,r8 ffc096b4: 41 9e 00 40 beq- cr7,ffc096f4 <_Event_Timeout+0x88> if ( *sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) *sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; ffc096b8: 39 20 00 06 li r9,6 ffc096bc: 91 23 00 34 stw r9,52(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc096c0: 7d 40 01 24 mtmsr r10 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc096c4: 3c 80 10 07 lis r4,4103 ffc096c8: 60 84 ff f8 ori r4,r4,65528 ffc096cc: 48 00 2e f5 bl ffc0c5c0 <_Thread_Clear_state> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc096d0: 3d 20 00 00 lis r9,0 ffc096d4: 81 49 28 68 lwz r10,10344(r9) --level; ffc096d8: 39 4a ff ff addi r10,r10,-1 _Thread_Dispatch_disable_level = level; ffc096dc: 91 49 28 68 stw r10,10344(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc096e0: 80 01 00 24 lwz r0,36(r1) ffc096e4: 83 e1 00 1c lwz r31,28(r1) ffc096e8: 7c 08 03 a6 mtlr r0 ffc096ec: 38 21 00 20 addi r1,r1,32 ffc096f0: 4e 80 00 20 blr } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( *sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) ffc096f4: 81 3f 00 00 lwz r9,0(r31) ffc096f8: 2f 89 00 01 cmpwi cr7,r9,1 ffc096fc: 40 9e ff bc bne+ cr7,ffc096b8 <_Event_Timeout+0x4c> *sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ffc09700: 39 20 00 02 li r9,2 ffc09704: 91 3f 00 00 stw r9,0(r31) ffc09708: 4b ff ff b0 b ffc096b8 <_Event_Timeout+0x4c> =============================================================================== ffc10768 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc10768: 7c 87 23 78 mr r7,r4 ffc1076c: 7d 80 00 26 mfcr r12 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE ffc10770: 38 84 00 04 addi r4,r4,4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc10774: 94 21 ff e0 stwu r1,-32(r1) Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { ffc10778: 7f 87 20 40 cmplw cr7,r7,r4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc1077c: 7c 08 02 a6 mflr r0 ffc10780: 93 a1 00 14 stw r29,20(r1) ffc10784: 7c 7d 1b 78 mr r29,r3 ffc10788: 90 01 00 24 stw r0,36(r1) ffc1078c: 93 61 00 0c stw r27,12(r1) ffc10790: 93 81 00 10 stw r28,16(r1) ffc10794: 93 c1 00 18 stw r30,24(r1) ffc10798: 93 e1 00 1c stw r31,28(r1) ffc1079c: 91 81 00 08 stw r12,8(r1) Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; ffc107a0: 81 63 00 10 lwz r11,16(r3) Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { ffc107a4: 41 9d 01 c8 bgt- cr7,ffc1096c <_Heap_Allocate_aligned_with_boundary+0x204> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { ffc107a8: 2c 06 00 00 cmpwi r6,0 ffc107ac: 40 82 01 a8 bne- ffc10954 <_Heap_Allocate_aligned_with_boundary+0x1ec> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc107b0: 81 3d 00 08 lwz r9,8(r29) do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc107b4: 7f 9d 48 00 cmpw cr7,r29,r9 ffc107b8: 41 9e 01 e4 beq- cr7,ffc1099c <_Heap_Allocate_aligned_with_boundary+0x234> * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { if ( alignment == 0 ) { ffc107bc: 2c 85 00 00 cmpwi cr1,r5,0 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc107c0: 3b c0 00 00 li r30,0 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size ffc107c4: 3b 6b 00 07 addi r27,r11,7 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; ffc107c8: 23 87 00 04 subfic r28,r7,4 ffc107cc: 48 00 00 24 b ffc107f0 <_Heap_Allocate_aligned_with_boundary+0x88> * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { if ( alignment == 0 ) { ffc107d0: 40 86 00 7c bne- cr1,ffc1084c <_Heap_Allocate_aligned_with_boundary+0xe4> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc107d4: 3b e9 00 08 addi r31,r9,8 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { ffc107d8: 2f 9f 00 00 cmpwi cr7,r31,0 ); } } /* Statistics */ ++search_count; ffc107dc: 3b de 00 01 addi r30,r30,1 if ( alloc_begin != 0 ) { ffc107e0: 40 9e 01 38 bne- cr7,ffc10918 <_Heap_Allocate_aligned_with_boundary+0x1b0> break; } block = block->next; ffc107e4: 81 29 00 08 lwz r9,8(r9) do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc107e8: 7f 9d 48 00 cmpw cr7,r29,r9 ffc107ec: 41 9e 00 20 beq- cr7,ffc1080c <_Heap_Allocate_aligned_with_boundary+0xa4> /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { ffc107f0: 81 49 00 04 lwz r10,4(r9) ffc107f4: 7f 84 50 40 cmplw cr7,r4,r10 ffc107f8: 41 bc ff d8 blt- cr7,ffc107d0 <_Heap_Allocate_aligned_with_boundary+0x68> if ( alloc_begin != 0 ) { break; } block = block->next; ffc107fc: 81 29 00 08 lwz r9,8(r9) ); } } /* Statistics */ ++search_count; ffc10800: 3b de 00 01 addi r30,r30,1 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc10804: 7f 9d 48 00 cmpw cr7,r29,r9 ffc10808: 40 9e ff e8 bne+ cr7,ffc107f0 <_Heap_Allocate_aligned_with_boundary+0x88> ); } } /* Statistics */ ++search_count; ffc1080c: 38 60 00 00 li r3,0 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { ffc10810: 81 3d 00 44 lwz r9,68(r29) ffc10814: 7f 89 f0 40 cmplw cr7,r9,r30 ffc10818: 40 9c 00 08 bge- cr7,ffc10820 <_Heap_Allocate_aligned_with_boundary+0xb8> stats->max_search = search_count; ffc1081c: 93 dd 00 44 stw r30,68(r29) } return (void *) alloc_begin; } ffc10820: 80 01 00 24 lwz r0,36(r1) ffc10824: 81 81 00 08 lwz r12,8(r1) ffc10828: 7c 08 03 a6 mtlr r0 ffc1082c: 83 61 00 0c lwz r27,12(r1) ffc10830: 83 81 00 10 lwz r28,16(r1) ffc10834: 7d 80 81 20 mtcrf 8,r12 ffc10838: 83 a1 00 14 lwz r29,20(r1) ffc1083c: 83 c1 00 18 lwz r30,24(r1) ffc10840: 83 e1 00 1c lwz r31,28(r1) ffc10844: 38 21 00 20 addi r1,r1,32 ffc10848: 4e 80 00 20 blr - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc1084c: 55 4a 00 3c rlwinm r10,r10,0,0,30 ffc10850: 80 1d 00 14 lwz r0,20(r29) uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; ffc10854: 7d 49 52 14 add r10,r9,r10 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; ffc10858: 7f fc 52 14 add r31,r28,r10 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc1085c: 7f ff 2b 96 divwu r31,r31,r5 ffc10860: 7f ff 29 d6 mullw r31,r31,r5 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; ffc10864: 7d 00 d8 50 subf r8,r0,r27 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size ffc10868: 7d 48 52 14 add r10,r8,r10 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { ffc1086c: 7f 8a f8 40 cmplw cr7,r10,r31 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc10870: 39 89 00 08 addi r12,r9,8 ffc10874: 40 9c 00 0c bge- cr7,ffc10880 <_Heap_Allocate_aligned_with_boundary+0x118> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc10878: 7d 4a 2b 96 divwu r10,r10,r5 ffc1087c: 7f ea 29 d6 mullw r31,r10,r5 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { ffc10880: 41 82 00 60 beq- ffc108e0 <_Heap_Allocate_aligned_with_boundary+0x178> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; ffc10884: 7d 1f 3a 14 add r8,r31,r7 ffc10888: 7d 48 33 96 divwu r10,r8,r6 ffc1088c: 7d 4a 31 d6 mullw r10,r10,r6 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; ffc10890: 7c 6c 3a 14 add r3,r12,r7 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc10894: 7f 9f 50 40 cmplw cr7,r31,r10 ffc10898: 40 9c 00 48 bge- cr7,ffc108e0 <_Heap_Allocate_aligned_with_boundary+0x178> ffc1089c: 7f 88 50 40 cmplw cr7,r8,r10 ffc108a0: 40 9d 00 40 ble- cr7,ffc108e0 <_Heap_Allocate_aligned_with_boundary+0x178> if ( boundary_line < boundary_floor ) { ffc108a4: 7f 83 50 40 cmplw cr7,r3,r10 ffc108a8: 40 bd 00 10 ble+ cr7,ffc108b8 <_Heap_Allocate_aligned_with_boundary+0x150> ffc108ac: 48 00 00 a0 b ffc1094c <_Heap_Allocate_aligned_with_boundary+0x1e4> /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc108b0: 40 91 00 30 ble- cr4,ffc108e0 <_Heap_Allocate_aligned_with_boundary+0x178> if ( boundary_line < boundary_floor ) { ffc108b4: 41 99 00 98 bgt- cr6,ffc1094c <_Heap_Allocate_aligned_with_boundary+0x1e4><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; ffc108b8: 7f e7 50 50 subf r31,r7,r10 ffc108bc: 7f ff 2b 96 divwu r31,r31,r5 ffc108c0: 7f ff 29 d6 mullw r31,r31,r5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; ffc108c4: 7d 1f 3a 14 add r8,r31,r7 ffc108c8: 7d 48 33 96 divwu r10,r8,r6 ffc108cc: 7d 4a 31 d6 mullw r10,r10,r6 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc108d0: 7f 9f 50 40 cmplw cr7,r31,r10 ffc108d4: 7e 08 50 40 cmplw cr4,r8,r10 if ( boundary_line < boundary_floor ) { ffc108d8: 7f 03 50 40 cmplw cr6,r3,r10 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc108dc: 41 9c ff d4 blt+ cr7,ffc108b0 <_Heap_Allocate_aligned_with_boundary+0x148> boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { ffc108e0: 7f 8c f8 40 cmplw cr7,r12,r31 ffc108e4: 41 9d 00 68 bgt- cr7,ffc1094c <_Heap_Allocate_aligned_with_boundary+0x1e4> ffc108e8: 7d 5f 5b 96 divwu r10,r31,r11 ffc108ec: 7d 4a 59 d6 mullw r10,r10,r11 ffc108f0: 21 09 ff f8 subfic r8,r9,-8 uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; ffc108f4: 7d 48 52 14 add r10,r8,r10 if ( free_size >= min_block_size || free_size == 0 ) { ffc108f8: 7f 80 50 40 cmplw cr7,r0,r10 ffc108fc: 40 bd fe dc ble- cr7,ffc107d8 <_Heap_Allocate_aligned_with_boundary+0x70> uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { return 0; ffc10900: 31 4a ff ff addic r10,r10,-1 ffc10904: 7d 4a 51 10 subfe r10,r10,r10 ffc10908: 7f ff 50 38 and r31,r31,r10 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { ffc1090c: 2f 9f 00 00 cmpwi cr7,r31,0 ); } } /* Statistics */ ++search_count; ffc10910: 3b de 00 01 addi r30,r30,1 if ( alloc_begin != 0 ) { ffc10914: 41 9e fe d0 beq+ cr7,ffc107e4 <_Heap_Allocate_aligned_with_boundary+0x7c> search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; ffc10918: 81 5d 00 48 lwz r10,72(r29) stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc1091c: 7f a3 eb 78 mr r3,r29 } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; stats->searches += search_count; ffc10920: 81 1d 00 4c lwz r8,76(r29) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc10924: 7d 24 4b 78 mr r4,r9 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; ffc10928: 39 4a 00 01 addi r10,r10,1 stats->searches += search_count; ffc1092c: 7d 08 f2 14 add r8,r8,r30 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; ffc10930: 91 5d 00 48 stw r10,72(r29) stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc10934: 7f e5 fb 78 mr r5,r31 } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; stats->searches += search_count; ffc10938: 91 1d 00 4c stw r8,76(r29) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc1093c: 7c e6 3b 78 mr r6,r7 ffc10940: 4b ff a8 c5 bl ffc0b204 <_Heap_Block_allocate> ffc10944: 7f e3 fb 78 mr r3,r31 ffc10948: 4b ff fe c8 b ffc10810 <_Heap_Allocate_aligned_with_boundary+0xa8> uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { return 0; ffc1094c: 3b e0 00 00 li r31,0 ffc10950: 4b ff fe 88 b ffc107d8 <_Heap_Allocate_aligned_with_boundary+0x70> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { ffc10954: 7f 87 30 40 cmplw cr7,r7,r6 ffc10958: 41 9d 00 14 bgt- cr7,ffc1096c <_Heap_Allocate_aligned_with_boundary+0x204> return NULL; } if ( alignment == 0 ) { ffc1095c: 2f 85 00 00 cmpwi cr7,r5,0 ffc10960: 40 be fe 50 bne- cr7,ffc107b0 <_Heap_Allocate_aligned_with_boundary+0x48> alignment = page_size; ffc10964: 7d 65 5b 78 mr r5,r11 ffc10968: 4b ff fe 48 b ffc107b0 <_Heap_Allocate_aligned_with_boundary+0x48> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } ffc1096c: 80 01 00 24 lwz r0,36(r1) uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { /* Integer overflow occured */ return NULL; ffc10970: 38 60 00 00 li r3,0 if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } ffc10974: 81 81 00 08 lwz r12,8(r1) ffc10978: 7c 08 03 a6 mtlr r0 ffc1097c: 83 61 00 0c lwz r27,12(r1) ffc10980: 83 81 00 10 lwz r28,16(r1) ffc10984: 7d 80 81 20 mtcrf 8,r12 ffc10988: 83 a1 00 14 lwz r29,20(r1) ffc1098c: 83 c1 00 18 lwz r30,24(r1) ffc10990: 83 e1 00 1c lwz r31,28(r1) ffc10994: 38 21 00 20 addi r1,r1,32 ffc10998: 4e 80 00 20 blr do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { ffc1099c: 3b c0 00 00 li r30,0 ffc109a0: 4b ff fe 6c b ffc1080c <_Heap_Allocate_aligned_with_boundary+0xa4> =============================================================================== ffc104fc <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t unused __attribute__((unused)) ) { ffc104fc: 94 21 ff c0 stwu r1,-64(r1) ffc10500: 7d 80 00 26 mfcr r12 ffc10504: 7c 08 02 a6 mflr r0 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; ffc10508: 39 20 00 00 li r9,0 Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t unused __attribute__((unused)) ) { ffc1050c: 93 a1 00 34 stw r29,52(r1) Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; ffc10510: 7f a4 2a 14 add r29,r4,r5 uintptr_t const free_size = stats->free_size; uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { ffc10514: 7f 84 e8 40 cmplw cr7,r4,r29 Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t unused __attribute__((unused)) ) { ffc10518: 90 01 00 44 stw r0,68(r1) ffc1051c: 93 41 00 28 stw r26,40(r1) ffc10520: 93 61 00 2c stw r27,44(r1) ffc10524: 93 81 00 30 stw r28,48(r1) ffc10528: 93 c1 00 38 stw r30,56(r1) ffc1052c: 7c 7e 1b 78 mr r30,r3 ffc10530: 93 e1 00 3c stw r31,60(r1) ffc10534: 7c 9f 23 78 mr r31,r4 ffc10538: 93 01 00 20 stw r24,32(r1) ffc1053c: 93 21 00 24 stw r25,36(r1) ffc10540: 91 81 00 1c stw r12,28(r1) Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; ffc10544: 83 63 00 20 lwz r27,32(r3) 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; ffc10548: 91 21 00 0c stw r9,12(r1) Heap_Block *extend_last_block = NULL; ffc1054c: 91 21 00 08 stw r9,8(r1) uintptr_t const page_size = heap->page_size; ffc10550: 83 83 00 10 lwz r28,16(r3) uintptr_t const min_block_size = heap->min_block_size; ffc10554: 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; ffc10558: 83 43 00 30 lwz r26,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 ) { ffc1055c: 40 9d 00 40 ble- cr7,ffc1059c <_Heap_Extend+0xa0> /* Statistics */ stats->size += extended_size; return extended_size; } ffc10560: 80 01 00 44 lwz r0,68(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 0; ffc10564: 38 60 00 00 li r3,0 /* Statistics */ stats->size += extended_size; return extended_size; } ffc10568: 81 81 00 1c lwz r12,28(r1) ffc1056c: 7c 08 03 a6 mtlr r0 ffc10570: 83 01 00 20 lwz r24,32(r1) ffc10574: 83 21 00 24 lwz r25,36(r1) ffc10578: 7d 80 81 20 mtcrf 8,r12 ffc1057c: 83 41 00 28 lwz r26,40(r1) ffc10580: 83 61 00 2c lwz r27,44(r1) ffc10584: 83 81 00 30 lwz r28,48(r1) ffc10588: 83 a1 00 34 lwz r29,52(r1) ffc1058c: 83 c1 00 38 lwz r30,56(r1) ffc10590: 83 e1 00 3c lwz r31,60(r1) ffc10594: 38 21 00 40 addi r1,r1,64 ffc10598: 4e 80 00 20 blr if ( extend_area_end < extend_area_begin ) { return 0; } extend_area_ok = _Heap_Get_first_and_last_block( ffc1059c: 7c 83 23 78 mr r3,r4 ffc105a0: 38 e1 00 0c addi r7,r1,12 ffc105a4: 7c a4 2b 78 mr r4,r5 ffc105a8: 39 01 00 08 addi r8,r1,8 ffc105ac: 7f 85 e3 78 mr r5,r28 ffc105b0: 4b ff a6 7d bl ffc0ac2c <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { ffc105b4: 2f 83 00 00 cmpwi cr7,r3,0 ffc105b8: 41 be ff a8 beq- cr7,ffc10560 <_Heap_Extend+0x64> ffc105bc: 7f 69 db 78 mr r9,r27 ffc105c0: 3b 00 00 00 li r24,0 ffc105c4: 38 a0 00 00 li r5,0 ffc105c8: 3b 20 00 00 li r25,0 ffc105cc: 38 c0 00 00 li r6,0 ffc105d0: 48 00 00 38 b ffc10608 <_Heap_Extend+0x10c> return 0; } if ( extend_area_end == sub_area_begin ) { merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { ffc105d4: 7f 9d 50 40 cmplw cr7,r29,r10 ffc105d8: 40 9c 00 08 bge- cr7,ffc105e0 <_Heap_Extend+0xe4> ffc105dc: 7d 25 4b 78 mr r5,r9 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { ffc105e0: 7f 8a f8 00 cmpw cr7,r10,r31 ffc105e4: 41 9e 00 64 beq- cr7,ffc10648 <_Heap_Extend+0x14c> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { ffc105e8: 7f 9f 50 40 cmplw cr7,r31,r10 ffc105ec: 40 9d 00 08 ble- cr7,ffc105f4 <_Heap_Extend+0xf8> 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 ) ffc105f0: 7d 18 43 78 mr r24,r8 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc105f4: 81 28 00 04 lwz r9,4(r8) ffc105f8: 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); ffc105fc: 7d 29 42 14 add r9,r9,r8 link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); ffc10600: 7f 9b 48 00 cmpw cr7,r27,r9 ffc10604: 41 9e 00 60 beq- cr7,ffc10664 <_Heap_Extend+0x168> return 0; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; ffc10608: 7f 89 d8 00 cmpw cr7,r9,r27 ffc1060c: 41 9e 01 a4 beq- cr7,ffc107b0 <_Heap_Extend+0x2b4> ffc10610: 7d 27 4b 78 mr r7,r9 uintptr_t const sub_area_end = start_block->prev_size; ffc10614: 81 49 00 00 lwz r10,0(r9) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc10618: 7d 0a e3 96 divwu r8,r10,r28 Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( ffc1061c: 7f 9f 50 40 cmplw cr7,r31,r10 ffc10620: 7d 08 e1 d6 mullw r8,r8,r28 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc10624: 39 08 ff f8 addi r8,r8,-8 ffc10628: 40 9c 00 0c bge- cr7,ffc10634 <_Heap_Extend+0x138> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ffc1062c: 7f 87 e8 40 cmplw cr7,r7,r29 ffc10630: 41 bc ff 30 blt- cr7,ffc10560 <_Heap_Extend+0x64> ) { return 0; } if ( extend_area_end == sub_area_begin ) { ffc10634: 7f 87 e8 00 cmpw cr7,r7,r29 ffc10638: 40 9e ff 9c bne+ cr7,ffc105d4 <_Heap_Extend+0xd8> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { ffc1063c: 7f 8a f8 00 cmpw cr7,r10,r31 sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return 0; } if ( extend_area_end == sub_area_begin ) { ffc10640: 7d 26 4b 78 mr r6,r9 merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { ffc10644: 40 9e ff a4 bne+ cr7,ffc105e8 <_Heap_Extend+0xec> <== ALWAYS TAKEN start_block->prev_size = extend_area_end; ffc10648: 93 a9 00 00 stw r29,0(r9) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) ffc1064c: 7d 19 43 78 mr r25,r8 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc10650: 81 28 00 04 lwz r9,4(r8) ffc10654: 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); ffc10658: 7d 29 42 14 add r9,r9,r8 } else if ( sub_area_end < extend_area_begin ) { link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); ffc1065c: 7f 9b 48 00 cmpw cr7,r27,r9 ffc10660: 40 9e ff a8 bne+ cr7,ffc10608 <_Heap_Extend+0x10c> <== NEVER TAKEN if ( extend_area_begin < heap->area_begin ) { ffc10664: 81 3e 00 18 lwz r9,24(r30) ffc10668: 7f 9f 48 40 cmplw cr7,r31,r9 ffc1066c: 41 9c 01 4c blt- cr7,ffc107b8 <_Heap_Extend+0x2bc> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { ffc10670: 81 3e 00 1c lwz r9,28(r30) ffc10674: 7f 9d 48 40 cmplw cr7,r29,r9 ffc10678: 40 9d 00 08 ble- cr7,ffc10680 <_Heap_Extend+0x184> heap->area_end = extend_area_end; ffc1067c: 93 be 00 1c stw r29,28(r30) extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc10680: 81 1e 00 20 lwz r8,32(r30) } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; ffc10684: 81 21 00 0c lwz r9,12(r1) ffc10688: 81 41 00 08 lwz r10,8(r1) extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc1068c: 7f 88 48 40 cmplw cr7,r8,r9 } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; ffc10690: 93 a9 00 00 stw r29,0(r9) heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = ffc10694: 7d 09 50 50 subf r8,r9,r10 (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; ffc10698: 61 07 00 01 ori r7,r8,1 _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; ffc1069c: 91 0a 00 00 stw r8,0(r10) 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 = ffc106a0: 90 e9 00 04 stw r7,4(r9) extend_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; ffc106a4: 38 e0 00 00 li r7,0 ffc106a8: 90 ea 00 04 stw r7,4(r10) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc106ac: 40 9d 01 40 ble- cr7,ffc107ec <_Heap_Extend+0x2f0> <== ALWAYS TAKEN heap->first_block = extend_first_block; ffc106b0: 91 3e 00 20 stw r9,32(r30) } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { ffc106b4: 2e 06 00 00 cmpwi cr4,r6,0 ffc106b8: 41 92 01 48 beq- cr4,ffc10800 <_Heap_Extend+0x304> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; ffc106bc: 81 3e 00 10 lwz r9,16(r30) uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); ffc106c0: 3b ff 00 08 addi r31,r31,8 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; ffc106c4: 7d 5f 4b 96 divwu r10,r31,r9 ffc106c8: 7d 4a 49 d6 mullw r10,r10,r9 if ( remainder != 0 ) { ffc106cc: 7d 0a f8 51 subf. r8,r10,r31 ffc106d0: 41 82 00 0c beq- ffc106dc <_Heap_Extend+0x1e0> <== NEVER TAKEN return value - remainder + alignment; ffc106d4: 7f ff 4a 14 add r31,r31,r9 ffc106d8: 7f e8 f8 50 subf r31,r8,r31 uintptr_t const new_first_block_begin = ffc106dc: 38 9f ff f8 addi r4,r31,-8 uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; ffc106e0: 81 26 00 00 lwz r9,0(r6) 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 = ffc106e4: 7c c4 30 50 subf r6,r4,r6 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; ffc106e8: 60 c6 00 01 ori r6,r6,1 uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; ffc106ec: 91 3f ff f8 stw r9,-8(r31) new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Free_block( heap, new_first_block ); ffc106f0: 7f c3 f3 78 mr r3,r30 uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; ffc106f4: 90 c4 00 04 stw r6,4(r4) _Heap_Free_block( heap, new_first_block ); ffc106f8: 4b ff fd 95 bl ffc1048c <_Heap_Free_block> link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { ffc106fc: 2f 99 00 00 cmpwi cr7,r25,0 ffc10700: 41 9e 01 18 beq- cr7,ffc10818 <_Heap_Extend+0x31c> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc10704: 81 5e 00 10 lwz r10,16(r30) ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE, ffc10708: 39 3d ff f8 addi r9,r29,-8 uintptr_t extend_area_end ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( ffc1070c: 7d 39 48 50 subf r9,r25,r9 ); 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) ffc10710: 81 19 00 04 lwz r8,4(r25) ffc10714: 7d 29 53 96 divwu r9,r9,r10 ffc10718: 7d 29 51 d6 mullw r9,r9,r10 | HEAP_PREV_BLOCK_USED; _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); ffc1071c: 7f c3 f3 78 mr r3,r30 ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) ffc10720: 7d 09 40 50 subf r8,r9,r8 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = ffc10724: 7d 49 ca 14 add r10,r9,r25 (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; ffc10728: 61 08 00 01 ori r8,r8,1 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = ffc1072c: 91 0a 00 04 stw r8,4(r10) (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 ); ffc10730: 7f 24 cb 78 mr r4,r25 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; ffc10734: 81 59 00 04 lwz r10,4(r25) ffc10738: 55 4a 07 fe clrlwi r10,r10,31 block->size_and_flag = size | flag; ffc1073c: 7d 29 53 78 or r9,r9,r10 ffc10740: 91 39 00 04 stw r9,4(r25) ffc10744: 4b ff fd 49 bl ffc1048c <_Heap_Free_block> /* Statistics */ stats->size += extended_size; return extended_size; } ffc10748: 81 3e 00 24 lwz r9,36(r30) * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( ffc1074c: 81 1e 00 20 lwz r8,32(r30) RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc10750: 81 49 00 04 lwz r10,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( ffc10754: 7d 09 40 50 subf r8,r9,r8 ffc10758: 80 01 00 44 lwz r0,68(r1) 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; ffc1075c: 55 4a 07 fe clrlwi r10,r10,31 ffc10760: 81 81 00 1c lwz r12,28(r1) block->size_and_flag = size | flag; ffc10764: 7d 4a 43 78 or r10,r10,r8 ffc10768: 7c 08 03 a6 mtlr r0 ffc1076c: 91 49 00 04 stw r10,4(r9) ffc10770: 7d 80 81 20 mtcrf 8,r12 _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; ffc10774: 80 7e 00 30 lwz r3,48(r30) /* Statistics */ stats->size += extended_size; ffc10778: 81 3e 00 2c lwz r9,44(r30) _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; ffc1077c: 7c 7a 18 50 subf r3,r26,r3 /* Statistics */ stats->size += extended_size; return extended_size; } ffc10780: 83 01 00 20 lwz r24,32(r1) _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; ffc10784: 7d 29 1a 14 add r9,r9,r3 return extended_size; } ffc10788: 83 21 00 24 lwz r25,36(r1) _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; ffc1078c: 91 3e 00 2c stw r9,44(r30) return extended_size; } ffc10790: 83 41 00 28 lwz r26,40(r1) ffc10794: 83 61 00 2c lwz r27,44(r1) ffc10798: 83 81 00 30 lwz r28,48(r1) ffc1079c: 83 a1 00 34 lwz r29,52(r1) ffc107a0: 83 c1 00 38 lwz r30,56(r1) ffc107a4: 83 e1 00 3c lwz r31,60(r1) ffc107a8: 38 21 00 40 addi r1,r1,64 ffc107ac: 4e 80 00 20 blr return 0; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; ffc107b0: 80 fe 00 18 lwz r7,24(r30) ffc107b4: 4b ff fe 60 b ffc10614 <_Heap_Extend+0x118> extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc107b8: 81 1e 00 20 lwz r8,32(r30) } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; ffc107bc: 81 21 00 0c lwz r9,12(r1) ffc107c0: 81 41 00 08 lwz r10,8(r1) extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc107c4: 7f 88 48 40 cmplw cr7,r8,r9 start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); if ( extend_area_begin < heap->area_begin ) { heap->area_begin = extend_area_begin; ffc107c8: 93 fe 00 18 stw r31,24(r30) } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = ffc107cc: 7d 09 50 50 subf r8,r9,r10 (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; ffc107d0: 61 07 00 01 ori r7,r8,1 } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; ffc107d4: 93 a9 00 00 stw r29,0(r9) extend_first_block->size_and_flag = ffc107d8: 90 e9 00 04 stw r7,4(r9) extend_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; ffc107dc: 38 e0 00 00 li r7,0 extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; ffc107e0: 91 0a 00 00 stw r8,0(r10) extend_last_block->size_and_flag = 0; ffc107e4: 90 ea 00 04 stw r7,4(r10) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc107e8: 41 bd fe c8 bgt- cr7,ffc106b0 <_Heap_Extend+0x1b4> <== ALWAYS TAKEN heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { ffc107ec: 81 3e 00 24 lwz r9,36(r30) ffc107f0: 7f 89 50 40 cmplw cr7,r9,r10 ffc107f4: 40 bc fe c0 bge- cr7,ffc106b4 <_Heap_Extend+0x1b8> heap->last_block = extend_last_block; ffc107f8: 91 5e 00 24 stw r10,36(r30) ffc107fc: 4b ff fe b8 b ffc106b4 <_Heap_Extend+0x1b8> } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { ffc10800: 2f 85 00 00 cmpwi cr7,r5,0 ffc10804: 41 be fe f8 beq- cr7,ffc106fc <_Heap_Extend+0x200> { 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; ffc10808: 7c aa 28 50 subf r5,r10,r5 ffc1080c: 60 a5 00 01 ori r5,r5,1 ) { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = ffc10810: 90 aa 00 04 stw r5,4(r10) ffc10814: 4b ff fe e8 b ffc106fc <_Heap_Extend+0x200> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { ffc10818: 2f 98 00 00 cmpwi cr7,r24,0 ffc1081c: 41 9e 00 2c beq- cr7,ffc10848 <_Heap_Extend+0x34c> 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; ffc10820: 81 38 00 04 lwz r9,4(r24) ffc10824: 55 2a 07 fe clrlwi r10,r9,31 ) { 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 ); ffc10828: 81 21 00 0c lwz r9,12(r1) ffc1082c: 7d 38 48 50 subf r9,r24,r9 block->size_and_flag = size | flag; ffc10830: 7d 4a 4b 78 or r10,r10,r9 } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { _Heap_Link_above( ffc10834: 81 21 00 08 lwz r9,8(r1) ffc10838: 91 58 00 04 stw r10,4(r24) uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; ffc1083c: 81 49 00 04 lwz r10,4(r9) ffc10840: 61 4a 00 01 ori r10,r10,1 ffc10844: 91 49 00 04 stw r10,4(r9) extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { ffc10848: 40 92 ff 00 bne+ cr4,ffc10748 <_Heap_Extend+0x24c> _Heap_Free_block( heap, extend_first_block ); ffc1084c: 80 81 00 0c lwz r4,12(r1) ffc10850: 7f c3 f3 78 mr r3,r30 ffc10854: 4b ff fc 39 bl ffc1048c <_Heap_Free_block> ffc10858: 4b ff fe f0 b ffc10748 <_Heap_Extend+0x24c> =============================================================================== ffc109a4 <_Heap_Free>: /* * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { ffc109a4: 2c 04 00 00 cmpwi r4,0 return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { ffc109a8: 7c 69 1b 78 mr r9,r3 /* * 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 ) { ffc109ac: 41 82 00 dc beq- ffc10a88 <_Heap_Free+0xe4> ffc109b0: 81 03 00 10 lwz r8,16(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 ffc109b4: 80 e3 00 20 lwz r7,32(r3) alloc_begin = (uintptr_t) alloc_begin_ptr; block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; ffc109b8: 38 60 00 00 li r3,0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc109bc: 7d 44 43 96 divwu r10,r4,r8 ffc109c0: 7d 4a 41 d6 mullw r10,r10,r8 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc109c4: 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; ffc109c8: 7f 8a 38 40 cmplw cr7,r10,r7 ffc109cc: 4d 9c 00 20 bltlr cr7 ffc109d0: 80 c9 00 24 lwz r6,36(r9) ffc109d4: 7f 8a 30 40 cmplw cr7,r10,r6 ffc109d8: 40 9d 00 08 ble- cr7,ffc109e0 <_Heap_Free+0x3c> <== ALWAYS TAKEN ffc109dc: 4e 80 00 20 blr <== NOT EXECUTED --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc109e0: 81 6a 00 04 lwz r11,4(r10) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc109e4: 55 65 00 3c rlwinm r5,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); ffc109e8: 7d 05 52 14 add r8,r5,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; ffc109ec: 7f 87 40 40 cmplw cr7,r7,r8 ffc109f0: 41 9d 00 94 bgt- cr7,ffc10a84 <_Heap_Free+0xe0> <== NEVER TAKEN ffc109f4: 7f 86 40 40 cmplw cr7,r6,r8 ffc109f8: 41 9c 00 88 blt- cr7,ffc10a80 <_Heap_Free+0xdc> <== NEVER TAKEN ffc109fc: 80 88 00 04 lwz r4,4(r8) return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { ffc10a00: 70 80 00 01 andi. r0,r4,1 ffc10a04: 41 82 00 8c beq- ffc10a90 <_Heap_Free+0xec> return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); ffc10a08: 7f 86 40 00 cmpw cr7,r6,r8 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc10a0c: 54 84 00 3c rlwinm r4,r4,0,0,30 ffc10a10: 41 9e 00 84 beq- cr7,ffc10a94 <_Heap_Free+0xf0> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10a14: 7c 68 22 14 add r3,r8,r4 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc10a18: 80 63 00 04 lwz r3,4(r3) return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); ffc10a1c: 70 60 00 01 andi. r0,r3,1 ffc10a20: 40 82 00 74 bne- ffc10a94 <_Heap_Free+0xf0> if ( !_Heap_Is_prev_used( block ) ) { ffc10a24: 71 60 00 01 andi. r0,r11,1 ffc10a28: 41 82 01 50 beq- ffc10b78 <_Heap_Free+0x1d4> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10a2c: 80 e8 00 08 lwz r7,8(r8) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; ffc10a30: 7c 84 2a 14 add r4,r4,r5 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10a34: 81 08 00 0c lwz r8,12(r8) next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc10a38: 60 86 00 01 ori r6,r4,1 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; ffc10a3c: 90 ea 00 08 stw r7,8(r10) new_block->prev = prev; ffc10a40: 91 0a 00 0c stw r8,12(r10) next->prev = new_block; prev->next = new_block; ffc10a44: 91 48 00 08 stw r10,8(r8) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; ffc10a48: 91 47 00 0c stw r10,12(r7) ffc10a4c: 90 ca 00 04 stw r6,4(r10) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; ffc10a50: 7c 84 51 2e stwx r4,r4,r10 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc10a54: 81 09 00 40 lwz r8,64(r9) ++stats->frees; stats->free_size += block_size; return( true ); ffc10a58: 38 60 00 01 li r3,1 } } /* Statistics */ --stats->used_blocks; ++stats->frees; ffc10a5c: 81 49 00 50 lwz r10,80(r9) stats->free_size += block_size; ffc10a60: 80 e9 00 30 lwz r7,48(r9) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc10a64: 39 08 ff ff addi r8,r8,-1 ++stats->frees; ffc10a68: 39 4a 00 01 addi r10,r10,1 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc10a6c: 91 09 00 40 stw r8,64(r9) ++stats->frees; stats->free_size += block_size; ffc10a70: 7c a7 2a 14 add r5,r7,r5 } } /* Statistics */ --stats->used_blocks; ++stats->frees; ffc10a74: 91 49 00 50 stw r10,80(r9) stats->free_size += block_size; ffc10a78: 90 a9 00 30 stw r5,48(r9) return( true ); ffc10a7c: 4e 80 00 20 blr ffc10a80: 4e 80 00 20 blr <== NOT EXECUTED ffc10a84: 4e 80 00 20 blr <== NOT EXECUTED * 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; ffc10a88: 38 60 00 01 li r3,1 ffc10a8c: 4e 80 00 20 blr ffc10a90: 4e 80 00 20 blr 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 ) ) { ffc10a94: 71 63 00 01 andi. r3,r11,1 ffc10a98: 40 82 00 28 bne- ffc10ac0 <_Heap_Free+0x11c> 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 ffc10a9c: 39 80 00 00 li r12,0 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { uintptr_t const prev_size = block->prev_size; ffc10aa0: 80 0a 00 00 lwz r0,0(r10) alloc_begin = (uintptr_t) alloc_begin_ptr; block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; ffc10aa4: 38 60 00 00 li r3,0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc10aa8: 7d 60 50 50 subf r11,r0,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; ffc10aac: 7f 87 58 40 cmplw cr7,r7,r11 ffc10ab0: 4d 9d 00 20 bgtlr cr7 ffc10ab4: 7f 86 58 40 cmplw cr7,r6,r11 ffc10ab8: 40 9c 00 54 bge- cr7,ffc10b0c <_Heap_Free+0x168> <== ALWAYS TAKEN ffc10abc: 4e 80 00 20 blr <== NOT EXECUTED 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; ffc10ac0: 80 e9 00 38 lwz r7,56(r9) next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; ffc10ac4: 60 a4 00 01 ori r4,r5,1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { ffc10ac8: 80 c9 00 3c lwz r6,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; ffc10acc: 38 e7 00 01 addi r7,r7,1 next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; ffc10ad0: 90 8a 00 04 stw r4,4(r10) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { ffc10ad4: 7f 87 30 40 cmplw cr7,r7,r6 } 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; ffc10ad8: 80 88 00 04 lwz r4,4(r8) RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; ffc10adc: 80 c9 00 08 lwz r6,8(r9) ffc10ae0: 54 84 00 3c rlwinm r4,r4,0,0,30 new_block->next = next; new_block->prev = block_before; ffc10ae4: 91 2a 00 0c stw r9,12(r10) Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; ffc10ae8: 90 ca 00 08 stw r6,8(r10) ffc10aec: 90 88 00 04 stw r4,4(r8) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; ffc10af0: 91 46 00 0c stw r10,12(r6) next_block->prev_size = block_size; ffc10af4: 7c a5 51 2e stwx r5,r5,r10 { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; ffc10af8: 91 49 00 08 stw r10,8(r9) /* Statistics */ ++stats->free_blocks; ffc10afc: 90 e9 00 38 stw r7,56(r9) if ( stats->max_free_blocks < stats->free_blocks ) { ffc10b00: 40 bd ff 54 ble- cr7,ffc10a54 <_Heap_Free+0xb0> stats->max_free_blocks = stats->free_blocks; ffc10b04: 90 e9 00 3c stw r7,60(r9) ffc10b08: 4b ff ff 4c b ffc10a54 <_Heap_Free+0xb0> 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; ffc10b0c: 80 eb 00 04 lwz r7,4(r11) 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) ) { ffc10b10: 70 e6 00 01 andi. r6,r7,1 ffc10b14: 41 82 00 60 beq- ffc10b74 <_Heap_Free+0x1d0> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ ffc10b18: 2f 8c 00 00 cmpwi cr7,r12,0 ffc10b1c: 41 9e 00 38 beq- cr7,ffc10b54 <_Heap_Free+0x1b0> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc10b20: 80 c9 00 38 lwz r6,56(r9) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; ffc10b24: 7c 05 02 14 add r0,r5,r0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10b28: 80 e8 00 08 lwz r7,8(r8) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; ffc10b2c: 7c 80 22 14 add r4,r0,r4 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc10b30: 81 48 00 0c lwz r10,12(r8) } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc10b34: 38 c6 ff ff addi r6,r6,-1 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc10b38: 60 88 00 01 ori r8,r4,1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; ffc10b3c: 90 ea 00 08 stw r7,8(r10) next->prev = prev; ffc10b40: 91 47 00 0c stw r10,12(r7) } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc10b44: 90 c9 00 38 stw r6,56(r9) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc10b48: 91 0b 00 04 stw r8,4(r11) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; ffc10b4c: 7c 84 59 2e stwx r4,r4,r11 ffc10b50: 4b ff ff 04 b ffc10a54 <_Heap_Free+0xb0> } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; ffc10b54: 7c 05 02 14 add r0,r5,r0 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc10b58: 60 07 00 01 ori r7,r0,1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; ffc10b5c: 7c 05 51 2e stwx r0,r5,r10 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; ffc10b60: 90 eb 00 04 stw r7,4(r11) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc10b64: 80 e8 00 04 lwz r7,4(r8) ffc10b68: 54 e7 00 3c rlwinm r7,r7,0,0,30 ffc10b6c: 90 e8 00 04 stw r7,4(r8) ffc10b70: 4b ff fe e4 b ffc10a54 <_Heap_Free+0xb0> ffc10b74: 4e 80 00 20 blr <== NOT EXECUTED 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 ffc10b78: 39 80 00 01 li r12,1 ffc10b7c: 4b ff ff 24 b ffc10aa0 <_Heap_Free+0xfc> =============================================================================== ffc15dc0 <_Heap_Get_free_information>: return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc15dc0: 81 23 00 08 lwz r9,8(r3) ) { Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; ffc15dc4: 39 40 00 00 li r10,0 ffc15dc8: 91 44 00 00 stw r10,0(r4) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); ffc15dcc: 38 e0 00 01 li r7,1 ffc15dd0: 7f 83 48 00 cmpw cr7,r3,r9 { Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; info->largest = 0; ffc15dd4: 91 44 00 04 stw r10,4(r4) info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); ffc15dd8: 38 c0 00 00 li r6,0 ffc15ddc: 39 00 00 00 li r8,0 Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; info->largest = 0; info->total = 0; ffc15de0: 91 44 00 08 stw r10,8(r4) for(the_block = _Heap_Free_list_first(the_heap); ffc15de4: 40 be 00 10 bne+ cr7,ffc15df4 <_Heap_Get_free_information+0x34><== ALWAYS TAKEN ffc15de8: 4e 80 00 20 blr <== NOT EXECUTED ffc15dec: 80 c4 00 04 lwz r6,4(r4) ffc15df0: 7c a7 2b 78 mr r7,r5 - 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; ffc15df4: 81 49 00 04 lwz r10,4(r9) ffc15df8: 38 a7 00 01 addi r5,r7,1 ffc15dfc: 55 4a 00 3c rlwinm r10,r10,0,0,30 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; if ( info->largest < the_size ) ffc15e00: 7f 8a 30 40 cmplw cr7,r10,r6 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; ffc15e04: 7d 08 52 14 add r8,r8,r10 if ( info->largest < the_size ) ffc15e08: 40 9d 00 08 ble- cr7,ffc15e10 <_Heap_Get_free_information+0x50> info->largest = the_size; ffc15e0c: 91 44 00 04 stw r10,4(r4) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) ffc15e10: 81 29 00 08 lwz r9,8(r9) info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); ffc15e14: 7f 83 48 00 cmpw cr7,r3,r9 ffc15e18: 40 9e ff d4 bne+ cr7,ffc15dec <_Heap_Get_free_information+0x2c> ffc15e1c: 90 e4 00 00 stw r7,0(r4) ffc15e20: 91 04 00 08 stw r8,8(r4) ffc15e24: 4e 80 00 20 blr =============================================================================== ffc0d448 <_Heap_Greedy_allocate>: Heap_Block *_Heap_Greedy_allocate( Heap_Control *heap, const uintptr_t *block_sizes, size_t block_count ) { ffc0d448: 94 21 ff e0 stwu r1,-32(r1) ffc0d44c: 7c 08 02 a6 mflr r0 ffc0d450: 93 61 00 0c stw r27,12(r1) Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { ffc0d454: 7c bb 2b 79 mr. r27,r5 Heap_Block *_Heap_Greedy_allocate( Heap_Control *heap, const uintptr_t *block_sizes, size_t block_count ) { ffc0d458: 93 c1 00 18 stw r30,24(r1) ffc0d45c: 7c 7e 1b 78 mr r30,r3 ffc0d460: 90 01 00 24 stw r0,36(r1) ffc0d464: 93 81 00 10 stw r28,16(r1) ffc0d468: 93 a1 00 14 stw r29,20(r1) ffc0d46c: 93 e1 00 1c stw r31,28(r1) Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { ffc0d470: 41 82 00 e0 beq- ffc0d550 <_Heap_Greedy_allocate+0x108> #include "config.h" #endif #include Heap_Block *_Heap_Greedy_allocate( ffc0d474: 3b 84 ff fc addi r28,r4,-4 Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { ffc0d478: 3b e0 00 00 li r31,0 const uintptr_t *block_sizes, size_t block_count ) { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *allocated_blocks = NULL; ffc0d47c: 3b a0 00 00 li r29,0 * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); ffc0d480: 84 9c 00 04 lwzu r4,4(r28) ffc0d484: 7f c3 f3 78 mr r3,r30 ffc0d488: 38 a0 00 00 li r5,0 ffc0d48c: 38 c0 00 00 li r6,0 ffc0d490: 48 00 8f 19 bl ffc163a8 <_Heap_Allocate_aligned_with_boundary> Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { ffc0d494: 3b ff 00 01 addi r31,r31,1 void *next = _Heap_Allocate( heap, block_sizes [i] ); if ( next != NULL ) { ffc0d498: 2c 03 00 00 cmpwi r3,0 Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { ffc0d49c: 7f 9f d8 00 cmpw cr7,r31,r27 void *next = _Heap_Allocate( heap, block_sizes [i] ); if ( next != NULL ) { ffc0d4a0: 41 82 00 1c beq- ffc0d4bc <_Heap_Greedy_allocate+0x74> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc0d4a4: 81 3e 00 10 lwz r9,16(r30) ffc0d4a8: 7c 63 4b 96 divwu r3,r3,r9 ffc0d4ac: 7d 23 49 d6 mullw r9,r3,r9 Heap_Block *next_block = _Heap_Block_of_alloc_area( (uintptr_t) next, heap->page_size ); next_block->next = allocated_blocks; ffc0d4b0: 93 a9 00 00 stw r29,0(r9) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc0d4b4: 39 29 ff f8 addi r9,r9,-8 ffc0d4b8: 7d 3d 4b 78 mr r29,r9 Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { ffc0d4bc: 40 9e ff c4 bne+ cr7,ffc0d480 <_Heap_Greedy_allocate+0x38> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0d4c0: 83 fe 00 08 lwz r31,8(r30) next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { ffc0d4c4: 7f 9e f8 00 cmpw cr7,r30,r31 ffc0d4c8: 41 9e 00 90 beq- cr7,ffc0d558 <_Heap_Greedy_allocate+0x110><== NEVER TAKEN ffc0d4cc: 3b 80 00 00 li r28,0 ffc0d4d0: 48 00 00 08 b ffc0d4d8 <_Heap_Greedy_allocate+0x90> ffc0d4d4: 7d 3f 4b 78 mr r31,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; ffc0d4d8: 80 df 00 04 lwz r6,4(r31) _Heap_Block_allocate( ffc0d4dc: 7f e4 fb 78 mr r4,r31 ffc0d4e0: 38 bf 00 08 addi r5,r31,8 ffc0d4e4: 54 c6 00 3c rlwinm r6,r6,0,0,30 ffc0d4e8: 7f c3 f3 78 mr r3,r30 ffc0d4ec: 38 c6 ff f8 addi r6,r6,-8 ffc0d4f0: 48 00 03 e5 bl ffc0d8d4 <_Heap_Block_allocate> current, _Heap_Alloc_area_of_block( current ), _Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE ); current->next = blocks; ffc0d4f4: 93 9f 00 08 stw r28,8(r31) ffc0d4f8: 7f fc fb 78 mr r28,r31 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0d4fc: 81 3e 00 08 lwz r9,8(r30) next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { ffc0d500: 7f 9e 48 00 cmpw cr7,r30,r9 ffc0d504: 40 9e ff d0 bne+ cr7,ffc0d4d4 <_Heap_Greedy_allocate+0x8c> current->next = blocks; blocks = current; } while ( allocated_blocks != NULL ) { ffc0d508: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0d50c: 41 9e 00 1c beq- cr7,ffc0d528 <_Heap_Greedy_allocate+0xe0> current = allocated_blocks; allocated_blocks = allocated_blocks->next; ffc0d510: 7f a4 eb 78 mr r4,r29 ffc0d514: 87 a4 00 08 lwzu r29,8(r4) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); ffc0d518: 7f c3 f3 78 mr r3,r30 ffc0d51c: 48 00 90 c9 bl ffc165e4 <_Heap_Free> current->next = blocks; blocks = current; } while ( allocated_blocks != NULL ) { ffc0d520: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0d524: 40 9e ff ec bne+ cr7,ffc0d510 <_Heap_Greedy_allocate+0xc8> allocated_blocks = allocated_blocks->next; _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); } return blocks; } ffc0d528: 80 01 00 24 lwz r0,36(r1) ffc0d52c: 7f e3 fb 78 mr r3,r31 ffc0d530: 83 61 00 0c lwz r27,12(r1) ffc0d534: 7c 08 03 a6 mtlr r0 ffc0d538: 83 81 00 10 lwz r28,16(r1) ffc0d53c: 83 a1 00 14 lwz r29,20(r1) ffc0d540: 83 c1 00 18 lwz r30,24(r1) ffc0d544: 83 e1 00 1c lwz r31,28(r1) ffc0d548: 38 21 00 20 addi r1,r1,32 ffc0d54c: 4e 80 00 20 blr const uintptr_t *block_sizes, size_t block_count ) { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *allocated_blocks = NULL; ffc0d550: 3b a0 00 00 li r29,0 ffc0d554: 4b ff ff 6c b ffc0d4c0 <_Heap_Greedy_allocate+0x78> next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { ffc0d558: 3b e0 00 00 li r31,0 <== NOT EXECUTED ffc0d55c: 4b ff ff c4 b ffc0d520 <_Heap_Greedy_allocate+0xd8> <== NOT EXECUTED =============================================================================== ffc0d560 <_Heap_Greedy_free>: void _Heap_Greedy_free( Heap_Control *heap, Heap_Block *blocks ) { while ( blocks != NULL ) { ffc0d560: 2c 04 00 00 cmpwi r4,0 void _Heap_Greedy_free( Heap_Control *heap, Heap_Block *blocks ) { ffc0d564: 94 21 ff f0 stwu r1,-16(r1) ffc0d568: 7c 08 02 a6 mflr r0 ffc0d56c: 93 c1 00 08 stw r30,8(r1) ffc0d570: 7c 7e 1b 78 mr r30,r3 ffc0d574: 90 01 00 14 stw r0,20(r1) ffc0d578: 93 e1 00 0c stw r31,12(r1) while ( blocks != NULL ) { ffc0d57c: 41 82 00 1c beq- ffc0d598 <_Heap_Greedy_free+0x38> <== NEVER TAKEN Heap_Block *current = blocks; blocks = blocks->next; ffc0d580: 87 e4 00 08 lwzu r31,8(r4) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); ffc0d584: 7f c3 f3 78 mr r3,r30 ffc0d588: 48 00 90 5d bl ffc165e4 <_Heap_Free> void _Heap_Greedy_free( Heap_Control *heap, Heap_Block *blocks ) { while ( blocks != NULL ) { ffc0d58c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0d590: 7f e4 fb 78 mr r4,r31 ffc0d594: 40 9e ff ec bne+ cr7,ffc0d580 <_Heap_Greedy_free+0x20> Heap_Block *current = blocks; blocks = blocks->next; _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); } } ffc0d598: 80 01 00 14 lwz r0,20(r1) ffc0d59c: 83 c1 00 08 lwz r30,8(r1) ffc0d5a0: 7c 08 03 a6 mtlr r0 ffc0d5a4: 83 e1 00 0c lwz r31,12(r1) ffc0d5a8: 38 21 00 10 addi r1,r1,16 ffc0d5ac: 4e 80 00 20 blr =============================================================================== ffc15e94 <_Heap_Iterate>: void _Heap_Iterate( Heap_Control *heap, Heap_Block_visitor visitor, void *visitor_arg ) { ffc15e94: 94 21 ff e8 stwu r1,-24(r1) ffc15e98: 7c 08 02 a6 mflr r0 ffc15e9c: 90 01 00 1c stw r0,28(r1) ffc15ea0: 93 c1 00 10 stw r30,16(r1) Heap_Block *current = heap->first_block; ffc15ea4: 81 23 00 20 lwz r9,32(r3) Heap_Block *end = heap->last_block; ffc15ea8: 83 c3 00 24 lwz r30,36(r3) void _Heap_Iterate( Heap_Control *heap, Heap_Block_visitor visitor, void *visitor_arg ) { ffc15eac: 93 81 00 08 stw r28,8(r1) ffc15eb0: 7c 9c 23 78 mr r28,r4 Heap_Block *current = heap->first_block; Heap_Block *end = heap->last_block; bool stop = false; while ( !stop && current != end ) { ffc15eb4: 7f 89 f0 00 cmpw cr7,r9,r30 void _Heap_Iterate( Heap_Control *heap, Heap_Block_visitor visitor, void *visitor_arg ) { ffc15eb8: 93 a1 00 0c stw r29,12(r1) ffc15ebc: 7c bd 2b 78 mr r29,r5 ffc15ec0: 93 e1 00 14 stw r31,20(r1) Heap_Block *current = heap->first_block; Heap_Block *end = heap->last_block; bool stop = false; while ( !stop && current != end ) { ffc15ec4: 40 be 00 0c bne+ cr7,ffc15ed0 <_Heap_Iterate+0x3c> <== ALWAYS TAKEN ffc15ec8: 48 00 00 3c b ffc15f04 <_Heap_Iterate+0x70> <== NOT EXECUTED ffc15ecc: 41 9a 00 38 beq- cr6,ffc15f04 <_Heap_Iterate+0x70> ffc15ed0: 81 49 00 04 lwz r10,4(r9) uintptr_t size = _Heap_Block_size( current ); Heap_Block *next = _Heap_Block_at( current, size ); bool used = _Heap_Is_prev_used( next ); stop = (*visitor)( current, size, used, visitor_arg ); ffc15ed4: 7d 23 4b 78 mr r3,r9 ffc15ed8: 7f a6 eb 78 mr r6,r29 ffc15edc: 7f 89 03 a6 mtctr r28 ffc15ee0: 55 44 00 3c rlwinm r4,r10,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); ffc15ee4: 7f e9 22 14 add r31,r9,r4 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc15ee8: 80 bf 00 04 lwz r5,4(r31) ffc15eec: 54 a5 07 fe clrlwi r5,r5,31 ffc15ef0: 4e 80 04 21 bctrl ffc15ef4: 7f e9 fb 78 mr r9,r31 { Heap_Block *current = heap->first_block; Heap_Block *end = heap->last_block; bool stop = false; while ( !stop && current != end ) { ffc15ef8: 2f 83 00 00 cmpwi cr7,r3,0 ffc15efc: 7f 1e f8 00 cmpw cr6,r30,r31 ffc15f00: 41 9e ff cc beq+ cr7,ffc15ecc <_Heap_Iterate+0x38> <== ALWAYS TAKEN stop = (*visitor)( current, size, used, visitor_arg ); current = next; } } ffc15f04: 80 01 00 1c lwz r0,28(r1) ffc15f08: 83 81 00 08 lwz r28,8(r1) ffc15f0c: 7c 08 03 a6 mtlr r0 ffc15f10: 83 a1 00 0c lwz r29,12(r1) ffc15f14: 83 c1 00 10 lwz r30,16(r1) ffc15f18: 83 e1 00 14 lwz r31,20(r1) ffc15f1c: 38 21 00 18 addi r1,r1,24 ffc15f20: 4e 80 00 20 blr =============================================================================== ffc1e864 <_Heap_Size_of_alloc_area>: RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc1e864: 81 23 00 10 lwz r9,16(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 ffc1e868: 81 43 00 20 lwz r10,32(r3) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc1e86c: 7d 04 4b 96 divwu r8,r4,r9 ffc1e870: 7d 28 49 d6 mullw r9,r8,r9 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc1e874: 39 29 ff f8 addi r9,r9,-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; ffc1e878: 7f 89 50 40 cmplw cr7,r9,r10 ffc1e87c: 41 9c 00 50 blt- cr7,ffc1e8cc <_Heap_Size_of_alloc_area+0x68> ffc1e880: 81 03 00 24 lwz r8,36(r3) ffc1e884: 7f 89 40 40 cmplw cr7,r9,r8 ffc1e888: 41 9d 00 44 bgt- cr7,ffc1e8cc <_Heap_Size_of_alloc_area+0x68> - 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; ffc1e88c: 80 e9 00 04 lwz r7,4(r9) ffc1e890: 54 e7 00 3c rlwinm r7,r7,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc1e894: 7d 27 4a 14 add r9,r7,r9 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; ffc1e898: 7f 8a 48 40 cmplw cr7,r10,r9 ffc1e89c: 41 9d 00 30 bgt- cr7,ffc1e8cc <_Heap_Size_of_alloc_area+0x68><== NEVER TAKEN ffc1e8a0: 7f 88 48 40 cmplw cr7,r8,r9 ffc1e8a4: 41 9c 00 28 blt- cr7,ffc1e8cc <_Heap_Size_of_alloc_area+0x68><== 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; ffc1e8a8: 81 49 00 04 lwz r10,4(r9) 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 ) ) { return false; ffc1e8ac: 38 60 00 00 li r3,0 block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ffc1e8b0: 71 48 00 01 andi. r8,r10,1 ffc1e8b4: 41 82 00 20 beq- ffc1e8d4 <_Heap_Size_of_alloc_area+0x70><== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; ffc1e8b8: 20 84 00 04 subfic r4,r4,4 ffc1e8bc: 7d 24 4a 14 add r9,r4,r9 ffc1e8c0: 91 25 00 00 stw r9,0(r5) return true; ffc1e8c4: 38 60 00 01 li r3,1 ffc1e8c8: 4e 80 00 20 blr 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 ) ) { return false; ffc1e8cc: 38 60 00 00 li r3,0 ffc1e8d0: 4e 80 00 20 blr } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } ffc1e8d4: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0b974 <_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; ffc0b974: 2f 85 00 00 cmpwi cr7,r5,0 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { ffc0b978: 94 21 ff a0 stwu r1,-96(r1) ffc0b97c: 7c 08 02 a6 mflr r0 ffc0b980: 91 c1 00 18 stw r14,24(r1) ffc0b984: 90 01 00 64 stw r0,100(r1) ffc0b988: 92 e1 00 3c stw r23,60(r1) ffc0b98c: 93 01 00 40 stw r24,64(r1) ffc0b990: 7c 98 23 78 mr r24,r4 ffc0b994: 93 41 00 48 stw r26,72(r1) ffc0b998: 93 61 00 4c stw r27,76(r1) ffc0b99c: 93 e1 00 5c stw r31,92(r1) ffc0b9a0: 7c 7f 1b 78 mr r31,r3 ffc0b9a4: 91 e1 00 1c stw r15,28(r1) ffc0b9a8: 92 01 00 20 stw r16,32(r1) ffc0b9ac: 92 21 00 24 stw r17,36(r1) ffc0b9b0: 92 41 00 28 stw r18,40(r1) ffc0b9b4: 92 61 00 2c stw r19,44(r1) ffc0b9b8: 92 81 00 30 stw r20,48(r1) ffc0b9bc: 92 a1 00 34 stw r21,52(r1) ffc0b9c0: 92 c1 00 38 stw r22,56(r1) ffc0b9c4: 93 21 00 44 stw r25,68(r1) ffc0b9c8: 93 81 00 50 stw r28,80(r1) ffc0b9cc: 93 a1 00 54 stw r29,84(r1) ffc0b9d0: 93 c1 00 58 stw r30,88(r1) uintptr_t const page_size = heap->page_size; ffc0b9d4: 83 63 00 10 lwz r27,16(r3) uintptr_t const min_block_size = heap->min_block_size; ffc0b9d8: 81 c3 00 14 lwz r14,20(r3) Heap_Block *const first_block = heap->first_block; ffc0b9dc: 83 43 00 20 lwz r26,32(r3) Heap_Block *const last_block = heap->last_block; ffc0b9e0: 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; ffc0b9e4: 41 9e 00 78 beq- cr7,ffc0ba5c <_Heap_Walk+0xe8> if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0b9e8: 3d 20 00 00 lis r9,0 ffc0b9ec: 81 29 28 6c lwz r9,10348(r9) 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; ffc0b9f0: 3f 20 ff c1 lis r25,-63 ffc0b9f4: 3b 39 b8 74 addi r25,r25,-18316 if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0b9f8: 2f 89 00 03 cmpwi cr7,r9,3 return true; ffc0b9fc: 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() ) ) { ffc0ba00: 41 9e 00 78 beq- cr7,ffc0ba78 <_Heap_Walk+0x104> <== ALWAYS TAKEN block = next_block; } while ( block != first_block ); return true; } ffc0ba04: 80 01 00 64 lwz r0,100(r1) ffc0ba08: 81 c1 00 18 lwz r14,24(r1) ffc0ba0c: 7c 08 03 a6 mtlr r0 ffc0ba10: 81 e1 00 1c lwz r15,28(r1) ffc0ba14: 82 01 00 20 lwz r16,32(r1) ffc0ba18: 82 21 00 24 lwz r17,36(r1) ffc0ba1c: 82 41 00 28 lwz r18,40(r1) ffc0ba20: 82 61 00 2c lwz r19,44(r1) ffc0ba24: 82 81 00 30 lwz r20,48(r1) ffc0ba28: 82 a1 00 34 lwz r21,52(r1) ffc0ba2c: 82 c1 00 38 lwz r22,56(r1) ffc0ba30: 82 e1 00 3c lwz r23,60(r1) ffc0ba34: 83 01 00 40 lwz r24,64(r1) ffc0ba38: 83 21 00 44 lwz r25,68(r1) ffc0ba3c: 83 41 00 48 lwz r26,72(r1) ffc0ba40: 83 61 00 4c lwz r27,76(r1) ffc0ba44: 83 81 00 50 lwz r28,80(r1) ffc0ba48: 83 a1 00 54 lwz r29,84(r1) ffc0ba4c: 83 c1 00 58 lwz r30,88(r1) ffc0ba50: 83 e1 00 5c lwz r31,92(r1) ffc0ba54: 38 21 00 60 addi r1,r1,96 ffc0ba58: 4e 80 00 20 blr 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() ) ) { ffc0ba5c: 3d 20 00 00 lis r9,0 ffc0ba60: 81 29 28 6c lwz r9,10348(r9) 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; ffc0ba64: 3f 20 ff c1 lis r25,-63 ffc0ba68: 3b 39 b8 70 addi r25,r25,-18320 if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0ba6c: 2f 89 00 03 cmpwi cr7,r9,3 return true; ffc0ba70: 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() ) ) { ffc0ba74: 40 9e ff 90 bne+ cr7,ffc0ba04 <_Heap_Walk+0x90> 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)( ffc0ba78: 80 ff 00 08 lwz r7,8(r31) ffc0ba7c: 3c a0 ff c2 lis r5,-62 ffc0ba80: 81 5f 00 0c lwz r10,12(r31) ffc0ba84: 7f 03 c3 78 mr r3,r24 ffc0ba88: 81 1f 00 18 lwz r8,24(r31) ffc0ba8c: 38 80 00 00 li r4,0 ffc0ba90: 81 3f 00 1c lwz r9,28(r31) ffc0ba94: 38 a5 a8 b0 addi r5,r5,-22352 ffc0ba98: 90 e1 00 0c stw r7,12(r1) ffc0ba9c: 7f 66 db 78 mr r6,r27 ffc0baa0: 7d c7 73 78 mr r7,r14 ffc0baa4: 7f 29 03 a6 mtctr r25 ffc0baa8: 91 41 00 10 stw r10,16(r1) ffc0baac: 7f 4a d3 78 mr r10,r26 ffc0bab0: 92 e1 00 08 stw r23,8(r1) ffc0bab4: 4c c6 31 82 crclr 4*cr1+eq ffc0bab8: 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 ) { ffc0babc: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0bac0: 41 9e 00 a4 beq- cr7,ffc0bb64 <_Heap_Walk+0x1f0> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { ffc0bac4: 73 67 00 07 andi. r7,r27,7 ffc0bac8: 40 82 00 c0 bne- ffc0bb88 <_Heap_Walk+0x214> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0bacc: 7d 2e db 96 divwu r9,r14,r27 ffc0bad0: 7d 29 d9 d6 mullw r9,r9,r27 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { ffc0bad4: 7f 8e 48 00 cmpw cr7,r14,r9 ffc0bad8: 40 9e 00 d8 bne- cr7,ffc0bbb0 <_Heap_Walk+0x23c> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0badc: 39 3a 00 08 addi r9,r26,8 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0bae0: 7d 49 db 96 divwu r10,r9,r27 ffc0bae4: 7d 4a d9 d6 mullw r10,r10,r27 ); return false; } if ( ffc0bae8: 7f 89 50 00 cmpw cr7,r9,r10 ffc0baec: 40 9e 00 ec bne- cr7,ffc0bbd8 <_Heap_Walk+0x264> block = next_block; } while ( block != first_block ); return true; } ffc0baf0: 83 9a 00 04 lwz r28,4(r26) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { ffc0baf4: 73 90 00 01 andi. r16,r28,1 ffc0baf8: 41 82 01 08 beq- ffc0bc00 <_Heap_Walk+0x28c> - 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; ffc0bafc: 81 37 00 04 lwz r9,4(r23) ffc0bb00: 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); ffc0bb04: 7d 37 4a 14 add r9,r23,r9 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0bb08: 81 49 00 04 lwz r10,4(r9) ); return false; } if ( _Heap_Is_free( last_block ) ) { ffc0bb0c: 71 47 00 01 andi. r7,r10,1 ffc0bb10: 41 82 00 30 beq- ffc0bb40 <_Heap_Walk+0x1cc> ); return false; } if ( ffc0bb14: 7f 9a 48 00 cmpw cr7,r26,r9 ffc0bb18: 41 9e 01 0c beq- cr7,ffc0bc24 <_Heap_Walk+0x2b0> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( ffc0bb1c: 3c a0 ff c2 lis r5,-62 ffc0bb20: 7f 29 03 a6 mtctr r25 ffc0bb24: 7f 03 c3 78 mr r3,r24 ffc0bb28: 38 80 00 01 li r4,1 ffc0bb2c: 38 a5 aa 18 addi r5,r5,-21992 ffc0bb30: 4c c6 31 82 crclr 4*cr1+eq ffc0bb34: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bb38: 38 60 00 00 li r3,0 ffc0bb3c: 4b ff fe c8 b ffc0ba04 <_Heap_Walk+0x90> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( ffc0bb40: 3c a0 ff c2 lis r5,-62 ffc0bb44: 7f 29 03 a6 mtctr r25 ffc0bb48: 7f 03 c3 78 mr r3,r24 ffc0bb4c: 38 80 00 01 li r4,1 ffc0bb50: 38 a5 aa 00 addi r5,r5,-22016 ffc0bb54: 4c c6 31 82 crclr 4*cr1+eq ffc0bb58: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bb5c: 38 60 00 00 li r3,0 ffc0bb60: 4b ff fe a4 b ffc0ba04 <_Heap_Walk+0x90> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); ffc0bb64: 3c a0 ff c2 lis r5,-62 ffc0bb68: 7f 29 03 a6 mtctr r25 ffc0bb6c: 7f 03 c3 78 mr r3,r24 ffc0bb70: 38 80 00 01 li r4,1 ffc0bb74: 38 a5 a9 44 addi r5,r5,-22204 ffc0bb78: 4c c6 31 82 crclr 4*cr1+eq ffc0bb7c: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bb80: 38 60 00 00 li r3,0 ffc0bb84: 4b ff fe 80 b ffc0ba04 <_Heap_Walk+0x90> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( ffc0bb88: 3c a0 ff c2 lis r5,-62 ffc0bb8c: 7f 29 03 a6 mtctr r25 ffc0bb90: 7f 03 c3 78 mr r3,r24 ffc0bb94: 38 80 00 01 li r4,1 ffc0bb98: 38 a5 a9 58 addi r5,r5,-22184 ffc0bb9c: 7f 66 db 78 mr r6,r27 ffc0bba0: 4c c6 31 82 crclr 4*cr1+eq ffc0bba4: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bba8: 38 60 00 00 li r3,0 ffc0bbac: 4b ff fe 58 b ffc0ba04 <_Heap_Walk+0x90> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( ffc0bbb0: 3c a0 ff c2 lis r5,-62 ffc0bbb4: 7f 29 03 a6 mtctr r25 ffc0bbb8: 7f 03 c3 78 mr r3,r24 ffc0bbbc: 38 80 00 01 li r4,1 ffc0bbc0: 38 a5 a9 78 addi r5,r5,-22152 ffc0bbc4: 7d c6 73 78 mr r6,r14 ffc0bbc8: 4c c6 31 82 crclr 4*cr1+eq ffc0bbcc: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bbd0: 38 60 00 00 li r3,0 ffc0bbd4: 4b ff fe 30 b ffc0ba04 <_Heap_Walk+0x90> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( ffc0bbd8: 3c a0 ff c2 lis r5,-62 ffc0bbdc: 7f 29 03 a6 mtctr r25 ffc0bbe0: 7f 03 c3 78 mr r3,r24 ffc0bbe4: 38 80 00 01 li r4,1 ffc0bbe8: 38 a5 a9 9c addi r5,r5,-22116 ffc0bbec: 7f 46 d3 78 mr r6,r26 ffc0bbf0: 4c c6 31 82 crclr 4*cr1+eq ffc0bbf4: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bbf8: 38 60 00 00 li r3,0 ffc0bbfc: 4b ff fe 08 b ffc0ba04 <_Heap_Walk+0x90> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( ffc0bc00: 3c a0 ff c2 lis r5,-62 ffc0bc04: 7f 29 03 a6 mtctr r25 ffc0bc08: 7f 03 c3 78 mr r3,r24 ffc0bc0c: 38 80 00 01 li r4,1 ffc0bc10: 38 a5 a9 d0 addi r5,r5,-22064 ffc0bc14: 4c c6 31 82 crclr 4*cr1+eq ffc0bc18: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bc1c: 38 60 00 00 li r3,0 ffc0bc20: 4b ff fd e4 b ffc0ba04 <_Heap_Walk+0x90> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0bc24: 80 df 00 08 lwz r6,8(r31) int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; ffc0bc28: 80 9f 00 10 lwz r4,16(r31) const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { ffc0bc2c: 7f 9f 30 00 cmpw cr7,r31,r6 block = next_block; } while ( block != first_block ); return true; } ffc0bc30: 81 3f 00 20 lwz r9,32(r31) const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { ffc0bc34: 41 9e 00 30 beq- cr7,ffc0bc64 <_Heap_Walk+0x2f0> 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; ffc0bc38: 7f 89 30 40 cmplw cr7,r9,r6 ffc0bc3c: 40 9d 03 14 ble- cr7,ffc0bf50 <_Heap_Walk+0x5dc> <== ALWAYS TAKEN if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( ffc0bc40: 3c a0 ff c2 lis r5,-62 ffc0bc44: 7f 29 03 a6 mtctr r25 ffc0bc48: 7f 03 c3 78 mr r3,r24 ffc0bc4c: 38 80 00 01 li r4,1 ffc0bc50: 38 a5 aa 48 addi r5,r5,-21944 ffc0bc54: 4c c6 31 82 crclr 4*cr1+eq ffc0bc58: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bc5c: 38 60 00 00 li r3,0 ffc0bc60: 4b ff fd a4 b ffc0ba04 <_Heap_Walk+0x90> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0bc64: 3e 80 ff c2 lis r20,-62 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( ffc0bc68: 3e a0 ff c2 lis r21,-62 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( ffc0bc6c: 3e 60 ff c2 lis r19,-62 ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0bc70: 7f 5d d3 78 mr r29,r26 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0bc74: 3a 94 ac 64 addi r20,r20,-21404 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( ffc0bc78: 3a b5 ac 4c addi r21,r21,-21428 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)( ffc0bc7c: 3a 73 ab a8 addi r19,r19,-21592 ffc0bc80: 3e 20 ff c2 lis r17,-62 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0bc84: 3e c0 ff c2 lis r22,-62 ffc0bc88: 3d e0 ff c2 lis r15,-62 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( ffc0bc8c: 3e 40 ff c2 lis r18,-62 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0bc90: 57 9c 00 3c rlwinm r28,r28,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); ffc0bc94: 7f dc ea 14 add r30,r28,r29 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0bc98: 7f 89 f0 40 cmplw cr7,r9,r30 ffc0bc9c: 40 9d 00 30 ble- cr7,ffc0bccc <_Heap_Walk+0x358> <== ALWAYS TAKEN Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( ffc0bca0: 3c a0 ff c2 lis r5,-62 ffc0bca4: 7f 03 c3 78 mr r3,r24 ffc0bca8: 38 80 00 01 li r4,1 ffc0bcac: 38 a5 aa e8 addi r5,r5,-21784 return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( ffc0bcb0: 7f a6 eb 78 mr r6,r29 ffc0bcb4: 7f 29 03 a6 mtctr r25 ffc0bcb8: 7f c7 f3 78 mr r7,r30 ffc0bcbc: 4c c6 31 82 crclr 4*cr1+eq ffc0bcc0: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bcc4: 38 60 00 00 li r3,0 ffc0bcc8: 4b ff fd 3c b ffc0ba04 <_Heap_Walk+0x90> ffc0bccc: 81 3f 00 24 lwz r9,36(r31) ffc0bcd0: 7f 89 f0 40 cmplw cr7,r9,r30 ffc0bcd4: 41 bc ff cc blt- cr7,ffc0bca0 <_Heap_Walk+0x32c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0bcd8: 7d 5c db 96 divwu r10,r28,r27 ffc0bcdc: 7d 4a d9 d6 mullw r10,r10,r27 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; ffc0bce0: 7f a9 ba 78 xor r9,r29,r23 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { ffc0bce4: 7f 9c 50 00 cmpw cr7,r28,r10 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; ffc0bce8: 7d 29 00 34 cntlzw r9,r9 ffc0bcec: 55 29 d9 7e rlwinm r9,r9,27,5,31 ffc0bcf0: 69 29 00 01 xori r9,r9,1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { ffc0bcf4: 41 9e 00 5c beq- cr7,ffc0bd50 <_Heap_Walk+0x3dc> ffc0bcf8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bcfc: 40 9e 02 28 bne- cr7,ffc0bf24 <_Heap_Walk+0x5b0> 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; ffc0bd00: 81 3e 00 04 lwz r9,4(r30) ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc0bd04: 71 27 00 01 andi. r7,r9,1 ffc0bd08: 41 82 00 d4 beq- ffc0bddc <_Heap_Walk+0x468> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { ffc0bd0c: 2f 90 00 00 cmpwi cr7,r16,0 ffc0bd10: 41 9e 00 a4 beq- cr7,ffc0bdb4 <_Heap_Walk+0x440> (*printer)( ffc0bd14: 7f 03 c3 78 mr r3,r24 ffc0bd18: 7f 29 03 a6 mtctr r25 ffc0bd1c: 38 80 00 00 li r4,0 ffc0bd20: 7e a5 ab 78 mr r5,r21 ffc0bd24: 7f a6 eb 78 mr r6,r29 ffc0bd28: 7f 87 e3 78 mr r7,r28 ffc0bd2c: 4c c6 31 82 crclr 4*cr1+eq ffc0bd30: 4e 80 04 21 bctrl block->prev_size ); } block = next_block; } while ( block != first_block ); ffc0bd34: 7f 9a f0 00 cmpw cr7,r26,r30 ffc0bd38: 41 9e 01 68 beq- cr7,ffc0bea0 <_Heap_Walk+0x52c> ffc0bd3c: 83 9e 00 04 lwz r28,4(r30) ffc0bd40: 7f dd f3 78 mr r29,r30 ffc0bd44: 81 3f 00 20 lwz r9,32(r31) ffc0bd48: 57 90 07 fe clrlwi r16,r28,31 ffc0bd4c: 4b ff ff 44 b ffc0bc90 <_Heap_Walk+0x31c> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { ffc0bd50: 7f 8e e0 40 cmplw cr7,r14,r28 ffc0bd54: 40 9d 00 3c ble- cr7,ffc0bd90 <_Heap_Walk+0x41c> ffc0bd58: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bd5c: 41 9e ff a4 beq+ cr7,ffc0bd00 <_Heap_Walk+0x38c> <== NEVER TAKEN (*printer)( ffc0bd60: 3c a0 ff c2 lis r5,-62 ffc0bd64: 7f 29 03 a6 mtctr r25 ffc0bd68: 7f 03 c3 78 mr r3,r24 ffc0bd6c: 38 80 00 01 li r4,1 ffc0bd70: 38 a5 ab 48 addi r5,r5,-21688 ffc0bd74: 7f a6 eb 78 mr r6,r29 ffc0bd78: 7f 87 e3 78 mr r7,r28 ffc0bd7c: 7d c8 73 78 mr r8,r14 ffc0bd80: 4c c6 31 82 crclr 4*cr1+eq ffc0bd84: 4e 80 04 21 bctrl block, block_size, min_block_size ); return false; ffc0bd88: 38 60 00 00 li r3,0 ffc0bd8c: 4b ff fc 78 b ffc0ba04 <_Heap_Walk+0x90> } if ( next_block_begin <= block_begin && is_not_last_block ) { ffc0bd90: 7f 9d f0 40 cmplw cr7,r29,r30 ffc0bd94: 41 bc ff 6c blt- cr7,ffc0bd00 <_Heap_Walk+0x38c> ffc0bd98: 2f 89 00 00 cmpwi cr7,r9,0 ffc0bd9c: 41 9e ff 64 beq+ cr7,ffc0bd00 <_Heap_Walk+0x38c> (*printer)( ffc0bda0: 3c a0 ff c2 lis r5,-62 ffc0bda4: 7f 03 c3 78 mr r3,r24 ffc0bda8: 38 80 00 01 li r4,1 ffc0bdac: 38 a5 ab 74 addi r5,r5,-21644 ffc0bdb0: 4b ff ff 00 b ffc0bcb0 <_Heap_Walk+0x33c> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0bdb4: 7f a6 eb 78 mr r6,r29 ffc0bdb8: 81 1d 00 00 lwz r8,0(r29) ffc0bdbc: 7f 03 c3 78 mr r3,r24 ffc0bdc0: 7f 29 03 a6 mtctr r25 ffc0bdc4: 38 80 00 00 li r4,0 ffc0bdc8: 7e 85 a3 78 mr r5,r20 ffc0bdcc: 7f 87 e3 78 mr r7,r28 ffc0bdd0: 4c c6 31 82 crclr 4*cr1+eq ffc0bdd4: 4e 80 04 21 bctrl ffc0bdd8: 4b ff ff 5c b ffc0bd34 <_Heap_Walk+0x3c0> 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 ? ffc0bddc: 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)( ffc0bde0: 81 3f 00 08 lwz r9,8(r31) return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; ffc0bde4: 80 ff 00 0c lwz r7,12(r31) ffc0bde8: 7f 89 40 00 cmpw cr7,r9,r8 ffc0bdec: 41 9e 00 f4 beq- cr7,ffc0bee0 <_Heap_Walk+0x56c> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0bdf0: 7f 9f 40 00 cmpw cr7,r31,r8 ffc0bdf4: 41 9e 00 fc beq- cr7,ffc0bef0 <_Heap_Walk+0x57c> ffc0bdf8: 39 36 ac 18 addi r9,r22,-21480 block->next, block->next == last_free_block ? ffc0bdfc: 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)( ffc0be00: 7f 87 50 00 cmpw cr7,r7,r10 ffc0be04: 41 9e 00 d4 beq- cr7,ffc0bed8 <_Heap_Walk+0x564> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0be08: 7f 9f 50 00 cmpw cr7,r31,r10 ffc0be0c: 41 9e 00 dc beq- cr7,ffc0bee8 <_Heap_Walk+0x574> ffc0be10: 38 f6 ac 18 addi r7,r22,-21480 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)( ffc0be14: 90 e1 00 08 stw r7,8(r1) ffc0be18: 7f 03 c3 78 mr r3,r24 ffc0be1c: 38 80 00 00 li r4,0 ffc0be20: 7f 29 03 a6 mtctr r25 ffc0be24: 7e 65 9b 78 mr r5,r19 ffc0be28: 7f a6 eb 78 mr r6,r29 ffc0be2c: 7f 87 e3 78 mr r7,r28 ffc0be30: 4c c6 31 82 crclr 4*cr1+eq ffc0be34: 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 ) { ffc0be38: 81 1e 00 00 lwz r8,0(r30) ffc0be3c: 7f 9c 40 00 cmpw cr7,r28,r8 ffc0be40: 40 9e 00 68 bne- cr7,ffc0bea8 <_Heap_Walk+0x534> ); return false; } if ( !prev_used ) { ffc0be44: 2f 90 00 00 cmpwi cr7,r16,0 ffc0be48: 41 9e 00 b4 beq- cr7,ffc0befc <_Heap_Walk+0x588> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0be4c: 81 3f 00 08 lwz r9,8(r31) ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { ffc0be50: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0be54: 41 9e 00 24 beq- cr7,ffc0be78 <_Heap_Walk+0x504> <== NEVER TAKEN if ( free_block == block ) { ffc0be58: 7f 9d 48 00 cmpw cr7,r29,r9 ffc0be5c: 40 be 00 0c bne+ cr7,ffc0be68 <_Heap_Walk+0x4f4> ffc0be60: 4b ff fe d4 b ffc0bd34 <_Heap_Walk+0x3c0> ffc0be64: 41 ba fe d0 beq- cr6,ffc0bd34 <_Heap_Walk+0x3c0> return true; } free_block = free_block->next; ffc0be68: 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 ) { ffc0be6c: 7f 9f 48 00 cmpw cr7,r31,r9 if ( free_block == block ) { ffc0be70: 7f 1d 48 00 cmpw cr6,r29,r9 ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { ffc0be74: 40 9e ff f0 bne+ cr7,ffc0be64 <_Heap_Walk+0x4f0> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( ffc0be78: 3c a0 ff c2 lis r5,-62 ffc0be7c: 7f 29 03 a6 mtctr r25 ffc0be80: 7f 03 c3 78 mr r3,r24 ffc0be84: 38 80 00 01 li r4,1 ffc0be88: 38 a5 ac 8c addi r5,r5,-21364 ffc0be8c: 7f a6 eb 78 mr r6,r29 ffc0be90: 4c c6 31 82 crclr 4*cr1+eq ffc0be94: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0be98: 38 60 00 00 li r3,0 ffc0be9c: 4b ff fb 68 b ffc0ba04 <_Heap_Walk+0x90> } block = next_block; } while ( block != first_block ); return true; ffc0bea0: 38 60 00 01 li r3,1 ffc0bea4: 4b ff fb 60 b ffc0ba04 <_Heap_Walk+0x90> " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( ffc0bea8: 3c a0 ff c2 lis r5,-62 ffc0beac: 7f 29 03 a6 mtctr r25 ffc0beb0: 7f 03 c3 78 mr r3,r24 ffc0beb4: 38 80 00 01 li r4,1 ffc0beb8: 38 a5 ab e0 addi r5,r5,-21536 ffc0bebc: 7f a6 eb 78 mr r6,r29 ffc0bec0: 7f 87 e3 78 mr r7,r28 ffc0bec4: 7f c9 f3 78 mr r9,r30 ffc0bec8: 4c c6 31 82 crclr 4*cr1+eq ffc0becc: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bed0: 38 60 00 00 li r3,0 ffc0bed4: 4b ff fb 30 b ffc0ba04 <_Heap_Walk+0x90> 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)( ffc0bed8: 38 f1 a8 94 addi r7,r17,-22380 ffc0bedc: 4b ff ff 38 b ffc0be14 <_Heap_Walk+0x4a0> ffc0bee0: 39 32 a8 78 addi r9,r18,-22408 ffc0bee4: 4b ff ff 18 b ffc0bdfc <_Heap_Walk+0x488> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0bee8: 38 ef a8 a4 addi r7,r15,-22364 ffc0beec: 4b ff ff 28 b ffc0be14 <_Heap_Walk+0x4a0> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0bef0: 3d 40 ff c2 lis r10,-62 ffc0bef4: 39 2a a8 88 addi r9,r10,-22392 ffc0bef8: 4b ff ff 04 b ffc0bdfc <_Heap_Walk+0x488> return false; } if ( !prev_used ) { (*printer)( ffc0befc: 3c a0 ff c2 lis r5,-62 ffc0bf00: 7f 29 03 a6 mtctr r25 ffc0bf04: 7f 03 c3 78 mr r3,r24 ffc0bf08: 38 80 00 01 li r4,1 ffc0bf0c: 38 a5 ac 1c addi r5,r5,-21476 ffc0bf10: 7f a6 eb 78 mr r6,r29 ffc0bf14: 4c c6 31 82 crclr 4*cr1+eq ffc0bf18: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0bf1c: 38 60 00 00 li r3,0 ffc0bf20: 4b ff fa e4 b ffc0ba04 <_Heap_Walk+0x90> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( ffc0bf24: 3c a0 ff c2 lis r5,-62 ffc0bf28: 7f 29 03 a6 mtctr r25 ffc0bf2c: 7f 03 c3 78 mr r3,r24 ffc0bf30: 38 80 00 01 li r4,1 ffc0bf34: 38 a5 ab 18 addi r5,r5,-21736 ffc0bf38: 7f a6 eb 78 mr r6,r29 ffc0bf3c: 7f 87 e3 78 mr r7,r28 ffc0bf40: 4c c6 31 82 crclr 4*cr1+eq ffc0bf44: 4e 80 04 21 bctrl "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; ffc0bf48: 38 60 00 00 li r3,0 ffc0bf4c: 4b ff fa b8 b ffc0ba04 <_Heap_Walk+0x90> 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; ffc0bf50: 80 bf 00 24 lwz r5,36(r31) ffc0bf54: 7f 85 30 40 cmplw cr7,r5,r6 ffc0bf58: 41 bc fc e8 blt- cr7,ffc0bc40 <_Heap_Walk+0x2cc> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0bf5c: 39 46 00 08 addi r10,r6,8 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0bf60: 7d 0a 23 96 divwu r8,r10,r4 ffc0bf64: 7d 08 21 d6 mullw r8,r8,r4 ); return false; } if ( ffc0bf68: 7f 8a 40 00 cmpw cr7,r10,r8 ffc0bf6c: 40 9e 00 cc bne- cr7,ffc0c038 <_Heap_Walk+0x6c4> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0bf70: 81 46 00 04 lwz r10,4(r6) ffc0bf74: 55 4a 00 3c rlwinm r10,r10,0,0,30 block = next_block; } while ( block != first_block ); return true; } ffc0bf78: 7d 46 52 14 add r10,r6,r10 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; ffc0bf7c: 81 4a 00 04 lwz r10,4(r10) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0bf80: 71 47 00 01 andi. r7,r10,1 ffc0bf84: 40 82 00 90 bne- ffc0c014 <_Heap_Walk+0x6a0> <== NEVER TAKEN ffc0bf88: 7f e8 fb 78 mr r8,r31 ffc0bf8c: 7c c3 33 78 mr r3,r6 ffc0bf90: 48 00 00 54 b ffc0bfe4 <_Heap_Walk+0x670> return false; } prev_block = free_block; free_block = free_block->next; ffc0bf94: 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 ) { ffc0bf98: 7f 9f 30 00 cmpw cr7,r31,r6 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0bf9c: 7f 06 48 40 cmplw cr6,r6,r9 ffc0bfa0: 7c 86 28 40 cmplw cr1,r6,r5 ffc0bfa4: 41 be fc c0 beq- cr7,ffc0bc64 <_Heap_Walk+0x2f0> ffc0bfa8: 41 b8 fc 98 blt- cr6,ffc0bc40 <_Heap_Walk+0x2cc> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0bfac: 39 46 00 08 addi r10,r6,8 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0bfb0: 41 a5 fc 90 bgt- cr1,ffc0bc40 <_Heap_Walk+0x2cc> <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc0bfb4: 7c ea 23 96 divwu r7,r10,r4 ffc0bfb8: 7c e7 21 d6 mullw r7,r7,r4 ffc0bfbc: 7c 68 1b 78 mr r8,r3 ); return false; } if ( ffc0bfc0: 7f 8a 38 00 cmpw cr7,r10,r7 ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0bfc4: 7c c3 33 78 mr r3,r6 ); return false; } if ( ffc0bfc8: 40 9e 00 70 bne- cr7,ffc0c038 <_Heap_Walk+0x6c4> - 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; ffc0bfcc: 81 46 00 04 lwz r10,4(r6) ffc0bfd0: 55 4a 00 3c rlwinm r10,r10,0,0,30 block = next_block; } while ( block != first_block ); return true; } ffc0bfd4: 7d 46 52 14 add r10,r6,r10 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; ffc0bfd8: 81 4a 00 04 lwz r10,4(r10) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0bfdc: 71 47 00 01 andi. r7,r10,1 ffc0bfe0: 40 82 00 34 bne- ffc0c014 <_Heap_Walk+0x6a0> ); return false; } if ( free_block->prev != prev_block ) { ffc0bfe4: 80 e6 00 0c lwz r7,12(r6) ffc0bfe8: 7f 87 40 00 cmpw cr7,r7,r8 ffc0bfec: 41 9e ff a8 beq+ cr7,ffc0bf94 <_Heap_Walk+0x620> (*printer)( ffc0bff0: 3c a0 ff c2 lis r5,-62 ffc0bff4: 7f 29 03 a6 mtctr r25 ffc0bff8: 7f 03 c3 78 mr r3,r24 ffc0bffc: 38 80 00 01 li r4,1 ffc0c000: 38 a5 aa b4 addi r5,r5,-21836 ffc0c004: 4c c6 31 82 crclr 4*cr1+eq ffc0c008: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0c00c: 38 60 00 00 li r3,0 ffc0c010: 4b ff f9 f4 b ffc0ba04 <_Heap_Walk+0x90> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( ffc0c014: 3c a0 ff c2 lis r5,-62 ffc0c018: 7f 29 03 a6 mtctr r25 ffc0c01c: 7f 03 c3 78 mr r3,r24 ffc0c020: 38 80 00 01 li r4,1 ffc0c024: 38 a5 aa 98 addi r5,r5,-21864 ffc0c028: 4c c6 31 82 crclr 4*cr1+eq ffc0c02c: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0c030: 38 60 00 00 li r3,0 ffc0c034: 4b ff f9 d0 b ffc0ba04 <_Heap_Walk+0x90> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( ffc0c038: 3c a0 ff c2 lis r5,-62 ffc0c03c: 7f 29 03 a6 mtctr r25 ffc0c040: 7f 03 c3 78 mr r3,r24 ffc0c044: 38 80 00 01 li r4,1 ffc0c048: 38 a5 aa 68 addi r5,r5,-21912 ffc0c04c: 4c c6 31 82 crclr 4*cr1+eq ffc0c050: 4e 80 04 21 bctrl "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0c054: 38 60 00 00 li r3,0 ffc0c058: 4b ff f9 ac b ffc0ba04 <_Heap_Walk+0x90> =============================================================================== ffc0b874 <_Heap_Walk_print>: /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0b874: 94 21 ff 88 stwu r1,-120(r1) ffc0b878: 7c 08 02 a6 mflr r0 ffc0b87c: 7c 6b 1b 78 mr r11,r3 ffc0b880: 90 01 00 7c stw r0,124(r1) ffc0b884: 93 e1 00 74 stw r31,116(r1) ffc0b888: 90 c1 00 1c stw r6,28(r1) ffc0b88c: 90 e1 00 20 stw r7,32(r1) ffc0b890: 91 01 00 24 stw r8,36(r1) ffc0b894: 91 21 00 28 stw r9,40(r1) ffc0b898: 91 41 00 2c stw r10,44(r1) ffc0b89c: 40 86 00 24 bne- cr1,ffc0b8c0 <_Heap_Walk_print+0x4c> <== ALWAYS TAKEN ffc0b8a0: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc0b8a4: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc0b8a8: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc0b8ac: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc0b8b0: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc0b8b4: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc0b8b8: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc0b8bc: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list ap; if ( error ) { ffc0b8c0: 2f 84 00 00 cmpwi cr7,r4,0 { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0b8c4: 7c bf 2b 78 mr r31,r5 va_list ap; if ( error ) { ffc0b8c8: 40 9e 00 58 bne- cr7,ffc0b920 <_Heap_Walk_print+0xac> printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); ffc0b8cc: 3c 60 ff c2 lis r3,-62 ffc0b8d0: 7d 64 5b 78 mr r4,r11 ffc0b8d4: 38 63 a8 6c addi r3,r3,-22420 ffc0b8d8: 4c c6 31 82 crclr 4*cr1+eq ffc0b8dc: 4b ff a5 95 bl ffc05e70 } va_start( ap, fmt ); ffc0b8e0: 39 20 00 03 li r9,3 ffc0b8e4: 99 21 00 08 stb r9,8(r1) ffc0b8e8: 39 20 00 00 li r9,0 vprintk( fmt, ap ); ffc0b8ec: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b8f0: 99 21 00 09 stb r9,9(r1) ffc0b8f4: 39 21 00 80 addi r9,r1,128 vprintk( fmt, ap ); ffc0b8f8: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b8fc: 91 21 00 0c stw r9,12(r1) ffc0b900: 39 21 00 10 addi r9,r1,16 ffc0b904: 91 21 00 10 stw r9,16(r1) vprintk( fmt, ap ); ffc0b908: 4b ff d6 91 bl ffc08f98 va_end( ap ); } ffc0b90c: 80 01 00 7c lwz r0,124(r1) ffc0b910: 83 e1 00 74 lwz r31,116(r1) ffc0b914: 7c 08 03 a6 mtlr r0 ffc0b918: 38 21 00 78 addi r1,r1,120 ffc0b91c: 4e 80 00 20 blr static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { va_list ap; if ( error ) { printk( "FAIL[%d]: ", source ); ffc0b920: 3c 60 ff c2 lis r3,-62 ffc0b924: 7d 64 5b 78 mr r4,r11 ffc0b928: 38 63 a8 60 addi r3,r3,-22432 ffc0b92c: 4c c6 31 82 crclr 4*cr1+eq ffc0b930: 4b ff a5 41 bl ffc05e70 } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b934: 39 20 00 03 li r9,3 ffc0b938: 99 21 00 08 stb r9,8(r1) ffc0b93c: 39 20 00 00 li r9,0 vprintk( fmt, ap ); ffc0b940: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b944: 99 21 00 09 stb r9,9(r1) ffc0b948: 39 21 00 80 addi r9,r1,128 vprintk( fmt, ap ); ffc0b94c: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b950: 91 21 00 0c stw r9,12(r1) ffc0b954: 39 21 00 10 addi r9,r1,16 ffc0b958: 91 21 00 10 stw r9,16(r1) vprintk( fmt, ap ); ffc0b95c: 4b ff d6 3d bl ffc08f98 va_end( ap ); } ffc0b960: 80 01 00 7c lwz r0,124(r1) ffc0b964: 83 e1 00 74 lwz r31,116(r1) ffc0b968: 7c 08 03 a6 mtlr r0 ffc0b96c: 38 21 00 78 addi r1,r1,120 ffc0b970: 4e 80 00 20 blr =============================================================================== ffc0a4cc <_IO_Initialize_all_drivers>: void _IO_Initialize_all_drivers( void ) { ffc0a4cc: 94 21 ff f0 stwu r1,-16(r1) ffc0a4d0: 7c 08 02 a6 mflr r0 ffc0a4d4: 93 c1 00 08 stw r30,8(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc0a4d8: 3f c0 00 00 lis r30,0 ffc0a4dc: 81 3e 28 a4 lwz r9,10404(r30) for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; } void _IO_Initialize_all_drivers( void ) { ffc0a4e0: 90 01 00 14 stw r0,20(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc0a4e4: 2f 89 00 00 cmpwi cr7,r9,0 for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; } void _IO_Initialize_all_drivers( void ) { ffc0a4e8: 93 e1 00 0c stw r31,12(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc0a4ec: 41 9e 00 2c beq- cr7,ffc0a518 <_IO_Initialize_all_drivers+0x4c><== NEVER TAKEN ffc0a4f0: 3b e0 00 00 li r31,0 ffc0a4f4: 3b de 28 a4 addi r30,r30,10404 (void) rtems_io_initialize( major, 0, NULL ); ffc0a4f8: 7f e3 fb 78 mr r3,r31 ffc0a4fc: 38 80 00 00 li r4,0 ffc0a500: 38 a0 00 00 li r5,0 ffc0a504: 48 00 60 ad bl ffc105b0 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc0a508: 81 3e 00 00 lwz r9,0(r30) ffc0a50c: 3b ff 00 01 addi r31,r31,1 ffc0a510: 7f 89 f8 40 cmplw cr7,r9,r31 ffc0a514: 41 9d ff e4 bgt+ cr7,ffc0a4f8 <_IO_Initialize_all_drivers+0x2c> (void) rtems_io_initialize( major, 0, NULL ); } ffc0a518: 80 01 00 14 lwz r0,20(r1) ffc0a51c: 83 c1 00 08 lwz r30,8(r1) ffc0a520: 7c 08 03 a6 mtlr r0 ffc0a524: 83 e1 00 0c lwz r31,12(r1) ffc0a528: 38 21 00 10 addi r1,r1,16 ffc0a52c: 4e 80 00 20 blr =============================================================================== ffc0a3b8 <_IO_Manager_initialization>: #include #include void _IO_Manager_initialization(void) { ffc0a3b8: 94 21 ff e0 stwu r1,-32(r1) uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = rtems_configuration_get_device_driver_table(); ffc0a3bc: 3d 20 ff c2 lis r9,-62 ffc0a3c0: 39 29 ea f8 addi r9,r9,-5384 #include #include void _IO_Manager_initialization(void) { ffc0a3c4: 7c 08 02 a6 mflr r0 ffc0a3c8: 93 a1 00 14 stw r29,20(r1) ffc0a3cc: 93 c1 00 18 stw r30,24(r1) uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = rtems_configuration_get_device_driver_table(); drivers_in_table = rtems_configuration_get_number_of_device_drivers(); number_of_drivers = rtems_configuration_get_maximum_drivers(); ffc0a3d0: 83 a9 00 34 lwz r29,52(r9) rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = rtems_configuration_get_device_driver_table(); drivers_in_table = rtems_configuration_get_number_of_device_drivers(); ffc0a3d4: 83 c9 00 38 lwz r30,56(r9) #include #include void _IO_Manager_initialization(void) { ffc0a3d8: 93 e1 00 1c stw r31,28(r1) /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) ffc0a3dc: 7f 9e e8 40 cmplw cr7,r30,r29 #include #include void _IO_Manager_initialization(void) { ffc0a3e0: 90 01 00 24 stw r0,36(r1) ffc0a3e4: 93 61 00 0c stw r27,12(r1) ffc0a3e8: 93 81 00 10 stw r28,16(r1) uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = rtems_configuration_get_device_driver_table(); ffc0a3ec: 83 e9 00 3c lwz r31,60(r9) /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) ffc0a3f0: 40 9c 00 a8 bge- cr7,ffc0a498 <_IO_Manager_initialization+0xe0> * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ffc0a3f4: 1f 7d 00 18 mulli r27,r29,24 * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( ffc0a3f8: 7f 63 db 78 mr r3,r27 ffc0a3fc: 48 00 3b 99 bl ffc0df94 <_Workspace_Allocate_or_fatal_error> /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) ffc0a400: 3f 80 00 00 lis r28,0 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; ffc0a404: 3d 20 00 00 lis r9,0 /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) ffc0a408: 90 7c 28 a8 stw r3,10408(r28) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( ffc0a40c: 38 80 00 00 li r4,0 ffc0a410: 7f 65 db 78 mr r5,r27 _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; ffc0a414: 93 a9 28 a4 stw r29,10404(r9) memset( ffc0a418: 48 00 9a 59 bl ffc13e70 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc0a41c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0a420: 41 9e 00 54 beq- cr7,ffc0a474 <_IO_Manager_initialization+0xbc><== NEVER TAKEN ffc0a424: 80 fc 28 a8 lwz r7,10408(r28) #include #include #include void _IO_Manager_initialization(void) ffc0a428: 1d 7e 00 18 mulli r11,r30,24 ffc0a42c: 39 00 00 00 li r8,0 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; ffc0a430: 7f e9 fb 78 mr r9,r31 ffc0a434: 7c 69 40 6e lwzux r3,r9,r8 ffc0a438: 7d 47 42 14 add r10,r7,r8 ffc0a43c: 80 c9 00 0c lwz r6,12(r9) ffc0a440: 80 89 00 04 lwz r4,4(r9) ffc0a444: 80 a9 00 08 lwz r5,8(r9) ffc0a448: 7c 67 41 2e stwx r3,r7,r8 ffc0a44c: 39 08 00 18 addi r8,r8,24 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc0a450: 7f 88 58 00 cmpw cr7,r8,r11 _IO_Driver_address_table[index] = driver_table[index]; ffc0a454: 90 8a 00 04 stw r4,4(r10) ffc0a458: 90 aa 00 08 stw r5,8(r10) ffc0a45c: 90 ca 00 0c stw r6,12(r10) ffc0a460: 80 c9 00 10 lwz r6,16(r9) ffc0a464: 81 29 00 14 lwz r9,20(r9) ffc0a468: 90 ca 00 10 stw r6,16(r10) ffc0a46c: 91 2a 00 14 stw r9,20(r10) memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc0a470: 40 9e ff c0 bne+ cr7,ffc0a430 <_IO_Manager_initialization+0x78> _IO_Driver_address_table[index] = driver_table[index]; } ffc0a474: 80 01 00 24 lwz r0,36(r1) ffc0a478: 83 61 00 0c lwz r27,12(r1) ffc0a47c: 7c 08 03 a6 mtlr r0 ffc0a480: 83 81 00 10 lwz r28,16(r1) ffc0a484: 83 a1 00 14 lwz r29,20(r1) ffc0a488: 83 c1 00 18 lwz r30,24(r1) ffc0a48c: 83 e1 00 1c lwz r31,28(r1) ffc0a490: 38 21 00 20 addi r1,r1,32 ffc0a494: 4e 80 00 20 blr ffc0a498: 80 01 00 24 lwz r0,36(r1) * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; ffc0a49c: 3d 20 00 00 lis r9,0 ffc0a4a0: 93 e9 28 a8 stw r31,10408(r9) _IO_Number_of_drivers = number_of_drivers; ffc0a4a4: 3d 20 00 00 lis r9,0 sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; } ffc0a4a8: 7c 08 03 a6 mtlr r0 ffc0a4ac: 83 61 00 0c lwz r27,12(r1) ffc0a4b0: 83 81 00 10 lwz r28,16(r1) ffc0a4b4: 83 a1 00 14 lwz r29,20(r1) ffc0a4b8: 83 e1 00 1c lwz r31,28(r1) * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; _IO_Number_of_drivers = number_of_drivers; ffc0a4bc: 93 c9 28 a4 stw r30,10404(r9) sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; } ffc0a4c0: 83 c1 00 18 lwz r30,24(r1) ffc0a4c4: 38 21 00 20 addi r1,r1,32 ffc0a4c8: 4e 80 00 20 blr =============================================================================== ffc0b370 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0b370: 94 21 ff d8 stwu r1,-40(r1) ffc0b374: 7c 08 02 a6 mflr r0 ffc0b378: 93 e1 00 24 stw r31,36(r1) ffc0b37c: 7c 9f 23 78 mr r31,r4 Internal_errors_t error ) { User_extensions_Fatal_context ctx = { source, is_internal, error }; _User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor ); ffc0b380: 3c 80 ff c1 lis r4,-63 ffc0b384: 93 c1 00 20 stw r30,32(r1) ffc0b388: 38 84 d8 e8 addi r4,r4,-10008 ffc0b38c: 7c 7e 1b 78 mr r30,r3 ffc0b390: 38 61 00 08 addi r3,r1,8 ffc0b394: 93 a1 00 1c stw r29,28(r1) ffc0b398: 7c bd 2b 78 mr r29,r5 ffc0b39c: 90 01 00 2c stw r0,44(r1) Internal_errors_Source source, bool is_internal, Internal_errors_t error ) { User_extensions_Fatal_context ctx = { source, is_internal, error }; ffc0b3a0: 93 c1 00 08 stw r30,8(r1) ffc0b3a4: 9b e1 00 0c stb r31,12(r1) ffc0b3a8: 90 a1 00 10 stw r5,16(r1) _User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor ); ffc0b3ac: 48 00 25 61 bl ffc0d90c <_User_extensions_Iterate> _User_extensions_Fatal( the_source, is_internal, the_error ); _Internal_errors_What_happened.the_source = the_source; ffc0b3b0: 3d 40 00 00 lis r10,0 ffc0b3b4: 39 2a 31 78 addi r9,r10,12664 ffc0b3b8: 93 ca 31 78 stw r30,12664(r10) _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); ffc0b3bc: 7f a3 eb 78 mr r3,r29 ) { _User_extensions_Fatal( the_source, is_internal, the_error ); _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; ffc0b3c0: 9b e9 00 04 stb r31,4(r9) RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; ffc0b3c4: 39 40 00 05 li r10,5 _Internal_errors_What_happened.the_error = the_error; ffc0b3c8: 93 a9 00 08 stw r29,8(r9) ffc0b3cc: 3d 20 00 00 lis r9,0 ffc0b3d0: 91 49 28 90 stw r10,10384(r9) _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); ffc0b3d4: 4b ff 88 35 bl ffc03c08 <_BSP_Fatal_error> ffc0b3d8: 48 00 00 00 b ffc0b3d8 <_Internal_error_Occurred+0x68><== NOT EXECUTED =============================================================================== ffc0b3f0 <_Objects_Allocate>: #endif Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0b3f0: 94 21 ff f0 stwu r1,-16(r1) ffc0b3f4: 7c 08 02 a6 mflr r0 ffc0b3f8: 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 ) ffc0b3fc: 81 23 00 18 lwz r9,24(r3) #endif Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0b400: 93 e1 00 0c stw r31,12(r1) ffc0b404: 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 ) ffc0b408: 2f 89 00 00 cmpwi cr7,r9,0 #endif Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0b40c: 93 c1 00 08 stw r30,8(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 ) ffc0b410: 41 9e 00 88 beq- cr7,ffc0b498 <_Objects_Allocate+0xa8> <== 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 ); ffc0b414: 3b c3 00 20 addi r30,r3,32 ffc0b418: 7f c3 f3 78 mr r3,r30 ffc0b41c: 4b ff f3 e1 bl ffc0a7fc <_Chain_Get> if ( information->auto_extend ) { ffc0b420: 89 3f 00 12 lbz r9,18(r31) ffc0b424: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b428: 41 9e 00 40 beq- cr7,ffc0b468 <_Objects_Allocate+0x78> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { ffc0b42c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b430: 41 9e 00 50 beq- cr7,ffc0b480 <_Objects_Allocate+0x90> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc0b434: a1 03 00 0a lhz r8,10(r3) ffc0b438: a1 3f 00 0a lhz r9,10(r31) _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; ffc0b43c: a1 5f 00 14 lhz r10,20(r31) } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc0b440: 7d 29 40 50 subf r9,r9,r8 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; ffc0b444: a0 ff 00 2c lhz r7,44(r31) if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; ffc0b448: 7d 29 53 96 divwu r9,r9,r10 information->inactive_per_block[ block ]--; ffc0b44c: 81 5f 00 30 lwz r10,48(r31) ffc0b450: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0b454: 7d 0a 48 2e lwzx r8,r10,r9 information->inactive--; ffc0b458: 38 e7 ff ff addi r7,r7,-1 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; ffc0b45c: 39 08 ff ff addi r8,r8,-1 ffc0b460: 7d 0a 49 2e stwx r8,r10,r9 information->inactive--; ffc0b464: b0 ff 00 2c sth r7,44(r31) ); } #endif return the_object; } ffc0b468: 80 01 00 14 lwz r0,20(r1) ffc0b46c: 83 c1 00 08 lwz r30,8(r1) ffc0b470: 7c 08 03 a6 mtlr r0 ffc0b474: 83 e1 00 0c lwz r31,12(r1) ffc0b478: 38 21 00 10 addi r1,r1,16 ffc0b47c: 4e 80 00 20 blr * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); ffc0b480: 7f e3 fb 78 mr r3,r31 ffc0b484: 48 00 00 49 bl ffc0b4cc <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); ffc0b488: 7f c3 f3 78 mr r3,r30 ffc0b48c: 4b ff f3 71 bl ffc0a7fc <_Chain_Get> } if ( the_object ) { ffc0b490: 2c 03 00 00 cmpwi r3,0 ffc0b494: 40 a2 ff a0 bne- ffc0b434 <_Objects_Allocate+0x44> ); } #endif return the_object; } ffc0b498: 80 01 00 14 lwz r0,20(r1) * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) return NULL; ffc0b49c: 38 60 00 00 li r3,0 ); } #endif return the_object; } ffc0b4a0: 83 c1 00 08 lwz r30,8(r1) ffc0b4a4: 7c 08 03 a6 mtlr r0 ffc0b4a8: 83 e1 00 0c lwz r31,12(r1) ffc0b4ac: 38 21 00 10 addi r1,r1,16 ffc0b4b0: 4e 80 00 20 blr =============================================================================== ffc0b4cc <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { ffc0b4cc: 94 21 ff c0 stwu r1,-64(r1) ffc0b4d0: 7c 08 02 a6 mflr r0 ffc0b4d4: 90 01 00 44 stw r0,68(r1) minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0b4d8: 81 23 00 34 lwz r9,52(r3) */ void _Objects_Extend_information( Objects_Information *information ) { ffc0b4dc: 93 41 00 28 stw r26,40(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 ) ffc0b4e0: 2f 89 00 00 cmpwi cr7,r9,0 */ void _Objects_Extend_information( Objects_Information *information ) { ffc0b4e4: 93 61 00 2c stw r27,44(r1) ffc0b4e8: 93 e1 00 3c stw r31,60(r1) ffc0b4ec: 7c 7f 1b 78 mr r31,r3 ffc0b4f0: 92 c1 00 18 stw r22,24(r1) ffc0b4f4: 92 e1 00 1c stw r23,28(r1) ffc0b4f8: 93 01 00 20 stw r24,32(r1) ffc0b4fc: 93 21 00 24 stw r25,36(r1) ffc0b500: 93 81 00 30 stw r28,48(r1) ffc0b504: 93 a1 00 34 stw r29,52(r1) ffc0b508: 93 c1 00 38 stw r30,56(r1) /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); ffc0b50c: a3 63 00 0a lhz r27,10(r3) ffc0b510: a3 43 00 10 lhz r26,16(r3) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0b514: 41 9e 02 74 beq- cr7,ffc0b788 <_Objects_Extend_information+0x2bc> block_count = 0; else { block_count = information->maximum / information->allocation_size; ffc0b518: a1 03 00 14 lhz r8,20(r3) ffc0b51c: 7f 9a 43 96 divwu r28,r26,r8 for ( ; block < block_count; block++ ) { ffc0b520: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0b524: 41 9e 02 bc beq- cr7,ffc0b7e0 <_Objects_Extend_information+0x314><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) { ffc0b528: 81 49 00 00 lwz r10,0(r9) ffc0b52c: 7d 07 43 78 mr r7,r8 /* * 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 ); ffc0b530: 7f 7e db 78 mr r30,r27 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { ffc0b534: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0b538: 41 9e 02 bc beq- cr7,ffc0b7f4 <_Objects_Extend_information+0x328><== NEVER TAKEN * 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; ffc0b53c: 3b a0 00 00 li r29,0 ffc0b540: 7f 89 03 a6 mtctr r28 ffc0b544: 48 00 00 10 b ffc0b554 <_Objects_Extend_information+0x88> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { ffc0b548: 85 49 00 04 lwzu r10,4(r9) ffc0b54c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0b550: 41 9e 02 0c beq- cr7,ffc0b75c <_Objects_Extend_information+0x290> do_extend = false; break; } else index_base += information->allocation_size; ffc0b554: 7f de 42 14 add r30,r30,r8 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { ffc0b558: 3b bd 00 01 addi r29,r29,1 ffc0b55c: 42 00 ff ec bdnz+ ffc0b548 <_Objects_Extend_information+0x7c> /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; ffc0b560: 3b 20 00 01 li r25,1 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; ffc0b564: 7f 5a 3a 14 add r26,r26,r7 /* * 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 ) { ffc0b568: 2b 9a ff ff cmplwi cr7,r26,65535 ffc0b56c: 41 9d 01 b8 bgt- cr7,ffc0b724 <_Objects_Extend_information+0x258> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { ffc0b570: 89 3f 00 12 lbz r9,18(r31) /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; ffc0b574: 80 7f 00 18 lwz r3,24(r31) if ( information->auto_extend ) { ffc0b578: 2f 89 00 00 cmpwi cr7,r9,0 /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; ffc0b57c: 7c 67 19 d6 mullw r3,r7,r3 if ( information->auto_extend ) { ffc0b580: 41 9e 01 e4 beq- cr7,ffc0b764 <_Objects_Extend_information+0x298> new_object_block = _Workspace_Allocate( block_size ); ffc0b584: 48 00 29 e9 bl ffc0df6c <_Workspace_Allocate> if ( !new_object_block ) ffc0b588: 7c 77 1b 79 mr. r23,r3 ffc0b58c: 41 82 01 98 beq- ffc0b724 <_Objects_Extend_information+0x258> } /* * Do we need to grow the tables? */ if ( do_extend ) { ffc0b590: 2f 99 00 00 cmpwi cr7,r25,0 ffc0b594: 41 9e 01 0c beq- cr7,ffc0b6a0 <_Objects_Extend_information+0x1d4> * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); if ( information->auto_extend ) { ffc0b598: 89 3f 00 12 lbz r9,18(r31) */ /* * Up the block count and maximum */ block_count++; ffc0b59c: 3a dc 00 01 addi r22,r28,1 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ffc0b5a0: 1c 76 00 03 mulli r3,r22,3 ((maximum + minimum_index) * sizeof(Objects_Control *)); if ( information->auto_extend ) { ffc0b5a4: 2f 89 00 00 cmpwi cr7,r9,0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); ffc0b5a8: 7c 7a 1a 14 add r3,r26,r3 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ffc0b5ac: 7c 63 da 14 add r3,r3,r27 block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * ffc0b5b0: 54 63 10 3a rlwinm r3,r3,2,0,29 (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); if ( information->auto_extend ) { ffc0b5b4: 40 9e 01 bc bne- cr7,ffc0b770 <_Objects_Extend_information+0x2a4> if ( !object_blocks ) { _Workspace_Free( new_object_block ); return; } } else { object_blocks = _Workspace_Allocate_or_fatal_error( block_size ); ffc0b5b8: 48 00 29 dd bl ffc0df94 <_Workspace_Allocate_or_fatal_error> ffc0b5bc: 7c 79 1b 78 mr r25,r3 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc0b5c0: a1 3f 00 10 lhz r9,16(r31) /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( object_blocks, block_count * sizeof(void*) ); ffc0b5c4: 56 d6 10 3a rlwinm r22,r22,2,0,29 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); ffc0b5c8: 7f 19 b2 14 add r24,r25,r22 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc0b5cc: 7f 9b 48 40 cmplw cr7,r27,r9 ffc0b5d0: 7e d8 b2 14 add r22,r24,r22 ffc0b5d4: 41 9c 01 cc blt- cr7,ffc0b7a0 <_Objects_Extend_information+0x2d4> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0b5d8: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0b5dc: 41 9e 00 28 beq- cr7,ffc0b604 <_Objects_Extend_information+0x138><== NEVER TAKEN local_table[ index ] = NULL; ffc0b5e0: 57 68 10 3a rlwinm r8,r27,2,0,29 ffc0b5e4: 39 08 ff fc addi r8,r8,-4 ffc0b5e8: 55 08 f0 be rlwinm r8,r8,30,2,31 ffc0b5ec: 39 08 00 01 addi r8,r8,1 ffc0b5f0: 7d 09 03 a6 mtctr r8 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc0b5f4: 39 36 ff fc addi r9,r22,-4 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; ffc0b5f8: 39 40 00 00 li r10,0 ffc0b5fc: 95 49 00 04 stwu r10,4(r9) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0b600: 42 00 ff fc bdnz+ ffc0b5fc <_Objects_Extend_information+0x130> ffc0b604: 57 9c 10 3a rlwinm r28,r28,2,0,29 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc0b608: a1 5f 00 14 lhz r10,20(r31) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc0b60c: 39 20 00 00 li r9,0 ffc0b610: 7d 39 e1 2e stwx r9,r25,r28 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc0b614: 7d 1e 52 14 add r8,r30,r10 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; ffc0b618: 7f 9e 40 40 cmplw cr7,r30,r8 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; ffc0b61c: 7d 38 e1 2e stwx r9,r24,r28 for ( index=index_base ; ffc0b620: 40 9c 00 34 bge- cr7,ffc0b654 <_Objects_Extend_information+0x188><== NEVER TAKEN * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc0b624: 55 47 10 3a rlwinm r7,r10,2,0,29 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc0b628: 38 e7 ff fc addi r7,r7,-4 ffc0b62c: 54 e7 f0 be rlwinm r7,r7,30,2,31 ffc0b630: 38 e7 00 01 addi r7,r7,1 ffc0b634: 7c e9 03 a6 mtctr r7 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc0b638: 57 c8 10 3a rlwinm r8,r30,2,0,29 ffc0b63c: 7d 16 42 14 add r8,r22,r8 ffc0b640: 39 20 00 00 li r9,0 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc0b644: 39 40 00 00 li r10,0 ffc0b648: 7d 48 49 2e stwx r10,r8,r9 ffc0b64c: 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 ; ffc0b650: 42 00 ff f8 bdnz+ ffc0b648 <_Objects_Extend_information+0x17c> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0b654: 7d 40 00 a6 mfmsr r10 ffc0b658: 7d 30 42 a6 mfsprg r9,0 ffc0b65c: 7d 49 48 78 andc r9,r10,r9 ffc0b660: 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) | ffc0b664: 81 3f 00 00 lwz r9,0(r31) information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( ffc0b668: a1 1f 00 04 lhz r8,4(r31) ffc0b66c: 55 29 c0 0e rlwinm r9,r9,24,0,7 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; ffc0b670: 80 7f 00 34 lwz r3,52(r31) (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc0b674: 55 08 d8 08 rlwinm r8,r8,27,0,4 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; ffc0b678: 93 1f 00 30 stw r24,48(r31) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc0b67c: 65 29 00 01 oris r9,r9,1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc0b680: 7d 29 43 78 or r9,r9,r8 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; ffc0b684: 93 3f 00 34 stw r25,52(r31) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc0b688: 7d 29 d3 78 or r9,r9,r26 information->inactive_per_block = inactive_per_block; information->local_table = local_table; ffc0b68c: 92 df 00 1c stw r22,28(r31) information->maximum = (Objects_Maximum) maximum; ffc0b690: b3 5f 00 10 sth r26,16(r31) information->maximum_id = _Objects_Build_id( ffc0b694: 91 3f 00 0c stw r9,12(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0b698: 7d 40 01 24 mtmsr r10 information->maximum ); _ISR_Enable( level ); _Workspace_Free( old_tables ); ffc0b69c: 48 00 28 e9 bl ffc0df84 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc0b6a0: 81 3f 00 34 lwz r9,52(r31) ffc0b6a4: 57 bd 10 3a rlwinm r29,r29,2,0,29 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0b6a8: a0 bf 00 14 lhz r5,20(r31) ffc0b6ac: 38 61 00 08 addi r3,r1,8 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc0b6b0: 7e e9 e9 2e stwx r23,r9,r29 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0b6b4: 3b 9f 00 20 addi r28,r31,32 information->object_blocks[ block ] = new_object_block; /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0b6b8: 81 3f 00 34 lwz r9,52(r31) ffc0b6bc: 80 df 00 18 lwz r6,24(r31) ffc0b6c0: 7c 89 e8 2e lwzx r4,r9,r29 ffc0b6c4: 4b ff f1 79 bl ffc0a83c <_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 ) { ffc0b6c8: 48 00 00 2c b ffc0b6f4 <_Objects_Extend_information+0x228> ffc0b6cc: 81 5f 00 00 lwz r10,0(r31) the_object->id = _Objects_Build_id( ffc0b6d0: a1 1f 00 04 lhz r8,4(r31) ffc0b6d4: 55 4a c0 0e rlwinm r10,r10,24,0,7 ffc0b6d8: 65 4a 00 01 oris r10,r10,1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc0b6dc: 55 08 d8 08 rlwinm r8,r8,27,0,4 ffc0b6e0: 7d 4a 43 78 or r10,r10,r8 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc0b6e4: 7d 4a f3 78 or r10,r10,r30 ffc0b6e8: 91 49 00 08 stw r10,8(r9) index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; ffc0b6ec: 3b de 00 01 addi r30,r30,1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0b6f0: 4b ff f0 dd bl ffc0a7cc <_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 ) { ffc0b6f4: 38 61 00 08 addi r3,r1,8 ffc0b6f8: 4b ff f1 05 bl ffc0a7fc <_Chain_Get> ffc0b6fc: 7c 69 1b 79 mr. r9,r3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0b700: 7f 83 e3 78 mr r3,r28 ffc0b704: 7d 24 4b 78 mr r4,r9 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { ffc0b708: 40 82 ff c4 bne+ ffc0b6cc <_Objects_Extend_information+0x200> index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); ffc0b70c: a1 1f 00 2c lhz r8,44(r31) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0b710: a1 3f 00 14 lhz r9,20(r31) ffc0b714: 81 5f 00 30 lwz r10,48(r31) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); ffc0b718: 7d 09 42 14 add r8,r9,r8 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0b71c: 7d 2a e9 2e stwx r9,r10,r29 information->inactive = ffc0b720: b1 1f 00 2c sth r8,44(r31) (Objects_Maximum)(information->inactive + information->allocation_size); } ffc0b724: 80 01 00 44 lwz r0,68(r1) ffc0b728: 82 c1 00 18 lwz r22,24(r1) ffc0b72c: 7c 08 03 a6 mtlr r0 ffc0b730: 82 e1 00 1c lwz r23,28(r1) ffc0b734: 83 01 00 20 lwz r24,32(r1) ffc0b738: 83 21 00 24 lwz r25,36(r1) ffc0b73c: 83 41 00 28 lwz r26,40(r1) ffc0b740: 83 61 00 2c lwz r27,44(r1) ffc0b744: 83 81 00 30 lwz r28,48(r1) ffc0b748: 83 a1 00 34 lwz r29,52(r1) ffc0b74c: 83 c1 00 38 lwz r30,56(r1) ffc0b750: 83 e1 00 3c lwz r31,60(r1) ffc0b754: 38 21 00 40 addi r1,r1,64 ffc0b758: 4e 80 00 20 blr else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; ffc0b75c: 3b 20 00 00 li r25,0 ffc0b760: 4b ff fe 04 b ffc0b564 <_Objects_Extend_information+0x98> if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); ffc0b764: 48 00 28 31 bl ffc0df94 <_Workspace_Allocate_or_fatal_error> ffc0b768: 7c 77 1b 78 mr r23,r3 ffc0b76c: 4b ff fe 24 b ffc0b590 <_Objects_Extend_information+0xc4> */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); if ( information->auto_extend ) { object_blocks = _Workspace_Allocate( block_size ); ffc0b770: 48 00 27 fd bl ffc0df6c <_Workspace_Allocate> if ( !object_blocks ) { ffc0b774: 7c 79 1b 79 mr. r25,r3 ffc0b778: 40 82 fe 48 bne+ ffc0b5c0 <_Objects_Extend_information+0xf4> _Workspace_Free( new_object_block ); ffc0b77c: 7e e3 bb 78 mr r3,r23 ffc0b780: 48 00 28 05 bl ffc0df84 <_Workspace_Free> ffc0b784: 4b ff ff a0 b ffc0b724 <_Objects_Extend_information+0x258> ffc0b788: a0 e3 00 14 lhz r7,20(r3) /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); ffc0b78c: 7f 7e db 78 mr r30,r27 /* * 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; ffc0b790: 3b 20 00 01 li r25,1 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc0b794: 3b a0 00 00 li r29,0 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; ffc0b798: 3b 80 00 00 li r28,0 ffc0b79c: 4b ff fd c8 b ffc0b564 <_Objects_Extend_information+0x98> * separate parts as size of each block has changed. */ memcpy( object_blocks, information->object_blocks, block_count * sizeof(void*) ); ffc0b7a0: 57 9c 10 3a rlwinm r28,r28,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, ffc0b7a4: 80 9f 00 34 lwz r4,52(r31) ffc0b7a8: 7f 85 e3 78 mr r5,r28 ffc0b7ac: 7f 23 cb 78 mr r3,r25 ffc0b7b0: 48 00 85 cd bl ffc13d7c information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, ffc0b7b4: 80 9f 00 30 lwz r4,48(r31) ffc0b7b8: 7f 85 e3 78 mr r5,r28 ffc0b7bc: 7f 03 c3 78 mr r3,r24 ffc0b7c0: 48 00 85 bd bl ffc13d7c information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); ffc0b7c4: a0 bf 00 10 lhz r5,16(r31) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc0b7c8: 80 9f 00 1c lwz r4,28(r31) ffc0b7cc: 7e c3 b3 78 mr r3,r22 information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); ffc0b7d0: 7c a5 da 14 add r5,r5,r27 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc0b7d4: 54 a5 10 3a rlwinm r5,r5,2,0,29 ffc0b7d8: 48 00 85 a5 bl ffc13d7c ffc0b7dc: 4b ff fe 2c b ffc0b608 <_Objects_Extend_information+0x13c> ffc0b7e0: 7d 07 43 78 mr r7,r8 <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); ffc0b7e4: 7f 7e db 78 mr r30,r27 <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; ffc0b7e8: 3b 20 00 01 li r25,1 <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc0b7ec: 3b a0 00 00 li r29,0 <== NOT EXECUTED ffc0b7f0: 4b ff fd 74 b ffc0b564 <_Objects_Extend_information+0x98><== NOT EXECUTED else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; ffc0b7f4: 3b 20 00 00 li r25,0 <== NOT EXECUTED * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc0b7f8: 3b a0 00 00 li r29,0 <== NOT EXECUTED ffc0b7fc: 4b ff fd 68 b ffc0b564 <_Objects_Extend_information+0x98><== NOT EXECUTED =============================================================================== ffc0b8cc <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc0b8cc: 94 21 ff f0 stwu r1,-16(r1) ffc0b8d0: 7c 08 02 a6 mflr r0 ffc0b8d4: 93 e1 00 0c stw r31,12(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc0b8d8: 7c 9f 23 79 mr. r31,r4 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc0b8dc: 90 01 00 14 stw r0,20(r1) ffc0b8e0: 93 c1 00 08 stw r30,8(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc0b8e4: 41 82 00 68 beq- ffc0b94c <_Objects_Get_information+0x80> ffc0b8e8: 7c 7e 1b 78 mr r30,r3 /* * 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 ); ffc0b8ec: 48 00 52 95 bl ffc10b80 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) ffc0b8f0: 2c 03 00 00 cmpwi r3,0 ffc0b8f4: 41 82 00 58 beq- ffc0b94c <_Objects_Get_information+0x80> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) ffc0b8f8: 7f 83 f8 40 cmplw cr7,r3,r31 ffc0b8fc: 41 9c 00 50 blt- cr7,ffc0b94c <_Objects_Get_information+0x80> return NULL; if ( !_Objects_Information_table[ the_api ] ) ffc0b900: 3d 20 00 00 lis r9,0 ffc0b904: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc0b908: 39 29 2c 78 addi r9,r9,11384 ffc0b90c: 7d 29 f0 2e lwzx r9,r9,r30 ffc0b910: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b914: 41 9e 00 38 beq- cr7,ffc0b94c <_Objects_Get_information+0x80><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; ffc0b918: 57 ff 10 3a rlwinm r31,r31,2,0,29 ffc0b91c: 7c 69 f8 2e lwzx r3,r9,r31 if ( !info ) ffc0b920: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b924: 41 9e 00 28 beq- cr7,ffc0b94c <_Objects_Get_information+0x80><== 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 ) ffc0b928: a1 23 00 10 lhz r9,16(r3) ffc0b92c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b930: 41 9e 00 1c beq- cr7,ffc0b94c <_Objects_Get_information+0x80> return NULL; #endif return info; } ffc0b934: 80 01 00 14 lwz r0,20(r1) ffc0b938: 83 c1 00 08 lwz r30,8(r1) ffc0b93c: 7c 08 03 a6 mtlr r0 ffc0b940: 83 e1 00 0c lwz r31,12(r1) ffc0b944: 38 21 00 10 addi r1,r1,16 ffc0b948: 4e 80 00 20 blr ffc0b94c: 80 01 00 14 lwz r0,20(r1) { Objects_Information *info; int the_class_api_maximum; if ( !the_class ) return NULL; ffc0b950: 38 60 00 00 li r3,0 if ( info->maximum == 0 ) return NULL; #endif return info; } ffc0b954: 83 c1 00 08 lwz r30,8(r1) ffc0b958: 7c 08 03 a6 mtlr r0 ffc0b95c: 83 e1 00 0c lwz r31,12(r1) ffc0b960: 38 21 00 10 addi r1,r1,16 ffc0b964: 4e 80 00 20 blr =============================================================================== ffc1b7f0 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { ffc1b7f0: 94 21 ff d8 stwu r1,-40(r1) ffc1b7f4: 7c 08 02 a6 mflr r0 ffc1b7f8: 93 a1 00 1c stw r29,28(r1) char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) ffc1b7fc: 7c 9d 23 79 mr. r29,r4 char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { ffc1b800: 90 01 00 2c stw r0,44(r1) ffc1b804: 93 81 00 18 stw r28,24(r1) ffc1b808: 93 c1 00 20 stw r30,32(r1) ffc1b80c: 93 e1 00 24 stw r31,36(r1) char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) ffc1b810: 41 82 00 44 beq- ffc1b854 <_Objects_Get_name_as_string+0x64> return NULL; if ( name == NULL ) ffc1b814: 2f 85 00 00 cmpwi cr7,r5,0 ffc1b818: 7c bf 2b 78 mr r31,r5 ffc1b81c: 41 9e 00 38 beq- cr7,ffc1b854 <_Objects_Get_name_as_string+0x64> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc1b820: 2f 83 00 00 cmpwi cr7,r3,0 ffc1b824: 7c 7e 1b 78 mr r30,r3 ffc1b828: 41 9e 01 18 beq- cr7,ffc1b940 <_Objects_Get_name_as_string+0x150> information = _Objects_Get_information_id( tmpId ); ffc1b82c: 7f c3 f3 78 mr r3,r30 ffc1b830: 4b ff 6e 41 bl ffc12670 <_Objects_Get_information_id> if ( !information ) ffc1b834: 7c 7c 1b 79 mr. r28,r3 ffc1b838: 41 82 00 1c beq- ffc1b854 <_Objects_Get_name_as_string+0x64> return NULL; the_object = _Objects_Get( information, tmpId, &location ); ffc1b83c: 7f c4 f3 78 mr r4,r30 ffc1b840: 38 a1 00 10 addi r5,r1,16 ffc1b844: 4b ff 6f 49 bl ffc1278c <_Objects_Get> switch ( location ) { ffc1b848: 81 21 00 10 lwz r9,16(r1) ffc1b84c: 2f 89 00 00 cmpwi cr7,r9,0 ffc1b850: 41 9e 00 2c beq- cr7,ffc1b87c <_Objects_Get_name_as_string+0x8c> _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } ffc1b854: 80 01 00 2c lwz r0,44(r1) #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; ffc1b858: 3b e0 00 00 li r31,0 _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } ffc1b85c: 7f e3 fb 78 mr r3,r31 ffc1b860: 83 81 00 18 lwz r28,24(r1) ffc1b864: 7c 08 03 a6 mtlr r0 ffc1b868: 83 a1 00 1c lwz r29,28(r1) ffc1b86c: 83 c1 00 20 lwz r30,32(r1) ffc1b870: 83 e1 00 24 lwz r31,36(r1) ffc1b874: 38 21 00 28 addi r1,r1,40 ffc1b878: 4e 80 00 20 blr return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { ffc1b87c: 89 3c 00 38 lbz r9,56(r28) ffc1b880: 2f 89 00 00 cmpwi cr7,r9,0 ffc1b884: 40 9e 00 cc bne- cr7,ffc1b950 <_Objects_Get_name_as_string+0x160> s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; ffc1b888: 81 43 00 0c lwz r10,12(r3) lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; ffc1b88c: 99 21 00 0c stb r9,12(r1) #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; ffc1b890: 55 48 84 3e rlwinm r8,r10,16,16,31 lname[ 2 ] = (u32_name >> 8) & 0xff; ffc1b894: 55 49 c2 3e rlwinm r9,r10,24,8,31 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; ffc1b898: 99 01 00 09 stb r8,9(r1) } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; ffc1b89c: 55 47 46 3e rlwinm r7,r10,8,24,31 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; ffc1b8a0: 99 21 00 0a stb r9,10(r1) lname[ 3 ] = (u32_name >> 0) & 0xff; ffc1b8a4: 99 41 00 0b stb r10,11(r1) } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; ffc1b8a8: 98 e1 00 08 stb r7,8(r1) lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; s = lname; ffc1b8ac: 38 e1 00 08 addi r7,r1,8 } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc1b8b0: 2f 9d 00 01 cmpwi cr7,r29,1 ffc1b8b4: 41 9e 00 a8 beq- cr7,ffc1b95c <_Objects_Get_name_as_string+0x16c><== NEVER TAKEN ffc1b8b8: 89 27 00 00 lbz r9,0(r7) ffc1b8bc: 2f 89 00 00 cmpwi cr7,r9,0 ffc1b8c0: 41 9e 00 9c beq- cr7,ffc1b95c <_Objects_Get_name_as_string+0x16c> ffc1b8c4: 3d 60 00 00 lis r11,0 *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc1b8c8: 3b bd ff ff addi r29,r29,-1 * This method objects the name of an object and returns its name * in the form of a C string. It attempts to be careful about * overflowing the user's string and about returning unprintable characters. */ char *_Objects_Get_name_as_string( ffc1b8cc: 7f ea fb 78 mr r10,r31 } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc1b8d0: 7f a9 03 a6 mtctr r29 ffc1b8d4: 39 6b 29 c4 addi r11,r11,10692 ffc1b8d8: 38 c0 ff 97 li r6,-105 ffc1b8dc: 48 00 00 10 b ffc1b8ec <_Objects_Get_name_as_string+0xfc> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc1b8e0: 8d 27 00 01 lbzu r9,1(r7) ffc1b8e4: 2f 89 00 00 cmpwi cr7,r9,0 ffc1b8e8: 41 9e 00 28 beq- cr7,ffc1b910 <_Objects_Get_name_as_string+0x120> *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc1b8ec: 81 0b 00 00 lwz r8,0(r11) ffc1b8f0: 7d 08 4a 14 add r8,r8,r9 ffc1b8f4: 89 08 00 01 lbz r8,1(r8) ffc1b8f8: 7d 05 30 39 and. r5,r8,r6 ffc1b8fc: 40 82 00 08 bne- ffc1b904 <_Objects_Get_name_as_string+0x114> ffc1b900: 39 20 00 2a li r9,42 ffc1b904: 99 2a 00 00 stb r9,0(r10) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc1b908: 39 4a 00 01 addi r10,r10,1 ffc1b90c: 42 00 ff d4 bdnz+ ffc1b8e0 <_Objects_Get_name_as_string+0xf0> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; ffc1b910: 39 20 00 00 li r9,0 ffc1b914: 99 2a 00 00 stb r9,0(r10) _Thread_Enable_dispatch(); ffc1b918: 4b ff 80 09 bl ffc13920 <_Thread_Enable_dispatch> return name; } return NULL; /* unreachable path */ } ffc1b91c: 80 01 00 2c lwz r0,44(r1) ffc1b920: 7f e3 fb 78 mr r3,r31 ffc1b924: 83 81 00 18 lwz r28,24(r1) ffc1b928: 7c 08 03 a6 mtlr r0 ffc1b92c: 83 a1 00 1c lwz r29,28(r1) ffc1b930: 83 c1 00 20 lwz r30,32(r1) ffc1b934: 83 e1 00 24 lwz r31,36(r1) ffc1b938: 38 21 00 28 addi r1,r1,40 ffc1b93c: 4e 80 00 20 blr return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc1b940: 3d 20 00 00 lis r9,0 ffc1b944: 81 29 3a f0 lwz r9,15088(r9) ffc1b948: 83 c9 00 08 lwz r30,8(r9) ffc1b94c: 4b ff fe e0 b ffc1b82c <_Objects_Get_name_as_string+0x3c> case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { s = the_object->name.name_p; ffc1b950: 80 e3 00 0c lwz r7,12(r3) lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { ffc1b954: 2f 87 00 00 cmpwi cr7,r7,0 ffc1b958: 40 9e ff 58 bne+ cr7,ffc1b8b0 <_Objects_Get_name_as_string+0xc0> for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc1b95c: 7f ea fb 78 mr r10,r31 } } *d = '\0'; ffc1b960: 39 20 00 00 li r9,0 ffc1b964: 99 2a 00 00 stb r9,0(r10) _Thread_Enable_dispatch(); ffc1b968: 4b ff 7f b9 bl ffc13920 <_Thread_Enable_dispatch> ffc1b96c: 4b ff ff b0 b ffc1b91c <_Objects_Get_name_as_string+0x12c> =============================================================================== ffc1f050 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { ffc1f050: 94 21 ff e8 stwu r1,-24(r1) ffc1f054: 7c 08 02 a6 mflr r0 ffc1f058: 93 a1 00 0c stw r29,12(r1) Objects_Control *object; Objects_Id next_id; if ( !information ) ffc1f05c: 7c 7d 1b 79 mr. r29,r3 Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { ffc1f060: 90 01 00 1c stw r0,28(r1) ffc1f064: 93 81 00 08 stw r28,8(r1) ffc1f068: 93 c1 00 10 stw r30,16(r1) ffc1f06c: 93 e1 00 14 stw r31,20(r1) Objects_Control *object; Objects_Id next_id; if ( !information ) ffc1f070: 41 82 00 d8 beq- ffc1f148 <_Objects_Get_next+0xf8> return NULL; if ( !location_p ) ffc1f074: 2f 85 00 00 cmpwi cr7,r5,0 ffc1f078: 7c be 2b 78 mr r30,r5 ffc1f07c: 41 9e 00 cc beq- cr7,ffc1f148 <_Objects_Get_next+0xf8> return NULL; if ( !next_id_p ) ffc1f080: 2f 86 00 00 cmpwi cr7,r6,0 ffc1f084: 7c dc 33 78 mr r28,r6 ffc1f088: 41 9e 00 c0 beq- cr7,ffc1f148 <_Objects_Get_next+0xf8> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) ffc1f08c: 54 89 04 3e clrlwi r9,r4,16 ffc1f090: 2f 89 00 00 cmpwi cr7,r9,0 next_id = information->minimum_id; else next_id = id; ffc1f094: 7c 9f 23 78 mr r31,r4 return NULL; if ( !next_id_p ) return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) ffc1f098: 41 9e 00 58 beq- cr7,ffc1f0f0 <_Objects_Get_next+0xa0> else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc1f09c: a1 5d 00 10 lhz r10,16(r29) ffc1f0a0: 57 e9 04 3e clrlwi r9,r31,16 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc1f0a4: 7f e4 fb 78 mr r4,r31 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc1f0a8: 7f 8a 48 40 cmplw cr7,r10,r9 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc1f0ac: 7f a3 eb 78 mr r3,r29 ffc1f0b0: 7f c5 f3 78 mr r5,r30 next_id++; ffc1f0b4: 3b ff 00 01 addi r31,r31,1 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc1f0b8: 41 9c 00 5c blt- cr7,ffc1f114 <_Objects_Get_next+0xc4> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc1f0bc: 4b ff 36 d1 bl ffc1278c <_Objects_Get> next_id++; } while (*location_p != OBJECTS_LOCAL); ffc1f0c0: 81 3e 00 00 lwz r9,0(r30) ffc1f0c4: 2f 89 00 00 cmpwi cr7,r9,0 ffc1f0c8: 40 9e ff d4 bne+ cr7,ffc1f09c <_Objects_Get_next+0x4c> *next_id_p = next_id; ffc1f0cc: 93 fc 00 00 stw r31,0(r28) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } ffc1f0d0: 80 01 00 1c lwz r0,28(r1) ffc1f0d4: 83 81 00 08 lwz r28,8(r1) ffc1f0d8: 7c 08 03 a6 mtlr r0 ffc1f0dc: 83 a1 00 0c lwz r29,12(r1) ffc1f0e0: 83 c1 00 10 lwz r30,16(r1) ffc1f0e4: 83 e1 00 14 lwz r31,20(r1) ffc1f0e8: 38 21 00 18 addi r1,r1,24 ffc1f0ec: 4e 80 00 20 blr if ( !next_id_p ) return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) next_id = information->minimum_id; ffc1f0f0: 83 fd 00 08 lwz r31,8(r29) *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc1f0f4: 7f a3 eb 78 mr r3,r29 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc1f0f8: a1 5d 00 10 lhz r10,16(r29) *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc1f0fc: 7f c5 f3 78 mr r5,r30 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc1f100: 57 e9 04 3e clrlwi r9,r31,16 ffc1f104: 7f 8a 48 40 cmplw cr7,r10,r9 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); ffc1f108: 7f e4 fb 78 mr r4,r31 next_id++; ffc1f10c: 3b ff 00 01 addi r31,r31,1 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) ffc1f110: 40 9c ff ac bge+ cr7,ffc1f0bc <_Objects_Get_next+0x6c> <== ALWAYS TAKEN return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } ffc1f114: 80 01 00 1c lwz r0,28(r1) do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; ffc1f118: 39 20 00 01 li r9,1 ffc1f11c: 91 3e 00 00 stw r9,0(r30) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; ffc1f120: 39 20 ff ff li r9,-1 return 0; } ffc1f124: 7c 08 03 a6 mtlr r0 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; ffc1f128: 38 60 00 00 li r3,0 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; ffc1f12c: 91 3c 00 00 stw r9,0(r28) return 0; } ffc1f130: 83 81 00 08 lwz r28,8(r1) ffc1f134: 83 a1 00 0c lwz r29,12(r1) ffc1f138: 83 c1 00 10 lwz r30,16(r1) ffc1f13c: 83 e1 00 14 lwz r31,20(r1) ffc1f140: 38 21 00 18 addi r1,r1,24 ffc1f144: 4e 80 00 20 blr { Objects_Control *object; Objects_Id next_id; if ( !information ) return NULL; ffc1f148: 38 60 00 00 li r3,0 ffc1f14c: 4b ff ff 84 b ffc1f0d0 <_Objects_Get_next+0x80> =============================================================================== ffc20960 <_Objects_Get_no_protection>: /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; ffc20960: 81 23 00 08 lwz r9,8(r3) if ( information->maximum >= index ) { ffc20964: a1 43 00 10 lhz r10,16(r3) /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; ffc20968: 21 29 00 01 subfic r9,r9,1 ffc2096c: 7c 89 22 14 add r4,r9,r4 if ( information->maximum >= index ) { ffc20970: 7f 84 50 40 cmplw cr7,r4,r10 ffc20974: 41 9d 00 24 bgt- cr7,ffc20998 <_Objects_Get_no_protection+0x38> if ( (the_object = information->local_table[ index ]) != NULL ) { ffc20978: 81 23 00 1c lwz r9,28(r3) ffc2097c: 54 84 10 3a rlwinm r4,r4,2,0,29 ffc20980: 7c 69 20 2e lwzx r3,r9,r4 ffc20984: 2f 83 00 00 cmpwi cr7,r3,0 ffc20988: 41 9e 00 10 beq- cr7,ffc20998 <_Objects_Get_no_protection+0x38><== NEVER TAKEN *location = OBJECTS_LOCAL; ffc2098c: 39 20 00 00 li r9,0 ffc20990: 91 25 00 00 stw r9,0(r5) return the_object; ffc20994: 4e 80 00 20 blr /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; ffc20998: 39 20 00 01 li r9,1 ffc2099c: 91 25 00 00 stw r9,0(r5) return NULL; ffc209a0: 38 60 00 00 li r3,0 } ffc209a4: 4e 80 00 20 blr =============================================================================== ffc1281c <_Objects_Id_to_name>: /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc1281c: 7c 69 1b 79 mr. r9,r3 Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc12820: 94 21 ff e0 stwu r1,-32(r1) ffc12824: 7c 08 02 a6 mflr r0 ffc12828: 93 e1 00 1c stw r31,28(r1) ffc1282c: 7c 9f 23 78 mr r31,r4 ffc12830: 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; ffc12834: 40 82 00 10 bne- ffc12844 <_Objects_Id_to_name+0x28> ffc12838: 3d 20 00 00 lis r9,0 ffc1283c: 81 29 3a f0 lwz r9,15088(r9) ffc12840: 81 29 00 08 lwz r9,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); ffc12844: 55 2a 47 7e rlwinm r10,r9,8,29,31 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) ffc12848: 39 0a ff ff addi r8,r10,-1 ffc1284c: 2b 88 00 02 cmplwi cr7,r8,2 ffc12850: 41 9d 00 38 bgt- cr7,ffc12888 <_Objects_Id_to_name+0x6c> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) ffc12854: 3d 00 00 00 lis r8,0 ffc12858: 55 4a 10 3a rlwinm r10,r10,2,0,29 ffc1285c: 39 08 35 78 addi r8,r8,13688 ffc12860: 7d 48 50 2e lwzx r10,r8,r10 ffc12864: 2f 8a 00 00 cmpwi cr7,r10,0 ffc12868: 41 9e 00 20 beq- cr7,ffc12888 <_Objects_Id_to_name+0x6c> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; ffc1286c: 55 28 3e 7a rlwinm r8,r9,7,25,29 ffc12870: 7c 6a 40 2e lwzx r3,r10,r8 if ( !information ) ffc12874: 2f 83 00 00 cmpwi cr7,r3,0 ffc12878: 41 9e 00 10 beq- cr7,ffc12888 <_Objects_Id_to_name+0x6c><== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) ffc1287c: 89 43 00 38 lbz r10,56(r3) ffc12880: 2f 8a 00 00 cmpwi cr7,r10,0 ffc12884: 41 9e 00 1c beq- cr7,ffc128a0 <_Objects_Id_to_name+0x84><== ALWAYS TAKEN tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; ffc12888: 38 60 00 03 li r3,3 return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } ffc1288c: 80 01 00 24 lwz r0,36(r1) ffc12890: 83 e1 00 1c lwz r31,28(r1) ffc12894: 7c 08 03 a6 mtlr r0 ffc12898: 38 21 00 20 addi r1,r1,32 ffc1289c: 4e 80 00 20 blr #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); ffc128a0: 7d 24 4b 78 mr r4,r9 ffc128a4: 38 a1 00 08 addi r5,r1,8 ffc128a8: 4b ff fe e5 bl ffc1278c <_Objects_Get> if ( !the_object ) ffc128ac: 2c 03 00 00 cmpwi r3,0 ffc128b0: 41 a2 ff d8 beq- ffc12888 <_Objects_Id_to_name+0x6c> return OBJECTS_INVALID_ID; *name = the_object->name; ffc128b4: 81 23 00 0c lwz r9,12(r3) ffc128b8: 91 3f 00 00 stw r9,0(r31) _Thread_Enable_dispatch(); ffc128bc: 48 00 10 65 bl ffc13920 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; ffc128c0: 38 60 00 00 li r3,0 ffc128c4: 4b ff ff c8 b ffc1288c <_Objects_Id_to_name+0x70> =============================================================================== ffc0bc1c <_Objects_Shrink_information>: #include void _Objects_Shrink_information( Objects_Information *information ) { ffc0bc1c: 94 21 ff e8 stwu r1,-24(r1) ffc0bc20: 7c 08 02 a6 mflr r0 ffc0bc24: 90 01 00 1c stw r0,28(r1) ffc0bc28: 93 e1 00 14 stw r31,20(r1) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / ffc0bc2c: a0 e3 00 10 lhz r7,16(r3) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); ffc0bc30: a3 e3 00 0a lhz r31,10(r3) block_count = (information->maximum - index_base) / ffc0bc34: a1 43 00 14 lhz r10,20(r3) ffc0bc38: 7c ff 38 50 subf r7,r31,r7 #include void _Objects_Shrink_information( Objects_Information *information ) { ffc0bc3c: 93 81 00 08 stw r28,8(r1) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / ffc0bc40: 7c e7 53 96 divwu r7,r7,r10 #include void _Objects_Shrink_information( Objects_Information *information ) { ffc0bc44: 93 a1 00 0c stw r29,12(r1) ffc0bc48: 93 c1 00 10 stw r30,16(r1) index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0bc4c: 2f 87 00 00 cmpwi cr7,r7,0 #include void _Objects_Shrink_information( Objects_Information *information ) { ffc0bc50: 7c 7c 1b 78 mr r28,r3 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0bc54: 41 9e 00 3c beq- cr7,ffc0bc90 <_Objects_Shrink_information+0x74><== NEVER TAKEN if ( information->inactive_per_block[ block ] == ffc0bc58: 81 03 00 30 lwz r8,48(r3) ffc0bc5c: 81 28 00 00 lwz r9,0(r8) ffc0bc60: 7f 8a 48 00 cmpw cr7,r10,r9 ffc0bc64: 41 9e 00 4c beq- cr7,ffc0bcb0 <_Objects_Shrink_information+0x94><== NEVER TAKEN index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0bc68: 39 20 00 00 li r9,0 ffc0bc6c: 7c e9 03 a6 mtctr r7 ffc0bc70: 48 00 00 14 b ffc0bc84 <_Objects_Shrink_information+0x68> if ( information->inactive_per_block[ block ] == ffc0bc74: 84 e8 00 04 lwzu r7,4(r8) #include #include #include #include void _Objects_Shrink_information( ffc0bc78: 55 3d 10 3a rlwinm r29,r9,2,0,29 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == ffc0bc7c: 7f 8a 38 00 cmpw cr7,r10,r7 ffc0bc80: 41 9e 00 34 beq- cr7,ffc0bcb4 <_Objects_Shrink_information+0x98> index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0bc84: 39 29 00 01 addi r9,r9,1 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; ffc0bc88: 7f ff 52 14 add r31,r31,r10 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0bc8c: 42 00 ff e8 bdnz+ ffc0bc74 <_Objects_Shrink_information+0x58> return; } index_base += information->allocation_size; } } ffc0bc90: 80 01 00 1c lwz r0,28(r1) ffc0bc94: 83 81 00 08 lwz r28,8(r1) ffc0bc98: 7c 08 03 a6 mtlr r0 ffc0bc9c: 83 a1 00 0c lwz r29,12(r1) ffc0bca0: 83 c1 00 10 lwz r30,16(r1) ffc0bca4: 83 e1 00 14 lwz r31,20(r1) ffc0bca8: 38 21 00 18 addi r1,r1,24 ffc0bcac: 4e 80 00 20 blr index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == ffc0bcb0: 3b a0 00 00 li r29,0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0bcb4: 80 7c 00 20 lwz r3,32(r28) ffc0bcb8: 48 00 00 10 b ffc0bcc8 <_Objects_Shrink_information+0xac> if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); ffc0bcbc: 2f 9e 00 00 cmpwi cr7,r30,0 index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; ffc0bcc0: 7f c3 f3 78 mr r3,r30 if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); ffc0bcc4: 41 9e 00 34 beq- cr7,ffc0bcf8 <_Objects_Shrink_information+0xdc> * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); do { index = _Objects_Get_index( the_object->id ); ffc0bcc8: a1 43 00 0a lhz r10,10(r3) /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; ffc0bccc: 83 c3 00 00 lwz r30,0(r3) if ((index >= index_base) && ffc0bcd0: 7f 8a f8 40 cmplw cr7,r10,r31 ffc0bcd4: 41 bc ff e8 blt- cr7,ffc0bcbc <_Objects_Shrink_information+0xa0> (index < (index_base + information->allocation_size))) { ffc0bcd8: a1 1c 00 14 lhz r8,20(r28) ffc0bcdc: 7d 1f 42 14 add r8,r31,r8 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && ffc0bce0: 7f 8a 40 40 cmplw cr7,r10,r8 ffc0bce4: 40 9c ff d8 bge+ cr7,ffc0bcbc <_Objects_Shrink_information+0xa0> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); ffc0bce8: 48 00 49 09 bl ffc105f0 <_Chain_Extract> } } while ( the_object ); ffc0bcec: 2f 9e 00 00 cmpwi cr7,r30,0 index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; ffc0bcf0: 7f c3 f3 78 mr r3,r30 if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); ffc0bcf4: 40 9e ff d4 bne+ cr7,ffc0bcc8 <_Objects_Shrink_information+0xac><== ALWAYS TAKEN /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); ffc0bcf8: 81 3c 00 34 lwz r9,52(r28) ffc0bcfc: 7c 69 e8 2e lwzx r3,r9,r29 ffc0bd00: 48 00 22 85 bl ffc0df84 <_Workspace_Free> information->object_blocks[ block ] = NULL; ffc0bd04: 81 3c 00 34 lwz r9,52(r28) return; } index_base += information->allocation_size; } } ffc0bd08: 80 01 00 1c lwz r0,28(r1) _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc0bd0c: a1 1c 00 2c lhz r8,44(r28) return; } index_base += information->allocation_size; } } ffc0bd10: 7c 08 03 a6 mtlr r0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; ffc0bd14: 7f c9 e9 2e stwx r30,r9,r29 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc0bd18: a1 5c 00 14 lhz r10,20(r28) * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; ffc0bd1c: 81 3c 00 30 lwz r9,48(r28) information->inactive -= information->allocation_size; ffc0bd20: 7d 4a 40 50 subf r10,r10,r8 return; } index_base += information->allocation_size; } } ffc0bd24: 83 e1 00 14 lwz r31,20(r1) * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; ffc0bd28: 7f c9 e9 2e stwx r30,r9,r29 information->inactive -= information->allocation_size; ffc0bd2c: b1 5c 00 2c sth r10,44(r28) return; } index_base += information->allocation_size; } } ffc0bd30: 83 a1 00 0c lwz r29,12(r1) ffc0bd34: 83 81 00 08 lwz r28,8(r1) ffc0bd38: 83 c1 00 10 lwz r30,16(r1) ffc0bd3c: 38 21 00 18 addi r1,r1,24 ffc0bd40: 4e 80 00 20 blr =============================================================================== ffc0bbcc <_POSIX_Absolute_timeout_to_ticks>: */ POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks( const struct timespec *abstime, Watchdog_Interval *ticks_out ) { ffc0bbcc: 94 21 ff c8 stwu r1,-56(r1) ffc0bbd0: 7c 08 02 a6 mflr r0 /* * Make sure there is always a value returned. */ *ticks_out = 0; ffc0bbd4: 39 20 00 00 li r9,0 */ POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks( const struct timespec *abstime, Watchdog_Interval *ticks_out ) { ffc0bbd8: 93 81 00 28 stw r28,40(r1) ffc0bbdc: 7c 7c 1b 78 mr r28,r3 ffc0bbe0: 93 a1 00 2c stw r29,44(r1) ffc0bbe4: 7c 9d 23 78 mr r29,r4 ffc0bbe8: 90 01 00 3c stw r0,60(r1) ffc0bbec: 93 c1 00 30 stw r30,48(r1) ffc0bbf0: 93 e1 00 34 stw r31,52(r1) /* * Make sure there is always a value returned. */ *ticks_out = 0; ffc0bbf4: 91 24 00 00 stw r9,0(r4) /* * Is the absolute time even valid? */ if ( !_Timespec_Is_valid(abstime) ) ffc0bbf8: 48 00 51 99 bl ffc10d90 <_Timespec_Is_valid> ffc0bbfc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bc00: 40 9e 00 28 bne- cr7,ffc0bc28 <_POSIX_Absolute_timeout_to_ticks+0x5c> return POSIX_ABSOLUTE_TIMEOUT_INVALID; ffc0bc04: 38 60 00 00 li r3,0 /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; } ffc0bc08: 80 01 00 3c lwz r0,60(r1) ffc0bc0c: 83 81 00 28 lwz r28,40(r1) ffc0bc10: 7c 08 03 a6 mtlr r0 ffc0bc14: 83 a1 00 2c lwz r29,44(r1) ffc0bc18: 83 c1 00 30 lwz r30,48(r1) ffc0bc1c: 83 e1 00 34 lwz r31,52(r1) ffc0bc20: 38 21 00 38 addi r1,r1,56 ffc0bc24: 4e 80 00 20 blr ) { Timestamp_Control tod_as_timestamp; Timestamp_Control *tod_as_timestamp_ptr; tod_as_timestamp_ptr = ffc0bc28: 3c 80 00 00 lis r4,0 ffc0bc2c: 38 84 2c c0 addi r4,r4,11456 ffc0bc30: 38 61 00 18 addi r3,r1,24 ffc0bc34: 48 00 26 41 bl ffc0e274 <_TOD_Get_with_nanoseconds> static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); ffc0bc38: 3c c0 3b 9a lis r6,15258 ffc0bc3c: 83 c3 00 00 lwz r30,0(r3) ffc0bc40: 38 a0 00 00 li r5,0 ffc0bc44: 83 e3 00 04 lwz r31,4(r3) ffc0bc48: 60 c6 ca 00 ori r6,r6,51712 ffc0bc4c: 7f c3 f3 78 mr r3,r30 ffc0bc50: 7f e4 fb 78 mr r4,r31 ffc0bc54: 48 00 f7 01 bl ffc1b354 <__divdi3> _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); ffc0bc58: 3c c0 3b 9a lis r6,15258 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); ffc0bc5c: 90 81 00 10 stw r4,16(r1) _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); ffc0bc60: 38 a0 00 00 li r5,0 ffc0bc64: 60 c6 ca 00 ori r6,r6,51712 ffc0bc68: 7f c3 f3 78 mr r3,r30 ffc0bc6c: 7f e4 fb 78 mr r4,r31 ffc0bc70: 48 00 fb 09 bl ffc1b778 <__moddi3> /* * Is the absolute time in the past? */ _TOD_Get( ¤t_time ); if ( _Timespec_Less_than( abstime, ¤t_time ) ) ffc0bc74: 7f 83 e3 78 mr r3,r28 ffc0bc78: 90 81 00 14 stw r4,20(r1) ffc0bc7c: 38 81 00 10 addi r4,r1,16 ffc0bc80: 48 00 51 51 bl ffc10dd0 <_Timespec_Less_than> ffc0bc84: 2f 83 00 00 cmpwi cr7,r3,0 return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST; ffc0bc88: 38 60 00 01 li r3,1 /* * Is the absolute time in the past? */ _TOD_Get( ¤t_time ); if ( _Timespec_Less_than( abstime, ¤t_time ) ) ffc0bc8c: 40 9e ff 7c bne+ cr7,ffc0bc08 <_POSIX_Absolute_timeout_to_ticks+0x3c> return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST; /* * How long until the requested absolute time? */ _Timespec_Subtract( ¤t_time, abstime, &difference ); ffc0bc90: 7f 84 e3 78 mr r4,r28 ffc0bc94: 38 a1 00 08 addi r5,r1,8 ffc0bc98: 38 61 00 10 addi r3,r1,16 ffc0bc9c: 48 00 51 71 bl ffc10e0c <_Timespec_Subtract> /* * Internally the SuperCore uses ticks, so convert to them. */ *ticks_out = _Timespec_To_ticks( &difference ); ffc0bca0: 38 61 00 08 addi r3,r1,8 ffc0bca4: 48 00 51 b5 bl ffc10e58 <_Timespec_To_ticks> /* * If the difference was 0, then the future is now. It is so bright * we better wear shades. */ if ( !*ticks_out ) ffc0bca8: 2f 83 00 00 cmpwi cr7,r3,0 _Timespec_Subtract( ¤t_time, abstime, &difference ); /* * Internally the SuperCore uses ticks, so convert to them. */ *ticks_out = _Timespec_To_ticks( &difference ); ffc0bcac: 90 7d 00 00 stw r3,0(r29) /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; ffc0bcb0: 38 60 00 03 li r3,3 /* * If the difference was 0, then the future is now. It is so bright * we better wear shades. */ if ( !*ticks_out ) ffc0bcb4: 40 be ff 54 bne- cr7,ffc0bc08 <_POSIX_Absolute_timeout_to_ticks+0x3c><== ALWAYS TAKEN return POSIX_ABSOLUTE_TIMEOUT_IS_NOW; ffc0bcb8: 38 60 00 02 li r3,2 <== NOT EXECUTED ffc0bcbc: 4b ff ff 4c b ffc0bc08 <_POSIX_Absolute_timeout_to_ticks+0x3c><== NOT EXECUTED =============================================================================== ffc127f4 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { ffc127f4: 94 21 ff e0 stwu r1,-32(r1) ffc127f8: 7c 08 02 a6 mflr r0 ffc127fc: 90 01 00 24 stw r0,36(r1) ffc12800: 93 81 00 10 stw r28,16(r1) Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); ffc12804: 83 83 00 08 lwz r28,8(r3) */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { ffc12808: 93 61 00 0c stw r27,12(r1) for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; ffc1280c: 57 9b 56 fa rlwinm r27,r28,10,27,29 */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { ffc12810: 93 c1 00 18 stw r30,24(r1) ffc12814: 3f c0 00 00 lis r30,0 for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; ffc12818: 57 9c 13 ba rlwinm r28,r28,2,14,29 */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { ffc1281c: 93 a1 00 14 stw r29,20(r1) ffc12820: 3b de 30 58 addi r30,r30,12376 for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; ffc12824: 3b 7b 00 10 addi r27,r27,16 */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { ffc12828: 93 e1 00 1c stw r31,28(r1) ffc1282c: 93 41 00 08 stw r26,8(r1) if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; if ( value != NULL ) { key->Values [ thread_api ][ thread_index ] = NULL; ffc12830: 3b 40 00 00 li r26,0 * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; ffc12834: a3 fe 00 10 lhz r31,16(r30) done = true; for ( index = 1 ; index <= max ; ++index ) { ffc12838: 2f 9f 00 00 cmpwi cr7,r31,0 ffc1283c: 40 9e 00 2c bne- cr7,ffc12868 <_POSIX_Keys_Run_destructors+0x74> done = false; } } } } } ffc12840: 80 01 00 24 lwz r0,36(r1) ffc12844: 83 41 00 08 lwz r26,8(r1) ffc12848: 7c 08 03 a6 mtlr r0 ffc1284c: 83 61 00 0c lwz r27,12(r1) ffc12850: 83 81 00 10 lwz r28,16(r1) ffc12854: 83 a1 00 14 lwz r29,20(r1) ffc12858: 83 c1 00 18 lwz r30,24(r1) ffc1285c: 83 e1 00 1c lwz r31,28(r1) ffc12860: 38 21 00 20 addi r1,r1,32 ffc12864: 4e 80 00 20 blr Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { ffc12868: 3b a0 00 01 li r29,1 ffc1286c: 39 40 00 01 li r10,1 POSIX_Keys_Control *key = (POSIX_Keys_Control *) ffc12870: 81 3e 00 1c lwz r9,28(r30) ffc12874: 57 a8 10 3a rlwinm r8,r29,2,0,29 ffc12878: 7d 29 40 2e lwzx r9,r9,r8 _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { ffc1287c: 2f 89 00 00 cmpwi cr7,r9,0 void *value = key->Values [ thread_api ][ thread_index ]; ffc12880: 7d 09 da 14 add r8,r9,r27 for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { ffc12884: 41 9e 00 34 beq- cr7,ffc128b8 <_POSIX_Keys_Run_destructors+0xc4> ffc12888: 80 e9 00 10 lwz r7,16(r9) ffc1288c: 2f 87 00 00 cmpwi cr7,r7,0 ffc12890: 41 9e 00 28 beq- cr7,ffc128b8 <_POSIX_Keys_Run_destructors+0xc4> void *value = key->Values [ thread_api ][ thread_index ]; ffc12894: 81 08 00 04 lwz r8,4(r8) ffc12898: 7c 68 e0 2e lwzx r3,r8,r28 if ( value != NULL ) { ffc1289c: 2f 83 00 00 cmpwi cr7,r3,0 ffc128a0: 41 9e 00 18 beq- cr7,ffc128b8 <_POSIX_Keys_Run_destructors+0xc4><== ALWAYS TAKEN key->Values [ thread_api ][ thread_index ] = NULL; ffc128a4: 7f 48 e1 2e stwx r26,r8,r28 <== NOT EXECUTED (*key->destructor)( value ); ffc128a8: 81 29 00 10 lwz r9,16(r9) <== NOT EXECUTED ffc128ac: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED ffc128b0: 4e 80 04 21 bctrl <== NOT EXECUTED done = false; ffc128b4: 39 40 00 00 li r10,0 <== NOT EXECUTED Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { ffc128b8: 3b bd 00 01 addi r29,r29,1 ffc128bc: 57 bd 04 3e clrlwi r29,r29,16 ffc128c0: 7f 9f e8 40 cmplw cr7,r31,r29 ffc128c4: 40 bc ff ac bge- cr7,ffc12870 <_POSIX_Keys_Run_destructors+0x7c> * number of iterations. An infinite loop may happen if destructors set * thread specific data. This can be considered dubious. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { ffc128c8: 2f 8a 00 00 cmpwi cr7,r10,0 ffc128cc: 41 9e ff 68 beq+ cr7,ffc12834 <_POSIX_Keys_Run_destructors+0x40><== NEVER TAKEN ffc128d0: 4b ff ff 70 b ffc12840 <_POSIX_Keys_Run_destructors+0x4c> =============================================================================== ffc0f758 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { ffc0f758: 94 21 ff d0 stwu r1,-48(r1) ffc0f75c: 7c 08 02 a6 mflr r0 ffc0f760: 93 e1 00 2c stw r31,44(r1) ffc0f764: 7c 7f 1b 78 mr r31,r3 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( ffc0f768: 3c 60 00 00 lis r3,0 ffc0f76c: 93 81 00 20 stw r28,32(r1) ffc0f770: 38 63 36 4c addi r3,r3,13900 ffc0f774: 7c 9c 23 78 mr r28,r4 ffc0f778: 93 a1 00 24 stw r29,36(r1) ffc0f77c: 7f e4 fb 78 mr r4,r31 ffc0f780: 7c bd 2b 78 mr r29,r5 ffc0f784: 38 a1 00 0c addi r5,r1,12 ffc0f788: 93 41 00 18 stw r26,24(r1) ffc0f78c: 7c fa 3b 78 mr r26,r7 ffc0f790: 93 61 00 1c stw r27,28(r1) ffc0f794: 7d 1b 43 78 mr r27,r8 ffc0f798: 93 c1 00 28 stw r30,40(r1) ffc0f79c: 7c de 33 78 mr r30,r6 ffc0f7a0: 90 01 00 34 stw r0,52(r1) ffc0f7a4: 48 00 40 85 bl ffc13828 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { ffc0f7a8: 81 21 00 0c lwz r9,12(r1) ffc0f7ac: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f7b0: 41 9e 00 3c beq- cr7,ffc0f7ec <_POSIX_Message_queue_Receive_support+0x94> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); ffc0f7b4: 48 00 be b1 bl ffc1b664 <__errno> ffc0f7b8: 39 20 00 09 li r9,9 ffc0f7bc: 91 23 00 00 stw r9,0(r3) ffc0f7c0: 38 60 ff ff li r3,-1 } ffc0f7c4: 80 01 00 34 lwz r0,52(r1) ffc0f7c8: 83 41 00 18 lwz r26,24(r1) ffc0f7cc: 7c 08 03 a6 mtlr r0 ffc0f7d0: 83 61 00 1c lwz r27,28(r1) ffc0f7d4: 83 81 00 20 lwz r28,32(r1) ffc0f7d8: 83 a1 00 24 lwz r29,36(r1) ffc0f7dc: 83 c1 00 28 lwz r30,40(r1) ffc0f7e0: 83 e1 00 2c lwz r31,44(r1) ffc0f7e4: 38 21 00 30 addi r1,r1,48 ffc0f7e8: 4e 80 00 20 blr the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { ffc0f7ec: 81 23 00 14 lwz r9,20(r3) ffc0f7f0: 55 2a 07 be clrlwi r10,r9,30 ffc0f7f4: 2f 8a 00 01 cmpwi cr7,r10,1 ffc0f7f8: 41 9e 00 e8 beq- cr7,ffc0f8e0 <_POSIX_Message_queue_Receive_support+0x188> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; ffc0f7fc: 80 63 00 10 lwz r3,16(r3) if ( msg_len < the_mq->Message_queue.maximum_message_size ) { ffc0f800: 81 43 00 68 lwz r10,104(r3) ffc0f804: 7f 8a e8 40 cmplw cr7,r10,r29 ffc0f808: 41 9d 00 a0 bgt- cr7,ffc0f8a8 <_POSIX_Message_queue_Receive_support+0x150> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) ffc0f80c: 2f 9a 00 00 cmpwi cr7,r26,0 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; ffc0f810: 39 40 ff ff li r10,-1 ffc0f814: 91 41 00 08 stw r10,8(r1) /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) ffc0f818: 38 e0 00 00 li r7,0 ffc0f81c: 40 9e 00 80 bne- cr7,ffc0f89c <_POSIX_Message_queue_Receive_support+0x144> do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( ffc0f820: 7f e4 fb 78 mr r4,r31 ffc0f824: 38 63 00 1c addi r3,r3,28 ffc0f828: 7f 85 e3 78 mr r5,r28 ffc0f82c: 38 c1 00 08 addi r6,r1,8 ffc0f830: 7f 68 db 78 mr r8,r27 ffc0f834: 48 00 2a cd bl ffc12300 <_CORE_message_queue_Seize> ); _Thread_Enable_dispatch(); if (msg_prio) { *msg_prio = _POSIX_Message_queue_Priority_from_core( _Thread_Executing->Wait.count ffc0f838: 3f e0 00 00 lis r31,0 &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); ffc0f83c: 48 00 51 65 bl ffc149a0 <_Thread_Enable_dispatch> if (msg_prio) { ffc0f840: 2f 9e 00 00 cmpwi cr7,r30,0 *msg_prio = _POSIX_Message_queue_Priority_from_core( _Thread_Executing->Wait.count ffc0f844: 3b ff 36 e0 addi r31,r31,14048 ffc0f848: 81 3f 00 10 lwz r9,16(r31) do_wait, timeout ); _Thread_Enable_dispatch(); if (msg_prio) { ffc0f84c: 41 9e 00 18 beq- cr7,ffc0f864 <_POSIX_Message_queue_Receive_support+0x10c><== NEVER TAKEN RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core( CORE_message_queue_Submit_types priority ) { /* absolute value without a library dependency */ return (unsigned int) ((priority >= 0) ? priority : -priority); ffc0f850: 81 49 00 24 lwz r10,36(r9) ffc0f854: 7d 48 fe 70 srawi r8,r10,31 ffc0f858: 7d 0a 52 78 xor r10,r8,r10 ffc0f85c: 7d 48 50 50 subf r10,r8,r10 *msg_prio = _POSIX_Message_queue_Priority_from_core( ffc0f860: 91 5e 00 00 stw r10,0(r30) _Thread_Executing->Wait.count ); } if ( !_Thread_Executing->Wait.return_code ) ffc0f864: 81 29 00 34 lwz r9,52(r9) ffc0f868: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f86c: 40 9e 00 54 bne- cr7,ffc0f8c0 <_POSIX_Message_queue_Receive_support+0x168> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } ffc0f870: 80 01 00 34 lwz r0,52(r1) _Thread_Executing->Wait.count ); } if ( !_Thread_Executing->Wait.return_code ) return length_out; ffc0f874: 80 61 00 08 lwz r3,8(r1) case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } ffc0f878: 7c 08 03 a6 mtlr r0 ffc0f87c: 83 41 00 18 lwz r26,24(r1) ffc0f880: 83 61 00 1c lwz r27,28(r1) ffc0f884: 83 81 00 20 lwz r28,32(r1) ffc0f888: 83 a1 00 24 lwz r29,36(r1) ffc0f88c: 83 c1 00 28 lwz r30,40(r1) ffc0f890: 83 e1 00 2c lwz r31,44(r1) ffc0f894: 38 21 00 30 addi r1,r1,48 ffc0f898: 4e 80 00 20 blr /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; ffc0f89c: 69 29 40 00 xori r9,r9,16384 ffc0f8a0: 55 27 97 fe rlwinm r7,r9,18,31,31 ffc0f8a4: 4b ff ff 7c b ffc0f820 <_POSIX_Message_queue_Receive_support+0xc8> } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); ffc0f8a8: 48 00 50 f9 bl ffc149a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); ffc0f8ac: 48 00 bd b9 bl ffc1b664 <__errno> ffc0f8b0: 39 20 00 7a li r9,122 ffc0f8b4: 91 23 00 00 stw r9,0(r3) ffc0f8b8: 38 60 ff ff li r3,-1 ffc0f8bc: 4b ff ff 08 b ffc0f7c4 <_POSIX_Message_queue_Receive_support+0x6c> } if ( !_Thread_Executing->Wait.return_code ) return length_out; rtems_set_errno_and_return_minus_one( ffc0f8c0: 48 00 bd a5 bl ffc1b664 <__errno> ffc0f8c4: 81 3f 00 10 lwz r9,16(r31) ffc0f8c8: 7c 7e 1b 78 mr r30,r3 ffc0f8cc: 80 69 00 34 lwz r3,52(r9) ffc0f8d0: 48 00 03 51 bl ffc0fc20 <_POSIX_Message_queue_Translate_core_message_queue_return_code> ffc0f8d4: 90 7e 00 00 stw r3,0(r30) ffc0f8d8: 38 60 ff ff li r3,-1 ffc0f8dc: 4b ff fe e8 b ffc0f7c4 <_POSIX_Message_queue_Receive_support+0x6c> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); ffc0f8e0: 48 00 50 c1 bl ffc149a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); ffc0f8e4: 48 00 bd 81 bl ffc1b664 <__errno> ffc0f8e8: 39 20 00 09 li r9,9 ffc0f8ec: 91 23 00 00 stw r9,0(r3) ffc0f8f0: 38 60 ff ff li r3,-1 ffc0f8f4: 4b ff fe d0 b ffc0f7c4 <_POSIX_Message_queue_Receive_support+0x6c> =============================================================================== ffc0f904 <_POSIX_Message_queue_Send_support>: /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) ffc0f904: 2b 86 00 20 cmplwi cr7,r6,32 size_t msg_len, unsigned int msg_prio, bool wait, Watchdog_Interval timeout ) { ffc0f908: 94 21 ff d0 stwu r1,-48(r1) ffc0f90c: 7c 08 02 a6 mflr r0 ffc0f910: 93 e1 00 2c stw r31,44(r1) ffc0f914: 7c df 33 78 mr r31,r6 ffc0f918: 90 01 00 34 stw r0,52(r1) ffc0f91c: 93 41 00 18 stw r26,24(r1) ffc0f920: 93 61 00 1c stw r27,28(r1) ffc0f924: 93 81 00 20 stw r28,32(r1) ffc0f928: 93 a1 00 24 stw r29,36(r1) ffc0f92c: 93 c1 00 28 stw r30,40(r1) /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) ffc0f930: 41 9d 01 14 bgt- cr7,ffc0fa44 <_POSIX_Message_queue_Send_support+0x140> ffc0f934: 7c 7e 1b 78 mr r30,r3 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( ffc0f938: 3c 60 00 00 lis r3,0 ffc0f93c: 7c 9b 23 78 mr r27,r4 ffc0f940: 7c bc 2b 78 mr r28,r5 ffc0f944: 38 63 36 4c addi r3,r3,13900 ffc0f948: 7f c4 f3 78 mr r4,r30 ffc0f94c: 38 a1 00 08 addi r5,r1,8 ffc0f950: 7c fa 3b 78 mr r26,r7 ffc0f954: 7d 1d 43 78 mr r29,r8 ffc0f958: 48 00 3e d1 bl ffc13828 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { ffc0f95c: 81 21 00 08 lwz r9,8(r1) ffc0f960: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f964: 40 9e 00 cc bne- cr7,ffc0fa30 <_POSIX_Message_queue_Send_support+0x12c> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { ffc0f968: 80 c3 00 14 lwz r6,20(r3) ffc0f96c: 70 c9 00 03 andi. r9,r6,3 ffc0f970: 41 82 00 e8 beq- ffc0fa58 <_POSIX_Message_queue_Send_support+0x154> the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) ffc0f974: 2f 9a 00 00 cmpwi cr7,r26,0 if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; ffc0f978: 80 63 00 10 lwz r3,16(r3) /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) ffc0f97c: 39 20 00 00 li r9,0 ffc0f980: 40 9e 00 68 bne- cr7,ffc0f9e8 <_POSIX_Message_queue_Send_support+0xe4> do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( ffc0f984: 7d 1f 00 d0 neg r8,r31 ffc0f988: 7f 64 db 78 mr r4,r27 ffc0f98c: 7f 85 e3 78 mr r5,r28 ffc0f990: 7f c6 f3 78 mr r6,r30 ffc0f994: 38 e0 00 00 li r7,0 ffc0f998: 7f aa eb 78 mr r10,r29 ffc0f99c: 38 63 00 1c addi r3,r3,28 ffc0f9a0: 48 00 2a e9 bl ffc12488 <_CORE_message_queue_Submit> ffc0f9a4: 7c 7f 1b 78 mr r31,r3 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); ffc0f9a8: 48 00 4f f9 bl ffc149a0 <_Thread_Enable_dispatch> * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) ffc0f9ac: 2f 9f 00 07 cmpwi cr7,r31,7 ffc0f9b0: 41 9e 00 70 beq- cr7,ffc0fa20 <_POSIX_Message_queue_Send_support+0x11c><== NEVER TAKEN msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) ffc0f9b4: 2f 9f 00 00 cmpwi cr7,r31,0 return msg_status; ffc0f9b8: 38 60 00 00 li r3,0 */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) ffc0f9bc: 40 9e 00 b4 bne- cr7,ffc0fa70 <_POSIX_Message_queue_Send_support+0x16c> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } ffc0f9c0: 80 01 00 34 lwz r0,52(r1) ffc0f9c4: 83 41 00 18 lwz r26,24(r1) ffc0f9c8: 7c 08 03 a6 mtlr r0 ffc0f9cc: 83 61 00 1c lwz r27,28(r1) ffc0f9d0: 83 81 00 20 lwz r28,32(r1) ffc0f9d4: 83 a1 00 24 lwz r29,36(r1) ffc0f9d8: 83 c1 00 28 lwz r30,40(r1) ffc0f9dc: 83 e1 00 2c lwz r31,44(r1) ffc0f9e0: 38 21 00 30 addi r1,r1,48 ffc0f9e4: 4e 80 00 20 blr /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; ffc0f9e8: 68 c6 40 00 xori r6,r6,16384 ffc0f9ec: 54 c9 97 fe rlwinm r9,r6,18,31,31 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( ffc0f9f0: 7d 1f 00 d0 neg r8,r31 ffc0f9f4: 7f 64 db 78 mr r4,r27 ffc0f9f8: 7f 85 e3 78 mr r5,r28 ffc0f9fc: 7f c6 f3 78 mr r6,r30 ffc0fa00: 38 e0 00 00 li r7,0 ffc0fa04: 7f aa eb 78 mr r10,r29 ffc0fa08: 38 63 00 1c addi r3,r3,28 ffc0fa0c: 48 00 2a 7d bl ffc12488 <_CORE_message_queue_Submit> ffc0fa10: 7c 7f 1b 78 mr r31,r3 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); ffc0fa14: 48 00 4f 8d bl ffc149a0 <_Thread_Enable_dispatch> * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) ffc0fa18: 2f 9f 00 07 cmpwi cr7,r31,7 ffc0fa1c: 40 9e ff 98 bne+ cr7,ffc0f9b4 <_POSIX_Message_queue_Send_support+0xb0> msg_status = _Thread_Executing->Wait.return_code; ffc0fa20: 3d 20 00 00 lis r9,0 ffc0fa24: 81 29 36 f0 lwz r9,14064(r9) ffc0fa28: 83 e9 00 34 lwz r31,52(r9) ffc0fa2c: 4b ff ff 88 b ffc0f9b4 <_POSIX_Message_queue_Send_support+0xb0> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); ffc0fa30: 48 00 bc 35 bl ffc1b664 <__errno> ffc0fa34: 39 20 00 09 li r9,9 ffc0fa38: 91 23 00 00 stw r9,0(r3) ffc0fa3c: 38 60 ff ff li r3,-1 ffc0fa40: 4b ff ff 80 b ffc0f9c0 <_POSIX_Message_queue_Send_support+0xbc> * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc0fa44: 48 00 bc 21 bl ffc1b664 <__errno> ffc0fa48: 39 20 00 16 li r9,22 ffc0fa4c: 91 23 00 00 stw r9,0(r3) ffc0fa50: 38 60 ff ff li r3,-1 ffc0fa54: 4b ff ff 6c b ffc0f9c0 <_POSIX_Message_queue_Send_support+0xbc> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); ffc0fa58: 48 00 4f 49 bl ffc149a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); ffc0fa5c: 48 00 bc 09 bl ffc1b664 <__errno> ffc0fa60: 39 20 00 09 li r9,9 ffc0fa64: 91 23 00 00 stw r9,0(r3) ffc0fa68: 38 60 ff ff li r3,-1 ffc0fa6c: 4b ff ff 54 b ffc0f9c0 <_POSIX_Message_queue_Send_support+0xbc> msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( ffc0fa70: 48 00 bb f5 bl ffc1b664 <__errno> ffc0fa74: 7c 7e 1b 78 mr r30,r3 ffc0fa78: 7f e3 fb 78 mr r3,r31 ffc0fa7c: 48 00 01 a5 bl ffc0fc20 <_POSIX_Message_queue_Translate_core_message_queue_return_code> ffc0fa80: 90 7e 00 00 stw r3,0(r30) ffc0fa84: 38 60 ff ff li r3,-1 ffc0fa88: 4b ff ff 38 b ffc0f9c0 <_POSIX_Message_queue_Send_support+0xbc> =============================================================================== ffc12890 <_POSIX_Semaphore_Create_support>: size_t name_len, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { ffc12890: 94 21 ff d8 stwu r1,-40(r1) ffc12894: 7c 08 02 a6 mflr r0 ffc12898: 93 21 00 0c stw r25,12(r1) POSIX_Semaphore_Control *the_semaphore; CORE_semaphore_Attributes *the_sem_attr; char *name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) ffc1289c: 7c b9 2b 79 mr. r25,r5 size_t name_len, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { ffc128a0: 90 01 00 2c stw r0,44(r1) ffc128a4: 93 41 00 10 stw r26,16(r1) ffc128a8: 93 61 00 14 stw r27,20(r1) ffc128ac: 93 81 00 18 stw r28,24(r1) ffc128b0: 93 a1 00 1c stw r29,28(r1) ffc128b4: 93 c1 00 20 stw r30,32(r1) ffc128b8: 93 e1 00 24 stw r31,36(r1) POSIX_Semaphore_Control *the_semaphore; CORE_semaphore_Attributes *the_sem_attr; char *name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) ffc128bc: 40 82 00 f4 bne- ffc129b0 <_POSIX_Semaphore_Create_support+0x120> * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc128c0: 3d 20 00 00 lis r9,0 ffc128c4: 81 49 28 a8 lwz r10,10408(r9) ffc128c8: 7c 7e 1b 78 mr r30,r3 ffc128cc: 7c 9a 23 78 mr r26,r4 ++level; ffc128d0: 39 4a 00 01 addi r10,r10,1 _Thread_Dispatch_disable_level = level; ffc128d4: 91 49 28 a8 stw r10,10408(r9) ffc128d8: 7c dc 33 78 mr r28,r6 ffc128dc: 7c fb 3b 78 mr r27,r7 * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) ffc128e0: 3f a0 00 00 lis r29,0 ffc128e4: 3b bd 59 00 addi r29,r29,22784 ffc128e8: 7f a3 eb 78 mr r3,r29 ffc128ec: 4b ff ae bd bl ffc0d7a8 <_Objects_Allocate> rtems_set_errno_and_return_minus_one( ENOSYS ); _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { ffc128f0: 7c 7f 1b 79 mr. r31,r3 ffc128f4: 41 82 00 d0 beq- ffc129c4 <_POSIX_Semaphore_Create_support+0x134> /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ if ( name_arg != NULL ) { ffc128f8: 2f 9e 00 00 cmpwi cr7,r30,0 ffc128fc: 41 9e 00 9c beq- cr7,ffc12998 <_POSIX_Semaphore_Create_support+0x108> name = _Workspace_String_duplicate( name_arg, name_len ); ffc12900: 7f 44 d3 78 mr r4,r26 ffc12904: 7f c3 f3 78 mr r3,r30 ffc12908: 48 00 11 1d bl ffc13a24 <_Workspace_String_duplicate> if ( !name ) { ffc1290c: 7c 7a 1b 79 mr. r26,r3 ffc12910: 41 82 00 cc beq- ffc129dc <_POSIX_Semaphore_Create_support+0x14c><== NEVER TAKEN the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = true; the_semaphore->open_count = 1; ffc12914: 39 20 00 01 li r9,1 } } else { name = NULL; } the_semaphore->process_shared = pshared; ffc12918: 93 3f 00 10 stw r25,16(r31) if ( name ) { the_semaphore->named = true; ffc1291c: 39 40 00 01 li r10,1 ffc12920: 99 5f 00 14 stb r10,20(r31) the_semaphore->open_count = 1; ffc12924: 91 3f 00 18 stw r9,24(r31) the_semaphore->linked = true; ffc12928: 99 3f 00 15 stb r9,21(r31) * blocking tasks on this semaphore should be. It could somehow * be derived from the current scheduling policy. One * thing is certain, no matter what we decide, it won't be * the same as all other POSIX implementations. :) */ the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; ffc1292c: 39 20 00 00 li r9,0 ffc12930: 91 3f 00 60 stw r9,96(r31) /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; ffc12934: 39 20 ff ff li r9,-1 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); ffc12938: 38 7f 00 1c addi r3,r31,28 the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; ffc1293c: 91 3f 00 5c stw r9,92(r31) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); ffc12940: 38 9f 00 5c addi r4,r31,92 ffc12944: 7f 85 e3 78 mr r5,r28 ffc12948: 4b ff a7 39 bl ffc0d080 <_CORE_semaphore_Initialize> Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( ffc1294c: a1 3f 00 0a lhz r9,10(r31) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc12950: 81 5d 00 1c lwz r10,28(r29) ffc12954: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc12958: 7f ea 49 2e stwx r31,r10,r9 the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; ffc1295c: 93 5f 00 0c stw r26,12(r31) &_POSIX_Semaphore_Information, &the_semaphore->Object, name ); *the_sem = the_semaphore; ffc12960: 93 fb 00 00 stw r31,0(r27) _Thread_Enable_dispatch(); ffc12964: 4b ff c6 29 bl ffc0ef8c <_Thread_Enable_dispatch> return 0; ffc12968: 38 60 00 00 li r3,0 } ffc1296c: 80 01 00 2c lwz r0,44(r1) ffc12970: 83 21 00 0c lwz r25,12(r1) ffc12974: 7c 08 03 a6 mtlr r0 ffc12978: 83 41 00 10 lwz r26,16(r1) ffc1297c: 83 61 00 14 lwz r27,20(r1) ffc12980: 83 81 00 18 lwz r28,24(r1) ffc12984: 83 a1 00 1c lwz r29,28(r1) ffc12988: 83 c1 00 20 lwz r30,32(r1) ffc1298c: 83 e1 00 24 lwz r31,36(r1) ffc12990: 38 21 00 28 addi r1,r1,40 ffc12994: 4e 80 00 20 blr } } else { name = NULL; } the_semaphore->process_shared = pshared; ffc12998: 93 df 00 10 stw r30,16(r31) _POSIX_Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } } else { name = NULL; ffc1299c: 3b 40 00 00 li r26,0 if ( name ) { the_semaphore->named = true; the_semaphore->open_count = 1; the_semaphore->linked = true; } else { the_semaphore->named = false; ffc129a0: 9b df 00 14 stb r30,20(r31) the_semaphore->open_count = 0; ffc129a4: 93 df 00 18 stw r30,24(r31) the_semaphore->linked = false; ffc129a8: 9b df 00 15 stb r30,21(r31) ffc129ac: 4b ff ff 80 b ffc1292c <_POSIX_Semaphore_Create_support+0x9c> CORE_semaphore_Attributes *the_sem_attr; char *name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS ); ffc129b0: 48 00 2e cd bl ffc1587c <__errno> ffc129b4: 39 20 00 58 li r9,88 ffc129b8: 91 23 00 00 stw r9,0(r3) ffc129bc: 38 60 ff ff li r3,-1 ffc129c0: 4b ff ff ac b ffc1296c <_POSIX_Semaphore_Create_support+0xdc> _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); ffc129c4: 4b ff c5 c9 bl ffc0ef8c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); ffc129c8: 48 00 2e b5 bl ffc1587c <__errno> ffc129cc: 39 20 00 1c li r9,28 ffc129d0: 91 23 00 00 stw r9,0(r3) ffc129d4: 38 60 ff ff li r3,-1 ffc129d8: 4b ff ff 94 b ffc1296c <_POSIX_Semaphore_Create_support+0xdc> RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free ( POSIX_Semaphore_Control *the_semaphore ) { _Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object ); ffc129dc: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc129e0: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc129e4: 4b ff b1 d5 bl ffc0dbb8 <_Objects_Free> <== NOT EXECUTED */ if ( name_arg != NULL ) { name = _Workspace_String_duplicate( name_arg, name_len ); if ( !name ) { _POSIX_Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); ffc129e8: 4b ff c5 a5 bl ffc0ef8c <_Thread_Enable_dispatch> <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); ffc129ec: 48 00 2e 91 bl ffc1587c <__errno> <== NOT EXECUTED ffc129f0: 39 20 00 0c li r9,12 <== NOT EXECUTED ffc129f4: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED ffc129f8: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc129fc: 4b ff ff 70 b ffc1296c <_POSIX_Semaphore_Create_support+0xdc><== NOT EXECUTED =============================================================================== ffc0f5a0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: Thread_Control *the_thread ) { POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0f5a0: 81 23 01 50 lwz r9,336(r3) if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && ffc0f5a4: 81 49 00 d8 lwz r10,216(r9) ffc0f5a8: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0f5ac: 40 9e 00 10 bne- cr7,ffc0f5bc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1c><== NEVER TAKEN ffc0f5b0: 81 49 00 dc lwz r10,220(r9) ffc0f5b4: 2f 8a 00 01 cmpwi cr7,r10,1 ffc0f5b8: 41 9e 00 08 beq- cr7,ffc0f5c0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x20> thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); ffc0f5bc: 4b ff d2 c0 b ffc0c87c <_Thread_Enable_dispatch> POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && ffc0f5c0: 81 29 00 e0 lwz r9,224(r9) ffc0f5c4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f5c8: 41 9e ff f4 beq+ cr7,ffc0f5bc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1c> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc0f5cc: 3d 20 00 00 lis r9,0 ffc0f5d0: 81 49 28 70 lwz r10,10352(r9) thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); ffc0f5d4: 38 80 ff ff li r4,-1 --level; ffc0f5d8: 39 4a ff ff addi r10,r10,-1 _Thread_Dispatch_disable_level = level; ffc0f5dc: 91 49 28 70 stw r10,10352(r9) ffc0f5e0: 48 00 07 dc b ffc0fdbc <_POSIX_Thread_Exit> =============================================================================== ffc10cf0 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { ffc10cf0: 94 21 ff e8 stwu r1,-24(r1) ffc10cf4: 7c 08 02 a6 mflr r0 ffc10cf8: 93 c1 00 10 stw r30,16(r1) ffc10cfc: 7c 7e 1b 78 mr r30,r3 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) ffc10d00: 80 64 00 00 lwz r3,0(r4) int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { ffc10d04: 93 81 00 08 stw r28,8(r1) ffc10d08: 7c dc 33 78 mr r28,r6 ffc10d0c: 93 a1 00 0c stw r29,12(r1) ffc10d10: 7c bd 2b 78 mr r29,r5 ffc10d14: 93 e1 00 14 stw r31,20(r1) ffc10d18: 7c 9f 23 78 mr r31,r4 ffc10d1c: 90 01 00 1c stw r0,28(r1) if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) ffc10d20: 4b ff ff a9 bl ffc10cc8 <_POSIX_Priority_Is_valid> ffc10d24: 2f 83 00 00 cmpwi cr7,r3,0 ffc10d28: 40 9e 00 28 bne- cr7,ffc10d50 <_POSIX_Thread_Translate_sched_param+0x60><== ALWAYS TAKEN return EINVAL; ffc10d2c: 38 60 00 16 li r3,22 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } ffc10d30: 80 01 00 1c lwz r0,28(r1) ffc10d34: 83 81 00 08 lwz r28,8(r1) ffc10d38: 7c 08 03 a6 mtlr r0 ffc10d3c: 83 a1 00 0c lwz r29,12(r1) ffc10d40: 83 c1 00 10 lwz r30,16(r1) ffc10d44: 83 e1 00 14 lwz r31,20(r1) ffc10d48: 38 21 00 18 addi r1,r1,24 ffc10d4c: 4e 80 00 20 blr return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { ffc10d50: 2f 9e 00 00 cmpwi cr7,r30,0 ) { if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; ffc10d54: 39 20 00 00 li r9,0 ffc10d58: 91 3d 00 00 stw r9,0(r29) *budget_callout = NULL; ffc10d5c: 91 3c 00 00 stw r9,0(r28) if ( policy == SCHED_OTHER ) { ffc10d60: 41 9e 00 94 beq- cr7,ffc10df4 <_POSIX_Thread_Translate_sched_param+0x104> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { ffc10d64: 2f 9e 00 01 cmpwi cr7,r30,1 ffc10d68: 41 9e 00 b8 beq- cr7,ffc10e20 <_POSIX_Thread_Translate_sched_param+0x130> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { ffc10d6c: 2f 9e 00 02 cmpwi cr7,r30,2 ffc10d70: 41 9e 00 b8 beq- cr7,ffc10e28 <_POSIX_Thread_Translate_sched_param+0x138> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { ffc10d74: 2f 9e 00 04 cmpwi cr7,r30,4 ffc10d78: 40 9e ff b4 bne+ cr7,ffc10d2c <_POSIX_Thread_Translate_sched_param+0x3c> if ( (param->sched_ss_repl_period.tv_sec == 0) && ffc10d7c: 81 3f 00 08 lwz r9,8(r31) ffc10d80: 2f 89 00 00 cmpwi cr7,r9,0 ffc10d84: 40 9e 00 10 bne- cr7,ffc10d94 <_POSIX_Thread_Translate_sched_param+0xa4> ffc10d88: 81 3f 00 0c lwz r9,12(r31) ffc10d8c: 2f 89 00 00 cmpwi cr7,r9,0 ffc10d90: 41 9e ff 9c beq+ cr7,ffc10d2c <_POSIX_Thread_Translate_sched_param+0x3c> (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && ffc10d94: 81 3f 00 10 lwz r9,16(r31) ffc10d98: 2f 89 00 00 cmpwi cr7,r9,0 ffc10d9c: 40 9e 00 10 bne- cr7,ffc10dac <_POSIX_Thread_Translate_sched_param+0xbc> ffc10da0: 81 3f 00 14 lwz r9,20(r31) ffc10da4: 2f 89 00 00 cmpwi cr7,r9,0 ffc10da8: 41 9e ff 84 beq+ cr7,ffc10d2c <_POSIX_Thread_Translate_sched_param+0x3c> (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < ffc10dac: 38 7f 00 08 addi r3,r31,8 ffc10db0: 4b ff d8 ed bl ffc0e69c <_Timespec_To_ticks> ffc10db4: 7c 7e 1b 78 mr r30,r3 _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) ffc10db8: 38 7f 00 10 addi r3,r31,16 ffc10dbc: 4b ff d8 e1 bl ffc0e69c <_Timespec_To_ticks> if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < ffc10dc0: 7f 9e 18 40 cmplw cr7,r30,r3 ffc10dc4: 41 9c ff 68 blt+ cr7,ffc10d2c <_POSIX_Thread_Translate_sched_param+0x3c> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) ffc10dc8: 80 7f 00 04 lwz r3,4(r31) ffc10dcc: 4b ff fe fd bl ffc10cc8 <_POSIX_Priority_Is_valid> ffc10dd0: 2f 83 00 00 cmpwi cr7,r3,0 ffc10dd4: 41 9e ff 58 beq+ cr7,ffc10d2c <_POSIX_Thread_Translate_sched_param+0x3c> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; ffc10dd8: 39 20 00 03 li r9,3 ffc10ddc: 91 3d 00 00 stw r9,0(r29) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; ffc10de0: 3d 20 ff c1 lis r9,-63 ffc10de4: 39 29 9d 58 addi r9,r9,-25256 return 0; ffc10de8: 38 60 00 00 li r3,0 if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; ffc10dec: 91 3c 00 00 stw r9,0(r28) return 0; ffc10df0: 4b ff ff 40 b ffc10d30 <_POSIX_Thread_Translate_sched_param+0x40> } return EINVAL; } ffc10df4: 80 01 00 1c lwz r0,28(r1) *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; ffc10df8: 39 20 00 01 li r9,1 ffc10dfc: 91 3d 00 00 stw r9,0(r29) return 0; ffc10e00: 38 60 00 00 li r3,0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } ffc10e04: 7c 08 03 a6 mtlr r0 ffc10e08: 83 81 00 08 lwz r28,8(r1) ffc10e0c: 83 a1 00 0c lwz r29,12(r1) ffc10e10: 83 c1 00 10 lwz r30,16(r1) ffc10e14: 83 e1 00 14 lwz r31,20(r1) ffc10e18: 38 21 00 18 addi r1,r1,24 ffc10e1c: 4e 80 00 20 blr return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; ffc10e20: 38 60 00 00 li r3,0 ffc10e24: 4b ff ff 0c b ffc10d30 <_POSIX_Thread_Translate_sched_param+0x40> } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; ffc10e28: 93 dd 00 00 stw r30,0(r29) return 0; ffc10e2c: 38 60 00 00 li r3,0 ffc10e30: 4b ff ff 00 b ffc10d30 <_POSIX_Thread_Translate_sched_param+0x40> =============================================================================== ffc0fd38 <_POSIX_Threads_Delete_extension>: */ static void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { ffc0fd38: 94 21 ff e8 stwu r1,-24(r1) ffc0fd3c: 7c 08 02 a6 mflr r0 api = deleted->API_Extensions[ THREAD_API_POSIX ]; /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); ffc0fd40: 7c 83 23 78 mr r3,r4 */ static void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { ffc0fd44: 93 81 00 08 stw r28,8(r1) ffc0fd48: 93 a1 00 0c stw r29,12(r1) ffc0fd4c: 7c 9d 23 78 mr r29,r4 Thread_Control *the_thread; POSIX_API_Control *api; void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; ffc0fd50: 83 84 01 50 lwz r28,336(r4) */ static void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { ffc0fd54: 90 01 00 1c stw r0,28(r1) ffc0fd58: 93 c1 00 10 stw r30,16(r1) ffc0fd5c: 93 e1 00 14 stw r31,20(r1) api = deleted->API_Extensions[ THREAD_API_POSIX ]; /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); ffc0fd60: 48 00 29 f9 bl ffc12758 <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); ffc0fd64: 7f a3 eb 78 mr r3,r29 ffc0fd68: 48 00 2a 8d bl ffc127f4 <_POSIX_Keys_Run_destructors> ffc0fd6c: 3b fc 00 44 addi r31,r28,68 /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; ffc0fd70: 83 dd 00 28 lwz r30,40(r29) while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) ffc0fd74: 48 00 00 0c b ffc0fd80 <_POSIX_Threads_Delete_extension+0x48> *(void **)the_thread->Wait.return_argument = value_ptr; ffc0fd78: 81 23 00 28 lwz r9,40(r3) <== NOT EXECUTED ffc0fd7c: 93 c9 00 00 stw r30,0(r9) <== NOT EXECUTED /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) ffc0fd80: 7f e3 fb 78 mr r3,r31 ffc0fd84: 4b ff d1 59 bl ffc0cedc <_Thread_queue_Dequeue> ffc0fd88: 2c 03 00 00 cmpwi r3,0 ffc0fd8c: 40 82 ff ec bne+ ffc0fd78 <_POSIX_Threads_Delete_extension+0x40><== NEVER TAKEN *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) ffc0fd90: 81 3c 00 84 lwz r9,132(r28) ffc0fd94: 2f 89 00 04 cmpwi cr7,r9,4 ffc0fd98: 41 9e 00 30 beq- cr7,ffc0fdc8 <_POSIX_Threads_Delete_extension+0x90> (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; _Workspace_Free( api ); } ffc0fd9c: 80 01 00 1c lwz r0,28(r1) *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; ffc0fda0: 39 20 00 00 li r9,0 ffc0fda4: 91 3d 01 50 stw r9,336(r29) _Workspace_Free( api ); ffc0fda8: 7f 83 e3 78 mr r3,r28 } ffc0fdac: 7c 08 03 a6 mtlr r0 ffc0fdb0: 83 81 00 08 lwz r28,8(r1) ffc0fdb4: 83 a1 00 0c lwz r29,12(r1) ffc0fdb8: 83 c1 00 10 lwz r30,16(r1) ffc0fdbc: 83 e1 00 14 lwz r31,20(r1) ffc0fdc0: 38 21 00 18 addi r1,r1,24 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; _Workspace_Free( api ); ffc0fdc4: 4b ff e1 c0 b ffc0df84 <_Workspace_Free> while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); ffc0fdc8: 38 7c 00 a8 addi r3,r28,168 ffc0fdcc: 4b ff de 61 bl ffc0dc2c <_Watchdog_Remove> deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; _Workspace_Free( api ); } ffc0fdd0: 80 01 00 1c lwz r0,28(r1) *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; ffc0fdd4: 39 20 00 00 li r9,0 _Workspace_Free( api ); } ffc0fdd8: 83 c1 00 10 lwz r30,16(r1) ffc0fddc: 7c 08 03 a6 mtlr r0 *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; ffc0fde0: 91 3d 01 50 stw r9,336(r29) _Workspace_Free( api ); ffc0fde4: 7f 83 e3 78 mr r3,r28 } ffc0fde8: 83 a1 00 0c lwz r29,12(r1) ffc0fdec: 83 81 00 08 lwz r28,8(r1) ffc0fdf0: 83 e1 00 14 lwz r31,20(r1) ffc0fdf4: 38 21 00 18 addi r1,r1,24 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; _Workspace_Free( api ); ffc0fdf8: 4b ff e1 8c b ffc0df84 <_Workspace_Free> =============================================================================== ffc09990 <_POSIX_Threads_Initialize_user_threads_body>: #include #include #include void _POSIX_Threads_Initialize_user_threads_body(void) { ffc09990: 94 21 ff 98 stwu r1,-104(r1) ffc09994: 7c 08 02 a6 mflr r0 uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; ffc09998: 3d 20 00 00 lis r9,0 #include #include #include void _POSIX_Threads_Initialize_user_threads_body(void) { ffc0999c: 90 01 00 6c stw r0,108(r1) uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; ffc099a0: 39 29 20 04 addi r9,r9,8196 #include #include #include void _POSIX_Threads_Initialize_user_threads_body(void) { ffc099a4: 93 e1 00 64 stw r31,100(r1) uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; ffc099a8: 83 e9 00 34 lwz r31,52(r9) #include #include #include void _POSIX_Threads_Initialize_user_threads_body(void) { ffc099ac: 93 a1 00 5c stw r29,92(r1) pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; maximum = Configuration_POSIX_API.number_of_initialization_threads; if ( !user_threads || maximum == 0 ) ffc099b0: 2f 9f 00 00 cmpwi cr7,r31,0 #include #include #include void _POSIX_Threads_Initialize_user_threads_body(void) { ffc099b4: 93 c1 00 60 stw r30,96(r1) posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; maximum = Configuration_POSIX_API.number_of_initialization_threads; ffc099b8: 83 a9 00 30 lwz r29,48(r9) if ( !user_threads || maximum == 0 ) ffc099bc: 41 9e 00 5c beq- cr7,ffc09a18 <_POSIX_Threads_Initialize_user_threads_body+0x88><== NEVER TAKEN ffc099c0: 2f 9d 00 00 cmpwi cr7,r29,0 ffc099c4: 41 9e 00 54 beq- cr7,ffc09a18 <_POSIX_Threads_Initialize_user_threads_body+0x88><== NEVER TAKEN ffc099c8: 3b c0 00 00 li r30,0 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); ffc099cc: 38 61 00 08 addi r3,r1,8 ffc099d0: 48 00 74 65 bl ffc10e34 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); ffc099d4: 38 80 00 02 li r4,2 ffc099d8: 38 61 00 08 addi r3,r1,8 ffc099dc: 48 00 74 99 bl ffc10e74 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); ffc099e0: 80 9f 00 04 lwz r4,4(r31) ffc099e4: 38 61 00 08 addi r3,r1,8 ffc099e8: 48 00 74 c9 bl ffc10eb0 status = pthread_create( ffc099ec: 80 bf 00 00 lwz r5,0(r31) ffc099f0: 38 61 00 48 addi r3,r1,72 ffc099f4: 38 81 00 08 addi r4,r1,8 ffc099f8: 38 c0 00 00 li r6,0 ffc099fc: 4b ff fb 51 bl ffc0954c &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) ffc09a00: 7c 65 1b 79 mr. r5,r3 ffc09a04: 40 82 00 30 bne- ffc09a34 <_POSIX_Threads_Initialize_user_threads_body+0xa4> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { ffc09a08: 3b de 00 01 addi r30,r30,1 ffc09a0c: 7f 9e e8 00 cmpw cr7,r30,r29 ffc09a10: 3b ff 00 08 addi r31,r31,8 ffc09a14: 40 9e ff b8 bne+ cr7,ffc099cc <_POSIX_Threads_Initialize_user_threads_body+0x3c><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } ffc09a18: 80 01 00 6c lwz r0,108(r1) ffc09a1c: 83 a1 00 5c lwz r29,92(r1) ffc09a20: 7c 08 03 a6 mtlr r0 ffc09a24: 83 c1 00 60 lwz r30,96(r1) ffc09a28: 83 e1 00 64 lwz r31,100(r1) ffc09a2c: 38 21 00 68 addi r1,r1,104 ffc09a30: 4e 80 00 20 blr &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); ffc09a34: 38 60 00 02 li r3,2 ffc09a38: 38 80 00 01 li r4,1 ffc09a3c: 48 00 28 09 bl ffc0c244 <_Internal_error_Occurred> =============================================================================== ffc0ff60 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { ffc0ff60: 94 21 ff f0 stwu r1,-16(r1) ffc0ff64: 7c 08 02 a6 mflr r0 ffc0ff68: 90 01 00 14 stw r0,20(r1) ffc0ff6c: 93 e1 00 0c stw r31,12(r1) Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0ff70: 83 e4 01 50 lwz r31,336(r4) */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { ffc0ff74: 93 c1 00 08 stw r30,8(r1) ffc0ff78: 7c 9e 23 78 mr r30,r4 the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); ffc0ff7c: 38 7f 00 98 addi r3,r31,152 ffc0ff80: 48 00 0f 6d bl ffc10eec <_Timespec_To_ticks> */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { ffc0ff84: 81 3e 00 1c lwz r9,28(r30) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); ffc0ff88: 3d 40 00 00 lis r10,0 ffc0ff8c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ff90: 88 8a 27 84 lbz r4,10116(r10) ffc0ff94: 81 3f 00 88 lwz r9,136(r31) api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); the_thread->cpu_time_budget = ticks; ffc0ff98: 90 7e 00 74 stw r3,116(r30) ffc0ff9c: 7c 89 20 50 subf r4,r9,r4 new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; ffc0ffa0: 90 9e 00 18 stw r4,24(r30) */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { ffc0ffa4: 40 9e 00 10 bne- cr7,ffc0ffb4 <_POSIX_Threads_Sporadic_budget_TSR+0x54><== NEVER TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { ffc0ffa8: 81 3e 00 14 lwz r9,20(r30) ffc0ffac: 7f 89 20 40 cmplw cr7,r9,r4 ffc0ffb0: 41 9d 00 34 bgt- cr7,ffc0ffe4 <_POSIX_Threads_Sporadic_budget_TSR+0x84> #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); ffc0ffb4: 38 7f 00 90 addi r3,r31,144 ffc0ffb8: 48 00 0f 35 bl ffc10eec <_Timespec_To_ticks> _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } ffc0ffbc: 80 01 00 14 lwz r0,20(r1) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0ffc0: 90 7f 00 b4 stw r3,180(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0ffc4: 38 9f 00 a8 addi r4,r31,168 ffc0ffc8: 7c 08 03 a6 mtlr r0 ffc0ffcc: 3c 60 00 00 lis r3,0 ffc0ffd0: 83 c1 00 08 lwz r30,8(r1) ffc0ffd4: 38 63 2d a8 addi r3,r3,11688 ffc0ffd8: 83 e1 00 0c lwz r31,12(r1) ffc0ffdc: 38 21 00 10 addi r1,r1,16 ffc0ffe0: 4b ff da 84 b ffc0da64 <_Watchdog_Insert> if ( the_thread->resource_count == 0 ) { /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); ffc0ffe4: 7f c3 f3 78 mr r3,r30 ffc0ffe8: 38 a0 00 01 li r5,1 ffc0ffec: 4b ff c4 49 bl ffc0c434 <_Thread_Change_priority> #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); ffc0fff0: 38 7f 00 90 addi r3,r31,144 ffc0fff4: 48 00 0e f9 bl ffc10eec <_Timespec_To_ticks> _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } ffc0fff8: 80 01 00 14 lwz r0,20(r1) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0fffc: 90 7f 00 b4 stw r3,180(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc10000: 38 9f 00 a8 addi r4,r31,168 ffc10004: 7c 08 03 a6 mtlr r0 ffc10008: 3c 60 00 00 lis r3,0 ffc1000c: 83 c1 00 08 lwz r30,8(r1) ffc10010: 38 63 2d a8 addi r3,r3,11688 ffc10014: 83 e1 00 0c lwz r31,12(r1) ffc10018: 38 21 00 10 addi r1,r1,16 ffc1001c: 4b ff da 48 b ffc0da64 <_Watchdog_Insert> =============================================================================== ffc12758 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { ffc12758: 94 21 ff e8 stwu r1,-24(r1) ffc1275c: 7c 08 02 a6 mflr r0 thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; ffc12760: 39 40 00 01 li r10,1 #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { ffc12764: 90 01 00 1c stw r0,28(r1) ffc12768: 93 c1 00 10 stw r30,16(r1) POSIX_Cancel_Handler_control *handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc1276c: 83 c3 01 50 lwz r30,336(r3) #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { ffc12770: 93 a1 00 0c stw r29,12(r1) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc12774: 3b be 00 e8 addi r29,r30,232 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { ffc12778: 81 3e 00 e4 lwz r9,228(r30) #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { ffc1277c: 93 e1 00 14 stw r31,20(r1) handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { ffc12780: 7f 89 e8 00 cmpw cr7,r9,r29 thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; ffc12784: 91 5e 00 d8 stw r10,216(r30) while ( !_Chain_Is_empty( handler_stack ) ) { ffc12788: 41 9e 00 50 beq- cr7,ffc127d8 <_POSIX_Threads_cancel_run+0x80> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1278c: 7d 00 00 a6 mfmsr r8 ffc12790: 7d 30 42 a6 mfsprg r9,0 ffc12794: 7d 09 48 78 andc r9,r8,r9 ffc12798: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); handler = (POSIX_Cancel_Handler_control *) ffc1279c: 83 fe 00 ec lwz r31,236(r30) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc127a0: 81 3f 00 00 lwz r9,0(r31) previous = the_node->previous; ffc127a4: 81 5f 00 04 lwz r10,4(r31) next->previous = previous; ffc127a8: 91 49 00 04 stw r10,4(r9) previous->next = next; ffc127ac: 91 2a 00 00 stw r9,0(r10) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc127b0: 7d 00 01 24 mtmsr r8 _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); (*handler->routine)( handler->arg ); ffc127b4: 81 3f 00 08 lwz r9,8(r31) ffc127b8: 80 7f 00 0c lwz r3,12(r31) ffc127bc: 7d 29 03 a6 mtctr r9 ffc127c0: 4e 80 04 21 bctrl _Workspace_Free( handler ); ffc127c4: 7f e3 fb 78 mr r3,r31 ffc127c8: 4b ff b7 bd bl ffc0df84 <_Workspace_Free> handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { ffc127cc: 81 3e 00 e4 lwz r9,228(r30) ffc127d0: 7f 89 e8 00 cmpw cr7,r9,r29 ffc127d4: 40 9e ff b8 bne+ cr7,ffc1278c <_POSIX_Threads_cancel_run+0x34><== NEVER TAKEN (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } ffc127d8: 80 01 00 1c lwz r0,28(r1) ffc127dc: 83 a1 00 0c lwz r29,12(r1) ffc127e0: 7c 08 03 a6 mtlr r0 ffc127e4: 83 c1 00 10 lwz r30,16(r1) ffc127e8: 83 e1 00 14 lwz r31,20(r1) ffc127ec: 38 21 00 18 addi r1,r1,24 ffc127f0: 4e 80 00 20 blr =============================================================================== ffc097b0 <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { ffc097b0: 94 21 ff d8 stwu r1,-40(r1) ffc097b4: 7c 08 02 a6 mflr r0 ffc097b8: 90 01 00 2c stw r0,44(r1) /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ffc097bc: 81 44 00 54 lwz r10,84(r4) bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; ffc097c0: 81 24 00 68 lwz r9,104(r4) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ffc097c4: 2f 8a 00 00 cmpwi cr7,r10,0 * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { ffc097c8: 93 a1 00 1c stw r29,28(r1) bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; ffc097cc: 39 29 00 01 addi r9,r9,1 * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { ffc097d0: 93 c1 00 20 stw r30,32(r1) ffc097d4: 7c 9d 23 78 mr r29,r4 ffc097d8: 93 e1 00 24 stw r31,36(r1) bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; ffc097dc: 91 24 00 68 stw r9,104(r4) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ffc097e0: 40 9e 00 48 bne- cr7,ffc09828 <_POSIX_Timer_TSR+0x78> ffc097e4: 81 24 00 58 lwz r9,88(r4) ffc097e8: 2f 89 00 00 cmpwi cr7,r9,0 ffc097ec: 40 9e 00 3c bne- cr7,ffc09828 <_POSIX_Timer_TSR+0x78> <== ALWAYS TAKEN /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; ffc097f0: 39 20 00 04 li r9,4 <== NOT EXECUTED ffc097f4: 99 24 00 3c stb r9,60(r4) <== NOT EXECUTED /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { ffc097f8: 80 7d 00 38 lwz r3,56(r29) ffc097fc: 80 9d 00 44 lwz r4,68(r29) ffc09800: 48 00 6d c1 bl ffc105c0 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; ffc09804: 39 20 00 00 li r9,0 ffc09808: 91 3d 00 68 stw r9,104(r29) } ffc0980c: 80 01 00 2c lwz r0,44(r1) ffc09810: 83 a1 00 1c lwz r29,28(r1) ffc09814: 7c 08 03 a6 mtlr r0 ffc09818: 83 c1 00 20 lwz r30,32(r1) ffc0981c: 83 e1 00 24 lwz r31,36(r1) ffc09820: 38 21 00 28 addi r1,r1,40 ffc09824: 4e 80 00 20 blr ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( ffc09828: 80 9d 00 64 lwz r4,100(r29) ffc0982c: 3c c0 ff c1 lis r6,-63 ffc09830: 80 bd 00 08 lwz r5,8(r29) ffc09834: 38 7d 00 10 addi r3,r29,16 ffc09838: 38 c6 97 b0 addi r6,r6,-26704 ffc0983c: 7f a7 eb 78 mr r7,r29 ffc09840: 48 00 72 dd bl ffc10b1c <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) ffc09844: 2f 83 00 00 cmpwi cr7,r3,0 ffc09848: 41 9e ff c4 beq+ cr7,ffc0980c <_POSIX_Timer_TSR+0x5c> <== NEVER TAKEN ffc0984c: 3c 80 00 00 lis r4,0 ffc09850: 38 84 2c a0 addi r4,r4,11424 ffc09854: 38 61 00 08 addi r3,r1,8 ffc09858: 48 00 1d 4d bl ffc0b5a4 <_TOD_Get_with_nanoseconds> static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); ffc0985c: 3c c0 3b 9a lis r6,15258 /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; } ffc09860: 83 e3 00 04 lwz r31,4(r3) ffc09864: 38 a0 00 00 li r5,0 ffc09868: 83 c3 00 00 lwz r30,0(r3) ffc0986c: 60 c6 ca 00 ori r6,r6,51712 ffc09870: 7f e4 fb 78 mr r4,r31 ffc09874: 7f c3 f3 78 mr r3,r30 ffc09878: 48 01 3f a9 bl ffc1d820 <__divdi3> _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); ffc0987c: 3c c0 3b 9a lis r6,15258 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); ffc09880: 90 9d 00 6c stw r4,108(r29) _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); ffc09884: 38 a0 00 00 li r5,0 ffc09888: 60 c6 ca 00 ori r6,r6,51712 ffc0988c: 7f c3 f3 78 mr r3,r30 ffc09890: 7f e4 fb 78 mr r4,r31 ffc09894: 48 01 43 b1 bl ffc1dc44 <__moddi3> /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; ffc09898: 39 20 00 03 li r9,3 ffc0989c: 90 9d 00 70 stw r4,112(r29) ffc098a0: 99 3d 00 3c stb r9,60(r29) ffc098a4: 4b ff ff 54 b ffc097f8 <_POSIX_Timer_TSR+0x48> =============================================================================== ffc128d4 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { ffc128d4: 94 21 ff 98 stwu r1,-104(r1) ffc128d8: 7c 08 02 a6 mflr r0 ffc128dc: 7c a6 2b 78 mr r6,r5 siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, ffc128e0: 38 e0 00 01 li r7,1 bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { ffc128e4: 93 c1 00 60 stw r30,96(r1) siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, ffc128e8: 38 a1 00 30 addi r5,r1,48 bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { ffc128ec: 93 e1 00 64 stw r31,100(r1) ffc128f0: 7c 9e 23 78 mr r30,r4 ffc128f4: 7c 7f 1b 78 mr r31,r3 ffc128f8: 90 01 00 6c stw r0,108(r1) ffc128fc: 93 21 00 4c stw r25,76(r1) ffc12900: 93 41 00 50 stw r26,80(r1) ffc12904: 93 61 00 54 stw r27,84(r1) ffc12908: 93 81 00 58 stw r28,88(r1) ffc1290c: 93 a1 00 5c stw r29,92(r1) siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, ffc12910: 48 00 00 f9 bl ffc12a08 <_POSIX_signals_Clear_signals> ffc12914: 2f 83 00 00 cmpwi cr7,r3,0 ffc12918: 41 9e 00 c0 beq- cr7,ffc129d8 <_POSIX_signals_Check_signal+0x104> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) ffc1291c: 1f 9e 00 0c mulli r28,r30,12 ffc12920: 3f 60 00 00 lis r27,0 ffc12924: 3b 7b 32 20 addi r27,r27,12832 ffc12928: 7d 3b e2 14 add r9,r27,r28 ffc1292c: 83 a9 00 08 lwz r29,8(r9) ffc12930: 2f 9d 00 01 cmpwi cr7,r29,1 ffc12934: 41 9e 00 a4 beq- cr7,ffc129d8 <_POSIX_signals_Check_signal+0x104><== NEVER TAKEN return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; ffc12938: 83 5f 00 d0 lwz r26,208(r31) /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, ffc1293c: 3f 20 00 00 lis r25,0 /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; ffc12940: 81 29 00 04 lwz r9,4(r9) /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, ffc12944: 3b 39 31 a0 addi r25,r25,12704 ffc12948: 80 99 00 10 lwz r4,16(r25) ffc1294c: 38 61 00 08 addi r3,r1,8 /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; ffc12950: 7d 29 d3 78 or r9,r9,r26 ffc12954: 91 3f 00 d0 stw r9,208(r31) /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, ffc12958: 38 84 00 20 addi r4,r4,32 ffc1295c: 38 a0 00 28 li r5,40 ffc12960: 48 00 14 1d bl ffc13d7c sizeof( Thread_Wait_information )); /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { ffc12964: 7d 3b e0 2e lwzx r9,r27,r28 case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( ffc12968: 7f c3 f3 78 mr r3,r30 sizeof( Thread_Wait_information )); /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { ffc1296c: 2f 89 00 02 cmpwi cr7,r9,2 ffc12970: 41 9e 00 54 beq- cr7,ffc129c4 <_POSIX_signals_Check_signal+0xf0> &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); ffc12974: 7f a9 03 a6 mtctr r29 ffc12978: 4e 80 04 21 bctrl } /* * Restore the blocking information */ memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information, ffc1297c: 80 79 00 10 lwz r3,16(r25) ffc12980: 38 81 00 08 addi r4,r1,8 ffc12984: 38 a0 00 28 li r5,40 ffc12988: 38 63 00 20 addi r3,r3,32 ffc1298c: 48 00 13 f1 bl ffc13d7c * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; } ffc12990: 80 01 00 6c lwz r0,108(r1) sizeof( Thread_Wait_information )); /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; ffc12994: 93 5f 00 d0 stw r26,208(r31) return true; ffc12998: 38 60 00 01 li r3,1 } ffc1299c: 7c 08 03 a6 mtlr r0 ffc129a0: 83 21 00 4c lwz r25,76(r1) ffc129a4: 83 41 00 50 lwz r26,80(r1) ffc129a8: 83 61 00 54 lwz r27,84(r1) ffc129ac: 83 81 00 58 lwz r28,88(r1) ffc129b0: 83 a1 00 5c lwz r29,92(r1) ffc129b4: 83 c1 00 60 lwz r30,96(r1) ffc129b8: 83 e1 00 64 lwz r31,100(r1) ffc129bc: 38 21 00 68 addi r1,r1,104 ffc129c0: 4e 80 00 20 blr /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( ffc129c4: 38 81 00 30 addi r4,r1,48 ffc129c8: 7f a9 03 a6 mtctr r29 ffc129cc: 38 a0 00 00 li r5,0 ffc129d0: 4e 80 04 21 bctrl signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; ffc129d4: 4b ff ff a8 b ffc1297c <_POSIX_signals_Check_signal+0xa8> * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; } ffc129d8: 80 01 00 6c lwz r0,108(r1) sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, is_global, true ) ) return false; ffc129dc: 38 60 00 00 li r3,0 * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; } ffc129e0: 83 21 00 4c lwz r25,76(r1) ffc129e4: 7c 08 03 a6 mtlr r0 ffc129e8: 83 41 00 50 lwz r26,80(r1) ffc129ec: 83 61 00 54 lwz r27,84(r1) ffc129f0: 83 81 00 58 lwz r28,88(r1) ffc129f4: 83 a1 00 5c lwz r29,92(r1) ffc129f8: 83 c1 00 60 lwz r30,96(r1) ffc129fc: 83 e1 00 64 lwz r31,100(r1) ffc12a00: 38 21 00 68 addi r1,r1,104 ffc12a04: 4e 80 00 20 blr =============================================================================== ffc12fec <_POSIX_signals_Clear_process_signals>: ffc12fec: 39 23 ff ff addi r9,r3,-1 ffc12ff0: 39 40 00 01 li r10,1 ffc12ff4: 7d 48 48 30 slw r8,r10,r9 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc12ff8: 7d 40 00 a6 mfmsr r10 ffc12ffc: 7d 30 42 a6 mfsprg r9,0 ffc13000: 7d 49 48 78 andc r9,r10,r9 ffc13004: 7d 20 01 24 mtmsr r9 mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { ffc13008: 3d 20 00 00 lis r9,0 ffc1300c: 1c 63 00 0c mulli r3,r3,12 ffc13010: 39 29 32 20 addi r9,r9,12832 ffc13014: 7d 29 18 2e lwzx r9,r9,r3 ffc13018: 2f 89 00 02 cmpwi cr7,r9,2 ffc1301c: 41 9e 00 1c beq- cr7,ffc13038 <_POSIX_signals_Clear_process_signals+0x4c> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; ffc13020: 3d 20 00 00 lis r9,0 ffc13024: 80 e9 28 98 lwz r7,10392(r9) ffc13028: 7c e8 40 78 andc r8,r7,r8 ffc1302c: 91 09 28 98 stw r8,10392(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc13030: 7d 40 01 24 mtmsr r10 ffc13034: 4e 80 00 20 blr ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) ffc13038: 3d 20 00 00 lis r9,0 ffc1303c: 39 29 34 14 addi r9,r9,13332 ffc13040: 7c e3 48 2e lwzx r7,r3,r9 ffc13044: 7c c3 4a 14 add r6,r3,r9 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc13048: 39 26 00 04 addi r9,r6,4 ffc1304c: 7f 87 48 00 cmpw cr7,r7,r9 ffc13050: 41 be ff d0 beq- cr7,ffc13020 <_POSIX_signals_Clear_process_signals+0x34><== ALWAYS TAKEN ffc13054: 7d 40 01 24 mtmsr r10 <== NOT EXECUTED ffc13058: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0a3f8 <_POSIX_signals_Get_lowest>: ffc0a3f8: 38 e0 00 05 li r7,5 ffc0a3fc: 7c e9 03 a6 mtctr r7 sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { ffc0a400: 39 20 00 1b li r9,27 ffc0a404: 39 00 00 01 li r8,1 #include #include #include #include static int _POSIX_signals_Get_lowest( ffc0a408: 39 49 ff ff addi r10,r9,-1 ffc0a40c: 7d 0a 50 30 slw r10,r8,r10 ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { ffc0a410: 7d 47 18 39 and. r7,r10,r3 ffc0a414: 40 82 00 38 bne- ffc0a44c <_POSIX_signals_Get_lowest+0x54><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { ffc0a418: 39 29 00 01 addi r9,r9,1 ffc0a41c: 42 00 ff ec bdnz+ ffc0a408 <_POSIX_signals_Get_lowest+0x10> ffc0a420: 39 40 00 1a li r10,26 ffc0a424: 39 20 00 01 li r9,1 ffc0a428: 7d 49 03 a6 mtctr r10 ffc0a42c: 39 00 00 01 li r8,1 ffc0a430: 48 00 00 0c b ffc0a43c <_POSIX_signals_Get_lowest+0x44> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { ffc0a434: 39 29 00 01 addi r9,r9,1 ffc0a438: 42 40 00 14 bdz- ffc0a44c <_POSIX_signals_Get_lowest+0x54> #include #include #include #include static int _POSIX_signals_Get_lowest( ffc0a43c: 39 49 ff ff addi r10,r9,-1 ffc0a440: 7d 0a 50 30 slw r10,r8,r10 #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { ffc0a444: 7d 47 18 39 and. r7,r10,r3 ffc0a448: 41 82 ff ec beq+ ffc0a434 <_POSIX_signals_Get_lowest+0x3c> * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } ffc0a44c: 7d 23 4b 78 mr r3,r9 ffc0a450: 4e 80 00 20 blr =============================================================================== ffc0fa88 <_POSIX_signals_Post_switch_hook>: */ static void _POSIX_signals_Post_switch_hook( Thread_Control *the_thread ) { ffc0fa88: 94 21 ff e0 stwu r1,-32(r1) ffc0fa8c: 7c 08 02 a6 mflr r0 ffc0fa90: 90 01 00 24 stw r0,36(r1) ffc0fa94: 93 c1 00 18 stw r30,24(r1) POSIX_API_Control *api; int signo; ISR_Level level; int hold_errno; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0fa98: 83 c3 01 50 lwz r30,336(r3) */ static void _POSIX_signals_Post_switch_hook( Thread_Control *the_thread ) { ffc0fa9c: 93 81 00 10 stw r28,16(r1) /* * We need to ensure that if the signal handler executes a call * which overwrites the unblocking status, we restore it. */ hold_errno = _Thread_Executing->Wait.return_code; ffc0faa0: 3f 80 00 00 lis r28,0 /* * api may be NULL in case of a thread close in progress */ if ( !api ) ffc0faa4: 2f 9e 00 00 cmpwi cr7,r30,0 /* * We need to ensure that if the signal handler executes a call * which overwrites the unblocking status, we restore it. */ hold_errno = _Thread_Executing->Wait.return_code; ffc0faa8: 3b 9c 31 a0 addi r28,r28,12704 */ static void _POSIX_signals_Post_switch_hook( Thread_Control *the_thread ) { ffc0faac: 93 61 00 0c stw r27,12(r1) /* * We need to ensure that if the signal handler executes a call * which overwrites the unblocking status, we restore it. */ hold_errno = _Thread_Executing->Wait.return_code; ffc0fab0: 81 3c 00 10 lwz r9,16(r28) */ static void _POSIX_signals_Post_switch_hook( Thread_Control *the_thread ) { ffc0fab4: 93 a1 00 14 stw r29,20(r1) ffc0fab8: 93 e1 00 1c stw r31,28(r1) /* * We need to ensure that if the signal handler executes a call * which overwrites the unblocking status, we restore it. */ hold_errno = _Thread_Executing->Wait.return_code; ffc0fabc: 83 69 00 34 lwz r27,52(r9) /* * api may be NULL in case of a thread close in progress */ if ( !api ) ffc0fac0: 41 9e 00 cc beq- cr7,ffc0fb8c <_POSIX_signals_Post_switch_hook+0x104><== NEVER TAKEN ffc0fac4: 3f a0 00 00 lis r29,0 ffc0fac8: 3b bd 28 98 addi r29,r29,10392 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0facc: 7c e0 00 a6 mfmsr r7 ffc0fad0: 7d 30 42 a6 mfsprg r9,0 ffc0fad4: 7c e9 48 78 andc r9,r7,r9 ffc0fad8: 7d 20 01 24 mtmsr r9 * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { ffc0fadc: 81 1d 00 00 lwz r8,0(r29) ffc0fae0: 81 5e 00 d4 lwz r10,212(r30) * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & ffc0fae4: 81 3e 00 d0 lwz r9,208(r30) (api->signals_pending | _POSIX_signals_Pending)) ) { ffc0fae8: 7d 0a 53 78 or r10,r8,r10 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0faec: 7c e0 01 24 mtmsr r7 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & ffc0faf0: 7d 48 48 79 andc. r8,r10,r9 ffc0faf4: 41 82 00 90 beq- ffc0fb84 <_POSIX_signals_Post_switch_hook+0xfc> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { ffc0faf8: 3b e0 00 1b li r31,27 _POSIX_signals_Check_signal( api, signo, false ); ffc0fafc: 7f e4 fb 78 mr r4,r31 ffc0fb00: 38 a0 00 00 li r5,0 ffc0fb04: 7f c3 f3 78 mr r3,r30 ffc0fb08: 48 00 2d cd bl ffc128d4 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); ffc0fb0c: 7f e4 fb 78 mr r4,r31 ffc0fb10: 7f c3 f3 78 mr r3,r30 ffc0fb14: 38 a0 00 01 li r5,1 ffc0fb18: 48 00 2d bd bl ffc128d4 <_POSIX_signals_Check_signal> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { ffc0fb1c: 2f 9f 00 1f cmpwi cr7,r31,31 ffc0fb20: 3b ff 00 01 addi r31,r31,1 ffc0fb24: 40 9e ff d8 bne+ cr7,ffc0fafc <_POSIX_signals_Post_switch_hook+0x74> ffc0fb28: 3b e0 00 01 li r31,1 _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); ffc0fb2c: 7f e4 fb 78 mr r4,r31 ffc0fb30: 38 a0 00 00 li r5,0 ffc0fb34: 7f c3 f3 78 mr r3,r30 ffc0fb38: 48 00 2d 9d bl ffc128d4 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); ffc0fb3c: 7f e4 fb 78 mr r4,r31 ffc0fb40: 7f c3 f3 78 mr r3,r30 ffc0fb44: 38 a0 00 01 li r5,1 ffc0fb48: 48 00 2d 8d bl ffc128d4 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { ffc0fb4c: 2f 9f 00 1a cmpwi cr7,r31,26 ffc0fb50: 3b ff 00 01 addi r31,r31,1 ffc0fb54: 40 9e ff d8 bne+ cr7,ffc0fb2c <_POSIX_signals_Post_switch_hook+0xa4> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0fb58: 7c e0 00 a6 mfmsr r7 ffc0fb5c: 7d 30 42 a6 mfsprg r9,0 ffc0fb60: 7c e9 48 78 andc r9,r7,r9 ffc0fb64: 7d 20 01 24 mtmsr r9 * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { ffc0fb68: 81 1d 00 00 lwz r8,0(r29) ffc0fb6c: 81 5e 00 d4 lwz r10,212(r30) * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & ffc0fb70: 81 3e 00 d0 lwz r9,208(r30) (api->signals_pending | _POSIX_signals_Pending)) ) { ffc0fb74: 7d 0a 53 78 or r10,r8,r10 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0fb78: 7c e0 01 24 mtmsr r7 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & ffc0fb7c: 7d 48 48 79 andc. r8,r10,r9 ffc0fb80: 40 82 ff 78 bne+ ffc0faf8 <_POSIX_signals_Post_switch_hook+0x70><== NEVER TAKEN _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } } _Thread_Executing->Wait.return_code = hold_errno; ffc0fb84: 81 3c 00 10 lwz r9,16(r28) ffc0fb88: 93 69 00 34 stw r27,52(r9) } ffc0fb8c: 80 01 00 24 lwz r0,36(r1) ffc0fb90: 83 61 00 0c lwz r27,12(r1) ffc0fb94: 7c 08 03 a6 mtlr r0 ffc0fb98: 83 81 00 10 lwz r28,16(r1) ffc0fb9c: 83 a1 00 14 lwz r29,20(r1) ffc0fba0: 83 c1 00 18 lwz r30,24(r1) ffc0fba4: 83 e1 00 1c lwz r31,28(r1) ffc0fba8: 38 21 00 20 addi r1,r1,32 ffc0fbac: 4e 80 00 20 blr =============================================================================== ffc1e3b0 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { ffc1e3b0: 94 21 ff f0 stwu r1,-16(r1) ffc1e3b4: 7c 08 02 a6 mflr r0 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { ffc1e3b8: 3d 40 10 00 lis r10,4096 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { ffc1e3bc: 90 01 00 14 stw r0,20(r1) /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { ffc1e3c0: 61 4a 80 00 ori r10,r10,32768 ffc1e3c4: 38 c4 ff ff addi r6,r4,-1 ffc1e3c8: 81 23 00 10 lwz r9,16(r3) ffc1e3cc: 38 e0 00 01 li r7,1 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { ffc1e3d0: 93 e1 00 0c stw r31,12(r1) ffc1e3d4: 7c 7f 1b 78 mr r31,r3 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { ffc1e3d8: 7d 28 50 38 and r8,r9,r10 ffc1e3dc: 7f 88 50 00 cmpw cr7,r8,r10 { POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc1e3e0: 81 63 01 50 lwz r11,336(r3) ffc1e3e4: 7c e8 30 30 slw r8,r7,r6 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { ffc1e3e8: 41 9e 00 9c beq- cr7,ffc1e484 <_POSIX_signals_Unblock_thread+0xd4> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { ffc1e3ec: 81 4b 00 d0 lwz r10,208(r11) ffc1e3f0: 7d 06 50 79 andc. r6,r8,r10 ffc1e3f4: 41 82 00 78 beq- ffc1e46c <_POSIX_signals_Unblock_thread+0xbc> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { ffc1e3f8: 75 28 10 00 andis. r8,r9,4096 ffc1e3fc: 41 82 00 44 beq- ffc1e440 <_POSIX_signals_Unblock_thread+0x90> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); ffc1e400: 3d 40 00 03 lis r10,3 ffc1e404: 61 4a be e0 ori r10,r10,48864 the_thread->Wait.return_code = EINTR; /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) ffc1e408: 7d 26 50 39 and. r6,r9,r10 * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { the_thread->Wait.return_code = EINTR; ffc1e40c: 39 40 00 04 li r10,4 ffc1e410: 91 43 00 34 stw r10,52(r3) /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) ffc1e414: 40 82 00 d8 bne- ffc1e4ec <_POSIX_signals_Unblock_thread+0x13c> _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state) ) { ffc1e418: 71 28 00 08 andi. r8,r9,8 ffc1e41c: 41 a2 00 50 beq+ ffc1e46c <_POSIX_signals_Unblock_thread+0xbc><== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); ffc1e420: 38 63 00 48 addi r3,r3,72 ffc1e424: 4b fe f8 09 bl ffc0dc2c <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc1e428: 3c 80 10 07 lis r4,4103 ffc1e42c: 7f e3 fb 78 mr r3,r31 ffc1e430: 60 84 ff f8 ori r4,r4,65528 ffc1e434: 4b fe e1 8d bl ffc0c5c0 <_Thread_Clear_state> } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; ffc1e438: 38 60 00 00 li r3,0 ffc1e43c: 48 00 00 34 b ffc1e470 <_POSIX_signals_Unblock_thread+0xc0> else if ( _States_Is_delaying(the_thread->current_state) ) { (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { ffc1e440: 2f 89 00 00 cmpwi cr7,r9,0 ffc1e444: 40 9e 00 28 bne- cr7,ffc1e46c <_POSIX_signals_Unblock_thread+0xbc><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) ffc1e448: 3d 20 00 00 lis r9,0 ffc1e44c: 39 29 31 a0 addi r9,r9,12704 ffc1e450: 81 49 00 08 lwz r10,8(r9) ffc1e454: 2f 8a 00 00 cmpwi cr7,r10,0 ffc1e458: 41 9e 00 14 beq- cr7,ffc1e46c <_POSIX_signals_Unblock_thread+0xbc> ffc1e45c: 81 49 00 10 lwz r10,16(r9) ffc1e460: 7f 83 50 00 cmpw cr7,r3,r10 ffc1e464: 40 be 00 08 bne+ cr7,ffc1e46c <_POSIX_signals_Unblock_thread+0xbc><== NEVER TAKEN _Thread_Dispatch_necessary = true; ffc1e468: 98 e9 00 0c stb r7,12(r9) } } return false; ffc1e46c: 38 60 00 00 li r3,0 } ffc1e470: 80 01 00 14 lwz r0,20(r1) ffc1e474: 83 e1 00 0c lwz r31,12(r1) ffc1e478: 7c 08 03 a6 mtlr r0 ffc1e47c: 38 21 00 10 addi r1,r1,16 ffc1e480: 4e 80 00 20 blr * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { ffc1e484: 81 23 00 30 lwz r9,48(r3) ffc1e488: 7d 06 48 39 and. r6,r8,r9 ffc1e48c: 41 82 00 50 beq- ffc1e4dc <_POSIX_signals_Unblock_thread+0x12c> the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { ffc1e490: 2f 85 00 00 cmpwi cr7,r5,0 */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; ffc1e494: 39 20 00 04 li r9,4 ffc1e498: 91 3f 00 34 stw r9,52(r31) the_info = (siginfo_t *) the_thread->Wait.return_argument; ffc1e49c: 81 3f 00 28 lwz r9,40(r31) if ( !info ) { ffc1e4a0: 41 9e 00 58 beq- cr7,ffc1e4f8 <_POSIX_signals_Unblock_thread+0x148> the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; ffc1e4a4: 80 e5 00 00 lwz r7,0(r5) ffc1e4a8: 81 05 00 04 lwz r8,4(r5) ffc1e4ac: 81 45 00 08 lwz r10,8(r5) ffc1e4b0: 90 e9 00 00 stw r7,0(r9) ffc1e4b4: 91 09 00 04 stw r8,4(r9) ffc1e4b8: 91 49 00 08 stw r10,8(r9) } _Thread_queue_Extract_with_proxy( the_thread ); ffc1e4bc: 7f e3 fb 78 mr r3,r31 ffc1e4c0: 4b fe ee e5 bl ffc0d3a4 <_Thread_queue_Extract_with_proxy> if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } ffc1e4c4: 80 01 00 14 lwz r0,20(r1) ffc1e4c8: 83 e1 00 0c lwz r31,12(r1) } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); return true; ffc1e4cc: 38 60 00 01 li r3,1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } ffc1e4d0: 7c 08 03 a6 mtlr r0 ffc1e4d4: 38 21 00 10 addi r1,r1,16 ffc1e4d8: 4e 80 00 20 blr * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { ffc1e4dc: 81 2b 00 d0 lwz r9,208(r11) ffc1e4e0: 7d 0a 48 79 andc. r10,r8,r9 ffc1e4e4: 40 82 ff ac bne+ ffc1e490 <_POSIX_signals_Unblock_thread+0xe0> ffc1e4e8: 4b ff ff 84 b ffc1e46c <_POSIX_signals_Unblock_thread+0xbc> /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); ffc1e4ec: 4b fe ee b9 bl ffc0d3a4 <_Thread_queue_Extract_with_proxy> } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; ffc1e4f0: 38 60 00 00 li r3,0 ffc1e4f4: 4b ff ff 7c b ffc1e470 <_POSIX_signals_Unblock_thread+0xc0> the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; ffc1e4f8: 39 40 00 01 li r10,1 the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; ffc1e4fc: 90 89 00 00 stw r4,0(r9) the_info->si_code = SI_USER; ffc1e500: 91 49 00 04 stw r10,4(r9) the_info->si_value.sival_int = 0; ffc1e504: 90 a9 00 08 stw r5,8(r9) ffc1e508: 4b ff ff b4 b ffc1e4bc <_POSIX_signals_Unblock_thread+0x10c> =============================================================================== ffc0c95c <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { ffc0c95c: 94 21 ff e8 stwu r1,-24(r1) ffc0c960: 7c 08 02 a6 mflr r0 ffc0c964: 93 c1 00 10 stw r30,16(r1) RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; ffc0c968: 7c 9e 23 79 mr. r30,r4 */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { ffc0c96c: 90 01 00 1c stw r0,28(r1) ffc0c970: 93 81 00 08 stw r28,8(r1) ffc0c974: 93 a1 00 0c stw r29,12(r1) ffc0c978: 93 e1 00 14 stw r31,20(r1) RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; ffc0c97c: 41 82 01 14 beq- ffc0ca90 <_RBTree_Extract_unprotected+0x134> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { ffc0c980: 81 23 00 08 lwz r9,8(r3) ffc0c984: 7c 7c 1b 78 mr r28,r3 ffc0c988: 7f 89 f0 00 cmpw cr7,r9,r30 ffc0c98c: 41 9e 01 6c beq- cr7,ffc0caf8 <_RBTree_Extract_unprotected+0x19c> the_rbtree->first[RBT_LEFT] = next; } /* Check if max needs to be updated. min=max for 1 element trees so * do not use else if here. */ if (the_node == the_rbtree->first[RBT_RIGHT]) { ffc0c990: 81 3c 00 0c lwz r9,12(r28) ffc0c994: 7f 89 f0 00 cmpw cr7,r9,r30 ffc0c998: 41 9e 01 74 beq- cr7,ffc0cb0c <_RBTree_Extract_unprotected+0x1b0> * 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]) { ffc0c99c: 83 fe 00 04 lwz r31,4(r30) ffc0c9a0: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0c9a4: 41 9e 01 88 beq- cr7,ffc0cb2c <_RBTree_Extract_unprotected+0x1d0> ffc0c9a8: 81 3e 00 08 lwz r9,8(r30) ffc0c9ac: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c9b0: 40 be 00 0c bne+ cr7,ffc0c9bc <_RBTree_Extract_unprotected+0x60> ffc0c9b4: 48 00 01 0c b ffc0cac0 <_RBTree_Extract_unprotected+0x164> target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */ while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT]; ffc0c9b8: 7d 3f 4b 78 mr r31,r9 ffc0c9bc: 81 3f 00 08 lwz r9,8(r31) ffc0c9c0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c9c4: 40 9e ff f4 bne+ cr7,ffc0c9b8 <_RBTree_Extract_unprotected+0x5c> * target's position (target is the right child of target->parent) * when target vacates it. if there is no child, then target->parent * should become NULL. This may cause the coloring to be violated. * For now we store the color of the node being deleted in victim_color. */ leaf = target->child[RBT_LEFT]; ffc0c9c8: 83 bf 00 04 lwz r29,4(r31) if(leaf) { ffc0c9cc: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0c9d0: 41 9e 01 50 beq- cr7,ffc0cb20 <_RBTree_Extract_unprotected+0x1c4> leaf->parent = target->parent; ffc0c9d4: 81 3f 00 00 lwz r9,0(r31) ffc0c9d8: 91 3d 00 00 stw r9,0(r29) } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; ffc0c9dc: 80 ff 00 00 lwz r7,0(r31) target->parent->child[dir] = leaf; /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; ffc0c9e0: 81 1e 00 00 lwz r8,0(r30) } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; ffc0c9e4: 81 27 00 04 lwz r9,4(r7) 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; ffc0c9e8: 81 5f 00 0c lwz r10,12(r31) dir = target != target->parent->child[0]; ffc0c9ec: 7f e9 4a 78 xor r9,r31,r9 ffc0c9f0: 7d 29 00 34 cntlzw r9,r9 ffc0c9f4: 55 29 d9 7e rlwinm r9,r9,27,5,31 ffc0c9f8: 69 29 00 01 xori r9,r9,1 target->parent->child[dir] = leaf; ffc0c9fc: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0ca00: 7c e7 4a 14 add r7,r7,r9 ffc0ca04: 93 a7 00 04 stw r29,4(r7) /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; ffc0ca08: 81 28 00 04 lwz r9,4(r8) ffc0ca0c: 7f c9 4a 78 xor r9,r30,r9 ffc0ca10: 7d 29 00 34 cntlzw r9,r9 ffc0ca14: 55 29 d9 7e rlwinm r9,r9,27,5,31 ffc0ca18: 69 29 00 01 xori r9,r9,1 the_node->parent->child[dir] = target; ffc0ca1c: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0ca20: 7d 08 4a 14 add r8,r8,r9 ffc0ca24: 93 e8 00 04 stw r31,4(r8) /* set target's new children to the original node's children */ target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT]; ffc0ca28: 81 3e 00 08 lwz r9,8(r30) ffc0ca2c: 91 3f 00 08 stw r9,8(r31) if (the_node->child[RBT_RIGHT]) ffc0ca30: 81 3e 00 08 lwz r9,8(r30) ffc0ca34: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ca38: 41 9e 00 08 beq- cr7,ffc0ca40 <_RBTree_Extract_unprotected+0xe4><== NEVER TAKEN the_node->child[RBT_RIGHT]->parent = target; ffc0ca3c: 93 e9 00 00 stw r31,0(r9) target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; ffc0ca40: 81 3e 00 04 lwz r9,4(r30) ffc0ca44: 91 3f 00 04 stw r9,4(r31) if (the_node->child[RBT_LEFT]) ffc0ca48: 81 3e 00 04 lwz r9,4(r30) ffc0ca4c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ca50: 41 9e 00 08 beq- cr7,ffc0ca58 <_RBTree_Extract_unprotected+0xfc> the_node->child[RBT_LEFT]->parent = target; ffc0ca54: 93 e9 00 00 stw r31,0(r9) /* finally, update the parent node and recolor. target has completely * replaced the_node, and target's child has moved up the tree if needed. * the_node is no longer part of the tree, although it has valid pointers * still. */ target->parent = the_node->parent; ffc0ca58: 81 1e 00 00 lwz r8,0(r30) target->color = the_node->color; ffc0ca5c: 81 3e 00 0c lwz r9,12(r30) /* finally, update the parent node and recolor. target has completely * replaced the_node, and target's child has moved up the tree if needed. * the_node is no longer part of the tree, although it has valid pointers * still. */ target->parent = the_node->parent; ffc0ca60: 91 1f 00 00 stw r8,0(r31) target->color = the_node->color; ffc0ca64: 91 3f 00 0c stw r9,12(r31) /* fix coloring. leaf has moved up the tree. The color of the deleted * node is in victim_color. There are two cases: * 1. Deleted a red node, its child must be black. Nothing must be done. * 2. Deleted a black node, its child must be red. Paint child black. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ ffc0ca68: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0ca6c: 41 9e 00 44 beq- cr7,ffc0cab0 <_RBTree_Extract_unprotected+0x154> /* Wipe the_node */ _RBTree_Set_off_rbtree(the_node); /* set root to black, if it exists */ if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK; ffc0ca70: 81 5c 00 04 lwz r10,4(r28) */ RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree( RBTree_Node *node ) { node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL; ffc0ca74: 39 20 00 00 li r9,0 ffc0ca78: 91 3e 00 08 stw r9,8(r30) ffc0ca7c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0ca80: 91 3e 00 04 stw r9,4(r30) ffc0ca84: 91 3e 00 00 stw r9,0(r30) ffc0ca88: 41 9e 00 08 beq- cr7,ffc0ca90 <_RBTree_Extract_unprotected+0x134> ffc0ca8c: 91 2a 00 0c stw r9,12(r10) } ffc0ca90: 80 01 00 1c lwz r0,28(r1) ffc0ca94: 83 81 00 08 lwz r28,8(r1) ffc0ca98: 7c 08 03 a6 mtlr r0 ffc0ca9c: 83 a1 00 0c lwz r29,12(r1) ffc0caa0: 83 c1 00 10 lwz r30,16(r1) ffc0caa4: 83 e1 00 14 lwz r31,20(r1) ffc0caa8: 38 21 00 18 addi r1,r1,24 ffc0caac: 4e 80 00 20 blr * node is in victim_color. There are two cases: * 1. Deleted a red node, its child must be black. Nothing must be done. * 2. Deleted a black node, its child must be red. Paint child black. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ if (leaf) { ffc0cab0: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0cab4: 41 be ff bc beq- cr7,ffc0ca70 <_RBTree_Extract_unprotected+0x114> leaf->color = RBT_BLACK; /* case 2 */ ffc0cab8: 91 5d 00 0c stw r10,12(r29) ffc0cabc: 4b ff ff b4 b ffc0ca70 <_RBTree_Extract_unprotected+0x114> * 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]) { ffc0cac0: 7f fd fb 78 mr r29,r31 * For now we store the color of the node being deleted in victim_color. */ leaf = the_node->child[RBT_LEFT] ? the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; if( leaf ) { leaf->parent = the_node->parent; ffc0cac4: 81 3e 00 00 lwz r9,0(r30) ffc0cac8: 91 3d 00 00 stw r9,0(r29) _RBTree_Extract_validate_unprotected(the_node); } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; ffc0cacc: 81 1e 00 00 lwz r8,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; ffc0cad0: 81 5e 00 0c lwz r10,12(r30) /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; ffc0cad4: 81 28 00 04 lwz r9,4(r8) ffc0cad8: 7f c9 4a 78 xor r9,r30,r9 ffc0cadc: 7d 29 00 34 cntlzw r9,r9 ffc0cae0: 55 29 d9 7e rlwinm r9,r9,27,5,31 ffc0cae4: 69 29 00 01 xori r9,r9,1 the_node->parent->child[dir] = leaf; ffc0cae8: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0caec: 7d 08 4a 14 add r8,r8,r9 ffc0caf0: 93 a8 00 04 stw r29,4(r8) ffc0caf4: 4b ff ff 74 b ffc0ca68 <_RBTree_Extract_unprotected+0x10c> */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Successor_unprotected( const RBTree_Node *node ) { return _RBTree_Next_unprotected( node, RBT_RIGHT ); ffc0caf8: 7f c3 f3 78 mr r3,r30 ffc0cafc: 38 80 00 01 li r4,1 ffc0cb00: 48 00 04 99 bl ffc0cf98 <_RBTree_Next_unprotected> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { RBTree_Node *next; next = _RBTree_Successor_unprotected(the_node); the_rbtree->first[RBT_LEFT] = next; ffc0cb04: 90 7c 00 08 stw r3,8(r28) ffc0cb08: 4b ff fe 88 b ffc0c990 <_RBTree_Extract_unprotected+0x34> */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Predecessor_unprotected( const RBTree_Node *node ) { return _RBTree_Next_unprotected( node, RBT_LEFT ); ffc0cb0c: 7f c3 f3 78 mr r3,r30 ffc0cb10: 38 80 00 00 li r4,0 ffc0cb14: 48 00 04 85 bl ffc0cf98 <_RBTree_Next_unprotected> /* Check if max needs to be updated. min=max for 1 element trees so * do not use else if here. */ if (the_node == the_rbtree->first[RBT_RIGHT]) { RBTree_Node *previous; previous = _RBTree_Predecessor_unprotected(the_node); the_rbtree->first[RBT_RIGHT] = previous; ffc0cb18: 90 7c 00 0c stw r3,12(r28) ffc0cb1c: 4b ff fe 80 b ffc0c99c <_RBTree_Extract_unprotected+0x40> leaf = target->child[RBT_LEFT]; if(leaf) { leaf->parent = target->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); ffc0cb20: 7f e3 fb 78 mr r3,r31 ffc0cb24: 4b ff fb 2d bl ffc0c650 <_RBTree_Extract_validate_unprotected> ffc0cb28: 4b ff fe b4 b ffc0c9dc <_RBTree_Extract_unprotected+0x80> * the_node's location in the tree. This may cause the coloring to be * violated. We will fix it later. * For now we store the color of the node being deleted in victim_color. */ leaf = the_node->child[RBT_LEFT] ? the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; ffc0cb2c: 83 be 00 08 lwz r29,8(r30) if( leaf ) { ffc0cb30: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0cb34: 40 9e ff 90 bne+ cr7,ffc0cac4 <_RBTree_Extract_unprotected+0x168> leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); ffc0cb38: 7f c3 f3 78 mr r3,r30 ffc0cb3c: 4b ff fb 15 bl ffc0c650 <_RBTree_Extract_validate_unprotected> ffc0cb40: 4b ff ff 8c b ffc0cacc <_RBTree_Extract_unprotected+0x170> =============================================================================== ffc0c650 <_RBTree_Extract_validate_unprotected>: ) { RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; ffc0c650: 81 23 00 00 lwz r9,0(r3) if(!parent->parent) return; ffc0c654: 81 49 00 00 lwz r10,0(r9) ffc0c658: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c65c: 4d 9e 00 20 beqlr cr7 { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) ffc0c660: 81 49 00 04 lwz r10,4(r9) ffc0c664: 7f 83 50 00 cmpw cr7,r3,r10 ffc0c668: 41 9e 02 d0 beq- cr7,ffc0c938 <_RBTree_Extract_validate_unprotected+0x2e8> * 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; ffc0c66c: 38 80 00 00 li r4,0 } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; ffc0c670: 38 c0 00 01 li r6,1 ffc0c674: 48 00 00 90 b ffc0c704 <_RBTree_Extract_validate_unprotected+0xb4> 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) { ffc0c678: 81 09 00 00 lwz r8,0(r9) ffc0c67c: 2f 88 00 00 cmpwi cr7,r8,0 ffc0c680: 41 9e 00 90 beq- cr7,ffc0c710 <_RBTree_Extract_validate_unprotected+0xc0> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0c684: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c688: 41 9e 00 10 beq- cr7,ffc0c698 <_RBTree_Extract_validate_unprotected+0x48><== NEVER TAKEN ffc0c68c: 80 ea 00 0c lwz r7,12(r10) ffc0c690: 2f 87 00 01 cmpwi cr7,r7,1 ffc0c694: 41 9e 01 68 beq- cr7,ffc0c7fc <_RBTree_Extract_validate_unprotected+0x1ac> _RBTree_Rotate(parent, dir); sibling = parent->child[_RBTree_Opposite_direction(dir)]; } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && ffc0c698: 81 0a 00 08 lwz r8,8(r10) ffc0c69c: 2f 88 00 00 cmpwi cr7,r8,0 ffc0c6a0: 41 9e 00 10 beq- cr7,ffc0c6b0 <_RBTree_Extract_validate_unprotected+0x60> ffc0c6a4: 81 08 00 0c lwz r8,12(r8) ffc0c6a8: 2f 88 00 01 cmpwi cr7,r8,1 ffc0c6ac: 41 9e 00 7c beq- cr7,ffc0c728 <_RBTree_Extract_validate_unprotected+0xd8> !_RBTree_Is_red(sibling->child[RBT_LEFT])) { ffc0c6b0: 81 0a 00 04 lwz r8,4(r10) ffc0c6b4: 2f 88 00 00 cmpwi cr7,r8,0 ffc0c6b8: 41 9e 00 10 beq- cr7,ffc0c6c8 <_RBTree_Extract_validate_unprotected+0x78> ffc0c6bc: 81 08 00 0c lwz r8,12(r8) ffc0c6c0: 2f 88 00 01 cmpwi cr7,r8,1 ffc0c6c4: 41 9e 00 64 beq- cr7,ffc0c728 <_RBTree_Extract_validate_unprotected+0xd8> sibling->color = RBT_RED; ffc0c6c8: 90 ca 00 0c stw r6,12(r10) ffc0c6cc: 81 49 00 0c lwz r10,12(r9) ffc0c6d0: 2f 8a 00 01 cmpwi cr7,r10,1 ffc0c6d4: 41 9e 02 6c beq- cr7,ffc0c940 <_RBTree_Extract_validate_unprotected+0x2f0> if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; } the_node = parent; /* done if parent is red */ parent = the_node->parent; ffc0c6d8: 81 09 00 00 lwz r8,0(r9) RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; ffc0c6dc: 2f 88 00 00 cmpwi cr7,r8,0 ffc0c6e0: 41 9e 01 b0 beq- cr7,ffc0c890 <_RBTree_Extract_validate_unprotected+0x240><== NEVER TAKEN if(!(the_node->parent->parent)) return NULL; ffc0c6e4: 81 48 00 00 lwz r10,0(r8) ffc0c6e8: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c6ec: 41 9e 01 a4 beq- cr7,ffc0c890 <_RBTree_Extract_validate_unprotected+0x240> if(the_node == the_node->parent->child[RBT_LEFT]) ffc0c6f0: 81 48 00 04 lwz r10,4(r8) ffc0c6f4: 7f 89 50 00 cmpw cr7,r9,r10 ffc0c6f8: 41 9e 01 a0 beq- cr7,ffc0c898 <_RBTree_Extract_validate_unprotected+0x248> ffc0c6fc: 7d 23 4b 78 mr r3,r9 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; ffc0c700: 7d 09 43 78 mr r9,r8 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0c704: 81 03 00 0c lwz r8,12(r3) ffc0c708: 2f 88 00 01 cmpwi cr7,r8,1 ffc0c70c: 40 9e ff 6c bne+ cr7,ffc0c678 <_RBTree_Extract_validate_unprotected+0x28> sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; ffc0c710: 81 23 00 00 lwz r9,0(r3) ffc0c714: 81 29 00 00 lwz r9,0(r9) ffc0c718: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c71c: 4c be 00 20 bnelr+ cr7 ffc0c720: 91 23 00 0c stw r9,12(r3) ffc0c724: 4e 80 00 20 blr * 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]; ffc0c728: 81 09 00 04 lwz r8,4(r9) ffc0c72c: 7c 68 42 78 xor r8,r3,r8 ffc0c730: 7d 08 00 34 cntlzw r8,r8 ffc0c734: 55 08 d9 7e rlwinm r8,r8,27,5,31 ffc0c738: 69 08 00 01 xori r8,r8,1 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); ffc0c73c: 69 07 00 01 xori r7,r8,1 if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) { ffc0c740: 54 e7 10 3a rlwinm r7,r7,2,0,29 ffc0c744: 7c ca 3a 14 add r6,r10,r7 ffc0c748: 80 c6 00 04 lwz r6,4(r6) */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0c74c: 2f 86 00 00 cmpwi cr7,r6,0 ffc0c750: 41 9e 00 10 beq- cr7,ffc0c760 <_RBTree_Extract_validate_unprotected+0x110> ffc0c754: 80 a6 00 0c lwz r5,12(r6) ffc0c758: 2f 85 00 01 cmpwi cr7,r5,1 ffc0c75c: 41 9e 01 4c beq- cr7,ffc0c8a8 <_RBTree_Extract_validate_unprotected+0x258> sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; ffc0c760: 55 08 10 3a rlwinm r8,r8,2,0,29 ffc0c764: 7c aa 42 14 add r5,r10,r8 ffc0c768: 80 c5 00 04 lwz r6,4(r5) * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) { sibling->color = RBT_RED; ffc0c76c: 38 80 00 01 li r4,1 ffc0c770: 90 8a 00 0c stw r4,12(r10) sibling->child[dir]->color = RBT_BLACK; ffc0c774: 38 80 00 00 li r4,0 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; ffc0c778: 2f 86 00 00 cmpwi cr7,r6,0 ffc0c77c: 90 86 00 0c stw r4,12(r6) ffc0c780: 41 9e 00 54 beq- cr7,ffc0c7d4 <_RBTree_Extract_validate_unprotected+0x184><== NEVER TAKEN c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; ffc0c784: 7c 86 3a 14 add r4,r6,r7 ffc0c788: 81 64 00 04 lwz r11,4(r4) ffc0c78c: 91 65 00 04 stw r11,4(r5) if (c->child[dir]) ffc0c790: 80 a4 00 04 lwz r5,4(r4) ffc0c794: 2f 85 00 00 cmpwi cr7,r5,0 ffc0c798: 41 9e 00 08 beq- cr7,ffc0c7a0 <_RBTree_Extract_validate_unprotected+0x150> c->child[dir]->parent = the_node; ffc0c79c: 91 45 00 00 stw r10,0(r5) c->child[dir] = the_node; ffc0c7a0: 7c a6 3a 14 add r5,r6,r7 the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c7a4: 80 8a 00 00 lwz r4,0(r10) the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc0c7a8: 91 45 00 04 stw r10,4(r5) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c7ac: 80 a4 00 04 lwz r5,4(r4) c->parent = the_node->parent; ffc0c7b0: 90 86 00 00 stw r4,0(r6) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c7b4: 7d 45 2a 78 xor r5,r10,r5 ffc0c7b8: 7c a5 00 34 cntlzw r5,r5 c->parent = the_node->parent; the_node->parent = c; ffc0c7bc: 90 ca 00 00 stw r6,0(r10) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c7c0: 54 a5 d9 7e rlwinm r5,r5,27,5,31 ffc0c7c4: 68 a5 00 01 xori r5,r5,1 ffc0c7c8: 54 a5 10 3a rlwinm r5,r5,2,0,29 ffc0c7cc: 7c 84 2a 14 add r4,r4,r5 ffc0c7d0: 90 c4 00 04 stw r6,4(r4) _RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir)); sibling = parent->child[_RBTree_Opposite_direction(dir)]; ffc0c7d4: 7d 49 3a 14 add r10,r9,r7 } sibling->color = parent->color; ffc0c7d8: 80 c9 00 0c lwz r6,12(r9) dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) { sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir)); sibling = parent->child[_RBTree_Opposite_direction(dir)]; ffc0c7dc: 80 aa 00 04 lwz r5,4(r10) ffc0c7e0: 7d 45 3a 14 add r10,r5,r7 } sibling->color = parent->color; ffc0c7e4: 90 c5 00 0c stw r6,12(r5) ffc0c7e8: 80 8a 00 04 lwz r4,4(r10) parent->color = RBT_BLACK; ffc0c7ec: 39 40 00 00 li r10,0 ffc0c7f0: 91 49 00 0c stw r10,12(r9) sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; ffc0c7f4: 91 44 00 0c stw r10,12(r4) ffc0c7f8: 48 00 00 d8 b ffc0c8d0 <_RBTree_Extract_validate_unprotected+0x280> * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; ffc0c7fc: 80 a9 00 04 lwz r5,4(r9) * then rotate parent left, making the sibling be the_node's grandparent. * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; ffc0c800: 90 e9 00 0c stw r7,12(r9) sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; ffc0c804: 7c 67 2a 78 xor r7,r3,r5 ffc0c808: 7c e7 00 34 cntlzw r7,r7 * 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; ffc0c80c: 90 8a 00 0c stw r4,12(r10) dir = the_node != parent->child[0]; ffc0c810: 54 e7 d9 7e rlwinm r7,r7,27,5,31 ffc0c814: 68 e0 00 01 xori r0,r7,1 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); ffc0c818: 68 0b 00 01 xori r11,r0,1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; ffc0c81c: 55 6b 10 3a rlwinm r11,r11,2,0,29 ffc0c820: 7c a9 5a 14 add r5,r9,r11 ffc0c824: 80 e5 00 04 lwz r7,4(r5) ffc0c828: 2f 87 00 00 cmpwi cr7,r7,0 ffc0c82c: 41 9e 00 74 beq- cr7,ffc0c8a0 <_RBTree_Extract_validate_unprotected+0x250><== NEVER TAKEN c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; ffc0c830: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0c834: 7d 47 02 14 add r10,r7,r0 ffc0c838: 81 8a 00 04 lwz r12,4(r10) ffc0c83c: 91 85 00 04 stw r12,4(r5) if (c->child[dir]) ffc0c840: 81 4a 00 04 lwz r10,4(r10) ffc0c844: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c848: 41 9e 00 0c beq- cr7,ffc0c854 <_RBTree_Extract_validate_unprotected+0x204><== NEVER TAKEN c->child[dir]->parent = the_node; ffc0c84c: 91 2a 00 00 stw r9,0(r10) ffc0c850: 81 09 00 00 lwz r8,0(r9) c->child[dir] = the_node; ffc0c854: 7d 47 02 14 add r10,r7,r0 the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; ffc0c858: 91 07 00 00 stw r8,0(r7) ffc0c85c: 7d 69 5a 14 add r11,r9,r11 the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc0c860: 91 2a 00 04 stw r9,4(r10) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c864: 81 48 00 04 lwz r10,4(r8) c->parent = the_node->parent; the_node->parent = c; ffc0c868: 90 e9 00 00 stw r7,0(r9) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c86c: 7d 2a 52 78 xor r10,r9,r10 ffc0c870: 7d 4a 00 34 cntlzw r10,r10 ffc0c874: 55 4a d9 7e rlwinm r10,r10,27,5,31 ffc0c878: 69 4a 00 01 xori r10,r10,1 ffc0c87c: 55 4a 10 3a rlwinm r10,r10,2,0,29 ffc0c880: 7d 08 52 14 add r8,r8,r10 ffc0c884: 90 e8 00 04 stw r7,4(r8) ffc0c888: 81 4b 00 04 lwz r10,4(r11) ffc0c88c: 4b ff fe 0c b ffc0c698 <_RBTree_Extract_validate_unprotected+0x48> RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; ffc0c890: 39 40 00 00 li r10,0 ffc0c894: 4b ff fe 68 b ffc0c6fc <_RBTree_Extract_validate_unprotected+0xac> if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; ffc0c898: 81 48 00 08 lwz r10,8(r8) ffc0c89c: 4b ff fe 60 b ffc0c6fc <_RBTree_Extract_validate_unprotected+0xac> RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; ffc0c8a0: 39 40 00 00 li r10,0 <== NOT EXECUTED ffc0c8a4: 4b ff fd f4 b ffc0c698 <_RBTree_Extract_validate_unprotected+0x48><== NOT EXECUTED ffc0c8a8: 7c a9 3a 14 add r5,r9,r7 sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir)); sibling = parent->child[_RBTree_Opposite_direction(dir)]; } sibling->color = parent->color; ffc0c8ac: 81 69 00 0c lwz r11,12(r9) ffc0c8b0: 80 a5 00 04 lwz r5,4(r5) parent->color = RBT_BLACK; ffc0c8b4: 38 80 00 00 li r4,0 sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir)); sibling = parent->child[_RBTree_Opposite_direction(dir)]; } sibling->color = parent->color; ffc0c8b8: 91 6a 00 0c stw r11,12(r10) ffc0c8bc: 2f 85 00 00 cmpwi cr7,r5,0 parent->color = RBT_BLACK; ffc0c8c0: 90 89 00 0c stw r4,12(r9) sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; ffc0c8c4: 90 86 00 0c stw r4,12(r6) ffc0c8c8: 41 be fe 48 beq- cr7,ffc0c710 <_RBTree_Extract_validate_unprotected+0xc0><== NEVER TAKEN ffc0c8cc: 55 08 10 3a rlwinm r8,r8,2,0,29 c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; ffc0c8d0: 7d 45 42 14 add r10,r5,r8 ffc0c8d4: 80 ca 00 04 lwz r6,4(r10) ffc0c8d8: 7c e9 3a 14 add r7,r9,r7 ffc0c8dc: 90 c7 00 04 stw r6,4(r7) if (c->child[dir]) ffc0c8e0: 81 4a 00 04 lwz r10,4(r10) ffc0c8e4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c8e8: 41 9e 00 08 beq- cr7,ffc0c8f0 <_RBTree_Extract_validate_unprotected+0x2a0> c->child[dir]->parent = the_node; ffc0c8ec: 91 2a 00 00 stw r9,0(r10) c->child[dir] = the_node; ffc0c8f0: 7d 05 42 14 add r8,r5,r8 the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c8f4: 80 e9 00 00 lwz r7,0(r9) the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc0c8f8: 91 28 00 04 stw r9,4(r8) the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; ffc0c8fc: 90 e5 00 00 stw r7,0(r5) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c900: 81 47 00 04 lwz r10,4(r7) c->parent = the_node->parent; the_node->parent = c; ffc0c904: 90 a9 00 00 stw r5,0(r9) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0c908: 7d 2a 52 78 xor r10,r9,r10 _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; ffc0c90c: 81 23 00 00 lwz r9,0(r3) ffc0c910: 7d 4a 00 34 cntlzw r10,r10 ffc0c914: 55 4a d9 7e rlwinm r10,r10,27,5,31 ffc0c918: 81 29 00 00 lwz r9,0(r9) ffc0c91c: 69 4a 00 01 xori r10,r10,1 ffc0c920: 55 4a 10 3a rlwinm r10,r10,2,0,29 ffc0c924: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c928: 7c e7 52 14 add r7,r7,r10 ffc0c92c: 90 a7 00 04 stw r5,4(r7) ffc0c930: 4c be 00 20 bnelr+ cr7 ffc0c934: 4b ff fd ec b ffc0c720 <_RBTree_Extract_validate_unprotected+0xd0><== NOT EXECUTED if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; ffc0c938: 81 49 00 08 lwz r10,8(r9) ffc0c93c: 4b ff fd 30 b ffc0c66c <_RBTree_Extract_validate_unprotected+0x1c> /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; ffc0c940: 39 40 00 00 li r10,0 ffc0c944: 91 49 00 0c stw r10,12(r9) sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; ffc0c948: 81 23 00 00 lwz r9,0(r3) ffc0c94c: 81 29 00 00 lwz r9,0(r9) ffc0c950: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c954: 4c be 00 20 bnelr+ cr7 ffc0c958: 4b ff fd c8 b ffc0c720 <_RBTree_Extract_validate_unprotected+0xd0><== NOT EXECUTED =============================================================================== ffc0cd00 <_RBTree_Find>: RBTree_Node *_RBTree_Find( RBTree_Control *the_rbtree, RBTree_Node *search_node ) { ffc0cd00: 94 21 ff e0 stwu r1,-32(r1) ffc0cd04: 7c 08 02 a6 mflr r0 ffc0cd08: 90 01 00 24 stw r0,36(r1) ffc0cd0c: 93 c1 00 18 stw r30,24(r1) ffc0cd10: 7c 7e 1b 78 mr r30,r3 ffc0cd14: 93 61 00 0c stw r27,12(r1) ffc0cd18: 93 81 00 10 stw r28,16(r1) ffc0cd1c: 93 a1 00 14 stw r29,20(r1) ffc0cd20: 93 e1 00 1c stw r31,28(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0cd24: 7f 60 00 a6 mfmsr r27 ffc0cd28: 7d 30 42 a6 mfsprg r9,0 ffc0cd2c: 7f 69 48 78 andc r9,r27,r9 ffc0cd30: 7d 20 01 24 mtmsr r9 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { RBTree_Node* iter_node = the_rbtree->root; ffc0cd34: 83 e3 00 04 lwz r31,4(r3) RBTree_Node* found = NULL; int compare_result; while (iter_node) { ffc0cd38: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0cd3c: 41 9e 00 b0 beq- cr7,ffc0cdec <_RBTree_Find+0xec> <== NEVER TAKEN ffc0cd40: 7c 9d 23 78 mr r29,r4 ffc0cd44: 3b 80 00 00 li r28,0 compare_result = the_rbtree->compare_function(the_node, iter_node); ffc0cd48: 81 3e 00 10 lwz r9,16(r30) ffc0cd4c: 7f e4 fb 78 mr r4,r31 ffc0cd50: 7f a3 eb 78 mr r3,r29 ffc0cd54: 7d 29 03 a6 mtctr r9 ffc0cd58: 4e 80 04 21 bctrl if ( _RBTree_Is_equal( compare_result ) ) { ffc0cd5c: 2c 03 00 00 cmpwi r3,0 RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater( int compare_result ) { return compare_result > 0; ffc0cd60: 7c 6a fe 70 srawi r10,r3,31 ffc0cd64: 7d 23 50 50 subf r9,r3,r10 break; } RBTree_Direction dir = (RBTree_Direction) _RBTree_Is_greater( compare_result ); iter_node = iter_node->child[dir]; ffc0cd68: 55 29 1f 7a rlwinm r9,r9,3,29,29 ffc0cd6c: 7d 3f 4a 14 add r9,r31,r9 RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; int compare_result; while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); if ( _RBTree_Is_equal( compare_result ) ) { ffc0cd70: 40 82 00 14 bne- ffc0cd84 <_RBTree_Find+0x84> found = iter_node; if ( the_rbtree->is_unique ) ffc0cd74: 89 5e 00 14 lbz r10,20(r30) ffc0cd78: 7f fc fb 78 mr r28,r31 ffc0cd7c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0cd80: 40 9e 00 3c bne- cr7,ffc0cdbc <_RBTree_Find+0xbc> break; } RBTree_Direction dir = (RBTree_Direction) _RBTree_Is_greater( compare_result ); iter_node = iter_node->child[dir]; ffc0cd84: 83 e9 00 04 lwz r31,4(r9) ) { RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; int compare_result; while (iter_node) { ffc0cd88: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0cd8c: 40 9e ff bc bne+ cr7,ffc0cd48 <_RBTree_Find+0x48> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0cd90: 7f 60 01 24 mtmsr r27 return_node = NULL; _ISR_Disable( level ); return_node = _RBTree_Find_unprotected( the_rbtree, search_node ); _ISR_Enable( level ); return return_node; } ffc0cd94: 80 01 00 24 lwz r0,36(r1) ffc0cd98: 7f 83 e3 78 mr r3,r28 ffc0cd9c: 83 61 00 0c lwz r27,12(r1) ffc0cda0: 7c 08 03 a6 mtlr r0 ffc0cda4: 83 81 00 10 lwz r28,16(r1) ffc0cda8: 83 a1 00 14 lwz r29,20(r1) ffc0cdac: 83 c1 00 18 lwz r30,24(r1) ffc0cdb0: 83 e1 00 1c lwz r31,28(r1) ffc0cdb4: 38 21 00 20 addi r1,r1,32 ffc0cdb8: 4e 80 00 20 blr compare_result = the_rbtree->compare_function(the_node, iter_node); if ( _RBTree_Is_equal( compare_result ) ) { found = iter_node; if ( the_rbtree->is_unique ) ffc0cdbc: 7f fc fb 78 mr r28,r31 ffc0cdc0: 7f 60 01 24 mtmsr r27 ffc0cdc4: 80 01 00 24 lwz r0,36(r1) ffc0cdc8: 7f 83 e3 78 mr r3,r28 ffc0cdcc: 83 61 00 0c lwz r27,12(r1) ffc0cdd0: 7c 08 03 a6 mtlr r0 ffc0cdd4: 83 81 00 10 lwz r28,16(r1) ffc0cdd8: 83 a1 00 14 lwz r29,20(r1) ffc0cddc: 83 c1 00 18 lwz r30,24(r1) ffc0cde0: 83 e1 00 1c lwz r31,28(r1) ffc0cde4: 38 21 00 20 addi r1,r1,32 ffc0cde8: 4e 80 00 20 blr RBTree_Control *the_rbtree, RBTree_Node *the_node ) { RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; ffc0cdec: 3b 80 00 00 li r28,0 <== NOT EXECUTED ffc0cdf0: 4b ff ff a0 b ffc0cd90 <_RBTree_Find+0x90> <== NOT EXECUTED =============================================================================== ffc0d29c <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { ffc0d29c: 94 21 ff e8 stwu r1,-24(r1) ffc0d2a0: 7c 08 02 a6 mflr r0 ffc0d2a4: 93 a1 00 0c stw r29,12(r1) size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; ffc0d2a8: 7c 7d 1b 79 mr. r29,r3 void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { ffc0d2ac: 90 01 00 1c stw r0,28(r1) ffc0d2b0: 93 81 00 08 stw r28,8(r1) ffc0d2b4: 93 c1 00 10 stw r30,16(r1) ffc0d2b8: 93 e1 00 14 stw r31,20(r1) size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; ffc0d2bc: 41 82 00 4c beq- ffc0d308 <_RBTree_Initialize+0x6c> <== NEVER TAKEN /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { ffc0d2c0: 2f 86 00 00 cmpwi cr7,r6,0 { the_rbtree->permanent_null = NULL; the_rbtree->root = NULL; the_rbtree->first[0] = NULL; the_rbtree->first[1] = NULL; the_rbtree->compare_function = compare_function; ffc0d2c4: 90 9d 00 10 stw r4,16(r29) RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; ffc0d2c8: 39 20 00 00 li r9,0 ffc0d2cc: 7c df 33 78 mr r31,r6 ffc0d2d0: 91 3d 00 00 stw r9,0(r29) the_rbtree->root = NULL; ffc0d2d4: 91 3d 00 04 stw r9,4(r29) the_rbtree->first[0] = NULL; ffc0d2d8: 91 3d 00 08 stw r9,8(r29) the_rbtree->first[1] = NULL; ffc0d2dc: 91 3d 00 0c stw r9,12(r29) the_rbtree->compare_function = compare_function; the_rbtree->is_unique = is_unique; ffc0d2e0: 99 1d 00 14 stb r8,20(r29) ffc0d2e4: 41 9e 00 24 beq- cr7,ffc0d308 <_RBTree_Initialize+0x6c> <== NEVER TAKEN ffc0d2e8: 7c fc 3b 78 mr r28,r7 ffc0d2ec: 7c be 2b 78 mr r30,r5 _RBTree_Insert_unprotected(the_rbtree, next); ffc0d2f0: 7f c4 f3 78 mr r4,r30 ffc0d2f4: 7f a3 eb 78 mr r3,r29 ffc0d2f8: 4b ff fb 55 bl ffc0ce4c <_RBTree_Insert_unprotected> /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { ffc0d2fc: 37 ff ff ff addic. r31,r31,-1 #include #include #include #include void _RBTree_Initialize( ffc0d300: 7f de e2 14 add r30,r30,r28 /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { ffc0d304: 40 82 ff ec bne+ ffc0d2f0 <_RBTree_Initialize+0x54> _RBTree_Insert_unprotected(the_rbtree, next); next = (RBTree_Node *) _Addresses_Add_offset( (void *) next, node_size ); } } ffc0d308: 80 01 00 1c lwz r0,28(r1) ffc0d30c: 83 81 00 08 lwz r28,8(r1) ffc0d310: 7c 08 03 a6 mtlr r0 ffc0d314: 83 a1 00 0c lwz r29,12(r1) ffc0d318: 83 c1 00 10 lwz r30,16(r1) ffc0d31c: 83 e1 00 14 lwz r31,20(r1) ffc0d320: 38 21 00 18 addi r1,r1,24 ffc0d324: 4e 80 00 20 blr =============================================================================== ffc0cb80 <_RBTree_Insert_unprotected>: */ RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { ffc0cb80: 94 21 ff e0 stwu r1,-32(r1) ffc0cb84: 7c 08 02 a6 mflr r0 ffc0cb88: 93 e1 00 1c stw r31,28(r1) if(!the_node) return (RBTree_Node*)-1; ffc0cb8c: 7c 9f 23 79 mr. r31,r4 */ RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { ffc0cb90: 90 01 00 24 stw r0,36(r1) ffc0cb94: 93 41 00 08 stw r26,8(r1) ffc0cb98: 93 61 00 0c stw r27,12(r1) ffc0cb9c: 93 81 00 10 stw r28,16(r1) ffc0cba0: 93 a1 00 14 stw r29,20(r1) ffc0cba4: 93 c1 00 18 stw r30,24(r1) if(!the_node) return (RBTree_Node*)-1; ffc0cba8: 41 82 02 b8 beq- ffc0ce60 <_RBTree_Insert_unprotected+0x2e0> RBTree_Node *iter_node = the_rbtree->root; ffc0cbac: 83 a3 00 04 lwz r29,4(r3) ffc0cbb0: 7c 7c 1b 78 mr r28,r3 int compare_result; if (!iter_node) { /* special case: first node inserted */ ffc0cbb4: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0cbb8: 40 be 00 0c bne+ cr7,ffc0cbc4 <_RBTree_Insert_unprotected+0x44> ffc0cbbc: 48 00 02 dc b ffc0ce98 <_RBTree_Insert_unprotected+0x318> (dir && _RBTree_Is_greater(compare_result)) ) { the_rbtree->first[dir] = the_node; } break; } else { iter_node = iter_node->child[dir]; ffc0cbc0: 7f dd f3 78 mr r29,r30 the_node->parent = (RBTree_Node *) the_rbtree; the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); ffc0cbc4: 81 3c 00 10 lwz r9,16(r28) ffc0cbc8: 7f a4 eb 78 mr r4,r29 ffc0cbcc: 7f e3 fb 78 mr r3,r31 ffc0cbd0: 7d 29 03 a6 mtctr r9 ffc0cbd4: 4e 80 04 21 bctrl if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) ffc0cbd8: 89 5c 00 14 lbz r10,20(r28) return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); ffc0cbdc: 7c 7a 18 f8 not r26,r3 the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) ffc0cbe0: 2f 0a 00 00 cmpwi cr6,r10,0 return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); ffc0cbe4: 57 5a 0f fe rlwinm r26,r26,1,31,31 if (!iter_node->child[dir]) { ffc0cbe8: 57 5b 10 3a rlwinm r27,r26,2,0,29 ffc0cbec: 7d 3d da 14 add r9,r29,r27 the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) ffc0cbf0: 2f 83 00 00 cmpwi cr7,r3,0 return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); if (!iter_node->child[dir]) { ffc0cbf4: 39 09 00 04 addi r8,r9,4 the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) ffc0cbf8: 41 9a 00 08 beq- cr6,ffc0cc00 <_RBTree_Insert_unprotected+0x80> ffc0cbfc: 41 9e 02 94 beq- cr7,ffc0ce90 <_RBTree_Insert_unprotected+0x310> return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); if (!iter_node->child[dir]) { ffc0cc00: 83 c9 00 04 lwz r30,4(r9) ffc0cc04: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0cc08: 40 9e ff b8 bne+ cr7,ffc0cbc0 <_RBTree_Insert_unprotected+0x40> the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; the_node->color = RBT_RED; ffc0cc0c: 39 20 00 01 li r9,1 compare_result = the_rbtree->compare_function(the_node, iter_node); if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); if (!iter_node->child[dir]) { the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; ffc0cc10: 93 df 00 08 stw r30,8(r31) RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First( const RBTree_Control *the_rbtree, RBTree_Direction dir ) { return the_rbtree->first[dir]; ffc0cc14: 7d 5c da 14 add r10,r28,r27 the_node->color = RBT_RED; ffc0cc18: 91 3f 00 0c stw r9,12(r31) iter_node->child[dir] = the_node; the_node->parent = iter_node; /* update min/max */ compare_result = the_rbtree->compare_function( ffc0cc1c: 7f e3 fb 78 mr r3,r31 ffc0cc20: 81 3c 00 10 lwz r9,16(r28) compare_result = the_rbtree->compare_function(the_node, iter_node); if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); if (!iter_node->child[dir]) { the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; ffc0cc24: 93 df 00 04 stw r30,4(r31) the_node->color = RBT_RED; iter_node->child[dir] = the_node; the_node->parent = iter_node; /* update min/max */ compare_result = the_rbtree->compare_function( ffc0cc28: 7d 29 03 a6 mtctr r9 return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); if (!iter_node->child[dir]) { the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; the_node->color = RBT_RED; iter_node->child[dir] = the_node; ffc0cc2c: 93 e8 00 00 stw r31,0(r8) the_node->parent = iter_node; ffc0cc30: 93 bf 00 00 stw r29,0(r31) /* update min/max */ compare_result = the_rbtree->compare_function( ffc0cc34: 80 8a 00 08 lwz r4,8(r10) ffc0cc38: 4e 80 04 21 bctrl the_node, _RBTree_First(the_rbtree, dir) ); if ( (!dir && _RBTree_Is_lesser(compare_result)) || ffc0cc3c: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0cc40: 40 9e 00 60 bne- cr7,ffc0cca0 <_RBTree_Insert_unprotected+0x120> ffc0cc44: 2f 83 00 00 cmpwi cr7,r3,0 ffc0cc48: 41 9c 00 60 blt- cr7,ffc0cca8 <_RBTree_Insert_unprotected+0x128> /* 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; ffc0cc4c: 38 80 00 00 li r4,0 g->color = RBT_RED; ffc0cc50: 38 60 00 01 li r3,1 _ISR_Disable( level ); return_node = _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); return return_node; } ffc0cc54: 81 3f 00 00 lwz r9,0(r31) */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( const RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; ffc0cc58: 81 49 00 00 lwz r10,0(r9) ffc0cc5c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0cc60: 7d 46 53 78 mr r6,r10 ffc0cc64: 41 9e 01 b0 beq- cr7,ffc0ce14 <_RBTree_Insert_unprotected+0x294> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0cc68: 81 09 00 0c lwz r8,12(r9) ffc0cc6c: 2f 88 00 01 cmpwi cr7,r8,1 ffc0cc70: 41 9e 00 44 beq- cr7,ffc0ccb4 <_RBTree_Insert_unprotected+0x134> /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } ffc0cc74: 80 01 00 24 lwz r0,36(r1) ffc0cc78: 7f c3 f3 78 mr r3,r30 ffc0cc7c: 83 41 00 08 lwz r26,8(r1) ffc0cc80: 7c 08 03 a6 mtlr r0 ffc0cc84: 83 61 00 0c lwz r27,12(r1) ffc0cc88: 83 81 00 10 lwz r28,16(r1) ffc0cc8c: 83 a1 00 14 lwz r29,20(r1) ffc0cc90: 83 c1 00 18 lwz r30,24(r1) ffc0cc94: 83 e1 00 1c lwz r31,28(r1) ffc0cc98: 38 21 00 20 addi r1,r1,32 ffc0cc9c: 4e 80 00 20 blr compare_result = the_rbtree->compare_function( the_node, _RBTree_First(the_rbtree, dir) ); if ( (!dir && _RBTree_Is_lesser(compare_result)) || (dir && _RBTree_Is_greater(compare_result)) ) { ffc0cca0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0cca4: 40 bd ff a8 ble- cr7,ffc0cc4c <_RBTree_Insert_unprotected+0xcc> the_rbtree->first[dir] = the_node; ffc0cca8: 7f 9c da 14 add r28,r28,r27 ffc0ccac: 93 fc 00 08 stw r31,8(r28) ffc0ccb0: 4b ff ff 9c b ffc0cc4c <_RBTree_Insert_unprotected+0xcc> ) { 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; ffc0ccb4: 81 0a 00 00 lwz r8,0(r10) ffc0ccb8: 80 ea 00 04 lwz r7,4(r10) ffc0ccbc: 2f 88 00 00 cmpwi cr7,r8,0 ffc0ccc0: 41 9e 00 24 beq- cr7,ffc0cce4 <_RBTree_Insert_unprotected+0x164><== 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]) ffc0ccc4: 7f 89 38 00 cmpw cr7,r9,r7 ffc0ccc8: 7c e8 3b 78 mr r8,r7 ffc0cccc: 41 9e 01 8c beq- cr7,ffc0ce58 <_RBTree_Insert_unprotected+0x2d8> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); ffc0ccd0: 2f 88 00 00 cmpwi cr7,r8,0 ffc0ccd4: 41 9e 00 10 beq- cr7,ffc0cce4 <_RBTree_Insert_unprotected+0x164> ffc0ccd8: 80 a8 00 0c lwz r5,12(r8) ffc0ccdc: 2f 85 00 01 cmpwi cr7,r5,1 ffc0cce0: 41 9e 01 64 beq- cr7,ffc0ce44 <_RBTree_Insert_unprotected+0x2c4> 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]; ffc0cce4: 81 09 00 04 lwz r8,4(r9) RBTree_Direction pdir = the_node->parent != g->child[0]; ffc0cce8: 7d 27 3a 78 xor r7,r9,r7 ffc0ccec: 7c e7 00 34 cntlzw r7,r7 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]; ffc0ccf0: 7f e8 42 78 xor r8,r31,r8 ffc0ccf4: 7d 08 00 34 cntlzw r8,r8 RBTree_Direction pdir = the_node->parent != g->child[0]; ffc0ccf8: 54 e7 d9 7e rlwinm r7,r7,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]; ffc0ccfc: 55 08 d9 7e rlwinm r8,r8,27,5,31 RBTree_Direction pdir = the_node->parent != g->child[0]; ffc0cd00: 68 e7 00 01 xori r7,r7,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]; ffc0cd04: 69 08 00 01 xori r8,r8,1 RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { ffc0cd08: 7f 88 38 00 cmpw cr7,r8,r7 ffc0cd0c: 41 9e 00 7c beq- cr7,ffc0cd88 <_RBTree_Insert_unprotected+0x208> */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); ffc0cd10: 68 e5 00 01 xori r5,r7,1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; ffc0cd14: 54 a5 10 3a rlwinm r5,r5,2,0,29 ffc0cd18: 7c a9 2a 14 add r5,r9,r5 ffc0cd1c: 81 05 00 04 lwz r8,4(r5) ffc0cd20: 54 eb 10 3a rlwinm r11,r7,2,0,29 ffc0cd24: 2f 88 00 00 cmpwi cr7,r8,0 ffc0cd28: 41 9e 00 54 beq- cr7,ffc0cd7c <_RBTree_Insert_unprotected+0x1fc><== NEVER TAKEN c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; ffc0cd2c: 7f a8 5a 14 add r29,r8,r11 ffc0cd30: 80 1d 00 04 lwz r0,4(r29) ffc0cd34: 90 05 00 04 stw r0,4(r5) if (c->child[dir]) ffc0cd38: 80 bd 00 04 lwz r5,4(r29) ffc0cd3c: 2f 85 00 00 cmpwi cr7,r5,0 ffc0cd40: 41 9e 00 0c beq- cr7,ffc0cd4c <_RBTree_Insert_unprotected+0x1cc> c->child[dir]->parent = the_node; ffc0cd44: 91 25 00 00 stw r9,0(r5) ffc0cd48: 81 49 00 00 lwz r10,0(r9) c->child[dir] = the_node; ffc0cd4c: 7c a8 5a 14 add r5,r8,r11 the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; ffc0cd50: 91 48 00 00 stw r10,0(r8) the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc0cd54: 91 25 00 04 stw r9,4(r5) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0cd58: 80 aa 00 04 lwz r5,4(r10) c->parent = the_node->parent; the_node->parent = c; ffc0cd5c: 91 09 00 00 stw r8,0(r9) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0cd60: 7d 25 2a 78 xor r5,r9,r5 ffc0cd64: 7c a5 00 34 cntlzw r5,r5 ffc0cd68: 54 a5 d9 7e rlwinm r5,r5,27,5,31 ffc0cd6c: 68 a5 00 01 xori r5,r5,1 ffc0cd70: 54 a5 10 3a rlwinm r5,r5,2,0,29 ffc0cd74: 7d 4a 2a 14 add r10,r10,r5 ffc0cd78: 91 0a 00 04 stw r8,4(r10) _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; ffc0cd7c: 7f ff 5a 14 add r31,r31,r11 ffc0cd80: 83 ff 00 04 lwz r31,4(r31) ffc0cd84: 81 3f 00 00 lwz r9,0(r31) } the_node->parent->color = RBT_BLACK; g->color = RBT_RED; /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); ffc0cd88: 20 e7 00 01 subfic r7,r7,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; ffc0cd8c: 90 89 00 0c stw r4,12(r9) ffc0cd90: 68 e8 00 01 xori r8,r7,1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; ffc0cd94: 55 08 10 3a rlwinm r8,r8,2,0,29 g->color = RBT_RED; ffc0cd98: 90 66 00 0c stw r3,12(r6) ffc0cd9c: 7d 06 42 14 add r8,r6,r8 ffc0cda0: 81 48 00 04 lwz r10,4(r8) ffc0cda4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0cda8: 41 be fe ac beq- cr7,ffc0cc54 <_RBTree_Insert_unprotected+0xd4><== NEVER TAKEN c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; ffc0cdac: 54 e7 10 3a rlwinm r7,r7,2,0,29 ffc0cdb0: 7d 2a 3a 14 add r9,r10,r7 ffc0cdb4: 80 a9 00 04 lwz r5,4(r9) ffc0cdb8: 90 a8 00 04 stw r5,4(r8) if (c->child[dir]) ffc0cdbc: 81 29 00 04 lwz r9,4(r9) ffc0cdc0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0cdc4: 41 9e 00 08 beq- cr7,ffc0cdcc <_RBTree_Insert_unprotected+0x24c> c->child[dir]->parent = the_node; ffc0cdc8: 90 c9 00 00 stw r6,0(r9) c->child[dir] = the_node; ffc0cdcc: 7c ea 3a 14 add r7,r10,r7 the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0cdd0: 81 06 00 00 lwz r8,0(r6) the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; ffc0cdd4: 90 c7 00 04 stw r6,4(r7) the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0cdd8: 81 28 00 04 lwz r9,4(r8) c->parent = the_node->parent; ffc0cddc: 91 0a 00 00 stw r8,0(r10) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0cde0: 7c c9 4a 78 xor r9,r6,r9 ffc0cde4: 7d 29 00 34 cntlzw r9,r9 c->parent = the_node->parent; the_node->parent = c; ffc0cde8: 91 46 00 00 stw r10,0(r6) if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; ffc0cdec: 55 29 d9 7e rlwinm r9,r9,27,5,31 ffc0cdf0: 69 29 00 01 xori r9,r9,1 ffc0cdf4: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0cdf8: 7d 08 4a 14 add r8,r8,r9 ffc0cdfc: 91 48 00 04 stw r10,4(r8) _ISR_Disable( level ); return_node = _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); return return_node; } ffc0ce00: 81 3f 00 00 lwz r9,0(r31) */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( const RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; ffc0ce04: 81 49 00 00 lwz r10,0(r9) ffc0ce08: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0ce0c: 7d 46 53 78 mr r6,r10 ffc0ce10: 40 9e fe 58 bne+ cr7,ffc0cc68 <_RBTree_Insert_unprotected+0xe8><== ALWAYS TAKEN /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } ffc0ce14: 80 01 00 24 lwz r0,36(r1) ffc0ce18: 7f c3 f3 78 mr r3,r30 /* 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; ffc0ce1c: 91 5f 00 0c stw r10,12(r31) /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } ffc0ce20: 7c 08 03 a6 mtlr r0 ffc0ce24: 83 41 00 08 lwz r26,8(r1) ffc0ce28: 83 61 00 0c lwz r27,12(r1) ffc0ce2c: 83 81 00 10 lwz r28,16(r1) ffc0ce30: 83 a1 00 14 lwz r29,20(r1) ffc0ce34: 83 c1 00 18 lwz r30,24(r1) ffc0ce38: 83 e1 00 1c lwz r31,28(r1) ffc0ce3c: 38 21 00 20 addi r1,r1,32 ffc0ce40: 4e 80 00 20 blr u = _RBTree_Parent_sibling(the_node); g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { the_node->parent->color = RBT_BLACK; ffc0ce44: 90 89 00 0c stw r4,12(r9) u->color = RBT_BLACK; g->color = RBT_RED; ffc0ce48: 7d 5f 53 78 mr r31,r10 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; ffc0ce4c: 90 88 00 0c stw r4,12(r8) g->color = RBT_RED; ffc0ce50: 90 aa 00 0c stw r5,12(r10) ffc0ce54: 4b ff fe 00 b ffc0cc54 <_RBTree_Insert_unprotected+0xd4> if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; ffc0ce58: 81 0a 00 08 lwz r8,8(r10) ffc0ce5c: 4b ff fe 74 b ffc0ccd0 <_RBTree_Insert_unprotected+0x150> /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } ffc0ce60: 80 01 00 24 lwz r0,36(r1) RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { if(!the_node) return (RBTree_Node*)-1; ffc0ce64: 3b c0 ff ff li r30,-1 /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } ffc0ce68: 7f c3 f3 78 mr r3,r30 ffc0ce6c: 83 41 00 08 lwz r26,8(r1) ffc0ce70: 7c 08 03 a6 mtlr r0 ffc0ce74: 83 61 00 0c lwz r27,12(r1) ffc0ce78: 83 81 00 10 lwz r28,16(r1) ffc0ce7c: 83 a1 00 14 lwz r29,20(r1) ffc0ce80: 83 c1 00 18 lwz r30,24(r1) ffc0ce84: 83 e1 00 1c lwz r31,28(r1) ffc0ce88: 38 21 00 20 addi r1,r1,32 ffc0ce8c: 4e 80 00 20 blr the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) ffc0ce90: 7f be eb 78 mr r30,r29 ffc0ce94: 4b ff fd e0 b ffc0cc74 <_RBTree_Insert_unprotected+0xf4> RBTree_Node *iter_node = the_rbtree->root; int compare_result; if (!iter_node) { /* special case: first node inserted */ the_node->color = RBT_BLACK; ffc0ce98: 93 bf 00 0c stw r29,12(r31) } /* while(iter_node) */ /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; ffc0ce9c: 3b c0 00 00 li r30,0 RBTree_Node *iter_node = the_rbtree->root; int compare_result; if (!iter_node) { /* special case: first node inserted */ the_node->color = RBT_BLACK; the_rbtree->root = the_node; ffc0cea0: 93 e3 00 04 stw r31,4(r3) the_rbtree->first[0] = the_rbtree->first[1] = the_node; ffc0cea4: 93 e3 00 0c stw r31,12(r3) ffc0cea8: 93 e3 00 08 stw r31,8(r3) the_node->parent = (RBTree_Node *) the_rbtree; ffc0ceac: 90 7f 00 00 stw r3,0(r31) the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; ffc0ceb0: 93 bf 00 08 stw r29,8(r31) ffc0ceb4: 93 bf 00 04 stw r29,4(r31) ffc0ceb8: 4b ff fd bc b ffc0cc74 <_RBTree_Insert_unprotected+0xf4> =============================================================================== ffc0cef8 <_RBTree_Iterate_unprotected>: const RBTree_Control *rbtree, RBTree_Direction dir, RBTree_Visitor visitor, void *visitor_arg ) { ffc0cef8: 94 21 ff e0 stwu r1,-32(r1) ffc0cefc: 7c 08 02 a6 mflr r0 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); ffc0cf00: 7c 89 00 34 cntlzw r9,r4 ffc0cf04: 55 29 d9 7e rlwinm r9,r9,27,5,31 ffc0cf08: 90 01 00 24 stw r0,36(r1) RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First( const RBTree_Control *the_rbtree, RBTree_Direction dir ) { return the_rbtree->first[dir]; ffc0cf0c: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0cf10: 7c 63 4a 14 add r3,r3,r9 ffc0cf14: 93 e1 00 1c stw r31,28(r1) ffc0cf18: 83 e3 00 08 lwz r31,8(r3) ffc0cf1c: 93 a1 00 14 stw r29,20(r1) RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { ffc0cf20: 2f 9f 00 00 cmpwi cr7,r31,0 const RBTree_Control *rbtree, RBTree_Direction dir, RBTree_Visitor visitor, void *visitor_arg ) { ffc0cf24: 93 61 00 0c stw r27,12(r1) ffc0cf28: 7c bb 2b 78 mr r27,r5 ffc0cf2c: 93 81 00 10 stw r28,16(r1) ffc0cf30: 7c dc 33 78 mr r28,r6 ffc0cf34: 93 c1 00 18 stw r30,24(r1) */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); ffc0cf38: 7c 9e 23 78 mr r30,r4 RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { ffc0cf3c: 41 9e 00 38 beq- cr7,ffc0cf74 <_RBTree_Iterate_unprotected+0x7c> stop = (*visitor)( current, dir, visitor_arg ); ffc0cf40: 7f e3 fb 78 mr r3,r31 ffc0cf44: 7f 69 03 a6 mtctr r27 ffc0cf48: 7f 85 e3 78 mr r5,r28 ffc0cf4c: 7f c4 f3 78 mr r4,r30 ffc0cf50: 4e 80 04 21 bctrl current = _RBTree_Next_unprotected( current, dir ); ffc0cf54: 7f c4 f3 78 mr r4,r30 RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { stop = (*visitor)( current, dir, visitor_arg ); ffc0cf58: 7c 7d 1b 78 mr r29,r3 current = _RBTree_Next_unprotected( current, dir ); ffc0cf5c: 7f e3 fb 78 mr r3,r31 ffc0cf60: 48 00 00 39 bl ffc0cf98 <_RBTree_Next_unprotected> { RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { ffc0cf64: 2f 1d 00 00 cmpwi cr6,r29,0 stop = (*visitor)( current, dir, visitor_arg ); current = _RBTree_Next_unprotected( current, dir ); ffc0cf68: 7c 7f 1b 78 mr r31,r3 { RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { ffc0cf6c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0cf70: 41 9a ff cc beq+ cr6,ffc0cf3c <_RBTree_Iterate_unprotected+0x44><== ALWAYS TAKEN stop = (*visitor)( current, dir, visitor_arg ); current = _RBTree_Next_unprotected( current, dir ); } } ffc0cf74: 80 01 00 24 lwz r0,36(r1) ffc0cf78: 83 61 00 0c lwz r27,12(r1) ffc0cf7c: 7c 08 03 a6 mtlr r0 ffc0cf80: 83 81 00 10 lwz r28,16(r1) ffc0cf84: 83 a1 00 14 lwz r29,20(r1) ffc0cf88: 83 c1 00 18 lwz r30,24(r1) ffc0cf8c: 83 e1 00 1c lwz r31,28(r1) ffc0cf90: 38 21 00 20 addi r1,r1,32 ffc0cf94: 4e 80 00 20 blr =============================================================================== ffc0ae30 <_RTEMS_signal_Post_switch_hook>: #include #include #include static void _RTEMS_signal_Post_switch_hook( Thread_Control *executing ) { ffc0ae30: 94 21 ff e0 stwu r1,-32(r1) ffc0ae34: 7c 08 02 a6 mflr r0 ffc0ae38: 90 01 00 24 stw r0,36(r1) ffc0ae3c: 93 e1 00 1c stw r31,28(r1) RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc0ae40: 83 e3 01 4c lwz r31,332(r3) #include #include #include static void _RTEMS_signal_Post_switch_hook( Thread_Control *executing ) { ffc0ae44: 93 c1 00 18 stw r30,24(r1) ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; if ( !api ) ffc0ae48: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0ae4c: 41 9e 00 2c beq- cr7,ffc0ae78 <_RTEMS_signal_Post_switch_hook+0x48><== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0ae50: 7d 20 00 a6 mfmsr r9 ffc0ae54: 7d 50 42 a6 mfsprg r10,0 ffc0ae58: 7d 2a 50 78 andc r10,r9,r10 ffc0ae5c: 7d 40 01 24 mtmsr r10 asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; asr->signals_posted = 0; ffc0ae60: 39 40 00 00 li r10,0 */ asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; ffc0ae64: 83 df 00 14 lwz r30,20(r31) asr->signals_posted = 0; ffc0ae68: 91 5f 00 14 stw r10,20(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0ae6c: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ ffc0ae70: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0ae74: 40 9e 00 1c bne- cr7,ffc0ae90 <_RTEMS_signal_Post_switch_hook+0x60> (*asr->handler)( signal_set ); asr->nest_level -= 1; rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); } ffc0ae78: 80 01 00 24 lwz r0,36(r1) ffc0ae7c: 83 c1 00 18 lwz r30,24(r1) ffc0ae80: 7c 08 03 a6 mtlr r0 ffc0ae84: 83 e1 00 1c lwz r31,28(r1) ffc0ae88: 38 21 00 20 addi r1,r1,32 ffc0ae8c: 4e 80 00 20 blr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; ffc0ae90: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0ae94: 38 80 00 00 li r4,0 ffc0ae98: 80 7f 00 10 lwz r3,16(r31) ffc0ae9c: 38 a1 00 08 addi r5,r1,8 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; ffc0aea0: 39 29 00 01 addi r9,r9,1 ffc0aea4: 91 3f 00 1c stw r9,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0aea8: 60 84 ff ff ori r4,r4,65535 ffc0aeac: 48 00 05 69 bl ffc0b414 (*asr->handler)( signal_set ); ffc0aeb0: 81 3f 00 0c lwz r9,12(r31) ffc0aeb4: 7f c3 f3 78 mr r3,r30 ffc0aeb8: 7d 29 03 a6 mtctr r9 ffc0aebc: 4e 80 04 21 bctrl asr->nest_level -= 1; ffc0aec0: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0aec4: 80 61 00 08 lwz r3,8(r1) ffc0aec8: 38 80 00 00 li r4,0 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; ffc0aecc: 39 29 ff ff addi r9,r9,-1 ffc0aed0: 91 3f 00 1c stw r9,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0aed4: 38 a1 00 08 addi r5,r1,8 ffc0aed8: 60 84 ff ff ori r4,r4,65535 ffc0aedc: 48 00 05 39 bl ffc0b414 } ffc0aee0: 80 01 00 24 lwz r0,36(r1) ffc0aee4: 83 c1 00 18 lwz r30,24(r1) ffc0aee8: 7c 08 03 a6 mtlr r0 ffc0aeec: 83 e1 00 1c lwz r31,28(r1) ffc0aef0: 38 21 00 20 addi r1,r1,32 ffc0aef4: 4e 80 00 20 blr =============================================================================== ffc09fd8 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc09fd8: 94 21 ff d8 stwu r1,-40(r1) ffc09fdc: 7c 08 02 a6 mflr r0 rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; ffc09fe0: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc09fe4: 90 01 00 2c stw r0,44(r1) rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; ffc09fe8: 39 29 20 04 addi r9,r9,8196 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc09fec: 93 e1 00 24 stw r31,36(r1) rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; ffc09ff0: 83 e9 00 2c lwz r31,44(r9) * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc09ff4: 93 a1 00 1c stw r29,28(r1) maximum = Configuration_RTEMS_API.number_of_initialization_tasks; /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) ffc09ff8: 2f 9f 00 00 cmpwi cr7,r31,0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc09ffc: 93 c1 00 20 stw r30,32(r1) /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; maximum = Configuration_RTEMS_API.number_of_initialization_tasks; ffc0a000: 83 a9 00 28 lwz r29,40(r9) /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) ffc0a004: 41 9e 00 5c beq- cr7,ffc0a060 <_RTEMS_tasks_Initialize_user_tasks_body+0x88> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { ffc0a008: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0a00c: 3b c0 00 00 li r30,0 ffc0a010: 41 9e 00 50 beq- cr7,ffc0a060 <_RTEMS_tasks_Initialize_user_tasks_body+0x88><== NEVER TAKEN return_value = rtems_task_create( ffc0a014: 80 bf 00 04 lwz r5,4(r31) ffc0a018: 39 01 00 08 addi r8,r1,8 ffc0a01c: 80 7f 00 00 lwz r3,0(r31) ffc0a020: 80 9f 00 08 lwz r4,8(r31) ffc0a024: 80 df 00 14 lwz r6,20(r31) ffc0a028: 80 ff 00 0c lwz r7,12(r31) ffc0a02c: 4b ff fc ed bl ffc09d18 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) ffc0a030: 7c 65 1b 79 mr. r5,r3 ffc0a034: 40 82 00 48 bne- ffc0a07c <_RTEMS_tasks_Initialize_user_tasks_body+0xa4> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( ffc0a038: 80 bf 00 18 lwz r5,24(r31) ffc0a03c: 80 61 00 08 lwz r3,8(r1) ffc0a040: 80 9f 00 10 lwz r4,16(r31) ffc0a044: 48 00 00 45 bl ffc0a088 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) ffc0a048: 7c 65 1b 79 mr. r5,r3 ffc0a04c: 40 82 00 30 bne- ffc0a07c <_RTEMS_tasks_Initialize_user_tasks_body+0xa4> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { ffc0a050: 3b de 00 01 addi r30,r30,1 ffc0a054: 7f 9e e8 00 cmpw cr7,r30,r29 ffc0a058: 3b ff 00 1c addi r31,r31,28 ffc0a05c: 40 9e ff b8 bne+ cr7,ffc0a014 <_RTEMS_tasks_Initialize_user_tasks_body+0x3c><== NEVER TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } ffc0a060: 80 01 00 2c lwz r0,44(r1) ffc0a064: 83 a1 00 1c lwz r29,28(r1) ffc0a068: 7c 08 03 a6 mtlr r0 ffc0a06c: 83 c1 00 20 lwz r30,32(r1) ffc0a070: 83 e1 00 24 lwz r31,36(r1) ffc0a074: 38 21 00 28 addi r1,r1,40 ffc0a078: 4e 80 00 20 blr id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); ffc0a07c: 38 60 00 01 li r3,1 ffc0a080: 38 80 00 01 li r4,1 ffc0a084: 48 00 12 ed bl ffc0b370 <_Internal_error_Occurred> =============================================================================== ffc102ec <_RTEMS_tasks_Switch_extension>: /* * Per Task Variables */ tvp = executing->task_variables; ffc102ec: 81 23 01 58 lwz r9,344(r3) while (tvp) { ffc102f0: 2f 89 00 00 cmpwi cr7,r9,0 ffc102f4: 41 9e 00 24 beq- cr7,ffc10318 <_RTEMS_tasks_Switch_extension+0x2c> tvp->tval = *tvp->ptr; ffc102f8: 81 49 00 04 lwz r10,4(r9) *tvp->ptr = tvp->gval; ffc102fc: 81 09 00 08 lwz r8,8(r9) * Per Task Variables */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; ffc10300: 80 ea 00 00 lwz r7,0(r10) ffc10304: 90 e9 00 0c stw r7,12(r9) *tvp->ptr = tvp->gval; ffc10308: 91 0a 00 00 stw r8,0(r10) tvp = (rtems_task_variable_t *)tvp->next; ffc1030c: 81 29 00 00 lwz r9,0(r9) /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { ffc10310: 2f 89 00 00 cmpwi cr7,r9,0 ffc10314: 40 9e ff e4 bne+ cr7,ffc102f8 <_RTEMS_tasks_Switch_extension+0xc><== NEVER TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; ffc10318: 81 24 01 58 lwz r9,344(r4) while (tvp) { ffc1031c: 2f 89 00 00 cmpwi cr7,r9,0 ffc10320: 4d 9e 00 20 beqlr cr7 tvp->gval = *tvp->ptr; ffc10324: 81 49 00 04 lwz r10,4(r9) *tvp->ptr = tvp->tval; ffc10328: 81 09 00 0c lwz r8,12(r9) tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { tvp->gval = *tvp->ptr; ffc1032c: 80 ea 00 00 lwz r7,0(r10) ffc10330: 90 e9 00 08 stw r7,8(r9) *tvp->ptr = tvp->tval; ffc10334: 91 0a 00 00 stw r8,0(r10) tvp = (rtems_task_variable_t *)tvp->next; ffc10338: 81 29 00 00 lwz r9,0(r9) *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { ffc1033c: 2f 89 00 00 cmpwi cr7,r9,0 ffc10340: 40 9e ff e4 bne+ cr7,ffc10324 <_RTEMS_tasks_Switch_extension+0x38><== NEVER TAKEN ffc10344: 4e 80 00 20 blr =============================================================================== ffc3f0b4 <_Rate_monotonic_Get_status>: bool _Rate_monotonic_Get_status( Rate_monotonic_Control *the_period, Rate_monotonic_Period_time_t *wall_since_last_period, Thread_CPU_usage_t *cpu_since_last_period ) { ffc3f0b4: 94 21 ff d8 stwu r1,-40(r1) ffc3f0b8: 7c 08 02 a6 mflr r0 ffc3f0bc: 93 81 00 18 stw r28,24(r1) ffc3f0c0: 7c 9c 23 78 mr r28,r4 */ static inline void _TOD_Get_uptime( Timestamp_Control *time ) { _TOD_Get_with_nanoseconds( time, &_TOD.uptime ); ffc3f0c4: 3c 80 00 00 lis r4,0 ffc3f0c8: 90 01 00 2c stw r0,44(r1) ffc3f0cc: 38 84 63 e8 addi r4,r4,25576 ffc3f0d0: 93 c1 00 20 stw r30,32(r1) ffc3f0d4: 7c 7e 1b 78 mr r30,r3 ffc3f0d8: 38 61 00 08 addi r3,r1,8 ffc3f0dc: 93 a1 00 1c stw r29,28(r1) ffc3f0e0: 93 e1 00 24 stw r31,36(r1) ffc3f0e4: 7c bf 2b 78 mr r31,r5 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; ffc3f0e8: 83 be 00 40 lwz r29,64(r30) ffc3f0ec: 4b fc b5 65 bl ffc0a650 <_TOD_Get_with_nanoseconds> * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { ffc3f0f0: 3c e0 00 00 lis r7,0 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; ffc3f0f4: 81 1e 00 50 lwz r8,80(r30) ffc3f0f8: 38 e7 69 20 addi r7,r7,26912 ffc3f0fc: 81 3e 00 54 lwz r9,84(r30) ffc3f100: 81 47 00 10 lwz r10,16(r7) /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( ffc3f104: 81 61 00 0c lwz r11,12(r1) * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { ffc3f108: 7f 8a e8 00 cmpw cr7,r10,r29 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( ffc3f10c: 81 41 00 08 lwz r10,8(r1) ffc3f110: 7d 29 58 10 subfc r9,r9,r11 ffc3f114: 7d 08 51 10 subfe r8,r8,r10 ffc3f118: 91 1c 00 00 stw r8,0(r28) ffc3f11c: 91 3c 00 04 stw r9,4(r28) #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; ffc3f120: 81 1d 00 80 lwz r8,128(r29) ffc3f124: 81 3d 00 84 lwz r9,132(r29) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { ffc3f128: 41 9e 00 28 beq- cr7,ffc3f150 <_Rate_monotonic_Get_status+0x9c> if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; ffc3f12c: 38 60 00 01 li r3,1 } ffc3f130: 80 01 00 2c lwz r0,44(r1) ffc3f134: 83 81 00 18 lwz r28,24(r1) ffc3f138: 7c 08 03 a6 mtlr r0 ffc3f13c: 83 a1 00 1c lwz r29,28(r1) ffc3f140: 83 c1 00 20 lwz r30,32(r1) ffc3f144: 83 e1 00 24 lwz r31,36(r1) ffc3f148: 38 21 00 28 addi r1,r1,40 ffc3f14c: 4e 80 00 20 blr ffc3f150: 80 87 00 20 lwz r4,32(r7) ffc3f154: 80 a7 00 24 lwz r5,36(r7) case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc3f158: 80 de 00 48 lwz r6,72(r30) ffc3f15c: 7d 65 58 10 subfc r11,r5,r11 ffc3f160: 7d 44 51 10 subfe r10,r4,r10 ffc3f164: 80 fe 00 4c lwz r7,76(r30) static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; ffc3f168: 7d 29 58 14 addc r9,r9,r11 ffc3f16c: 7d 08 51 14 adde r8,r8,r10 /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) ffc3f170: 7f 86 40 00 cmpw cr7,r6,r8 ffc3f174: 41 9d 00 44 bgt- cr7,ffc3f1b8 <_Rate_monotonic_Get_status+0x104><== NEVER TAKEN ffc3f178: 41 9e 00 38 beq- cr7,ffc3f1b0 <_Rate_monotonic_Get_status+0xfc> return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } ffc3f17c: 80 01 00 2c lwz r0,44(r1) const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; ffc3f180: 7d 27 48 10 subfc r9,r7,r9 ffc3f184: 7d 06 41 10 subfe r8,r6,r8 ffc3f188: 91 1f 00 00 stw r8,0(r31) ffc3f18c: 7c 08 03 a6 mtlr r0 if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; ffc3f190: 38 60 00 01 li r3,1 ffc3f194: 91 3f 00 04 stw r9,4(r31) } ffc3f198: 83 81 00 18 lwz r28,24(r1) ffc3f19c: 83 a1 00 1c lwz r29,28(r1) ffc3f1a0: 83 c1 00 20 lwz r30,32(r1) ffc3f1a4: 83 e1 00 24 lwz r31,36(r1) ffc3f1a8: 38 21 00 28 addi r1,r1,40 ffc3f1ac: 4e 80 00 20 blr /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) ffc3f1b0: 7f 87 48 40 cmplw cr7,r7,r9 ffc3f1b4: 40 9d ff c8 ble+ cr7,ffc3f17c <_Rate_monotonic_Get_status+0xc8> return false; ffc3f1b8: 38 60 00 00 li r3,0 ffc3f1bc: 4b ff ff 74 b ffc3f130 <_Rate_monotonic_Get_status+0x7c> =============================================================================== ffc3f61c <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { ffc3f61c: 94 21 ff e0 stwu r1,-32(r1) ffc3f620: 7c 08 02 a6 mflr r0 ffc3f624: 7c 64 1b 78 mr r4,r3 ffc3f628: 3c 60 00 00 lis r3,0 ffc3f62c: 90 01 00 24 stw r0,36(r1) ffc3f630: 38 63 6f 3c addi r3,r3,28476 ffc3f634: 38 a1 00 08 addi r5,r1,8 ffc3f638: 93 e1 00 1c stw r31,28(r1) ffc3f63c: 4b fc bc 59 bl ffc0b294 <_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 ) { ffc3f640: 81 21 00 08 lwz r9,8(r1) ffc3f644: 2f 89 00 00 cmpwi cr7,r9,0 ffc3f648: 40 9e 00 4c bne- cr7,ffc3f694 <_Rate_monotonic_Timeout+0x78><== NEVER TAKEN ffc3f64c: 7c 7f 1b 78 mr r31,r3 case OBJECTS_LOCAL: the_thread = the_period->owner; ffc3f650: 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); ffc3f654: 81 23 00 10 lwz r9,16(r3) if ( _States_Is_waiting_for_period( the_thread->current_state ) && ffc3f658: 71 2a 40 00 andi. r10,r9,16384 ffc3f65c: 41 82 00 14 beq- ffc3f670 <_Rate_monotonic_Timeout+0x54> ffc3f660: 81 43 00 20 lwz r10,32(r3) ffc3f664: 81 3f 00 08 lwz r9,8(r31) ffc3f668: 7f 8a 48 00 cmpw cr7,r10,r9 ffc3f66c: 41 9e 00 68 beq- cr7,ffc3f6d4 <_Rate_monotonic_Timeout+0xb8> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { ffc3f670: 81 3f 00 38 lwz r9,56(r31) ffc3f674: 2f 89 00 01 cmpwi cr7,r9,1 ffc3f678: 41 9e 00 30 beq- cr7,ffc3f6a8 <_Rate_monotonic_Timeout+0x8c> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; ffc3f67c: 39 20 00 04 li r9,4 ffc3f680: 91 3f 00 38 stw r9,56(r31) * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc3f684: 3d 20 00 00 lis r9,0 ffc3f688: 81 49 34 e4 lwz r10,13540(r9) --level; ffc3f68c: 39 4a ff ff addi r10,r10,-1 _Thread_Dispatch_disable_level = level; ffc3f690: 91 49 34 e4 stw r10,13540(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc3f694: 80 01 00 24 lwz r0,36(r1) ffc3f698: 83 e1 00 1c lwz r31,28(r1) ffc3f69c: 7c 08 03 a6 mtlr r0 ffc3f6a0: 38 21 00 20 addi r1,r1,32 ffc3f6a4: 4e 80 00 20 blr _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; ffc3f6a8: 39 20 00 03 li r9,3 ffc3f6ac: 91 3f 00 38 stw r9,56(r31) _Rate_monotonic_Initiate_statistics( the_period ); ffc3f6b0: 7f e3 fb 78 mr r3,r31 ffc3f6b4: 4b ff fc 5d bl ffc3f310 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc3f6b8: 81 3f 00 3c lwz r9,60(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc3f6bc: 3c 60 00 00 lis r3,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc3f6c0: 91 3f 00 1c stw r9,28(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc3f6c4: 38 63 65 28 addi r3,r3,25896 ffc3f6c8: 38 9f 00 10 addi r4,r31,16 ffc3f6cc: 4b fc db bd bl ffc0d288 <_Watchdog_Insert> ffc3f6d0: 4b ff ff b4 b ffc3f684 <_Rate_monotonic_Timeout+0x68> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc3f6d4: 3c 80 10 07 lis r4,4103 ffc3f6d8: 60 84 ff f8 ori r4,r4,65528 ffc3f6dc: 4b fc c7 09 bl ffc0bde4 <_Thread_Clear_state> ffc3f6e0: 4b ff ff d0 b ffc3f6b0 <_Rate_monotonic_Timeout+0x94> =============================================================================== ffc3f1c0 <_Rate_monotonic_Update_statistics>: } static void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { ffc3f1c0: 94 21 ff e0 stwu r1,-32(r1) ffc3f1c4: 7c 08 02 a6 mflr r0 ffc3f1c8: 90 01 00 24 stw r0,36(r1) * Update the counts. */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) ffc3f1cc: 81 43 00 38 lwz r10,56(r3) /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; ffc3f1d0: 81 23 00 58 lwz r9,88(r3) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) ffc3f1d4: 2f 8a 00 04 cmpwi cr7,r10,4 } static void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { ffc3f1d8: 93 e1 00 1c stw r31,28(r1) /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; ffc3f1dc: 39 29 00 01 addi r9,r9,1 } static void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { ffc3f1e0: 7c 7f 1b 78 mr r31,r3 /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; ffc3f1e4: 91 23 00 58 stw r9,88(r3) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) ffc3f1e8: 41 9e 00 cc beq- cr7,ffc3f2b4 <_Rate_monotonic_Update_statistics+0xf4> stats->missed_count++; /* * Grab status for time statistics. */ valid_status = ffc3f1ec: 7f e3 fb 78 mr r3,r31 ffc3f1f0: 38 81 00 08 addi r4,r1,8 ffc3f1f4: 38 a1 00 10 addi r5,r1,16 ffc3f1f8: 4b ff fe bd bl ffc3f0b4 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) ffc3f1fc: 2f 83 00 00 cmpwi cr7,r3,0 ffc3f200: 41 9e 00 8c beq- cr7,ffc3f28c <_Rate_monotonic_Update_statistics+0xcc> /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); ffc3f204: 81 41 00 10 lwz r10,16(r1) if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) ffc3f208: 80 ff 00 60 lwz r7,96(r31) static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; ffc3f20c: 81 1f 00 70 lwz r8,112(r31) ffc3f210: 7f 87 50 00 cmpw cr7,r7,r10 ffc3f214: 81 3f 00 74 lwz r9,116(r31) /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); ffc3f218: 81 61 00 14 lwz r11,20(r1) ffc3f21c: 7d 29 58 14 addc r9,r9,r11 ffc3f220: 7d 08 51 14 adde r8,r8,r10 ffc3f224: 91 1f 00 70 stw r8,112(r31) ffc3f228: 91 3f 00 74 stw r9,116(r31) if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) ffc3f22c: 40 9d 00 74 ble- cr7,ffc3f2a0 <_Rate_monotonic_Update_statistics+0xe0> stats->min_cpu_time = executed; ffc3f230: 91 5f 00 60 stw r10,96(r31) ffc3f234: 91 7f 00 64 stw r11,100(r31) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) ffc3f238: 81 3f 00 68 lwz r9,104(r31) ffc3f23c: 7f 89 50 00 cmpw cr7,r9,r10 ffc3f240: 41 9c 00 c4 blt- cr7,ffc3f304 <_Rate_monotonic_Update_statistics+0x144><== NEVER TAKEN ffc3f244: 41 9e 00 b4 beq- cr7,ffc3f2f8 <_Rate_monotonic_Update_statistics+0x138><== ALWAYS TAKEN /* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); ffc3f248: 81 41 00 08 lwz r10,8(r1) if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) ffc3f24c: 80 ff 00 78 lwz r7,120(r31) ffc3f250: 81 1f 00 88 lwz r8,136(r31) ffc3f254: 7f 87 50 00 cmpw cr7,r7,r10 ffc3f258: 81 3f 00 8c lwz r9,140(r31) /* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); ffc3f25c: 81 61 00 0c lwz r11,12(r1) ffc3f260: 7d 29 58 14 addc r9,r9,r11 ffc3f264: 7d 08 51 14 adde r8,r8,r10 ffc3f268: 91 1f 00 88 stw r8,136(r31) ffc3f26c: 91 3f 00 8c stw r9,140(r31) if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) ffc3f270: 41 9d 00 60 bgt- cr7,ffc3f2d0 <_Rate_monotonic_Update_statistics+0x110> ffc3f274: 41 9e 00 50 beq- cr7,ffc3f2c4 <_Rate_monotonic_Update_statistics+0x104><== ALWAYS TAKEN stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) ffc3f278: 81 3f 00 80 lwz r9,128(r31) ffc3f27c: 7f 89 50 00 cmpw cr7,r9,r10 ffc3f280: 40 9c 00 64 bge- cr7,ffc3f2e4 <_Rate_monotonic_Update_statistics+0x124><== ALWAYS TAKEN stats->max_wall_time = since_last_period; ffc3f284: 91 5f 00 80 stw r10,128(r31) ffc3f288: 91 7f 00 84 stw r11,132(r31) stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } ffc3f28c: 80 01 00 24 lwz r0,36(r1) ffc3f290: 83 e1 00 1c lwz r31,28(r1) ffc3f294: 7c 08 03 a6 mtlr r0 ffc3f298: 38 21 00 20 addi r1,r1,32 ffc3f29c: 4e 80 00 20 blr * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) ffc3f2a0: 40 be ff 98 bne- cr7,ffc3f238 <_Rate_monotonic_Update_statistics+0x78><== NEVER TAKEN ffc3f2a4: 81 3f 00 64 lwz r9,100(r31) ffc3f2a8: 7f 89 58 40 cmplw cr7,r9,r11 ffc3f2ac: 40 bd ff 8c ble- cr7,ffc3f238 <_Rate_monotonic_Update_statistics+0x78> ffc3f2b0: 4b ff ff 80 b ffc3f230 <_Rate_monotonic_Update_statistics+0x70> */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; ffc3f2b4: 81 23 00 5c lwz r9,92(r3) ffc3f2b8: 39 29 00 01 addi r9,r9,1 ffc3f2bc: 91 23 00 5c stw r9,92(r3) ffc3f2c0: 4b ff ff 2c b ffc3f1ec <_Rate_monotonic_Update_statistics+0x2c> * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) ffc3f2c4: 81 3f 00 7c lwz r9,124(r31) ffc3f2c8: 7f 89 58 40 cmplw cr7,r9,r11 ffc3f2cc: 40 bd ff ac ble- cr7,ffc3f278 <_Rate_monotonic_Update_statistics+0xb8> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) ffc3f2d0: 81 3f 00 80 lwz r9,128(r31) */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; ffc3f2d4: 91 5f 00 78 stw r10,120(r31) if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) ffc3f2d8: 7f 89 50 00 cmpw cr7,r9,r10 */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; ffc3f2dc: 91 7f 00 7c stw r11,124(r31) if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) ffc3f2e0: 41 9c ff a4 blt+ cr7,ffc3f284 <_Rate_monotonic_Update_statistics+0xc4><== NEVER TAKEN ffc3f2e4: 40 be ff a8 bne- cr7,ffc3f28c <_Rate_monotonic_Update_statistics+0xcc> ffc3f2e8: 81 3f 00 84 lwz r9,132(r31) ffc3f2ec: 7f 89 58 40 cmplw cr7,r9,r11 ffc3f2f0: 41 9c ff 94 blt+ cr7,ffc3f284 <_Rate_monotonic_Update_statistics+0xc4> ffc3f2f4: 4b ff ff 98 b ffc3f28c <_Rate_monotonic_Update_statistics+0xcc> _Timestamp_Add_to( &stats->total_cpu_time, &executed ); if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) stats->min_cpu_time = executed; if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) ffc3f2f8: 81 3f 00 6c lwz r9,108(r31) ffc3f2fc: 7f 89 58 40 cmplw cr7,r9,r11 ffc3f300: 40 bc ff 48 bge- cr7,ffc3f248 <_Rate_monotonic_Update_statistics+0x88> stats->max_cpu_time = executed; ffc3f304: 91 5f 00 68 stw r10,104(r31) ffc3f308: 91 7f 00 6c stw r11,108(r31) ffc3f30c: 4b ff ff 3c b ffc3f248 <_Rate_monotonic_Update_statistics+0x88> =============================================================================== ffc0c974 <_Scheduler_CBS_Allocate>: #include void *_Scheduler_CBS_Allocate( Thread_Control *the_thread ) { ffc0c974: 94 21 ff f0 stwu r1,-16(r1) ffc0c978: 7c 08 02 a6 mflr r0 ffc0c97c: 93 e1 00 0c stw r31,12(r1) ffc0c980: 7c 7f 1b 78 mr r31,r3 void *sched; Scheduler_CBS_Per_thread *schinfo; sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread)); ffc0c984: 38 60 00 1c li r3,28 #include void *_Scheduler_CBS_Allocate( Thread_Control *the_thread ) { ffc0c988: 90 01 00 14 stw r0,20(r1) void *sched; Scheduler_CBS_Per_thread *schinfo; sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread)); ffc0c98c: 48 00 22 55 bl ffc0ebe0 <_Workspace_Allocate> if ( sched ) { ffc0c990: 2c 03 00 00 cmpwi r3,0 ffc0c994: 41 82 00 1c beq- ffc0c9b0 <_Scheduler_CBS_Allocate+0x3c><== NEVER TAKEN the_thread->scheduler_info = sched; schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info); schinfo->edf_per_thread.thread = the_thread; schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; ffc0c998: 39 40 00 02 li r10,2 void *sched; Scheduler_CBS_Per_thread *schinfo; sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread)); if ( sched ) { the_thread->scheduler_info = sched; ffc0c99c: 90 7f 00 88 stw r3,136(r31) schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info); schinfo->edf_per_thread.thread = the_thread; schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; ffc0c9a0: 91 43 00 14 stw r10,20(r3) schinfo->cbs_server = NULL; ffc0c9a4: 39 40 00 00 li r10,0 sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread)); if ( sched ) { the_thread->scheduler_info = sched; schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info); schinfo->edf_per_thread.thread = the_thread; ffc0c9a8: 93 e3 00 00 stw r31,0(r3) schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; schinfo->cbs_server = NULL; ffc0c9ac: 91 43 00 18 stw r10,24(r3) } return sched; } ffc0c9b0: 80 01 00 14 lwz r0,20(r1) ffc0c9b4: 83 e1 00 0c lwz r31,12(r1) ffc0c9b8: 7c 08 03 a6 mtlr r0 ffc0c9bc: 38 21 00 10 addi r1,r1,16 ffc0c9c0: 4e 80 00 20 blr =============================================================================== ffc0e3dc <_Scheduler_CBS_Budget_callout>: Scheduler_CBS_Server **_Scheduler_CBS_Server_list; void _Scheduler_CBS_Budget_callout( Thread_Control *the_thread ) { ffc0e3dc: 94 21 ff e0 stwu r1,-32(r1) ffc0e3e0: 7c 08 02 a6 mflr r0 ffc0e3e4: 90 01 00 24 stw r0,36(r1) Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server_id server_id; /* Put violating task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; ffc0e3e8: 80 83 00 ac lwz r4,172(r3) if ( the_thread->real_priority != new_priority ) ffc0e3ec: 81 23 00 18 lwz r9,24(r3) Scheduler_CBS_Server **_Scheduler_CBS_Server_list; void _Scheduler_CBS_Budget_callout( Thread_Control *the_thread ) { ffc0e3f0: 93 e1 00 1c stw r31,28(r1) ffc0e3f4: 7c 7f 1b 78 mr r31,r3 Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server_id server_id; /* Put violating task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; if ( the_thread->real_priority != new_priority ) ffc0e3f8: 7f 89 20 00 cmpw cr7,r9,r4 ffc0e3fc: 41 9e 00 08 beq- cr7,ffc0e404 <_Scheduler_CBS_Budget_callout+0x28><== NEVER TAKEN the_thread->real_priority = new_priority; ffc0e400: 90 83 00 18 stw r4,24(r3) if ( the_thread->current_priority != new_priority ) ffc0e404: 81 3f 00 14 lwz r9,20(r31) ffc0e408: 7f 89 20 00 cmpw cr7,r9,r4 ffc0e40c: 41 9e 00 10 beq- cr7,ffc0e41c <_Scheduler_CBS_Budget_callout+0x40><== NEVER TAKEN _Thread_Change_priority(the_thread, new_priority, true); ffc0e410: 7f e3 fb 78 mr r3,r31 ffc0e414: 38 a0 00 01 li r5,1 ffc0e418: 48 00 07 05 bl ffc0eb1c <_Thread_Change_priority> /* Invoke callback function if any. */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; ffc0e41c: 83 ff 00 88 lwz r31,136(r31) if ( sched_info->cbs_server->cbs_budget_overrun ) { ffc0e420: 81 3f 00 18 lwz r9,24(r31) ffc0e424: 81 49 00 0c lwz r10,12(r9) ffc0e428: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0e42c: 41 9e 00 24 beq- cr7,ffc0e450 <_Scheduler_CBS_Budget_callout+0x74><== NEVER TAKEN _Scheduler_CBS_Get_server_id( ffc0e430: 80 69 00 00 lwz r3,0(r9) ffc0e434: 38 81 00 08 addi r4,r1,8 ffc0e438: 4b ff ff 4d bl ffc0e384 <_Scheduler_CBS_Get_server_id> sched_info->cbs_server->task_id, &server_id ); sched_info->cbs_server->cbs_budget_overrun( server_id ); ffc0e43c: 81 3f 00 18 lwz r9,24(r31) ffc0e440: 80 61 00 08 lwz r3,8(r1) ffc0e444: 81 29 00 0c lwz r9,12(r9) ffc0e448: 7d 29 03 a6 mtctr r9 ffc0e44c: 4e 80 04 21 bctrl } } ffc0e450: 80 01 00 24 lwz r0,36(r1) ffc0e454: 83 e1 00 1c lwz r31,28(r1) ffc0e458: 7c 08 03 a6 mtlr r0 ffc0e45c: 38 21 00 20 addi r1,r1,32 ffc0e460: 4e 80 00 20 blr =============================================================================== ffc0dd98 <_Scheduler_CBS_Cleanup>: #include #include #include int _Scheduler_CBS_Cleanup (void) { ffc0dd98: 94 21 ff e8 stwu r1,-24(r1) ffc0dd9c: 7c 08 02 a6 mflr r0 ffc0dda0: 93 c1 00 10 stw r30,16(r1) unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { ffc0dda4: 3f c0 00 00 lis r30,0 ffc0dda8: 81 3e 27 d4 lwz r9,10196(r30) #include #include #include int _Scheduler_CBS_Cleanup (void) { ffc0ddac: 90 01 00 1c stw r0,28(r1) unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { ffc0ddb0: 2f 89 00 00 cmpwi cr7,r9,0 #include #include #include int _Scheduler_CBS_Cleanup (void) { ffc0ddb4: 93 a1 00 0c stw r29,12(r1) ffc0ddb8: 93 e1 00 14 stw r31,20(r1) unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { ffc0ddbc: 41 9e 00 68 beq- cr7,ffc0de24 <_Scheduler_CBS_Cleanup+0x8c><== NEVER TAKEN ffc0ddc0: 3f a0 00 00 lis r29,0 ffc0ddc4: 81 5d 28 f4 lwz r10,10484(r29) ffc0ddc8: 3b e0 00 00 li r31,0 ffc0ddcc: 3b de 27 d4 addi r30,r30,10196 if ( _Scheduler_CBS_Server_list[ i ] ) ffc0ddd0: 57 e9 10 3a rlwinm r9,r31,2,0,29 ffc0ddd4: 7d 2a 48 2e lwzx r9,r10,r9 _Scheduler_CBS_Destroy_server( i ); ffc0ddd8: 7f e3 fb 78 mr r3,r31 int _Scheduler_CBS_Cleanup (void) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { ffc0dddc: 3b ff 00 01 addi r31,r31,1 if ( _Scheduler_CBS_Server_list[ i ] ) ffc0dde0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0dde4: 41 9e 00 0c beq- cr7,ffc0ddf0 <_Scheduler_CBS_Cleanup+0x58> _Scheduler_CBS_Destroy_server( i ); ffc0dde8: 48 00 01 95 bl ffc0df7c <_Scheduler_CBS_Destroy_server> ffc0ddec: 81 5d 28 f4 lwz r10,10484(r29) int _Scheduler_CBS_Cleanup (void) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { ffc0ddf0: 81 3e 00 00 lwz r9,0(r30) ffc0ddf4: 7f 89 f8 40 cmplw cr7,r9,r31 ffc0ddf8: 41 9d ff d8 bgt+ cr7,ffc0ddd0 <_Scheduler_CBS_Cleanup+0x38> if ( _Scheduler_CBS_Server_list[ i ] ) _Scheduler_CBS_Destroy_server( i ); } _Workspace_Free( _Scheduler_CBS_Server_list ); ffc0ddfc: 7d 43 53 78 mr r3,r10 ffc0de00: 48 00 28 6d bl ffc1066c <_Workspace_Free> return SCHEDULER_CBS_OK; } ffc0de04: 80 01 00 1c lwz r0,28(r1) ffc0de08: 83 a1 00 0c lwz r29,12(r1) ffc0de0c: 38 60 00 00 li r3,0 ffc0de10: 7c 08 03 a6 mtlr r0 ffc0de14: 83 c1 00 10 lwz r30,16(r1) ffc0de18: 83 e1 00 14 lwz r31,20(r1) ffc0de1c: 38 21 00 18 addi r1,r1,24 ffc0de20: 4e 80 00 20 blr ffc0de24: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0de28: 81 49 28 f4 lwz r10,10484(r9) <== NOT EXECUTED ffc0de2c: 4b ff ff d0 b ffc0ddfc <_Scheduler_CBS_Cleanup+0x64> <== NOT EXECUTED =============================================================================== ffc0de30 <_Scheduler_CBS_Create_server>: int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { ffc0de30: 94 21 ff e0 stwu r1,-32(r1) ffc0de34: 7c 08 02 a6 mflr r0 ffc0de38: 90 01 00 24 stw r0,36(r1) unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || ffc0de3c: 81 23 00 04 lwz r9,4(r3) int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { ffc0de40: 93 e1 00 1c stw r31,28(r1) ffc0de44: 7c 7f 1b 78 mr r31,r3 unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || ffc0de48: 2f 89 00 00 cmpwi cr7,r9,0 int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { ffc0de4c: 93 41 00 08 stw r26,8(r1) ffc0de50: 93 61 00 0c stw r27,12(r1) ffc0de54: 93 81 00 10 stw r28,16(r1) ffc0de58: 93 a1 00 14 stw r29,20(r1) ffc0de5c: 93 c1 00 18 stw r30,24(r1) unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || ffc0de60: 40 9d 01 0c ble- cr7,ffc0df6c <_Scheduler_CBS_Create_server+0x13c> ffc0de64: 81 23 00 00 lwz r9,0(r3) ffc0de68: 2f 89 00 00 cmpwi cr7,r9,0 ffc0de6c: 40 9d 01 00 ble- cr7,ffc0df6c <_Scheduler_CBS_Create_server+0x13c> params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { ffc0de70: 3d 20 00 00 lis r9,0 ffc0de74: 81 09 27 d4 lwz r8,10196(r9) ffc0de78: 2f 88 00 00 cmpwi cr7,r8,0 ffc0de7c: 41 9e 00 44 beq- cr7,ffc0dec0 <_Scheduler_CBS_Create_server+0x90><== NEVER TAKEN if ( !_Scheduler_CBS_Server_list[i] ) ffc0de80: 3f 80 00 00 lis r28,0 ffc0de84: 83 dc 28 f4 lwz r30,10484(r28) ffc0de88: 7c 9b 23 78 mr r27,r4 ffc0de8c: 7c bd 2b 78 mr r29,r5 ffc0de90: 81 3e 00 00 lwz r9,0(r30) ffc0de94: 2f 89 00 00 cmpwi cr7,r9,0 ffc0de98: 41 9e 00 c8 beq- cr7,ffc0df60 <_Scheduler_CBS_Create_server+0x130> ffc0de9c: 7f ca f3 78 mr r10,r30 ffc0dea0: 7d 09 03 a6 mtctr r8 ffc0dea4: 39 20 00 00 li r9,0 ffc0dea8: 48 00 00 10 b ffc0deb8 <_Scheduler_CBS_Create_server+0x88> ffc0deac: 85 0a 00 04 lwzu r8,4(r10) ffc0deb0: 2f 88 00 00 cmpwi cr7,r8,0 ffc0deb4: 41 9e 00 38 beq- cr7,ffc0deec <_Scheduler_CBS_Create_server+0xbc> params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { ffc0deb8: 39 29 00 01 addi r9,r9,1 ffc0debc: 42 00 ff f0 bdnz+ ffc0deac <_Scheduler_CBS_Create_server+0x7c> if ( !_Scheduler_CBS_Server_list[i] ) break; } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; ffc0dec0: 38 60 ff e6 li r3,-26 the_server->parameters = *params; the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } ffc0dec4: 80 01 00 24 lwz r0,36(r1) ffc0dec8: 83 41 00 08 lwz r26,8(r1) ffc0decc: 7c 08 03 a6 mtlr r0 ffc0ded0: 83 61 00 0c lwz r27,12(r1) ffc0ded4: 83 81 00 10 lwz r28,16(r1) ffc0ded8: 83 a1 00 14 lwz r29,20(r1) ffc0dedc: 83 c1 00 18 lwz r30,24(r1) ffc0dee0: 83 e1 00 1c lwz r31,28(r1) ffc0dee4: 38 21 00 20 addi r1,r1,32 ffc0dee8: 4e 80 00 20 blr ffc0deec: 55 3a 10 3a rlwinm r26,r9,2,0,29 } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; ffc0def0: 91 3d 00 00 stw r9,0(r29) _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); ffc0def4: 38 60 00 10 li r3,16 ffc0def8: 48 00 27 5d bl ffc10654 <_Workspace_Allocate> the_server = _Scheduler_CBS_Server_list[*server_id]; ffc0defc: 81 3d 00 00 lwz r9,0(r29) if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) ffc0df00: 7c 7e d1 2e stwx r3,r30,r26 _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; ffc0df04: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0df08: 81 5c 28 f4 lwz r10,10484(r28) ffc0df0c: 7d 2a 48 2e lwzx r9,r10,r9 if ( !the_server ) ffc0df10: 2f 89 00 00 cmpwi cr7,r9,0 ffc0df14: 41 9e 00 60 beq- cr7,ffc0df74 <_Scheduler_CBS_Create_server+0x144><== NEVER TAKEN the_server->parameters = *params; the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } ffc0df18: 80 01 00 24 lwz r0,36(r1) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; ffc0df1c: 38 60 00 00 li r3,0 _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; ffc0df20: 81 5f 00 00 lwz r10,0(r31) the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } ffc0df24: 7c 08 03 a6 mtlr r0 _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; ffc0df28: 81 7f 00 04 lwz r11,4(r31) ffc0df2c: 91 49 00 04 stw r10,4(r9) the_server->task_id = -1; ffc0df30: 39 40 ff ff li r10,-1 the_server->cbs_budget_overrun = budget_overrun_callback; ffc0df34: 93 69 00 0c stw r27,12(r9) return SCHEDULER_CBS_OK; } ffc0df38: 83 41 00 08 lwz r26,8(r1) ffc0df3c: 83 61 00 0c lwz r27,12(r1) ffc0df40: 83 81 00 10 lwz r28,16(r1) ffc0df44: 83 a1 00 14 lwz r29,20(r1) ffc0df48: 83 c1 00 18 lwz r30,24(r1) ffc0df4c: 83 e1 00 1c lwz r31,28(r1) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; ffc0df50: 91 69 00 08 stw r11,8(r9) the_server->task_id = -1; ffc0df54: 91 49 00 00 stw r10,0(r9) the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } ffc0df58: 38 21 00 20 addi r1,r1,32 ffc0df5c: 4e 80 00 20 blr params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { if ( !_Scheduler_CBS_Server_list[i] ) ffc0df60: 3b 40 00 00 li r26,0 ffc0df64: 39 20 00 00 li r9,0 ffc0df68: 4b ff ff 88 b ffc0def0 <_Scheduler_CBS_Create_server+0xc0> if ( params->budget <= 0 || params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; ffc0df6c: 38 60 ff ee li r3,-18 ffc0df70: 4b ff ff 54 b ffc0dec4 <_Scheduler_CBS_Create_server+0x94> *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; ffc0df74: 38 60 ff ef li r3,-17 <== NOT EXECUTED ffc0df78: 4b ff ff 4c b ffc0dec4 <_Scheduler_CBS_Create_server+0x94><== NOT EXECUTED =============================================================================== ffc0e020 <_Scheduler_CBS_Detach_thread>: int _Scheduler_CBS_Detach_thread ( Scheduler_CBS_Server_id server_id, rtems_id task_id ) { ffc0e020: 94 21 ff d8 stwu r1,-40(r1) ffc0e024: 7c 08 02 a6 mflr r0 ffc0e028: 93 c1 00 20 stw r30,32(r1) ffc0e02c: 7c 9e 23 78 mr r30,r4 Objects_Locations location; Thread_Control *the_thread; Scheduler_CBS_Per_thread *sched_info; the_thread = _Thread_Get(task_id, &location); ffc0e030: 38 81 00 08 addi r4,r1,8 int _Scheduler_CBS_Detach_thread ( Scheduler_CBS_Server_id server_id, rtems_id task_id ) { ffc0e034: 93 a1 00 1c stw r29,28(r1) ffc0e038: 7c 7d 1b 78 mr r29,r3 Objects_Locations location; Thread_Control *the_thread; Scheduler_CBS_Per_thread *sched_info; the_thread = _Thread_Get(task_id, &location); ffc0e03c: 7f c3 f3 78 mr r3,r30 int _Scheduler_CBS_Detach_thread ( Scheduler_CBS_Server_id server_id, rtems_id task_id ) { ffc0e040: 93 e1 00 24 stw r31,36(r1) ffc0e044: 90 01 00 2c stw r0,44(r1) Objects_Locations location; Thread_Control *the_thread; Scheduler_CBS_Per_thread *sched_info; the_thread = _Thread_Get(task_id, &location); ffc0e048: 48 00 11 7d bl ffc0f1c4 <_Thread_Get> /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { ffc0e04c: 7c 7f 1b 79 mr. r31,r3 ffc0e050: 41 82 00 88 beq- ffc0e0d8 <_Scheduler_CBS_Detach_thread+0xb8> _Thread_Enable_dispatch(); ffc0e054: 48 00 11 55 bl ffc0f1a8 <_Thread_Enable_dispatch> } if ( server_id >= _Scheduler_CBS_Maximum_servers ) ffc0e058: 3d 20 00 00 lis r9,0 ffc0e05c: 81 29 27 d4 lwz r9,10196(r9) ffc0e060: 7f 9d 48 40 cmplw cr7,r29,r9 ffc0e064: 40 9c 00 74 bge- cr7,ffc0e0d8 <_Scheduler_CBS_Detach_thread+0xb8> return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !the_thread ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) ffc0e068: 3d 20 00 00 lis r9,0 ffc0e06c: 81 29 28 f4 lwz r9,10484(r9) ffc0e070: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc0e074: 7d 29 e8 2e lwzx r9,r9,r29 ffc0e078: 2f 89 00 00 cmpwi cr7,r9,0 ffc0e07c: 41 9e 00 7c beq- cr7,ffc0e0f8 <_Scheduler_CBS_Detach_thread+0xd8> return SCHEDULER_CBS_ERROR_NOSERVER; /* Thread and server are not attached. */ if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) ffc0e080: 81 49 00 00 lwz r10,0(r9) ffc0e084: 7f 8a f0 00 cmpw cr7,r10,r30 ffc0e088: 40 9e 00 50 bne- cr7,ffc0e0d8 <_Scheduler_CBS_Detach_thread+0xb8><== NEVER TAKEN _Scheduler_CBS_Server_list[server_id]->task_id = -1; sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; ffc0e08c: 80 df 00 a0 lwz r6,160(r31) return SCHEDULER_CBS_ERROR_NOSERVER; /* Thread and server are not attached. */ if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; ffc0e090: 38 a0 ff ff li r5,-1 sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; ffc0e094: 80 ff 00 a4 lwz r7,164(r31) the_thread->is_preemptible = the_thread->Start.is_preemptible; return SCHEDULER_CBS_OK; ffc0e098: 38 60 00 00 li r3,0 sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->is_preemptible = the_thread->Start.is_preemptible; ffc0e09c: 89 1f 00 9c lbz r8,156(r31) if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; ffc0e0a0: 81 5f 00 88 lwz r10,136(r31) return SCHEDULER_CBS_ERROR_NOSERVER; /* Thread and server are not attached. */ if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; ffc0e0a4: 90 a9 00 00 stw r5,0(r9) sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; ffc0e0a8: 39 20 00 00 li r9,0 ffc0e0ac: 91 2a 00 18 stw r9,24(r10) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; ffc0e0b0: 90 df 00 78 stw r6,120(r31) the_thread->budget_callout = the_thread->Start.budget_callout; ffc0e0b4: 90 ff 00 7c stw r7,124(r31) the_thread->is_preemptible = the_thread->Start.is_preemptible; ffc0e0b8: 99 1f 00 70 stb r8,112(r31) return SCHEDULER_CBS_OK; } ffc0e0bc: 80 01 00 2c lwz r0,44(r1) ffc0e0c0: 83 a1 00 1c lwz r29,28(r1) ffc0e0c4: 7c 08 03 a6 mtlr r0 ffc0e0c8: 83 c1 00 20 lwz r30,32(r1) ffc0e0cc: 83 e1 00 24 lwz r31,36(r1) ffc0e0d0: 38 21 00 28 addi r1,r1,40 ffc0e0d4: 4e 80 00 20 blr ffc0e0d8: 80 01 00 2c lwz r0,44(r1) if ( the_thread ) { _Thread_Enable_dispatch(); } if ( server_id >= _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; ffc0e0dc: 38 60 ff ee li r3,-18 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->is_preemptible = the_thread->Start.is_preemptible; return SCHEDULER_CBS_OK; } ffc0e0e0: 83 a1 00 1c lwz r29,28(r1) ffc0e0e4: 7c 08 03 a6 mtlr r0 ffc0e0e8: 83 c1 00 20 lwz r30,32(r1) ffc0e0ec: 83 e1 00 24 lwz r31,36(r1) ffc0e0f0: 38 21 00 28 addi r1,r1,40 ffc0e0f4: 4e 80 00 20 blr return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !the_thread ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) return SCHEDULER_CBS_ERROR_NOSERVER; ffc0e0f8: 38 60 ff e7 li r3,-25 ffc0e0fc: 4b ff ff c0 b ffc0e0bc <_Scheduler_CBS_Detach_thread+0x9c> =============================================================================== ffc0e384 <_Scheduler_CBS_Get_server_id>: rtems_id task_id, Scheduler_CBS_Server_id *server_id ) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { ffc0e384: 3d 20 00 00 lis r9,0 ffc0e388: 81 29 27 d4 lwz r9,10196(r9) ffc0e38c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0e390: 41 9e 00 38 beq- cr7,ffc0e3c8 <_Scheduler_CBS_Get_server_id+0x44><== NEVER TAKEN #include #include #include #include int _Scheduler_CBS_Get_server_id ( ffc0e394: 3d 40 00 00 lis r10,0 rtems_id task_id, Scheduler_CBS_Server_id *server_id ) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { ffc0e398: 7d 29 03 a6 mtctr r9 #include #include #include #include int _Scheduler_CBS_Get_server_id ( ffc0e39c: 81 4a 28 f4 lwz r10,10484(r10) rtems_id task_id, Scheduler_CBS_Server_id *server_id ) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { ffc0e3a0: 39 00 00 00 li r8,0 #include #include #include #include int _Scheduler_CBS_Get_server_id ( ffc0e3a4: 39 4a ff fc addi r10,r10,-4 Scheduler_CBS_Server_id *server_id ) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { if ( _Scheduler_CBS_Server_list[i] && ffc0e3a8: 85 2a 00 04 lwzu r9,4(r10) ffc0e3ac: 2f 89 00 00 cmpwi cr7,r9,0 ffc0e3b0: 41 9e 00 10 beq- cr7,ffc0e3c0 <_Scheduler_CBS_Get_server_id+0x3c> ffc0e3b4: 81 29 00 00 lwz r9,0(r9) ffc0e3b8: 7f 89 18 00 cmpw cr7,r9,r3 ffc0e3bc: 41 9e 00 14 beq- cr7,ffc0e3d0 <_Scheduler_CBS_Get_server_id+0x4c> rtems_id task_id, Scheduler_CBS_Server_id *server_id ) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { ffc0e3c0: 39 08 00 01 addi r8,r8,1 ffc0e3c4: 42 00 ff e4 bdnz+ ffc0e3a8 <_Scheduler_CBS_Get_server_id+0x24> _Scheduler_CBS_Server_list[i]->task_id == task_id ) { *server_id = i; return SCHEDULER_CBS_OK; } } return SCHEDULER_CBS_ERROR_NOSERVER; ffc0e3c8: 38 60 ff e7 li r3,-25 } ffc0e3cc: 4e 80 00 20 blr { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { if ( _Scheduler_CBS_Server_list[i] && _Scheduler_CBS_Server_list[i]->task_id == task_id ) { *server_id = i; ffc0e3d0: 91 04 00 00 stw r8,0(r4) return SCHEDULER_CBS_OK; ffc0e3d4: 38 60 00 00 li r3,0 ffc0e3d8: 4e 80 00 20 blr =============================================================================== ffc0e464 <_Scheduler_CBS_Initialize>: int _Scheduler_CBS_Initialize(void) { ffc0e464: 94 21 ff f0 stwu r1,-16(r1) ffc0e468: 7c 08 02 a6 mflr r0 ffc0e46c: 93 e1 00 0c stw r31,12(r1) unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); ffc0e470: 3f e0 00 00 lis r31,0 ffc0e474: 80 7f 27 d4 lwz r3,10196(r31) sched_info->cbs_server->cbs_budget_overrun( server_id ); } } int _Scheduler_CBS_Initialize(void) { ffc0e478: 90 01 00 14 stw r0,20(r1) unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( ffc0e47c: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc0e480: 48 00 21 d5 bl ffc10654 <_Workspace_Allocate> ffc0e484: 3d 00 00 00 lis r8,0 _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) ffc0e488: 2f 83 00 00 cmpwi cr7,r3,0 } int _Scheduler_CBS_Initialize(void) { unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( ffc0e48c: 90 68 28 f4 stw r3,10484(r8) _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) ffc0e490: 41 9e 00 4c beq- cr7,ffc0e4dc <_Scheduler_CBS_Initialize+0x78><== NEVER TAKEN return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { ffc0e494: 81 5f 27 d4 lwz r10,10196(r31) ffc0e498: 39 20 00 00 li r9,0 _Scheduler_CBS_Server_list[i] = NULL; ffc0e49c: 38 e0 00 00 li r7,0 unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { ffc0e4a0: 2f 8a 00 00 cmpwi cr7,r10,0 _Scheduler_CBS_Server_list[i] = NULL; ffc0e4a4: 7d 49 03 a6 mtctr r10 unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { ffc0e4a8: 40 be 00 0c bne+ cr7,ffc0e4b4 <_Scheduler_CBS_Initialize+0x50><== ALWAYS TAKEN ffc0e4ac: 48 00 00 18 b ffc0e4c4 <_Scheduler_CBS_Initialize+0x60><== NOT EXECUTED ffc0e4b0: 80 68 28 f4 lwz r3,10484(r8) _Scheduler_CBS_Server_list[i] = NULL; ffc0e4b4: 55 2a 10 3a rlwinm r10,r9,2,0,29 ffc0e4b8: 7c e3 51 2e stwx r7,r3,r10 unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { ffc0e4bc: 39 29 00 01 addi r9,r9,1 ffc0e4c0: 42 00 ff f0 bdnz+ ffc0e4b0 <_Scheduler_CBS_Initialize+0x4c> _Scheduler_CBS_Server_list[i] = NULL; } return SCHEDULER_CBS_OK; ffc0e4c4: 38 60 00 00 li r3,0 } ffc0e4c8: 80 01 00 14 lwz r0,20(r1) ffc0e4cc: 83 e1 00 0c lwz r31,12(r1) ffc0e4d0: 7c 08 03 a6 mtlr r0 ffc0e4d4: 38 21 00 10 addi r1,r1,16 ffc0e4d8: 4e 80 00 20 blr { unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; ffc0e4dc: 38 60 ff ef li r3,-17 <== NOT EXECUTED ffc0e4e0: 4b ff ff e8 b ffc0e4c8 <_Scheduler_CBS_Initialize+0x64><== NOT EXECUTED =============================================================================== ffc0c9c4 <_Scheduler_CBS_Release_job>: Scheduler_CBS_Per_thread *sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; Scheduler_CBS_Server *serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; if (deadline) { ffc0c9c4: 2c 04 00 00 cmpwi r4,0 { Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; Scheduler_CBS_Server *serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; ffc0c9c8: 81 23 00 88 lwz r9,136(r3) ) { Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; Scheduler_CBS_Server *serv_info = ffc0c9cc: 81 29 00 18 lwz r9,24(r9) (Scheduler_CBS_Server *) sched_info->cbs_server; if (deadline) { /* Initializing or shifting deadline. */ if (serv_info) ffc0c9d0: 2f 89 00 00 cmpwi cr7,r9,0 Scheduler_CBS_Per_thread *sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; Scheduler_CBS_Server *serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; if (deadline) { ffc0c9d4: 41 82 00 30 beq- ffc0ca04 <_Scheduler_CBS_Release_job+0x40> /* Initializing or shifting deadline. */ if (serv_info) ffc0c9d8: 41 9e 00 38 beq- cr7,ffc0ca10 <_Scheduler_CBS_Release_job+0x4c> new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) ffc0c9dc: 3d 40 00 00 lis r10,0 ffc0c9e0: 80 8a 28 e8 lwz r4,10472(r10) ffc0c9e4: 81 49 00 04 lwz r10,4(r9) ffc0c9e8: 7c 84 52 14 add r4,r4,r10 ffc0c9ec: 54 84 00 7e clrlwi r4,r4,1 new_priority = the_thread->Start.initial_priority; } /* Budget replenishment for the next job. */ if (serv_info) the_thread->cpu_time_budget = serv_info->parameters.budget; ffc0c9f0: 81 29 00 08 lwz r9,8(r9) ffc0c9f4: 91 23 00 74 stw r9,116(r3) the_thread->real_priority = new_priority; ffc0c9f8: 90 83 00 18 stw r4,24(r3) _Thread_Change_priority(the_thread, new_priority, true); ffc0c9fc: 38 a0 00 01 li r5,1 ffc0ca00: 48 00 05 94 b ffc0cf94 <_Thread_Change_priority> new_priority = (_Watchdog_Ticks_since_boot + deadline) & ~SCHEDULER_EDF_PRIO_MSB; } else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; ffc0ca04: 80 83 00 ac lwz r4,172(r3) } /* Budget replenishment for the next job. */ if (serv_info) ffc0ca08: 40 9e ff e8 bne+ cr7,ffc0c9f0 <_Scheduler_CBS_Release_job+0x2c><== ALWAYS TAKEN ffc0ca0c: 4b ff ff ec b ffc0c9f8 <_Scheduler_CBS_Release_job+0x34><== NOT EXECUTED /* Initializing or shifting deadline. */ if (serv_info) new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) & ~SCHEDULER_EDF_PRIO_MSB; else new_priority = (_Watchdog_Ticks_since_boot + deadline) ffc0ca10: 3d 20 00 00 lis r9,0 ffc0ca14: 81 29 28 e8 lwz r9,10472(r9) ffc0ca18: 7c 84 4a 14 add r4,r4,r9 ffc0ca1c: 54 84 00 7e clrlwi r4,r4,1 ffc0ca20: 4b ff ff d8 b ffc0c9f8 <_Scheduler_CBS_Release_job+0x34> =============================================================================== ffc0ca24 <_Scheduler_CBS_Unblock>: #include void _Scheduler_CBS_Unblock( Thread_Control *the_thread ) { ffc0ca24: 94 21 ff f0 stwu r1,-16(r1) ffc0ca28: 7c 08 02 a6 mflr r0 ffc0ca2c: 93 e1 00 0c stw r31,12(r1) ffc0ca30: 7c 7f 1b 78 mr r31,r3 ffc0ca34: 90 01 00 14 stw r0,20(r1) ffc0ca38: 93 c1 00 08 stw r30,8(r1) Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server *serv_info; Priority_Control new_priority; _Scheduler_EDF_Enqueue(the_thread); ffc0ca3c: 48 00 01 6d bl ffc0cba8 <_Scheduler_EDF_Enqueue> /* TODO: flash critical section? */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; ffc0ca40: 81 3f 00 88 lwz r9,136(r31) ffc0ca44: 81 29 00 18 lwz r9,24(r9) * Late unblock rule for deadline-driven tasks. The remaining time to * deadline must be sufficient to serve the remaining computation time * without increased utilization of this task. It might cause a deadline * miss of another task. */ if (serv_info) { ffc0ca48: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ca4c: 41 9e 00 58 beq- cr7,ffc0caa4 <_Scheduler_CBS_Unblock+0x80> time_t deadline = serv_info->parameters.deadline; time_t budget = serv_info->parameters.budget; time_t deadline_left = the_thread->cpu_time_budget; time_t budget_left = the_thread->real_priority - ffc0ca50: 3d 00 00 00 lis r8,0 ffc0ca54: 81 5f 00 18 lwz r10,24(r31) ffc0ca58: 81 08 28 e8 lwz r8,10472(r8) _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { ffc0ca5c: 80 c9 00 04 lwz r6,4(r9) ffc0ca60: 80 e9 00 08 lwz r7,8(r9) */ if (serv_info) { time_t deadline = serv_info->parameters.deadline; time_t budget = serv_info->parameters.budget; time_t deadline_left = the_thread->cpu_time_budget; time_t budget_left = the_thread->real_priority - ffc0ca64: 7d 08 50 50 subf r8,r8,r10 _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { ffc0ca68: 81 3f 00 74 lwz r9,116(r31) ffc0ca6c: 7d 08 31 d6 mullw r8,r8,r6 ffc0ca70: 7d 27 49 d6 mullw r9,r7,r9 ffc0ca74: 7f 88 48 00 cmpw cr7,r8,r9 ffc0ca78: 40 9d 00 2c ble- cr7,ffc0caa4 <_Scheduler_CBS_Unblock+0x80> /* Put late unblocked task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; ffc0ca7c: 80 9f 00 ac lwz r4,172(r31) if ( the_thread->real_priority != new_priority ) ffc0ca80: 7f 8a 20 00 cmpw cr7,r10,r4 ffc0ca84: 41 9e 00 08 beq- cr7,ffc0ca8c <_Scheduler_CBS_Unblock+0x68> the_thread->real_priority = new_priority; ffc0ca88: 90 9f 00 18 stw r4,24(r31) if ( the_thread->current_priority != new_priority ) ffc0ca8c: 80 7f 00 14 lwz r3,20(r31) ffc0ca90: 7f 83 20 00 cmpw cr7,r3,r4 ffc0ca94: 41 9e 00 14 beq- cr7,ffc0caa8 <_Scheduler_CBS_Unblock+0x84> _Thread_Change_priority(the_thread, new_priority, true); ffc0ca98: 7f e3 fb 78 mr r3,r31 ffc0ca9c: 38 a0 00 01 li r5,1 ffc0caa0: 48 00 04 f5 bl ffc0cf94 <_Thread_Change_priority> ffc0caa4: 80 7f 00 14 lwz r3,20(r31) * 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_higher_than( the_thread->current_priority, ffc0caa8: 3f c0 00 00 lis r30,0 ffc0caac: 3b de 32 40 addi r30,r30,12864 ffc0cab0: 3d 40 00 00 lis r10,0 ffc0cab4: 81 3e 00 14 lwz r9,20(r30) ffc0cab8: 81 4a 20 b0 lwz r10,8368(r10) ffc0cabc: 80 89 00 14 lwz r4,20(r9) ffc0cac0: 7d 49 03 a6 mtctr r10 ffc0cac4: 4e 80 04 21 bctrl ffc0cac8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0cacc: 40 9d 00 20 ble- cr7,ffc0caec <_Scheduler_CBS_Unblock+0xc8> _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc0cad0: 81 3e 00 10 lwz r9,16(r30) * 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_higher_than( the_thread->current_priority, _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; ffc0cad4: 93 fe 00 14 stw r31,20(r30) if ( _Thread_Executing->is_preemptible || ffc0cad8: 89 29 00 70 lbz r9,112(r9) ffc0cadc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0cae0: 41 9e 00 24 beq- cr7,ffc0cb04 <_Scheduler_CBS_Unblock+0xe0> the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; ffc0cae4: 39 20 00 01 li r9,1 ffc0cae8: 99 3e 00 0c stb r9,12(r30) } } ffc0caec: 80 01 00 14 lwz r0,20(r1) ffc0caf0: 83 c1 00 08 lwz r30,8(r1) ffc0caf4: 7c 08 03 a6 mtlr r0 ffc0caf8: 83 e1 00 0c lwz r31,12(r1) ffc0cafc: 38 21 00 10 addi r1,r1,16 ffc0cb00: 4e 80 00 20 blr * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority, _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc0cb04: 81 3f 00 14 lwz r9,20(r31) ffc0cb08: 2f 89 00 00 cmpwi cr7,r9,0 ffc0cb0c: 41 9e ff d8 beq+ cr7,ffc0cae4 <_Scheduler_CBS_Unblock+0xc0><== NEVER TAKEN the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } ffc0cb10: 80 01 00 14 lwz r0,20(r1) ffc0cb14: 83 c1 00 08 lwz r30,8(r1) ffc0cb18: 7c 08 03 a6 mtlr r0 ffc0cb1c: 83 e1 00 0c lwz r31,12(r1) ffc0cb20: 38 21 00 10 addi r1,r1,16 ffc0cb24: 4e 80 00 20 blr =============================================================================== ffc0c974 <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { ffc0c974: 94 21 ff f0 stwu r1,-16(r1) ffc0c978: 7c 08 02 a6 mflr r0 ffc0c97c: 93 e1 00 0c stw r31,12(r1) ffc0c980: 7c 7f 1b 78 mr r31,r3 void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); ffc0c984: 38 60 00 18 li r3,24 #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { ffc0c988: 90 01 00 14 stw r0,20(r1) void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); ffc0c98c: 48 00 21 c9 bl ffc0eb54 <_Workspace_Allocate> if ( sched ) { ffc0c990: 2c 03 00 00 cmpwi r3,0 ffc0c994: 41 82 00 14 beq- ffc0c9a8 <_Scheduler_EDF_Allocate+0x34><== NEVER TAKEN the_thread->scheduler_info = sched; schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; ffc0c998: 39 40 00 02 li r10,2 Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); if ( sched ) { the_thread->scheduler_info = sched; ffc0c99c: 90 7f 00 88 stw r3,136(r31) schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; ffc0c9a0: 93 e3 00 00 stw r31,0(r3) schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; ffc0c9a4: 91 43 00 14 stw r10,20(r3) } return sched; } ffc0c9a8: 80 01 00 14 lwz r0,20(r1) ffc0c9ac: 83 e1 00 0c lwz r31,12(r1) ffc0c9b0: 7c 08 03 a6 mtlr r0 ffc0c9b4: 38 21 00 10 addi r1,r1,16 ffc0c9b8: 4e 80 00 20 blr =============================================================================== ffc0cbc4 <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { ffc0cbc4: 94 21 ff f0 stwu r1,-16(r1) ffc0cbc8: 7c 08 02 a6 mflr r0 ffc0cbcc: 93 e1 00 0c stw r31,12(r1) * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_lower_than( ffc0cbd0: 3f e0 00 00 lis r31,0 ffc0cbd4: 3b ff 32 40 addi r31,r31,12864 #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { ffc0cbd8: 90 01 00 14 stw r0,20(r1) ffc0cbdc: 93 c1 00 08 stw r30,8(r1) ffc0cbe0: 7c 7e 1b 78 mr r30,r3 _Scheduler_EDF_Enqueue(the_thread); ffc0cbe4: 4b ff fe 59 bl ffc0ca3c <_Scheduler_EDF_Enqueue> ffc0cbe8: 3d 20 00 00 lis r9,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( ffc0cbec: 81 5f 00 14 lwz r10,20(r31) ffc0cbf0: 81 29 20 b0 lwz r9,8368(r9) ffc0cbf4: 80 6a 00 14 lwz r3,20(r10) ffc0cbf8: 80 9e 00 14 lwz r4,20(r30) ffc0cbfc: 7d 29 03 a6 mtctr r9 ffc0cc00: 4e 80 04 21 bctrl ffc0cc04: 2f 83 00 00 cmpwi cr7,r3,0 ffc0cc08: 41 9c 00 1c blt- cr7,ffc0cc24 <_Scheduler_EDF_Unblock+0x60> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } ffc0cc0c: 80 01 00 14 lwz r0,20(r1) ffc0cc10: 83 c1 00 08 lwz r30,8(r1) ffc0cc14: 7c 08 03 a6 mtlr r0 ffc0cc18: 83 e1 00 0c lwz r31,12(r1) ffc0cc1c: 38 21 00 10 addi r1,r1,16 ffc0cc20: 4e 80 00 20 blr */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc0cc24: 81 3f 00 10 lwz r9,16(r31) * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; ffc0cc28: 93 df 00 14 stw r30,20(r31) if ( _Thread_Executing->is_preemptible || ffc0cc2c: 89 29 00 70 lbz r9,112(r9) ffc0cc30: 2f 89 00 00 cmpwi cr7,r9,0 ffc0cc34: 41 9e 00 24 beq- cr7,ffc0cc58 <_Scheduler_EDF_Unblock+0x94> the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; ffc0cc38: 39 20 00 01 li r9,1 ffc0cc3c: 99 3f 00 0c stb r9,12(r31) } } ffc0cc40: 80 01 00 14 lwz r0,20(r1) ffc0cc44: 83 c1 00 08 lwz r30,8(r1) ffc0cc48: 7c 08 03 a6 mtlr r0 ffc0cc4c: 83 e1 00 0c lwz r31,12(r1) ffc0cc50: 38 21 00 10 addi r1,r1,16 ffc0cc54: 4e 80 00 20 blr */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc0cc58: 81 3e 00 14 lwz r9,20(r30) ffc0cc5c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0cc60: 40 be ff ac bne- cr7,ffc0cc0c <_Scheduler_EDF_Unblock+0x48><== ALWAYS TAKEN the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; ffc0cc64: 39 20 00 01 li r9,1 <== NOT EXECUTED ffc0cc68: 99 3f 00 0c stb r9,12(r31) <== NOT EXECUTED ffc0cc6c: 4b ff ff d4 b ffc0cc40 <_Scheduler_EDF_Unblock+0x7c> <== NOT EXECUTED =============================================================================== ffc0be58 <_Scheduler_priority_Block>: ) { Scheduler_priority_Per_thread *sched_info; Chain_Control *ready; sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info; ffc0be58: 81 43 00 88 lwz r10,136(r3) ready = sched_info->ready_chain; ffc0be5c: 81 2a 00 00 lwz r9,0(r10) if ( _Chain_Has_only_one_node( ready ) ) { ffc0be60: 80 e9 00 00 lwz r7,0(r9) ffc0be64: 81 09 00 08 lwz r8,8(r9) ffc0be68: 7f 87 40 00 cmpw cr7,r7,r8 ffc0be6c: 41 9e 00 40 beq- cr7,ffc0beac <_Scheduler_priority_Block+0x54> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0be70: 81 23 00 00 lwz r9,0(r3) previous = the_node->previous; ffc0be74: 81 43 00 04 lwz r10,4(r3) next->previous = previous; ffc0be78: 91 49 00 04 stw r10,4(r9) previous->next = next; ffc0be7c: 91 2a 00 00 stw r9,0(r10) RTEMS_INLINE_ROUTINE bool _Thread_Is_heir ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Heir ); ffc0be80: 3d 20 00 00 lis r9,0 ffc0be84: 39 29 31 a0 addi r9,r9,12704 { _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) ffc0be88: 81 49 00 14 lwz r10,20(r9) ffc0be8c: 7f 83 50 00 cmpw cr7,r3,r10 ffc0be90: 41 9e 00 64 beq- cr7,ffc0bef4 <_Scheduler_priority_Block+0x9c> _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) ffc0be94: 81 49 00 10 lwz r10,16(r9) ffc0be98: 7f 83 50 00 cmpw cr7,r3,r10 ffc0be9c: 4c be 00 20 bnelr+ cr7 _Thread_Dispatch_necessary = true; ffc0bea0: 39 40 00 01 li r10,1 ffc0bea4: 99 49 00 0c stb r10,12(r9) ffc0bea8: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc0beac: 81 0a 00 04 lwz r8,4(r10) 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 ); ffc0beb0: 38 a9 00 04 addi r5,r9,4 ffc0beb4: 80 ea 00 14 lwz r7,20(r10) ffc0beb8: 80 c8 00 00 lwz r6,0(r8) head->next = tail; ffc0bebc: 90 a9 00 00 stw r5,0(r9) ffc0bec0: 7c c7 38 38 and r7,r6,r7 if ( *the_priority_map->minor == 0 ) ffc0bec4: 2f 87 00 00 cmpwi cr7,r7,0 head->previous = NULL; tail->previous = head; ffc0bec8: 91 29 00 08 stw r9,8(r9) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; ffc0becc: 38 c0 00 00 li r6,0 ffc0bed0: 90 c9 00 04 stw r6,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; ffc0bed4: 90 e8 00 00 stw r7,0(r8) if ( *the_priority_map->minor == 0 ) ffc0bed8: 40 be ff a8 bne- cr7,ffc0be80 <_Scheduler_priority_Block+0x28> _Priority_Major_bit_map &= the_priority_map->block_major; ffc0bedc: 3d 20 00 00 lis r9,0 ffc0bee0: 81 4a 00 10 lwz r10,16(r10) ffc0bee4: 81 09 28 94 lwz r8,10388(r9) ffc0bee8: 7d 0a 50 38 and r10,r8,r10 ffc0beec: 91 49 28 94 stw r10,10388(r9) ffc0bef0: 4b ff ff 90 b ffc0be80 <_Scheduler_priority_Block+0x28> 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 ); ffc0bef4: 3d 60 00 00 lis r11,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 ffc0bef8: 3d 40 00 00 lis r10,0 ffc0befc: 81 0b 28 94 lwz r8,10388(r11) ffc0bf00: 80 ea 20 80 lwz r7,8320(r10) ffc0bf04: 7d 04 00 34 cntlzw r4,r8 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0bf08: 3c a0 00 00 lis r5,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 ); ffc0bf0c: 91 0b 28 94 stw r8,10388(r11) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0bf10: 38 a5 31 e0 addi r5,r5,12768 ffc0bf14: 54 86 10 3a rlwinm r6,r4,2,0,29 ffc0bf18: 7d 45 30 2e lwzx r10,r5,r6 ffc0bf1c: 7d 48 00 34 cntlzw r8,r10 return (_Priority_Bits_index( major ) << 4) + ffc0bf20: 54 84 20 36 rlwinm r4,r4,4,0,27 { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0bf24: 7d 45 31 2e stwx r10,r5,r6 return (_Priority_Bits_index( major ) << 4) + ffc0bf28: 7d 04 42 14 add r8,r4,r8 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc0bf2c: 1d 08 00 0c mulli r8,r8,12 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0bf30: 7d 47 40 2e lwzx r10,r7,r8 ffc0bf34: 7c c7 42 14 add r6,r7,r8 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0bf38: 39 06 00 04 addi r8,r6,4 ffc0bf3c: 7f 8a 40 00 cmpw cr7,r10,r8 ffc0bf40: 41 9e 00 0c beq- cr7,ffc0bf4c <_Scheduler_priority_Block+0xf4><== NEVER TAKEN * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( ffc0bf44: 91 49 00 14 stw r10,20(r9) ffc0bf48: 4b ff ff 4c b ffc0be94 <_Scheduler_priority_Block+0x3c> Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; ffc0bf4c: 39 40 00 00 li r10,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( ffc0bf50: 91 49 00 14 stw r10,20(r9) <== NOT EXECUTED ffc0bf54: 4b ff ff 40 b ffc0be94 <_Scheduler_priority_Block+0x3c><== NOT EXECUTED =============================================================================== ffc0c114 <_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 ); ffc0c114: 3c 80 00 00 lis r4,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 ffc0c118: 3d 20 00 00 lis r9,0 ffc0c11c: 81 44 28 94 lwz r10,10388(r4) ffc0c120: 81 09 20 80 lwz r8,8320(r9) ffc0c124: 7d 45 00 34 cntlzw r5,r10 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0c128: 3c c0 00 00 lis r6,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 ); ffc0c12c: 91 44 28 94 stw r10,10388(r4) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0c130: 38 c6 31 e0 addi r6,r6,12768 ffc0c134: 54 a7 10 3a rlwinm r7,r5,2,0,29 ffc0c138: 7d 26 38 2e lwzx r9,r6,r7 ffc0c13c: 7d 24 00 34 cntlzw r4,r9 return (_Priority_Bits_index( major ) << 4) + ffc0c140: 54 aa 20 36 rlwinm r10,r5,4,0,27 { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0c144: 7d 26 39 2e stwx r9,r6,r7 return (_Priority_Bits_index( major ) << 4) + ffc0c148: 7d 4a 22 14 add r10,r10,r4 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc0c14c: 1d 4a 00 0c mulli r10,r10,12 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0c150: 7d 28 50 2e lwzx r9,r8,r10 ffc0c154: 7c e8 52 14 add r7,r8,r10 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0c158: 39 47 00 04 addi r10,r7,4 ffc0c15c: 7f 89 50 00 cmpw cr7,r9,r10 ffc0c160: 41 9e 00 10 beq- cr7,ffc0c170 <_Scheduler_priority_Schedule+0x5c><== NEVER TAKEN * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( ffc0c164: 3d 40 00 00 lis r10,0 ffc0c168: 91 2a 31 b4 stw r9,12724(r10) ffc0c16c: 4e 80 00 20 blr Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; ffc0c170: 39 20 00 00 li r9,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( ffc0c174: 3d 40 00 00 lis r10,0 <== NOT EXECUTED ffc0c178: 91 2a 31 b4 stw r9,12724(r10) <== NOT EXECUTED ffc0c17c: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0cb0c <_Scheduler_simple_Ready_queue_enqueue_first>: { Chain_Control *ready; Chain_Node *the_node; Thread_Control *current; ready = (Chain_Control *)_Scheduler.information; ffc0cb0c: 3d 20 00 00 lis r9,0 */ for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) { current = (Thread_Control *) the_node; /* break when AT HEAD OF (or PAST) our priority */ if ( the_thread->current_priority <= current->current_priority ) { ffc0cb10: 81 03 00 14 lwz r8,20(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0cb14: 81 29 20 80 lwz r9,8320(r9) ffc0cb18: 81 29 00 00 lwz r9,0(r9) ffc0cb1c: 81 49 00 14 lwz r10,20(r9) ffc0cb20: 7f 8a 40 40 cmplw cr7,r10,r8 ffc0cb24: 40 9c 00 14 bge- cr7,ffc0cb38 <_Scheduler_simple_Ready_queue_enqueue_first+0x2c> * Do NOT need to check for end of chain because there is always * at least one task on the ready chain -- the IDLE task. It can * never block, should never attempt to obtain a semaphore or mutex, * and thus will always be there. */ for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) { ffc0cb28: 81 29 00 00 lwz r9,0(r9) current = (Thread_Control *) the_node; /* break when AT HEAD OF (or PAST) our priority */ if ( the_thread->current_priority <= current->current_priority ) { ffc0cb2c: 81 49 00 14 lwz r10,20(r9) ffc0cb30: 7f 8a 40 40 cmplw cr7,r10,r8 ffc0cb34: 41 9c ff f4 blt+ cr7,ffc0cb28 <_Scheduler_simple_Ready_queue_enqueue_first+0x1c><== NEVER TAKEN current = (Thread_Control *)current->Object.Node.previous; ffc0cb38: 81 29 00 04 lwz r9,4(r9) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0cb3c: 81 49 00 00 lwz r10,0(r9) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0cb40: 91 23 00 04 stw r9,4(r3) before_node = after_node->next; after_node->next = the_node; ffc0cb44: 90 69 00 00 stw r3,0(r9) the_node->next = before_node; before_node->previous = the_node; ffc0cb48: 90 6a 00 04 stw r3,4(r10) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0cb4c: 91 43 00 00 stw r10,0(r3) ffc0cb50: 4e 80 00 20 blr =============================================================================== ffc0a958 <_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) || ffc0a958: 7c 69 1b 79 mr. r9,r3 { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); ffc0a95c: 3d 40 ff c2 lis r10,-62 ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / ffc0a960: 81 4a 13 44 lwz r10,4932(r10) ffc0a964: 3d 00 00 0f lis r8,15 ffc0a968: 61 08 42 40 ori r8,r8,16960 ffc0a96c: 7c e8 53 96 divwu r7,r8,r10 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || ffc0a970: 41 82 00 90 beq- ffc0aa00 <_TOD_Validate+0xa8> <== NEVER TAKEN ffc0a974: 81 49 00 18 lwz r10,24(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; ffc0a978: 38 60 00 00 li 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(); if ((!the_tod) || ffc0a97c: 7f 87 50 40 cmplw cr7,r7,r10 ffc0a980: 4c 9d 00 20 blelr cr7 (the_tod->ticks >= ticks_per_second) || ffc0a984: 81 49 00 14 lwz r10,20(r9) ffc0a988: 2b 8a 00 3b cmplwi cr7,r10,59 ffc0a98c: 4d 9d 00 20 bgtlr cr7 (the_tod->second >= TOD_SECONDS_PER_MINUTE) || ffc0a990: 81 49 00 10 lwz r10,16(r9) ffc0a994: 2b 8a 00 3b cmplwi cr7,r10,59 ffc0a998: 4d 9d 00 20 bgtlr cr7 (the_tod->minute >= TOD_MINUTES_PER_HOUR) || ffc0a99c: 81 49 00 0c lwz r10,12(r9) ffc0a9a0: 2b 8a 00 17 cmplwi cr7,r10,23 ffc0a9a4: 4d 9d 00 20 bgtlr cr7 (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || ffc0a9a8: 81 49 00 04 lwz r10,4(r9) 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) || ffc0a9ac: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0a9b0: 4d 9e 00 20 beqlr cr7 (the_tod->month == 0) || ffc0a9b4: 2b 8a 00 0c cmplwi cr7,r10,12 ffc0a9b8: 4d 9d 00 20 bgtlr cr7 (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || ffc0a9bc: 81 09 00 00 lwz r8,0(r9) (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) || ffc0a9c0: 2b 88 07 c3 cmplwi cr7,r8,1987 ffc0a9c4: 4c 9d 00 20 blelr cr7 (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) ffc0a9c8: 81 29 00 08 lwz r9,8(r9) (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) || ffc0a9cc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a9d0: 4d 9e 00 20 beqlr cr7 (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) ffc0a9d4: 71 07 00 03 andi. r7,r8,3 ffc0a9d8: 40 82 00 30 bne- ffc0aa08 <_TOD_Validate+0xb0> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; ffc0a9dc: 39 4a 00 0d addi r10,r10,13 ffc0a9e0: 3d 00 ff c2 lis r8,-62 ffc0a9e4: 55 4a 10 3a rlwinm r10,r10,2,0,29 ffc0a9e8: 39 08 2b 90 addi r8,r8,11152 ffc0a9ec: 7c 68 50 2e lwzx r3,r8,r10 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; if ( the_tod->day > days_in_month ) ffc0a9f0: 7c 69 18 10 subfc r3,r9,r3 ffc0a9f4: 38 60 00 00 li r3,0 ffc0a9f8: 7c 63 19 14 adde r3,r3,r3 ffc0a9fc: 4e 80 00 20 blr (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; ffc0aa00: 38 60 00 00 li r3,0 <== NOT EXECUTED if ( the_tod->day > days_in_month ) return false; return true; } ffc0aa04: 4e 80 00 20 blr <== NOT EXECUTED return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; ffc0aa08: 3d 00 ff c2 lis r8,-62 ffc0aa0c: 55 4a 10 3a rlwinm r10,r10,2,0,29 ffc0aa10: 39 08 2b 90 addi r8,r8,11152 ffc0aa14: 7c 68 50 2e lwzx r3,r8,r10 ffc0aa18: 4b ff ff d8 b ffc0a9f0 <_TOD_Validate+0x98> =============================================================================== ffc0c434 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { ffc0c434: 94 21 ff e8 stwu r1,-24(r1) ffc0c438: 7c 08 02 a6 mflr r0 ffc0c43c: 90 01 00 1c stw r0,28(r1) ffc0c440: 93 e1 00 14 stw r31,20(r1) ffc0c444: 7c 7f 1b 78 mr r31,r3 ffc0c448: 93 81 00 08 stw r28,8(r1) ffc0c44c: 7c bc 2b 78 mr r28,r5 ffc0c450: 93 a1 00 0c stw r29,12(r1) ffc0c454: 93 c1 00 10 stw r30,16(r1) ffc0c458: 7c 9e 23 78 mr r30,r4 States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; ffc0c45c: 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 ); ffc0c460: 48 00 11 c1 bl ffc0d620 <_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 ) ffc0c464: 81 3f 00 14 lwz r9,20(r31) ffc0c468: 7f 89 f0 00 cmpw cr7,r9,r30 ffc0c46c: 41 9e 00 10 beq- cr7,ffc0c47c <_Thread_Change_priority+0x48> _Thread_Set_priority( the_thread, new_priority ); ffc0c470: 7f e3 fb 78 mr r3,r31 ffc0c474: 7f c4 f3 78 mr r4,r30 ffc0c478: 48 00 11 1d bl ffc0d594 <_Thread_Set_priority> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0c47c: 7f c0 00 a6 mfmsr r30 ffc0c480: 7d 30 42 a6 mfsprg r9,0 ffc0c484: 7f c9 48 78 andc r9,r30,r9 ffc0c488: 7d 20 01 24 mtmsr r9 /* * 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; ffc0c48c: 81 3f 00 10 lwz r9,16(r31) if ( state != STATES_TRANSIENT ) { ffc0c490: 2f 89 00 04 cmpwi cr7,r9,4 ffc0c494: 41 9e 00 84 beq- cr7,ffc0c518 <_Thread_Change_priority+0xe4> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) ffc0c498: 73 a8 00 04 andi. r8,r29,4 ffc0c49c: 41 82 00 38 beq- ffc0c4d4 <_Thread_Change_priority+0xa0><== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0c4a0: 7f c0 01 24 mtmsr r30 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); ffc0c4a4: 3d 40 00 03 lis r10,3 <== NOT EXECUTED ffc0c4a8: 61 4a be e0 ori r10,r10,48864 <== NOT EXECUTED the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc0c4ac: 7d 28 50 39 and. r8,r9,r10 <== NOT EXECUTED ffc0c4b0: 40 82 00 40 bne- ffc0c4f0 <_Thread_Change_priority+0xbc><== NOT EXECUTED if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } ffc0c4b4: 80 01 00 1c lwz r0,28(r1) ffc0c4b8: 83 81 00 08 lwz r28,8(r1) ffc0c4bc: 7c 08 03 a6 mtlr r0 ffc0c4c0: 83 a1 00 0c lwz r29,12(r1) ffc0c4c4: 83 c1 00 10 lwz r30,16(r1) ffc0c4c8: 83 e1 00 14 lwz r31,20(r1) ffc0c4cc: 38 21 00 18 addi r1,r1,24 ffc0c4d0: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); ffc0c4d4: 55 2a 07 b8 rlwinm r10,r9,0,30,28 */ state = the_thread->current_state; if ( state != STATES_TRANSIENT ) { /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); ffc0c4d8: 91 5f 00 10 stw r10,16(r31) ffc0c4dc: 7f c0 01 24 mtmsr r30 */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); ffc0c4e0: 3d 40 00 03 lis r10,3 ffc0c4e4: 61 4a be e0 ori r10,r10,48864 _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc0c4e8: 7d 28 50 39 and. r8,r9,r10 ffc0c4ec: 41 82 ff c8 beq+ ffc0c4b4 <_Thread_Change_priority+0x80> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } ffc0c4f0: 80 01 00 1c lwz r0,28(r1) /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); ffc0c4f4: 7f e4 fb 78 mr r4,r31 ffc0c4f8: 80 7f 00 44 lwz r3,68(r31) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } ffc0c4fc: 7c 08 03 a6 mtlr r0 ffc0c500: 83 81 00 08 lwz r28,8(r1) ffc0c504: 83 a1 00 0c lwz r29,12(r1) ffc0c508: 83 c1 00 10 lwz r30,16(r1) ffc0c50c: 83 e1 00 14 lwz r31,20(r1) ffc0c510: 38 21 00 18 addi r1,r1,24 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); ffc0c514: 48 00 0f 88 b ffc0d49c <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { ffc0c518: 73 a9 00 04 andi. r9,r29,4 */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); ffc0c51c: 3f a0 00 00 lis r29,0 ffc0c520: 3b bd 20 80 addi r29,r29,8320 ffc0c524: 40 82 00 20 bne- ffc0c544 <_Thread_Change_priority+0x110><== 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 ) ffc0c528: 2f 9c 00 00 cmpwi cr7,r28,0 * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); ffc0c52c: 91 3f 00 10 stw r9,16(r31) if ( prepend_it ) ffc0c530: 41 9e 00 7c beq- cr7,ffc0c5ac <_Thread_Change_priority+0x178> ffc0c534: 81 3d 00 28 lwz r9,40(r29) ffc0c538: 7f e3 fb 78 mr r3,r31 ffc0c53c: 7d 29 03 a6 mtctr r9 ffc0c540: 4e 80 04 21 bctrl static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc0c544: 7d 20 00 a6 mfmsr r9 ffc0c548: 7f c0 01 24 mtmsr r30 ffc0c54c: 7d 20 01 24 mtmsr r9 * 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(); ffc0c550: 81 3d 00 08 lwz r9,8(r29) ffc0c554: 7d 29 03 a6 mtctr r9 ffc0c558: 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 ); ffc0c55c: 3d 20 00 00 lis r9,0 ffc0c560: 39 29 31 a0 addi r9,r9,12704 ffc0c564: 81 49 00 10 lwz r10,16(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() && ffc0c568: 81 09 00 14 lwz r8,20(r9) ffc0c56c: 7f 8a 40 00 cmpw cr7,r10,r8 ffc0c570: 41 9e 00 18 beq- cr7,ffc0c588 <_Thread_Change_priority+0x154> ffc0c574: 89 4a 00 70 lbz r10,112(r10) ffc0c578: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c57c: 41 9e 00 0c beq- cr7,ffc0c588 <_Thread_Change_priority+0x154> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; ffc0c580: 39 40 00 01 li r10,1 ffc0c584: 99 49 00 0c stb r10,12(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0c588: 7f c0 01 24 mtmsr r30 _ISR_Enable( level ); } ffc0c58c: 80 01 00 1c lwz r0,28(r1) ffc0c590: 83 81 00 08 lwz r28,8(r1) ffc0c594: 7c 08 03 a6 mtlr r0 ffc0c598: 83 a1 00 0c lwz r29,12(r1) ffc0c59c: 83 c1 00 10 lwz r30,16(r1) ffc0c5a0: 83 e1 00 14 lwz r31,20(r1) ffc0c5a4: 38 21 00 18 addi r1,r1,24 ffc0c5a8: 4e 80 00 20 blr */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); ffc0c5ac: 81 3d 00 24 lwz r9,36(r29) ffc0c5b0: 7f e3 fb 78 mr r3,r31 ffc0c5b4: 7d 29 03 a6 mtctr r9 ffc0c5b8: 4e 80 04 21 bctrl ffc0c5bc: 4b ff ff 88 b ffc0c544 <_Thread_Change_priority+0x110> =============================================================================== ffc0c82c <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0c82c: 94 21 ff e8 stwu r1,-24(r1) ffc0c830: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0c834: 38 81 00 08 addi r4,r1,8 void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0c838: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0c83c: 48 00 02 a1 bl ffc0cadc <_Thread_Get> switch ( location ) { ffc0c840: 81 21 00 08 lwz r9,8(r1) ffc0c844: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c848: 40 9e 00 20 bne- cr7,ffc0c868 <_Thread_Delay_ended+0x3c><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( ffc0c84c: 3c 80 10 00 lis r4,4096 ffc0c850: 60 84 00 18 ori r4,r4,24 ffc0c854: 4b ff fd 6d bl ffc0c5c0 <_Thread_Clear_state> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc0c858: 3d 20 00 00 lis r9,0 ffc0c85c: 81 49 28 68 lwz r10,10344(r9) --level; ffc0c860: 39 4a ff ff addi r10,r10,-1 _Thread_Dispatch_disable_level = level; ffc0c864: 91 49 28 68 stw r10,10344(r9) | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } ffc0c868: 80 01 00 1c lwz r0,28(r1) ffc0c86c: 38 21 00 18 addi r1,r1,24 ffc0c870: 7c 08 03 a6 mtlr r0 ffc0c874: 4e 80 00 20 blr =============================================================================== ffc0c878 <_Thread_Dispatch>: #if defined(RTEMS_SMP) #include #endif void _Thread_Dispatch( void ) { ffc0c878: 94 21 ff b8 stwu r1,-72(r1) ffc0c87c: 7c 08 02 a6 mflr r0 ffc0c880: 93 81 00 38 stw r28,56(r1) #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; ffc0c884: 3f 80 00 00 lis r28,0 ffc0c888: 3b 9c 31 a0 addi r28,r28,12704 #if defined(RTEMS_SMP) #include #endif void _Thread_Dispatch( void ) { ffc0c88c: 93 e1 00 44 stw r31,68(r1) ffc0c890: 90 01 00 4c stw r0,76(r1) ffc0c894: 92 81 00 18 stw r20,24(r1) ffc0c898: 92 a1 00 1c stw r21,28(r1) ffc0c89c: 92 c1 00 20 stw r22,32(r1) ffc0c8a0: 92 e1 00 24 stw r23,36(r1) ffc0c8a4: 93 01 00 28 stw r24,40(r1) ffc0c8a8: 93 21 00 2c stw r25,44(r1) ffc0c8ac: 93 41 00 30 stw r26,48(r1) ffc0c8b0: 93 61 00 34 stw r27,52(r1) ffc0c8b4: 93 a1 00 3c stw r29,60(r1) ffc0c8b8: 93 c1 00 40 stw r30,64(r1) #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; ffc0c8bc: 83 fc 00 10 lwz r31,16(r28) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0c8c0: 7d 20 00 a6 mfmsr r9 ffc0c8c4: 7d 50 42 a6 mfsprg r10,0 ffc0c8c8: 7d 2a 50 78 andc r10,r9,r10 ffc0c8cc: 7d 40 01 24 mtmsr r10 _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { ffc0c8d0: 89 5c 00 0c lbz r10,12(r28) ffc0c8d4: 3f 60 00 00 lis r27,0 ffc0c8d8: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c8dc: 41 9e 01 58 beq- cr7,ffc0ca34 <_Thread_Dispatch+0x1bc> heir = _Thread_Heir; ffc0c8e0: 83 dc 00 14 lwz r30,20(r28) * This routine sets thread dispatch level to the * value passed in. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_set_disable_level(uint32_t value) { _Thread_Dispatch_disable_level = value; ffc0c8e4: 39 40 00 01 li r10,1 ffc0c8e8: 3f 60 00 00 lis r27,0 /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) ffc0c8ec: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0c8f0: 91 5b 28 68 stw r10,10344(r27) while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; ffc0c8f4: 39 40 00 00 li r10,0 _Thread_Executing = heir; ffc0c8f8: 93 dc 00 10 stw r30,16(r28) while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; ffc0c8fc: 99 5c 00 0c stb r10,12(r28) /* * 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 ) ffc0c900: 41 9e 01 34 beq- cr7,ffc0ca34 <_Thread_Dispatch+0x1bc> ffc0c904: 3f 40 00 00 lis r26,0 ffc0c908: 3b 5a 22 08 addi r26,r26,8712 ffc0c90c: 3f 00 00 00 lis r24,0 ffc0c910: 3f 20 00 00 lis r25,0 ffc0c914: 3b 18 2c 68 addi r24,r24,11368 ffc0c918: 3b 39 28 70 addi r25,r25,10352 ffc0c91c: 3b ba 00 04 addi r29,r26,4 #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; ffc0c920: 3e a0 00 00 lis r21,0 ffc0c924: 3a c0 00 01 li r22,1 while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; ffc0c928: 3a e0 00 00 li r23,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 ) ffc0c92c: 81 5e 00 78 lwz r10,120(r30) ffc0c930: 2f 8a 00 01 cmpwi cr7,r10,1 ffc0c934: 41 9e 01 80 beq- cr7,ffc0cab4 <_Thread_Dispatch+0x23c> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0c938: 7d 20 01 24 mtmsr r9 */ static inline void _TOD_Get_uptime( Timestamp_Control *time ) { _TOD_Get_with_nanoseconds( time, &_TOD.uptime ); ffc0c93c: 38 61 00 08 addi r3,r1,8 ffc0c940: 7f 04 c3 78 mr r4,r24 ffc0c944: 4b ff e4 51 bl ffc0ad94 <_TOD_Get_with_nanoseconds> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0c948: 80 b9 00 00 lwz r5,0(r25) const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; ffc0c94c: 80 dc 00 20 lwz r6,32(r28) ffc0c950: 2f 85 00 00 cmpwi cr7,r5,0 ffc0c954: 80 fc 00 24 lwz r7,36(r28) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( ffc0c958: 81 41 00 08 lwz r10,8(r1) ffc0c95c: 81 61 00 0c lwz r11,12(r1) static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; ffc0c960: 81 1f 00 80 lwz r8,128(r31) ffc0c964: 81 3f 00 84 lwz r9,132(r31) const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; ffc0c968: 7c e7 58 10 subfc r7,r7,r11 ffc0c96c: 7c c6 51 10 subfe r6,r6,r10 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; ffc0c970: 7d 29 38 14 addc r9,r9,r7 ffc0c974: 7d 08 31 14 adde r8,r8,r6 ffc0c978: 91 1f 00 80 stw r8,128(r31) ffc0c97c: 91 3f 00 84 stw r9,132(r31) &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0c980: 91 5c 00 20 stw r10,32(r28) ffc0c984: 91 7c 00 24 stw r11,36(r28) #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0c988: 41 9e 00 14 beq- cr7,ffc0c99c <_Thread_Dispatch+0x124> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; ffc0c98c: 81 25 00 00 lwz r9,0(r5) ffc0c990: 91 3f 01 48 stw r9,328(r31) *_Thread_libc_reent = heir->libc_reent; ffc0c994: 81 3e 01 48 lwz r9,328(r30) ffc0c998: 91 25 00 00 stw r9,0(r5) */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0c99c: 82 9a 00 00 lwz r20,0(r26) { const Chain_Control *chain = &_User_extensions_Switches_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { ffc0c9a0: 7f 94 e8 00 cmpw cr7,r20,r29 ffc0c9a4: 41 9e 00 24 beq- cr7,ffc0c9c8 <_Thread_Dispatch+0x150> <== NEVER TAKEN const User_extensions_Switch_control *extension = (const User_extensions_Switch_control *) node; (*extension->thread_switch)( executing, heir ); ffc0c9a8: 81 34 00 08 lwz r9,8(r20) ffc0c9ac: 7f e3 fb 78 mr r3,r31 ffc0c9b0: 7f c4 f3 78 mr r4,r30 ffc0c9b4: 7d 29 03 a6 mtctr r9 ffc0c9b8: 4e 80 04 21 bctrl #ifdef RTEMS_SMP _Thread_Unnest_dispatch(); #endif _API_extensions_Run_post_switch( executing ); } ffc0c9bc: 82 94 00 00 lwz r20,0(r20) { const Chain_Control *chain = &_User_extensions_Switches_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { ffc0c9c0: 7f 94 e8 00 cmpw cr7,r20,r29 ffc0c9c4: 40 9e ff e4 bne+ cr7,ffc0c9a8 <_Thread_Dispatch+0x130> * operations. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE ) if ( executing->fp_context != NULL ) ffc0c9c8: 81 3f 01 44 lwz r9,324(r31) ffc0c9cc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c9d0: 41 9e 00 0c beq- cr7,ffc0c9dc <_Thread_Dispatch+0x164> _Context_Save_fp( &executing->fp_context ); ffc0c9d4: 38 7f 01 44 addi r3,r31,324 ffc0c9d8: 48 01 0e c9 bl ffc1d8a0 <_CPU_Context_save_fp> #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); ffc0c9dc: 38 7f 00 c4 addi r3,r31,196 ffc0c9e0: 38 9e 00 c4 addi r4,r30,196 ffc0c9e4: 48 01 10 3d bl ffc1da20 <_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 ) ffc0c9e8: 81 3f 01 44 lwz r9,324(r31) ffc0c9ec: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c9f0: 41 9e 00 0c beq- cr7,ffc0c9fc <_Thread_Dispatch+0x184> _Context_Restore_fp( &executing->fp_context ); ffc0c9f4: 38 7f 01 44 addi r3,r31,324 ffc0c9f8: 48 01 0f 69 bl ffc1d960 <_CPU_Context_restore_fp> #endif #endif executing = _Thread_Executing; ffc0c9fc: 83 fc 00 10 lwz r31,16(r28) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0ca00: 7d 20 00 a6 mfmsr r9 ffc0ca04: 7d 50 42 a6 mfsprg r10,0 ffc0ca08: 7d 2a 50 78 andc r10,r9,r10 ffc0ca0c: 7d 40 01 24 mtmsr r10 /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { ffc0ca10: 89 5c 00 0c lbz r10,12(r28) ffc0ca14: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0ca18: 41 9e 00 1c beq- cr7,ffc0ca34 <_Thread_Dispatch+0x1bc> heir = _Thread_Heir; ffc0ca1c: 83 dc 00 14 lwz r30,20(r28) ffc0ca20: 92 db 28 68 stw r22,10344(r27) /* * 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 ) ffc0ca24: 7f 9e f8 00 cmpw cr7,r30,r31 while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; ffc0ca28: 9a fc 00 0c stb r23,12(r28) _Thread_Executing = heir; ffc0ca2c: 93 dc 00 10 stw r30,16(r28) /* * 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 ) ffc0ca30: 40 9e fe fc bne+ cr7,ffc0c92c <_Thread_Dispatch+0xb4> <== ALWAYS TAKEN ffc0ca34: 39 40 00 00 li r10,0 ffc0ca38: 91 5b 28 68 stw r10,10344(r27) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0ca3c: 7d 20 01 24 mtmsr r9 ffc0ca40: 3d 20 00 00 lis r9,0 ffc0ca44: 3b a9 2d 90 addi r29,r9,11664 ffc0ca48: 83 c9 2d 90 lwz r30,11664(r9) { const Chain_Control *chain = &_API_extensions_Post_switch_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { ffc0ca4c: 3b bd 00 04 addi r29,r29,4 ffc0ca50: 7f 9e e8 00 cmpw cr7,r30,r29 ffc0ca54: 41 9e 00 20 beq- cr7,ffc0ca74 <_Thread_Dispatch+0x1fc> const API_extensions_Post_switch_control *post_switch = (const API_extensions_Post_switch_control *) node; (*post_switch->hook)( executing ); ffc0ca58: 81 3e 00 08 lwz r9,8(r30) ffc0ca5c: 7f e3 fb 78 mr r3,r31 ffc0ca60: 7d 29 03 a6 mtctr r9 ffc0ca64: 4e 80 04 21 bctrl #ifdef RTEMS_SMP _Thread_Unnest_dispatch(); #endif _API_extensions_Run_post_switch( executing ); } ffc0ca68: 83 de 00 00 lwz r30,0(r30) { const Chain_Control *chain = &_API_extensions_Post_switch_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { ffc0ca6c: 7f 9e e8 00 cmpw cr7,r30,r29 ffc0ca70: 40 9e ff e8 bne+ cr7,ffc0ca58 <_Thread_Dispatch+0x1e0> <== NEVER TAKEN ffc0ca74: 80 01 00 4c lwz r0,76(r1) ffc0ca78: 82 81 00 18 lwz r20,24(r1) ffc0ca7c: 7c 08 03 a6 mtlr r0 ffc0ca80: 82 a1 00 1c lwz r21,28(r1) ffc0ca84: 82 c1 00 20 lwz r22,32(r1) ffc0ca88: 82 e1 00 24 lwz r23,36(r1) ffc0ca8c: 83 01 00 28 lwz r24,40(r1) ffc0ca90: 83 21 00 2c lwz r25,44(r1) ffc0ca94: 83 41 00 30 lwz r26,48(r1) ffc0ca98: 83 61 00 34 lwz r27,52(r1) ffc0ca9c: 83 81 00 38 lwz r28,56(r1) ffc0caa0: 83 a1 00 3c lwz r29,60(r1) ffc0caa4: 83 c1 00 40 lwz r30,64(r1) ffc0caa8: 83 e1 00 44 lwz r31,68(r1) ffc0caac: 38 21 00 48 addi r1,r1,72 ffc0cab0: 4e 80 00 20 blr #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; ffc0cab4: 81 55 28 64 lwz r10,10340(r21) ffc0cab8: 91 5e 00 74 stw r10,116(r30) ffc0cabc: 4b ff fe 7c b ffc0c938 <_Thread_Dispatch+0xc0> =============================================================================== ffc12e0c <_Thread_Handler>: #define INIT_NAME __main #define EXECUTE_GLOBAL_CONSTRUCTORS #endif void _Thread_Handler( void ) { ffc12e0c: 94 21 ff f0 stwu r1,-16(r1) ffc12e10: 7c 08 02 a6 mflr r0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; ffc12e14: 3d 20 00 00 lis r9,0 #define INIT_NAME __main #define EXECUTE_GLOBAL_CONSTRUCTORS #endif void _Thread_Handler( void ) { ffc12e18: 90 01 00 14 stw r0,20(r1) ffc12e1c: 93 e1 00 0c stw r31,12(r1) #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; ffc12e20: 83 e9 31 b0 lwz r31,12720(r9) #define INIT_NAME __main #define EXECUTE_GLOBAL_CONSTRUCTORS #endif void _Thread_Handler( void ) { ffc12e24: 93 c1 00 08 stw r30,8(r1) /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; ffc12e28: 81 5f 00 a8 lwz r10,168(r31) } static inline void _CPU_ISR_Set_level( uint32_t level ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc12e2c: 39 20 00 00 li r9,0 ffc12e30: 7d 20 00 a6 mfmsr r9 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc12e34: 71 48 00 01 andi. r8,r10,1 static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; __asm__ volatile ( ffc12e38: 7d 50 42 a6 mfsprg r10,0 ffc12e3c: 40 82 00 6c bne- ffc12ea8 <_Thread_Handler+0x9c> msr |= ppc_interrupt_get_disable_mask(); ffc12e40: 7d 49 4b 78 or r9,r10,r9 } else { msr &= ~ppc_interrupt_get_disable_mask(); } _CPU_MSR_SET(msr); ffc12e44: 7d 20 01 24 mtmsr r9 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; ffc12e48: 3d 20 00 00 lis r9,0 ffc12e4c: 8b c9 2a 40 lbz r30,10816(r9) ); } static inline void _User_extensions_Thread_begin( Thread_Control *executing ) { _User_extensions_Iterate( ffc12e50: 3c 80 ff c1 lis r4,-63 doneConstructors = true; ffc12e54: 39 40 00 01 li r10,1 ffc12e58: 7f e3 fb 78 mr r3,r31 ffc12e5c: 99 49 2a 40 stb r10,10816(r9) ffc12e60: 38 84 d8 c0 addi r4,r4,-10048 ffc12e64: 4b ff aa a9 bl ffc0d90c <_User_extensions_Iterate> _User_extensions_Thread_begin( executing ); /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); ffc12e68: 4b ff 9c 59 bl ffc0cac0 <_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) */ { ffc12e6c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc12e70: 41 9e 00 40 beq- cr7,ffc12eb0 <_Thread_Handler+0xa4> _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { ffc12e74: 81 3f 00 90 lwz r9,144(r31) ffc12e78: 2f 89 00 00 cmpwi cr7,r9,0 ffc12e7c: 41 9e 00 3c beq- cr7,ffc12eb8 <_Thread_Handler+0xac> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { ffc12e80: 2f 89 00 01 cmpwi cr7,r9,1 ffc12e84: 41 9e 00 4c beq- cr7,ffc12ed0 <_Thread_Handler+0xc4> <== ALWAYS TAKEN } } static inline void _User_extensions_Thread_exitted( Thread_Control *executing ) { _User_extensions_Iterate( ffc12e88: 3c 80 ff c1 lis r4,-63 ffc12e8c: 7f e3 fb 78 mr r3,r31 ffc12e90: 38 84 d8 d4 addi r4,r4,-10028 ffc12e94: 4b ff aa 79 bl ffc0d90c <_User_extensions_Iterate> * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); _Internal_error_Occurred( ffc12e98: 38 60 00 00 li r3,0 ffc12e9c: 38 80 00 01 li r4,1 ffc12ea0: 38 a0 00 05 li r5,5 ffc12ea4: 4b ff 84 cd bl ffc0b370 <_Internal_error_Occurred> _CPU_MSR_GET(msr); if (!(level & CPU_MODES_INTERRUPT_MASK)) { msr |= ppc_interrupt_get_disable_mask(); } else { msr &= ~ppc_interrupt_get_disable_mask(); ffc12ea8: 7d 29 50 78 andc r9,r9,r10 ffc12eac: 4b ff ff 98 b ffc12e44 <_Thread_Handler+0x38> * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (doCons) /* && (volatile void *)_init) */ { INIT_NAME (); ffc12eb0: 48 00 bb ed bl ffc1ea9c <_init> ffc12eb4: 4b ff ff c0 b ffc12e74 <_Thread_Handler+0x68> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( ffc12eb8: 81 3f 00 8c lwz r9,140(r31) ffc12ebc: 80 7f 00 98 lwz r3,152(r31) ffc12ec0: 7d 29 03 a6 mtctr r9 ffc12ec4: 4e 80 04 21 bctrl #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = ffc12ec8: 90 7f 00 28 stw r3,40(r31) ffc12ecc: 4b ff ff bc b ffc12e88 <_Thread_Handler+0x7c> ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( ffc12ed0: 81 3f 00 8c lwz r9,140(r31) ffc12ed4: 80 7f 00 94 lwz r3,148(r31) ffc12ed8: 7d 29 03 a6 mtctr r9 ffc12edc: 4e 80 04 21 bctrl executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = ffc12ee0: 90 7f 00 28 stw r3,40(r31) ffc12ee4: 4b ff ff a4 b ffc12e88 <_Thread_Handler+0x7c> =============================================================================== ffc0ce0c <_Thread_Handler_initialization>: #include #endif void _Thread_Handler_initialization(void) { uint32_t ticks_per_timeslice = ffc0ce0c: 3d 20 ff c2 lis r9,-62 #if defined(RTEMS_SMP) #include #endif void _Thread_Handler_initialization(void) { ffc0ce10: 94 21 ff f0 stwu r1,-16(r1) uint32_t ticks_per_timeslice = ffc0ce14: 39 29 ea f8 addi r9,r9,-5384 #if defined(RTEMS_SMP) #include #endif void _Thread_Handler_initialization(void) { ffc0ce18: 7c 08 02 a6 mflr r0 #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies = _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || ffc0ce1c: 81 49 00 28 lwz r10,40(r9) #if defined(RTEMS_SMP) #include #endif void _Thread_Handler_initialization(void) { ffc0ce20: 93 c1 00 08 stw r30,8(r1) #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies = _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || ffc0ce24: 2f 8a 00 00 cmpwi cr7,r10,0 #if defined(RTEMS_SMP) #include #endif void _Thread_Handler_initialization(void) { ffc0ce28: 93 e1 00 0c stw r31,12(r1) ffc0ce2c: 90 01 00 14 stw r0,20(r1) uint32_t ticks_per_timeslice = ffc0ce30: 83 e9 00 14 lwz r31,20(r9) rtems_configuration_get_ticks_per_timeslice(); uint32_t maximum_extensions = ffc0ce34: 83 c9 00 08 lwz r30,8(r9) rtems_configuration_get_maximum_extensions(); rtems_stack_allocate_init_hook stack_allocate_init_hook = ffc0ce38: 81 49 00 24 lwz r10,36(r9) #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies = _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || ffc0ce3c: 41 9e 00 90 beq- cr7,ffc0cecc <_Thread_Handler_initialization+0xc0><== NEVER TAKEN ffc0ce40: 81 09 00 2c lwz r8,44(r9) ffc0ce44: 2f 88 00 00 cmpwi cr7,r8,0 ffc0ce48: 41 9e 00 84 beq- cr7,ffc0cecc <_Thread_Handler_initialization+0xc0> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); if ( stack_allocate_init_hook != NULL ) ffc0ce4c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0ce50: 41 9e 00 10 beq- cr7,ffc0ce60 <_Thread_Handler_initialization+0x54> (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() ); ffc0ce54: 80 69 00 04 lwz r3,4(r9) ffc0ce58: 7d 49 03 a6 mtctr r10 ffc0ce5c: 4e 80 04 21 bctrl _Thread_Dispatch_necessary = false; ffc0ce60: 3d 60 00 00 lis r11,0 ffc0ce64: 39 6b 31 a0 addi r11,r11,12704 ffc0ce68: 38 00 00 00 li r0,0 ffc0ce6c: 98 0b 00 0c stb r0,12(r11) _Thread_Executing = NULL; ffc0ce70: 39 40 00 00 li r10,0 #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( ffc0ce74: 3c 60 00 00 lis r3,0 false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } ffc0ce78: 80 01 00 14 lwz r0,20(r1) #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( ffc0ce7c: 38 63 2d f4 addi r3,r3,11764 if ( stack_allocate_init_hook != NULL ) (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() ); _Thread_Dispatch_necessary = false; _Thread_Executing = NULL; ffc0ce80: 91 4b 00 10 stw r10,16(r11) #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( ffc0ce84: 38 80 00 01 li r4,1 false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } ffc0ce88: 7c 08 03 a6 mtlr r0 #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( ffc0ce8c: 38 a0 00 01 li r5,1 if ( stack_allocate_init_hook != NULL ) (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() ); _Thread_Dispatch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL; ffc0ce90: 91 4b 00 14 stw r10,20(r11) #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; ffc0ce94: 3d 60 00 00 lis r11,0 #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( ffc0ce98: 38 c0 00 01 li r6,1 _Thread_Dispatch_necessary = false; _Thread_Executing = NULL; _Thread_Heir = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; ffc0ce9c: 91 4b 28 6c stw r10,10348(r11) #endif _Thread_Maximum_extensions = maximum_extensions; ffc0cea0: 3d 40 00 00 lis r10,0 #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( ffc0cea4: 38 e0 01 60 li r7,352 _Thread_Heir = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Maximum_extensions = maximum_extensions; ffc0cea8: 93 ca 28 74 stw r30,10356(r10) _Thread_Ticks_per_timeslice = ticks_per_timeslice; ffc0ceac: 3d 40 00 00 lis r10,0 #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( ffc0ceb0: 39 00 00 00 li r8,0 false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } ffc0ceb4: 83 c1 00 08 lwz r30,8(r1) #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( ffc0ceb8: 39 20 00 08 li r9,8 _Thread_Allocated_fp = NULL; #endif _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; ffc0cebc: 93 ea 28 64 stw r31,10340(r10) false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } ffc0cec0: 83 e1 00 0c lwz r31,12(r1) ffc0cec4: 38 21 00 10 addi r1,r1,16 #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( ffc0cec8: 4b ff eb a0 b ffc0ba68 <_Objects_Initialize_information> _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || rtems_configuration_get_stack_free_hook() == NULL) _Internal_error_Occurred( ffc0cecc: 38 60 00 00 li r3,0 ffc0ced0: 38 80 00 01 li r4,1 ffc0ced4: 38 a0 00 0e li r5,14 ffc0ced8: 4b ff e4 99 bl ffc0b370 <_Internal_error_Occurred> =============================================================================== ffc0cb74 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0cb74: 94 21 ff b8 stwu r1,-72(r1) ffc0cb78: 7c 08 02 a6 mflr r0 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0cb7c: 39 60 00 00 li r11,0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0cb80: 93 c1 00 40 stw r30,64(r1) if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { ffc0cb84: 7c be 2b 79 mr. r30,r5 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0cb88: 90 01 00 4c stw r0,76(r1) ffc0cb8c: 93 81 00 38 stw r28,56(r1) ffc0cb90: 7d 5c 53 78 mr r28,r10 ffc0cb94: 81 41 00 58 lwz r10,88(r1) ffc0cb98: 92 e1 00 24 stw r23,36(r1) ffc0cb9c: 7d 37 4b 78 mr r23,r9 ffc0cba0: 93 41 00 30 stw r26,48(r1) ffc0cba4: 7c 7a 1b 78 mr r26,r3 ffc0cba8: 93 61 00 34 stw r27,52(r1) ffc0cbac: 93 a1 00 3c stw r29,60(r1) ffc0cbb0: 7d 1d 43 78 mr r29,r8 ffc0cbb4: 93 e1 00 44 stw r31,68(r1) ffc0cbb8: 7c 9f 23 78 mr r31,r4 ffc0cbbc: 93 01 00 28 stw r24,40(r1) ffc0cbc0: 93 21 00 2c stw r25,44(r1) ffc0cbc4: 83 6a 00 00 lwz r27,0(r10) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0cbc8: 91 64 01 4c stw r11,332(r4) ffc0cbcc: 91 64 01 50 stw r11,336(r4) extensions_area = NULL; the_thread->libc_reent = NULL; ffc0cbd0: 91 64 01 48 stw r11,328(r4) if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { ffc0cbd4: 41 82 01 ec beq- ffc0cdc0 <_Thread_Initialize+0x24c> stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = true; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; ffc0cbd8: 99 64 00 b0 stb r11,176(r4) ffc0cbdc: 7c ca 33 78 mr r10,r6 /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { ffc0cbe0: 2f 87 00 00 cmpwi cr7,r7,0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0cbe4: 93 df 00 b8 stw r30,184(r31) extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; ffc0cbe8: 3b c0 00 00 li r30,0 the_stack->size = size; ffc0cbec: 91 5f 00 b4 stw r10,180(r31) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { ffc0cbf0: 40 9e 01 64 bne- cr7,ffc0cd54 <_Thread_Initialize+0x1e0> #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0cbf4: 3f 00 00 00 lis r24,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; ffc0cbf8: 93 df 01 44 stw r30,324(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0cbfc: 38 e0 00 00 li r7,0 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0cc00: 81 58 28 74 lwz r10,10356(r24) 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; ffc0cc04: 93 df 00 bc stw r30,188(r31) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0cc08: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0cc0c: 90 ff 00 50 stw r7,80(r31) the_watchdog->routine = routine; ffc0cc10: 90 ff 00 64 stw r7,100(r31) the_watchdog->id = id; ffc0cc14: 90 ff 00 68 stw r7,104(r31) the_watchdog->user_data = user_data; ffc0cc18: 90 ff 00 6c stw r7,108(r31) ffc0cc1c: 40 9e 01 54 bne- cr7,ffc0cd70 <_Thread_Initialize+0x1fc> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0cc20: 91 5f 01 54 stw r10,340(r31) * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; ffc0cc24: 3b 20 00 00 li r25,0 the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { ffc0cc28: 2f 9c 00 02 cmpwi cr7,r28,2 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0cc2c: 81 21 00 50 lwz r9,80(r1) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; ffc0cc30: 9a ff 00 9c stb r23,156(r31) the_thread->Start.budget_algorithm = budget_algorithm; ffc0cc34: 93 9f 00 a0 stw r28,160(r31) the_thread->Start.budget_callout = budget_callout; ffc0cc38: 91 3f 00 a4 stw r9,164(r31) switch ( budget_algorithm ) { ffc0cc3c: 40 be 00 10 bne+ cr7,ffc0cc4c <_Thread_Initialize+0xd8> case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0cc40: 3d 20 00 00 lis r9,0 ffc0cc44: 81 29 28 64 lwz r9,10340(r9) ffc0cc48: 91 3f 00 74 stw r9,116(r31) } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; ffc0cc4c: 39 20 00 00 li r9,0 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0cc50: 81 41 00 54 lwz r10,84(r1) the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; ffc0cc54: 91 3f 00 44 stw r9,68(r31) #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; ffc0cc58: 3b 80 00 01 li r28,1 */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); ffc0cc5c: 7f e3 fb 78 mr r3,r31 the_thread->Wait.queue = NULL; the_thread->resource_count = 0; ffc0cc60: 91 3f 00 1c stw r9,28(r31) ffc0cc64: 3d 20 00 00 lis r9,0 ffc0cc68: 81 29 20 98 lwz r9,8344(r9) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0cc6c: 91 5f 00 a8 stw r10,168(r31) ffc0cc70: 7d 29 03 a6 mtctr r9 the_thread->current_state = STATES_DORMANT; ffc0cc74: 93 9f 00 10 stw r28,16(r31) the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->real_priority = priority; ffc0cc78: 93 bf 00 18 stw r29,24(r31) the_thread->Start.initial_priority = priority; ffc0cc7c: 93 bf 00 ac stw r29,172(r31) ffc0cc80: 4e 80 04 21 bctrl sched =_Scheduler_Allocate( the_thread ); if ( !sched ) ffc0cc84: 7c 78 1b 79 mr. r24,r3 ffc0cc88: 41 82 00 5c beq- ffc0cce4 <_Thread_Initialize+0x170> goto failed; _Thread_Set_priority( the_thread, priority ); ffc0cc8c: 7f e3 fb 78 mr r3,r31 ffc0cc90: 7f a4 eb 78 mr r4,r29 ffc0cc94: 48 00 09 01 bl ffc0d594 <_Thread_Set_priority> Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( ffc0cc98: a1 3f 00 0a lhz r9,10(r31) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0cc9c: 81 1a 00 1c lwz r8,28(r26) static inline void _Timestamp64_implementation_Set_to_zero( Timestamp64_Control *_time ) { *_time = 0; ffc0cca0: 39 40 00 00 li r10,0 ffc0cca4: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0cca8: 91 5f 00 80 stw r10,128(r31) ffc0ccac: 39 60 00 00 li r11,0 ffc0ccb0: 91 7f 00 84 stw r11,132(r31) static inline bool _User_extensions_Thread_create( Thread_Control *created ) { User_extensions_Thread_create_context ctx = { created, true }; _User_extensions_Iterate( &ctx, _User_extensions_Thread_create_visitor ); ffc0ccb4: 3c 80 ff c1 lis r4,-63 ffc0ccb8: 38 61 00 08 addi r3,r1,8 ffc0ccbc: 7f e8 49 2e stwx r31,r8,r9 ffc0ccc0: 38 84 d8 14 addi r4,r4,-10220 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc0ccc4: 93 7f 00 0c stw r27,12(r31) * @{ */ static inline bool _User_extensions_Thread_create( Thread_Control *created ) { User_extensions_Thread_create_context ctx = { created, true }; ffc0ccc8: 93 e1 00 08 stw r31,8(r1) ffc0cccc: 9b 81 00 0c stb r28,12(r1) _User_extensions_Iterate( &ctx, _User_extensions_Thread_create_visitor ); ffc0ccd0: 48 00 0c 3d bl ffc0d90c <_User_extensions_Iterate> * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; ffc0ccd4: 38 60 00 01 li r3,1 return ctx.ok; ffc0ccd8: 89 21 00 0c lbz r9,12(r1) * 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 ) ffc0ccdc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0cce0: 40 9e 00 40 bne- cr7,ffc0cd20 <_Thread_Initialize+0x1ac> return true; failed: _Workspace_Free( the_thread->libc_reent ); ffc0cce4: 80 7f 01 48 lwz r3,328(r31) ffc0cce8: 48 00 12 9d bl ffc0df84 <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); ffc0ccec: 80 7f 01 4c lwz r3,332(r31) ffc0ccf0: 48 00 12 95 bl ffc0df84 <_Workspace_Free> ffc0ccf4: 80 7f 01 50 lwz r3,336(r31) ffc0ccf8: 48 00 12 8d bl ffc0df84 <_Workspace_Free> _Workspace_Free( extensions_area ); ffc0ccfc: 7f 23 cb 78 mr r3,r25 ffc0cd00: 48 00 12 85 bl ffc0df84 <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); ffc0cd04: 7f c3 f3 78 mr r3,r30 ffc0cd08: 48 00 12 7d bl ffc0df84 <_Workspace_Free> #endif _Workspace_Free( sched ); ffc0cd0c: 7f 03 c3 78 mr r3,r24 ffc0cd10: 48 00 12 75 bl ffc0df84 <_Workspace_Free> _Thread_Stack_Free( the_thread ); ffc0cd14: 7f e3 fb 78 mr r3,r31 ffc0cd18: 48 00 09 f5 bl ffc0d70c <_Thread_Stack_Free> return false; ffc0cd1c: 38 60 00 00 li r3,0 } ffc0cd20: 80 01 00 4c lwz r0,76(r1) ffc0cd24: 82 e1 00 24 lwz r23,36(r1) ffc0cd28: 7c 08 03 a6 mtlr r0 ffc0cd2c: 83 01 00 28 lwz r24,40(r1) ffc0cd30: 83 21 00 2c lwz r25,44(r1) ffc0cd34: 83 41 00 30 lwz r26,48(r1) ffc0cd38: 83 61 00 34 lwz r27,52(r1) ffc0cd3c: 83 81 00 38 lwz r28,56(r1) ffc0cd40: 83 a1 00 3c lwz r29,60(r1) ffc0cd44: 83 c1 00 40 lwz r30,64(r1) ffc0cd48: 83 e1 00 44 lwz r31,68(r1) ffc0cd4c: 38 21 00 48 addi r1,r1,72 ffc0cd50: 4e 80 00 20 blr /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); ffc0cd54: 38 60 01 08 li r3,264 ffc0cd58: 48 00 12 15 bl ffc0df6c <_Workspace_Allocate> if ( !fp_area ) ffc0cd5c: 7c 7e 1b 79 mr. r30,r3 ffc0cd60: 40 82 fe 94 bne+ ffc0cbf4 <_Thread_Initialize+0x80> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; ffc0cd64: 3b 20 00 00 li r25,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; ffc0cd68: 3b 00 00 00 li r24,0 ffc0cd6c: 4b ff ff 78 b ffc0cce4 <_Thread_Initialize+0x170> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( ffc0cd70: 38 6a 00 01 addi r3,r10,1 ffc0cd74: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc0cd78: 48 00 11 f5 bl ffc0df6c <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) ffc0cd7c: 7c 79 1b 79 mr. r25,r3 ffc0cd80: 41 82 00 84 beq- ffc0ce04 <_Thread_Initialize+0x290> goto failed; } the_thread->extensions = (void **) extensions_area; ffc0cd84: 93 3f 01 54 stw r25,340(r31) ffc0cd88: 7f 25 cb 78 mr r5,r25 * 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++ ) ffc0cd8c: 38 c0 00 00 li r6,0 ffc0cd90: 80 18 28 74 lwz r0,10356(r24) (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0cd94: 38 e0 00 00 li r7,0 * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) the_thread->extensions[i] = NULL; ffc0cd98: 39 60 00 00 li r11,0 ffc0cd9c: 48 00 00 08 b ffc0cda4 <_Thread_Initialize+0x230> ffc0cda0: 80 bf 01 54 lwz r5,340(r31) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) ffc0cda4: 38 e7 00 01 addi r7,r7,1 ffc0cda8: 7f 87 00 40 cmplw cr7,r7,r0 the_thread->extensions[i] = NULL; ffc0cdac: 54 c6 10 3a rlwinm r6,r6,2,0,29 ffc0cdb0: 7d 65 31 2e stwx r11,r5,r6 * 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++ ) ffc0cdb4: 7c e6 3b 78 mr r6,r7 ffc0cdb8: 40 9d ff e8 ble+ cr7,ffc0cda0 <_Thread_Initialize+0x22c> ffc0cdbc: 4b ff fe 6c b ffc0cc28 <_Thread_Initialize+0xb4> return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); ffc0cdc0: 7c 83 23 78 mr r3,r4 ffc0cdc4: 90 c1 00 18 stw r6,24(r1) ffc0cdc8: 7c c4 33 78 mr r4,r6 ffc0cdcc: 90 e1 00 1c stw r7,28(r1) ffc0cdd0: 48 00 08 ad bl ffc0d67c <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0cdd4: 7c 6a 1b 79 mr. r10,r3 ffc0cdd8: 80 c1 00 18 lwz r6,24(r1) return false; /* stack allocation failed */ ffc0cddc: 38 60 00 00 li r3,0 stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0cde0: 80 e1 00 1c lwz r7,28(r1) ffc0cde4: 41 a2 ff 3c beq- ffc0cd20 <_Thread_Initialize+0x1ac> ffc0cde8: 7f 86 50 40 cmplw cr7,r6,r10 return false; /* stack allocation failed */ ffc0cdec: 7f c3 f3 78 mr r3,r30 stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0cdf0: 41 bd ff 30 bgt- cr7,ffc0cd20 <_Thread_Initialize+0x1ac><== NEVER TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = true; ffc0cdf4: 39 20 00 01 li r9,1 if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; ffc0cdf8: 83 df 00 c0 lwz r30,192(r31) the_thread->Start.core_allocated_stack = true; ffc0cdfc: 99 3f 00 b0 stb r9,176(r31) ffc0ce00: 4b ff fd e0 b ffc0cbe0 <_Thread_Initialize+0x6c> size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; ffc0ce04: 3b 00 00 00 li r24,0 ffc0ce08: 4b ff fe dc b ffc0cce4 <_Thread_Initialize+0x170> =============================================================================== ffc0df58 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0df58: 94 21 ff e8 stwu r1,-24(r1) ffc0df5c: 7c 08 02 a6 mflr r0 ffc0df60: 90 01 00 1c stw r0,28(r1) */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); ffc0df64: 81 23 00 10 lwz r9,16(r3) ffc0df68: 93 e1 00 14 stw r31,20(r1) ffc0df6c: 7c 7f 1b 78 mr r31,r3 if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0df70: 71 2a 00 01 andi. r10,r9,1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0df74: 93 c1 00 10 stw r30,16(r1) if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0df78: 41 82 00 20 beq- ffc0df98 <_Thread_Restart+0x40> _Thread_Restart_self(); return true; } return false; ffc0df7c: 38 60 00 00 li r3,0 } ffc0df80: 80 01 00 1c lwz r0,28(r1) ffc0df84: 83 c1 00 10 lwz r30,16(r1) ffc0df88: 7c 08 03 a6 mtlr r0 ffc0df8c: 83 e1 00 14 lwz r31,20(r1) ffc0df90: 38 21 00 18 addi r1,r1,24 ffc0df94: 4e 80 00 20 blr Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); ffc0df98: 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 ); ffc0df9c: 3f c0 00 00 lis r30,0 ffc0dfa0: 3b de 31 e0 addi r30,r30,12768 ffc0dfa4: 90 a1 00 0c stw r5,12(r1) ffc0dfa8: 48 00 00 f1 bl ffc0e098 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); ffc0dfac: 7f e3 fb 78 mr r3,r31 ffc0dfb0: 80 81 00 08 lwz r4,8(r1) ffc0dfb4: 80 a1 00 0c lwz r5,12(r1) ffc0dfb8: 48 00 39 ad bl ffc11964 <_Thread_Reset> _Thread_Load_environment( the_thread ); ffc0dfbc: 7f e3 fb 78 mr r3,r31 ffc0dfc0: 48 00 36 61 bl ffc11620 <_Thread_Load_environment> _Thread_Ready( the_thread ); ffc0dfc4: 7f e3 fb 78 mr r3,r31 ffc0dfc8: 48 00 39 4d bl ffc11914 <_Thread_Ready> ); } static inline void _User_extensions_Thread_restart( Thread_Control *restarted ) { _User_extensions_Iterate( ffc0dfcc: 3c 80 ff c1 lis r4,-63 ffc0dfd0: 7f e3 fb 78 mr r3,r31 ffc0dfd4: 38 84 e3 24 addi r4,r4,-7388 ffc0dfd8: 48 00 03 ad bl ffc0e384 <_User_extensions_Iterate> _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) ffc0dfdc: 81 3e 00 10 lwz r9,16(r30) _Thread_Restart_self(); return true; ffc0dfe0: 38 60 00 01 li r3,1 _Thread_Ready( the_thread ); _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) ffc0dfe4: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0dfe8: 40 9e ff 98 bne+ cr7,ffc0df80 <_Thread_Restart+0x28> */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) ffc0dfec: 81 3f 01 44 lwz r9,324(r31) ffc0dff0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0dff4: 41 9e 00 0c beq- cr7,ffc0e000 <_Thread_Restart+0xa8> <== NEVER TAKEN _Context_Restore_fp( &_Thread_Executing->fp_context ); ffc0dff8: 38 7f 01 44 addi r3,r31,324 ffc0dffc: 48 01 04 85 bl ffc1e480 <_CPU_Context_restore_fp> #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); ffc0e000: 80 7e 00 10 lwz r3,16(r30) ffc0e004: 38 63 00 c4 addi r3,r3,196 ffc0e008: 48 01 06 0d bl ffc1e614 <_CPU_Context_restore> =============================================================================== ffc0d49c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0d49c: 94 21 ff d8 stwu r1,-40(r1) ffc0d4a0: 7c 08 02 a6 mflr r0 ffc0d4a4: 93 e1 00 24 stw r31,36(r1) /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) ffc0d4a8: 7c 7f 1b 79 mr. r31,r3 void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0d4ac: 90 01 00 2c stw r0,44(r1) ffc0d4b0: 93 a1 00 1c stw r29,28(r1) ffc0d4b4: 93 c1 00 20 stw r30,32(r1) /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) ffc0d4b8: 41 82 00 10 beq- ffc0d4c8 <_Thread_queue_Requeue+0x2c> <== 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 ) { ffc0d4bc: 81 3f 00 34 lwz r9,52(r31) ffc0d4c0: 2f 89 00 01 cmpwi cr7,r9,1 ffc0d4c4: 41 9e 00 20 beq- cr7,ffc0d4e4 <_Thread_queue_Requeue+0x48><== ALWAYS TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } ffc0d4c8: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc0d4cc: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc0d4d0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0d4d4: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc0d4d8: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc0d4dc: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc0d4e0: 4e 80 00 20 blr <== NOT EXECUTED ffc0d4e4: 7c 9e 23 78 mr r30,r4 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0d4e8: 7f a0 00 a6 mfmsr r29 ffc0d4ec: 7d 50 42 a6 mfsprg r10,0 ffc0d4f0: 7f aa 50 78 andc r10,r29,r10 ffc0d4f4: 7d 40 01 24 mtmsr r10 ffc0d4f8: 3d 00 00 03 lis r8,3 ffc0d4fc: 81 44 00 10 lwz r10,16(r4) ffc0d500: 61 08 be e0 ori r8,r8,48864 Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { ffc0d504: 7d 07 50 39 and. r7,r8,r10 ffc0d508: 40 82 00 24 bne- ffc0d52c <_Thread_queue_Requeue+0x90> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0d50c: 7f a0 01 24 mtmsr r29 <== NOT EXECUTED _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } ffc0d510: 80 01 00 2c lwz r0,44(r1) ffc0d514: 83 a1 00 1c lwz r29,28(r1) ffc0d518: 7c 08 03 a6 mtlr r0 ffc0d51c: 83 c1 00 20 lwz r30,32(r1) ffc0d520: 83 e1 00 24 lwz r31,36(r1) ffc0d524: 38 21 00 28 addi r1,r1,40 ffc0d528: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc0d52c: 91 3f 00 30 stw r9,48(r31) ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); ffc0d530: 38 a0 00 01 li r5,1 ffc0d534: 48 00 38 21 bl ffc10d54 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); ffc0d538: 7f e3 fb 78 mr r3,r31 ffc0d53c: 7f c4 f3 78 mr r4,r30 ffc0d540: 38 a1 00 08 addi r5,r1,8 ffc0d544: 4b ff fc 69 bl ffc0d1ac <_Thread_queue_Enqueue_priority> ffc0d548: 7f a0 01 24 mtmsr r29 ffc0d54c: 4b ff ff c4 b ffc0d510 <_Thread_queue_Requeue+0x74> =============================================================================== ffc0d550 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0d550: 94 21 ff e8 stwu r1,-24(r1) ffc0d554: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0d558: 38 81 00 08 addi r4,r1,8 void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0d55c: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0d560: 4b ff f5 7d bl ffc0cadc <_Thread_Get> switch ( location ) { ffc0d564: 81 21 00 08 lwz r9,8(r1) ffc0d568: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d56c: 40 9e 00 18 bne- cr7,ffc0d584 <_Thread_queue_Timeout+0x34><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); ffc0d570: 48 00 38 e1 bl ffc10e50 <_Thread_queue_Process_timeout> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc0d574: 3d 20 00 00 lis r9,0 ffc0d578: 81 49 28 68 lwz r10,10344(r9) --level; ffc0d57c: 39 4a ff ff addi r10,r10,-1 _Thread_Dispatch_disable_level = level; ffc0d580: 91 49 28 68 stw r10,10344(r9) _Thread_Unnest_dispatch(); break; } } ffc0d584: 80 01 00 1c lwz r0,28(r1) ffc0d588: 38 21 00 18 addi r1,r1,24 ffc0d58c: 7c 08 03 a6 mtlr r0 ffc0d590: 4e 80 00 20 blr =============================================================================== ffc1d878 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1d878: 94 21 ff 98 stwu r1,-104(r1) ffc1d87c: 7c 08 02 a6 mflr r0 { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; ffc1d880: 39 20 00 00 li r9,0 ffc1d884: 92 c1 00 40 stw r22,64(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1d888: 3a c1 00 14 addi r22,r1,20 ffc1d88c: 93 01 00 48 stw r24,72(r1) ffc1d890: 3b 01 00 0c addi r24,r1,12 ffc1d894: 93 61 00 54 stw r27,84(r1) ffc1d898: 3b 61 00 18 addi r27,r1,24 ffc1d89c: 93 a1 00 5c stw r29,92(r1) head->previous = NULL; tail->previous = head; ffc1d8a0: 3b a1 00 08 addi r29,r1,8 ffc1d8a4: 92 a1 00 3c stw r21,60(r1) ffc1d8a8: 3e a0 00 00 lis r21,0 ffc1d8ac: 3a b5 29 3c addi r21,r21,10556 ffc1d8b0: 93 21 00 4c stw r25,76(r1) ffc1d8b4: 3f 20 00 00 lis r25,0 ffc1d8b8: 3b 39 29 5c addi r25,r25,10588 ffc1d8bc: 93 41 00 50 stw r26,80(r1) ffc1d8c0: 3f 40 00 00 lis r26,0 ffc1d8c4: 3b 5a 70 80 addi r26,r26,28800 ffc1d8c8: 90 01 00 6c stw r0,108(r1) ffc1d8cc: 92 01 00 28 stw r16,40(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1d8d0: 93 61 00 14 stw r27,20(r1) head->previous = NULL; ffc1d8d4: 91 21 00 18 stw r9,24(r1) tail->previous = head; ffc1d8d8: 92 c1 00 1c stw r22,28(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc1d8dc: 93 01 00 08 stw r24,8(r1) head->previous = NULL; ffc1d8e0: 91 21 00 0c stw r9,12(r1) tail->previous = head; ffc1d8e4: 93 a1 00 10 stw r29,16(r1) ffc1d8e8: 92 21 00 2c stw r17,44(r1) ffc1d8ec: 3a 23 00 08 addi r17,r3,8 ffc1d8f0: 92 41 00 30 stw r18,48(r1) ffc1d8f4: 3a 43 00 40 addi r18,r3,64 ffc1d8f8: 92 61 00 34 stw r19,52(r1) * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; ffc1d8fc: 3a 60 00 00 li r19,0 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1d900: 92 81 00 38 stw r20,56(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; ffc1d904: 3a 80 00 01 li r20,1 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1d908: 92 e1 00 44 stw r23,68(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; ffc1d90c: 3a e0 00 00 li r23,0 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1d910: 93 81 00 58 stw r28,88(r1) ffc1d914: 3b 83 00 30 addi r28,r3,48 ffc1d918: 93 c1 00 60 stw r30,96(r1) ffc1d91c: 3b c3 00 68 addi r30,r3,104 ffc1d920: 93 e1 00 64 stw r31,100(r1) ffc1d924: 7c 7f 1b 78 mr r31,r3 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; ffc1d928: 92 df 00 78 stw r22,120(r31) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc1d92c: 81 39 00 00 lwz r9,0(r25) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1d930: 7f 83 e3 78 mr r3,r28 Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; ffc1d934: 80 9f 00 3c lwz r4,60(r31) watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1d938: 7f a5 eb 78 mr r5,r29 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; ffc1d93c: 91 3f 00 3c stw r9,60(r31) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1d940: 7c 84 48 50 subf r4,r4,r9 ffc1d944: 48 00 52 b9 bl ffc22bfc <_Watchdog_Adjust_to_chain> ffc1d948: 80 7a 00 00 lwz r3,0(r26) ffc1d94c: 80 9a 00 04 lwz r4,4(r26) ffc1d950: 3c c0 3b 9a lis r6,15258 ffc1d954: 38 a0 00 00 li r5,0 ffc1d958: 60 c6 ca 00 ori r6,r6,51712 ffc1d95c: 48 01 60 69 bl ffc339c4 <__divdi3> Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; ffc1d960: 80 bf 00 74 lwz r5,116(r31) ffc1d964: 7c 90 23 78 mr r16,r4 /* * 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 ) { ffc1d968: 7f 84 28 40 cmplw cr7,r4,r5 ffc1d96c: 41 9d 00 94 bgt- cr7,ffc1da00 <_Timer_server_Body+0x188> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { ffc1d970: 41 9c 00 6c blt- cr7,ffc1d9dc <_Timer_server_Body+0x164> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; ffc1d974: 92 1f 00 74 stw r16,116(r31) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); ffc1d978: 80 7f 00 78 lwz r3,120(r31) ffc1d97c: 48 00 0b 31 bl ffc1e4ac <_Chain_Get> if ( timer == NULL ) { ffc1d980: 7c 64 1b 79 mr. r4,r3 ffc1d984: 41 82 00 34 beq- ffc1d9b8 <_Timer_server_Body+0x140> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1d988: 81 24 00 38 lwz r9,56(r4) ffc1d98c: 2f 89 00 01 cmpwi cr7,r9,1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc1d990: 2f 09 00 03 cmpwi cr6,r9,3 static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1d994: 41 9e 00 5c beq- cr7,ffc1d9f0 <_Timer_server_Body+0x178> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc1d998: 40 9a ff e0 bne+ cr6,ffc1d978 <_Timer_server_Body+0x100><== NEVER TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc1d99c: 38 84 00 10 addi r4,r4,16 ffc1d9a0: 7f c3 f3 78 mr r3,r30 ffc1d9a4: 48 00 52 fd bl ffc22ca0 <_Watchdog_Insert> } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); ffc1d9a8: 80 7f 00 78 lwz r3,120(r31) ffc1d9ac: 48 00 0b 01 bl ffc1e4ac <_Chain_Get> if ( timer == NULL ) { ffc1d9b0: 7c 64 1b 79 mr. r4,r3 ffc1d9b4: 40 82 ff d4 bne+ ffc1d988 <_Timer_server_Body+0x110> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1d9b8: 7d 40 00 a6 mfmsr r10 ffc1d9bc: 7d 30 42 a6 mfsprg r9,0 ffc1d9c0: 7d 49 48 78 andc r9,r10,r9 ffc1d9c4: 7d 20 01 24 mtmsr r9 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ffc1d9c8: 81 21 00 14 lwz r9,20(r1) ffc1d9cc: 7f 89 d8 00 cmpw cr7,r9,r27 ffc1d9d0: 41 9e 00 44 beq- cr7,ffc1da14 <_Timer_server_Body+0x19c><== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1d9d4: 7d 40 01 24 mtmsr r10 <== NOT EXECUTED ffc1d9d8: 4b ff ff 54 b ffc1d92c <_Timer_server_Body+0xb4> <== NOT EXECUTED /* * 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 ); ffc1d9dc: 7f c3 f3 78 mr r3,r30 ffc1d9e0: 38 80 00 01 li r4,1 ffc1d9e4: 7c b0 28 50 subf r5,r16,r5 ffc1d9e8: 48 00 51 01 bl ffc22ae8 <_Watchdog_Adjust> ffc1d9ec: 4b ff ff 88 b ffc1d974 <_Timer_server_Body+0xfc> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc1d9f0: 7f 83 e3 78 mr r3,r28 ffc1d9f4: 38 84 00 10 addi r4,r4,16 ffc1d9f8: 48 00 52 a9 bl ffc22ca0 <_Watchdog_Insert> ffc1d9fc: 4b ff ff 7c b ffc1d978 <_Timer_server_Body+0x100> /* * 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 ); ffc1da00: 7c 85 20 50 subf r4,r5,r4 ffc1da04: 7f c3 f3 78 mr r3,r30 ffc1da08: 7f a5 eb 78 mr r5,r29 ffc1da0c: 48 00 51 f1 bl ffc22bfc <_Watchdog_Adjust_to_chain> ffc1da10: 4b ff ff 64 b ffc1d974 <_Timer_server_Body+0xfc> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; ffc1da14: 90 9f 00 78 stw r4,120(r31) ffc1da18: 7d 40 01 24 mtmsr r10 _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 ) ) { ffc1da1c: 81 21 00 08 lwz r9,8(r1) ffc1da20: 7f 89 c0 00 cmpw cr7,r9,r24 ffc1da24: 40 be 00 30 bne+ cr7,ffc1da54 <_Timer_server_Body+0x1dc> ffc1da28: 48 00 00 50 b ffc1da78 <_Timer_server_Body+0x200> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; ffc1da2c: 81 49 00 00 lwz r10,0(r9) head->next = new_first; new_first->previous = head; ffc1da30: 93 aa 00 04 stw r29,4(r10) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; ffc1da34: 91 41 00 08 stw r10,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; ffc1da38: 92 e9 00 08 stw r23,8(r9) ffc1da3c: 7d 00 01 24 mtmsr r8 /* * 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 ); ffc1da40: 81 49 00 1c lwz r10,28(r9) ffc1da44: 80 69 00 20 lwz r3,32(r9) ffc1da48: 80 89 00 24 lwz r4,36(r9) ffc1da4c: 7d 49 03 a6 mtctr r10 ffc1da50: 4e 80 04 21 bctrl static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1da54: 7d 00 00 a6 mfmsr r8 ffc1da58: 7d 30 42 a6 mfsprg r9,0 ffc1da5c: 7d 09 48 78 andc r9,r8,r9 ffc1da60: 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; ffc1da64: 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)) ffc1da68: 7f 89 c0 00 cmpw cr7,r9,r24 ffc1da6c: 40 9e ff c0 bne+ cr7,ffc1da2c <_Timer_server_Body+0x1b4> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1da70: 7d 00 01 24 mtmsr r8 ffc1da74: 4b ff fe b4 b ffc1d928 <_Timer_server_Body+0xb0> } } else { ts->active = false; ffc1da78: 9a 7f 00 7c stb r19,124(r31) * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc1da7c: 81 35 00 00 lwz r9,0(r21) ++level; ffc1da80: 39 29 00 01 addi r9,r9,1 _Thread_Dispatch_disable_level = level; ffc1da84: 91 35 00 00 stw r9,0(r21) /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); ffc1da88: 80 7f 00 00 lwz r3,0(r31) ffc1da8c: 38 80 00 08 li r4,8 ffc1da90: 48 00 4b 9d bl ffc2262c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); ffc1da94: 7f e3 fb 78 mr r3,r31 ffc1da98: 4b ff fb 21 bl ffc1d5b8 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); ffc1da9c: 7f e3 fb 78 mr r3,r31 ffc1daa0: 4b ff fb a9 bl ffc1d648 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); ffc1daa4: 48 00 3f ed bl ffc21a90 <_Thread_Enable_dispatch> ts->active = true; ffc1daa8: 9a 9f 00 7c stb r20,124(r31) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc1daac: 7e 23 8b 78 mr r3,r17 ffc1dab0: 48 00 53 b9 bl ffc22e68 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc1dab4: 7e 43 93 78 mr r3,r18 ffc1dab8: 48 00 53 b1 bl ffc22e68 <_Watchdog_Remove> ffc1dabc: 4b ff fe 6c b ffc1d928 <_Timer_server_Body+0xb0> =============================================================================== ffc1d6d8 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc1d6d8: 94 21 ff e8 stwu r1,-24(r1) ffc1d6dc: 7c 08 02 a6 mflr r0 ffc1d6e0: 90 01 00 1c stw r0,28(r1) if ( ts->insert_chain == NULL ) { ffc1d6e4: 81 23 00 78 lwz r9,120(r3) static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc1d6e8: 93 e1 00 14 stw r31,20(r1) ffc1d6ec: 7c 7f 1b 78 mr r31,r3 if ( ts->insert_chain == NULL ) { ffc1d6f0: 2f 89 00 00 cmpwi cr7,r9,0 static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc1d6f4: 93 a1 00 0c stw r29,12(r1) ffc1d6f8: 93 c1 00 10 stw r30,16(r1) if ( ts->insert_chain == NULL ) { ffc1d6fc: 41 9e 00 24 beq- cr7,ffc1d720 <_Timer_server_Schedule_operation_method+0x48> * 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 ); } } ffc1d700: 80 01 00 1c lwz r0,28(r1) ffc1d704: 83 a1 00 0c lwz r29,12(r1) ffc1d708: 7c 08 03 a6 mtlr r0 ffc1d70c: 83 c1 00 10 lwz r30,16(r1) ffc1d710: 83 e1 00 14 lwz r31,20(r1) * 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 ); ffc1d714: 80 63 00 78 lwz r3,120(r3) } } ffc1d718: 38 21 00 18 addi r1,r1,24 * 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 ); ffc1d71c: 48 00 0d 60 b ffc1e47c <_Chain_Append> * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc1d720: 3d 20 00 00 lis r9,0 ffc1d724: 81 49 29 3c lwz r10,10556(r9) ffc1d728: 7c 9e 23 78 mr r30,r4 ++level; ffc1d72c: 39 4a 00 01 addi r10,r10,1 _Thread_Dispatch_disable_level = level; ffc1d730: 91 49 29 3c stw r10,10556(r9) * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1d734: 81 24 00 38 lwz r9,56(r4) ffc1d738: 2f 89 00 01 cmpwi cr7,r9,1 ffc1d73c: 41 9e 00 bc beq- cr7,ffc1d7f8 <_Timer_server_Schedule_operation_method+0x120> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc1d740: 2f 89 00 03 cmpwi cr7,r9,3 ffc1d744: 41 9e 00 20 beq- cr7,ffc1d764 <_Timer_server_Schedule_operation_method+0x8c> * 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 ); } } ffc1d748: 80 01 00 1c lwz r0,28(r1) ffc1d74c: 83 a1 00 0c lwz r29,12(r1) ffc1d750: 7c 08 03 a6 mtlr r0 ffc1d754: 83 c1 00 10 lwz r30,16(r1) ffc1d758: 83 e1 00 14 lwz r31,20(r1) ffc1d75c: 38 21 00 18 addi r1,r1,24 if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); ffc1d760: 48 00 43 30 b ffc21a90 <_Thread_Enable_dispatch> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1d764: 7f a0 00 a6 mfmsr r29 ffc1d768: 7d 30 42 a6 mfsprg r9,0 ffc1d76c: 7f a9 48 78 andc r9,r29,r9 ffc1d770: 7d 20 01 24 mtmsr r9 /* * 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(); ffc1d774: 3d 20 00 00 lis r9,0 ffc1d778: 39 29 70 80 addi r9,r9,28800 ffc1d77c: 80 69 00 00 lwz r3,0(r9) ffc1d780: 3c c0 3b 9a lis r6,15258 ffc1d784: 80 89 00 04 lwz r4,4(r9) ffc1d788: 38 a0 00 00 li r5,0 ffc1d78c: 60 c6 ca 00 ori r6,r6,51712 ffc1d790: 48 01 62 35 bl ffc339c4 <__divdi3> */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc1d794: 81 3f 00 68 lwz r9,104(r31) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc1d798: 39 5f 00 6c addi r10,r31,108 last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { ffc1d79c: 7f 89 50 00 cmpw cr7,r9,r10 * 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(); last_snapshot = ts->TOD_watchdogs.last_snapshot; ffc1d7a0: 81 5f 00 74 lwz r10,116(r31) if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { ffc1d7a4: 41 9e 00 28 beq- cr7,ffc1d7cc <_Timer_server_Schedule_operation_method+0xf4> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { ffc1d7a8: 7f 84 50 40 cmplw cr7,r4,r10 _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; ffc1d7ac: 80 e9 00 10 lwz r7,16(r9) if ( snapshot > last_snapshot ) { ffc1d7b0: 40 9d 00 bc ble- cr7,ffc1d86c <_Timer_server_Schedule_operation_method+0x194> /* * We advanced in time. */ delta = snapshot - last_snapshot; ffc1d7b4: 7d 4a 20 50 subf r10,r10,r4 if (delta_interval > delta) { ffc1d7b8: 7f 87 50 40 cmplw cr7,r7,r10 delta_interval -= delta; } else { delta_interval = 0; ffc1d7bc: 39 00 00 00 li r8,0 if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { ffc1d7c0: 40 9d 00 08 ble- cr7,ffc1d7c8 <_Timer_server_Schedule_operation_method+0xf0><== NEVER TAKEN delta_interval -= delta; ffc1d7c4: 7d 0a 38 50 subf r8,r10,r7 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; ffc1d7c8: 91 09 00 10 stw r8,16(r9) } ts->TOD_watchdogs.last_snapshot = snapshot; ffc1d7cc: 90 9f 00 74 stw r4,116(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1d7d0: 7f a0 01 24 mtmsr r29 _ISR_Enable( level ); _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc1d7d4: 38 7f 00 68 addi r3,r31,104 ffc1d7d8: 38 9e 00 10 addi r4,r30,16 ffc1d7dc: 48 00 54 c5 bl ffc22ca0 <_Watchdog_Insert> if ( !ts->active ) { ffc1d7e0: 89 3f 00 7c lbz r9,124(r31) ffc1d7e4: 2f 89 00 00 cmpwi cr7,r9,0 ffc1d7e8: 40 9e ff 60 bne+ cr7,ffc1d748 <_Timer_server_Schedule_operation_method+0x70><== NEVER TAKEN _Timer_server_Reset_tod_system_watchdog( ts ); ffc1d7ec: 7f e3 fb 78 mr r3,r31 ffc1d7f0: 4b ff fe 59 bl ffc1d648 <_Timer_server_Reset_tod_system_watchdog> ffc1d7f4: 4b ff ff 54 b ffc1d748 <_Timer_server_Schedule_operation_method+0x70> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc1d7f8: 7c a0 00 a6 mfmsr r5 ffc1d7fc: 7d 30 42 a6 mfsprg r9,0 ffc1d800: 7c a9 48 78 andc r9,r5,r9 ffc1d804: 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; ffc1d808: 81 23 00 30 lwz r9,48(r3) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc1d80c: 39 43 00 34 addi r10,r3,52 * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = _Watchdog_Ticks_since_boot; last_snapshot = ts->Interval_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { ffc1d810: 7f 89 50 00 cmpw cr7,r9,r10 /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = _Watchdog_Ticks_since_boot; ffc1d814: 3d 40 00 00 lis r10,0 ffc1d818: 81 4a 29 5c lwz r10,10588(r10) last_snapshot = ts->Interval_watchdogs.last_snapshot; ffc1d81c: 80 e3 00 3c lwz r7,60(r3) if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { ffc1d820: 41 9e 00 20 beq- cr7,ffc1d840 <_Timer_server_Schedule_operation_method+0x168> /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; ffc1d824: 80 c9 00 10 lwz r6,16(r9) first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; ffc1d828: 7c e7 50 50 subf r7,r7,r10 delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; ffc1d82c: 39 00 00 00 li r8,0 * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { ffc1d830: 7f 87 30 40 cmplw cr7,r7,r6 ffc1d834: 40 9c 00 08 bge- cr7,ffc1d83c <_Timer_server_Schedule_operation_method+0x164> delta_interval -= delta; ffc1d838: 7d 07 30 50 subf r8,r7,r6 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; ffc1d83c: 91 09 00 10 stw r8,16(r9) } ts->Interval_watchdogs.last_snapshot = snapshot; ffc1d840: 91 5f 00 3c stw r10,60(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc1d844: 7c a0 01 24 mtmsr r5 _ISR_Enable( level ); _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc1d848: 38 7f 00 30 addi r3,r31,48 ffc1d84c: 38 9e 00 10 addi r4,r30,16 ffc1d850: 48 00 54 51 bl ffc22ca0 <_Watchdog_Insert> if ( !ts->active ) { ffc1d854: 89 3f 00 7c lbz r9,124(r31) ffc1d858: 2f 89 00 00 cmpwi cr7,r9,0 ffc1d85c: 40 9e fe ec bne+ cr7,ffc1d748 <_Timer_server_Schedule_operation_method+0x70> _Timer_server_Reset_interval_system_watchdog( ts ); ffc1d860: 7f e3 fb 78 mr r3,r31 ffc1d864: 4b ff fd 55 bl ffc1d5b8 <_Timer_server_Reset_interval_system_watchdog> ffc1d868: 4b ff fe e0 b ffc1d748 <_Timer_server_Schedule_operation_method+0x70> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; ffc1d86c: 7d 47 52 14 add r10,r7,r10 delta_interval += delta; ffc1d870: 7d 04 50 50 subf r8,r4,r10 ffc1d874: 4b ff ff 54 b ffc1d7c8 <_Timer_server_Schedule_operation_method+0xf0> =============================================================================== ffc0f468 <_Timespec_Add_to>: { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0f468: 81 24 00 04 lwz r9,4(r4) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0f46c: 3c e0 3b 9a lis r7,15258 { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0f470: 81 03 00 04 lwz r8,4(r3) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0f474: 60 e7 c9 ff ori r7,r7,51711 uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { uint32_t seconds = add->tv_sec; ffc0f478: 81 44 00 00 lwz r10,0(r4) /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0f47c: 7d 08 4a 14 add r8,r8,r9 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0f480: 80 c3 00 00 lwz r6,0(r3) time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0f484: 7f 88 38 40 cmplw cr7,r8,r7 { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; ffc0f488: 91 03 00 04 stw r8,4(r3) ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0f48c: 7c c6 52 14 add r6,r6,r10 time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0f490: 7d 09 43 78 mr r9,r8 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; ffc0f494: 90 c3 00 00 stw r6,0(r3) time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0f498: 40 9d 00 2c ble- cr7,ffc0f4c4 <_Timespec_Add_to+0x5c> ffc0f49c: 38 c6 00 01 addi r6,r6,1 #include #include #include #include uint32_t _Timespec_Add_to( ffc0f4a0: 7c ca 30 50 subf r6,r10,r6 time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ffc0f4a4: 3d 29 c4 65 addis r9,r9,-15259 ffc0f4a8: 39 29 36 00 addi r9,r9,13824 /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0f4ac: 7f 89 38 40 cmplw cr7,r9,r7 #include #include #include #include uint32_t _Timespec_Add_to( ffc0f4b0: 7d 06 52 14 add r8,r6,r10 /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; seconds++; ffc0f4b4: 39 4a 00 01 addi r10,r10,1 /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc0f4b8: 41 9d ff ec bgt+ cr7,ffc0f4a4 <_Timespec_Add_to+0x3c> <== NEVER TAKEN ffc0f4bc: 91 23 00 04 stw r9,4(r3) ffc0f4c0: 91 03 00 00 stw r8,0(r3) time->tv_sec++; seconds++; } return seconds; } ffc0f4c4: 7d 43 53 78 mr r3,r10 ffc0f4c8: 4e 80 00 20 blr =============================================================================== ffc0f5dc <_Timestamp64_Divide>: const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { ffc0f5dc: 94 21 ff e8 stwu r1,-24(r1) ffc0f5e0: 7c 08 02 a6 mflr r0 ffc0f5e4: 90 01 00 1c stw r0,28(r1) Timestamp64_Control answer; if ( *_rhs == 0 ) { ffc0f5e8: 81 44 00 00 lwz r10,0(r4) ffc0f5ec: 81 24 00 04 lwz r9,4(r4) const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { ffc0f5f0: 93 c1 00 10 stw r30,16(r1) ffc0f5f4: 7c be 2b 78 mr r30,r5 Timestamp64_Control answer; if ( *_rhs == 0 ) { ffc0f5f8: 7d 48 4b 79 or. r8,r10,r9 const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { ffc0f5fc: 93 e1 00 14 stw r31,20(r1) ffc0f600: 7c df 33 78 mr r31,r6 ffc0f604: 93 81 00 08 stw r28,8(r1) ffc0f608: 93 a1 00 0c stw r29,12(r1) Timestamp64_Control answer; if ( *_rhs == 0 ) { ffc0f60c: 41 82 00 80 beq- ffc0f68c <_Timestamp64_Divide+0xb0> <== NEVER TAKEN * This looks odd but gives the results the proper precision. * * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; ffc0f610: 80 c3 00 04 lwz r6,4(r3) ffc0f614: 3d 00 00 01 lis r8,1 ffc0f618: 80 e3 00 00 lwz r7,0(r3) ffc0f61c: 61 08 86 a0 ori r8,r8,34464 ffc0f620: 7c 68 30 16 mulhwu r3,r8,r6 ffc0f624: 7c e8 39 d6 mullw r7,r8,r7 ffc0f628: 7c 88 31 d6 mullw r4,r8,r6 ffc0f62c: 7d 45 53 78 mr r5,r10 ffc0f630: 7d 26 4b 78 mr r6,r9 ffc0f634: 7c 67 1a 14 add r3,r7,r3 ffc0f638: 48 00 fa 8d bl ffc1f0c4 <__divdi3> *_ival_percentage = answer / 1000; ffc0f63c: 38 a0 00 00 li r5,0 ffc0f640: 38 c0 03 e8 li r6,1000 * This looks odd but gives the results the proper precision. * * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; ffc0f644: 7c 7c 1b 78 mr r28,r3 ffc0f648: 7c 9d 23 78 mr r29,r4 *_ival_percentage = answer / 1000; ffc0f64c: 48 00 fa 79 bl ffc1f0c4 <__divdi3> ffc0f650: 90 9e 00 00 stw r4,0(r30) *_fval_percentage = answer % 1000; ffc0f654: 7f 83 e3 78 mr r3,r28 ffc0f658: 7f a4 eb 78 mr r4,r29 ffc0f65c: 38 a0 00 00 li r5,0 ffc0f660: 38 c0 03 e8 li r6,1000 ffc0f664: 48 00 fe 85 bl ffc1f4e8 <__moddi3> } ffc0f668: 80 01 00 1c lwz r0,28(r1) */ answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; *_fval_percentage = answer % 1000; ffc0f66c: 90 9f 00 00 stw r4,0(r31) } ffc0f670: 7c 08 03 a6 mtlr r0 ffc0f674: 83 81 00 08 lwz r28,8(r1) ffc0f678: 83 a1 00 0c lwz r29,12(r1) ffc0f67c: 83 c1 00 10 lwz r30,16(r1) ffc0f680: 83 e1 00 14 lwz r31,20(r1) ffc0f684: 38 21 00 18 addi r1,r1,24 ffc0f688: 4e 80 00 20 blr ffc0f68c: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ) { Timestamp64_Control answer; if ( *_rhs == 0 ) { *_ival_percentage = 0; ffc0f690: 91 05 00 00 stw r8,0(r5) <== NOT EXECUTED answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; *_fval_percentage = answer % 1000; } ffc0f694: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0f698: 83 81 00 08 lwz r28,8(r1) <== NOT EXECUTED ffc0f69c: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc0f6a0: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc0f6a4: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED { Timestamp64_Control answer; if ( *_rhs == 0 ) { *_ival_percentage = 0; *_fval_percentage = 0; ffc0f6a8: 91 06 00 00 stw r8,0(r6) <== NOT EXECUTED answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; *_fval_percentage = answer % 1000; } ffc0f6ac: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc0f6b0: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0d90c <_User_extensions_Iterate>: void _User_extensions_Iterate( void *arg, User_extensions_Visitor visitor ) { ffc0d90c: 94 21 ff e0 stwu r1,-32(r1) Thread_Control *executing = _Thread_Executing; const User_extensions_Table *callouts_current = ffc0d910: 3d 20 ff c2 lis r9,-62 ffc0d914: 39 29 ea f8 addi r9,r9,-5384 void _User_extensions_Iterate( void *arg, User_extensions_Visitor visitor ) { ffc0d918: 7c 08 02 a6 mflr r0 ffc0d91c: 93 61 00 0c stw r27,12(r1) Thread_Control *executing = _Thread_Executing; const User_extensions_Table *callouts_current = rtems_configuration_get_user_extension_table(); const User_extensions_Table *callouts_end = callouts_current + rtems_configuration_get_number_of_initial_extensions(); ffc0d920: 83 69 00 40 lwz r27,64(r9) void _User_extensions_Iterate( void *arg, User_extensions_Visitor visitor ) { ffc0d924: 93 e1 00 1c stw r31,28(r1) Thread_Control *executing = _Thread_Executing; const User_extensions_Table *callouts_current = rtems_configuration_get_user_extension_table(); const User_extensions_Table *callouts_end = callouts_current + rtems_configuration_get_number_of_initial_extensions(); ffc0d928: 57 7b 28 34 rlwinm r27,r27,5,0,26 void *arg, User_extensions_Visitor visitor ) { Thread_Control *executing = _Thread_Executing; const User_extensions_Table *callouts_current = ffc0d92c: 83 e9 00 44 lwz r31,68(r9) void _User_extensions_Iterate( void *arg, User_extensions_Visitor visitor ) { Thread_Control *executing = _Thread_Executing; ffc0d930: 3d 20 00 00 lis r9,0 void _User_extensions_Iterate( void *arg, User_extensions_Visitor visitor ) { ffc0d934: 93 81 00 10 stw r28,16(r1) ffc0d938: 7c 9c 23 78 mr r28,r4 Thread_Control *executing = _Thread_Executing; const User_extensions_Table *callouts_current = rtems_configuration_get_user_extension_table(); const User_extensions_Table *callouts_end = ffc0d93c: 7f 7f da 14 add r27,r31,r27 callouts_current + rtems_configuration_get_number_of_initial_extensions(); const Chain_Node *node; const Chain_Node *tail; while ( callouts_current != callouts_end ) { ffc0d940: 7f 9f d8 00 cmpw cr7,r31,r27 void _User_extensions_Iterate( void *arg, User_extensions_Visitor visitor ) { ffc0d944: 93 a1 00 14 stw r29,20(r1) ffc0d948: 7c 7d 1b 78 mr r29,r3 ffc0d94c: 93 c1 00 18 stw r30,24(r1) ffc0d950: 90 01 00 24 stw r0,36(r1) Thread_Control *executing = _Thread_Executing; ffc0d954: 83 c9 31 b0 lwz r30,12720(r9) const User_extensions_Table *callouts_end = callouts_current + rtems_configuration_get_number_of_initial_extensions(); const Chain_Node *node; const Chain_Node *tail; while ( callouts_current != callouts_end ) { ffc0d958: 41 9e 00 24 beq- cr7,ffc0d97c <_User_extensions_Iterate+0x70><== NEVER TAKEN (*visitor)( executing, arg, callouts_current ); ffc0d95c: 7f e5 fb 78 mr r5,r31 ffc0d960: 7f 89 03 a6 mtctr r28 ffc0d964: 7f c3 f3 78 mr r3,r30 ffc0d968: 7f a4 eb 78 mr r4,r29 ++callouts_current; ffc0d96c: 3b ff 00 20 addi r31,r31,32 callouts_current + rtems_configuration_get_number_of_initial_extensions(); const Chain_Node *node; const Chain_Node *tail; while ( callouts_current != callouts_end ) { (*visitor)( executing, arg, callouts_current ); ffc0d970: 4e 80 04 21 bctrl const User_extensions_Table *callouts_end = callouts_current + rtems_configuration_get_number_of_initial_extensions(); const Chain_Node *node; const Chain_Node *tail; while ( callouts_current != callouts_end ) { ffc0d974: 7f 9b f8 00 cmpw cr7,r27,r31 ffc0d978: 40 9e ff e4 bne+ cr7,ffc0d95c <_User_extensions_Iterate+0x50> */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0d97c: 3d 20 00 00 lis r9,0 ffc0d980: 3b 69 21 fc addi r27,r9,8700 ffc0d984: 83 e9 21 fc lwz r31,8700(r9) */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail( const Chain_Control *the_chain ) { return &the_chain->Tail.Node; ffc0d988: 3b 7b 00 04 addi r27,r27,4 ++callouts_current; } node = _Chain_Immutable_first( &_User_extensions_List ); tail = _Chain_Immutable_tail( &_User_extensions_List ); while ( node != tail ) { ffc0d98c: 7f 9f d8 00 cmpw cr7,r31,r27 ffc0d990: 41 9e 00 24 beq- cr7,ffc0d9b4 <_User_extensions_Iterate+0xa8> const User_extensions_Control *extension = (const User_extensions_Control *) node; (*visitor)( executing, arg, &extension->Callouts ); ffc0d994: 38 bf 00 14 addi r5,r31,20 ffc0d998: 7f 89 03 a6 mtctr r28 ffc0d99c: 7f c3 f3 78 mr r3,r30 ffc0d9a0: 7f a4 eb 78 mr r4,r29 ffc0d9a4: 4e 80 04 21 bctrl node = _Chain_Immutable_next( node ); } } ffc0d9a8: 83 ff 00 00 lwz r31,0(r31) ++callouts_current; } node = _Chain_Immutable_first( &_User_extensions_List ); tail = _Chain_Immutable_tail( &_User_extensions_List ); while ( node != tail ) { ffc0d9ac: 7f 9f d8 00 cmpw cr7,r31,r27 ffc0d9b0: 40 9e ff e4 bne+ cr7,ffc0d994 <_User_extensions_Iterate+0x88> (*visitor)( executing, arg, &extension->Callouts ); node = _Chain_Immutable_next( node ); } } ffc0d9b4: 80 01 00 24 lwz r0,36(r1) ffc0d9b8: 83 61 00 0c lwz r27,12(r1) ffc0d9bc: 7c 08 03 a6 mtlr r0 ffc0d9c0: 83 81 00 10 lwz r28,16(r1) ffc0d9c4: 83 a1 00 14 lwz r29,20(r1) ffc0d9c8: 83 c1 00 18 lwz r30,24(r1) ffc0d9cc: 83 e1 00 1c lwz r31,28(r1) ffc0d9d0: 38 21 00 20 addi r1,r1,32 ffc0d9d4: 4e 80 00 20 blr =============================================================================== ffc0f96c <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { ffc0f96c: 94 21 ff e8 stwu r1,-24(r1) ffc0f970: 7c 08 02 a6 mflr r0 ffc0f974: 90 01 00 1c stw r0,28(r1) ffc0f978: 93 c1 00 10 stw r30,16(r1) ffc0f97c: 7c 7e 1b 78 mr r30,r3 ffc0f980: 93 81 00 08 stw r28,8(r1) ffc0f984: 93 a1 00 0c stw r29,12(r1) ffc0f988: 93 e1 00 14 stw r31,20(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0f98c: 7d 40 00 a6 mfmsr r10 ffc0f990: 7d 30 42 a6 mfsprg r9,0 ffc0f994: 7d 49 48 78 andc r9,r10,r9 ffc0f998: 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; ffc0f99c: 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 ); ffc0f9a0: 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 ) ) { ffc0f9a4: 7f 89 e8 00 cmpw cr7,r9,r29 ffc0f9a8: 41 9e 00 70 beq- cr7,ffc0fa18 <_Watchdog_Adjust+0xac> switch ( direction ) { ffc0f9ac: 2f 84 00 00 cmpwi cr7,r4,0 ffc0f9b0: 7c bf 2b 78 mr r31,r5 ffc0f9b4: 40 9e 00 88 bne- cr7,ffc0fa3c <_Watchdog_Adjust+0xd0> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0f9b8: 2f 85 00 00 cmpwi cr7,r5,0 ffc0f9bc: 41 9e 00 5c beq- cr7,ffc0fa18 <_Watchdog_Adjust+0xac> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { ffc0f9c0: 81 09 00 10 lwz r8,16(r9) _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0f9c4: 3b 80 00 01 li r28,1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { ffc0f9c8: 7f 85 40 40 cmplw cr7,r5,r8 ffc0f9cc: 40 bc 00 18 bge+ cr7,ffc0f9e4 <_Watchdog_Adjust+0x78> <== ALWAYS TAKEN ffc0f9d0: 48 00 00 a4 b ffc0fa74 <_Watchdog_Adjust+0x108> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0f9d4: 41 9a 00 44 beq- cr6,ffc0fa18 <_Watchdog_Adjust+0xac> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { ffc0f9d8: 81 09 00 10 lwz r8,16(r9) ffc0f9dc: 7f 88 f8 40 cmplw cr7,r8,r31 ffc0f9e0: 41 9d 00 94 bgt- cr7,ffc0fa74 <_Watchdog_Adjust+0x108> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0f9e4: 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; ffc0f9e8: 7f e8 f8 50 subf r31,r8,r31 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0f9ec: 7d 40 01 24 mtmsr r10 _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); _Watchdog_Tickle( header ); ffc0f9f0: 7f c3 f3 78 mr r3,r30 ffc0f9f4: 48 00 03 25 bl ffc0fd18 <_Watchdog_Tickle> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0f9f8: 7d 40 00 a6 mfmsr r10 ffc0f9fc: 7d 30 42 a6 mfsprg r9,0 ffc0fa00: 7d 49 48 78 andc r9,r10,r9 ffc0fa04: 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; ffc0fa08: 81 3e 00 00 lwz r9,0(r30) switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0fa0c: 2f 1f 00 00 cmpwi cr6,r31,0 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0fa10: 7f 9d 48 00 cmpw cr7,r29,r9 ffc0fa14: 40 9e ff c0 bne+ cr7,ffc0f9d4 <_Watchdog_Adjust+0x68> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0fa18: 7d 40 01 24 mtmsr r10 } } _ISR_Enable( level ); } ffc0fa1c: 80 01 00 1c lwz r0,28(r1) ffc0fa20: 83 81 00 08 lwz r28,8(r1) ffc0fa24: 7c 08 03 a6 mtlr r0 ffc0fa28: 83 a1 00 0c lwz r29,12(r1) ffc0fa2c: 83 c1 00 10 lwz r30,16(r1) ffc0fa30: 83 e1 00 14 lwz r31,20(r1) ffc0fa34: 38 21 00 18 addi r1,r1,24 ffc0fa38: 4e 80 00 20 blr * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { ffc0fa3c: 2f 84 00 01 cmpwi cr7,r4,1 ffc0fa40: 40 9e ff d8 bne+ cr7,ffc0fa18 <_Watchdog_Adjust+0xac> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; ffc0fa44: 81 09 00 10 lwz r8,16(r9) ffc0fa48: 7f e8 2a 14 add r31,r8,r5 ffc0fa4c: 93 e9 00 10 stw r31,16(r9) ffc0fa50: 7d 40 01 24 mtmsr r10 } } _ISR_Enable( level ); } ffc0fa54: 80 01 00 1c lwz r0,28(r1) ffc0fa58: 83 81 00 08 lwz r28,8(r1) ffc0fa5c: 7c 08 03 a6 mtlr r0 ffc0fa60: 83 a1 00 0c lwz r29,12(r1) ffc0fa64: 83 c1 00 10 lwz r30,16(r1) ffc0fa68: 83 e1 00 14 lwz r31,20(r1) ffc0fa6c: 38 21 00 18 addi r1,r1,24 ffc0fa70: 4e 80 00 20 blr _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; ffc0fa74: 7d 1f 40 50 subf r8,r31,r8 ffc0fa78: 91 09 00 10 stw r8,16(r9) break; ffc0fa7c: 4b ff ff 9c b ffc0fa18 <_Watchdog_Adjust+0xac> =============================================================================== ffc22bfc <_Watchdog_Adjust_to_chain>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc22bfc: 7d 60 00 a6 mfmsr r11 ffc22c00: 7d 30 42 a6 mfsprg r9,0 ffc22c04: 7d 69 48 78 andc r9,r11,r9 ffc22c08: 7d 20 01 24 mtmsr r9 { Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; _ISR_Disable( level ); ffc22c0c: 81 23 00 00 lwz r9,0(r3) ffc22c10: 38 c3 00 04 addi r6,r3,4 /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; first->delta_interval = 0; ffc22c14: 39 80 00 00 li r12,0 ffc22c18: 38 05 00 04 addi r0,r5,4 Watchdog_Control *first; _ISR_Disable( level ); while ( 1 ) { if ( _Chain_Is_empty( header ) ) { ffc22c1c: 7f 86 48 00 cmpw cr7,r6,r9 ffc22c20: 41 9e 00 68 beq- cr7,ffc22c88 <_Watchdog_Adjust_to_chain+0x8c> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { ffc22c24: 81 49 00 10 lwz r10,16(r9) ffc22c28: 7f 84 50 40 cmplw cr7,r4,r10 ffc22c2c: 41 9c 00 64 blt- cr7,ffc22c90 <_Watchdog_Adjust_to_chain+0x94> /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; first->delta_interval = 0; ffc22c30: 91 89 00 10 stw r12,16(r9) /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; ffc22c34: 7c 8a 20 50 subf r4,r10,r4 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc22c38: 81 49 00 00 lwz r10,0(r9) previous = the_node->previous; ffc22c3c: 80 e9 00 04 lwz r7,4(r9) next->previous = previous; ffc22c40: 90 ea 00 04 stw r7,4(r10) Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; ffc22c44: 81 05 00 08 lwz r8,8(r5) Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; ffc22c48: 91 47 00 00 stw r10,0(r7) ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; ffc22c4c: 90 09 00 00 stw r0,0(r9) tail->previous = the_node; old_last->next = the_node; ffc22c50: 91 28 00 00 stw r9,0(r8) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; ffc22c54: 91 25 00 08 stw r9,8(r5) old_last->next = the_node; the_node->previous = old_last; ffc22c58: 91 09 00 04 stw r8,4(r9) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc22c5c: 7d 20 00 a6 mfmsr r9 ffc22c60: 7d 60 01 24 mtmsr r11 ffc22c64: 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; ffc22c68: 81 23 00 00 lwz r9,0(r3) _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); if ( _Chain_Is_empty( header ) ) ffc22c6c: 7f 86 48 00 cmpw cr7,r6,r9 ffc22c70: 41 be ff ac beq- cr7,ffc22c1c <_Watchdog_Adjust_to_chain+0x20> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) ffc22c74: 81 49 00 10 lwz r10,16(r9) ffc22c78: 2f 8a 00 00 cmpwi cr7,r10,0 ffc22c7c: 41 9e ff bc beq+ cr7,ffc22c38 <_Watchdog_Adjust_to_chain+0x3c> Watchdog_Control *first; _ISR_Disable( level ); while ( 1 ) { if ( _Chain_Is_empty( header ) ) { ffc22c80: 7f 86 48 00 cmpw cr7,r6,r9 ffc22c84: 40 9e ff a0 bne+ cr7,ffc22c24 <_Watchdog_Adjust_to_chain+0x28><== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc22c88: 7d 60 01 24 mtmsr r11 ffc22c8c: 4e 80 00 20 blr /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { first->delta_interval -= units; ffc22c90: 7d 44 50 50 subf r10,r4,r10 ffc22c94: 91 49 00 10 stw r10,16(r9) ffc22c98: 7d 60 01 24 mtmsr r11 ffc22c9c: 4e 80 00 20 blr =============================================================================== ffc0da64 <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; ffc0da64: 3d 20 00 00 lis r9,0 ffc0da68: 80 c9 31 a8 lwz r6,12712(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0da6c: 7c e0 00 a6 mfmsr r7 ffc0da70: 7d 30 42 a6 mfsprg r9,0 ffc0da74: 7c e9 48 78 andc r9,r7,r9 ffc0da78: 7d 20 01 24 mtmsr r9 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { ffc0da7c: 81 24 00 08 lwz r9,8(r4) ffc0da80: 2f 89 00 00 cmpwi cr7,r9,0 ffc0da84: 40 9e 01 04 bne- cr7,ffc0db88 <_Watchdog_Insert+0x124> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; ffc0da88: 3d 60 00 00 lis r11,0 ffc0da8c: 81 2b 28 84 lwz r9,10372(r11) if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; ffc0da90: 39 40 00 01 li r10,1 ffc0da94: 91 44 00 08 stw r10,8(r4) ffc0da98: 3d 80 00 00 lis r12,0 _Watchdog_Sync_count++; ffc0da9c: 39 29 00 01 addi r9,r9,1 ffc0daa0: 91 2b 28 84 stw r9,10372(r11) restart: delta_interval = the_watchdog->initial; ffc0daa4: 81 24 00 0c lwz r9,12(r4) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc0daa8: 81 43 00 00 lwz r10,0(r3) for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0daac: 2f 89 00 00 cmpwi cr7,r9,0 ffc0dab0: 41 9e 00 98 beq- cr7,ffc0db48 <_Watchdog_Insert+0xe4> ffc0dab4: 81 0a 00 00 lwz r8,0(r10) ffc0dab8: 2f 88 00 00 cmpwi cr7,r8,0 ffc0dabc: 41 9e 00 8c beq- cr7,ffc0db48 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { ffc0dac0: 81 0a 00 10 lwz r8,16(r10) ffc0dac4: 7f 89 40 40 cmplw cr7,r9,r8 ffc0dac8: 41 9c 00 c8 blt- cr7,ffc0db90 <_Watchdog_Insert+0x12c> after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; ffc0dacc: 7d 28 48 50 subf r9,r8,r9 static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; __asm__ volatile ( ffc0dad0: 7d 00 00 a6 mfmsr r8 ffc0dad4: 7c e0 01 24 mtmsr r7 ffc0dad8: 7d 00 01 24 mtmsr r8 _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0dadc: 81 04 00 08 lwz r8,8(r4) ffc0dae0: 2f 88 00 01 cmpwi cr7,r8,1 ffc0dae4: 40 9e 00 94 bne- cr7,ffc0db78 <_Watchdog_Insert+0x114> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0dae8: 81 0c 28 7c lwz r8,10364(r12) ffc0daec: 38 ac 28 7c addi r5,r12,10364 ffc0daf0: 7f 86 40 40 cmplw cr7,r6,r8 ffc0daf4: 40 bc 00 48 bge+ cr7,ffc0db3c <_Watchdog_Insert+0xd8> ffc0daf8: 48 00 00 d4 b ffc0dbcc <_Watchdog_Insert+0x168> for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0dafc: 81 0a 00 00 lwz r8,0(r10) ffc0db00: 2f 88 00 00 cmpwi cr7,r8,0 ffc0db04: 41 9e 00 44 beq- cr7,ffc0db48 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { ffc0db08: 81 0a 00 10 lwz r8,16(r10) ffc0db0c: 7f 88 48 40 cmplw cr7,r8,r9 ffc0db10: 41 9d 00 80 bgt- cr7,ffc0db90 <_Watchdog_Insert+0x12c> after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; ffc0db14: 7d 28 48 50 subf r9,r8,r9 ffc0db18: 7d 00 00 a6 mfmsr r8 ffc0db1c: 7c e0 01 24 mtmsr r7 ffc0db20: 7d 00 01 24 mtmsr r8 _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0db24: 81 04 00 08 lwz r8,8(r4) ffc0db28: 2f 88 00 01 cmpwi cr7,r8,1 ffc0db2c: 40 9e 00 4c bne- cr7,ffc0db78 <_Watchdog_Insert+0x114> <== NEVER TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0db30: 81 05 00 00 lwz r8,0(r5) ffc0db34: 7f 86 40 40 cmplw cr7,r6,r8 ffc0db38: 41 9c 00 94 blt- cr7,ffc0dbcc <_Watchdog_Insert+0x168> <== NEVER TAKEN for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0db3c: 2f 89 00 00 cmpwi cr7,r9,0 exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } ffc0db40: 81 4a 00 00 lwz r10,0(r10) for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0db44: 40 9e ff b8 bne+ cr7,ffc0dafc <_Watchdog_Insert+0x98> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); ffc0db48: 81 4a 00 04 lwz r10,4(r10) the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0db4c: 3c a0 00 00 lis r5,0 ffc0db50: 80 a5 28 88 lwz r5,10376(r5) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; ffc0db54: 38 60 00 02 li r3,2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0db58: 81 0a 00 00 lwz r8,0(r10) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0db5c: 91 44 00 04 stw r10,4(r4) ffc0db60: 90 64 00 08 stw r3,8(r4) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; ffc0db64: 91 24 00 10 stw r9,16(r4) before_node = after_node->next; after_node->next = the_node; ffc0db68: 90 8a 00 00 stw r4,0(r10) the_node->next = before_node; before_node->previous = the_node; ffc0db6c: 90 88 00 04 stw r4,4(r8) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0db70: 91 04 00 00 stw r8,0(r4) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0db74: 90 a4 00 14 stw r5,20(r4) exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; ffc0db78: 90 cc 28 7c stw r6,10364(r12) _Watchdog_Sync_count--; ffc0db7c: 81 2b 28 84 lwz r9,10372(r11) ffc0db80: 39 29 ff ff addi r9,r9,-1 ffc0db84: 91 2b 28 84 stw r9,10372(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0db88: 7c e0 01 24 mtmsr r7 ffc0db8c: 4e 80 00 20 blr if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; ffc0db90: 7d 09 40 50 subf r8,r9,r8 ffc0db94: 91 0a 00 10 stw r8,16(r10) the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0db98: 3c a0 00 00 lis r5,0 ffc0db9c: 38 60 00 02 li r3,2 _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); ffc0dba0: 81 4a 00 04 lwz r10,4(r10) the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0dba4: 80 a5 28 88 lwz r5,10376(r5) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0dba8: 81 0a 00 00 lwz r8,0(r10) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0dbac: 91 44 00 04 stw r10,4(r4) ffc0dbb0: 90 64 00 08 stw r3,8(r4) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; ffc0dbb4: 91 24 00 10 stw r9,16(r4) before_node = after_node->next; after_node->next = the_node; ffc0dbb8: 90 8a 00 00 stw r4,0(r10) the_node->next = before_node; before_node->previous = the_node; ffc0dbbc: 90 88 00 04 stw r4,4(r8) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0dbc0: 91 04 00 00 stw r8,0(r4) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0dbc4: 90 a4 00 14 stw r5,20(r4) ffc0dbc8: 4b ff ff b0 b ffc0db78 <_Watchdog_Insert+0x114> if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; ffc0dbcc: 90 cc 28 7c stw r6,10364(r12) goto restart; ffc0dbd0: 4b ff fe d4 b ffc0daa4 <_Watchdog_Insert+0x40> =============================================================================== ffc0dc2c <_Watchdog_Remove>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0dc2c: 7d 40 00 a6 mfmsr r10 ffc0dc30: 7d 30 42 a6 mfsprg r9,0 ffc0dc34: 7d 49 48 78 andc r9,r10,r9 ffc0dc38: 7d 20 01 24 mtmsr r9 ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; ffc0dc3c: 81 23 00 08 lwz r9,8(r3) switch ( previous_state ) { ffc0dc40: 2f 89 00 01 cmpwi cr7,r9,1 ffc0dc44: 41 9e 00 98 beq- cr7,ffc0dcdc <_Watchdog_Remove+0xb0> ffc0dc48: 2b 89 00 01 cmplwi cr7,r9,1 ffc0dc4c: 40 9c 00 1c bge- cr7,ffc0dc68 <_Watchdog_Remove+0x3c> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0dc50: 3d 00 00 00 lis r8,0 ffc0dc54: 81 08 28 88 lwz r8,10376(r8) ffc0dc58: 91 03 00 18 stw r8,24(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0dc5c: 7d 40 01 24 mtmsr r10 _ISR_Enable( level ); return( previous_state ); } ffc0dc60: 7d 23 4b 78 mr r3,r9 ffc0dc64: 4e 80 00 20 blr Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { ffc0dc68: 2b 89 00 03 cmplwi cr7,r9,3 ffc0dc6c: 41 bd ff e4 bgt- cr7,ffc0dc50 <_Watchdog_Remove+0x24> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; ffc0dc70: 39 00 00 00 li r8,0 ffc0dc74: 91 03 00 08 stw r8,8(r3) } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } ffc0dc78: 81 03 00 00 lwz r8,0(r3) case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) ffc0dc7c: 80 e8 00 00 lwz r7,0(r8) ffc0dc80: 2f 87 00 00 cmpwi cr7,r7,0 ffc0dc84: 41 9e 00 14 beq- cr7,ffc0dc98 <_Watchdog_Remove+0x6c> next_watchdog->delta_interval += the_watchdog->delta_interval; ffc0dc88: 80 c8 00 10 lwz r6,16(r8) ffc0dc8c: 80 e3 00 10 lwz r7,16(r3) ffc0dc90: 7c e6 3a 14 add r7,r6,r7 ffc0dc94: 90 e8 00 10 stw r7,16(r8) if ( _Watchdog_Sync_count ) ffc0dc98: 3c e0 00 00 lis r7,0 ffc0dc9c: 80 e7 28 84 lwz r7,10372(r7) ffc0dca0: 2f 87 00 00 cmpwi cr7,r7,0 ffc0dca4: 41 9e 00 14 beq- cr7,ffc0dcb8 <_Watchdog_Remove+0x8c> _Watchdog_Sync_level = _ISR_Nest_level; ffc0dca8: 3c e0 00 00 lis r7,0 ffc0dcac: 80 c7 31 a8 lwz r6,12712(r7) ffc0dcb0: 3c e0 00 00 lis r7,0 ffc0dcb4: 90 c7 28 7c stw r6,10364(r7) { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0dcb8: 80 e3 00 04 lwz r7,4(r3) next->previous = previous; ffc0dcbc: 90 e8 00 04 stw r7,4(r8) previous->next = next; ffc0dcc0: 91 07 00 00 stw r8,0(r7) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0dcc4: 3d 00 00 00 lis r8,0 ffc0dcc8: 81 08 28 88 lwz r8,10376(r8) ffc0dccc: 91 03 00 18 stw r8,24(r3) ffc0dcd0: 7d 40 01 24 mtmsr r10 _ISR_Enable( level ); return( previous_state ); } ffc0dcd4: 7d 23 4b 78 mr r3,r9 ffc0dcd8: 4e 80 00 20 blr /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; ffc0dcdc: 39 00 00 00 li r8,0 ffc0dce0: 91 03 00 08 stw r8,8(r3) _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0dce4: 3d 00 00 00 lis r8,0 ffc0dce8: 81 08 28 88 lwz r8,10376(r8) ffc0dcec: 91 03 00 18 stw r8,24(r3) ffc0dcf0: 7d 40 01 24 mtmsr r10 _ISR_Enable( level ); return( previous_state ); } ffc0dcf4: 7d 23 4b 78 mr r3,r9 ffc0dcf8: 4e 80 00 20 blr =============================================================================== ffc0f1a4 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { ffc0f1a4: 94 21 ff e8 stwu r1,-24(r1) ffc0f1a8: 7c 08 02 a6 mflr r0 ffc0f1ac: 93 a1 00 0c stw r29,12(r1) ffc0f1b0: 7c 7d 1b 78 mr r29,r3 ffc0f1b4: 93 c1 00 10 stw r30,16(r1) ffc0f1b8: 7c 9e 23 78 mr r30,r4 ffc0f1bc: 90 01 00 1c stw r0,28(r1) ffc0f1c0: 93 81 00 08 stw r28,8(r1) ffc0f1c4: 93 e1 00 14 stw r31,20(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc0f1c8: 7f 80 00 a6 mfmsr r28 ffc0f1cc: 7d 30 42 a6 mfsprg r9,0 ffc0f1d0: 7f 89 48 78 andc r9,r28,r9 ffc0f1d4: 7d 20 01 24 mtmsr r9 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); ffc0f1d8: 3c 60 ff c2 lis r3,-62 ffc0f1dc: 7f c5 f3 78 mr r5,r30 ffc0f1e0: 38 63 21 24 addi r3,r3,8484 ffc0f1e4: 7f a4 eb 78 mr r4,r29 ffc0f1e8: 4c c6 31 82 crclr 4*cr1+eq ffc0f1ec: 4b ff 75 b9 bl ffc067a4 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc0f1f0: 83 fe 00 00 lwz r31,0(r30) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0f1f4: 3b de 00 04 addi r30,r30,4 if ( !_Chain_Is_empty( header ) ) { ffc0f1f8: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0f1fc: 41 9e 00 54 beq- cr7,ffc0f250 <_Watchdog_Report_chain+0xac> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); ffc0f200: 7f e4 fb 78 mr r4,r31 ffc0f204: 38 60 00 00 li r3,0 ffc0f208: 48 00 00 5d bl ffc0f264 <_Watchdog_Report> _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; node != _Chain_Tail(header) ; node = node->next ) ffc0f20c: 83 ff 00 00 lwz r31,0(r31) Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; ffc0f210: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0f214: 40 9e ff ec bne+ cr7,ffc0f200 <_Watchdog_Report_chain+0x5c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); ffc0f218: 3c 60 ff c2 lis r3,-62 ffc0f21c: 38 63 21 3c addi r3,r3,8508 ffc0f220: 7f a4 eb 78 mr r4,r29 ffc0f224: 4c c6 31 82 crclr 4*cr1+eq ffc0f228: 4b ff 75 7d bl ffc067a4 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc0f22c: 7f 80 01 24 mtmsr r28 } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } ffc0f230: 80 01 00 1c lwz r0,28(r1) ffc0f234: 83 81 00 08 lwz r28,8(r1) ffc0f238: 7c 08 03 a6 mtlr r0 ffc0f23c: 83 a1 00 0c lwz r29,12(r1) ffc0f240: 83 c1 00 10 lwz r30,16(r1) ffc0f244: 83 e1 00 14 lwz r31,20(r1) ffc0f248: 38 21 00 18 addi r1,r1,24 ffc0f24c: 4e 80 00 20 blr _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); ffc0f250: 3c 60 ff c2 lis r3,-62 ffc0f254: 38 63 21 4c addi r3,r3,8524 ffc0f258: 4c c6 31 82 crclr 4*cr1+eq ffc0f25c: 4b ff 75 49 bl ffc067a4 ffc0f260: 4b ff ff cc b ffc0f22c <_Watchdog_Report_chain+0x88> =============================================================================== ffc0ddd0 <_Workspace_Handler_initialization>: size_t area_count, Heap_Initialization_or_extend_handler extend ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); ffc0ddd0: 3d 40 ff c2 lis r10,-62 void _Workspace_Handler_initialization( Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { ffc0ddd4: 7d 80 00 26 mfcr r12 Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); ffc0ddd8: 39 2a ea f8 addi r9,r10,-5384 void _Workspace_Handler_initialization( Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { ffc0dddc: 94 21 ff d0 stwu r1,-48(r1) ffc0dde0: 7c 08 02 a6 mflr r0 Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); ffc0dde4: 89 09 00 32 lbz r8,50(r9) void _Workspace_Handler_initialization( Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { ffc0dde8: 93 21 00 14 stw r25,20(r1) ffc0ddec: 7c b9 2b 78 mr r25,r5 Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); ffc0ddf0: 2f 88 00 00 cmpwi cr7,r8,0 void _Workspace_Handler_initialization( Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { ffc0ddf4: 93 61 00 1c stw r27,28(r1) ffc0ddf8: 7c 9b 23 78 mr r27,r4 ffc0ddfc: 93 81 00 20 stw r28,32(r1) ffc0de00: 90 01 00 34 stw r0,52(r1) Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); ffc0de04: 83 8a ea f8 lwz r28,-5384(r10) ffc0de08: 39 40 00 00 li r10,0 void _Workspace_Handler_initialization( Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { ffc0de0c: 93 01 00 10 stw r24,16(r1) ffc0de10: 93 41 00 18 stw r26,24(r1) ffc0de14: 93 a1 00 24 stw r29,36(r1) ffc0de18: 93 c1 00 28 stw r30,40(r1) ffc0de1c: 93 e1 00 2c stw r31,44(r1) ffc0de20: 91 81 00 0c stw r12,12(r1) Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); ffc0de24: 40 9e 00 08 bne- cr7,ffc0de2c <_Workspace_Handler_initialization+0x5c> ffc0de28: 81 49 00 04 lwz r10,4(r9) bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { ffc0de2c: 2f 9b 00 00 cmpwi cr7,r27,0 size_t area_count, Heap_Initialization_or_extend_handler extend ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); ffc0de30: 7f 8a e2 14 add r28,r10,r28 bool do_zero = rtems_configuration_get_do_zero_of_workspace(); ffc0de34: 89 49 00 30 lbz r10,48(r9) bool unified = rtems_configuration_get_unified_work_area(); ffc0de38: 89 29 00 31 lbz r9,49(r9) uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { ffc0de3c: 41 9e 00 a0 beq- cr7,ffc0dedc <_Workspace_Handler_initialization+0x10c><== NEVER TAKEN ffc0de40: 2e 0a 00 00 cmpwi cr4,r10,0 if ( area->size > overhead ) { uintptr_t space_available; uintptr_t size; if ( unified ) { ffc0de44: 2d 89 00 00 cmpwi cr3,r9,0 Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; ffc0de48: 3f 40 ff c1 lis r26,-63 } else { size = 0; } } space_available = (*init_or_extend)( ffc0de4c: 3f 00 00 00 lis r24,0 ffc0de50: 7c 7f 1b 78 mr r31,r3 bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { ffc0de54: 3b a0 00 00 li r29,0 Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; ffc0de58: 3b 5a b0 60 addi r26,r26,-20384 } else { size = 0; } } space_available = (*init_or_extend)( ffc0de5c: 3b 18 2d 14 addi r24,r24,11540 size_t i; for (i = 0; i < area_count; ++i) { Heap_Area *area = &areas [i]; if ( do_zero ) { ffc0de60: 40 92 00 bc bne- cr4,ffc0df1c <_Workspace_Handler_initialization+0x14c> memset( area->begin, 0, area->size ); } if ( area->size > overhead ) { ffc0de64: 83 df 00 04 lwz r30,4(r31) ffc0de68: 2b 9e 00 16 cmplwi cr7,r30,22 ffc0de6c: 40 9d 00 60 ble- cr7,ffc0decc <_Workspace_Handler_initialization+0xfc> uintptr_t space_available; uintptr_t size; if ( unified ) { ffc0de70: 40 8e 00 1c bne- cr3,ffc0de8c <_Workspace_Handler_initialization+0xbc> size = area->size; } else { if ( remaining > 0 ) { ffc0de74: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0de78: 41 9e 00 b8 beq- cr7,ffc0df30 <_Workspace_Handler_initialization+0x160><== NEVER TAKEN size = remaining < area->size - overhead ? ffc0de7c: 39 3e ff ea addi r9,r30,-22 remaining + overhead : area->size; ffc0de80: 7f 89 e0 40 cmplw cr7,r9,r28 ffc0de84: 40 9d 00 08 ble- cr7,ffc0de8c <_Workspace_Handler_initialization+0xbc><== NEVER TAKEN ffc0de88: 3b dc 00 16 addi r30,r28,22 } else { size = 0; } } space_available = (*init_or_extend)( ffc0de8c: 7f c5 f3 78 mr r5,r30 ffc0de90: 80 9f 00 00 lwz r4,0(r31) ffc0de94: 7f 03 c3 78 mr r3,r24 ffc0de98: 7f 49 03 a6 mtctr r26 ffc0de9c: 38 c0 00 08 li r6,8 ffc0dea0: 4e 80 04 21 bctrl area->begin, size, page_size ); area->begin = (char *) area->begin + size; ffc0dea4: 81 5f 00 00 lwz r10,0(r31) area->size -= size; if ( space_available < remaining ) { ffc0dea8: 7f 83 e0 40 cmplw cr7,r3,r28 size, page_size ); area->begin = (char *) area->begin + size; area->size -= size; ffc0deac: 81 3f 00 04 lwz r9,4(r31) area->begin, size, page_size ); area->begin = (char *) area->begin + size; ffc0deb0: 7d 4a f2 14 add r10,r10,r30 area->size -= size; ffc0deb4: 7f de 48 50 subf r30,r30,r9 area->begin, size, page_size ); area->begin = (char *) area->begin + size; ffc0deb8: 91 5f 00 00 stw r10,0(r31) area->size -= size; ffc0debc: 93 df 00 04 stw r30,4(r31) if ( space_available < remaining ) { ffc0dec0: 40 9c 00 90 bge- cr7,ffc0df50 <_Workspace_Handler_initialization+0x180><== ALWAYS TAKEN remaining -= space_available; ffc0dec4: 7f 83 e0 50 subf r28,r3,r28 <== NOT EXECUTED } else { remaining = 0; } init_or_extend = extend; ffc0dec8: 7f 3a cb 78 mr r26,r25 <== NOT EXECUTED bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { ffc0decc: 3b bd 00 01 addi r29,r29,1 ffc0ded0: 7f 9d d8 00 cmpw cr7,r29,r27 ffc0ded4: 3b ff 00 08 addi r31,r31,8 ffc0ded8: 40 9e ff 88 bne+ cr7,ffc0de60 <_Workspace_Handler_initialization+0x90><== NEVER TAKEN init_or_extend = extend; } } if ( remaining > 0 ) { ffc0dedc: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0dee0: 40 9e 00 7c bne- cr7,ffc0df5c <_Workspace_Handler_initialization+0x18c> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } } ffc0dee4: 80 01 00 34 lwz r0,52(r1) ffc0dee8: 81 81 00 0c lwz r12,12(r1) ffc0deec: 7c 08 03 a6 mtlr r0 ffc0def0: 83 01 00 10 lwz r24,16(r1) ffc0def4: 83 21 00 14 lwz r25,20(r1) ffc0def8: 7d 81 81 20 mtcrf 24,r12 ffc0defc: 83 41 00 18 lwz r26,24(r1) ffc0df00: 83 61 00 1c lwz r27,28(r1) ffc0df04: 83 81 00 20 lwz r28,32(r1) ffc0df08: 83 a1 00 24 lwz r29,36(r1) ffc0df0c: 83 c1 00 28 lwz r30,40(r1) ffc0df10: 83 e1 00 2c lwz r31,44(r1) ffc0df14: 38 21 00 30 addi r1,r1,48 ffc0df18: 4e 80 00 20 blr for (i = 0; i < area_count; ++i) { Heap_Area *area = &areas [i]; if ( do_zero ) { memset( area->begin, 0, area->size ); ffc0df1c: 80 7f 00 00 lwz r3,0(r31) ffc0df20: 38 80 00 00 li r4,0 ffc0df24: 80 bf 00 04 lwz r5,4(r31) ffc0df28: 48 00 5f 49 bl ffc13e70 ffc0df2c: 4b ff ff 38 b ffc0de64 <_Workspace_Handler_initialization+0x94> } else { size = 0; } } space_available = (*init_or_extend)( ffc0df30: 7f 49 03 a6 mtctr r26 <== NOT EXECUTED ffc0df34: 7f 03 c3 78 mr r3,r24 <== NOT EXECUTED ffc0df38: 80 9f 00 00 lwz r4,0(r31) <== NOT EXECUTED ffc0df3c: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc0df40: 38 c0 00 08 li r6,8 <== NOT EXECUTED remaining -= space_available; } else { remaining = 0; } init_or_extend = extend; ffc0df44: 7f 3a cb 78 mr r26,r25 <== NOT EXECUTED } else { size = 0; } } space_available = (*init_or_extend)( ffc0df48: 4e 80 04 21 bctrl <== NOT EXECUTED ffc0df4c: 4b ff ff 80 b ffc0decc <_Workspace_Handler_initialization+0xfc><== NOT EXECUTED remaining -= space_available; } else { remaining = 0; } init_or_extend = extend; ffc0df50: 7f 3a cb 78 mr r26,r25 area->size -= size; if ( space_available < remaining ) { remaining -= space_available; } else { remaining = 0; ffc0df54: 3b 80 00 00 li r28,0 ffc0df58: 4b ff ff 74 b ffc0decc <_Workspace_Handler_initialization+0xfc> init_or_extend = extend; } } if ( remaining > 0 ) { _Internal_error_Occurred( ffc0df5c: 38 60 00 00 li r3,0 ffc0df60: 38 80 00 01 li r4,1 ffc0df64: 38 a0 00 02 li r5,2 ffc0df68: 4b ff d4 09 bl ffc0b370 <_Internal_error_Occurred> =============================================================================== ffc17250 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { ffc17250: 94 21 ff c8 stwu r1,-56(r1) ffc17254: 7c 08 02 a6 mflr r0 ffc17258: 93 c1 00 30 stw r30,48(r1) uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while (count > 0) ffc1725c: 7c de 33 79 mr. r30,r6 uint32_t start, uint32_t offset, uint32_t count, void *buff ) { ffc17260: 90 01 00 3c stw r0,60(r1) ffc17264: 93 21 00 1c stw r25,28(r1) ffc17268: 93 41 00 20 stw r26,32(r1) ffc1726c: 93 61 00 24 stw r27,36(r1) ffc17270: 93 81 00 28 stw r28,40(r1) ffc17274: 93 a1 00 2c stw r29,44(r1) ffc17278: 93 e1 00 34 stw r31,52(r1) uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while (count > 0) ffc1727c: 41 82 00 a8 beq- ffc17324 <_fat_block_read+0xd4> <== NEVER TAKEN ffc17280: 7c 7a 1b 78 mr r26,r3 ffc17284: 7c f9 3b 78 mr r25,r7 ffc17288: 7c bb 2b 78 mr r27,r5 ffc1728c: 7c 9c 23 78 mr r28,r4 ffc17290: 3b a0 00 00 li r29,0 ffc17294: 48 00 00 38 b ffc172cc <_fat_block_read+0x7c> { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); ffc17298: a3 fa 00 00 lhz r31,0(r26) memcpy((buff + cmpltd), (sec_buf + ofs), c); ffc1729c: 80 81 00 08 lwz r4,8(r1) { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); ffc172a0: 7f fb f8 50 subf r31,r27,r31 ffc172a4: 7f 9f f0 40 cmplw cr7,r31,r30 memcpy((buff + cmpltd), (sec_buf + ofs), c); ffc172a8: 7c 84 da 14 add r4,r4,r27 { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); ffc172ac: 40 9d 00 08 ble- cr7,ffc172b4 <_fat_block_read+0x64> ffc172b0: 7f df f3 78 mr r31,r30 memcpy((buff + cmpltd), (sec_buf + ofs), c); ffc172b4: 7f e5 fb 78 mr r5,r31 ffc172b8: 48 00 b0 c5 bl ffc2237c uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while (count > 0) ffc172bc: 7f df f0 51 subf. r30,r31,r30 c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (sec_buf + ofs), c); count -= c; cmpltd += c; ffc172c0: 7f bf ea 14 add r29,r31,r29 sec_num++; ofs = 0; ffc172c4: 3b 60 00 00 li r27,0 uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while (count > 0) ffc172c8: 41 82 00 2c beq- ffc172f4 <_fat_block_read+0xa4> { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); ffc172cc: 7f 84 e3 78 mr r4,r28 ffc172d0: 38 a0 00 01 li r5,1 ffc172d4: 38 c1 00 08 addi r6,r1,8 ffc172d8: 7f 43 d3 78 mr r3,r26 ffc172dc: 4b ff fe 7d bl ffc17158 c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (sec_buf + ofs), c); count -= c; cmpltd += c; sec_num++; ffc172e0: 3b 9c 00 01 addi r28,r28,1 uint32_t c = 0; while (count > 0) { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) ffc172e4: 2f 83 00 00 cmpwi cr7,r3,0 return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (sec_buf + ofs), c); ffc172e8: 7c 79 ea 14 add r3,r25,r29 uint32_t c = 0; while (count > 0) { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) ffc172ec: 41 9e ff ac beq+ cr7,ffc17298 <_fat_block_read+0x48> <== ALWAYS TAKEN return -1; ffc172f0: 3b a0 ff ff li r29,-1 <== NOT EXECUTED cmpltd += c; sec_num++; ofs = 0; } return cmpltd; } ffc172f4: 80 01 00 3c lwz r0,60(r1) ffc172f8: 7f a3 eb 78 mr r3,r29 ffc172fc: 83 21 00 1c lwz r25,28(r1) ffc17300: 7c 08 03 a6 mtlr r0 ffc17304: 83 41 00 20 lwz r26,32(r1) ffc17308: 83 61 00 24 lwz r27,36(r1) ffc1730c: 83 81 00 28 lwz r28,40(r1) ffc17310: 83 a1 00 2c lwz r29,44(r1) ffc17314: 83 c1 00 30 lwz r30,48(r1) ffc17318: 83 e1 00 34 lwz r31,52(r1) ffc1731c: 38 21 00 38 addi r1,r1,56 ffc17320: 4e 80 00 20 blr uint32_t count, void *buff ) { int rc = RC_OK; ssize_t cmpltd = 0; ffc17324: 3b a0 00 00 li r29,0 <== NOT EXECUTED ffc17328: 4b ff ff cc b ffc172f4 <_fat_block_read+0xa4> <== NOT EXECUTED =============================================================================== ffc059e4 <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); ffc059e4: 7c 83 23 78 mr r3,r4 <== NOT EXECUTED ffc059e8: 7c a4 2b 78 mr r4,r5 <== NOT EXECUTED ffc059ec: 4b ff ff 7c b ffc05968 <== NOT EXECUTED =============================================================================== ffc05dd0 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); ffc05dd0: 7c 83 23 78 mr r3,r4 <== NOT EXECUTED ffc05dd4: 7c a4 2b 78 mr r4,r5 <== NOT EXECUTED ffc05dd8: 4b ff ff 7c b ffc05d54 <== NOT EXECUTED =============================================================================== ffc09418 : */ int adjtime( const struct timeval *delta, struct timeval *olddelta ) { ffc09418: 94 21 ff d0 stwu r1,-48(r1) ffc0941c: 7d 80 00 26 mfcr r12 ffc09420: 7c 08 02 a6 mflr r0 ffc09424: 93 81 00 20 stw r28,32(r1) long adjustment; /* * Simple validations */ if ( !delta ) ffc09428: 7c 7c 1b 79 mr. r28,r3 */ int adjtime( const struct timeval *delta, struct timeval *olddelta ) { ffc0942c: 90 01 00 34 stw r0,52(r1) ffc09430: 93 61 00 1c stw r27,28(r1) ffc09434: 93 a1 00 24 stw r29,36(r1) ffc09438: 93 c1 00 28 stw r30,40(r1) ffc0943c: 93 e1 00 2c stw r31,44(r1) ffc09440: 91 81 00 18 stw r12,24(r1) long adjustment; /* * Simple validations */ if ( !delta ) ffc09444: 41 82 01 a4 beq- ffc095e8 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) ffc09448: 81 5c 00 04 lwz r10,4(r28) ffc0944c: 3d 20 00 0f lis r9,15 ffc09450: 61 29 42 3f ori r9,r9,16959 ffc09454: 7f 8a 48 40 cmplw cr7,r10,r9 ffc09458: 41 9d 01 90 bgt- cr7,ffc095e8 rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { ffc0945c: 2e 04 00 00 cmpwi cr4,r4,0 ffc09460: 7c 9b 23 78 mr r27,r4 ffc09464: 41 92 00 14 beq- cr4,ffc09478 olddelta->tv_sec = 0; ffc09468: 39 20 00 00 li r9,0 olddelta->tv_usec = 0; ffc0946c: 91 24 00 04 stw r9,4(r4) if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { olddelta->tv_sec = 0; ffc09470: 91 24 00 00 stw r9,0(r4) ffc09474: 81 5c 00 04 lwz r10,4(r28) olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); ffc09478: 81 3c 00 00 lwz r9,0(r28) ffc0947c: 55 27 40 2e rlwinm r7,r9,8,0,23 ffc09480: 55 28 18 38 rlwinm r8,r9,3,0,28 ffc09484: 7d 08 38 50 subf r8,r8,r7 ffc09488: 55 07 30 32 rlwinm r7,r8,6,0,25 ffc0948c: 7d 08 38 50 subf r8,r8,r7 ffc09490: 7d 28 4a 14 add r9,r8,r9 adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) ffc09494: 3d 00 ff c2 lis r8,-62 olddelta->tv_sec = 0; olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); ffc09498: 55 29 30 32 rlwinm r9,r9,6,0,25 adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) ffc0949c: 80 e8 b7 00 lwz r7,-18688(r8) olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); adjustment += delta->tv_usec; ffc094a0: 7d 49 52 14 add r10,r9,r10 /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) ffc094a4: 7f 8a 38 40 cmplw cr7,r10,r7 ffc094a8: 40 9c 00 34 bge- cr7,ffc094dc /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; ffc094ac: 38 60 00 00 li r3,0 } ffc094b0: 80 01 00 34 lwz r0,52(r1) ffc094b4: 81 81 00 18 lwz r12,24(r1) ffc094b8: 7c 08 03 a6 mtlr r0 ffc094bc: 83 61 00 1c lwz r27,28(r1) ffc094c0: 83 81 00 20 lwz r28,32(r1) ffc094c4: 7d 80 81 20 mtcrf 8,r12 ffc094c8: 83 a1 00 24 lwz r29,36(r1) ffc094cc: 83 c1 00 28 lwz r30,40(r1) ffc094d0: 83 e1 00 2c lwz r31,44(r1) ffc094d4: 38 21 00 30 addi r1,r1,48 ffc094d8: 4e 80 00 20 blr * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc094dc: 3d 20 00 00 lis r9,0 ffc094e0: 81 49 29 84 lwz r10,10628(r9) ++level; ffc094e4: 39 4a 00 01 addi r10,r10,1 _Thread_Dispatch_disable_level = level; ffc094e8: 91 49 29 84 stw r10,10628(r9) ) { Timestamp_Control tod_as_timestamp; Timestamp_Control *tod_as_timestamp_ptr; tod_as_timestamp_ptr = ffc094ec: 3c 80 00 00 lis r4,0 ffc094f0: 38 84 2d a0 addi r4,r4,11680 ffc094f4: 38 61 00 08 addi r3,r1,8 ffc094f8: 48 00 1f 39 bl ffc0b430 <_TOD_Get_with_nanoseconds> static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); ffc094fc: 3c c0 3b 9a lis r6,15258 ffc09500: 83 e3 00 04 lwz r31,4(r3) ffc09504: 38 a0 00 00 li r5,0 ffc09508: 83 c3 00 00 lwz r30,0(r3) ffc0950c: 60 c6 ca 00 ori r6,r6,51712 ffc09510: 7f e4 fb 78 mr r4,r31 ffc09514: 7f c3 f3 78 mr r3,r30 ffc09518: 48 01 02 2d bl ffc19744 <__divdi3> _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ffc0951c: 83 bc 00 00 lwz r29,0(r28) _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); ffc09520: 3c c0 3b 9a lis r6,15258 ffc09524: 7f bd 22 14 add r29,r29,r4 ffc09528: 38 a0 00 00 li r5,0 ffc0952c: 60 c6 ca 00 ori r6,r6,51712 ffc09530: 7f c3 f3 78 mr r3,r30 ffc09534: 7f e4 fb 78 mr r4,r31 ffc09538: 48 01 06 31 bl ffc19b68 <__moddi3> ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; ffc0953c: 81 3c 00 04 lwz r9,4(r28) /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc09540: 3d 40 3b 9a lis r10,15258 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; ffc09544: 1d 29 03 e8 mulli r9,r9,1000 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc09548: 61 4a c9 ff ori r10,r10,51711 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; ffc0954c: 7c 84 4a 14 add r4,r4,r9 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc09550: 7f 84 50 40 cmplw cr7,r4,r10 int _EXFUN(setitimer, (int __which, const struct itimerval *__value, struct itimerval *__ovalue)); #if defined(__rtems__) /* BSD function used by RTEMS code */ int _EXFUN(adjtime,(const struct timeval *, struct timeval *)); ffc09554: 39 1d 00 01 addi r8,r29,1 ffc09558: 40 9d 00 1c ble- cr7,ffc09574 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ffc0955c: 3d 24 c4 65 addis r9,r4,-15259 ffc09560: 38 89 36 00 addi r4,r9,13824 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc09564: 7f 84 50 40 cmplw cr7,r4,r10 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; ffc09568: 7d 1d 43 78 mr r29,r8 ffc0956c: 39 08 00 01 addi r8,r8,1 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc09570: 41 9d ff ec bgt+ cr7,ffc0955c <== NEVER TAKEN ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { ffc09574: 3d 20 c4 65 lis r9,-15259 ffc09578: 7c 87 23 78 mr r7,r4 ffc0957c: 39 5d ff ff addi r10,r29,-1 ffc09580: 61 29 36 00 ori r9,r9,13824 ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ffc09584: 3c e7 3b 9b addis r7,r7,15259 ffc09588: 38 e7 ca 00 addi r7,r7,-13824 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { ffc0958c: 7f 87 48 40 cmplw cr7,r7,r9 ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; ffc09590: 7d 46 53 78 mr r6,r10 ffc09594: 39 4a ff ff addi r10,r10,-1 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { ffc09598: 40 9d ff ec ble+ cr7,ffc09584 Timestamp64_Control *_time, Timestamp64_Control _seconds, Timestamp64_Control _nanoseconds ) { *_time = _seconds * 1000000000L + _nanoseconds; ffc0959c: 3c a0 3b 9a lis r5,15258 ffc095a0: 60 a5 ca 00 ori r5,r5,51712 ffc095a4: 7d 06 28 96 mulhw r8,r6,r5 ffc095a8: 7d 26 29 d6 mullw r9,r6,r5 const struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _Timestamp_Set( ffc095ac: 7c eb 3b 78 mr r11,r7 ffc095b0: 7c ea fe 70 srawi r10,r7,31 ffc095b4: 7d 6b 48 14 addc r11,r11,r9 ffc095b8: 7d 4a 41 14 adde r10,r10,r8 ffc095bc: 91 41 00 08 stw r10,8(r1) &tod_as_timestamp, tod_as_timespec->tv_sec, tod_as_timespec->tv_nsec ); _TOD_Set_with_timestamp( &tod_as_timestamp ); ffc095c0: 38 61 00 08 addi r3,r1,8 ffc095c4: 91 61 00 0c stw r11,12(r1) ffc095c8: 48 00 1f 25 bl ffc0b4ec <_TOD_Set_with_timestamp> ts.tv_sec--; } _TOD_Set( &ts ); _Thread_Enable_dispatch(); ffc095cc: 48 00 3c 2d bl ffc0d1f8 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) ffc095d0: 41 b2 fe dc beq- cr4,ffc094ac *olddelta = *delta; ffc095d4: 81 3c 00 00 lwz r9,0(r28) ffc095d8: 81 5c 00 04 lwz r10,4(r28) ffc095dc: 91 3b 00 00 stw r9,0(r27) ffc095e0: 91 5b 00 04 stw r10,4(r27) ffc095e4: 4b ff fe c8 b ffc094ac */ if ( !delta ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc095e8: 48 00 a2 41 bl ffc13828 <__errno> ffc095ec: 39 20 00 16 li r9,22 ffc095f0: 91 23 00 00 stw r9,0(r3) ffc095f4: 38 60 ff ff li r3,-1 ffc095f8: 4b ff fe b8 b ffc094b0 =============================================================================== ffc096d4 : #include #include #include int aio_cancel(int fildes, struct aiocb *aiocbp) { ffc096d4: 94 21 ff e8 stwu r1,-24(r1) ffc096d8: 7c 08 02 a6 mflr r0 ffc096dc: 93 e1 00 14 stw r31,20(r1) rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); ffc096e0: 3f e0 00 00 lis r31,0 ffc096e4: 3b ff 2b b8 addi r31,r31,11192 #include #include #include int aio_cancel(int fildes, struct aiocb *aiocbp) { ffc096e8: 93 a1 00 0c stw r29,12(r1) ffc096ec: 7c 7d 1b 78 mr r29,r3 rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); ffc096f0: 7f e3 fb 78 mr r3,r31 #include #include #include int aio_cancel(int fildes, struct aiocb *aiocbp) { ffc096f4: 90 01 00 1c stw r0,28(r1) ffc096f8: 93 c1 00 10 stw r30,16(r1) ffc096fc: 7c 9e 23 78 mr r30,r4 ffc09700: 93 81 00 08 stw r28,8(r1) rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); ffc09704: 48 00 16 dd bl ffc0ade0 if (fcntl (fildes, F_GETFD) < 0) { ffc09708: 7f a3 eb 78 mr r3,r29 ffc0970c: 38 80 00 01 li r4,1 ffc09710: 4c c6 31 82 crclr 4*cr1+eq ffc09714: 48 00 7f d1 bl ffc116e4 ffc09718: 2f 83 00 00 cmpwi cr7,r3,0 ffc0971c: 41 9c 01 bc blt- cr7,ffc098d8 pthread_mutex_unlock(&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EBADF); } /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { ffc09720: 2f 9e 00 00 cmpwi cr7,r30,0 ffc09724: 41 9e 01 08 beq- cr7,ffc0982c pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; } else { AIO_printf ("Cancel request\n"); if (aiocbp->aio_fildes != fildes) { ffc09728: 83 9e 00 00 lwz r28,0(r30) ffc0972c: 7f 9c e8 00 cmpw cr7,r28,r29 ffc09730: 40 9e 00 e0 bne- cr7,ffc09810 pthread_mutex_unlock (&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); ffc09734: 38 7f 00 48 addi r3,r31,72 ffc09738: 7f 84 e3 78 mr r4,r28 ffc0973c: 38 a0 00 00 li r5,0 ffc09740: 48 00 07 05 bl ffc09e44 if (r_chain == NULL) { ffc09744: 7c 7d 1b 79 mr. r29,r3 ffc09748: 41 82 00 54 beq- ffc0979c return AIO_ALLDONE; } } AIO_printf ("Request on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); ffc0974c: 3b 9d 00 1c addi r28,r29,28 ffc09750: 7f 83 e3 78 mr r3,r28 ffc09754: 48 00 16 8d bl ffc0ade0 result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); ffc09758: 7f c4 f3 78 mr r4,r30 ffc0975c: 38 7d 00 08 addi r3,r29,8 ffc09760: 48 00 08 9d bl ffc09ffc ffc09764: 7c 7e 1b 78 mr r30,r3 pthread_mutex_unlock (&r_chain->mutex); ffc09768: 7f 83 e3 78 mr r3,r28 ffc0976c: 48 00 17 25 bl ffc0ae90 pthread_mutex_unlock (&aio_request_queue.mutex); ffc09770: 7f e3 fb 78 mr r3,r31 ffc09774: 48 00 17 1d bl ffc0ae90 return result; } return AIO_ALLDONE; } ffc09778: 80 01 00 1c lwz r0,28(r1) ffc0977c: 7f c3 f3 78 mr r3,r30 ffc09780: 83 81 00 08 lwz r28,8(r1) ffc09784: 7c 08 03 a6 mtlr r0 ffc09788: 83 a1 00 0c lwz r29,12(r1) ffc0978c: 83 c1 00 10 lwz r30,16(r1) ffc09790: 83 e1 00 14 lwz r31,20(r1) ffc09794: 38 21 00 18 addi r1,r1,24 ffc09798: 4e 80 00 20 blr rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { ffc0979c: 81 3f 00 54 lwz r9,84(r31) ffc097a0: 39 5f 00 58 addi r10,r31,88 ffc097a4: 7f 89 50 00 cmpw cr7,r9,r10 ffc097a8: 41 9e 00 58 beq- cr7,ffc09800 <== NEVER TAKEN r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); ffc097ac: 38 7f 00 54 addi r3,r31,84 ffc097b0: 7f 84 e3 78 mr r4,r28 ffc097b4: 38 a0 00 00 li r5,0 ffc097b8: 48 00 06 8d bl ffc09e44 if (r_chain == NULL) { ffc097bc: 2c 03 00 00 cmpwi r3,0 ffc097c0: 41 82 00 50 beq- ffc09810 rtems_set_errno_and_return_minus_one (EINVAL); } AIO_printf ("Request on [IQ]\n"); result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); ffc097c4: 7f c4 f3 78 mr r4,r30 ffc097c8: 38 63 00 08 addi r3,r3,8 ffc097cc: 48 00 08 31 bl ffc09ffc ffc097d0: 7c 7e 1b 78 mr r30,r3 pthread_mutex_unlock (&aio_request_queue.mutex); ffc097d4: 7f e3 fb 78 mr r3,r31 ffc097d8: 48 00 16 b9 bl ffc0ae90 pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } ffc097dc: 80 01 00 1c lwz r0,28(r1) ffc097e0: 7f c3 f3 78 mr r3,r30 ffc097e4: 83 81 00 08 lwz r28,8(r1) ffc097e8: 7c 08 03 a6 mtlr r0 ffc097ec: 83 a1 00 0c lwz r29,12(r1) ffc097f0: 83 c1 00 10 lwz r30,16(r1) ffc097f4: 83 e1 00 14 lwz r31,20(r1) ffc097f8: 38 21 00 18 addi r1,r1,24 ffc097fc: 4e 80 00 20 blr AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); if (r_chain == NULL) { pthread_mutex_unlock(&aio_request_queue.mutex); ffc09800: 7f e3 fb 78 mr r3,r31 ffc09804: 48 00 16 8d bl ffc0ae90 return AIO_ALLDONE; ffc09808: 3b c0 00 02 li r30,2 ffc0980c: 4b ff ff 6c b ffc09778 r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); if (r_chain == NULL) { pthread_mutex_unlock (&aio_request_queue.mutex); ffc09810: 7f e3 fb 78 mr r3,r31 ffc09814: 48 00 16 7d bl ffc0ae90 rtems_set_errno_and_return_minus_one (EINVAL); ffc09818: 3b c0 ff ff li r30,-1 ffc0981c: 48 00 c0 95 bl ffc158b0 <__errno> ffc09820: 39 20 00 16 li r9,22 ffc09824: 91 23 00 00 stw r9,0(r3) ffc09828: 4b ff ff 50 b ffc09778 /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { AIO_printf ("Cancel all requests\n"); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); ffc0982c: 38 7f 00 48 addi r3,r31,72 ffc09830: 7f a4 eb 78 mr r4,r29 ffc09834: 38 a0 00 00 li r5,0 ffc09838: 48 00 06 0d bl ffc09e44 if (r_chain == NULL) { ffc0983c: 7c 7e 1b 79 mr. r30,r3 ffc09840: 41 82 00 38 beq- ffc09878 return AIO_ALLDONE; } AIO_printf ("Request chain on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); ffc09844: 3b be 00 1c addi r29,r30,28 ffc09848: 7f a3 eb 78 mr r3,r29 ffc0984c: 48 00 15 95 bl ffc0ade0 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc09850: 7f c3 f3 78 mr r3,r30 ffc09854: 48 00 36 d1 bl ffc0cf24 <_Chain_Extract> rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); ffc09858: 7f c3 f3 78 mr r3,r30 ffc0985c: 48 00 07 19 bl ffc09f74 pthread_mutex_unlock (&r_chain->mutex); ffc09860: 7f a3 eb 78 mr r3,r29 ffc09864: 48 00 16 2d bl ffc0ae90 pthread_mutex_unlock (&aio_request_queue.mutex); ffc09868: 7f e3 fb 78 mr r3,r31 ffc0986c: 48 00 16 25 bl ffc0ae90 return AIO_CANCELED; ffc09870: 3b c0 00 00 li r30,0 ffc09874: 4b ff ff 04 b ffc09778 r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { ffc09878: 81 3f 00 54 lwz r9,84(r31) ffc0987c: 39 5f 00 58 addi r10,r31,88 ffc09880: 7f 89 50 00 cmpw cr7,r9,r10 ffc09884: 41 be ff 7c beq- cr7,ffc09800 <== NEVER TAKEN r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); ffc09888: 38 7f 00 54 addi r3,r31,84 ffc0988c: 7f a4 eb 78 mr r4,r29 ffc09890: 38 a0 00 00 li r5,0 ffc09894: 48 00 05 b1 bl ffc09e44 if (r_chain == NULL) { ffc09898: 7c 7e 1b 79 mr. r30,r3 ffc0989c: 41 a2 ff 64 beq- ffc09800 AIO_printf ("Request chain on [IQ]\n"); rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); pthread_mutex_destroy (&r_chain->mutex); ffc098a0: 3b be 00 1c addi r29,r30,28 ffc098a4: 48 00 36 81 bl ffc0cf24 <_Chain_Extract> } AIO_printf ("Request chain on [IQ]\n"); rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); ffc098a8: 7f c3 f3 78 mr r3,r30 ffc098ac: 48 00 06 c9 bl ffc09f74 pthread_mutex_destroy (&r_chain->mutex); ffc098b0: 7f a3 eb 78 mr r3,r29 ffc098b4: 48 00 11 85 bl ffc0aa38 pthread_cond_destroy (&r_chain->mutex); ffc098b8: 7f a3 eb 78 mr r3,r29 ffc098bc: 48 00 0c c1 bl ffc0a57c free (r_chain); ffc098c0: 7f c3 f3 78 mr r3,r30 ffc098c4: 4b ff b5 81 bl ffc04e44 pthread_mutex_unlock (&aio_request_queue.mutex); ffc098c8: 7f e3 fb 78 mr r3,r31 ffc098cc: 48 00 15 c5 bl ffc0ae90 return AIO_CANCELED; ffc098d0: 3b c0 00 00 li r30,0 ffc098d4: 4b ff fe a4 b ffc09778 int result; pthread_mutex_lock (&aio_request_queue.mutex); if (fcntl (fildes, F_GETFD) < 0) { pthread_mutex_unlock(&aio_request_queue.mutex); ffc098d8: 7f e3 fb 78 mr r3,r31 ffc098dc: 48 00 15 b5 bl ffc0ae90 rtems_set_errno_and_return_minus_one (EBADF); ffc098e0: 3b c0 ff ff li r30,-1 ffc098e4: 48 00 bf cd bl ffc158b0 <__errno> ffc098e8: 39 20 00 09 li r9,9 ffc098ec: 91 23 00 00 stw r9,0(r3) ffc098f0: 4b ff fe 88 b ffc09778 =============================================================================== ffc098fc : ) { rtems_aio_request *req; int mode; if (op != O_SYNC) ffc098fc: 2f 83 20 00 cmpwi cr7,r3,8192 int aio_fsync( int op, struct aiocb *aiocbp ) { ffc09900: 94 21 ff f0 stwu r1,-16(r1) ffc09904: 7c 08 02 a6 mflr r0 ffc09908: 93 c1 00 08 stw r30,8(r1) rtems_aio_request *req; int mode; if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); ffc0990c: 3b c0 00 16 li r30,22 int aio_fsync( int op, struct aiocb *aiocbp ) { ffc09910: 93 e1 00 0c stw r31,12(r1) ffc09914: 7c 9f 23 78 mr r31,r4 ffc09918: 90 01 00 14 stw r0,20(r1) rtems_aio_request *req; int mode; if (op != O_SYNC) ffc0991c: 40 9e 00 60 bne- cr7,ffc0997c rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc09920: 80 64 00 00 lwz r3,0(r4) ffc09924: 38 80 00 03 li r4,3 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); ffc09928: 3b c0 00 09 li r30,9 int mode; if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc0992c: 4c c6 31 82 crclr 4*cr1+eq ffc09930: 48 00 7d b5 bl ffc116e4 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) ffc09934: 54 63 07 be clrlwi r3,r3,30 ffc09938: 38 63 ff ff addi r3,r3,-1 ffc0993c: 2b 83 00 01 cmplwi cr7,r3,1 ffc09940: 41 9d 00 3c bgt- cr7,ffc0997c rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); ffc09944: 38 60 00 18 li r3,24 ffc09948: 4b ff ba c1 bl ffc05408 if (req == NULL) ffc0994c: 7c 69 1b 79 mr. r9,r3 ffc09950: 41 82 00 28 beq- ffc09978 <== NEVER TAKEN req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } ffc09954: 80 01 00 14 lwz r0,20(r1) req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; ffc09958: 93 e9 00 14 stw r31,20(r9) req->aiocbp->aio_lio_opcode = LIO_SYNC; ffc0995c: 39 20 00 03 li r9,3 return rtems_aio_enqueue (req); } ffc09960: 7c 08 03 a6 mtlr r0 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; ffc09964: 91 3f 00 30 stw r9,48(r31) return rtems_aio_enqueue (req); } ffc09968: 83 c1 00 08 lwz r30,8(r1) ffc0996c: 83 e1 00 0c lwz r31,12(r1) ffc09970: 38 21 00 10 addi r1,r1,16 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); ffc09974: 48 00 07 30 b ffc0a0a4 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); ffc09978: 3b c0 00 0b li r30,11 <== NOT EXECUTED ffc0997c: 39 20 ff ff li r9,-1 ffc09980: 93 df 00 34 stw r30,52(r31) ffc09984: 91 3f 00 38 stw r9,56(r31) ffc09988: 48 00 bf 29 bl ffc158b0 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } ffc0998c: 80 01 00 14 lwz r0,20(r1) if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); ffc09990: 93 c3 00 00 stw r30,0(r3) req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } ffc09994: 38 60 ff ff li r3,-1 ffc09998: 7c 08 03 a6 mtlr r0 ffc0999c: 83 c1 00 08 lwz r30,8(r1) ffc099a0: 83 e1 00 0c lwz r31,12(r1) ffc099a4: 38 21 00 10 addi r1,r1,16 ffc099a8: 4e 80 00 20 blr =============================================================================== ffc0a2d4 : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { ffc0a2d4: 94 21 ff f0 stwu r1,-16(r1) ffc0a2d8: 7c 08 02 a6 mflr r0 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc0a2dc: 38 80 00 03 li r4,3 * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { ffc0a2e0: 90 01 00 14 stw r0,20(r1) ffc0a2e4: 93 e1 00 0c stw r31,12(r1) ffc0a2e8: 7c 7f 1b 78 mr r31,r3 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc0a2ec: 80 63 00 00 lwz r3,0(r3) * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { ffc0a2f0: 93 c1 00 08 stw r30,8(r1) rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc0a2f4: 4c c6 31 82 crclr 4*cr1+eq ffc0a2f8: 48 00 73 ed bl ffc116e4 if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) ffc0a2fc: 70 63 00 03 andi. r3,r3,3 ffc0a300: 41 82 00 10 beq- ffc0a310 <== NEVER TAKEN ffc0a304: 2f 83 00 02 cmpwi cr7,r3,2 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); ffc0a308: 3b c0 00 09 li r30,9 { rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) ffc0a30c: 40 9e 00 20 bne- cr7,ffc0a32c rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) ffc0a310: 81 3f 00 18 lwz r9,24(r31) ffc0a314: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a318: 40 9e 00 10 bne- cr7,ffc0a328 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) ffc0a31c: 81 3f 00 08 lwz r9,8(r31) ffc0a320: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a324: 40 9c 00 38 bge- cr7,ffc0a35c rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); ffc0a328: 3b c0 00 16 li r30,22 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); ffc0a32c: 39 20 ff ff li r9,-1 ffc0a330: 93 df 00 34 stw r30,52(r31) ffc0a334: 91 3f 00 38 stw r9,56(r31) ffc0a338: 48 00 b5 79 bl ffc158b0 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } ffc0a33c: 80 01 00 14 lwz r0,20(r1) if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); ffc0a340: 93 c3 00 00 stw r30,0(r3) req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } ffc0a344: 38 60 ff ff li r3,-1 ffc0a348: 7c 08 03 a6 mtlr r0 ffc0a34c: 83 c1 00 08 lwz r30,8(r1) ffc0a350: 83 e1 00 0c lwz r31,12(r1) ffc0a354: 38 21 00 10 addi r1,r1,16 ffc0a358: 4e 80 00 20 blr rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); ffc0a35c: 38 60 00 18 li r3,24 ffc0a360: 4b ff b0 a9 bl ffc05408 if (req == NULL) ffc0a364: 7c 69 1b 79 mr. r9,r3 ffc0a368: 41 82 00 28 beq- ffc0a390 <== NEVER TAKEN req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } ffc0a36c: 80 01 00 14 lwz r0,20(r1) req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; ffc0a370: 93 e9 00 14 stw r31,20(r9) req->aiocbp->aio_lio_opcode = LIO_READ; ffc0a374: 39 20 00 01 li r9,1 return rtems_aio_enqueue (req); } ffc0a378: 7c 08 03 a6 mtlr r0 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; ffc0a37c: 91 3f 00 30 stw r9,48(r31) return rtems_aio_enqueue (req); } ffc0a380: 83 c1 00 08 lwz r30,8(r1) ffc0a384: 83 e1 00 0c lwz r31,12(r1) ffc0a388: 38 21 00 10 addi r1,r1,16 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); ffc0a38c: 4b ff fd 18 b ffc0a0a4 if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); ffc0a390: 3b c0 00 0b li r30,11 <== NOT EXECUTED ffc0a394: 4b ff ff 98 b ffc0a32c <== NOT EXECUTED =============================================================================== ffc0a3a0 : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { ffc0a3a0: 94 21 ff f0 stwu r1,-16(r1) ffc0a3a4: 7c 08 02 a6 mflr r0 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc0a3a8: 38 80 00 03 li r4,3 * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { ffc0a3ac: 90 01 00 14 stw r0,20(r1) ffc0a3b0: 93 e1 00 0c stw r31,12(r1) ffc0a3b4: 7c 7f 1b 78 mr r31,r3 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc0a3b8: 80 63 00 00 lwz r3,0(r3) * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { ffc0a3bc: 93 c1 00 08 stw r30,8(r1) rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); ffc0a3c0: 3b c0 00 09 li r30,9 aio_write (struct aiocb *aiocbp) { rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc0a3c4: 4c c6 31 82 crclr 4*cr1+eq ffc0a3c8: 48 00 73 1d bl ffc116e4 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) ffc0a3cc: 54 63 07 be clrlwi r3,r3,30 ffc0a3d0: 38 63 ff ff addi r3,r3,-1 ffc0a3d4: 2b 83 00 01 cmplwi cr7,r3,1 ffc0a3d8: 41 9d 00 20 bgt- cr7,ffc0a3f8 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) ffc0a3dc: 81 3f 00 18 lwz r9,24(r31) ffc0a3e0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a3e4: 40 9e 00 10 bne- cr7,ffc0a3f4 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) ffc0a3e8: 81 3f 00 08 lwz r9,8(r31) ffc0a3ec: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a3f0: 40 9c 00 38 bge- cr7,ffc0a428 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); ffc0a3f4: 3b c0 00 16 li r30,22 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); ffc0a3f8: 39 20 ff ff li r9,-1 ffc0a3fc: 93 df 00 34 stw r30,52(r31) ffc0a400: 91 3f 00 38 stw r9,56(r31) ffc0a404: 48 00 b4 ad bl ffc158b0 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } ffc0a408: 80 01 00 14 lwz r0,20(r1) if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); ffc0a40c: 93 c3 00 00 stw r30,0(r3) req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } ffc0a410: 38 60 ff ff li r3,-1 ffc0a414: 7c 08 03 a6 mtlr r0 ffc0a418: 83 c1 00 08 lwz r30,8(r1) ffc0a41c: 83 e1 00 0c lwz r31,12(r1) ffc0a420: 38 21 00 10 addi r1,r1,16 ffc0a424: 4e 80 00 20 blr rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); ffc0a428: 38 60 00 18 li r3,24 ffc0a42c: 4b ff af dd bl ffc05408 if (req == NULL) ffc0a430: 7c 69 1b 79 mr. r9,r3 ffc0a434: 41 82 00 28 beq- ffc0a45c <== NEVER TAKEN req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } ffc0a438: 80 01 00 14 lwz r0,20(r1) req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; ffc0a43c: 93 e9 00 14 stw r31,20(r9) req->aiocbp->aio_lio_opcode = LIO_WRITE; ffc0a440: 39 20 00 02 li r9,2 return rtems_aio_enqueue (req); } ffc0a444: 7c 08 03 a6 mtlr r0 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; ffc0a448: 91 3f 00 30 stw r9,48(r31) return rtems_aio_enqueue (req); } ffc0a44c: 83 c1 00 08 lwz r30,8(r1) ffc0a450: 83 e1 00 0c lwz r31,12(r1) ffc0a454: 38 21 00 10 addi r1,r1,16 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); ffc0a458: 4b ff fc 4c b ffc0a0a4 if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); ffc0a45c: 3b c0 00 0b li r30,11 <== NOT EXECUTED ffc0a460: 4b ff ff 98 b ffc0a3f8 <== NOT EXECUTED =============================================================================== ffc0a958 : rtems_rbtree_control *chunk_tree, rtems_rbheap_chunk *a, rtems_rbheap_chunk *b ) { if (b != NULL_PAGE && rtems_rbheap_is_chunk_free(b)) { ffc0a958: 2f 86 ff f8 cmpwi cr7,r6,-8 rtems_chain_control *free_chain, rtems_rbtree_control *chunk_tree, rtems_rbheap_chunk *a, rtems_rbheap_chunk *b ) { ffc0a95c: 7c 6a 1b 78 mr r10,r3 if (b != NULL_PAGE && rtems_rbheap_is_chunk_free(b)) { ffc0a960: 4d 9e 00 20 beqlr cr7 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain( const Chain_Node *node ) { return (node->next == NULL) && (node->previous == NULL); ffc0a964: 81 26 00 00 lwz r9,0(r6) ffc0a968: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a96c: 41 9e 00 60 beq- cr7,ffc0a9cc if (b->begin < a->begin) { ffc0a970: 80 e6 00 18 lwz r7,24(r6) ffc0a974: 81 05 00 18 lwz r8,24(r5) ffc0a978: 7f 87 40 40 cmplw cr7,r7,r8 ffc0a97c: 40 9c 00 14 bge- cr7,ffc0a990 ffc0a980: 7c a8 2b 78 mr r8,r5 ffc0a984: 81 25 00 00 lwz r9,0(r5) ffc0a988: 7c c5 33 78 mr r5,r6 ffc0a98c: 7d 06 43 78 mr r6,r8 a = b; b = t; } a->size += b->size; ffc0a990: 80 65 00 1c lwz r3,28(r5) ffc0a994: 80 e6 00 1c lwz r7,28(r6) { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0a998: 81 06 00 04 lwz r8,4(r6) ffc0a99c: 7c e3 3a 14 add r7,r3,r7 ffc0a9a0: 90 e5 00 1c stw r7,28(r5) rtems_chain_extract_unprotected(&b->chain_node); add_to_chain(free_chain, b); _RBTree_Extract_unprotected(chunk_tree, &b->tree_node); ffc0a9a4: 7c 83 23 78 mr r3,r4 ffc0a9a8: 38 86 00 08 addi r4,r6,8 next->previous = previous; previous->next = next; ffc0a9ac: 91 28 00 00 stw r9,0(r8) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0a9b0: 80 ea 00 00 lwz r7,0(r10) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc0a9b4: 91 09 00 04 stw r8,4(r9) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; ffc0a9b8: 90 ca 00 00 stw r6,0(r10) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0a9bc: 91 46 00 04 stw r10,4(r6) before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0a9c0: 90 e6 00 00 stw r7,0(r6) before_node->previous = the_node; ffc0a9c4: 90 c7 00 04 stw r6,4(r7) ffc0a9c8: 48 00 1f 94 b ffc0c95c <_RBTree_Extract_unprotected> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain( const Chain_Node *node ) { return (node->next == NULL) && (node->previous == NULL); ffc0a9cc: 81 06 00 04 lwz r8,4(r6) ffc0a9d0: 2f 88 00 00 cmpwi cr7,r8,0 ffc0a9d4: 40 9e ff 9c bne+ cr7,ffc0a970 <== NEVER TAKEN ffc0a9d8: 4e 80 00 20 blr =============================================================================== ffc05524 : #include #include int chroot( const char *path ) { ffc05524: 94 21 ff 90 stwu r1,-112(r1) /* * We use the global environment for path evaluation. This makes it possible * to escape from a chroot environment referencing an unmounted file system. */ rtems_filesystem_eval_path_start_with_root_and_current( ffc05528: 3c c0 00 00 lis r6,0 #include #include int chroot( const char *path ) { ffc0552c: 7c 08 02 a6 mflr r0 /* * We use the global environment for path evaluation. This makes it possible * to escape from a chroot environment referencing an unmounted file system. */ rtems_filesystem_eval_path_start_with_root_and_current( ffc05530: 38 c6 21 3c addi r6,r6,8508 #include #include int chroot( const char *path ) { ffc05534: 7c 64 1b 78 mr r4,r3 ffc05538: 93 c1 00 68 stw r30,104(r1) /* * We use the global environment for path evaluation. This makes it possible * to escape from a chroot environment referencing an unmounted file system. */ rtems_filesystem_eval_path_start_with_root_and_current( ffc0553c: 38 a0 00 19 li r5,25 ffc05540: 38 e6 ff fc addi r7,r6,-4 #include #include int chroot( const char *path ) { ffc05544: 90 01 00 74 stw r0,116(r1) /* * We use the global environment for path evaluation. This makes it possible * to escape from a chroot environment referencing an unmounted file system. */ rtems_filesystem_eval_path_start_with_root_and_current( ffc05548: 38 61 00 08 addi r3,r1,8 #include #include int chroot( const char *path ) { ffc0554c: 93 e1 00 6c stw r31,108(r1) /* * We use the global environment for path evaluation. This makes it possible * to escape from a chroot environment referencing an unmounted file system. */ rtems_filesystem_eval_path_start_with_root_and_current( ffc05550: 48 00 19 15 bl ffc06e64 ffc05554: 38 81 00 20 addi r4,r1,32 ffc05558: 38 61 00 40 addi r3,r1,64 ffc0555c: 48 00 1f 2d bl ffc07488 &rtems_global_user_env.root_directory, &rtems_global_user_env.current_directory ); rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc ); new_current_loc = rtems_filesystem_location_transform_to_global( &loc ); ffc05560: 38 61 00 40 addi r3,r1,64 ffc05564: 48 00 21 dd bl ffc07740 if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { ffc05568: 3f c0 ff c1 lis r30,-63 ffc0556c: 81 23 00 10 lwz r9,16(r3) ffc05570: 3b de 5a 0c addi r30,r30,23052 &rtems_global_user_env.root_directory, &rtems_global_user_env.current_directory ); rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc ); new_current_loc = rtems_filesystem_location_transform_to_global( &loc ); ffc05574: 90 61 00 58 stw r3,88(r1) if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { ffc05578: 7f 89 f0 00 cmpw cr7,r9,r30 ffc0557c: 41 9e 00 4c beq- cr7,ffc055c8 rtems_filesystem_global_location_t *new_root_loc = ffc05580: 38 61 00 58 addi r3,r1,88 ffc05584: 48 00 20 a5 bl ffc07628 rtems_filesystem_global_location_obtain( &new_current_loc ); rtems_filesystem_node_types_t type = (*new_root_loc->location.mt_entry->ops->node_type_h)( ffc05588: 81 23 00 14 lwz r9,20(r3) ); rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc ); new_current_loc = rtems_filesystem_location_transform_to_global( &loc ); if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { rtems_filesystem_global_location_t *new_root_loc = ffc0558c: 7c 7f 1b 78 mr r31,r3 rtems_filesystem_global_location_obtain( &new_current_loc ); rtems_filesystem_node_types_t type = (*new_root_loc->location.mt_entry->ops->node_type_h)( ffc05590: 81 29 00 0c lwz r9,12(r9) rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc ); new_current_loc = rtems_filesystem_location_transform_to_global( &loc ); if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { rtems_filesystem_global_location_t *new_root_loc = rtems_filesystem_global_location_obtain( &new_current_loc ); rtems_filesystem_node_types_t type = ffc05594: 81 29 00 14 lwz r9,20(r9) ffc05598: 7d 29 03 a6 mtctr r9 ffc0559c: 4e 80 04 21 bctrl (*new_root_loc->location.mt_entry->ops->node_type_h)( &new_root_loc->location ); if ( type == RTEMS_FILESYSTEM_DIRECTORY ) { ffc055a0: 2f 83 00 00 cmpwi cr7,r3,0 ffc055a4: 41 9e 00 50 beq- cr7,ffc055f4 static inline void rtems_filesystem_location_error( const rtems_filesystem_location_info_t *loc, int eno ) { if ( !rtems_filesystem_location_is_null( loc ) ) { ffc055a8: 81 3f 00 10 lwz r9,16(r31) ffc055ac: 7f 89 f0 00 cmpw cr7,r9,r30 ffc055b0: 41 9e 00 10 beq- cr7,ffc055c0 <== NEVER TAKEN errno = eno; ffc055b4: 48 00 99 89 bl ffc0ef3c <__errno> ffc055b8: 39 20 00 14 li r9,20 ffc055bc: 91 23 00 00 stw r9,0(r3) rtems_filesystem_location_error( &new_root_loc->location, ENOTDIR ); rv = -1; } if ( rv != 0 ) { rtems_filesystem_global_location_release( new_root_loc ); ffc055c0: 7f e3 fb 78 mr r3,r31 ffc055c4: 48 00 1f f1 bl ffc075b4 } } else { rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); ffc055c8: 38 61 00 08 addi r3,r1,8 ffc055cc: 48 00 1a 51 bl ffc0701c if ( rv != 0 ) { rtems_filesystem_global_location_release( new_current_loc ); ffc055d0: 80 61 00 58 lwz r3,88(r1) ffc055d4: 48 00 1f e1 bl ffc075b4 } return rv; } ffc055d8: 80 01 00 74 lwz r0,116(r1) ffc055dc: 83 c1 00 68 lwz r30,104(r1) } rtems_filesystem_eval_path_cleanup( &ctx ); if ( rv != 0 ) { rtems_filesystem_global_location_release( new_current_loc ); ffc055e0: 38 60 ff ff li r3,-1 } return rv; } ffc055e4: 7c 08 03 a6 mtlr r0 ffc055e8: 83 e1 00 6c lwz r31,108(r1) ffc055ec: 38 21 00 70 addi r1,r1,112 ffc055f0: 4e 80 00 20 blr (*new_root_loc->location.mt_entry->ops->node_type_h)( &new_root_loc->location ); if ( type == RTEMS_FILESYSTEM_DIRECTORY ) { sc = rtems_libio_set_private_env(); ffc055f4: 48 00 0f 61 bl ffc06554 if (sc == RTEMS_SUCCESSFUL) { ffc055f8: 2c 03 00 00 cmpwi r3,0 ffc055fc: 41 82 00 1c beq- ffc05618 rtems_filesystem_global_location_assign( &rtems_filesystem_current, new_current_loc ); } else { if (sc != RTEMS_UNSATISFIED) { ffc05600: 2f 83 00 0d cmpwi cr7,r3,13 ffc05604: 41 be ff bc beq- cr7,ffc055c0 <== NEVER TAKEN errno = ENOMEM; ffc05608: 48 00 99 35 bl ffc0ef3c <__errno> ffc0560c: 39 20 00 0c li r9,12 ffc05610: 91 23 00 00 stw r9,0(r3) ffc05614: 4b ff ff ac b ffc055c0 ); if ( type == RTEMS_FILESYSTEM_DIRECTORY ) { sc = rtems_libio_set_private_env(); if (sc == RTEMS_SUCCESSFUL) { rtems_filesystem_global_location_assign( ffc05618: 3f c0 00 00 lis r30,0 ffc0561c: 80 7e 27 68 lwz r3,10088(r30) ffc05620: 7f e4 fb 78 mr r4,r31 ffc05624: 38 63 00 04 addi r3,r3,4 ffc05628: 48 00 1f dd bl ffc07604 &rtems_filesystem_root, new_root_loc ); rtems_filesystem_global_location_assign( ffc0562c: 80 81 00 58 lwz r4,88(r1) ffc05630: 80 7e 27 68 lwz r3,10088(r30) ffc05634: 48 00 1f d1 bl ffc07604 } } else { rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); ffc05638: 38 61 00 08 addi r3,r1,8 ffc0563c: 48 00 19 e1 bl ffc0701c if ( rv != 0 ) { rtems_filesystem_global_location_release( new_current_loc ); } return rv; } ffc05640: 80 01 00 74 lwz r0,116(r1) ffc05644: 83 c1 00 68 lwz r30,104(r1) } } else { rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); ffc05648: 38 60 00 00 li r3,0 if ( rv != 0 ) { rtems_filesystem_global_location_release( new_current_loc ); } return rv; } ffc0564c: 7c 08 03 a6 mtlr r0 ffc05650: 83 e1 00 6c lwz r31,108(r1) ffc05654: 38 21 00 70 addi r1,r1,112 ffc05658: 4e 80 00 20 blr =============================================================================== ffc0925c : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { ffc0925c: 94 21 ff d8 stwu r1,-40(r1) ffc09260: 7c 08 02 a6 mflr r0 ffc09264: 93 a1 00 1c stw r29,28(r1) if ( !tp ) ffc09268: 7c 9d 23 79 mr. r29,r4 int clock_gettime( clockid_t clock_id, struct timespec *tp ) { ffc0926c: 90 01 00 2c stw r0,44(r1) ffc09270: 93 c1 00 20 stw r30,32(r1) ffc09274: 93 e1 00 24 stw r31,36(r1) if ( !tp ) ffc09278: 41 82 00 24 beq- ffc0929c rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { ffc0927c: 2f 83 00 01 cmpwi cr7,r3,1 ffc09280: 41 9e 00 9c beq- cr7,ffc0931c _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { ffc09284: 2f 83 00 04 cmpwi cr7,r3,4 ffc09288: 41 9e 00 6c beq- cr7,ffc092f4 <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { ffc0928c: 2f 83 00 02 cmpwi cr7,r3,2 ffc09290: 41 9e 00 64 beq- cr7,ffc092f4 return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) ffc09294: 2f 83 00 03 cmpwi cr7,r3,3 ffc09298: 41 9e 00 30 beq- cr7,ffc092c8 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); ffc0929c: 48 00 ad 11 bl ffc13fac <__errno> ffc092a0: 39 20 00 16 li r9,22 ffc092a4: 91 23 00 00 stw r9,0(r3) ffc092a8: 38 60 ff ff li r3,-1 return 0; } ffc092ac: 80 01 00 2c lwz r0,44(r1) ffc092b0: 83 a1 00 1c lwz r29,28(r1) ffc092b4: 7c 08 03 a6 mtlr r0 ffc092b8: 83 c1 00 20 lwz r30,32(r1) ffc092bc: 83 e1 00 24 lwz r31,36(r1) ffc092c0: 38 21 00 28 addi r1,r1,40 ffc092c4: 4e 80 00 20 blr } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); ffc092c8: 48 00 ac e5 bl ffc13fac <__errno> #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc092cc: 80 01 00 2c lwz r0,44(r1) } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); ffc092d0: 39 20 00 58 li r9,88 #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc092d4: 83 a1 00 1c lwz r29,28(r1) ffc092d8: 7c 08 03 a6 mtlr r0 } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); ffc092dc: 91 23 00 00 stw r9,0(r3) ffc092e0: 38 60 ff ff li r3,-1 #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc092e4: 83 c1 00 20 lwz r30,32(r1) ffc092e8: 83 e1 00 24 lwz r31,36(r1) ffc092ec: 38 21 00 28 addi r1,r1,40 ffc092f0: 4e 80 00 20 blr _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { _TOD_Get_uptime_as_timespec( tp ); ffc092f4: 7f a3 eb 78 mr r3,r29 ffc092f8: 48 00 28 29 bl ffc0bb20 <_TOD_Get_uptime_as_timespec> #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc092fc: 80 01 00 2c lwz r0,44(r1) ffc09300: 83 a1 00 1c lwz r29,28(r1) return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { _TOD_Get_uptime_as_timespec( tp ); return 0; ffc09304: 38 60 00 00 li r3,0 #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc09308: 7c 08 03 a6 mtlr r0 ffc0930c: 83 c1 00 20 lwz r30,32(r1) ffc09310: 83 e1 00 24 lwz r31,36(r1) ffc09314: 38 21 00 28 addi r1,r1,40 ffc09318: 4e 80 00 20 blr ) { Timestamp_Control tod_as_timestamp; Timestamp_Control *tod_as_timestamp_ptr; tod_as_timestamp_ptr = ffc0931c: 3c 80 00 00 lis r4,0 ffc09320: 38 84 2c a0 addi r4,r4,11424 ffc09324: 38 61 00 08 addi r3,r1,8 ffc09328: 48 00 27 75 bl ffc0ba9c <_TOD_Get_with_nanoseconds> static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); ffc0932c: 3c c0 3b 9a lis r6,15258 ffc09330: 83 e3 00 04 lwz r31,4(r3) ffc09334: 38 a0 00 00 li r5,0 ffc09338: 83 c3 00 00 lwz r30,0(r3) ffc0933c: 60 c6 ca 00 ori r6,r6,51712 ffc09340: 7f e4 fb 78 mr r4,r31 ffc09344: 7f c3 f3 78 mr r3,r30 ffc09348: 48 01 15 05 bl ffc1a84c <__divdi3> _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); ffc0934c: 3c c0 3b 9a lis r6,15258 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); ffc09350: 90 9d 00 00 stw r4,0(r29) _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); ffc09354: 38 a0 00 00 li r5,0 ffc09358: 60 c6 ca 00 ori r6,r6,51712 ffc0935c: 7f c3 f3 78 mr r3,r30 ffc09360: 7f e4 fb 78 mr r4,r31 ffc09364: 48 01 19 0d bl ffc1ac70 <__moddi3> if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); return 0; ffc09368: 38 60 00 00 li r3,0 ffc0936c: 90 9d 00 04 stw r4,4(r29) ffc09370: 4b ff ff 3c b ffc092ac =============================================================================== ffc2eb68 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { if ( !tp ) ffc2eb68: 2c 04 00 00 cmpwi r4,0 int clock_settime( clockid_t clock_id, const struct timespec *tp ) { ffc2eb6c: 94 21 ff e8 stwu r1,-24(r1) ffc2eb70: 7c 08 02 a6 mflr r0 ffc2eb74: 90 01 00 1c stw r0,28(r1) if ( !tp ) ffc2eb78: 41 82 00 1c beq- ffc2eb94 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { ffc2eb7c: 2f 83 00 01 cmpwi cr7,r3,1 ffc2eb80: 41 9e 00 34 beq- cr7,ffc2ebb4 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) ffc2eb84: 2f 83 00 02 cmpwi cr7,r3,2 ffc2eb88: 41 9e 00 9c beq- cr7,ffc2ec24 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) ffc2eb8c: 2f 83 00 03 cmpwi cr7,r3,3 ffc2eb90: 41 9e 00 94 beq- cr7,ffc2ec24 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); ffc2eb94: 48 01 4e 85 bl ffc43a18 <__errno> return 0; } ffc2eb98: 80 01 00 1c lwz r0,28(r1) #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); ffc2eb9c: 39 20 00 16 li r9,22 return 0; } ffc2eba0: 7c 08 03 a6 mtlr r0 #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); ffc2eba4: 91 23 00 00 stw r9,0(r3) ffc2eba8: 38 60 ff ff li r3,-1 return 0; } ffc2ebac: 38 21 00 18 addi r1,r1,24 ffc2ebb0: 4e 80 00 20 blr { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) ffc2ebb4: 81 24 00 00 lwz r9,0(r4) ffc2ebb8: 3d 40 21 da lis r10,8666 ffc2ebbc: 61 4a e4 ff ori r10,r10,58623 ffc2ebc0: 7f 89 50 40 cmplw cr7,r9,r10 ffc2ebc4: 40 bd ff d0 ble- cr7,ffc2eb94 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc2ebc8: 3d 20 00 00 lis r9,0 ffc2ebcc: 81 49 34 e4 lwz r10,13540(r9) ++level; ffc2ebd0: 39 4a 00 01 addi r10,r10,1 _Thread_Dispatch_disable_level = level; ffc2ebd4: 91 49 34 e4 stw r10,13540(r9) Timestamp64_Control *_time, Timestamp64_Control _seconds, Timestamp64_Control _nanoseconds ) { *_time = _seconds * 1000000000L + _nanoseconds; ffc2ebd8: 3c e0 3b 9a lis r7,15258 const struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _Timestamp_Set( ffc2ebdc: 80 c4 00 00 lwz r6,0(r4) ffc2ebe0: 60 e7 ca 00 ori r7,r7,51712 ffc2ebe4: 81 64 00 04 lwz r11,4(r4) ffc2ebe8: 7d 06 38 96 mulhw r8,r6,r7 ffc2ebec: 7d 26 39 d6 mullw r9,r6,r7 ffc2ebf0: 7d 6a fe 70 srawi r10,r11,31 ffc2ebf4: 7d 6b 48 14 addc r11,r11,r9 ffc2ebf8: 7d 4a 41 14 adde r10,r10,r8 ffc2ebfc: 7c 23 0b 78 mr r3,r1 ffc2ec00: 95 43 00 08 stwu r10,8(r3) ffc2ec04: 91 63 00 04 stw r11,4(r3) &tod_as_timestamp, tod_as_timespec->tv_sec, tod_as_timespec->tv_nsec ); _TOD_Set_with_timestamp( &tod_as_timestamp ); ffc2ec08: 48 00 14 35 bl ffc3003c <_TOD_Set_with_timestamp> rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); ffc2ec0c: 4b fd d6 d9 bl ffc0c2e4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; ffc2ec10: 38 60 00 00 li r3,0 } ffc2ec14: 80 01 00 1c lwz r0,28(r1) ffc2ec18: 38 21 00 18 addi r1,r1,24 ffc2ec1c: 7c 08 03 a6 mtlr r0 ffc2ec20: 4e 80 00 20 blr else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); ffc2ec24: 48 01 4d f5 bl ffc43a18 <__errno> #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc2ec28: 80 01 00 1c lwz r0,28(r1) else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); ffc2ec2c: 39 20 00 58 li r9,88 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc2ec30: 7c 08 03 a6 mtlr r0 else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) rtems_set_errno_and_return_minus_one( ENOSYS ); ffc2ec34: 91 23 00 00 stw r9,0(r3) ffc2ec38: 38 60 ff ff li r3,-1 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc2ec3c: 38 21 00 18 addi r1,r1,24 ffc2ec40: 4e 80 00 20 blr =============================================================================== ffc04728 : dev_t dev, const char *name, rtems_disk_device **dd_ptr, char **alloc_name_ptr ) { ffc04728: 94 21 ff d0 stwu r1,-48(r1) ffc0472c: 7c 08 02 a6 mflr r0 ffc04730: 93 e1 00 2c stw r31,44(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) { ffc04734: 3f e0 00 00 lis r31,0 dev_t dev, const char *name, rtems_disk_device **dd_ptr, char **alloc_name_ptr ) { ffc04738: 93 81 00 20 stw r28,32(r1) rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { ffc0473c: 83 9f 28 e0 lwz r28,10464(r31) dev_t dev, const char *name, rtems_disk_device **dd_ptr, char **alloc_name_ptr ) { ffc04740: 92 c1 00 08 stw r22,8(r1) ffc04744: 7c f6 3b 78 mr r22,r7 rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { ffc04748: 7f 83 e0 40 cmplw cr7,r3,r28 dev_t dev, const char *name, rtems_disk_device **dd_ptr, char **alloc_name_ptr ) { ffc0474c: 92 e1 00 0c stw r23,12(r1) ffc04750: 7c d7 33 78 mr r23,r6 ffc04754: 93 01 00 10 stw r24,16(r1) ffc04758: 7c b8 2b 78 mr r24,r5 ffc0475c: 93 21 00 14 stw r25,20(r1) rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { ffc04760: 3b 3f 28 e0 addi r25,r31,10464 dev_t dev, const char *name, rtems_disk_device **dd_ptr, char **alloc_name_ptr ) { ffc04764: 93 61 00 1c stw r27,28(r1) ffc04768: 7c 9b 23 78 mr r27,r4 ffc0476c: 93 a1 00 24 stw r29,36(r1) ffc04770: 7c 7d 1b 78 mr r29,r3 ffc04774: 90 01 00 34 stw r0,52(r1) ffc04778: 93 41 00 18 stw r26,24(r1) ffc0477c: 93 c1 00 28 stw r30,40(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) { ffc04780: 40 9c 01 0c bge- cr7,ffc0488c ffc04784: 83 d9 00 04 lwz r30,4(r25) memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab = table; disktab_size = new_size; } if (disktab [major].minor == NULL || minor >= disktab[major].size) { ffc04788: 57 a9 18 38 rlwinm r9,r29,3,0,28 ffc0478c: 7f fe 48 2e lwzx r31,r30,r9 ffc04790: 7f de 4a 14 add r30,r30,r9 ffc04794: 83 9e 00 04 lwz r28,4(r30) ffc04798: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0479c: 41 9e 00 60 beq- cr7,ffc047fc ffc047a0: 7f 9b e0 40 cmplw cr7,r27,r28 ffc047a4: 40 9c 00 58 bge- cr7,ffc047fc 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; ffc047a8: 57 69 10 3a rlwinm r9,r27,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) { ffc047ac: 7f df 4a 15 add. r30,r31,r9 ffc047b0: 41 82 00 a0 beq- ffc04850 <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { ffc047b4: 7d 3f 48 2e lwzx r9,r31,r9 return RTEMS_RESOURCE_IN_USE; ffc047b8: 38 60 00 0c li r3,12 if (dd_entry == NULL) { return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { ffc047bc: 2f 89 00 00 cmpwi cr7,r9,0 ffc047c0: 41 9e 01 2c beq- cr7,ffc048ec *dd_entry = dd; *dd_ptr = dd; *alloc_name_ptr = alloc_name; return RTEMS_SUCCESSFUL; } ffc047c4: 80 01 00 34 lwz r0,52(r1) ffc047c8: 82 c1 00 08 lwz r22,8(r1) ffc047cc: 7c 08 03 a6 mtlr r0 ffc047d0: 82 e1 00 0c lwz r23,12(r1) ffc047d4: 83 01 00 10 lwz r24,16(r1) ffc047d8: 83 21 00 14 lwz r25,20(r1) ffc047dc: 83 41 00 18 lwz r26,24(r1) ffc047e0: 83 61 00 1c lwz r27,28(r1) ffc047e4: 83 81 00 20 lwz r28,32(r1) ffc047e8: 83 a1 00 24 lwz r29,36(r1) ffc047ec: 83 c1 00 28 lwz r30,40(r1) ffc047f0: 83 e1 00 2c lwz r31,44(r1) ffc047f4: 38 21 00 30 addi r1,r1,48 ffc047f8: 4e 80 00 20 blr if (disktab [major].minor == NULL || minor >= disktab[major].size) { rtems_disk_device **table = disktab [major].minor; rtems_device_minor_number old_size = disktab [major].size; rtems_device_minor_number new_size = 0; if (old_size == 0) { ffc047fc: 2f 9c 00 00 cmpwi cr7,r28,0 new_size = DISKTAB_INITIAL_SIZE; ffc04800: 3b 40 00 08 li r26,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) { ffc04804: 40 9e 00 d8 bne- cr7,ffc048dc new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; } if (minor >= new_size) { ffc04808: 7f 9b d0 40 cmplw cr7,r27,r26 ffc0480c: 40 9c 00 c8 bge- cr7,ffc048d4 new_size = minor + 1; } table = realloc(table, new_size * sizeof(*table)); ffc04810: 7f e3 fb 78 mr r3,r31 ffc04814: 57 44 10 3a rlwinm r4,r26,2,0,29 ffc04818: 48 00 28 6d bl ffc07084 if (table == NULL) { ffc0481c: 7c 7f 1b 79 mr. r31,r3 ffc04820: 41 82 00 30 beq- ffc04850 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); ffc04824: 7c bc d0 50 subf r5,r28,r26 ffc04828: 57 83 10 3a rlwinm r3,r28,2,0,29 ffc0482c: 7c 7f 1a 14 add r3,r31,r3 ffc04830: 38 80 00 00 li r4,0 ffc04834: 54 a5 10 3a rlwinm r5,r5,2,0,29 ffc04838: 48 01 48 19 bl ffc19050 disktab [major].minor = table; disktab [major].size = new_size; } return disktab [major].minor + minor; ffc0483c: 57 69 10 3a rlwinm r9,r27,2,0,29 if (table == NULL) { return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab [major].minor = table; ffc04840: 93 fe 00 00 stw r31,0(r30) disktab [major].size = new_size; ffc04844: 93 5e 00 04 stw r26,4(r30) { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { ffc04848: 7f df 4a 15 add. r30,r31,r9 ffc0484c: 40 82 ff 68 bne+ ffc047b4 <== ALWAYS TAKEN alloc_name = strdup(name); if (alloc_name == NULL) { free(dd); return RTEMS_NO_MEMORY; ffc04850: 38 60 00 1a li r3,26 *dd_entry = dd; *dd_ptr = dd; *alloc_name_ptr = alloc_name; return RTEMS_SUCCESSFUL; } ffc04854: 80 01 00 34 lwz r0,52(r1) ffc04858: 82 c1 00 08 lwz r22,8(r1) ffc0485c: 7c 08 03 a6 mtlr r0 ffc04860: 82 e1 00 0c lwz r23,12(r1) ffc04864: 83 01 00 10 lwz r24,16(r1) ffc04868: 83 21 00 14 lwz r25,20(r1) ffc0486c: 83 41 00 18 lwz r26,24(r1) ffc04870: 83 61 00 1c lwz r27,28(r1) ffc04874: 83 81 00 20 lwz r28,32(r1) ffc04878: 83 a1 00 24 lwz r29,36(r1) ffc0487c: 83 c1 00 28 lwz r30,40(r1) ffc04880: 83 e1 00 2c lwz r31,44(r1) ffc04884: 38 21 00 30 addi r1,r1,48 ffc04888: 4e 80 00 20 blr rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { rtems_disk_device_table *table = disktab; rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; ffc0488c: 57 9a 08 3c rlwinm r26,r28,1,0,30 if (major >= new_size) { ffc04890: 7f 83 d0 40 cmplw cr7,r3,r26 rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { rtems_disk_device_table *table = disktab; ffc04894: 80 79 00 04 lwz r3,4(r25) rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; if (major >= new_size) { ffc04898: 41 9c 00 08 blt- cr7,ffc048a0 <== NEVER TAKEN new_size = major + 1; ffc0489c: 3b 5d 00 01 addi r26,r29,1 } table = realloc(table, new_size * sizeof(*table)); ffc048a0: 57 44 18 38 rlwinm r4,r26,3,0,28 ffc048a4: 48 00 27 e1 bl ffc07084 if (table == NULL) { ffc048a8: 7c 7e 1b 79 mr. r30,r3 ffc048ac: 41 a2 ff a4 beq- ffc04850 <== ALWAYS TAKEN return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); ffc048b0: 7c bc d0 50 subf r5,r28,r26 <== NOT EXECUTED ffc048b4: 57 83 18 38 rlwinm r3,r28,3,0,28 <== NOT EXECUTED ffc048b8: 7c 7e 1a 14 add r3,r30,r3 <== NOT EXECUTED ffc048bc: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc048c0: 54 a5 18 38 rlwinm r5,r5,3,0,28 <== NOT EXECUTED ffc048c4: 48 01 47 8d bl ffc19050 <== NOT EXECUTED disktab = table; ffc048c8: 93 d9 00 04 stw r30,4(r25) <== NOT EXECUTED disktab_size = new_size; ffc048cc: 93 5f 28 e0 stw r26,10464(r31) <== NOT EXECUTED ffc048d0: 4b ff fe b8 b ffc04788 <== NOT EXECUTED new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; } if (minor >= new_size) { new_size = minor + 1; ffc048d4: 3b 5b 00 01 addi r26,r27,1 ffc048d8: 4b ff ff 38 b ffc04810 rtems_device_minor_number new_size = 0; if (old_size == 0) { new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; ffc048dc: 57 9a 08 3c rlwinm r26,r28,1,0,30 } if (minor >= new_size) { ffc048e0: 7f 9b d0 40 cmplw cr7,r27,r26 ffc048e4: 41 bc ff 2c blt- cr7,ffc04810 <== ALWAYS TAKEN ffc048e8: 4b ff ff ec b ffc048d4 <== NOT EXECUTED if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); ffc048ec: 38 60 00 78 li r3,120 ffc048f0: 48 00 1a 79 bl ffc06368 if (dd == NULL) { ffc048f4: 7c 7f 1b 79 mr. r31,r3 ffc048f8: 41 a2 ff 58 beq- ffc04850 <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (name != NULL) { ffc048fc: 2f 98 00 00 cmpwi cr7,r24,0 ffc04900: 41 9e 00 48 beq- cr7,ffc04948 alloc_name = strdup(name); ffc04904: 7f 03 c3 78 mr r3,r24 ffc04908: 48 01 4a 75 bl ffc1937c if (alloc_name == NULL) { ffc0490c: 2f 83 00 00 cmpwi cr7,r3,0 if (dd == NULL) { return RTEMS_NO_MEMORY; } if (name != NULL) { alloc_name = strdup(name); ffc04910: 7c 7c 1b 78 mr r28,r3 ffc04914: 7c 7a 1b 78 mr r26,r3 if (alloc_name == NULL) { ffc04918: 41 9e 00 50 beq- cr7,ffc04968 <== NEVER TAKEN return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { ffc0491c: 38 80 61 ff li r4,25087 ffc04920: 7f a5 eb 78 mr r5,r29 ffc04924: 7f 66 db 78 mr r6,r27 ffc04928: 48 00 1c 11 bl ffc06538 ffc0492c: 2f 83 00 00 cmpwi cr7,r3,0 ffc04930: 41 9c 00 20 blt- cr7,ffc04950 <== NEVER TAKEN free(dd); return RTEMS_UNSATISFIED; } } *dd_entry = dd; ffc04934: 93 fe 00 00 stw r31,0(r30) *dd_ptr = dd; *alloc_name_ptr = alloc_name; return RTEMS_SUCCESSFUL; ffc04938: 38 60 00 00 li r3,0 return RTEMS_UNSATISFIED; } } *dd_entry = dd; *dd_ptr = dd; ffc0493c: 93 f7 00 00 stw r31,0(r23) *alloc_name_ptr = alloc_name; ffc04940: 93 56 00 00 stw r26,0(r22) return RTEMS_SUCCESSFUL; ffc04944: 4b ff fe 80 b ffc047c4 char **alloc_name_ptr ) { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; ffc04948: 3b 40 00 00 li r26,0 ffc0494c: 4b ff ff e8 b ffc04934 } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); ffc04950: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc04954: 48 00 13 c5 bl ffc05d18 <== NOT EXECUTED free(dd); ffc04958: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0495c: 48 00 13 bd bl ffc05d18 <== NOT EXECUTED return RTEMS_UNSATISFIED; ffc04960: 38 60 00 0d li r3,13 <== NOT EXECUTED ffc04964: 4b ff fe 60 b ffc047c4 <== NOT EXECUTED if (name != NULL) { alloc_name = strdup(name); if (alloc_name == NULL) { free(dd); ffc04968: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0496c: 48 00 13 ad bl ffc05d18 <== NOT EXECUTED return RTEMS_NO_MEMORY; ffc04970: 38 60 00 1a li r3,26 <== NOT EXECUTED ffc04974: 4b ff fe e0 b ffc04854 <== NOT EXECUTED =============================================================================== ffc06890 : * RTEMS_SUCCESSFUL, if success; * RTEMS_NO_MEMOTY, if cannot allocate memory for part_desc_t strucure; * RTEMS_INTERNAL_ERROR, if other error occurs. */ static rtems_status_code data_to_part_desc(uint8_t *data, rtems_part_desc_t **new_part_desc) ffc06890: 94 21 ff e8 stwu r1,-24(r1) ffc06894: 7c 08 02 a6 mflr r0 if (new_part_desc == NULL) { return RTEMS_INTERNAL_ERROR; } *new_part_desc = NULL; ffc06898: 39 20 00 00 li r9,0 * RTEMS_SUCCESSFUL, if success; * RTEMS_NO_MEMOTY, if cannot allocate memory for part_desc_t strucure; * RTEMS_INTERNAL_ERROR, if other error occurs. */ static rtems_status_code data_to_part_desc(uint8_t *data, rtems_part_desc_t **new_part_desc) ffc0689c: 93 a1 00 0c stw r29,12(r1) ffc068a0: 7c 9d 23 78 mr r29,r4 ffc068a4: 93 c1 00 10 stw r30,16(r1) ffc068a8: 7c 7e 1b 78 mr r30,r3 return RTEMS_INTERNAL_ERROR; } *new_part_desc = NULL; if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) ffc068ac: 38 60 00 01 li r3,1 * RTEMS_SUCCESSFUL, if success; * RTEMS_NO_MEMOTY, if cannot allocate memory for part_desc_t strucure; * RTEMS_INTERNAL_ERROR, if other error occurs. */ static rtems_status_code data_to_part_desc(uint8_t *data, rtems_part_desc_t **new_part_desc) ffc068b0: 93 e1 00 14 stw r31,20(r1) ffc068b4: 90 01 00 1c stw r0,28(r1) if (new_part_desc == NULL) { return RTEMS_INTERNAL_ERROR; } *new_part_desc = NULL; ffc068b8: 91 24 00 00 stw r9,0(r4) if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) ffc068bc: 38 80 00 28 li r4,40 ffc068c0: 48 00 10 05 bl ffc078c4 ffc068c4: 7c 7f 1b 79 mr. r31,r3 ffc068c8: 41 82 00 c0 beq- ffc06988 <== NEVER TAKEN { return RTEMS_NO_MEMORY; } part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET); ffc068cc: 89 3e 00 00 lbz r9,0(r30) ffc068d0: 99 3f 00 00 stb r9,0(r31) part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET); ffc068d4: 88 9e 00 04 lbz r4,4(r30) ffc068d8: 98 9f 00 01 stb r4,1(r31) uint32_t value ) { uint32_t swapped; __asm__ volatile("rlwimi %0,%1,8,24,31;" ffc068dc: 81 5e 00 08 lwz r10,8(r30) ffc068e0: 51 48 46 3e rlwimi r8,r10,8,24,31 ffc068e4: 51 48 c4 2e rlwimi r8,r10,24,16,23 ffc068e8: 51 48 42 1e rlwimi r8,r10,8,8,15 ffc068ec: 51 48 c0 0e rlwimi r8,r10,24,0,7 /* read the offset start position and partition size in sectors */ /* due to incorrect data alignment one have to align data first */ memcpy(&temp, data + RTEMS_IDE_PARTITION_START_OFFSET, sizeof(uint32_t)); part_desc->start = LE_TO_CPU_U32(temp); ffc068f0: 91 1f 00 04 stw r8,4(r31) ffc068f4: 81 5e 00 0c lwz r10,12(r30) ffc068f8: 51 5e 46 3e rlwimi r30,r10,8,24,31 ffc068fc: 51 5e c4 2e rlwimi r30,r10,24,16,23 ffc06900: 51 5e 42 1e rlwimi r30,r10,8,8,15 ffc06904: 51 5e c0 0e rlwimi r30,r10,24,0,7 * true if partition type is extended, false otherwise */ static bool is_extended(uint8_t type) { return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED)); ffc06908: 2f 84 00 05 cmpwi cr7,r4,5 /* due to incorrect data alignment one have to align data first */ memcpy(&temp, data + RTEMS_IDE_PARTITION_START_OFFSET, sizeof(uint32_t)); part_desc->start = LE_TO_CPU_U32(temp); memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(uint32_t)); part_desc->size = LE_TO_CPU_U32(temp); ffc0690c: 93 df 00 08 stw r30,8(r31) * true if partition type is extended, false otherwise */ static bool is_extended(uint8_t type) { return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED)); ffc06910: 41 9e 00 54 beq- cr7,ffc06964 ffc06914: 2f 84 00 85 cmpwi cr7,r4,133 ffc06918: 41 9e 00 4c beq- cr7,ffc06964 <== NEVER TAKEN DOS_P32MB_PARTITION, FAT32_PARTITION ,FAT32_LBA_PARTITION, FAT16_LBA_PARTITION }; return (NULL != memchr(fat_part_types,type,sizeof(fat_part_types))); ffc0691c: 3c 60 ff c3 lis r3,-61 ffc06920: 38 63 9f c0 addi r3,r3,-24640 ffc06924: 38 a0 00 06 li r5,6 ffc06928: 48 01 43 29 bl ffc1ac50 * use partitions that are * - extended * or * - FAT type and non-zero */ if (is_extended(part_desc->sys_type) || ffc0692c: 2f 83 00 00 cmpwi cr7,r3,0 ffc06930: 41 9e 00 0c beq- cr7,ffc0693c ((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) { ffc06934: 2f 9e 00 00 cmpwi cr7,r30,0 ffc06938: 40 9e 00 2c bne- cr7,ffc06964 <== ALWAYS TAKEN *new_part_desc = part_desc; } else { /* empty partition */ free(part_desc); ffc0693c: 7f e3 fb 78 mr r3,r31 ffc06940: 48 00 10 95 bl ffc079d4 } return RTEMS_SUCCESSFUL; } ffc06944: 80 01 00 1c lwz r0,28(r1) ffc06948: 83 a1 00 0c lwz r29,12(r1) } else { /* empty partition */ free(part_desc); } return RTEMS_SUCCESSFUL; ffc0694c: 38 60 00 00 li r3,0 } ffc06950: 7c 08 03 a6 mtlr r0 ffc06954: 83 c1 00 10 lwz r30,16(r1) ffc06958: 83 e1 00 14 lwz r31,20(r1) ffc0695c: 38 21 00 18 addi r1,r1,24 ffc06960: 4e 80 00 20 blr ffc06964: 80 01 00 1c lwz r0,28(r1) } else { /* empty partition */ free(part_desc); } return RTEMS_SUCCESSFUL; ffc06968: 38 60 00 00 li r3,0 * or * - FAT type and non-zero */ if (is_extended(part_desc->sys_type) || ((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) { *new_part_desc = part_desc; ffc0696c: 93 fd 00 00 stw r31,0(r29) else { /* empty partition */ free(part_desc); } return RTEMS_SUCCESSFUL; } ffc06970: 7c 08 03 a6 mtlr r0 ffc06974: 83 a1 00 0c lwz r29,12(r1) ffc06978: 83 c1 00 10 lwz r30,16(r1) ffc0697c: 83 e1 00 14 lwz r31,20(r1) ffc06980: 38 21 00 18 addi r1,r1,24 ffc06984: 4e 80 00 20 blr ffc06988: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED *new_part_desc = NULL; if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) { return RTEMS_NO_MEMORY; ffc0698c: 38 60 00 1a li r3,26 <== NOT EXECUTED else { /* empty partition */ free(part_desc); } return RTEMS_SUCCESSFUL; } ffc06990: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc06994: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc06998: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc0699c: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc069a0: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc069a4: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc03d38 : #include "devfs.h" void devFS_Show(void) { rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; ffc03d38: 3d 20 00 00 lis r9,0 ffc03d3c: 81 29 27 b4 lwz r9,10164(r9) if (rootloc->mt_entry->ops == &devFS_ops) { ffc03d40: 3d 00 ff c1 lis r8,-63 ffc03d44: 39 08 63 10 addi r8,r8,25360 ffc03d48: 81 29 00 04 lwz r9,4(r9) ffc03d4c: 81 29 00 14 lwz r9,20(r9) ffc03d50: 81 49 00 0c lwz r10,12(r9) ffc03d54: 7f 8a 40 00 cmpw cr7,r10,r8 ffc03d58: 4c be 00 20 bnelr+ cr7 #endif #include "devfs.h" void devFS_Show(void) { ffc03d5c: 94 21 ff d8 stwu r1,-40(r1) ffc03d60: 7c 08 02 a6 mflr r0 ffc03d64: 90 01 00 2c stw r0,44(r1) static inline const devFS_data *devFS_get_data( const rtems_filesystem_location_info_t *loc ) { return (const devFS_data *) loc->mt_entry->immutable_fs_info; ffc03d68: 81 29 00 10 lwz r9,16(r9) ffc03d6c: 93 41 00 10 stw r26,16(r1) rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; if (rootloc->mt_entry->ops == &devFS_ops) { const devFS_data *data = devFS_get_data(rootloc); size_t i = 0; size_t n = data->count; ffc03d70: 83 49 00 04 lwz r26,4(r9) #endif #include "devfs.h" void devFS_Show(void) { ffc03d74: 93 c1 00 20 stw r30,32(r1) const devFS_data *data = devFS_get_data(rootloc); size_t i = 0; size_t n = data->count; devFS_node *nodes = data->nodes; for (i = 0; i < n; ++i) { ffc03d78: 2f 9a 00 00 cmpwi cr7,r26,0 #endif #include "devfs.h" void devFS_Show(void) { ffc03d7c: 93 01 00 08 stw r24,8(r1) ffc03d80: 93 21 00 0c stw r25,12(r1) ffc03d84: 93 61 00 14 stw r27,20(r1) ffc03d88: 93 81 00 18 stw r28,24(r1) ffc03d8c: 93 a1 00 1c stw r29,28(r1) ffc03d90: 93 e1 00 24 stw r31,36(r1) if (rootloc->mt_entry->ops == &devFS_ops) { const devFS_data *data = devFS_get_data(rootloc); size_t i = 0; size_t n = data->count; devFS_node *nodes = data->nodes; ffc03d94: 83 c9 00 00 lwz r30,0(r9) for (i = 0; i < n; ++i) { ffc03d98: 41 9e 00 8c beq- cr7,ffc03e24 <== NEVER TAKEN if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); ffc03d9c: 3f 00 ff c1 lis r24,-63 ffc03da0: 3f 80 ff c1 lis r28,-63 for (j = 0; j < m; ++j) { printk("%c", current->name [j]); } printk( ffc03da4: 3f 20 ff c1 lis r25,-63 const devFS_data *data = devFS_get_data(rootloc); size_t i = 0; size_t n = data->count; devFS_node *nodes = data->nodes; for (i = 0; i < n; ++i) { ffc03da8: 3b 60 00 00 li r27,0 if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); ffc03dac: 3b 18 63 90 addi r24,r24,25488 ffc03db0: 3b 9c 63 a0 addi r28,r28,25504 for (j = 0; j < m; ++j) { printk("%c", current->name [j]); } printk( ffc03db4: 3b 39 63 94 addi r25,r25,25492 devFS_node *nodes = data->nodes; for (i = 0; i < n; ++i) { devFS_node *current = nodes + i; if (current->name != NULL) { ffc03db8: 81 3e 00 00 lwz r9,0(r30) ffc03dbc: 2f 89 00 00 cmpwi cr7,r9,0 ffc03dc0: 41 9e 00 54 beq- cr7,ffc03e14 size_t j = 0; size_t m = current->namelen; ffc03dc4: 83 be 00 04 lwz r29,4(r30) printk("/"); ffc03dc8: 7f 03 c3 78 mr r3,r24 ffc03dcc: 4c c6 31 82 crclr 4*cr1+eq ffc03dd0: 48 00 12 8d bl ffc0505c for (j = 0; j < m; ++j) { ffc03dd4: 3b e0 00 00 li r31,0 ffc03dd8: 2f 9d 00 00 cmpwi cr7,r29,0 ffc03ddc: 41 9e 00 24 beq- cr7,ffc03e00 <== NEVER TAKEN printk("%c", current->name [j]); ffc03de0: 81 3e 00 00 lwz r9,0(r30) ffc03de4: 7f 83 e3 78 mr r3,r28 ffc03de8: 7c 89 f8 ae lbzx r4,r9,r31 if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); for (j = 0; j < m; ++j) { ffc03dec: 3b ff 00 01 addi r31,r31,1 printk("%c", current->name [j]); ffc03df0: 4c c6 31 82 crclr 4*cr1+eq ffc03df4: 48 00 12 69 bl ffc0505c if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); for (j = 0; j < m; ++j) { ffc03df8: 7f 9f e8 00 cmpw cr7,r31,r29 ffc03dfc: 40 9e ff e4 bne+ cr7,ffc03de0 printk("%c", current->name [j]); } printk( ffc03e00: 80 9e 00 08 lwz r4,8(r30) ffc03e04: 7f 23 cb 78 mr r3,r25 ffc03e08: 80 be 00 0c lwz r5,12(r30) ffc03e0c: 4c c6 31 82 crclr 4*cr1+eq ffc03e10: 48 00 12 4d bl ffc0505c const devFS_data *data = devFS_get_data(rootloc); size_t i = 0; size_t n = data->count; devFS_node *nodes = data->nodes; for (i = 0; i < n; ++i) { ffc03e14: 3b 7b 00 01 addi r27,r27,1 ffc03e18: 7f 9b d0 00 cmpw cr7,r27,r26 ffc03e1c: 3b de 00 14 addi r30,r30,20 ffc03e20: 40 9e ff 98 bne+ cr7,ffc03db8 (unsigned long) current->minor ); } } } } ffc03e24: 80 01 00 2c lwz r0,44(r1) ffc03e28: 83 01 00 08 lwz r24,8(r1) ffc03e2c: 7c 08 03 a6 mtlr r0 ffc03e30: 83 21 00 0c lwz r25,12(r1) ffc03e34: 83 41 00 10 lwz r26,16(r1) ffc03e38: 83 61 00 14 lwz r27,20(r1) ffc03e3c: 83 81 00 18 lwz r28,24(r1) ffc03e40: 83 a1 00 1c lwz r29,28(r1) ffc03e44: 83 c1 00 20 lwz r30,32(r1) ffc03e48: 83 e1 00 24 lwz r31,36(r1) ffc03e4c: 38 21 00 28 addi r1,r1,40 ffc03e50: 4e 80 00 20 blr =============================================================================== ffc0df94 : } void devFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { ffc0df94: 94 21 ff d8 stwu r1,-40(r1) ffc0df98: 7c 08 02 a6 mflr r0 ffc0df9c: 90 01 00 2c stw r0,44(r1) static inline const devFS_data *devFS_get_data( const rtems_filesystem_location_info_t *loc ) { return (const devFS_data *) loc->mt_entry->immutable_fs_info; ffc0dfa0: 81 23 00 2c lwz r9,44(r3) ffc0dfa4: 93 01 00 08 stw r24,8(r1) ffc0dfa8: 81 29 00 10 lwz r9,16(r9) ffc0dfac: 93 21 00 0c stw r25,12(r1) ffc0dfb0: 7c 79 1b 78 mr r25,r3 ffc0dfb4: 93 41 00 10 stw r26,16(r1) ffc0dfb8: 93 61 00 14 stw r27,20(r1) ffc0dfbc: 93 81 00 18 stw r28,24(r1) ) { size_t i = 0; size_t n = data->count; devFS_node *nodes = data->nodes; devFS_node *node = NULL; ffc0dfc0: 3b 80 00 00 li r28,0 } void devFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { ffc0dfc4: 93 a1 00 1c stw r29,28(r1) size_t n = data->count; devFS_node *nodes = data->nodes; devFS_node *node = NULL; devFS_node *free_node = NULL; for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { ffc0dfc8: 3b a0 00 00 li r29,0 } void devFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { ffc0dfcc: 93 e1 00 24 stw r31,36(r1) size_t pathlen, devFS_node **free_node_ptr ) { size_t i = 0; size_t n = data->count; ffc0dfd0: 83 49 00 04 lwz r26,4(r9) ffc0dfd4: 83 e9 00 00 lwz r31,0(r9) devFS_node *nodes = data->nodes; devFS_node *node = NULL; devFS_node *free_node = NULL; ffc0dfd8: 39 20 00 00 li r9,0 } void devFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { ffc0dfdc: 93 c1 00 20 stw r30,32(r1) } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } ffc0dfe0: 83 03 00 00 lwz r24,0(r3) ffc0dfe4: 83 63 00 04 lwz r27,4(r3) ffc0dfe8: 48 00 00 1c b ffc0e004 size_t n = data->count; devFS_node *nodes = data->nodes; devFS_node *node = NULL; devFS_node *free_node = NULL; for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { ffc0dfec: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0dff0: 2f 1c 00 00 cmpwi cr6,r28,0 ffc0dff4: 3b ff 00 14 addi r31,r31,20 ffc0dff8: 7f c9 f3 78 mr r9,r30 ffc0dffc: 41 9e 00 08 beq- cr7,ffc0e004 <== NEVER TAKEN ffc0e000: 40 9a 00 98 bne- cr6,ffc0e098 ffc0e004: 7f 9d d0 00 cmpw cr7,r29,r26 devFS_node *current = nodes + i; ffc0e008: 7f fe fb 78 mr r30,r31 size_t n = data->count; devFS_node *nodes = data->nodes; devFS_node *node = NULL; devFS_node *free_node = NULL; for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { ffc0e00c: 3b bd 00 01 addi r29,r29,1 ffc0e010: 41 9e 00 3c beq- cr7,ffc0e04c devFS_node *current = nodes + i; if (current->name != NULL) { ffc0e014: 80 7f 00 00 lwz r3,0(r31) ffc0e018: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e01c: 41 be ff d0 beq- cr7,ffc0dfec if ( ffc0e020: 81 5f 00 04 lwz r10,4(r31) ffc0e024: 7d 3e 4b 78 mr r30,r9 ffc0e028: 7f 9b 50 00 cmpw cr7,r27,r10 ffc0e02c: 40 9e ff c0 bne+ cr7,ffc0dfec current->namelen == pathlen && memcmp(current->name, path, pathlen) == 0 ffc0e030: 7f 04 c3 78 mr r4,r24 ffc0e034: 7f 65 db 78 mr r5,r27 ffc0e038: 48 00 37 05 bl ffc1173c ffc0e03c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e040: 40 be ff ac bne- cr7,ffc0dfec ffc0e044: 7f fc fb 78 mr r28,r31 ffc0e048: 4b ff ff a4 b ffc0dfec rtems_filesystem_eval_path_get_pathlen(ctx), &free_node ); int eval_flags = rtems_filesystem_eval_path_get_flags(ctx); if (node != NULL) { ffc0e04c: 2f 9c 00 00 cmpwi cr7,r28,0 } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } ffc0e050: 81 59 00 10 lwz r10,16(r25) rtems_filesystem_eval_path_get_pathlen(ctx), &free_node ); int eval_flags = rtems_filesystem_eval_path_get_flags(ctx); if (node != NULL) { ffc0e054: 41 9e 00 88 beq- cr7,ffc0e0dc <== ALWAYS TAKEN if ((eval_flags & RTEMS_FS_EXCLUSIVE) == 0) { ffc0e058: 71 49 00 40 andi. r9,r10,64 <== NOT EXECUTED ffc0e05c: 40 82 00 48 bne- ffc0e0a4 <== NOT EXECUTED } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } ffc0e060: 80 01 00 2c lwz r0,44(r1) ); int eval_flags = rtems_filesystem_eval_path_get_flags(ctx); if (node != NULL) { if ((eval_flags & RTEMS_FS_EXCLUSIVE) == 0) { currentloc->node_access = node; ffc0e064: 93 99 00 20 stw r28,32(r25) } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } ffc0e068: 7c 08 03 a6 mtlr r0 static inline void rtems_filesystem_eval_path_clear_path( rtems_filesystem_eval_path_context_t *ctx ) { ctx->pathlen = 0; ffc0e06c: 91 39 00 04 stw r9,4(r25) ffc0e070: 83 01 00 08 lwz r24,8(r1) ffc0e074: 83 21 00 0c lwz r25,12(r1) ffc0e078: 83 41 00 10 lwz r26,16(r1) ffc0e07c: 83 61 00 14 lwz r27,20(r1) ffc0e080: 83 81 00 18 lwz r28,24(r1) ffc0e084: 83 a1 00 1c lwz r29,28(r1) ffc0e088: 83 c1 00 20 lwz r30,32(r1) ffc0e08c: 83 e1 00 24 lwz r31,36(r1) ffc0e090: 38 21 00 28 addi r1,r1,40 ffc0e094: 4e 80 00 20 blr ffc0e098: 81 59 00 10 lwz r10,16(r25) &free_node ); int eval_flags = rtems_filesystem_eval_path_get_flags(ctx); if (node != NULL) { if ((eval_flags & RTEMS_FS_EXCLUSIVE) == 0) { ffc0e09c: 71 49 00 40 andi. r9,r10,64 ffc0e0a0: 41 82 ff c0 beq+ ffc0e060 currentloc->node_access = node; rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, EEXIST); ffc0e0a4: 7f 23 cb 78 mr r3,r25 ffc0e0a8: 38 80 00 11 li r4,17 } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } ffc0e0ac: 80 01 00 2c lwz r0,44(r1) ffc0e0b0: 83 01 00 08 lwz r24,8(r1) ffc0e0b4: 7c 08 03 a6 mtlr r0 ffc0e0b8: 83 21 00 0c lwz r25,12(r1) ffc0e0bc: 83 41 00 10 lwz r26,16(r1) ffc0e0c0: 83 61 00 14 lwz r27,20(r1) ffc0e0c4: 83 81 00 18 lwz r28,24(r1) ffc0e0c8: 83 a1 00 1c lwz r29,28(r1) ffc0e0cc: 83 c1 00 20 lwz r30,32(r1) ffc0e0d0: 83 e1 00 24 lwz r31,36(r1) ffc0e0d4: 38 21 00 28 addi r1,r1,40 rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, ENOSPC); } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); ffc0e0d8: 4b ff 7a f8 b ffc05bd0 rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, EEXIST); } } else { if ((eval_flags & RTEMS_FS_MAKE) != 0) { ffc0e0dc: 71 48 00 20 andi. r8,r10,32 ffc0e0e0: 41 82 00 54 beq- ffc0e134 <== NEVER TAKEN if (free_node != NULL) { ffc0e0e4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0e0e8: 41 9e 00 58 beq- cr7,ffc0e140 } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } ffc0e0ec: 80 01 00 2c lwz r0,44(r1) rtems_filesystem_eval_path_error(ctx, EEXIST); } } else { if ((eval_flags & RTEMS_FS_MAKE) != 0) { if (free_node != NULL) { free_node->mode = S_IRWXU | S_IRWXG | S_IRWXO; ffc0e0f0: 39 40 01 ff li r10,511 ffc0e0f4: 91 49 00 10 stw r10,16(r9) } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } ffc0e0f8: 7c 08 03 a6 mtlr r0 rtems_filesystem_eval_path_context_t *ctx, const char *token, size_t tokenlen ) { ctx->token = token; ffc0e0fc: 93 19 00 08 stw r24,8(r25) ctx->tokenlen = tokenlen; ffc0e100: 93 79 00 0c stw r27,12(r25) static inline void rtems_filesystem_eval_path_clear_path( rtems_filesystem_eval_path_context_t *ctx ) { ctx->pathlen = 0; ffc0e104: 93 99 00 04 stw r28,4(r25) } } else { if ((eval_flags & RTEMS_FS_MAKE) != 0) { if (free_node != NULL) { free_node->mode = S_IRWXU | S_IRWXG | S_IRWXO; currentloc->node_access = free_node; ffc0e108: 91 39 00 20 stw r9,32(r25) } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } ffc0e10c: 83 01 00 08 lwz r24,8(r1) ffc0e110: 83 21 00 0c lwz r25,12(r1) ffc0e114: 83 41 00 10 lwz r26,16(r1) ffc0e118: 83 61 00 14 lwz r27,20(r1) ffc0e11c: 83 81 00 18 lwz r28,24(r1) ffc0e120: 83 a1 00 1c lwz r29,28(r1) ffc0e124: 83 c1 00 20 lwz r30,32(r1) ffc0e128: 83 e1 00 24 lwz r31,36(r1) ffc0e12c: 38 21 00 28 addi r1,r1,40 ffc0e130: 4e 80 00 20 blr rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, ENOSPC); } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); ffc0e134: 7f 23 cb 78 mr r3,r25 <== NOT EXECUTED ffc0e138: 38 80 00 02 li r4,2 <== NOT EXECUTED ffc0e13c: 4b ff ff 70 b ffc0e0ac <== NOT EXECUTED rtems_filesystem_eval_path_get_path(ctx), rtems_filesystem_eval_path_get_pathlen(ctx) ); rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, ENOSPC); ffc0e140: 7f 23 cb 78 mr r3,r25 ffc0e144: 38 80 00 1c li r4,28 ffc0e148: 4b ff ff 64 b ffc0e0ac =============================================================================== ffc04514 : dev_t dev ) { int rv = 0; if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') { ffc04514: 2f 85 00 03 cmpwi cr7,r5,3 const char *name, size_t namelen, mode_t mode, dev_t dev ) { ffc04518: 94 21 ff d8 stwu r1,-40(r1) ffc0451c: 7c 08 02 a6 mflr r0 ffc04520: 93 61 00 14 stw r27,20(r1) ffc04524: 7d 1b 43 78 mr r27,r8 ffc04528: 93 81 00 18 stw r28,24(r1) ffc0452c: 7c fc 3b 78 mr r28,r7 ffc04530: 93 a1 00 1c stw r29,28(r1) ffc04534: 7c 7d 1b 78 mr r29,r3 ffc04538: 93 c1 00 20 stw r30,32(r1) ffc0453c: 7c de 33 78 mr r30,r6 ffc04540: 93 e1 00 24 stw r31,36(r1) ffc04544: 7c bf 2b 78 mr r31,r5 ffc04548: 90 01 00 2c stw r0,44(r1) int rv = 0; if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') { ffc0454c: 41 9e 00 78 beq- cr7,ffc045c4 if (S_ISBLK(mode) || S_ISCHR(mode)) { ffc04550: 57 c9 04 26 rlwinm r9,r30,0,16,19 ffc04554: 2f 89 60 00 cmpwi cr7,r9,24576 ffc04558: 41 9e 00 0c beq- cr7,ffc04564 ffc0455c: 2f 89 20 00 cmpwi cr7,r9,8192 ffc04560: 40 9e 00 98 bne- cr7,ffc045f8 char *dupname = malloc(namelen); ffc04564: 7f e3 fb 78 mr r3,r31 ffc04568: 90 81 00 08 stw r4,8(r1) ffc0456c: 48 00 06 2d bl ffc04b98 if (dupname != NULL) { ffc04570: 7c 6a 1b 79 mr. r10,r3 ffc04574: 80 81 00 08 lwz r4,8(r1) ffc04578: 41 82 00 94 beq- ffc0460c devFS_node *node = parentloc->node_access; ffc0457c: 81 3d 00 08 lwz r9,8(r29) node->name = dupname; node->namelen = namelen; node->major = rtems_filesystem_dev_major_t(dev); node->minor = rtems_filesystem_dev_minor_t(dev); node->mode = mode; memcpy(dupname, name, namelen); ffc04580: 7f e5 fb 78 mr r5,r31 char *dupname = malloc(namelen); if (dupname != NULL) { devFS_node *node = parentloc->node_access; node->name = dupname; ffc04584: 91 49 00 00 stw r10,0(r9) node->namelen = namelen; ffc04588: 93 e9 00 04 stw r31,4(r9) node->major = rtems_filesystem_dev_major_t(dev); ffc0458c: 93 89 00 08 stw r28,8(r9) node->minor = rtems_filesystem_dev_minor_t(dev); ffc04590: 93 69 00 0c stw r27,12(r9) node->mode = mode; ffc04594: 93 c9 00 10 stw r30,16(r9) memcpy(dupname, name, namelen); ffc04598: 48 00 d2 29 bl ffc117c0 size_t namelen, mode_t mode, dev_t dev ) { int rv = 0; ffc0459c: 38 60 00 00 li r3,0 rv = -1; } } return rv; } ffc045a0: 80 01 00 2c lwz r0,44(r1) ffc045a4: 83 61 00 14 lwz r27,20(r1) ffc045a8: 7c 08 03 a6 mtlr r0 ffc045ac: 83 81 00 18 lwz r28,24(r1) ffc045b0: 83 a1 00 1c lwz r29,28(r1) ffc045b4: 83 c1 00 20 lwz r30,32(r1) ffc045b8: 83 e1 00 24 lwz r31,36(r1) ffc045bc: 38 21 00 28 addi r1,r1,40 ffc045c0: 4e 80 00 20 blr dev_t dev ) { int rv = 0; if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') { ffc045c4: 89 24 00 00 lbz r9,0(r4) ffc045c8: 2f 89 00 64 cmpwi cr7,r9,100 ffc045cc: 40 9e ff 84 bne+ cr7,ffc04550 <== NEVER TAKEN ffc045d0: 89 24 00 01 lbz r9,1(r4) ffc045d4: 2f 89 00 65 cmpwi cr7,r9,101 ffc045d8: 40 9e ff 78 bne+ cr7,ffc04550 <== NEVER TAKEN ffc045dc: 89 24 00 02 lbz r9,2(r4) ffc045e0: 2f 89 00 76 cmpwi cr7,r9,118 ffc045e4: 40 9e ff 6c bne+ cr7,ffc04550 <== NEVER TAKEN } else { errno = ENOTSUP; rv = -1; } } else { if (!S_ISDIR(mode)) { ffc045e8: 54 de 04 26 rlwinm r30,r6,0,16,19 ffc045ec: 2f 9e 40 00 cmpwi cr7,r30,16384 size_t namelen, mode_t mode, dev_t dev ) { int rv = 0; ffc045f0: 38 60 00 00 li r3,0 } else { errno = ENOTSUP; rv = -1; } } else { if (!S_ISDIR(mode)) { ffc045f4: 41 9e ff ac beq+ cr7,ffc045a0 <== ALWAYS TAKEN errno = ENOTSUP; ffc045f8: 48 00 c4 d9 bl ffc10ad0 <__errno> ffc045fc: 39 20 00 86 li r9,134 ffc04600: 91 23 00 00 stw r9,0(r3) rv = -1; ffc04604: 38 60 ff ff li r3,-1 ffc04608: 4b ff ff 98 b ffc045a0 node->major = rtems_filesystem_dev_major_t(dev); node->minor = rtems_filesystem_dev_minor_t(dev); node->mode = mode; memcpy(dupname, name, namelen); } else { errno = ENOMEM; ffc0460c: 48 00 c4 c5 bl ffc10ad0 <__errno> ffc04610: 39 20 00 0c li r9,12 ffc04614: 91 23 00 00 stw r9,0(r3) rv = -1; ffc04618: 38 60 ff ff li r3,-1 ffc0461c: 4b ff ff 84 b ffc045a0 =============================================================================== ffc04678 : */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { ffc04678: 94 21 ff f0 stwu r1,-16(r1) ffc0467c: 7c 08 02 a6 mflr r0 rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc04680: 38 80 00 00 li r4,0 */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { ffc04684: 90 01 00 14 stw r0,20(r1) rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc04688: 38 a0 00 00 li r5,0 */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { ffc0468c: 93 e1 00 0c stw r31,12(r1) rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc04690: 3f e0 00 00 lis r31,0 ffc04694: 3b ff 28 e0 addi r31,r31,10464 ffc04698: 80 7f 00 08 lwz r3,8(r31) ffc0469c: 48 00 68 ad bl ffc0af48 if (sc == RTEMS_SUCCESSFUL) { ffc046a0: 2f 83 00 00 cmpwi cr7,r3,0 diskdevs_protected = true; return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; ffc046a4: 38 60 00 16 li r3,22 disk_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc == RTEMS_SUCCESSFUL) { ffc046a8: 41 9e 00 18 beq- cr7,ffc046c0 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; } } ffc046ac: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc046b0: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc046b4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc046b8: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc046bc: 4e 80 00 20 blr <== NOT EXECUTED ffc046c0: 80 01 00 14 lwz r0,20(r1) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc == RTEMS_SUCCESSFUL) { diskdevs_protected = true; ffc046c4: 39 20 00 01 li r9,1 ffc046c8: 99 3f 00 0c stb r9,12(r31) return RTEMS_SUCCESSFUL; ffc046cc: 38 60 00 00 li r3,0 } else { return RTEMS_NOT_CONFIGURED; } } ffc046d0: 7c 08 03 a6 mtlr r0 ffc046d4: 83 e1 00 0c lwz r31,12(r1) ffc046d8: 38 21 00 10 addi r1,r1,16 ffc046dc: 4e 80 00 20 blr =============================================================================== ffc046e0 : static void disk_unlock(void) { ffc046e0: 94 21 ff f8 stwu r1,-8(r1) ffc046e4: 7c 08 02 a6 mflr r0 rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; ffc046e8: 3d 20 00 00 lis r9,0 } } static void disk_unlock(void) { ffc046ec: 90 01 00 0c stw r0,12(r1) rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; ffc046f0: 39 29 28 e0 addi r9,r9,10464 ffc046f4: 39 40 00 00 li r10,0 sc = rtems_semaphore_release(diskdevs_mutex); ffc046f8: 80 69 00 08 lwz r3,8(r9) static void disk_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; ffc046fc: 99 49 00 0c stb r10,12(r9) sc = rtems_semaphore_release(diskdevs_mutex); ffc04700: 48 00 69 e9 bl ffc0b0e8 if (sc != RTEMS_SUCCESSFUL) { ffc04704: 2f 83 00 00 cmpwi cr7,r3,0 ffc04708: 40 9e 00 14 bne- cr7,ffc0471c <== NEVER TAKEN /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); } } ffc0470c: 80 01 00 0c lwz r0,12(r1) ffc04710: 38 21 00 08 addi r1,r1,8 ffc04714: 7c 08 03 a6 mtlr r0 ffc04718: 4e 80 00 20 blr diskdevs_protected = false; sc = rtems_semaphore_release(diskdevs_mutex); if (sc != RTEMS_SUCCESSFUL) { /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); ffc0471c: 3c 60 de ad lis r3,-8531 <== NOT EXECUTED ffc04720: 60 63 be ef ori r3,r3,48879 <== NOT EXECUTED ffc04724: 48 00 70 e1 bl ffc0b804 <== NOT EXECUTED =============================================================================== ffc06dec : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) ffc06dec: 94 21 ff f0 stwu r1,-16(r1) ffc06df0: 7c 08 02 a6 mflr r0 ffc06df4: 90 01 00 14 stw r0,20(r1) ffc06df8: 93 e1 00 0c stw r31,12(r1) ffc06dfc: 7c 7f 1b 78 mr r31,r3 ffc06e00: 93 c1 00 08 stw r30,8(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc06e04: 7d 20 00 a6 mfmsr r9 ffc06e08: 7d 50 42 a6 mfsprg r10,0 ffc06e0c: 7d 2a 50 78 andc r10,r9,r10 ffc06e10: 7d 40 01 24 mtmsr r10 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) { ffc06e14: 81 03 00 84 lwz r8,132(r3) ffc06e18: 81 43 00 80 lwz r10,128(r3) ffc06e1c: 7f 88 50 00 cmpw cr7,r8,r10 ffc06e20: 41 9e 00 48 beq- cr7,ffc06e68 <== ALWAYS TAKEN tty->rawOutBufState = rob_wait; ffc06e24: 3b c0 00 02 li r30,2 <== NOT EXECUTED ffc06e28: 93 df 00 94 stw r30,148(r31) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc06e2c: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( ffc06e30: 80 7f 00 8c lwz r3,140(r31) <== NOT EXECUTED ffc06e34: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc06e38: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc06e3c: 48 00 2b e5 bl ffc09a20 <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) ffc06e40: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc06e44: 40 9e 00 40 bne- cr7,ffc06e84 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; __asm__ volatile ( ffc06e48: 7d 20 00 a6 mfmsr r9 <== NOT EXECUTED ffc06e4c: 7d 50 42 a6 mfsprg r10,0 <== NOT EXECUTED ffc06e50: 7d 2a 50 78 andc r10,r9,r10 <== NOT EXECUTED ffc06e54: 7d 40 01 24 mtmsr r10 <== 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) { ffc06e58: 81 1f 00 84 lwz r8,132(r31) <== NOT EXECUTED ffc06e5c: 81 5f 00 80 lwz r10,128(r31) <== NOT EXECUTED ffc06e60: 7f 88 50 00 cmpw cr7,r8,r10 <== NOT EXECUTED ffc06e64: 40 9e ff c4 bne+ cr7,ffc06e28 <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { __asm__ volatile ( ffc06e68: 7d 20 01 24 mtmsr r9 rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); } } ffc06e6c: 80 01 00 14 lwz r0,20(r1) ffc06e70: 83 c1 00 08 lwz r30,8(r1) ffc06e74: 7c 08 03 a6 mtlr r0 ffc06e78: 83 e1 00 0c lwz r31,12(r1) ffc06e7c: 38 21 00 10 addi r1,r1,16 ffc06e80: 4e 80 00 20 blr tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); ffc06e84: 48 00 35 19 bl ffc0a39c <== NOT EXECUTED =============================================================================== ffc0516c : */ int dup2( int fildes, int fildes2 ) { ffc0516c: 94 21 ff a0 stwu r1,-96(r1) ffc05170: 7c 08 02 a6 mflr r0 ffc05174: 93 e1 00 5c stw r31,92(r1) ffc05178: 7c 9f 23 78 mr r31,r4 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); ffc0517c: 38 81 00 08 addi r4,r1,8 */ int dup2( int fildes, int fildes2 ) { ffc05180: 93 c1 00 58 stw r30,88(r1) ffc05184: 7c 7e 1b 78 mr r30,r3 ffc05188: 90 01 00 64 stw r0,100(r1) /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); ffc0518c: 48 00 05 f1 bl ffc0577c if ( status == -1 ) ffc05190: 2f 83 ff ff cmpwi cr7,r3,-1 ffc05194: 41 9e 00 44 beq- cr7,ffc051d8 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); ffc05198: 7f e3 fb 78 mr r3,r31 ffc0519c: 38 81 00 08 addi r4,r1,8 ffc051a0: 48 00 05 dd bl ffc0577c if ( status == -1 ) ffc051a4: 2f 83 ff ff cmpwi cr7,r3,-1 ffc051a8: 41 9e 00 30 beq- cr7,ffc051d8 <== NEVER TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); ffc051ac: 7f c3 f3 78 mr r3,r30 ffc051b0: 38 80 00 00 li r4,0 ffc051b4: 7f e5 fb 78 mr r5,r31 ffc051b8: 4c c6 31 82 crclr 4*cr1+eq ffc051bc: 48 00 00 35 bl ffc051f0 } ffc051c0: 80 01 00 64 lwz r0,100(r1) ffc051c4: 83 c1 00 58 lwz r30,88(r1) ffc051c8: 7c 08 03 a6 mtlr r0 ffc051cc: 83 e1 00 5c lwz r31,92(r1) ffc051d0: 38 21 00 60 addi r1,r1,96 ffc051d4: 4e 80 00 20 blr * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); if ( status == -1 ) return -1; ffc051d8: 38 60 ff ff li r3,-1 ffc051dc: 4b ff ff e4 b ffc051c0 =============================================================================== ffc07d70 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { ffc07d70: 94 21 ff e0 stwu r1,-32(r1) ffc07d74: 7c 08 02 a6 mflr r0 ffc07d78: 90 01 00 24 stw r0,36(r1) if ((tty->termios.c_lflag & ECHOCTL) && ffc07d7c: 81 24 00 3c lwz r9,60(r4) /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { ffc07d80: 93 e1 00 1c stw r31,28(r1) ffc07d84: 7c 9f 23 78 mr r31,r4 if ((tty->termios.c_lflag & ECHOCTL) && ffc07d88: 71 2a 02 00 andi. r10,r9,512 ffc07d8c: 41 82 00 30 beq- ffc07dbc <== NEVER TAKEN iscntrl(c) && (c != '\t') && (c != '\n')) { ffc07d90: 3d 20 00 00 lis r9,0 ffc07d94: 81 29 27 e0 lwz r9,10208(r9) ffc07d98: 7d 29 1a 14 add r9,r9,r3 ffc07d9c: 89 29 00 01 lbz r9,1(r9) * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && ffc07da0: 55 29 06 b4 rlwinm r9,r9,0,26,26 ffc07da4: 71 2a 00 ff andi. r10,r9,255 ffc07da8: 41 82 00 14 beq- ffc07dbc iscntrl(c) && (c != '\t') && (c != '\n')) { ffc07dac: 2f 83 00 09 cmpwi cr7,r3,9 ffc07db0: 41 9e 00 0c beq- cr7,ffc07dbc ffc07db4: 2f 83 00 0a cmpwi cr7,r3,10 ffc07db8: 40 9e 00 20 bne- cr7,ffc07dd8 echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); ffc07dbc: 7f e4 fb 78 mr r4,r31 ffc07dc0: 4b ff fe 25 bl ffc07be4 } } ffc07dc4: 80 01 00 24 lwz r0,36(r1) ffc07dc8: 83 e1 00 1c lwz r31,28(r1) ffc07dcc: 7c 08 03 a6 mtlr r0 ffc07dd0: 38 21 00 20 addi r1,r1,32 ffc07dd4: 4e 80 00 20 blr if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; ffc07dd8: 68 69 00 40 xori r9,r3,64 rtems_termios_puts (echobuf, 2, tty); ffc07ddc: 7f e5 fb 78 mr r5,r31 if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; ffc07de0: 99 21 00 09 stb r9,9(r1) rtems_termios_puts (echobuf, 2, tty); ffc07de4: 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] = '^'; ffc07de8: 39 40 00 5e li r10,94 echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); ffc07dec: 38 80 00 02 li r4,2 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; ffc07df0: 99 41 00 08 stb r10,8(r1) echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); ffc07df4: 4b ff fc 45 bl ffc07a38 tty->column += 2; } else { oproc (c, tty); } } ffc07df8: 80 01 00 24 lwz r0,36(r1) char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; ffc07dfc: 81 3f 00 28 lwz r9,40(r31) } else { oproc (c, tty); } } ffc07e00: 7c 08 03 a6 mtlr r0 char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; ffc07e04: 39 29 00 02 addi r9,r9,2 ffc07e08: 91 3f 00 28 stw r9,40(r31) } else { oproc (c, tty); } } ffc07e0c: 83 e1 00 1c lwz r31,28(r1) ffc07e10: 38 21 00 20 addi r1,r1,32 ffc07e14: 4e 80 00 20 blr =============================================================================== ffc07e18 : * Erase a character or line * 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) ffc07e18: 94 21 ff d8 stwu r1,-40(r1) ffc07e1c: 7d 80 00 26 mfcr r12 ffc07e20: 7c 08 02 a6 mflr r0 while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { ffc07e24: 2e 04 00 00 cmpwi cr4,r4,0 * Erase a character or line * 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) ffc07e28: 93 61 00 14 stw r27,20(r1) tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); ffc07e2c: 3f 60 ff c2 lis r27,-62 ffc07e30: 3b 7b fd 40 addi r27,r27,-704 * Erase a character or line * 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) ffc07e34: 93 a1 00 1c stw r29,28(r1) ffc07e38: 3f a0 ff c2 lis r29,-62 ffc07e3c: 3b bd fd 3c addi r29,r29,-708 ffc07e40: 90 01 00 2c stw r0,44(r1) ffc07e44: 93 41 00 10 stw r26,16(r1) ffc07e48: 93 c1 00 20 stw r30,32(r1) ffc07e4c: 91 81 00 0c stw r12,12(r1) ffc07e50: 93 81 00 18 stw r28,24(r1) rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { ffc07e54: 3f 80 00 00 lis r28,0 * Erase a character or line * 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) ffc07e58: 93 e1 00 24 stw r31,36(r1) ffc07e5c: 7c 7f 1b 78 mr r31,r3 echo ('\n', tty); return; } } while (tty->ccount) { ffc07e60: 81 5f 00 20 lwz r10,32(r31) ffc07e64: 2f 8a 00 00 cmpwi cr7,r10,0 ffc07e68: 41 9e 00 78 beq- cr7,ffc07ee0 unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { ffc07e6c: 81 3f 00 3c lwz r9,60(r31) return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; ffc07e70: 39 4a ff ff addi r10,r10,-1 ffc07e74: 81 1f 00 1c lwz r8,28(r31) if (tty->termios.c_lflag & ECHO) { ffc07e78: 71 26 00 08 andi. r6,r9,8 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; ffc07e7c: 91 5f 00 20 stw r10,32(r31) ffc07e80: 7c e8 50 ae lbzx r7,r8,r10 if (tty->termios.c_lflag & ECHO) { ffc07e84: 41 82 00 58 beq- ffc07edc <== NEVER TAKEN if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { ffc07e88: 40 92 00 0c bne- cr4,ffc07e94 ffc07e8c: 71 26 00 10 andi. r6,r9,16 ffc07e90: 41 82 01 74 beq- ffc08004 <== NEVER TAKEN echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { ffc07e94: 2f 87 00 09 cmpwi cr7,r7,9 ffc07e98: 41 9e 00 c8 beq- cr7,ffc07f60 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { ffc07e9c: 81 5c 27 e0 lwz r10,10208(r28) ffc07ea0: 3b c7 00 01 addi r30,r7,1 ffc07ea4: 7d 4a f0 ae lbzx r10,r10,r30 ffc07ea8: 55 4a 06 b4 rlwinm r10,r10,0,26,26 ffc07eac: 71 48 00 ff andi. r8,r10,255 ffc07eb0: 40 82 00 60 bne- ffc07f10 <== NEVER TAKEN ffc07eb4: 7f 7a db 78 mr r26,r27 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); ffc07eb8: 7f 43 d3 78 mr r3,r26 ffc07ebc: 38 80 00 03 li r4,3 ffc07ec0: 7f e5 fb 78 mr r5,r31 ffc07ec4: 4b ff fb 75 bl ffc07a38 if (tty->column) ffc07ec8: 81 3f 00 28 lwz r9,40(r31) ffc07ecc: 2f 89 00 00 cmpwi cr7,r9,0 ffc07ed0: 41 9e 00 0c beq- cr7,ffc07edc <== NEVER TAKEN tty->column--; ffc07ed4: 39 29 ff ff addi r9,r9,-1 ffc07ed8: 91 3f 00 28 stw r9,40(r31) } } } if (!lineFlag) ffc07edc: 40 92 ff 84 bne+ cr4,ffc07e60 break; } } ffc07ee0: 80 01 00 2c lwz r0,44(r1) ffc07ee4: 81 81 00 0c lwz r12,12(r1) ffc07ee8: 7c 08 03 a6 mtlr r0 ffc07eec: 83 41 00 10 lwz r26,16(r1) ffc07ef0: 83 61 00 14 lwz r27,20(r1) ffc07ef4: 7d 80 81 20 mtcrf 8,r12 ffc07ef8: 83 81 00 18 lwz r28,24(r1) ffc07efc: 83 a1 00 1c lwz r29,28(r1) ffc07f00: 83 c1 00 20 lwz r30,32(r1) ffc07f04: 83 e1 00 24 lwz r31,36(r1) ffc07f08: 38 21 00 28 addi r1,r1,40 ffc07f0c: 4e 80 00 20 blr rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { ffc07f10: 71 2a 02 00 andi. r10,r9,512 <== NOT EXECUTED ffc07f14: 41 82 ff c8 beq+ ffc07edc <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); ffc07f18: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc07f1c: 38 80 00 03 li r4,3 <== NOT EXECUTED ffc07f20: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED ffc07f24: 4b ff fb 15 bl ffc07a38 <== NOT EXECUTED if (tty->column) ffc07f28: 81 3f 00 28 lwz r9,40(r31) <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); ffc07f2c: 7f 7a db 78 mr r26,r27 <== NOT EXECUTED if (tty->column) ffc07f30: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc07f34: 40 9e 01 08 bne- cr7,ffc0803c <== NOT EXECUTED tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { ffc07f38: 81 3c 27 e0 lwz r9,10208(r28) <== NOT EXECUTED ffc07f3c: 7d 29 f0 ae lbzx r9,r9,r30 <== NOT EXECUTED ffc07f40: 55 29 06 b4 rlwinm r9,r9,0,26,26 <== NOT EXECUTED ffc07f44: 71 26 00 ff andi. r6,r9,255 <== NOT EXECUTED ffc07f48: 41 a2 ff 70 beq- ffc07eb8 <== NOT EXECUTED ffc07f4c: 81 3f 00 3c lwz r9,60(r31) <== NOT EXECUTED ffc07f50: 71 27 02 00 andi. r7,r9,512 <== NOT EXECUTED ffc07f54: 40 82 ff 64 bne+ ffc07eb8 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) ffc07f58: 40 92 ff 08 bne+ cr4,ffc07e60 <== NOT EXECUTED ffc07f5c: 4b ff ff 84 b ffc07ee0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc07f60: 2f 8a 00 00 cmpwi cr7,r10,0 if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; ffc07f64: 83 df 00 2c lwz r30,44(r31) int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc07f68: 41 9e 00 48 beq- cr7,ffc07fb0 c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) ffc07f6c: 7d 49 03 a6 mtctr r10 */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { ffc07f70: 80 dc 27 e0 lwz r6,10208(r28) if (tty->termios.c_lflag & ECHOCTL) ffc07f74: 71 27 02 00 andi. r7,r9,512 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; ffc07f78: 39 20 00 00 li r9,0 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; ffc07f7c: 7d 48 48 ae lbzx r10,r8,r9 ffc07f80: 39 29 00 01 addi r9,r9,1 if (c == '\t') { ffc07f84: 2f 8a 00 09 cmpwi cr7,r10,9 col = (col | 7) + 1; } else if (iscntrl (c)) { ffc07f88: 7c e6 52 14 add r7,r6,r10 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { ffc07f8c: 41 9e 00 68 beq- cr7,ffc07ff4 col = (col | 7) + 1; } else if (iscntrl (c)) { ffc07f90: 89 47 00 01 lbz r10,1(r7) ffc07f94: 55 4a 06 b4 rlwinm r10,r10,0,26,26 ffc07f98: 55 47 06 3e clrlwi r7,r10,24 ffc07f9c: 2f 87 00 00 cmpwi cr7,r7,0 ffc07fa0: 41 9e 00 48 beq- cr7,ffc07fe8 <== ALWAYS TAKEN if (tty->termios.c_lflag & ECHOCTL) ffc07fa4: 41 82 00 08 beq- ffc07fac <== NOT EXECUTED col += 2; ffc07fa8: 3b de 00 02 addi r30,r30,2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc07fac: 42 00 ff d0 bdnz+ ffc07f7c <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { ffc07fb0: 81 3f 00 28 lwz r9,40(r31) ffc07fb4: 7f 89 f0 00 cmpw cr7,r9,r30 ffc07fb8: 40 bd ff 24 ble- cr7,ffc07edc <== NEVER TAKEN rtems_termios_puts ("\b", 1, tty); ffc07fbc: 7f a3 eb 78 mr r3,r29 ffc07fc0: 38 80 00 01 li r4,1 ffc07fc4: 7f e5 fb 78 mr r5,r31 ffc07fc8: 4b ff fa 71 bl ffc07a38 tty->column--; ffc07fcc: 81 3f 00 28 lwz r9,40(r31) ffc07fd0: 39 29 ff ff addi r9,r9,-1 } /* * Back up over the tab */ while (tty->column > col) { ffc07fd4: 7f 89 f0 00 cmpw cr7,r9,r30 rtems_termios_puts ("\b", 1, tty); tty->column--; ffc07fd8: 91 3f 00 28 stw r9,40(r31) } /* * Back up over the tab */ while (tty->column > col) { ffc07fdc: 41 9d ff e0 bgt+ cr7,ffc07fbc if (tty->column) tty->column--; } } } if (!lineFlag) ffc07fe0: 40 92 fe 80 bne+ cr4,ffc07e60 <== ALWAYS TAKEN ffc07fe4: 4b ff fe fc b ffc07ee0 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; ffc07fe8: 3b de 00 01 addi r30,r30,1 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc07fec: 42 00 ff 90 bdnz+ ffc07f7c ffc07ff0: 4b ff ff c0 b ffc07fb0 c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; ffc07ff4: 63 de 00 07 ori r30,r30,7 ffc07ff8: 3b de 00 01 addi r30,r30,1 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc07ffc: 42 00 ff 80 bdnz+ ffc07f7c ffc08000: 4b ff ff b0 b ffc07fb0 <== NOT EXECUTED } } if (!lineFlag) break; } } ffc08004: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); ffc08008: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED } } if (!lineFlag) break; } } ffc0800c: 81 81 00 0c lwz r12,12(r1) <== NOT EXECUTED ffc08010: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); ffc08014: 88 7f 00 43 lbz r3,67(r31) <== NOT EXECUTED } } if (!lineFlag) break; } } ffc08018: 83 41 00 10 lwz r26,16(r1) <== NOT EXECUTED ffc0801c: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED ffc08020: 83 61 00 14 lwz r27,20(r1) <== NOT EXECUTED ffc08024: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc08028: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc0802c: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc08030: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc08034: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); ffc08038: 4b ff fd 38 b ffc07d70 <== NOT EXECUTED } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; ffc0803c: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED ffc08040: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED ffc08044: 4b ff fe f4 b ffc07f38 <== NOT EXECUTED =============================================================================== ffc0605c : size_t pathlen, int eval_flags, rtems_filesystem_global_location_t *const *global_root_ptr, rtems_filesystem_global_location_t *const *global_current_ptr ) { ffc0605c: 94 21 ff d0 stwu r1,-48(r1) ffc06060: 7c 08 02 a6 mflr r0 ffc06064: 93 a1 00 24 stw r29,36(r1) ffc06068: 7c 9d 23 78 mr r29,r4 memset(ctx, 0, sizeof(*ctx)); ffc0606c: 38 80 00 00 li r4,0 size_t pathlen, int eval_flags, rtems_filesystem_global_location_t *const *global_root_ptr, rtems_filesystem_global_location_t *const *global_current_ptr ) { ffc06070: 93 c1 00 28 stw r30,40(r1) ffc06074: 7c be 2b 78 mr r30,r5 memset(ctx, 0, sizeof(*ctx)); ffc06078: 38 a0 00 38 li r5,56 size_t pathlen, int eval_flags, rtems_filesystem_global_location_t *const *global_root_ptr, rtems_filesystem_global_location_t *const *global_current_ptr ) { ffc0607c: 93 41 00 18 stw r26,24(r1) ffc06080: 7d 1a 43 78 mr r26,r8 ffc06084: 93 61 00 1c stw r27,28(r1) ffc06088: 7c fb 3b 78 mr r27,r7 ffc0608c: 93 81 00 20 stw r28,32(r1) ffc06090: 7c dc 33 78 mr r28,r6 ffc06094: 93 e1 00 2c stw r31,44(r1) ffc06098: 7c 7f 1b 78 mr r31,r3 ffc0609c: 90 01 00 34 stw r0,52(r1) memset(ctx, 0, sizeof(*ctx)); ffc060a0: 48 00 dd d1 bl ffc13e70 rtems_filesystem_eval_path_context_t *ctx, rtems_filesystem_global_location_t *const *global_root_ptr, rtems_filesystem_global_location_t *const *global_current_ptr ) { if (ctx->pathlen > 0) { ffc060a4: 2f 9e 00 00 cmpwi cr7,r30,0 rtems_filesystem_global_location_t *const *global_current_ptr ) { memset(ctx, 0, sizeof(*ctx)); ctx->path = path; ffc060a8: 93 bf 00 00 stw r29,0(r31) ctx->pathlen = pathlen; ffc060ac: 93 df 00 04 stw r30,4(r31) ctx->flags = eval_flags; ffc060b0: 93 9f 00 10 stw r28,16(r31) rtems_filesystem_eval_path_context_t *ctx, rtems_filesystem_global_location_t *const *global_root_ptr, rtems_filesystem_global_location_t *const *global_current_ptr ) { if (ctx->pathlen > 0) { ffc060b4: 41 9e 00 34 beq- cr7,ffc060e8 char c = ctx->path [0]; ffc060b8: 8b dd 00 00 lbz r30,0(r29) ctx->rootloc = rtems_filesystem_global_location_obtain(global_root_ptr); ffc060bc: 7f 63 db 78 mr r3,r27 ffc060c0: 48 00 08 39 bl ffc068f8 gid_t node_gid ); static inline bool rtems_filesystem_is_delimiter(char c) { return c == '/' || c == '\\'; ffc060c4: 2f 9e 00 2f cmpwi cr7,r30,47 ffc060c8: 90 7f 00 30 stw r3,48(r31) ffc060cc: 41 9e 00 a8 beq- cr7,ffc06174 ffc060d0: 2f 9e 00 5c cmpwi cr7,r30,92 ffc060d4: 41 9e 00 a0 beq- cr7,ffc06174 <== NEVER TAKEN --ctx->pathlen; ctx->startloc = rtems_filesystem_global_location_obtain( &ctx->rootloc ); } else { ctx->startloc = rtems_filesystem_global_location_obtain( ffc060d8: 7f 43 d3 78 mr r3,r26 ffc060dc: 48 00 08 1d bl ffc068f8 ffc060e0: 90 7f 00 34 stw r3,52(r31) ffc060e4: 48 00 00 38 b ffc0611c ); static inline rtems_filesystem_global_location_t * rtems_filesystem_global_location_obtain_null(void) { rtems_filesystem_global_location_t *global_loc = NULL; ffc060e8: 7c 3d 0b 78 mr r29,r1 ffc060ec: 97 dd 00 08 stwu r30,8(r29) return rtems_filesystem_global_location_obtain( &global_loc ); ffc060f0: 7f a3 eb 78 mr r3,r29 ffc060f4: 48 00 08 05 bl ffc068f8 ); static inline rtems_filesystem_global_location_t * rtems_filesystem_global_location_obtain_null(void) { rtems_filesystem_global_location_t *global_loc = NULL; ffc060f8: 93 c1 00 08 stw r30,8(r1) global_current_ptr ); } } else { ctx->rootloc = rtems_filesystem_global_location_obtain_null(); ffc060fc: 90 7f 00 30 stw r3,48(r31) return rtems_filesystem_global_location_obtain( &global_loc ); ffc06100: 7f a3 eb 78 mr r3,r29 ffc06104: 48 00 07 f5 bl ffc068f8 ctx->startloc = rtems_filesystem_global_location_obtain_null(); ffc06108: 90 7f 00 34 stw r3,52(r31) errno = ENOENT; ffc0610c: 48 00 cf 6d bl ffc13078 <__errno> ffc06110: 39 20 00 02 li r9,2 ffc06114: 91 23 00 00 stw r9,0(r3) ffc06118: 80 7f 00 34 lwz r3,52(r31) &ctx->startloc, rtems_filesystem_global_location_obtain(newstartloc_ptr) ); rtems_filesystem_instance_lock(&ctx->startloc->location); rtems_filesystem_location_clone(&ctx->currentloc, &ctx->startloc->location); } ffc0611c: 80 63 00 14 lwz r3,20(r3) set_startloc(ctx, global_root_ptr, global_current_ptr); rtems_filesystem_instance_lock(&ctx->startloc->location); rtems_filesystem_location_clone( ffc06120: 3b df 00 18 addi r30,r31,24 const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->lock_h)( mt_entry ); ffc06124: 81 23 00 0c lwz r9,12(r3) ffc06128: 81 29 00 00 lwz r9,0(r9) ffc0612c: 7d 29 03 a6 mtctr r9 ffc06130: 4e 80 04 21 bctrl ffc06134: 80 9f 00 34 lwz r4,52(r31) ffc06138: 7f c3 f3 78 mr r3,r30 ffc0613c: 48 00 8a dd bl ffc0ec18 &ctx->currentloc, &ctx->startloc->location ); rtems_filesystem_eval_path_continue(ctx); ffc06140: 7f e3 fb 78 mr r3,r31 ffc06144: 4b ff fe 7d bl ffc05fc0 return &ctx->currentloc; } ffc06148: 80 01 00 34 lwz r0,52(r1) ffc0614c: 7f c3 f3 78 mr r3,r30 ffc06150: 83 41 00 18 lwz r26,24(r1) ffc06154: 7c 08 03 a6 mtlr r0 ffc06158: 83 61 00 1c lwz r27,28(r1) ffc0615c: 83 81 00 20 lwz r28,32(r1) ffc06160: 83 a1 00 24 lwz r29,36(r1) ffc06164: 83 c1 00 28 lwz r30,40(r1) ffc06168: 83 e1 00 2c lwz r31,44(r1) ffc0616c: 38 21 00 30 addi r1,r1,48 ffc06170: 4e 80 00 20 blr char c = ctx->path [0]; ctx->rootloc = rtems_filesystem_global_location_obtain(global_root_ptr); if (rtems_filesystem_is_delimiter(c)) { ++ctx->path; ffc06174: 81 5f 00 00 lwz r10,0(r31) --ctx->pathlen; ctx->startloc = rtems_filesystem_global_location_obtain( ffc06178: 38 7f 00 30 addi r3,r31,48 ctx->rootloc = rtems_filesystem_global_location_obtain(global_root_ptr); if (rtems_filesystem_is_delimiter(c)) { ++ctx->path; --ctx->pathlen; ffc0617c: 81 3f 00 04 lwz r9,4(r31) char c = ctx->path [0]; ctx->rootloc = rtems_filesystem_global_location_obtain(global_root_ptr); if (rtems_filesystem_is_delimiter(c)) { ++ctx->path; ffc06180: 39 4a 00 01 addi r10,r10,1 --ctx->pathlen; ffc06184: 39 29 ff ff addi r9,r9,-1 char c = ctx->path [0]; ctx->rootloc = rtems_filesystem_global_location_obtain(global_root_ptr); if (rtems_filesystem_is_delimiter(c)) { ++ctx->path; ffc06188: 91 5f 00 00 stw r10,0(r31) --ctx->pathlen; ffc0618c: 91 3f 00 04 stw r9,4(r31) ctx->startloc = rtems_filesystem_global_location_obtain( ffc06190: 48 00 07 69 bl ffc068f8 ffc06194: 90 7f 00 34 stw r3,52(r31) ffc06198: 4b ff ff 84 b ffc0611c =============================================================================== ffc17158 : int fat_buf_access(fat_fs_info_t *fs_info, const uint32_t sec_num, const int op_type, uint8_t **sec_buf) { ffc17158: 94 21 ff e0 stwu r1,-32(r1) ffc1715c: 7c 08 02 a6 mflr r0 ffc17160: 93 41 00 08 stw r26,8(r1) ffc17164: 7c ba 2b 78 mr r26,r5 ffc17168: 93 61 00 0c stw r27,12(r1) ffc1716c: 93 81 00 10 stw r28,16(r1) ffc17170: 7c dc 33 78 mr r28,r6 ffc17174: 93 a1 00 14 stw r29,20(r1) ffc17178: 93 c1 00 18 stw r30,24(r1) ffc1717c: 7c 9e 23 78 mr r30,r4 ffc17180: 93 e1 00 1c stw r31,28(r1) ffc17184: 7c 7f 1b 78 mr r31,r3 ffc17188: 90 01 00 24 stw r0,36(r1) sec_num); uint32_t blk_ofs = fat_sector_offset_to_block_offset (fs_info, sec_num, 0); if (fs_info->c.state == FAT_CACHE_EMPTY || fs_info->c.blk_num != sec_num) ffc1718c: 89 03 00 89 lbz r8,137(r3) static inline uint32_t fat_sector_num_to_block_num (const fat_fs_info_t *fs_info, const uint32_t sector_number) { return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); ffc17190: 89 23 00 02 lbz r9,2(r3) ffc17194: 89 43 00 0c lbz r10,12(r3) ffc17198: 2f 88 00 00 cmpwi cr7,r8,0 ffc1719c: 7d 49 50 50 subf r10,r9,r10 ffc171a0: 7c 9d 54 30 srw r29,r4,r10 static inline uint32_t fat_block_num_to_sector_num (const fat_fs_info_t *fs_info, const uint32_t block_number) { return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); ffc171a4: 7f aa 50 30 slw r10,r29,r10 fat_sector_offset_to_block_offset (const fat_fs_info_t *fs_info, const uint32_t sector, const uint32_t sector_offset) { return sector_offset + ((sector - ffc171a8: 7d 4a 20 50 subf r10,r10,r4 fat_block_num_to_sector_num (fs_info, fat_sector_num_to_block_num (fs_info, sector))) << fs_info->vol.sec_log2); ffc171ac: 7d 5b 48 30 slw r27,r10,r9 ffc171b0: 41 9e 00 10 beq- cr7,ffc171c0 ffc171b4: 81 23 00 84 lwz r9,132(r3) ffc171b8: 7f 89 20 00 cmpw cr7,r9,r4 ffc171bc: 41 9e 00 3c beq- cr7,ffc171f8 { fat_buf_release(fs_info); ffc171c0: 7f e3 fb 78 mr r3,r31 ffc171c4: 4b ff fd b1 bl ffc16f74 if (op_type == FAT_OP_TYPE_READ) ffc171c8: 2f 9a 00 01 cmpwi cr7,r26,1 sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); ffc171cc: 80 7f 00 64 lwz r3,100(r31) ffc171d0: 7f a4 eb 78 mr r4,r29 ffc171d4: 38 bf 00 8c addi r5,r31,140 if (fs_info->c.state == FAT_CACHE_EMPTY || fs_info->c.blk_num != sec_num) { fat_buf_release(fs_info); if (op_type == FAT_OP_TYPE_READ) ffc171d8: 41 9e 00 5c beq- cr7,ffc17234 sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); ffc171dc: 4b ff d1 b5 bl ffc14390 if (sc != RTEMS_SUCCESSFUL) ffc171e0: 2f 83 00 00 cmpwi cr7,r3,0 ffc171e4: 40 9e 00 58 bne- cr7,ffc1723c <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = sec_num; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; ffc171e8: 39 20 00 01 li r9,1 sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = sec_num; ffc171ec: 93 df 00 84 stw r30,132(r31) fs_info->c.modified = 0; ffc171f0: 98 7f 00 88 stb r3,136(r31) fs_info->c.state = FAT_CACHE_ACTUAL; ffc171f4: 99 3f 00 89 stb r9,137(r31) } *sec_buf = &fs_info->c.buf->buffer[blk_ofs]; ffc171f8: 81 3f 00 8c lwz r9,140(r31) return RC_OK; ffc171fc: 38 60 00 00 li r3,0 rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = sec_num; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; } *sec_buf = &fs_info->c.buf->buffer[blk_ofs]; ffc17200: 81 29 00 1c lwz r9,28(r9) ffc17204: 7f 69 da 14 add r27,r9,r27 ffc17208: 93 7c 00 00 stw r27,0(r28) return RC_OK; } ffc1720c: 80 01 00 24 lwz r0,36(r1) ffc17210: 83 41 00 08 lwz r26,8(r1) ffc17214: 7c 08 03 a6 mtlr r0 ffc17218: 83 61 00 0c lwz r27,12(r1) ffc1721c: 83 81 00 10 lwz r28,16(r1) ffc17220: 83 a1 00 14 lwz r29,20(r1) ffc17224: 83 c1 00 18 lwz r30,24(r1) ffc17228: 83 e1 00 1c lwz r31,28(r1) ffc1722c: 38 21 00 20 addi r1,r1,32 ffc17230: 4e 80 00 20 blr if (fs_info->c.state == FAT_CACHE_EMPTY || fs_info->c.blk_num != sec_num) { fat_buf_release(fs_info); if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); ffc17234: 4b ff d2 c9 bl ffc144fc ffc17238: 4b ff ff a8 b ffc171e0 else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); ffc1723c: 48 00 a4 61 bl ffc2169c <__errno> <== NOT EXECUTED ffc17240: 39 20 00 05 li r9,5 <== NOT EXECUTED ffc17244: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED ffc17248: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc1724c: 4b ff ff c0 b ffc1720c <== NOT EXECUTED =============================================================================== ffc16f74 : return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { ffc16f74: 94 21 ff d8 stwu r1,-40(r1) ffc16f78: 7c 08 02 a6 mflr r0 ffc16f7c: 93 e1 00 24 stw r31,36(r1) ffc16f80: 7c 7f 1b 78 mr r31,r3 ffc16f84: 90 01 00 2c stw r0,44(r1) ffc16f88: 93 a1 00 1c stw r29,28(r1) ffc16f8c: 93 c1 00 20 stw r30,32(r1) rtems_status_code sc = RTEMS_SUCCESSFUL; if (fs_info->c.state == FAT_CACHE_EMPTY) ffc16f90: 89 23 00 89 lbz r9,137(r3) return RC_OK; ffc16f94: 38 60 00 00 li r3,0 int fat_buf_release(fat_fs_info_t *fs_info) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (fs_info->c.state == FAT_CACHE_EMPTY) ffc16f98: 2f 89 00 00 cmpwi cr7,r9,0 ffc16f9c: 41 9e 01 28 beq- cr7,ffc170c4 return RC_OK; if (fs_info->c.modified) ffc16fa0: 89 3f 00 88 lbz r9,136(r31) ffc16fa4: 2f 89 00 00 cmpwi cr7,r9,0 ffc16fa8: 41 9e 01 00 beq- cr7,ffc170a8 { uint32_t sec_num = fs_info->c.blk_num; ffc16fac: 81 3f 00 84 lwz r9,132(r31) bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) && ffc16fb0: 3b c0 00 00 li r30,0 ffc16fb4: a1 5f 00 18 lhz r10,24(r31) ffc16fb8: 7f 89 50 40 cmplw cr7,r9,r10 ffc16fbc: 41 9c 00 10 blt- cr7,ffc16fcc ffc16fc0: 81 5f 00 20 lwz r10,32(r31) ffc16fc4: 7f 89 50 40 cmplw cr7,r9,r10 ffc16fc8: 41 9c 01 18 blt- cr7,ffc170e0 if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer + blk_ofs, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); ffc16fcc: 80 7f 00 8c lwz r3,140(r31) ffc16fd0: 4b ff d8 59 bl ffc14828 if (sc != RTEMS_SUCCESSFUL) ffc16fd4: 2c 03 00 00 cmpwi r3,0 ffc16fd8: 40 82 01 6c bne- ffc17144 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; if (sec_of_fat && !fs_info->vol.mirror) ffc16fdc: 2f 9e 00 00 cmpwi cr7,r30,0 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; ffc16fe0: 98 7f 00 88 stb r3,136(r31) if (sec_of_fat && !fs_info->vol.mirror) ffc16fe4: 41 9e 00 d4 beq- cr7,ffc170b8 ffc16fe8: 89 3f 00 54 lbz r9,84(r31) ffc16fec: 2f 89 00 00 cmpwi cr7,r9,0 ffc16ff0: 40 9e 00 c8 bne- cr7,ffc170b8 <== NEVER TAKEN { uint8_t i; for (i = 1; i < fs_info->vol.fats; i++) ffc16ff4: 89 3f 00 0d lbz r9,13(r31) ffc16ff8: 2b 89 00 01 cmplwi cr7,r9,1 ffc16ffc: 40 9d 00 bc ble- cr7,ffc170b8 <== NEVER TAKEN ffc17000: 3b c0 00 01 li r30,1 ffc17004: 48 00 00 50 b ffc17054 { sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd); } else { sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd); ffc17008: 80 7f 00 64 lwz r3,100(r31) ffc1700c: 4b ff d4 f1 bl ffc144fc } if ( sc != RTEMS_SUCCESSFUL) ffc17010: 2f 83 00 00 cmpwi cr7,r3,0 ffc17014: 40 9e 01 1c bne- cr7,ffc17130 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(bd->buffer + blk_ofs, fs_info->sec_buf, fs_info->vol.bps); ffc17018: 81 21 00 08 lwz r9,8(r1) if (sec_of_fat && !fs_info->vol.mirror) { uint8_t i; for (i = 1; i < fs_info->vol.fats; i++) ffc1701c: 3b de 00 01 addi r30,r30,1 { sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd); } if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(bd->buffer + blk_ofs, fs_info->sec_buf, fs_info->vol.bps); ffc17020: 80 9f 00 90 lwz r4,144(r31) if (sec_of_fat && !fs_info->vol.mirror) { uint8_t i; for (i = 1; i < fs_info->vol.fats; i++) ffc17024: 57 de 06 3e clrlwi r30,r30,24 { sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd); } if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(bd->buffer + blk_ofs, fs_info->sec_buf, fs_info->vol.bps); ffc17028: 80 69 00 1c lwz r3,28(r9) ffc1702c: a0 bf 00 00 lhz r5,0(r31) ffc17030: 7c 63 ea 14 add r3,r3,r29 ffc17034: 48 00 b3 49 bl ffc2237c sc = rtems_bdbuf_release_modified(bd); ffc17038: 80 61 00 08 lwz r3,8(r1) ffc1703c: 4b ff d7 ed bl ffc14828 if ( sc != RTEMS_SUCCESSFUL) ffc17040: 2f 83 00 00 cmpwi cr7,r3,0 ffc17044: 40 9e 00 ec bne- cr7,ffc17130 <== NEVER TAKEN if (sec_of_fat && !fs_info->vol.mirror) { uint8_t i; for (i = 1; i < fs_info->vol.fats; i++) ffc17048: 89 3f 00 0d lbz r9,13(r31) ffc1704c: 7f 89 f0 40 cmplw cr7,r9,r30 ffc17050: 40 9d 00 68 ble- cr7,ffc170b8 <== ALWAYS TAKEN { rtems_bdbuf_buffer *bd; sec_num = fs_info->c.blk_num + fs_info->vol.fat_length * i, ffc17054: 81 1f 00 1c lwz r8,28(r31) { sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd); } else { sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd); ffc17058: 38 a1 00 08 addi r5,r1,8 for (i = 1; i < fs_info->vol.fats; i++) { rtems_bdbuf_buffer *bd; sec_num = fs_info->c.blk_num + fs_info->vol.fat_length * i, ffc1705c: 81 5f 00 84 lwz r10,132(r31) ffc17060: 7d 1e 41 d6 mullw r8,r30,r8 static inline uint32_t fat_sector_num_to_block_num (const fat_fs_info_t *fs_info, const uint32_t sector_number) { return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); ffc17064: 89 3f 00 02 lbz r9,2(r31) ffc17068: 88 7f 00 0c lbz r3,12(r31) ffc1706c: 7d 08 52 14 add r8,r8,r10 ffc17070: 7c 69 18 50 subf r3,r9,r3 ffc17074: 7d 0a 1c 30 srw r10,r8,r3 static inline uint32_t fat_block_num_to_sector_num (const fat_fs_info_t *fs_info, const uint32_t block_number) { return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); ffc17078: 7d 43 18 30 slw r3,r10,r3 fat_sector_offset_to_block_offset (const fat_fs_info_t *fs_info, const uint32_t sector, const uint32_t sector_offset) { return sector_offset + ((sector - ffc1707c: 7c 63 40 50 subf r3,r3,r8 blk = fat_sector_num_to_block_num(fs_info, sec_num); blk_ofs = fat_sector_offset_to_block_offset(fs_info, sec_num, 0); if (blk_ofs == 0 ffc17080: 7c 7d 48 31 slw. r29,r3,r9 { sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd); } else { sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd); ffc17084: 7d 44 53 78 mr r4,r10 blk = fat_sector_num_to_block_num(fs_info, sec_num); blk_ofs = fat_sector_offset_to_block_offset(fs_info, sec_num, 0); if (blk_ofs == 0 ffc17088: 40 a2 ff 80 bne- ffc17008 && fs_info->vol.bps == fs_info->vol.bytes_per_block) ffc1708c: a1 1f 00 00 lhz r8,0(r31) ffc17090: a1 3f 00 0a lhz r9,10(r31) ffc17094: 7f 88 48 00 cmpw cr7,r8,r9 ffc17098: 40 9e ff 70 bne+ cr7,ffc17008 { sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd); ffc1709c: 80 7f 00 64 lwz r3,100(r31) ffc170a0: 4b ff d2 f1 bl ffc14390 ffc170a4: 4b ff ff 6c b ffc17010 } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); ffc170a8: 80 7f 00 8c lwz r3,140(r31) ffc170ac: 4b ff d6 91 bl ffc1473c if (sc != RTEMS_SUCCESSFUL) ffc170b0: 2f 83 00 00 cmpwi cr7,r3,0 ffc170b4: 40 9e 00 90 bne- cr7,ffc17144 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; ffc170b8: 39 20 00 00 li r9,0 ffc170bc: 99 3f 00 89 stb r9,137(r31) return RC_OK; ffc170c0: 38 60 00 00 li r3,0 } ffc170c4: 80 01 00 2c lwz r0,44(r1) ffc170c8: 83 a1 00 1c lwz r29,28(r1) ffc170cc: 7c 08 03 a6 mtlr r0 ffc170d0: 83 c1 00 20 lwz r30,32(r1) ffc170d4: 83 e1 00 24 lwz r31,36(r1) ffc170d8: 38 21 00 28 addi r1,r1,40 ffc170dc: 4e 80 00 20 blr uint32_t blk = fat_sector_num_to_block_num(fs_info, sec_num); uint32_t blk_ofs = fat_sector_offset_to_block_offset(fs_info, sec_num, 0); if (sec_of_fat && !fs_info->vol.mirror) ffc170e0: 89 1f 00 54 lbz r8,84(r31) uint32_t ino ) { return (ino >= fs_info->uino_base); } ffc170e4: 89 5f 00 02 lbz r10,2(r31) uint32_t blk = fat_sector_num_to_block_num(fs_info, sec_num); uint32_t blk_ofs = fat_sector_offset_to_block_offset(fs_info, sec_num, 0); if (sec_of_fat && !fs_info->vol.mirror) ffc170e8: 2f 88 00 00 cmpwi cr7,r8,0 uint32_t ino ) { return (ino >= fs_info->uino_base); } ffc170ec: 88 ff 00 0c lbz r7,12(r31) uint32_t blk = fat_sector_num_to_block_num(fs_info, sec_num); uint32_t blk_ofs = fat_sector_offset_to_block_offset(fs_info, sec_num, 0); if (sec_of_fat && !fs_info->vol.mirror) ffc170f0: 41 9e 00 0c beq- cr7,ffc170fc <== ALWAYS TAKEN return RC_OK; if (fs_info->c.modified) { uint32_t sec_num = fs_info->c.blk_num; bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) && ffc170f4: 3b c0 00 01 li r30,1 <== NOT EXECUTED ffc170f8: 4b ff fe d4 b ffc16fcc <== NOT EXECUTED static inline uint32_t fat_sector_num_to_block_num (const fat_fs_info_t *fs_info, const uint32_t sector_number) { return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); ffc170fc: 7d 0a 38 50 subf r8,r10,r7 sec_num, 0); if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer + blk_ofs, ffc17100: 80 ff 00 8c lwz r7,140(r31) ffc17104: 7d 26 44 30 srw r6,r9,r8 uint32_t blk_ofs = fat_sector_offset_to_block_offset(fs_info, sec_num, 0); if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, ffc17108: 80 7f 00 90 lwz r3,144(r31) static inline uint32_t fat_block_num_to_sector_num (const fat_fs_info_t *fs_info, const uint32_t block_number) { return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); ffc1710c: 7c c8 40 30 slw r8,r6,r8 ffc17110: 80 87 00 1c lwz r4,28(r7) fat_sector_offset_to_block_offset (const fat_fs_info_t *fs_info, const uint32_t sector, const uint32_t sector_offset) { return sector_offset + ((sector - ffc17114: 7d 28 48 50 subf r9,r8,r9 ffc17118: a0 bf 00 00 lhz r5,0(r31) fat_block_num_to_sector_num (fs_info, fat_sector_num_to_block_num (fs_info, sector))) << fs_info->vol.sec_log2); ffc1711c: 7d 2a 50 30 slw r10,r9,r10 ffc17120: 7c 84 52 14 add r4,r4,r10 ffc17124: 48 00 b2 59 bl ffc2237c return RC_OK; if (fs_info->c.modified) { uint32_t sec_num = fs_info->c.blk_num; bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) && ffc17128: 3b c0 00 01 li r30,1 ffc1712c: 4b ff fe a0 b ffc16fcc if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(bd->buffer + blk_ofs, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(bd); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); ffc17130: 48 00 a5 6d bl ffc2169c <__errno> <== NOT EXECUTED ffc17134: 39 20 00 0c li r9,12 <== NOT EXECUTED ffc17138: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED } else { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); ffc1713c: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc17140: 4b ff ff 84 b ffc170c4 <== NOT EXECUTED ffc17144: 48 00 a5 59 bl ffc2169c <__errno> <== NOT EXECUTED ffc17148: 39 20 00 05 li r9,5 <== NOT EXECUTED ffc1714c: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED ffc17150: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc17154: 4b ff ff 70 b ffc170c4 <== NOT EXECUTED =============================================================================== ffc17450 : fat_fs_info_t *fs_info, const uint32_t start_cln, const uint32_t offset, const uint32_t count, const uint8_t pattern) { ffc17450: 94 21 ff c0 stwu r1,-64(r1) ffc17454: 7c 08 02 a6 mflr r0 ffc17458: 90 01 00 44 stw r0,68(r1) ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); ffc1745c: a1 23 00 06 lhz r9,6(r3) fat_fs_info_t *fs_info, const uint32_t start_cln, const uint32_t offset, const uint32_t count, const uint8_t pattern) { ffc17460: 93 01 00 20 stw r24,32(r1) ffc17464: 7c f8 3b 78 mr r24,r7 ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); ffc17468: 7d 25 48 50 subf r9,r5,r9 ffc1746c: 7f 86 48 40 cmplw cr7,r6,r9 fat_fs_info_t *fs_info, const uint32_t start_cln, const uint32_t offset, const uint32_t count, const uint8_t pattern) { ffc17470: 93 81 00 30 stw r28,48(r1) ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); ffc17474: 7c dc 33 78 mr r28,r6 fat_fs_info_t *fs_info, const uint32_t start_cln, const uint32_t offset, const uint32_t count, const uint8_t pattern) { ffc17478: 93 a1 00 34 stw r29,52(r1) ffc1747c: 7c 7d 1b 78 mr r29,r3 ffc17480: 92 e1 00 1c stw r23,28(r1) ffc17484: 93 21 00 24 stw r25,36(r1) ffc17488: 93 41 00 28 stw r26,40(r1) ffc1748c: 93 61 00 2c stw r27,44(r1) ffc17490: 93 c1 00 38 stw r30,56(r1) ffc17494: 93 e1 00 3c stw r31,60(r1) ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); ffc17498: 40 9d 00 08 ble- cr7,ffc174a0 <== ALWAYS TAKEN ffc1749c: 7d 3c 4b 78 mr r28,r9 <== NOT EXECUTED fat_cluster_num_to_block_num (const fat_fs_info_t *fs_info, uint32_t cln) { uint32_t blk; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc174a0: 2f 84 00 00 cmpwi cr7,r4,0 ffc174a4: 40 9e 00 10 bne- cr7,ffc174b4 <== ALWAYS TAKEN ffc174a8: 89 3d 00 0e lbz r9,14(r29) <== NOT EXECUTED ffc174ac: 71 2a 00 03 andi. r10,r9,3 <== NOT EXECUTED ffc174b0: 40 82 01 78 bne- ffc17628 <== NOT EXECUTED static inline uint32_t fat_sector_num_to_block_num (const fat_fs_info_t *fs_info, const uint32_t sector_number) { return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); ffc174b4: 89 1d 00 02 lbz r8,2(r29) blk = fat_sector_num_to_block_num(fs_info, fs_info->vol.rdir_loc); else { cln -= FAT_RSRVD_CLN; ffc174b8: 38 84 ff fe addi r4,r4,-2 blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); ffc174bc: 88 fd 00 0c lbz r7,12(r29) ffc174c0: 89 5d 00 08 lbz r10,8(r29) ffc174c4: 55 1a 06 3e clrlwi r26,r8,24 ffc174c8: 81 3d 00 34 lwz r9,52(r29) ffc174cc: 7f 5a 38 50 subf r26,r26,r7 ffc174d0: 7d 47 50 50 subf r10,r7,r10 ffc174d4: 7d 29 d4 30 srw r9,r9,r26 ffc174d8: 7c 84 50 30 slw r4,r4,r10 blk += fat_sector_num_to_block_num(fs_info, fs_info->vol.data_fsec); ffc174dc: 7f 49 22 14 add r26,r9,r4 ssize_t ret; cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) ffc174e0: 2f 9c 00 00 cmpwi cr7,r28,0 const uint8_t pattern) { ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2; ffc174e4: 7c a9 3c 30 srw r9,r5,r7 uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); ffc174e8: 7d 3b 38 30 slw r27,r9,r7 ssize_t ret; cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) ffc174ec: 3b 20 00 00 li r25,0 { ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2; uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); ffc174f0: 7f 7b 28 50 subf r27,r27,r5 ssize_t bytes_written = 0; ssize_t ret; cur_blk += blocks_in_offset; ffc174f4: 7f 49 d2 14 add r26,r9,r26 while ( (RC_OK == rc) && (0 < bytes_to_write)) ffc174f8: 41 9e 00 f8 beq- cr7,ffc175f0 <== NEVER TAKEN } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; ffc174fc: 3a e0 00 01 li r23,1 { uint32_t c = MIN(bytes_to_write, (fs_info->vol.bytes_per_block - ofs_blk)); ffc17500: a1 5d 00 0a lhz r10,10(r29) ffc17504: 7d 3b 50 50 subf r9,r27,r10 ffc17508: 7f 89 e0 40 cmplw cr7,r9,r28 ffc1750c: 7d 3f 4b 78 mr r31,r9 ffc17510: 40 9d 00 08 ble- cr7,ffc17518 <== ALWAYS TAKEN ffc17514: 7f 9f e3 78 mr r31,r28 <== NOT EXECUTED const uint32_t offset, const uint32_t count, const uint8_t pattern) { int rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset)); ffc17518: 7f 9f 48 40 cmplw cr7,r31,r9 ffc1751c: 7f fe fb 78 mr r30,r31 ffc17520: 40 9d 00 08 ble- cr7,ffc17528 <== ALWAYS TAKEN ffc17524: 7d 3e 4b 78 mr r30,r9 <== NOT EXECUTED uint8_t *blk_buf; uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk); if (0 < bytes_to_write) ffc17528: 2f 9e 00 00 cmpwi cr7,r30,0 uint32_t ino ) { return (ino >= fs_info->uino_base); } ffc1752c: 55 09 06 3e clrlwi r9,r8,24 int rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset)); uint8_t *blk_buf; uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk); if (0 < bytes_to_write) ffc17530: 41 9e 00 84 beq- cr7,ffc175b4 <== NEVER TAKEN { if (bytes_to_write == fs_info->vol.bytes_per_block) ffc17534: 7f 8a f0 00 cmpw cr7,r10,r30 static inline uint32_t fat_block_num_to_sector_num (const fat_fs_info_t *fs_info, const uint32_t block_number) { return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); ffc17538: 7d 29 38 50 subf r9,r9,r7 { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); ffc1753c: 7f a3 eb 78 mr r3,r29 ffc17540: 7f 44 48 30 slw r4,r26,r9 uint8_t *blk_buf; uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk); if (0 < bytes_to_write) { if (bytes_to_write == fs_info->vol.bytes_per_block) ffc17544: 41 9e 00 9c beq- cr7,ffc175e0 { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); } else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); ffc17548: 38 a0 00 01 li r5,1 ffc1754c: 38 c1 00 08 addi r6,r1,8 ffc17550: 4b ff fc 09 bl ffc17158 if (RC_OK == rc) ffc17554: 2f 83 00 00 cmpwi cr7,r3,0 ffc17558: 41 9e 00 44 beq- cr7,ffc1759c <== ALWAYS TAKEN fs_info, cur_blk, ofs_blk, c, pattern); if (c != ret) ffc1755c: 7f 83 f8 00 cmpw cr7,r3,r31 <== NOT EXECUTED ffc17560: 41 9e 00 60 beq- cr7,ffc175c0 <== NOT EXECUTED } if (RC_OK != rc) return rc; else return bytes_written; } ffc17564: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED fs_info, cur_blk, ofs_blk, c, pattern); if (c != ret) ffc17568: 38 60 ff ff li r3,-1 <== NOT EXECUTED } if (RC_OK != rc) return rc; else return bytes_written; } ffc1756c: 82 e1 00 1c lwz r23,28(r1) <== NOT EXECUTED ffc17570: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc17574: 83 01 00 20 lwz r24,32(r1) <== NOT EXECUTED ffc17578: 83 21 00 24 lwz r25,36(r1) <== NOT EXECUTED ffc1757c: 83 41 00 28 lwz r26,40(r1) <== NOT EXECUTED ffc17580: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc17584: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc17588: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc1758c: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc17590: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc17594: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc17598: 4e 80 00 20 blr <== NOT EXECUTED else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); if (RC_OK == rc) { memset(blk_buf + offset, pattern, bytes_to_write); ffc1759c: 80 61 00 08 lwz r3,8(r1) ffc175a0: 7f 04 c3 78 mr r4,r24 ffc175a4: 7f c5 f3 78 mr r5,r30 ffc175a8: 7c 63 da 14 add r3,r3,r27 ffc175ac: 48 00 ae c5 bl ffc22470 } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; ffc175b0: 9a fd 00 88 stb r23,136(r29) } } if (RC_OK != rc) return rc; else return bytes_to_write; ffc175b4: 7f c3 f3 78 mr r3,r30 fs_info, cur_blk, ofs_blk, c, pattern); if (c != ret) ffc175b8: 7f 83 f8 00 cmpw cr7,r3,r31 ffc175bc: 40 9e ff a8 bne+ cr7,ffc17564 <== NEVER TAKEN ssize_t ret; cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) ffc175c0: 7f 83 e0 51 subf. r28,r3,r28 if (c != ret) rc = -1; else { bytes_to_write -= ret; bytes_written += ret; ffc175c4: 7f 39 1a 14 add r25,r25,r3 ++cur_blk; ffc175c8: 3b 5a 00 01 addi r26,r26,1 ssize_t ret; cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) ffc175cc: 41 82 00 24 beq- ffc175f0 <== ALWAYS TAKEN ffc175d0: 88 fd 00 0c lbz r7,12(r29) <== NOT EXECUTED ffc175d4: 3b 60 00 00 li r27,0 <== NOT EXECUTED ffc175d8: 89 1d 00 02 lbz r8,2(r29) <== NOT EXECUTED ffc175dc: 4b ff ff 24 b ffc17500 <== NOT EXECUTED if (0 < bytes_to_write) { if (bytes_to_write == fs_info->vol.bytes_per_block) { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); ffc175e0: 38 a0 00 02 li r5,2 ffc175e4: 38 c1 00 08 addi r6,r1,8 ffc175e8: 4b ff fb 71 bl ffc17158 ffc175ec: 4b ff ff 68 b ffc17554 } if (RC_OK != rc) return rc; else return bytes_written; } ffc175f0: 80 01 00 44 lwz r0,68(r1) fs_info, cur_blk, ofs_blk, c, pattern); if (c != ret) ffc175f4: 7f 23 cb 78 mr r3,r25 } if (RC_OK != rc) return rc; else return bytes_written; } ffc175f8: 82 e1 00 1c lwz r23,28(r1) ffc175fc: 7c 08 03 a6 mtlr r0 ffc17600: 83 01 00 20 lwz r24,32(r1) ffc17604: 83 21 00 24 lwz r25,36(r1) ffc17608: 83 41 00 28 lwz r26,40(r1) ffc1760c: 83 61 00 2c lwz r27,44(r1) ffc17610: 83 81 00 30 lwz r28,48(r1) ffc17614: 83 a1 00 34 lwz r29,52(r1) ffc17618: 83 c1 00 38 lwz r30,56(r1) ffc1761c: 83 e1 00 3c lwz r31,60(r1) ffc17620: 38 21 00 40 addi r1,r1,64 ffc17624: 4e 80 00 20 blr static inline uint32_t fat_sector_num_to_block_num (const fat_fs_info_t *fs_info, const uint32_t sector_number) { return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); ffc17628: 89 1d 00 02 lbz r8,2(r29) <== NOT EXECUTED uint32_t ino ) { return (ino >= fs_info->uino_base); } ffc1762c: 88 fd 00 0c lbz r7,12(r29) <== NOT EXECUTED ffc17630: 55 1a 06 3e clrlwi r26,r8,24 <== NOT EXECUTED ffc17634: 81 3d 00 20 lwz r9,32(r29) <== NOT EXECUTED ffc17638: 7f 5a 38 50 subf r26,r26,r7 <== NOT EXECUTED ffc1763c: 7d 3a d4 30 srw r26,r9,r26 <== NOT EXECUTED ffc17640: 4b ff fe a0 b ffc174e0 <== NOT EXECUTED =============================================================================== ffc17644 : const uint32_t start_cln, const uint32_t offset, const uint32_t count, const void *buff, const bool overwrite_cluster) { ffc17644: 94 21 ff c0 stwu r1,-64(r1) ffc17648: 7c 08 02 a6 mflr r0 ffc1764c: 7d 80 00 26 mfcr r12 ffc17650: 90 01 00 44 stw r0,68(r1) ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); ffc17654: a1 23 00 06 lhz r9,6(r3) const uint32_t start_cln, const uint32_t offset, const uint32_t count, const void *buff, const bool overwrite_cluster) { ffc17658: 93 01 00 20 stw r24,32(r1) ffc1765c: 7c f8 3b 78 mr r24,r7 ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); ffc17660: 7d 25 48 50 subf r9,r5,r9 ffc17664: 7f 86 48 40 cmplw cr7,r6,r9 const uint32_t start_cln, const uint32_t offset, const uint32_t count, const void *buff, const bool overwrite_cluster) { ffc17668: 93 81 00 30 stw r28,48(r1) ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); ffc1766c: 7c dc 33 78 mr r28,r6 const uint32_t start_cln, const uint32_t offset, const uint32_t count, const void *buff, const bool overwrite_cluster) { ffc17670: 93 a1 00 34 stw r29,52(r1) ffc17674: 7c 7d 1b 78 mr r29,r3 ffc17678: 92 e1 00 1c stw r23,28(r1) ffc1767c: 93 21 00 24 stw r25,36(r1) ffc17680: 93 41 00 28 stw r26,40(r1) ffc17684: 93 61 00 2c stw r27,44(r1) ffc17688: 93 c1 00 38 stw r30,56(r1) ffc1768c: 93 e1 00 3c stw r31,60(r1) ffc17690: 91 81 00 18 stw r12,24(r1) ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); ffc17694: 40 9d 00 08 ble- cr7,ffc1769c <== ALWAYS TAKEN ffc17698: 7d 3c 4b 78 mr r28,r9 <== NOT EXECUTED fat_cluster_num_to_block_num (const fat_fs_info_t *fs_info, uint32_t cln) { uint32_t blk; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc1769c: 2f 84 00 00 cmpwi cr7,r4,0 ffc176a0: 40 9e 00 10 bne- cr7,ffc176b0 ffc176a4: 89 3d 00 0e lbz r9,14(r29) ffc176a8: 71 2a 00 03 andi. r10,r9,3 ffc176ac: 40 82 01 94 bne- ffc17840 <== ALWAYS TAKEN ffc176b0: 88 dd 00 02 lbz r6,2(r29) blk = fat_sector_num_to_block_num(fs_info, fs_info->vol.rdir_loc); else { cln -= FAT_RSRVD_CLN; ffc176b4: 38 84 ff fe addi r4,r4,-2 blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); ffc176b8: 88 fd 00 0c lbz r7,12(r29) ffc176bc: 89 5d 00 08 lbz r10,8(r29) ffc176c0: 54 da 06 3e clrlwi r26,r6,24 ffc176c4: 81 3d 00 34 lwz r9,52(r29) ffc176c8: 7f 5a 38 50 subf r26,r26,r7 ffc176cc: 7d 47 50 50 subf r10,r7,r10 ffc176d0: 7d 29 d4 30 srw r9,r9,r26 ffc176d4: 7c 84 50 30 slw r4,r4,r10 blk += fat_sector_num_to_block_num(fs_info, fs_info->vol.data_fsec); ffc176d8: 7f 49 22 14 add r26,r9,r4 uint32_t c; cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) ffc176dc: 2f 9c 00 00 cmpwi cr7,r28,0 const bool overwrite_cluster) { ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); uint32_t blocks_in_offset = (offset >> fs_info->vol.bytes_per_block_log2); ffc176e0: 7c a9 3c 30 srw r9,r5,r7 uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); ffc176e4: 7d 3b 38 30 slw r27,r9,r7 ffc176e8: 7f 7b 28 50 subf r27,r27,r5 ssize_t bytes_written = 0; uint8_t *buffer = (uint8_t*)buff; ssize_t ret; uint32_t c; cur_blk += blocks_in_offset; ffc176ec: 7f 49 d2 14 add r26,r9,r26 while ( (RC_OK == rc) && (0 < bytes_to_write)) ffc176f0: 41 9e 01 0c beq- cr7,ffc177fc <== NEVER TAKEN uint8_t *blk_buf; uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk); if (0 < bytes_to_write) { if ( overwrite_block ffc176f4: 2e 08 00 00 cmpwi cr4,r8,0 uint32_t c; cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) ffc176f8: 3b 20 00 00 li r25,0 } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; ffc176fc: 3a e0 00 01 li r23,1 { c = MIN(bytes_to_write, (fs_info->vol.bytes_per_block - ofs_blk)); ffc17700: a1 5d 00 0a lhz r10,10(r29) ffc17704: 7d 3b 50 50 subf r9,r27,r10 ffc17708: 7f 89 e0 40 cmplw cr7,r9,r28 ffc1770c: 7d 3f 4b 78 mr r31,r9 ffc17710: 40 9d 00 08 ble- cr7,ffc17718 ffc17714: 7f 9f e3 78 mr r31,r28 const uint32_t count, const void *buf, const bool overwrite_block) { int rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset)); ffc17718: 7f 9f 48 40 cmplw cr7,r31,r9 ffc1771c: 7f fe fb 78 mr r30,r31 ffc17720: 40 9d 00 08 ble- cr7,ffc17728 <== ALWAYS TAKEN ffc17724: 7d 3e 4b 78 mr r30,r9 <== NOT EXECUTED uint8_t *blk_buf; uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk); if (0 < bytes_to_write) ffc17728: 2f 9e 00 00 cmpwi cr7,r30,0 uint32_t ino ) { return (ino >= fs_info->uino_base); } ffc1772c: 54 c9 06 3e clrlwi r9,r6,24 int rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset)); uint8_t *blk_buf; uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk); if (0 < bytes_to_write) ffc17730: 41 9e 00 90 beq- cr7,ffc177c0 <== NEVER TAKEN static inline uint32_t fat_block_num_to_sector_num (const fat_fs_info_t *fs_info, const uint32_t block_number) { return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); ffc17734: 7d 29 38 50 subf r9,r9,r7 ffc17738: 7f 44 48 30 slw r4,r26,r9 { if ( overwrite_block || (bytes_to_write == fs_info->vol.bytes_per_block)) { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); ffc1773c: 7f a3 eb 78 mr r3,r29 uint8_t *blk_buf; uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk); if (0 < bytes_to_write) { if ( overwrite_block ffc17740: 40 92 00 ac bne- cr4,ffc177ec || (bytes_to_write == fs_info->vol.bytes_per_block)) ffc17744: 7f 8a f0 00 cmpw cr7,r10,r30 ffc17748: 41 9e 00 a4 beq- cr7,ffc177ec { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); } else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); ffc1774c: 38 a0 00 01 li r5,1 ffc17750: 38 c1 00 08 addi r6,r1,8 ffc17754: 4b ff fa 05 bl ffc17158 if (RC_OK == rc) ffc17758: 2f 83 00 00 cmpwi cr7,r3,0 ffc1775c: 41 9e 00 4c beq- cr7,ffc177a8 <== ALWAYS TAKEN cur_blk, ofs_blk, c, &buffer[bytes_written], overwrite_cluster); if (c != ret) ffc17760: 7f 83 f8 00 cmpw cr7,r3,r31 <== NOT EXECUTED ffc17764: 41 9e 00 68 beq- cr7,ffc177cc <== NOT EXECUTED } if (RC_OK != rc) return rc; else return bytes_written; } ffc17768: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED cur_blk, ofs_blk, c, &buffer[bytes_written], overwrite_cluster); if (c != ret) ffc1776c: 38 60 ff ff li r3,-1 <== NOT EXECUTED } if (RC_OK != rc) return rc; else return bytes_written; } ffc17770: 81 81 00 18 lwz r12,24(r1) <== NOT EXECUTED ffc17774: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc17778: 82 e1 00 1c lwz r23,28(r1) <== NOT EXECUTED ffc1777c: 83 01 00 20 lwz r24,32(r1) <== NOT EXECUTED ffc17780: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED ffc17784: 83 21 00 24 lwz r25,36(r1) <== NOT EXECUTED ffc17788: 83 41 00 28 lwz r26,40(r1) <== NOT EXECUTED ffc1778c: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc17790: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc17794: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc17798: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc1779c: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc177a0: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc177a4: 4e 80 00 20 blr <== NOT EXECUTED else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); if (RC_OK == rc) { memcpy(blk_buf + offset, buf, bytes_to_write); ffc177a8: 80 61 00 08 lwz r3,8(r1) ffc177ac: 7c 98 ca 14 add r4,r24,r25 ffc177b0: 7f c5 f3 78 mr r5,r30 ffc177b4: 7c 63 da 14 add r3,r3,r27 ffc177b8: 48 00 ab c5 bl ffc2237c } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; ffc177bc: 9a fd 00 88 stb r23,136(r29) } } if (RC_OK != rc) return rc; else return bytes_to_write; ffc177c0: 7f c3 f3 78 mr r3,r30 cur_blk, ofs_blk, c, &buffer[bytes_written], overwrite_cluster); if (c != ret) ffc177c4: 7f 83 f8 00 cmpw cr7,r3,r31 ffc177c8: 40 9e ff a0 bne+ cr7,ffc17768 <== NEVER TAKEN uint32_t c; cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) ffc177cc: 7f 83 e0 51 subf. r28,r3,r28 if (c != ret) rc = -1; else { bytes_to_write -= ret; bytes_written += ret; ffc177d0: 7f 39 1a 14 add r25,r25,r3 ++cur_blk; ffc177d4: 3b 5a 00 01 addi r26,r26,1 uint32_t c; cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) ffc177d8: 41 82 00 28 beq- ffc17800 <== ALWAYS TAKEN ffc177dc: 88 fd 00 0c lbz r7,12(r29) <== NOT EXECUTED ffc177e0: 3b 60 00 00 li r27,0 <== NOT EXECUTED ffc177e4: 88 dd 00 02 lbz r6,2(r29) <== NOT EXECUTED ffc177e8: 4b ff ff 18 b ffc17700 <== NOT EXECUTED if (0 < bytes_to_write) { if ( overwrite_block || (bytes_to_write == fs_info->vol.bytes_per_block)) { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); ffc177ec: 38 a0 00 02 li r5,2 ffc177f0: 38 c1 00 08 addi r6,r1,8 ffc177f4: 4b ff f9 65 bl ffc17158 ffc177f8: 4b ff ff 60 b ffc17758 ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); uint32_t blocks_in_offset = (offset >> fs_info->vol.bytes_per_block_log2); uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); ssize_t bytes_written = 0; ffc177fc: 3b 20 00 00 li r25,0 <== NOT EXECUTED } if (RC_OK != rc) return rc; else return bytes_written; } ffc17800: 80 01 00 44 lwz r0,68(r1) cur_blk, ofs_blk, c, &buffer[bytes_written], overwrite_cluster); if (c != ret) ffc17804: 7f 23 cb 78 mr r3,r25 } if (RC_OK != rc) return rc; else return bytes_written; } ffc17808: 81 81 00 18 lwz r12,24(r1) ffc1780c: 7c 08 03 a6 mtlr r0 ffc17810: 82 e1 00 1c lwz r23,28(r1) ffc17814: 83 01 00 20 lwz r24,32(r1) ffc17818: 7d 80 81 20 mtcrf 8,r12 ffc1781c: 83 21 00 24 lwz r25,36(r1) ffc17820: 83 41 00 28 lwz r26,40(r1) ffc17824: 83 61 00 2c lwz r27,44(r1) ffc17828: 83 81 00 30 lwz r28,48(r1) ffc1782c: 83 a1 00 34 lwz r29,52(r1) ffc17830: 83 c1 00 38 lwz r30,56(r1) ffc17834: 83 e1 00 3c lwz r31,60(r1) ffc17838: 38 21 00 40 addi r1,r1,64 ffc1783c: 4e 80 00 20 blr static inline uint32_t fat_sector_num_to_block_num (const fat_fs_info_t *fs_info, const uint32_t sector_number) { return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); ffc17840: 88 dd 00 02 lbz r6,2(r29) uint32_t ino ) { return (ino >= fs_info->uino_base); } ffc17844: 88 fd 00 0c lbz r7,12(r29) ffc17848: 54 da 06 3e clrlwi r26,r6,24 ffc1784c: 81 3d 00 20 lwz r9,32(r29) ffc17850: 7f 5a 38 50 subf r26,r26,r7 ffc17854: 7d 3a d4 30 srw r26,r9,r26 ffc17858: 4b ff fe 84 b ffc176dc =============================================================================== ffc16614 : int fat_file_close( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { ffc16614: 94 21 ff e8 stwu r1,-24(r1) ffc16618: 7c 08 02 a6 mflr r0 ffc1661c: 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) ffc16620: 81 24 00 08 lwz r9,8(r4) int fat_file_close( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { ffc16624: 93 e1 00 14 stw r31,20(r1) ffc16628: 7c 9f 23 78 mr r31,r4 /* * 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) ffc1662c: 2b 89 00 01 cmplwi cr7,r9,1 int fat_file_close( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { ffc16630: 93 a1 00 0c stw r29,12(r1) ffc16634: 93 c1 00 10 stw r30,16(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) ffc16638: 40 9d 00 2c ble- cr7,ffc16664 { fat_fd->links_num--; ffc1663c: 39 29 ff ff addi r9,r9,-1 ffc16640: 91 24 00 08 stw r9,8(r4) return rc; ffc16644: 38 60 00 00 li r3,0 * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); return rc; } ffc16648: 80 01 00 1c lwz r0,28(r1) ffc1664c: 83 a1 00 0c lwz r29,12(r1) ffc16650: 7c 08 03 a6 mtlr r0 ffc16654: 83 c1 00 10 lwz r30,16(r1) ffc16658: 83 e1 00 14 lwz r31,20(r1) ffc1665c: 38 21 00 18 addi r1,r1,24 ffc16660: 4e 80 00 20 blr return rc; } key = fat_construct_key(fs_info, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) ffc16664: 89 24 00 30 lbz r9,48(r4) ffc16668: 7c 7e 1b 78 mr r30,r3 ffc1666c: 71 3d 00 01 andi. r29,r9,1 ffc16670: 41 82 00 58 beq- ffc166c8 { rc = fat_file_truncate(fs_info, fat_fd, 0); ffc16674: 38 a0 00 00 li r5,0 ffc16678: 4b ff fe 69 bl ffc164e0 if ( rc != RC_OK ) ffc1667c: 2c 03 00 00 cmpwi r3,0 ffc16680: 40 82 ff c8 bne+ ffc16648 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc16684: 7f e3 fb 78 mr r3,r31 ffc16688: 48 00 49 a5 bl ffc1b02c <_Chain_Extract> return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(fs_info, fat_fd->ino) ) ffc1668c: 80 9f 00 0c lwz r4,12(r31) ffc16690: 7f c3 f3 78 mr r3,r30 ffc16694: 48 00 1e 59 bl ffc184ec ffc16698: 2f 83 00 00 cmpwi cr7,r3,0 ffc1669c: 40 9e 00 6c bne- cr7,ffc16708 <== NEVER TAKEN fat_fd->links_num = 0; } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); ffc166a0: 7f e3 fb 78 mr r3,r31 ffc166a4: 4b ff 00 6d bl ffc06710 * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); return rc; } ffc166a8: 80 01 00 1c lwz r0,28(r1) ffc166ac: 83 a1 00 0c lwz r29,12(r1) } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); ffc166b0: 7f c3 f3 78 mr r3,r30 return rc; } ffc166b4: 7c 08 03 a6 mtlr r0 ffc166b8: 83 c1 00 10 lwz r30,16(r1) ffc166bc: 83 e1 00 14 lwz r31,20(r1) ffc166c0: 38 21 00 18 addi r1,r1,24 } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); ffc166c4: 48 00 08 b0 b ffc16f74 free(fat_fd); } else { if (fat_ino_is_unique(fs_info, fat_fd->ino)) ffc166c8: 80 84 00 0c lwz r4,12(r4) ffc166cc: 48 00 1e 21 bl ffc184ec ffc166d0: 2f 83 00 00 cmpwi cr7,r3,0 ffc166d4: 41 9e 00 28 beq- cr7,ffc166fc * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); return rc; } ffc166d8: 80 01 00 1c lwz r0,28(r1) } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); ffc166dc: 7f c3 f3 78 mr r3,r30 } else { if (fat_ino_is_unique(fs_info, fat_fd->ino)) { fat_fd->links_num = 0; ffc166e0: 93 bf 00 08 stw r29,8(r31) * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); return rc; } ffc166e4: 7c 08 03 a6 mtlr r0 ffc166e8: 83 a1 00 0c lwz r29,12(r1) ffc166ec: 83 c1 00 10 lwz r30,16(r1) ffc166f0: 83 e1 00 14 lwz r31,20(r1) ffc166f4: 38 21 00 18 addi r1,r1,24 } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); ffc166f8: 48 00 08 7c b ffc16f74 ffc166fc: 7f e3 fb 78 mr r3,r31 ffc16700: 48 00 49 2d bl ffc1b02c <_Chain_Extract> ffc16704: 4b ff ff 9c b ffc166a0 return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(fs_info, fat_fd->ino) ) fat_free_unique_ino(fs_info, fat_fd->ino); ffc16708: 80 9f 00 0c lwz r4,12(r31) <== NOT EXECUTED ffc1670c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc16710: 48 00 1d b1 bl ffc184c0 <== NOT EXECUTED ffc16714: 4b ff ff 8c b ffc166a0 <== NOT EXECUTED =============================================================================== ffc16818 : fat_file_fd_t *fat_fd, bool zero_fill, uint32_t new_length, uint32_t *a_length ) { ffc16818: 94 21 ff c0 stwu r1,-64(r1) ffc1681c: 7c 08 02 a6 mflr r0 int rc = RC_OK; uint32_t chain = 0; ffc16820: 39 40 00 00 li r10,0 fat_file_fd_t *fat_fd, bool zero_fill, uint32_t new_length, uint32_t *a_length ) { ffc16824: 93 81 00 30 stw r28,48(r1) ffc16828: 7c fc 3b 78 mr r28,r7 ffc1682c: 90 01 00 44 stw r0,68(r1) ffc16830: 93 c1 00 38 stw r30,56(r1) ffc16834: 7c 9e 23 78 mr r30,r4 ffc16838: 93 e1 00 3c stw r31,60(r1) ffc1683c: 7c df 33 78 mr r31,r6 ffc16840: 92 e1 00 1c stw r23,28(r1) ffc16844: 93 01 00 20 stw r24,32(r1) ffc16848: 93 21 00 24 stw r25,36(r1) ffc1684c: 93 41 00 28 stw r26,40(r1) ffc16850: 93 61 00 2c stw r27,44(r1) ffc16854: 93 a1 00 34 stw r29,52(r1) uint32_t last_cl = 0; uint32_t bytes_remain = 0; uint32_t cls_added; ssize_t bytes_written; *a_length = new_length; ffc16858: 90 dc 00 00 stw r6,0(r28) if (new_length <= fat_fd->fat_file_size) ffc1685c: 81 24 00 18 lwz r9,24(r4) uint32_t new_length, uint32_t *a_length ) { int rc = RC_OK; uint32_t chain = 0; ffc16860: 91 41 00 14 stw r10,20(r1) uint32_t cls_added; ssize_t bytes_written; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) ffc16864: 7f 86 48 40 cmplw cr7,r6,r9 int rc = RC_OK; uint32_t chain = 0; uint32_t bytes2add = 0; uint32_t cls2add = 0; uint32_t old_last_cl; uint32_t last_cl = 0; ffc16868: 91 41 00 0c stw r10,12(r1) uint32_t cls_added; ssize_t bytes_written; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) ffc1686c: 40 9d 00 58 ble- cr7,ffc168c4 return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc16870: 81 44 00 20 lwz r10,32(r4) ffc16874: 7c 7d 1b 78 mr r29,r3 ffc16878: 7c b9 2b 78 mr r25,r5 ffc1687c: 2f 8a 00 01 cmpwi cr7,r10,1 ffc16880: 41 9e 01 48 beq- cr7,ffc169c8 (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - ffc16884: a3 5d 00 06 lhz r26,6(r29) (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; ffc16888: 7d 09 f8 50 subf r8,r9,r31 if (bytes2add > bytes_remain) bytes2add -= bytes_remain; else bytes2add = 0; ffc1688c: 3b 00 00 00 li r24,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))) & ffc16890: 39 5a ff ff addi r10,r26,-1 ffc16894: 7d 57 48 38 and r23,r10,r9 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 - ffc16898: 7f 57 d0 50 subf r26,r23,r26 ffc1689c: 7f 5a 50 38 and r26,r26,r10 (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; if (bytes2add > bytes_remain) ffc168a0: 7f 9a 40 40 cmplw cr7,r26,r8 ffc168a4: 40 9c 00 08 bge- cr7,ffc168ac bytes2add -= bytes_remain; ffc168a8: 7f 1a 40 50 subf r24,r26,r8 else bytes2add = 0; if (zero_fill && bytes_remain > 0) { ffc168ac: 2f 99 00 00 cmpwi cr7,r25,0 ffc168b0: 41 9e 00 0c beq- cr7,ffc168bc ffc168b4: 2f 9a 00 00 cmpwi cr7,r26,0 ffc168b8: 40 9e 01 3c bne- cr7,ffc169f4 /* * 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) ffc168bc: 2f 98 00 00 cmpwi cr7,r24,0 ffc168c0: 40 9e 00 40 bne- cr7,ffc16900 ssize_t bytes_written; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; ffc168c4: 3b 60 00 00 li r27,0 *a_length = new_length; fat_fd->fat_file_size = new_length; return RC_OK; } ffc168c8: 80 01 00 44 lwz r0,68(r1) ffc168cc: 7f 63 db 78 mr r3,r27 ffc168d0: 82 e1 00 1c lwz r23,28(r1) ffc168d4: 7c 08 03 a6 mtlr r0 ffc168d8: 83 01 00 20 lwz r24,32(r1) ffc168dc: 83 21 00 24 lwz r25,36(r1) ffc168e0: 83 41 00 28 lwz r26,40(r1) ffc168e4: 83 61 00 2c lwz r27,44(r1) ffc168e8: 83 81 00 30 lwz r28,48(r1) ffc168ec: 83 a1 00 34 lwz r29,52(r1) ffc168f0: 83 c1 00 38 lwz r30,56(r1) ffc168f4: 83 e1 00 3c lwz r31,60(r1) ffc168f8: 38 21 00 40 addi r1,r1,64 ffc168fc: 4e 80 00 20 blr * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; ffc16900: 89 3d 00 08 lbz r9,8(r29) ffc16904: 3a f8 ff ff addi r23,r24,-1 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, ffc16908: 7f a3 eb 78 mr r3,r29 * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; ffc1690c: 7e f7 4c 30 srw r23,r23,r9 ffc16910: 3a f7 00 01 addi r23,r23,1 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, ffc16914: 38 81 00 14 addi r4,r1,20 ffc16918: 7e e5 bb 78 mr r5,r23 ffc1691c: 38 c1 00 08 addi r6,r1,8 ffc16920: 38 e1 00 0c addi r7,r1,12 ffc16924: 7f 28 cb 78 mr r8,r25 ffc16928: 48 00 8c 9d bl ffc1f5c4 &cls_added, &last_cl, zero_fill); /* this means that low level I/O error occured */ if (rc != RC_OK) ffc1692c: 7c 7b 1b 79 mr. r27,r3 ffc16930: 40 a2 ff 98 bne- ffc168c8 <== NEVER TAKEN return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) ffc16934: 81 21 00 08 lwz r9,8(r1) ffc16938: 7f 4a 4b 79 or. r10,r26,r9 ffc1693c: 41 82 00 a4 beq- ffc169e0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) ffc16940: 7f 97 48 00 cmpw cr7,r23,r9 ffc16944: 41 9e 00 24 beq- cr7,ffc16968 <== ALWAYS TAKEN { new_length -= bytes2add & (fs_info->vol.bpc - 1); ffc16948: a1 1d 00 06 lhz r8,6(r29) <== NOT EXECUTED new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2; ffc1694c: 7e e9 b8 50 subf r23,r9,r23 <== NOT EXECUTED ffc16950: 89 5d 00 08 lbz r10,8(r29) <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) { new_length -= bytes2add & (fs_info->vol.bpc - 1); ffc16954: 39 08 ff ff addi r8,r8,-1 <== NOT EXECUTED ffc16958: 7f 18 40 38 and r24,r24,r8 <== NOT EXECUTED ffc1695c: 7f f8 f8 50 subf r31,r24,r31 <== NOT EXECUTED new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2; ffc16960: 7e f7 50 30 slw r23,r23,r10 <== NOT EXECUTED ffc16964: 7f f7 f8 50 subf r31,r23,r31 <== NOT EXECUTED } /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) ffc16968: 80 de 00 18 lwz r6,24(r30) ffc1696c: 2f 86 00 00 cmpwi cr7,r6,0 ffc16970: 40 9e 00 d8 bne- cr7,ffc16a48 { fat_fd->map.disk_cln = fat_fd->cln = chain; ffc16974: 81 41 00 14 lwz r10,20(r1) fat_fd->map.file_cln = 0; ffc16978: 90 de 00 34 stw r6,52(r30) } /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) { fat_fd->map.disk_cln = fat_fd->cln = chain; ffc1697c: 91 5e 00 1c stw r10,28(r30) ffc16980: 91 5e 00 38 stw r10,56(r30) } fat_buf_release(fs_info); } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) ffc16984: 2f 89 00 00 cmpwi cr7,r9,0 ffc16988: 41 9e 00 b4 beq- cr7,ffc16a3c <== NEVER TAKEN { fat_fd->map.last_cln = last_cl; if (fat_fd->fat_file_type == FAT_DIRECTORY) ffc1698c: 81 3e 00 10 lwz r9,16(r30) ffc16990: 2f 89 00 00 cmpwi cr7,r9,0 } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) { fat_fd->map.last_cln = last_cl; ffc16994: 81 21 00 0c lwz r9,12(r1) ffc16998: 91 3e 00 3c stw r9,60(r30) if (fat_fd->fat_file_type == FAT_DIRECTORY) ffc1699c: 40 be 00 a0 bne+ cr7,ffc16a3c { rc = fat_init_clusters_chain(fs_info, chain); ffc169a0: 80 81 00 14 lwz r4,20(r1) ffc169a4: 7f a3 eb 78 mr r3,r29 ffc169a8: 48 00 19 29 bl ffc182d0 if ( rc != RC_OK ) ffc169ac: 7c 7a 1b 79 mr. r26,r3 ffc169b0: 41 a2 00 8c beq+ ffc16a3c <== ALWAYS TAKEN { fat_free_fat_clusters_chain(fs_info, chain); ffc169b4: 80 81 00 14 lwz r4,20(r1) <== NOT EXECUTED ffc169b8: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc169bc: 7f 5b d3 78 mr r27,r26 <== NOT EXECUTED ffc169c0: 48 00 8a c9 bl ffc1f488 <== NOT EXECUTED ffc169c4: 4b ff ff 04 b ffc168c8 <== 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)) && ffc169c8: 81 44 00 24 lwz r10,36(r4) ffc169cc: 2f 8a 00 00 cmpwi cr7,r10,0 ffc169d0: 40 be fe b4 bne- cr7,ffc16884 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) ffc169d4: 89 43 00 0e lbz r10,14(r3) *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc169d8: 71 48 00 03 andi. r8,r10,3 ffc169dc: 41 82 fe a8 beq+ ffc16884 <== NEVER TAKEN if (rc != RC_OK) return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) rtems_set_errno_and_return_minus_one(ENOSPC); ffc169e0: 48 00 ac bd bl ffc2169c <__errno> ffc169e4: 39 20 00 1c li r9,28 ffc169e8: 91 23 00 00 stw r9,0(r3) ffc169ec: 3b 60 ff ff li r27,-1 ffc169f0: 4b ff fe d8 b ffc168c8 else bytes2add = 0; if (zero_fill && bytes_remain > 0) { uint32_t start = fat_fd->fat_file_size; uint32_t cl_start = start >> fs_info->vol.bpc_log2; ffc169f4: 88 bd 00 08 lbz r5,8(r29) uint32_t ofs = start & (fs_info->vol.bpc - 1); uint32_t cur_cln; rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); ffc169f8: 7f a3 eb 78 mr r3,r29 ffc169fc: 7f c4 f3 78 mr r4,r30 ffc16a00: 7d 25 2c 30 srw r5,r9,r5 ffc16a04: 38 c1 00 08 addi r6,r1,8 ffc16a08: 4b ff f3 f1 bl ffc15df8 if (rc != RC_OK) ffc16a0c: 7c 9b 23 79 mr. r27,r4 ffc16a10: 40 82 fe b8 bne+ ffc168c8 <== NEVER TAKEN return rc; bytes_written = fat_cluster_set (fs_info, cur_cln, ofs, bytes_remain, 0); ffc16a14: 80 81 00 08 lwz r4,8(r1) ffc16a18: 7f a3 eb 78 mr r3,r29 ffc16a1c: 7e e5 bb 78 mr r5,r23 ffc16a20: 7f 46 d3 78 mr r6,r26 ffc16a24: 38 e0 00 00 li r7,0 ffc16a28: 48 00 0a 29 bl ffc17450 if (bytes_remain != bytes_written) return -1; ffc16a2c: 3b 60 ff ff li r27,-1 rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; bytes_written = fat_cluster_set (fs_info, cur_cln, ofs, bytes_remain, 0); if (bytes_remain != bytes_written) ffc16a30: 7f 83 d0 00 cmpw cr7,r3,r26 ffc16a34: 40 9e fe 94 bne+ cr7,ffc168c8 <== NEVER TAKEN ffc16a38: 4b ff fe 84 b ffc168bc return rc; } } } *a_length = new_length; ffc16a3c: 93 fc 00 00 stw r31,0(r28) fat_fd->fat_file_size = new_length; ffc16a40: 93 fe 00 18 stw r31,24(r30) ffc16a44: 4b ff fe 84 b ffc168c8 fat_fd->map.disk_cln = fat_fd->cln = chain; fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) ffc16a48: 80 9e 00 3c lwz r4,60(r30) ffc16a4c: 2f 84 ff ff cmpwi cr7,r4,-1 ffc16a50: 41 9e 00 2c beq- cr7,ffc16a7c <== NEVER TAKEN { old_last_cl = fat_fd->map.last_cln; ffc16a54: 90 81 00 10 stw r4,16(r1) fat_free_fat_clusters_chain(fs_info, chain); return rc; } } rc = fat_set_fat_cluster(fs_info, old_last_cl, chain); ffc16a58: 80 a1 00 14 lwz r5,20(r1) ffc16a5c: 7f a3 eb 78 mr r3,r29 ffc16a60: 48 00 86 f5 bl ffc1f154 if ( rc != RC_OK ) ffc16a64: 7c 7a 1b 79 mr. r26,r3 ffc16a68: 40 a2 ff 4c bne- ffc169b4 <== NEVER TAKEN { fat_free_fat_clusters_chain(fs_info, chain); return rc; } fat_buf_release(fs_info); ffc16a6c: 7f a3 eb 78 mr r3,r29 ffc16a70: 48 00 05 05 bl ffc16f74 ffc16a74: 81 21 00 08 lwz r9,8(r1) ffc16a78: 4b ff ff 0c b ffc16984 { old_last_cl = fat_fd->map.last_cln; } else { rc = fat_file_ioctl(fs_info, fat_fd, F_CLU_NUM, ffc16a7c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc16a80: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc16a84: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc16a88: 38 c6 ff ff addi r6,r6,-1 <== NOT EXECUTED ffc16a8c: 38 e1 00 10 addi r7,r1,16 <== NOT EXECUTED ffc16a90: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc16a94: 4b ff fc 85 bl ffc16718 <== NOT EXECUTED ffc16a98: 80 81 00 10 lwz r4,16(r1) <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) ffc16a9c: 7c 7a 1b 79 mr. r26,r3 <== NOT EXECUTED ffc16aa0: 41 82 ff b8 beq+ ffc16a58 <== NOT EXECUTED ffc16aa4: 4b ff ff 10 b ffc169b4 <== NOT EXECUTED =============================================================================== ffc16718 : uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) ffc16718: 2f 85 00 01 cmpwi cr7,r5,1 fat_file_ioctl( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, int cmd, ...) { ffc1671c: 94 21 ff d0 stwu r1,-48(r1) int rc = RC_OK; uint32_t cur_cln = 0; ffc16720: 39 40 00 00 li r10,0 fat_file_ioctl( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, int cmd, ...) { ffc16724: 7c 08 02 a6 mflr r0 int rc = RC_OK; uint32_t cur_cln = 0; ffc16728: 91 41 00 14 stw r10,20(r1) uint32_t cl_start = 0; uint32_t pos = 0; uint32_t *ret; va_list ap; va_start(ap, cmd); ffc1672c: 39 40 00 03 li r10,3 ffc16730: 39 21 00 10 addi r9,r1,16 ffc16734: 99 41 00 08 stb r10,8(r1) ffc16738: 39 41 00 38 addi r10,r1,56 fat_file_ioctl( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, int cmd, ...) { ffc1673c: 90 01 00 34 stw r0,52(r1) ffc16740: 93 c1 00 28 stw r30,40(r1) ffc16744: 93 e1 00 2c stw r31,44(r1) ffc16748: 90 c1 00 1c stw r6,28(r1) ffc1674c: 90 e1 00 20 stw r7,32(r1) uint32_t cl_start = 0; uint32_t pos = 0; uint32_t *ret; va_list ap; va_start(ap, cmd); ffc16750: 91 41 00 0c stw r10,12(r1) ffc16754: 91 21 00 10 stw r9,16(r1) switch (cmd) ffc16758: 41 9e 00 2c beq- cr7,ffc16784 <== ALWAYS TAKEN *ret = cur_cln; break; default: errno = EINVAL; ffc1675c: 48 00 af 41 bl ffc2169c <__errno> <== NOT EXECUTED ffc16760: 39 20 00 16 li r9,22 <== NOT EXECUTED ffc16764: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED rc = -1; ffc16768: 38 60 ff ff li r3,-1 <== NOT EXECUTED break; } va_end(ap); return rc; } ffc1676c: 80 01 00 34 lwz r0,52(r1) ffc16770: 83 c1 00 28 lwz r30,40(r1) ffc16774: 7c 08 03 a6 mtlr r0 ffc16778: 83 e1 00 2c lwz r31,44(r1) ffc1677c: 38 21 00 30 addi r1,r1,48 ffc16780: 4e 80 00 20 blr case F_CLU_NUM: pos = va_arg(ap, uint32_t); ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { ffc16784: 81 04 00 18 lwz r8,24(r4) switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); ret = va_arg(ap, uint32_t *); ffc16788: 3b e0 00 05 li r31,5 va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); ffc1678c: 7c ca 33 78 mr r10,r6 ret = va_arg(ap, uint32_t *); ffc16790: 9b e1 00 08 stb r31,8(r1) /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { ffc16794: 7f 88 30 40 cmplw cr7,r8,r6 switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); ret = va_arg(ap, uint32_t *); ffc16798: 7c fe 3b 78 mr r30,r7 /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { ffc1679c: 40 9d 00 6c ble- cr7,ffc16808 <== NEVER TAKEN va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc167a0: 81 24 00 20 lwz r9,32(r4) ffc167a4: 2f 89 00 01 cmpwi cr7,r9,1 ffc167a8: 41 9e 00 3c beq- cr7,ffc167e4 *ret = 0; rc = RC_OK; break; } cl_start = pos >> fs_info->vol.bpc_log2; ffc167ac: 88 a3 00 08 lbz r5,8(r3) rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); ffc167b0: 38 c1 00 14 addi r6,r1,20 ffc167b4: 7d 45 2c 30 srw r5,r10,r5 ffc167b8: 4b ff f6 41 bl ffc15df8 if ( rc != RC_OK ) ffc167bc: 7c 83 23 79 mr. r3,r4 ffc167c0: 40 a2 ff ac bne- ffc1676c <== NEVER TAKEN rc = -1; break; } va_end(ap); return rc; } ffc167c4: 80 01 00 34 lwz r0,52(r1) rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if ( rc != RC_OK ) break; *ret = cur_cln; ffc167c8: 81 21 00 14 lwz r9,20(r1) rc = -1; break; } va_end(ap); return rc; } ffc167cc: 7c 08 03 a6 mtlr r0 ffc167d0: 83 e1 00 2c lwz r31,44(r1) rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if ( rc != RC_OK ) break; *ret = cur_cln; ffc167d4: 91 3e 00 00 stw r9,0(r30) rc = -1; break; } va_end(ap); return rc; } ffc167d8: 83 c1 00 28 lwz r30,40(r1) ffc167dc: 38 21 00 30 addi r1,r1,48 ffc167e0: 4e 80 00 20 blr if ( pos >= fat_fd->fat_file_size ) { va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc167e4: 81 24 00 24 lwz r9,36(r4) ffc167e8: 2f 89 00 00 cmpwi cr7,r9,0 ffc167ec: 40 be ff c0 bne- cr7,ffc167ac <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) ffc167f0: 89 03 00 0e lbz r8,14(r3) 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)) && ffc167f4: 71 07 00 03 andi. r7,r8,3 ffc167f8: 41 a2 ff b4 beq- ffc167ac (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { /* cluster 0 (zero) reserved for root dir */ *ret = 0; ffc167fc: 91 3e 00 00 stw r9,0(r30) rc = RC_OK; ffc16800: 38 60 00 00 li r3,0 break; ffc16804: 4b ff ff 68 b ffc1676c ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); ffc16808: 48 00 ae 95 bl ffc2169c <__errno> <== NOT EXECUTED ffc1680c: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED ffc16810: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc16814: 4b ff ff 58 b ffc1676c <== NOT EXECUTED =============================================================================== ffc15df8 : fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { ffc15df8: 94 21 ff d0 stwu r1,-48(r1) ffc15dfc: 7c 08 02 a6 mflr r0 ffc15e00: 90 01 00 34 stw r0,52(r1) ffc15e04: 93 c1 00 28 stw r30,40(r1) int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) ffc15e08: 83 c4 00 34 lwz r30,52(r4) fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { ffc15e0c: 93 41 00 18 stw r26,24(r1) ffc15e10: 7c da 33 78 mr r26,r6 int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) ffc15e14: 7f 9e 28 00 cmpw cr7,r30,r5 fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { ffc15e18: 93 61 00 1c stw r27,28(r1) ffc15e1c: 7c 9b 23 78 mr r27,r4 ffc15e20: 93 81 00 20 stw r28,32(r1) ffc15e24: 7c bc 2b 78 mr r28,r5 ffc15e28: 93 a1 00 24 stw r29,36(r1) ffc15e2c: 93 e1 00 2c stw r31,44(r1) int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) ffc15e30: 41 9e 00 d8 beq- cr7,ffc15f08 { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) ffc15e34: 7f 9e 28 40 cmplw cr7,r30,r5 ffc15e38: 7c 7d 1b 78 mr r29,r3 ffc15e3c: 41 9c 00 74 blt- cr7,ffc15eb0 cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; ffc15e40: 81 24 00 1c lwz r9,28(r4) ffc15e44: 7c be 2b 78 mr r30,r5 ffc15e48: 91 21 00 08 stw r9,8(r1) count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) ffc15e4c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc15e50: 3b e0 00 00 li r31,0 ffc15e54: 41 9e 00 6c beq- cr7,ffc15ec0 { rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); ffc15e58: 80 81 00 08 lwz r4,8(r1) ffc15e5c: 7f a3 eb 78 mr r3,r29 ffc15e60: 38 a1 00 08 addi r5,r1,8 ffc15e64: 48 00 90 a1 bl ffc1ef04 cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) ffc15e68: 3b ff 00 01 addi r31,r31,1 { rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); if ( rc != RC_OK ) ffc15e6c: 2c 03 00 00 cmpwi r3,0 cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) ffc15e70: 7f 9f f0 00 cmpw cr7,r31,r30 { rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); if ( rc != RC_OK ) ffc15e74: 41 82 ff e0 beq+ ffc15e54 <== ALWAYS TAKEN fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc15e78: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED /* skip over the clusters */ for (i = 0; i < count; i++) { rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; ffc15e7c: 7c 6b 1b 78 mr r11,r3 <== NOT EXECUTED ffc15e80: 7c 6a fe 70 srawi r10,r3,31 <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc15e84: 83 41 00 18 lwz r26,24(r1) <== NOT EXECUTED ffc15e88: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc15e8c: 83 61 00 1c lwz r27,28(r1) <== NOT EXECUTED ffc15e90: 83 81 00 20 lwz r28,32(r1) <== NOT EXECUTED ffc15e94: 7d 43 53 78 mr r3,r10 <== NOT EXECUTED ffc15e98: 83 a1 00 24 lwz r29,36(r1) <== NOT EXECUTED ffc15e9c: 7d 64 5b 78 mr r4,r11 <== NOT EXECUTED ffc15ea0: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc15ea4: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc15ea8: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc15eac: 4e 80 00 20 blr <== NOT EXECUTED uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; ffc15eb0: 81 24 00 38 lwz r9,56(r4) count = file_cln - fat_fd->map.file_cln; ffc15eb4: 7f de 28 50 subf r30,r30,r5 uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; ffc15eb8: 91 21 00 08 stw r9,8(r1) ffc15ebc: 4b ff ff 90 b ffc15e4c fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc15ec0: 80 01 00 34 lwz r0,52(r1) fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; ffc15ec4: 39 40 00 00 li r10,0 return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; ffc15ec8: 81 21 00 08 lwz r9,8(r1) *disk_cln = cur_cln; } return RC_OK; ffc15ecc: 39 60 00 00 li r11,0 } ffc15ed0: 7c 08 03 a6 mtlr r0 if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; ffc15ed4: 93 9b 00 34 stw r28,52(r27) fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc15ed8: 7d 43 53 78 mr r3,r10 return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; ffc15edc: 91 3b 00 38 stw r9,56(r27) *disk_cln = cur_cln; } return RC_OK; } ffc15ee0: 7d 64 5b 78 mr r4,r11 /* update cache */ fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; ffc15ee4: 91 3a 00 00 stw r9,0(r26) } return RC_OK; } ffc15ee8: 83 61 00 1c lwz r27,28(r1) ffc15eec: 83 41 00 18 lwz r26,24(r1) ffc15ef0: 83 81 00 20 lwz r28,32(r1) ffc15ef4: 83 a1 00 24 lwz r29,36(r1) ffc15ef8: 83 c1 00 28 lwz r30,40(r1) ffc15efc: 83 e1 00 2c lwz r31,44(r1) ffc15f00: 38 21 00 30 addi r1,r1,48 ffc15f04: 4e 80 00 20 blr ffc15f08: 80 01 00 34 lwz r0,52(r1) fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; ffc15f0c: 39 40 00 00 li r10,0 ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) *disk_cln = fat_fd->map.disk_cln; ffc15f10: 81 24 00 38 lwz r9,56(r4) fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; ffc15f14: 39 60 00 00 li r11,0 } ffc15f18: 7c 08 03 a6 mtlr r0 ffc15f1c: 83 41 00 18 lwz r26,24(r1) ffc15f20: 83 61 00 1c lwz r27,28(r1) ffc15f24: 7d 43 53 78 mr r3,r10 ffc15f28: 83 81 00 20 lwz r28,32(r1) ffc15f2c: 7d 64 5b 78 mr r4,r11 ffc15f30: 83 a1 00 24 lwz r29,36(r1) ffc15f34: 83 c1 00 28 lwz r30,40(r1) ffc15f38: 83 e1 00 2c lwz r31,44(r1) ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) *disk_cln = fat_fd->map.disk_cln; ffc15f3c: 91 26 00 00 stw r9,0(r6) fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } ffc15f40: 38 21 00 30 addi r1,r1,48 ffc15f44: 4e 80 00 20 blr =============================================================================== ffc16da4 : void fat_file_mark_removed( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { ffc16da4: 94 21 ff e8 stwu r1,-24(r1) ffc16da8: 7c 08 02 a6 mflr r0 ffc16dac: 90 01 00 1c stw r0,28(r1) ffc16db0: 81 24 00 20 lwz r9,32(r4) ffc16db4: 93 c1 00 10 stw r30,16(r1) ffc16db8: 7c 7e 1b 78 mr r30,r3 fat_cluster_num_to_sector512_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if (cln == 1) ffc16dbc: 2f 89 00 01 cmpwi cr7,r9,1 ffc16dc0: 93 e1 00 14 stw r31,20(r1) ffc16dc4: 7c 9f 23 78 mr r31,r4 ffc16dc8: 93 a1 00 0c stw r29,12(r1) ffc16dcc: 41 9e 00 9c beq- cr7,ffc16e68 <== NEVER TAKEN fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc16dd0: 2f 89 00 00 cmpwi cr7,r9,0 ffc16dd4: 41 9e 00 80 beq- cr7,ffc16e54 <== ALWAYS TAKEN return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc16dd8: 89 1e 00 05 lbz r8,5(r30) <== NOT EXECUTED ffc16ddc: 3b a9 ff fe addi r29,r9,-2 <== NOT EXECUTED ffc16de0: 81 5e 00 34 lwz r10,52(r30) <== NOT EXECUTED ffc16de4: 7f bd 40 30 slw r29,r29,r8 <== NOT EXECUTED ffc16de8: 7f bd 52 14 add r29,r29,r10 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << ffc16dec: 89 5e 00 03 lbz r10,3(r30) ffc16df0: 7f bd 50 30 slw r29,r29,r10 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc16df4: 81 5f 00 24 lwz r10,36(r31) ffc16df8: 7f e3 fb 78 mr r3,r31 ffc16dfc: 55 48 ba 7e rlwinm r8,r10,23,9,31 static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + ffc16e00: 7f bd 42 14 add r29,r29,r8 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); ffc16e04: 55 4a df 3e rlwinm r10,r10,27,28,31 fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc16e08: 57 bd 20 36 rlwinm r29,r29,4,0,27 static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + ffc16e0c: 7f bd 52 14 add r29,r29,r10 ffc16e10: 48 00 42 1d bl ffc1b02c <_Chain_Extract> */ 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); ffc16e14: 57 bd 07 fe clrlwi r29,r29,31 ffc16e18: 80 7e 00 70 lwz r3,112(r30) ffc16e1c: 1f bd 00 0c mulli r29,r29,12 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); ffc16e20: 7f e4 fb 78 mr r4,r31 ffc16e24: 7c 63 ea 14 add r3,r3,r29 ffc16e28: 4b ff 5b 41 bl ffc0c968 <_Chain_Append> _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; ffc16e2c: 89 3f 00 30 lbz r9,48(r31) ffc16e30: 61 29 00 01 ori r9,r9,1 ffc16e34: 99 3f 00 30 stb r9,48(r31) } ffc16e38: 80 01 00 1c lwz r0,28(r1) ffc16e3c: 83 a1 00 0c lwz r29,12(r1) ffc16e40: 7c 08 03 a6 mtlr r0 ffc16e44: 83 c1 00 10 lwz r30,16(r1) ffc16e48: 83 e1 00 14 lwz r31,20(r1) ffc16e4c: 38 21 00 18 addi r1,r1,24 ffc16e50: 4e 80 00 20 blr fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc16e54: 89 43 00 0e lbz r10,14(r3) ffc16e58: 71 48 00 03 andi. r8,r10,3 ffc16e5c: 41 a2 ff 7c beq- ffc16dd8 <== NEVER TAKEN return fs_info->vol.rdir_loc; ffc16e60: 83 a3 00 20 lwz r29,32(r3) ffc16e64: 4b ff ff 88 b ffc16dec const fat_fs_info_t *fs_info, uint32_t cln ) { if (cln == 1) return 1; ffc16e68: 3b a0 00 01 li r29,1 <== NOT EXECUTED ffc16e6c: 4b ff ff 88 b ffc16df4 <== NOT EXECUTED =============================================================================== ffc15f48 : fat_file_open( fat_fs_info_t *fs_info, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { ffc15f48: 94 21 ff d8 stwu r1,-40(r1) ffc15f4c: 7c 08 02 a6 mflr r0 ffc15f50: 90 01 00 2c stw r0,44(r1) static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + ffc15f54: 81 24 00 00 lwz r9,0(r4) ffc15f58: 93 81 00 18 stw r28,24(r1) ffc15f5c: 7c bc 2b 78 mr r28,r5 fat_cluster_num_to_sector512_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if (cln == 1) ffc15f60: 2f 89 00 01 cmpwi cr7,r9,1 ffc15f64: 93 a1 00 1c stw r29,28(r1) ffc15f68: 7c 9d 23 78 mr r29,r4 ffc15f6c: 93 e1 00 24 stw r31,36(r1) ffc15f70: 7c 7f 1b 78 mr r31,r3 ffc15f74: 93 21 00 0c stw r25,12(r1) ffc15f78: 93 41 00 10 stw r26,16(r1) ffc15f7c: 93 61 00 14 stw r27,20(r1) ffc15f80: 93 c1 00 20 stw r30,32(r1) ffc15f84: 41 9e 02 8c beq- cr7,ffc16210 fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc15f88: 2f 89 00 00 cmpwi cr7,r9,0 ffc15f8c: 41 9e 01 a0 beq- cr7,ffc1612c return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc15f90: 89 1f 00 05 lbz r8,5(r31) ffc15f94: 3b c9 ff fe addi r30,r9,-2 ffc15f98: 81 5f 00 34 lwz r10,52(r31) ffc15f9c: 7f de 40 30 slw r30,r30,r8 ffc15fa0: 7f de 52 14 add r30,r30,r10 ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << ffc15fa4: 89 5f 00 03 lbz r10,3(r31) ffc15fa8: 7f de 50 30 slw r30,r30,r10 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc15fac: 81 5d 00 04 lwz r10,4(r29) uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); ffc15fb0: 81 3f 00 6c lwz r9,108(r31) ffc15fb4: 55 48 ba 7e rlwinm r8,r10,23,9,31 static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + ffc15fb8: 7f de 42 14 add r30,r30,r8 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc15fbc: 57 de 20 36 rlwinm r30,r30,4,0,27 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); ffc15fc0: 55 4a df 3e rlwinm r10,r10,27,28,31 static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + ffc15fc4: 7f de 52 14 add r30,r30,r10 uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; ffc15fc8: 57 db 07 fe clrlwi r27,r30,31 rtems_chain_node *the_node = rtems_chain_first(hash + mod); ffc15fcc: 1f 7b 00 0c mulli r27,r27,12 ffc15fd0: 7c c9 da 14 add r6,r9,r27 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc15fd4: 7d 29 d8 2e lwzx r9,r9,r27 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( const Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Immutable_tail( the_chain )); ffc15fd8: 38 c6 00 04 addi r6,r6,4 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) ffc15fdc: 7f 89 30 00 cmpw cr7,r9,r6 ffc15fe0: 41 9e 00 60 beq- cr7,ffc16040 ffc15fe4: 81 49 00 20 lwz r10,32(r9) fat_cluster_num_to_sector512_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if (cln == 1) ffc15fe8: 2f 8a 00 01 cmpwi cr7,r10,1 fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc15fec: 2f 0a 00 00 cmpwi cr6,r10,0 return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc15ff0: 39 4a ff fe addi r10,r10,-2 fat_cluster_num_to_sector512_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if (cln == 1) ffc15ff4: 41 9e 01 30 beq- cr7,ffc16124 fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc15ff8: 40 9a 00 d8 bne- cr6,ffc160d0 ffc15ffc: 89 1f 00 0e lbz r8,14(r31) ffc16000: 71 07 00 03 andi. r7,r8,3 ffc16004: 41 82 00 cc beq- ffc160d0 <== NEVER TAKEN return fs_info->vol.rdir_loc; ffc16008: 81 5f 00 20 lwz r10,32(r31) ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << ffc1600c: 89 1f 00 03 lbz r8,3(r31) ffc16010: 7d 4a 40 30 slw r10,r10,r8 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc16014: 81 09 00 24 lwz r8,36(r9) ffc16018: 55 07 ba 7e rlwinm r7,r8,23,9,31 static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + ffc1601c: 7d 4a 3a 14 add r10,r10,r7 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc16020: 55 4a 20 36 rlwinm r10,r10,4,0,27 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); ffc16024: 55 08 df 3e rlwinm r8,r8,27,28,31 static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + ffc16028: 7d 0a 42 14 add r8,r10,r8 { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname); if ( (key1) == ck) ffc1602c: 7f 9e 40 00 cmpw cr7,r30,r8 ffc16030: 41 9e 00 b4 beq- cr7,ffc160e4 { *ret = (void *)the_node; return 0; } } the_node = the_node->next; ffc16034: 81 29 00 00 lwz r9,0(r9) ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) ffc16038: 7f 86 48 00 cmpw cr7,r6,r9 ffc1603c: 40 9e ff a8 bne+ cr7,ffc15fe4 uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); ffc16040: 81 3f 00 70 lwz r9,112(r31) fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname); if ( (key1) == ck) { if ( ((key2) == 0) || ((key2) == ffd->ino) ) ffc16044: 2f 1e 00 00 cmpwi cr6,r30,0 uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); ffc16048: 7c c9 da 14 add r6,r9,r27 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc1604c: 7d 29 d8 2e lwzx r9,r9,r27 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( const Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Immutable_tail( the_chain )); ffc16050: 38 c6 00 04 addi r6,r6,4 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) ffc16054: 7f 89 30 00 cmpw cr7,r9,r6 ffc16058: 40 be 00 4c bne+ cr7,ffc160a4 <== NEVER TAKEN ffc1605c: 48 00 01 ac b ffc16208 fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc16060: 89 1f 00 0e lbz r8,14(r31) <== NOT EXECUTED ffc16064: 71 07 00 03 andi. r7,r8,3 <== NOT EXECUTED ffc16068: 41 82 00 50 beq- ffc160b8 <== NOT EXECUTED return fs_info->vol.rdir_loc; ffc1606c: 81 5f 00 20 lwz r10,32(r31) <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << ffc16070: 89 1f 00 03 lbz r8,3(r31) <== NOT EXECUTED ffc16074: 7d 4a 40 30 slw r10,r10,r8 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc16078: 81 09 00 24 lwz r8,36(r9) <== NOT EXECUTED ffc1607c: 55 07 ba 7e rlwinm r7,r8,23,9,31 <== NOT EXECUTED static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + ffc16080: 7d 4a 3a 14 add r10,r10,r7 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ffc16084: 55 4a 20 36 rlwinm r10,r10,4,0,27 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); ffc16088: 55 08 df 3e rlwinm r8,r8,27,28,31 <== NOT EXECUTED static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + ffc1608c: 7d 0a 42 14 add r8,r10,r8 <== NOT EXECUTED { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname); if ( (key1) == ck) ffc16090: 7f 9e 40 00 cmpw cr7,r30,r8 <== NOT EXECUTED ffc16094: 41 9e 00 ac beq- cr7,ffc16140 <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; ffc16098: 81 29 00 00 lwz r9,0(r9) <== NOT EXECUTED ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) ffc1609c: 7f 89 30 00 cmpw cr7,r9,r6 <== NOT EXECUTED ffc160a0: 41 9e 01 68 beq- cr7,ffc16208 <== NOT EXECUTED ffc160a4: 81 49 00 20 lwz r10,32(r9) <== NOT EXECUTED fat_cluster_num_to_sector512_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if (cln == 1) ffc160a8: 2f 8a 00 01 cmpwi cr7,r10,1 <== NOT EXECUTED ffc160ac: 41 9e 01 54 beq- cr7,ffc16200 <== NOT EXECUTED fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc160b0: 2f 8a 00 00 cmpwi cr7,r10,0 <== NOT EXECUTED ffc160b4: 41 be ff ac beq- cr7,ffc16060 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc160b8: 88 ff 00 05 lbz r7,5(r31) <== NOT EXECUTED ffc160bc: 39 4a ff fe addi r10,r10,-2 <== NOT EXECUTED ffc160c0: 81 1f 00 34 lwz r8,52(r31) <== NOT EXECUTED ffc160c4: 7d 4a 38 30 slw r10,r10,r7 <== NOT EXECUTED ffc160c8: 7d 4a 42 14 add r10,r10,r8 <== NOT EXECUTED ffc160cc: 4b ff ff a4 b ffc16070 <== NOT EXECUTED ffc160d0: 88 ff 00 05 lbz r7,5(r31) ffc160d4: 81 1f 00 34 lwz r8,52(r31) ffc160d8: 7d 4a 38 30 slw r10,r10,r7 ffc160dc: 7d 4a 42 14 add r10,r10,r8 ffc160e0: 4b ff ff 2c b ffc1600c rc = _hash_search(fs_info, fs_info->vhash, key, 0, &lfat_fd); if ( rc == RC_OK ) { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; lfat_fd->links_num++; ffc160e4: 81 49 00 08 lwz r10,8(r9) ffc160e8: 38 60 00 00 li r3,0 /* access "valid" hash table */ rc = _hash_search(fs_info, fs_info->vhash, key, 0, &lfat_fd); if ( rc == RC_OK ) { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; ffc160ec: 91 3c 00 00 stw r9,0(r28) lfat_fd->links_num++; ffc160f0: 39 4a 00 01 addi r10,r10,1 ffc160f4: 91 49 00 08 stw r10,8(r9) * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } ffc160f8: 80 01 00 2c lwz r0,44(r1) ffc160fc: 83 21 00 0c lwz r25,12(r1) ffc16100: 7c 08 03 a6 mtlr r0 ffc16104: 83 41 00 10 lwz r26,16(r1) ffc16108: 83 61 00 14 lwz r27,20(r1) ffc1610c: 83 81 00 18 lwz r28,24(r1) ffc16110: 83 a1 00 1c lwz r29,28(r1) ffc16114: 83 c1 00 20 lwz r30,32(r1) ffc16118: 83 e1 00 24 lwz r31,36(r1) ffc1611c: 38 21 00 28 addi r1,r1,40 ffc16120: 4e 80 00 20 blr const fat_fs_info_t *fs_info, uint32_t cln ) { if (cln == 1) return 1; ffc16124: 39 40 00 01 li r10,1 ffc16128: 4b ff fe ec b ffc16014 fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc1612c: 89 43 00 0e lbz r10,14(r3) ffc16130: 71 47 00 03 andi. r7,r10,3 ffc16134: 41 a2 fe 5c beq- ffc15f90 <== NEVER TAKEN return fs_info->vol.rdir_loc; ffc16138: 83 c3 00 20 lwz r30,32(r3) ffc1613c: 4b ff fe 68 b ffc15fa4 fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname); if ( (key1) == ck) { if ( ((key2) == 0) || ((key2) == ffd->ino) ) ffc16140: 41 9a 00 10 beq- cr6,ffc16150 <== NOT EXECUTED ffc16144: 81 49 00 0c lwz r10,12(r9) <== NOT EXECUTED ffc16148: 7f 9e 50 00 cmpw cr7,r30,r10 <== NOT EXECUTED ffc1614c: 40 9e ff 4c bne+ cr7,ffc16098 <== NOT EXECUTED { *ret = (void *)the_node; return 0; ffc16150: 3b 20 00 00 li r25,0 <== NOT EXECUTED } /* access "removed-but-still-open" hash table */ rc = _hash_search(fs_info, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); ffc16154: 38 60 00 44 li r3,68 ffc16158: 4b ff 0c 45 bl ffc06d9c if ( lfat_fd == NULL ) ffc1615c: 2f 83 00 00 cmpwi cr7,r3,0 } /* access "removed-but-still-open" hash table */ rc = _hash_search(fs_info, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); ffc16160: 90 7c 00 00 stw r3,0(r28) ffc16164: 7c 7a 1b 78 mr r26,r3 if ( lfat_fd == NULL ) ffc16168: 41 9e 00 cc beq- cr7,ffc16234 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); ffc1616c: 38 a0 00 44 li r5,68 ffc16170: 38 80 00 00 li r4,0 ffc16174: 48 00 c2 fd bl ffc22470 lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; if ( rc != RC_OK ) ffc16178: 2f 99 00 00 cmpwi cr7,r25,0 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; ffc1617c: 89 5a 00 30 lbz r10,48(r26) if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; ffc16180: 38 a0 00 01 li r5,1 lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; ffc16184: 80 dd 00 00 lwz r6,0(r29) ffc16188: 80 fd 00 04 lwz r7,4(r29) 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; ffc1618c: 55 4a 00 3c rlwinm r10,r10,0,0,30 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; ffc16190: 81 1d 00 08 lwz r8,8(r29) ffc16194: 81 3d 00 0c lwz r9,12(r29) 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; ffc16198: 99 5a 00 30 stb r10,48(r26) lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; ffc1619c: 39 40 ff ff li r10,-1 if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; ffc161a0: 90 ba 00 08 stw r5,8(r26) lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; ffc161a4: 91 5a 00 3c stw r10,60(r26) lfat_fd->dir_pos = *dir_pos; ffc161a8: 90 da 00 20 stw r6,32(r26) ffc161ac: 90 fa 00 24 stw r7,36(r26) ffc161b0: 91 1a 00 28 stw r8,40(r26) ffc161b4: 91 3a 00 2c stw r9,44(r26) if ( rc != RC_OK ) ffc161b8: 41 9e 00 60 beq- cr7,ffc16218 <== NEVER TAKEN lfat_fd->ino = key; ffc161bc: 93 da 00 0c stw r30,12(r26) */ 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); ffc161c0: 80 7f 00 6c lwz r3,108(r31) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); ffc161c4: 7f 44 d3 78 mr r4,r26 ffc161c8: 7c 63 da 14 add r3,r3,r27 ffc161cc: 4b ff 67 9d bl ffc0c968 <_Chain_Append> * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } ffc161d0: 80 01 00 2c lwz r0,44(r1) ffc161d4: 83 21 00 0c lwz r25,12(r1) /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; ffc161d8: 38 60 00 00 li r3,0 } ffc161dc: 7c 08 03 a6 mtlr r0 ffc161e0: 83 41 00 10 lwz r26,16(r1) ffc161e4: 83 61 00 14 lwz r27,20(r1) ffc161e8: 83 81 00 18 lwz r28,24(r1) ffc161ec: 83 a1 00 1c lwz r29,28(r1) ffc161f0: 83 c1 00 20 lwz r30,32(r1) ffc161f4: 83 e1 00 24 lwz r31,36(r1) ffc161f8: 38 21 00 28 addi r1,r1,40 ffc161fc: 4e 80 00 20 blr const fat_fs_info_t *fs_info, uint32_t cln ) { if (cln == 1) return 1; ffc16200: 39 40 00 01 li r10,1 <== NOT EXECUTED ffc16204: 4b ff fe 74 b ffc16078 <== NOT EXECUTED return 0; } } the_node = the_node->next; } return -1; ffc16208: 3b 20 ff ff li r25,-1 ffc1620c: 4b ff ff 48 b ffc16154 ffc16210: 3b c0 00 01 li r30,1 ffc16214: 4b ff fd 98 b ffc15fac if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(fs_info); ffc16218: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc1621c: 48 00 21 81 bl ffc1839c <== NOT EXECUTED if ( lfat_fd->ino == 0 ) ffc16220: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(fs_info); ffc16224: 90 7a 00 0c stw r3,12(r26) <== NOT EXECUTED if ( lfat_fd->ino == 0 ) ffc16228: 40 9e ff 98 bne+ cr7,ffc161c0 <== NOT EXECUTED { free((*fat_fd)); ffc1622c: 80 7c 00 00 lwz r3,0(r28) <== NOT EXECUTED ffc16230: 4b ff 04 e1 bl ffc06710 <== 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 ); ffc16234: 48 00 b4 69 bl ffc2169c <__errno> <== NOT EXECUTED ffc16238: 39 20 00 0c li r9,12 <== NOT EXECUTED ffc1623c: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED ffc16240: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc16244: 4b ff fe b4 b ffc160f8 <== NOT EXECUTED =============================================================================== ffc16260 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { ffc16260: 94 21 ff c8 stwu r1,-56(r1) ffc16264: 7c 08 02 a6 mflr r0 int rc = RC_OK; ssize_t ret = 0; uint32_t cmpltd = 0; uint32_t cur_cln = 0; ffc16268: 39 20 00 00 li r9,0 fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { ffc1626c: 93 c1 00 30 stw r30,48(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) ffc16270: 7c de 33 79 mr. r30,r6 fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { ffc16274: 90 01 00 3c stw r0,60(r1) ffc16278: 93 01 00 18 stw r24,24(r1) ffc1627c: 93 21 00 1c stw r25,28(r1) ffc16280: 93 41 00 20 stw r26,32(r1) ffc16284: 93 61 00 24 stw r27,36(r1) ffc16288: 93 81 00 28 stw r28,40(r1) ffc1628c: 93 a1 00 2c stw r29,44(r1) ffc16290: 93 e1 00 34 stw r31,52(r1) int rc = RC_OK; ssize_t ret = 0; uint32_t cmpltd = 0; uint32_t cur_cln = 0; ffc16294: 91 21 00 08 stw r9,8(r1) uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; /* it couldn't be removed - otherwise cache update will be broken */ if (count == 0) ffc16298: 41 82 01 6c beq- ffc16404 <== NEVER TAKEN /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) ffc1629c: 81 24 00 18 lwz r9,24(r4) ffc162a0: 7c 7f 1b 78 mr r31,r3 ffc162a4: 7c 9b 23 78 mr r27,r4 ffc162a8: 7f 89 28 40 cmplw cr7,r9,r5 ffc162ac: 7c bd 2b 78 mr r29,r5 uint32_t byte = 0; uint32_t c = 0; /* it couldn't be removed - otherwise cache update will be broken */ if (count == 0) return cmpltd; ffc162b0: 38 60 00 00 li r3,0 /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) ffc162b4: 40 9d 01 20 ble- cr7,ffc163d4 return FAT_EOF; if ((count > fat_fd->fat_file_size) || ffc162b8: 7f 9e 48 40 cmplw cr7,r30,r9 ffc162bc: 7c fa 3b 78 mr r26,r7 ffc162c0: 40 9d 01 78 ble- cr7,ffc16438 <== ALWAYS TAKEN (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; ffc162c4: 7f dd 48 50 subf r30,r29,r9 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc162c8: 81 3b 00 20 lwz r9,32(r27) ffc162cc: 2f 89 00 01 cmpwi cr7,r9,1 ffc162d0: 41 9e 01 78 beq- cr7,ffc16448 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; ffc162d4: 8b 3f 00 08 lbz r25,8(r31) save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); ffc162d8: 7f e3 fb 78 mr r3,r31 ffc162dc: 7f 64 db 78 mr r4,r27 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); ffc162e0: a3 1f 00 06 lhz r24,6(r31) return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; ffc162e4: 7f b9 cc 30 srw r25,r29,r25 save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); ffc162e8: 7f 25 cb 78 mr r5,r25 ffc162ec: 38 c1 00 08 addi r6,r1,8 ffc162f0: 4b ff fb 09 bl ffc15df8 if (rc != RC_OK) ffc162f4: 7c 83 23 79 mr. r3,r4 ffc162f8: 40 82 00 dc bne- ffc163d4 <== NEVER TAKEN return rc; while (count > 0) ffc162fc: 2f 9e 00 00 cmpwi cr7,r30,0 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); ffc16300: 3b 18 ff ff addi r24,r24,-1 ffc16304: 7f b8 c0 38 and r24,r29,r24 rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) ffc16308: 41 9e 01 cc beq- cr7,ffc164d4 <== NEVER TAKEN ffc1630c: 89 1f 00 02 lbz r8,2(r31) ffc16310: 7f 05 c3 78 mr r5,r24 ffc16314: a0 ff 00 00 lhz r7,0(r31) ffc16318: 3b 80 00 00 li r28,0 { c = MIN(count, (fs_info->vol.bpc - ofs)); ffc1631c: a3 bf 00 06 lhz r29,6(r31) sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); ffc16320: 81 41 00 08 lwz r10,8(r1) if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); ffc16324: 7f a5 e8 50 subf r29,r5,r29 ffc16328: 7f 1d f0 40 cmplw cr6,r29,r30 fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc1632c: 2f 8a 00 00 cmpwi cr7,r10,0 return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc16330: 39 4a ff fe addi r10,r10,-2 ffc16334: 40 99 00 08 ble- cr6,ffc1633c ffc16338: 7f dd f3 78 mr r29,r30 fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc1633c: 40 9e 01 6c bne- cr7,ffc164a8 <== ALWAYS TAKEN ffc16340: 88 df 00 0e lbz r6,14(r31) <== NOT EXECUTED ffc16344: 70 c9 00 03 andi. r9,r6,3 <== NOT EXECUTED ffc16348: 41 82 01 60 beq- ffc164a8 <== NOT EXECUTED return fs_info->vol.rdir_loc; ffc1634c: 80 9f 00 20 lwz r4,32(r31) <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); ffc16350: 7c a8 44 30 srw r8,r5,r8 byte = ofs & (fs_info->vol.bps - 1); ffc16354: 38 e7 ff ff addi r7,r7,-1 ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); ffc16358: 7c a5 38 38 and r5,r5,r7 ffc1635c: 7c 84 42 14 add r4,r4,r8 ffc16360: 7c fa e2 14 add r7,r26,r28 ffc16364: 7f a6 eb 78 mr r6,r29 ffc16368: 7f e3 fb 78 mr r3,r31 ffc1636c: 48 00 0e e5 bl ffc17250 <_fat_block_read> if ( ret < 0 ) return -1; count -= c; ffc16370: 7f dd f0 50 subf r30,r29,r30 sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); if ( ret < 0 ) ffc16374: 2f 83 00 00 cmpwi cr7,r3,0 return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); ffc16378: 38 a1 00 08 addi r5,r1,8 ffc1637c: 7f e3 fb 78 mr r3,r31 ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; cmpltd += c; ffc16380: 7f 9c ea 14 add r28,r28,r29 sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); if ( ret < 0 ) ffc16384: 41 9c 01 1c blt- cr7,ffc164a0 <== NEVER TAKEN return -1; count -= c; cmpltd += c; save_cln = cur_cln; ffc16388: 83 a1 00 08 lwz r29,8(r1) rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); ffc1638c: 7f a4 eb 78 mr r4,r29 ffc16390: 48 00 8b 75 bl ffc1ef04 rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) ffc16394: 2f 9e 00 00 cmpwi cr7,r30,0 count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); if ( rc != RC_OK ) ffc16398: 2c 03 00 00 cmpwi r3,0 return rc; ofs = 0; ffc1639c: 38 a0 00 00 li r5,0 count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); if ( rc != RC_OK ) ffc163a0: 40 82 00 34 bne- ffc163d4 <== NEVER TAKEN rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) ffc163a4: 41 9e 00 10 beq- cr7,ffc163b4 ffc163a8: 89 1f 00 02 lbz r8,2(r31) ffc163ac: a0 ff 00 00 lhz r7,0(r31) ffc163b0: 4b ff ff 6c b ffc1631c ffc163b4: 7f 83 e3 78 mr r3,r28 } /* 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); ffc163b8: 89 3f 00 08 lbz r9,8(r31) ffc163bc: 3b 18 ff ff addi r24,r24,-1 ffc163c0: 7f 98 e2 14 add r28,r24,r28 fat_fd->map.disk_cln = save_cln; ffc163c4: 93 bb 00 38 stw r29,56(r27) } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); ffc163c8: 7f 9c 4c 30 srw r28,r28,r9 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ffc163cc: 7f 3c ca 14 add r25,r28,r25 ffc163d0: 93 3b 00 34 stw r25,52(r27) ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } ffc163d4: 80 01 00 3c lwz r0,60(r1) ffc163d8: 83 01 00 18 lwz r24,24(r1) ffc163dc: 7c 08 03 a6 mtlr r0 ffc163e0: 83 21 00 1c lwz r25,28(r1) ffc163e4: 83 41 00 20 lwz r26,32(r1) ffc163e8: 83 61 00 24 lwz r27,36(r1) ffc163ec: 83 81 00 28 lwz r28,40(r1) ffc163f0: 83 a1 00 2c lwz r29,44(r1) ffc163f4: 83 c1 00 30 lwz r30,48(r1) ffc163f8: 83 e1 00 34 lwz r31,52(r1) ffc163fc: 38 21 00 38 addi r1,r1,56 ffc16400: 4e 80 00 20 blr ffc16404: 80 01 00 3c lwz r0,60(r1) <== NOT EXECUTED uint32_t byte = 0; uint32_t c = 0; /* it couldn't be removed - otherwise cache update will be broken */ if (count == 0) return cmpltd; ffc16408: 38 60 00 00 li r3,0 <== 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; } ffc1640c: 83 01 00 18 lwz r24,24(r1) <== NOT EXECUTED ffc16410: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc16414: 83 21 00 1c lwz r25,28(r1) <== NOT EXECUTED ffc16418: 83 41 00 20 lwz r26,32(r1) <== NOT EXECUTED ffc1641c: 83 61 00 24 lwz r27,36(r1) <== NOT EXECUTED ffc16420: 83 81 00 28 lwz r28,40(r1) <== NOT EXECUTED ffc16424: 83 a1 00 2c lwz r29,44(r1) <== NOT EXECUTED ffc16428: 83 c1 00 30 lwz r30,48(r1) <== NOT EXECUTED ffc1642c: 83 e1 00 34 lwz r31,52(r1) <== NOT EXECUTED ffc16430: 38 21 00 38 addi r1,r1,56 <== NOT EXECUTED ffc16434: 4e 80 00 20 blr <== NOT EXECUTED */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || (start > fat_fd->fat_file_size - count)) ffc16438: 7d 5e 48 50 subf r10,r30,r9 * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || ffc1643c: 7f 85 50 40 cmplw cr7,r5,r10 ffc16440: 40 bd fe 88 ble- cr7,ffc162c8 ffc16444: 4b ff fe 80 b ffc162c4 (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc16448: 81 3b 00 24 lwz r9,36(r27) ffc1644c: 2f 89 00 00 cmpwi cr7,r9,0 ffc16450: 40 be fe 84 bne- cr7,ffc162d4 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) ffc16454: 89 3f 00 0e lbz r9,14(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)) && ffc16458: 71 2a 00 03 andi. r10,r9,3 ffc1645c: 41 a2 fe 78 beq- ffc162d4 (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); ffc16460: 81 3b 00 1c lwz r9,28(r27) fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) ffc16464: 2f 89 00 00 cmpwi cr7,r9,0 ffc16468: 40 9e 00 54 bne- cr7,ffc164bc <== NEVER TAKEN return fs_info->vol.rdir_loc; ffc1646c: 80 9f 00 20 lwz r4,32(r31) sec += (start >> fs_info->vol.sec_log2); ffc16470: 89 3f 00 02 lbz r9,2(r31) byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, count, buf); ffc16474: 7f e3 fb 78 mr r3,r31 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); ffc16478: a0 bf 00 00 lhz r5,0(r31) ret = _fat_block_read(fs_info, sec, byte, count, buf); ffc1647c: 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(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); ffc16480: 7f a9 4c 30 srw r9,r29,r9 byte = start & (fs_info->vol.bps - 1); ffc16484: 38 a5 ff ff addi r5,r5,-1 ret = _fat_block_read(fs_info, sec, byte, count, buf); ffc16488: 7c 84 4a 14 add r4,r4,r9 ffc1648c: 7f a5 28 38 and r5,r29,r5 ffc16490: 7f 47 d3 78 mr r7,r26 ffc16494: 48 00 0d bd bl ffc17250 <_fat_block_read> if ( ret < 0 ) ffc16498: 2c 03 00 00 cmpwi r3,0 ffc1649c: 40 80 ff 38 bge+ ffc163d4 <== ALWAYS TAKEN sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; ffc164a0: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc164a4: 4b ff ff 30 b ffc163d4 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + ffc164a8: 88 9f 00 05 lbz r4,5(r31) ffc164ac: 80 df 00 34 lwz r6,52(r31) ffc164b0: 7d 4a 20 30 slw r10,r10,r4 ffc164b4: 7c 8a 32 14 add r4,r10,r6 ffc164b8: 4b ff fe 98 b ffc16350 ffc164bc: 89 1f 00 05 lbz r8,5(r31) <== NOT EXECUTED ffc164c0: 38 89 ff fe addi r4,r9,-2 <== NOT EXECUTED ffc164c4: 81 5f 00 34 lwz r10,52(r31) <== NOT EXECUTED ffc164c8: 7c 84 40 30 slw r4,r4,r8 <== NOT EXECUTED ffc164cc: 7c 84 52 14 add r4,r4,r10 <== NOT EXECUTED ffc164d0: 4b ff ff a0 b ffc16470 <== NOT EXECUTED rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) ffc164d4: 3b a0 00 00 li r29,0 <== NOT EXECUTED ffc164d8: 3b 80 00 00 li r28,0 <== NOT EXECUTED ffc164dc: 4b ff fe dc b ffc163b8 <== NOT EXECUTED =============================================================================== ffc16e70 : int fat_file_size( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { ffc16e70: 94 21 ff d8 stwu r1,-40(r1) ffc16e74: 7c 08 02 a6 mflr r0 ffc16e78: 90 01 00 2c stw r0,44(r1) int rc = RC_OK; 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)) && ffc16e7c: 81 24 00 20 lwz r9,32(r4) int fat_file_size( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { ffc16e80: 93 a1 00 1c stw r29,28(r1) int rc = RC_OK; 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)) && ffc16e84: 2f 89 00 01 cmpwi cr7,r9,1 fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { int rc = RC_OK; uint32_t cur_cln = fat_fd->cln; ffc16e88: 83 a4 00 1c lwz r29,28(r4) int fat_file_size( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { ffc16e8c: 93 c1 00 20 stw r30,32(r1) ffc16e90: 7c 9e 23 78 mr r30,r4 ffc16e94: 93 e1 00 24 stw r31,36(r1) ffc16e98: 7c 7f 1b 78 mr r31,r3 int rc = RC_OK; uint32_t cur_cln = fat_fd->cln; ffc16e9c: 93 a1 00 08 stw r29,8(r1) uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && ffc16ea0: 41 9e 00 ac beq- cr7,ffc16f4c return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc16ea4: 81 5f 00 10 lwz r10,16(r31) { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; } fat_fd->fat_file_size = 0; ffc16ea8: 39 00 00 00 li r8,0 while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc16eac: 81 3f 00 14 lwz r9,20(r31) ffc16eb0: 7f aa 50 38 and r10,r29,r10 { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; } fat_fd->fat_file_size = 0; ffc16eb4: 91 1e 00 18 stw r8,24(r30) while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc16eb8: 7f 8a 48 40 cmplw cr7,r10,r9 ffc16ebc: 41 bc 00 34 blt+ cr7,ffc16ef0 <== ALWAYS TAKEN ffc16ec0: 48 00 00 64 b ffc16f24 <== NOT EXECUTED ffc16ec4: 81 1f 00 10 lwz r8,16(r31) ffc16ec8: 81 21 00 08 lwz r9,8(r1) ffc16ecc: 81 5f 00 14 lwz r10,20(r31) ffc16ed0: 7d 28 40 38 and r8,r9,r8 save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; ffc16ed4: a0 ff 00 06 lhz r7,6(r31) return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc16ed8: 7f 88 50 40 cmplw cr7,r8,r10 save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; ffc16edc: 81 5e 00 18 lwz r10,24(r30) ffc16ee0: 7c ea 3a 14 add r7,r10,r7 ffc16ee4: 90 fe 00 18 stw r7,24(r30) return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc16ee8: 40 9c 00 40 bge- cr7,ffc16f28 <== ALWAYS TAKEN ffc16eec: 7d 3d 4b 78 mr r29,r9 <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); ffc16ef0: 7f a4 eb 78 mr r4,r29 ffc16ef4: 7f e3 fb 78 mr r3,r31 ffc16ef8: 38 a1 00 08 addi r5,r1,8 ffc16efc: 48 00 80 09 bl ffc1ef04 if ( rc != RC_OK ) ffc16f00: 2c 03 00 00 cmpwi r3,0 ffc16f04: 41 82 ff c0 beq+ ffc16ec4 <== ALWAYS TAKEN fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; } ffc16f08: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc16f0c: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc16f10: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc16f14: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc16f18: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc16f1c: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc16f20: 4e 80 00 20 blr <== NOT EXECUTED fat_file_fd_t *fat_fd ) { int rc = RC_OK; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; ffc16f24: 3b a0 00 00 li r29,0 <== NOT EXECUTED fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; } ffc16f28: 80 01 00 2c lwz r0,44(r1) if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; ffc16f2c: 38 60 00 00 li r3,0 ffc16f30: 93 be 00 3c stw r29,60(r30) return rc; } ffc16f34: 7c 08 03 a6 mtlr r0 ffc16f38: 83 a1 00 1c lwz r29,28(r1) ffc16f3c: 83 c1 00 20 lwz r30,32(r1) ffc16f40: 83 e1 00 24 lwz r31,36(r1) ffc16f44: 38 21 00 28 addi r1,r1,40 ffc16f48: 4e 80 00 20 blr int rc = RC_OK; 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)) && ffc16f4c: 81 24 00 24 lwz r9,36(r4) ffc16f50: 2f 89 00 00 cmpwi cr7,r9,0 ffc16f54: 40 be ff 50 bne- cr7,ffc16ea4 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) ffc16f58: 89 23 00 0e lbz r9,14(r3) int rc = RC_OK; 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)) && ffc16f5c: 71 2a 00 03 andi. r10,r9,3 ffc16f60: 41 82 ff 44 beq+ ffc16ea4 <== ALWAYS TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; ffc16f64: 81 23 00 2c lwz r9,44(r3) <== NOT EXECUTED return rc; ffc16f68: 38 60 00 00 li r3,0 <== NOT EXECUTED /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; ffc16f6c: 91 24 00 18 stw r9,24(r4) <== NOT EXECUTED ffc16f70: 4b ff ff 98 b ffc16f08 <== NOT EXECUTED =============================================================================== ffc164e0 : fat_file_truncate( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, uint32_t new_length ) { ffc164e0: 94 21 ff d8 stwu r1,-40(r1) ffc164e4: 7c 08 02 a6 mflr r0 ffc164e8: 7d 80 00 26 mfcr r12 int rc = RC_OK; uint32_t cur_cln = 0; ffc164ec: 39 40 00 00 li r10,0 fat_file_truncate( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, uint32_t new_length ) { ffc164f0: 90 01 00 2c stw r0,44(r1) uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) ffc164f4: 81 24 00 18 lwz r9,24(r4) fat_file_fd_t *fat_fd, uint32_t new_length ) { int rc = RC_OK; uint32_t cur_cln = 0; ffc164f8: 91 41 00 0c stw r10,12(r1) uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; ffc164fc: 39 40 ff ff li r10,-1 if ( new_length >= fat_fd->fat_file_size ) ffc16500: 7f 89 28 40 cmplw cr7,r9,r5 fat_file_truncate( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, uint32_t new_length ) { ffc16504: 93 c1 00 20 stw r30,32(r1) ffc16508: 7c 9e 23 78 mr r30,r4 ffc1650c: 93 a1 00 1c stw r29,28(r1) ffc16510: 93 e1 00 24 stw r31,36(r1) ffc16514: 91 81 00 18 stw r12,24(r1) int rc = RC_OK; uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; ffc16518: 91 41 00 08 stw r10,8(r1) if ( new_length >= fat_fd->fat_file_size ) ffc1651c: 40 9d 00 80 ble- cr7,ffc1659c return rc; assert(fat_fd->fat_file_size); ffc16520: 2f 89 00 00 cmpwi cr7,r9,0 ffc16524: 41 9e 00 d0 beq- cr7,ffc165f4 <== NEVER TAKEN cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; ffc16528: a3 a3 00 06 lhz r29,6(r3) ffc1652c: 7c 7f 1b 78 mr r31,r3 ffc16530: 89 43 00 08 lbz r10,8(r3) ffc16534: 3b bd ff ff addi r29,r29,-1 ffc16538: 7c bd 2a 14 add r5,r29,r5 ffc1653c: 7c bd 54 30 srw r29,r5,r10 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) ffc16540: 7f aa 50 30 slw r10,r29,r10 ffc16544: 7f 89 50 40 cmplw cr7,r9,r10 ffc16548: 40 9d 00 54 ble- cr7,ffc1659c return RC_OK; if (cl_start != 0) ffc1654c: 2e 1d 00 00 cmpwi cr4,r29,0 ffc16550: 41 92 00 18 beq- cr4,ffc16568 { rc = fat_file_lseek(fs_info, fat_fd, cl_start - 1, &new_last_cln); ffc16554: 38 bd ff ff addi r5,r29,-1 ffc16558: 38 c1 00 08 addi r6,r1,8 ffc1655c: 4b ff f8 9d bl ffc15df8 if (rc != RC_OK) ffc16560: 7c 83 23 79 mr. r3,r4 ffc16564: 40 82 00 3c bne- ffc165a0 <== NEVER TAKEN return rc; } rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); ffc16568: 7f e3 fb 78 mr r3,r31 ffc1656c: 7f c4 f3 78 mr r4,r30 ffc16570: 7f a5 eb 78 mr r5,r29 ffc16574: 38 c1 00 0c addi r6,r1,12 ffc16578: 4b ff f8 81 bl ffc15df8 if (rc != RC_OK) ffc1657c: 7c 83 23 79 mr. r3,r4 ffc16580: 40 a2 00 20 bne+ ffc165a0 <== NEVER TAKEN return rc; rc = fat_free_fat_clusters_chain(fs_info, cur_cln); ffc16584: 80 81 00 0c lwz r4,12(r1) ffc16588: 7f e3 fb 78 mr r3,r31 ffc1658c: 48 00 8e fd bl ffc1f488 if (rc != RC_OK) ffc16590: 2c 03 00 00 cmpwi r3,0 ffc16594: 40 82 00 0c bne- ffc165a0 <== NEVER TAKEN return rc; if (cl_start != 0) ffc16598: 40 92 00 2c bne- cr4,ffc165c4 uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) return rc; ffc1659c: 38 60 00 00 li r3,0 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; } ffc165a0: 80 01 00 2c lwz r0,44(r1) ffc165a4: 81 81 00 18 lwz r12,24(r1) ffc165a8: 7c 08 03 a6 mtlr r0 ffc165ac: 83 a1 00 1c lwz r29,28(r1) ffc165b0: 83 c1 00 20 lwz r30,32(r1) ffc165b4: 7d 80 81 20 mtcrf 8,r12 ffc165b8: 83 e1 00 24 lwz r31,36(r1) ffc165bc: 38 21 00 28 addi r1,r1,40 ffc165c0: 4e 80 00 20 blr if (rc != RC_OK) return rc; if (cl_start != 0) { rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC); ffc165c4: 80 81 00 08 lwz r4,8(r1) ffc165c8: 7f e3 fb 78 mr r3,r31 ffc165cc: 38 a0 ff ff li r5,-1 ffc165d0: 48 00 8b 85 bl ffc1f154 if ( rc != RC_OK ) ffc165d4: 2c 03 00 00 cmpwi r3,0 ffc165d8: 40 a2 ff c8 bne- ffc165a0 <== NEVER TAKEN return rc; fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; ffc165dc: 81 21 00 08 lwz r9,8(r1) if (cl_start != 0) { rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC); if ( rc != RC_OK ) return rc; fat_fd->map.file_cln = cl_start - 1; ffc165e0: 3b bd ff ff addi r29,r29,-1 ffc165e4: 93 be 00 34 stw r29,52(r30) fat_fd->map.disk_cln = new_last_cln; ffc165e8: 91 3e 00 38 stw r9,56(r30) fat_fd->map.last_cln = new_last_cln; ffc165ec: 91 3e 00 3c stw r9,60(r30) ffc165f0: 4b ff ff b0 b ffc165a0 if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); ffc165f4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc165f8: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED ffc165fc: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED ffc16600: 38 63 1c dc addi r3,r3,7388 <== NOT EXECUTED ffc16604: 38 80 02 d1 li r4,721 <== NOT EXECUTED ffc16608: 38 a5 1c c8 addi r5,r5,7368 <== NOT EXECUTED ffc1660c: 38 c6 1d 24 addi r6,r6,7460 <== NOT EXECUTED ffc16610: 4b fe ff 1d bl ffc0652c <__assert_func> <== NOT EXECUTED =============================================================================== ffc16aa8 : bool zero_fill = start > fat_fd->fat_file_size; uint32_t file_cln_initial = fat_fd->map.file_cln; uint32_t cln; if ( count == 0 ) ffc16aa8: 2c 06 00 00 cmpwi r6,0 fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { ffc16aac: 94 21 ff b8 stwu r1,-72(r1) ffc16ab0: 7c 08 02 a6 mflr r0 int rc = RC_OK; ssize_t ret; uint32_t cmpltd = 0; uint32_t byte; uint32_t c = 0; ffc16ab4: 39 20 00 00 li r9,0 fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { ffc16ab8: 93 01 00 28 stw r24,40(r1) ffc16abc: 90 01 00 4c stw r0,76(r1) ffc16ac0: 93 81 00 38 stw r28,56(r1) ffc16ac4: 7c bc 2b 78 mr r28,r5 ffc16ac8: 93 c1 00 40 stw r30,64(r1) ffc16acc: 7c 9e 23 78 mr r30,r4 ffc16ad0: 92 81 00 18 stw r20,24(r1) ffc16ad4: 92 a1 00 1c stw r21,28(r1) ffc16ad8: 92 c1 00 20 stw r22,32(r1) ffc16adc: 92 e1 00 24 stw r23,36(r1) ffc16ae0: 93 21 00 2c stw r25,44(r1) ffc16ae4: 93 41 00 30 stw r26,48(r1) ffc16ae8: 93 61 00 34 stw r27,52(r1) ffc16aec: 93 a1 00 3c stw r29,60(r1) ffc16af0: 93 e1 00 44 stw r31,68(r1) int rc = RC_OK; ssize_t ret; uint32_t cmpltd = 0; uint32_t byte; uint32_t c = 0; ffc16af4: 91 21 00 0c stw r9,12(r1) bool zero_fill = start > fat_fd->fat_file_size; ffc16af8: 80 a4 00 18 lwz r5,24(r4) uint32_t file_cln_initial = fat_fd->map.file_cln; ffc16afc: 83 04 00 34 lwz r24,52(r4) uint32_t cln; if ( count == 0 ) ffc16b00: 41 82 01 bc beq- ffc16cbc <== NEVER TAKEN return cmpltd; if (start >= fat_fd->size_limit) ffc16b04: 83 e4 00 14 lwz r31,20(r4) ffc16b08: 7f 9c f8 40 cmplw cr7,r28,r31 ffc16b0c: 40 9c 02 78 bge- cr7,ffc16d84 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EFBIG); if (count > fat_fd->size_limit - start) ffc16b10: 7f fc f8 50 subf r31,r28,r31 ffc16b14: 7f 9f 30 40 cmplw cr7,r31,r6 ffc16b18: 7c 7d 1b 78 mr r29,r3 ffc16b1c: 7c f9 3b 78 mr r25,r7 ffc16b20: 41 9d 01 68 bgt- cr7,ffc16c88 <== ALWAYS TAKEN count = fat_fd->size_limit - start; rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); ffc16b24: 7c bc 28 10 subfc r5,r28,r5 <== NOT EXECUTED ffc16b28: 7c a5 29 10 subfe r5,r5,r5 <== NOT EXECUTED ffc16b2c: 7f 7f e2 14 add r27,r31,r28 <== NOT EXECUTED ffc16b30: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc16b34: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc16b38: 7c a5 00 d0 neg r5,r5 <== NOT EXECUTED ffc16b3c: 7f 66 db 78 mr r6,r27 <== NOT EXECUTED ffc16b40: 38 e1 00 0c addi r7,r1,12 <== NOT EXECUTED ffc16b44: 4b ff fc d5 bl ffc16818 <== NOT EXECUTED if (RC_OK == rc) ffc16b48: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc16b4c: 40 82 00 fc bne- ffc16c48 <== NOT EXECUTED { /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) ffc16b50: 81 21 00 0c lwz r9,12(r1) ffc16b54: 7f 9b 48 00 cmpw cr7,r27,r9 ffc16b58: 41 9e 00 08 beq- cr7,ffc16b60 <== ALWAYS TAKEN count = c - start; ffc16b5c: 7f fc 48 50 subf r31,r28,r9 <== NOT EXECUTED */ static bool fat_is_fat12_or_fat16_root_dir (const fat_file_fd_t *fat_fd, const uint8_t volume_type) { return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16)); ffc16b60: 81 3e 00 20 lwz r9,32(r30) */ if (c != (start + count)) count = c - start; /* for the root directory of FAT12 and FAT16 we need this special handling */ if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type)) ffc16b64: 89 5d 00 0e lbz r10,14(r29) */ static bool fat_is_fat12_or_fat16_root_dir (const fat_file_fd_t *fat_fd, const uint8_t volume_type) { return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16)); ffc16b68: 2f 89 00 01 cmpwi cr7,r9,1 ffc16b6c: 41 9e 01 c4 beq- cr7,ffc16d30 const uint8_t *buf, const uint32_t file_cln_initial) { int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; ffc16b70: 7c 36 0b 78 mr r22,r1 uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ uint32_t start_cln = start >> fs_info->vol.bpc_log2; ffc16b74: 8b 7d 00 08 lbz r27,8(r29) const uint8_t *buf, const uint32_t file_cln_initial) { int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; ffc16b78: 39 20 00 00 li r9,0 ffc16b7c: 95 36 00 08 stwu r9,8(r22) uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ uint32_t start_cln = start >> fs_info->vol.bpc_log2; ffc16b80: 7f 94 dc 30 srw r20,r28,r27 uint32_t file_cln_cnt; ssize_t ret; uint32_t c; bool overwrite_cluster = false; rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); ffc16b84: 7f a3 eb 78 mr r3,r29 ffc16b88: 7f c4 f3 78 mr r4,r30 ffc16b8c: 7e 85 a3 78 mr r5,r20 ffc16b90: 7e c6 b3 78 mr r6,r22 ffc16b94: 4b ff f2 65 bl ffc15df8 if (RC_OK == rc) ffc16b98: 7c 83 23 79 mr. r3,r4 ffc16b9c: 40 82 00 a8 bne- ffc16c44 <== NEVER TAKEN { file_cln_cnt = cur_cln - fat_fd->cln; while ( (RC_OK == rc) && (bytes_to_write > 0)) ffc16ba0: 2f 9f 00 00 cmpwi cr7,r31,0 bool overwrite_cluster = false; rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); if (RC_OK == rc) { file_cln_cnt = cur_cln - fat_fd->cln; ffc16ba4: 80 81 00 08 lwz r4,8(r1) ffc16ba8: 83 5e 00 1c lwz r26,28(r30) int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ uint32_t start_cln = start >> fs_info->vol.bpc_log2; uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2); ffc16bac: 7e 9b d8 30 slw r27,r20,r27 ffc16bb0: 7f 9b e0 50 subf r28,r27,r28 bool overwrite_cluster = false; rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); if (RC_OK == rc) { file_cln_cnt = cur_cln - fat_fd->cln; ffc16bb4: 7f 5a 20 50 subf r26,r26,r4 while ( (RC_OK == rc) && (bytes_to_write > 0)) ffc16bb8: 41 9e 01 e0 beq- cr7,ffc16d98 <== NEVER TAKEN ffc16bbc: 7f 89 e3 78 mr r9,r28 ffc16bc0: 3b 60 00 00 li r27,0 ffc16bc4: 3a a0 00 00 li r21,0 ffc16bc8: 3a e0 00 00 li r23,0 { c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln)); ffc16bcc: a1 5d 00 06 lhz r10,6(r29) if (file_cln_initial < file_cln_cnt) ffc16bd0: 7f 98 d0 40 cmplw cr7,r24,r26 overwrite_cluster = true; ret = fat_cluster_write(fs_info, ffc16bd4: 7c f9 da 14 add r7,r25,r27 { file_cln_cnt = cur_cln - fat_fd->cln; while ( (RC_OK == rc) && (bytes_to_write > 0)) { c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln)); ffc16bd8: 7c c9 50 50 subf r6,r9,r10 ffc16bdc: 7f 06 f8 40 cmplw cr6,r6,r31 if (file_cln_initial < file_cln_cnt) overwrite_cluster = true; ret = fat_cluster_write(fs_info, ffc16be0: 7f a3 eb 78 mr r3,r29 ffc16be4: 7d 25 4b 78 mr r5,r9 if (0 > ret) rc = -1; if (RC_OK == rc) { ++file_cln_cnt; ffc16be8: 3b 5a 00 01 addi r26,r26,1 { file_cln_cnt = cur_cln - fat_fd->cln; while ( (RC_OK == rc) && (bytes_to_write > 0)) { c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln)); ffc16bec: 40 99 00 08 ble- cr6,ffc16bf4 ffc16bf0: 7f e6 fb 78 mr r6,r31 if (file_cln_initial < file_cln_cnt) ffc16bf4: 40 9c 00 08 bge- cr7,ffc16bfc overwrite_cluster = true; ffc16bf8: 3a e0 00 01 li r23,1 ret = fat_cluster_write(fs_info, ffc16bfc: 7e e8 bb 78 mr r8,r23 ffc16c00: 48 00 0a 45 bl ffc17644 cur_cln, ofs_cln, c, &buf[cmpltd], overwrite_cluster); if (0 > ret) ffc16c04: 2c 03 00 00 cmpwi r3,0 { ++file_cln_cnt; bytes_to_write -= ret; cmpltd += ret; save_cln = cur_cln; if (0 < bytes_to_write) ffc16c08: 7f e3 f8 50 subf r31,r3,r31 ffc16c0c: 2f 9f 00 00 cmpwi cr7,r31,0 cur_cln, ofs_cln, c, &buf[cmpltd], overwrite_cluster); if (0 > ret) ffc16c10: 41 80 00 f0 blt- ffc16d00 <== NEVER TAKEN if (RC_OK == rc) { ++file_cln_cnt; bytes_to_write -= ret; cmpltd += ret; ffc16c14: 7f 7b 1a 14 add r27,r27,r3 save_cln = cur_cln; ffc16c18: 82 a1 00 08 lwz r21,8(r1) if (0 < bytes_to_write) ffc16c1c: 40 9e 00 f0 bne- cr7,ffc16d0c ffc16c20: 2c 1b 00 00 cmpwi r27,0 ffc16c24: 7f 63 db 78 mr r3,r27 } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); ffc16c28: 89 3d 00 08 lbz r9,8(r29) ffc16c2c: 3b 9c ff ff addi r28,r28,-1 ffc16c30: 7f 7c da 14 add r27,r28,r27 fat_fd->map.disk_cln = save_cln; ffc16c34: 92 be 00 38 stw r21,56(r30) } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); ffc16c38: 7f 7b 4c 30 srw r27,r27,r9 } } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ffc16c3c: 7e 9b a2 14 add r20,r27,r20 ffc16c40: 92 9e 00 34 stw r20,52(r30) fat_fd, start, count, buf, file_cln_initial); if (0 > ret) ffc16c44: 41 80 01 38 blt- ffc16d7c <== NEVER TAKEN } if (RC_OK != rc) return rc; else return cmpltd; } ffc16c48: 80 01 00 4c lwz r0,76(r1) ffc16c4c: 82 81 00 18 lwz r20,24(r1) ffc16c50: 7c 08 03 a6 mtlr r0 ffc16c54: 82 a1 00 1c lwz r21,28(r1) ffc16c58: 82 c1 00 20 lwz r22,32(r1) ffc16c5c: 82 e1 00 24 lwz r23,36(r1) ffc16c60: 83 01 00 28 lwz r24,40(r1) ffc16c64: 83 21 00 2c lwz r25,44(r1) ffc16c68: 83 41 00 30 lwz r26,48(r1) ffc16c6c: 83 61 00 34 lwz r27,52(r1) ffc16c70: 83 81 00 38 lwz r28,56(r1) ffc16c74: 83 a1 00 3c lwz r29,60(r1) ffc16c78: 83 c1 00 40 lwz r30,64(r1) ffc16c7c: 83 e1 00 44 lwz r31,68(r1) ffc16c80: 38 21 00 48 addi r1,r1,72 ffc16c84: 4e 80 00 20 blr ffc16c88: 7c df 33 78 mr r31,r6 rtems_set_errno_and_return_minus_one(EFBIG); if (count > fat_fd->size_limit - start) count = fat_fd->size_limit - start; rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); ffc16c8c: 7c bc 28 10 subfc r5,r28,r5 ffc16c90: 7c a5 29 10 subfe r5,r5,r5 ffc16c94: 7f 7f e2 14 add r27,r31,r28 ffc16c98: 7f a3 eb 78 mr r3,r29 ffc16c9c: 7f c4 f3 78 mr r4,r30 ffc16ca0: 7c a5 00 d0 neg r5,r5 ffc16ca4: 7f 66 db 78 mr r6,r27 ffc16ca8: 38 e1 00 0c addi r7,r1,12 ffc16cac: 4b ff fb 6d bl ffc16818 if (RC_OK == rc) ffc16cb0: 2c 03 00 00 cmpwi r3,0 ffc16cb4: 40 a2 ff 94 bne- ffc16c48 ffc16cb8: 4b ff fe 98 b ffc16b50 } if (RC_OK != rc) return rc; else return cmpltd; } ffc16cbc: 80 01 00 4c lwz r0,76(r1) <== NOT EXECUTED uint32_t file_cln_initial = fat_fd->map.file_cln; uint32_t cln; if ( count == 0 ) return cmpltd; ffc16cc0: 38 60 00 00 li r3,0 <== NOT EXECUTED } if (RC_OK != rc) return rc; else return cmpltd; } ffc16cc4: 82 81 00 18 lwz r20,24(r1) <== NOT EXECUTED ffc16cc8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc16ccc: 82 a1 00 1c lwz r21,28(r1) <== NOT EXECUTED ffc16cd0: 82 c1 00 20 lwz r22,32(r1) <== NOT EXECUTED ffc16cd4: 82 e1 00 24 lwz r23,36(r1) <== NOT EXECUTED ffc16cd8: 83 01 00 28 lwz r24,40(r1) <== NOT EXECUTED ffc16cdc: 83 21 00 2c lwz r25,44(r1) <== NOT EXECUTED ffc16ce0: 83 41 00 30 lwz r26,48(r1) <== NOT EXECUTED ffc16ce4: 83 61 00 34 lwz r27,52(r1) <== NOT EXECUTED ffc16ce8: 83 81 00 38 lwz r28,56(r1) <== NOT EXECUTED ffc16cec: 83 a1 00 3c lwz r29,60(r1) <== NOT EXECUTED ffc16cf0: 83 c1 00 40 lwz r30,64(r1) <== NOT EXECUTED ffc16cf4: 83 e1 00 44 lwz r31,68(r1) <== NOT EXECUTED ffc16cf8: 38 21 00 48 addi r1,r1,72 <== NOT EXECUTED ffc16cfc: 4e 80 00 20 blr <== NOT EXECUTED cur_cln, ofs_cln, c, &buf[cmpltd], overwrite_cluster); if (0 > ret) ffc16d00: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc16d04: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc16d08: 4b ff ff 20 b ffc16c28 <== NOT EXECUTED ++file_cln_cnt; bytes_to_write -= ret; cmpltd += ret; save_cln = cur_cln; if (0 < bytes_to_write) rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); ffc16d0c: 7f a3 eb 78 mr r3,r29 ffc16d10: 7e a4 ab 78 mr r4,r21 ffc16d14: 7e c5 b3 78 mr r5,r22 ffc16d18: 48 00 81 ed bl ffc1ef04 ffc16d1c: 39 20 00 00 li r9,0 rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); if (RC_OK == rc) { file_cln_cnt = cur_cln - fat_fd->cln; while ( (RC_OK == rc) ffc16d20: 2c 03 00 00 cmpwi r3,0 ffc16d24: 40 a2 ff 04 bne- ffc16c28 <== NEVER TAKEN ffc16d28: 80 81 00 08 lwz r4,8(r1) ffc16d2c: 4b ff fe a0 b ffc16bcc */ static bool fat_is_fat12_or_fat16_root_dir (const fat_file_fd_t *fat_fd, const uint8_t volume_type) { return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16)); ffc16d30: 81 3e 00 24 lwz r9,36(r30) ffc16d34: 2f 89 00 00 cmpwi cr7,r9,0 ffc16d38: 40 be fe 38 bne- cr7,ffc16b70 <== NEVER TAKEN ffc16d3c: 71 49 00 03 andi. r9,r10,3 ffc16d40: 41 a2 fe 30 beq- ffc16b70 /* for the root directory of FAT12 and FAT16 we need this special handling */ if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type)) { cln = fat_fd->cln; cln += (start >> fs_info->vol.bpc_log2); ffc16d44: 88 9d 00 08 lbz r4,8(r29) byte = start & (fs_info->vol.bpc -1); ret = fat_cluster_write(fs_info, ffc16d48: 7f a3 eb 78 mr r3,r29 /* for the root directory of FAT12 and FAT16 we need this special handling */ if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type)) { cln = fat_fd->cln; cln += (start >> fs_info->vol.bpc_log2); byte = start & (fs_info->vol.bpc -1); ffc16d4c: a0 bd 00 06 lhz r5,6(r29) ret = fat_cluster_write(fs_info, ffc16d50: 7f e6 fb 78 mr r6,r31 count = c - start; /* for the root directory of FAT12 and FAT16 we need this special handling */ if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type)) { cln = fat_fd->cln; ffc16d54: 81 3e 00 1c lwz r9,28(r30) cln += (start >> fs_info->vol.bpc_log2); ffc16d58: 7f 84 24 30 srw r4,r28,r4 byte = start & (fs_info->vol.bpc -1); ffc16d5c: 38 a5 ff ff addi r5,r5,-1 ret = fat_cluster_write(fs_info, ffc16d60: 7c 84 4a 14 add r4,r4,r9 ffc16d64: 7f 85 28 38 and r5,r28,r5 ffc16d68: 7f 27 cb 78 mr r7,r25 ffc16d6c: 39 00 00 00 li r8,0 ffc16d70: 48 00 08 d5 bl ffc17644 cln, byte, count, buf, false); if (0 > ret) ffc16d74: 2c 03 00 00 cmpwi r3,0 ffc16d78: 40 80 fe d0 bge+ ffc16c48 <== ALWAYS TAKEN start, count, buf, file_cln_initial); if (0 > ret) rc = -1; ffc16d7c: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc16d80: 4b ff fe c8 b ffc16c48 <== NOT EXECUTED if ( count == 0 ) return cmpltd; if (start >= fat_fd->size_limit) rtems_set_errno_and_return_minus_one(EFBIG); ffc16d84: 48 00 a9 19 bl ffc2169c <__errno> <== NOT EXECUTED ffc16d88: 39 20 00 1b li r9,27 <== NOT EXECUTED ffc16d8c: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED ffc16d90: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc16d94: 4b ff fe b4 b ffc16c48 <== NOT EXECUTED const uint32_t file_cln_initial) { int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ ffc16d98: 3a a0 00 00 li r21,0 <== NOT EXECUTED const uint32_t count, const uint8_t *buf, const uint32_t file_cln_initial) { int rc = RC_OK; uint32_t cmpltd = 0; ffc16d9c: 3b 60 00 00 li r27,0 <== NOT EXECUTED ffc16da0: 4b ff fe 88 b ffc16c28 <== NOT EXECUTED =============================================================================== ffc1f488 : int fat_free_fat_clusters_chain( fat_fs_info_t *fs_info, uint32_t chain ) { ffc1f488: 94 21 ff d0 stwu r1,-48(r1) ffc1f48c: 7c 08 02 a6 mflr r0 int rc = RC_OK, rc1 = RC_OK; uint32_t cur_cln = chain; uint32_t next_cln = 0; ffc1f490: 39 00 00 00 li r8,0 int fat_free_fat_clusters_chain( fat_fs_info_t *fs_info, uint32_t chain ) { ffc1f494: 90 01 00 34 stw r0,52(r1) int rc = RC_OK, rc1 = RC_OK; 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) ffc1f498: 81 23 00 10 lwz r9,16(r3) ffc1f49c: 81 43 00 14 lwz r10,20(r3) ffc1f4a0: 7c 89 48 38 and r9,r4,r9 int fat_free_fat_clusters_chain( fat_fs_info_t *fs_info, uint32_t chain ) { ffc1f4a4: 93 61 00 1c stw r27,28(r1) int rc = RC_OK, rc1 = RC_OK; 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) ffc1f4a8: 7f 89 50 40 cmplw cr7,r9,r10 int fat_free_fat_clusters_chain( fat_fs_info_t *fs_info, uint32_t chain ) { ffc1f4ac: 93 e1 00 2c stw r31,44(r1) ffc1f4b0: 7c 9b 23 78 mr r27,r4 ffc1f4b4: 7c 7f 1b 78 mr r31,r3 ffc1f4b8: 93 81 00 20 stw r28,32(r1) ffc1f4bc: 93 a1 00 24 stw r29,36(r1) ffc1f4c0: 93 c1 00 28 stw r30,40(r1) int rc = RC_OK, rc1 = RC_OK; uint32_t cur_cln = chain; uint32_t next_cln = 0; ffc1f4c4: 91 01 00 08 stw r8,8(r1) uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc1f4c8: 40 9c 00 a8 bge- cr7,ffc1f570 <== NEVER TAKEN ffc1f4cc: 7c 9e 23 78 mr r30,r4 ffc1f4d0: 3b a0 00 00 li r29,0 ffc1f4d4: 3b 80 00 00 li r28,0 ffc1f4d8: 48 00 00 30 b ffc1f508 fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); ffc1f4dc: 4b ff fc 79 bl ffc1f154 if ( rc != RC_OK ) rc1 = rc; freed_cls_cnt++; ffc1f4e0: 3b bd 00 01 addi r29,r29,1 fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); if ( rc != RC_OK ) ffc1f4e4: 2c 03 00 00 cmpwi r3,0 rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; ffc1f4e8: 83 c1 00 08 lwz r30,8(r1) fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); if ( rc != RC_OK ) ffc1f4ec: 41 82 00 08 beq- ffc1f4f4 <== ALWAYS TAKEN ffc1f4f0: 7c 7c 1b 78 mr r28,r3 <== NOT EXECUTED int rc = RC_OK, rc1 = RC_OK; 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) ffc1f4f4: 81 5f 00 10 lwz r10,16(r31) ffc1f4f8: 81 3f 00 14 lwz r9,20(r31) ffc1f4fc: 7f ca 50 38 and r10,r30,r10 ffc1f500: 7f 8a 48 40 cmplw cr7,r10,r9 ffc1f504: 40 9c 00 74 bge- cr7,ffc1f578 { rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln); ffc1f508: 7f c4 f3 78 mr r4,r30 ffc1f50c: 38 a1 00 08 addi r5,r1,8 ffc1f510: 7f e3 fb 78 mr r3,r31 ffc1f514: 4b ff f9 f1 bl ffc1ef04 fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); ffc1f518: 7f c4 f3 78 mr r4,r30 uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln); if ( rc != RC_OK ) ffc1f51c: 7c 7e 1b 79 mr. r30,r3 fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); ffc1f520: 38 a0 00 00 li r5,0 ffc1f524: 7f e3 fb 78 mr r3,r31 uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln); if ( rc != RC_OK ) ffc1f528: 41 82 ff b4 beq+ ffc1f4dc <== ALWAYS TAKEN { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) ffc1f52c: 81 3f 00 44 lwz r9,68(r31) <== NOT EXECUTED ffc1f530: 2f 89 ff ff cmpwi cr7,r9,-1 <== NOT EXECUTED ffc1f534: 41 9e 00 0c beq- cr7,ffc1f540 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; ffc1f538: 7d 3d 4a 14 add r9,r29,r9 <== NOT EXECUTED ffc1f53c: 91 3f 00 44 stw r9,68(r31) <== NOT EXECUTED fat_buf_release(fs_info); ffc1f540: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc1f544: 4b ff 7a 31 bl ffc16f74 <== NOT EXECUTED fat_buf_release(fs_info); if (rc1 != RC_OK) return rc1; return RC_OK; } ffc1f548: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED ffc1f54c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc1f550: 83 61 00 1c lwz r27,28(r1) <== NOT EXECUTED ffc1f554: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc1f558: 83 81 00 20 lwz r28,32(r1) <== NOT EXECUTED ffc1f55c: 83 a1 00 24 lwz r29,36(r1) <== NOT EXECUTED ffc1f560: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc1f564: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc1f568: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc1f56c: 4e 80 00 20 blr <== NOT EXECUTED ) { int rc = RC_OK, rc1 = RC_OK; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; ffc1f570: 3b a0 00 00 li r29,0 <== NOT EXECUTED fat_free_fat_clusters_chain( fat_fs_info_t *fs_info, uint32_t chain ) { int rc = RC_OK, rc1 = RC_OK; ffc1f574: 3b 80 00 00 li r28,0 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) ffc1f578: 81 3f 00 44 lwz r9,68(r31) freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; ffc1f57c: 93 7f 00 4c stw r27,76(r31) if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) ffc1f580: 2f 89 ff ff cmpwi cr7,r9,-1 ffc1f584: 41 9e 00 0c beq- cr7,ffc1f590 <== ALWAYS TAKEN fs_info->vol.free_cls += freed_cls_cnt; ffc1f588: 7d 3d 4a 14 add r9,r29,r9 <== NOT EXECUTED ffc1f58c: 91 3f 00 44 stw r9,68(r31) <== NOT EXECUTED fat_buf_release(fs_info); ffc1f590: 7f e3 fb 78 mr r3,r31 ffc1f594: 4b ff 79 e1 bl ffc16f74 if (rc1 != RC_OK) return rc1; return RC_OK; } ffc1f598: 80 01 00 34 lwz r0,52(r1) fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) fs_info->vol.free_cls += freed_cls_cnt; fat_buf_release(fs_info); ffc1f59c: 7f 9e e3 78 mr r30,r28 if (rc1 != RC_OK) return rc1; return RC_OK; } ffc1f5a0: 83 61 00 1c lwz r27,28(r1) ffc1f5a4: 7c 08 03 a6 mtlr r0 ffc1f5a8: 7f c3 f3 78 mr r3,r30 ffc1f5ac: 83 81 00 20 lwz r28,32(r1) ffc1f5b0: 83 a1 00 24 lwz r29,36(r1) ffc1f5b4: 83 c1 00 28 lwz r30,40(r1) ffc1f5b8: 83 e1 00 2c lwz r31,44(r1) ffc1f5bc: 38 21 00 30 addi r1,r1,48 ffc1f5c0: 4e 80 00 20 blr =============================================================================== ffc184c0 : fat_free_unique_ino( fat_fs_info_t *fs_info, uint32_t ino ) { FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); ffc184c0: 81 43 00 80 lwz r10,128(r3) <== NOT EXECUTED ffc184c4: 38 e0 ff fe li r7,-2 <== NOT EXECUTED ffc184c8: 81 23 00 74 lwz r9,116(r3) <== NOT EXECUTED ffc184cc: 7c 8a 20 50 subf r4,r10,r4 <== NOT EXECUTED ffc184d0: 54 8a e8 fe rlwinm r10,r4,29,3,31 <== NOT EXECUTED ffc184d4: 7d 09 50 ae lbzx r8,r9,r10 <== NOT EXECUTED ffc184d8: 54 84 07 7e clrlwi r4,r4,29 <== NOT EXECUTED ffc184dc: 5c e4 20 3e rotlw r4,r7,r4 <== NOT EXECUTED ffc184e0: 7c 88 40 38 and r8,r4,r8 <== NOT EXECUTED ffc184e4: 7d 09 51 ae stbx r8,r9,r10 <== NOT EXECUTED ffc184e8: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc1ef04 : uint8_t *sec_buf; uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) ffc1ef04: 2b 84 00 01 cmplwi cr7,r4,1 fat_get_fat_cluster( fat_fs_info_t *fs_info, uint32_t cln, uint32_t *ret_val ) { ffc1ef08: 94 21 ff c8 stwu r1,-56(r1) ffc1ef0c: 7c 08 02 a6 mflr r0 ffc1ef10: 93 c1 00 30 stw r30,48(r1) ffc1ef14: 7c 9e 23 78 mr r30,r4 ffc1ef18: 90 01 00 3c stw r0,60(r1) ffc1ef1c: 93 21 00 1c stw r25,28(r1) ffc1ef20: 93 41 00 20 stw r26,32(r1) ffc1ef24: 93 61 00 24 stw r27,36(r1) ffc1ef28: 93 81 00 28 stw r28,40(r1) ffc1ef2c: 93 a1 00 2c stw r29,44(r1) ffc1ef30: 93 e1 00 34 stw r31,52(r1) uint8_t *sec_buf; uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) ffc1ef34: 40 9d 00 8c ble- cr7,ffc1efc0 <== NEVER TAKEN ffc1ef38: 81 23 00 38 lwz r9,56(r3) ffc1ef3c: 7c 7f 1b 78 mr r31,r3 ffc1ef40: 39 29 00 01 addi r9,r9,1 ffc1ef44: 7f 84 48 40 cmplw cr7,r4,r9 ffc1ef48: 41 9d 00 78 bgt- cr7,ffc1efc0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + ffc1ef4c: 89 23 00 0e lbz r9,14(r3) ffc1ef50: 7c ba 2b 78 mr r26,r5 ffc1ef54: 71 2a 00 01 andi. r10,r9,1 ffc1ef58: 40 82 00 a8 bne- ffc1f000 ffc1ef5c: 55 29 07 bc rlwinm r9,r9,0,30,30 ffc1ef60: 8b 63 00 02 lbz r27,2(r3) ffc1ef64: 71 2a 00 ff andi. r10,r9,255 ffc1ef68: 41 82 00 b4 beq- ffc1f01c ffc1ef6c: 54 9d 08 3c rlwinm r29,r4,1,0,30 ffc1ef70: 81 23 00 58 lwz r9,88(r3) ffc1ef74: 7f bb dc 30 srw r27,r29,r27 ffc1ef78: 7f 7b 4a 14 add r27,r27,r9 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); ffc1ef7c: 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); ffc1ef80: a3 3f 00 00 lhz r25,0(r31) rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); ffc1ef84: 7f 64 db 78 mr r4,r27 ffc1ef88: 38 a0 00 01 li r5,1 ffc1ef8c: 38 c1 00 08 addi r6,r1,8 ffc1ef90: 4b ff 81 c9 bl ffc17158 if (rc != RC_OK) ffc1ef94: 7c 7c 1b 79 mr. r28,r3 ffc1ef98: 40 82 00 38 bne- ffc1efd0 <== NEVER TAKEN return rc; switch ( fs_info->vol.type ) ffc1ef9c: 89 3f 00 0e lbz r9,14(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); ffc1efa0: 3b 39 ff ff addi r25,r25,-1 ffc1efa4: 7f bd c8 38 and r29,r29,r25 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) ffc1efa8: 2f 89 00 02 cmpwi cr7,r9,2 ffc1efac: 41 9e 00 84 beq- cr7,ffc1f030 ffc1efb0: 2f 89 00 04 cmpwi cr7,r9,4 ffc1efb4: 41 9e 01 08 beq- cr7,ffc1f0bc ffc1efb8: 2f 89 00 01 cmpwi cr7,r9,1 ffc1efbc: 41 9e 00 bc beq- cr7,ffc1f078 <== ALWAYS TAKEN *ret_val = *((uint32_t *)(sec_buf + ofs)); *ret_val = CF_LE_L(*ret_val); break; default: rtems_set_errno_and_return_minus_one(EIO); ffc1efc0: 48 00 26 dd bl ffc2169c <__errno> <== NOT EXECUTED ffc1efc4: 39 20 00 05 li r9,5 <== NOT EXECUTED ffc1efc8: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED ffc1efcc: 3b 80 ff ff li r28,-1 <== NOT EXECUTED break; } return RC_OK; } ffc1efd0: 80 01 00 3c lwz r0,60(r1) ffc1efd4: 7f 83 e3 78 mr r3,r28 ffc1efd8: 83 21 00 1c lwz r25,28(r1) ffc1efdc: 7c 08 03 a6 mtlr r0 ffc1efe0: 83 41 00 20 lwz r26,32(r1) ffc1efe4: 83 61 00 24 lwz r27,36(r1) ffc1efe8: 83 81 00 28 lwz r28,40(r1) ffc1efec: 83 a1 00 2c lwz r29,44(r1) ffc1eff0: 83 c1 00 30 lwz r30,48(r1) ffc1eff4: 83 e1 00 34 lwz r31,52(r1) ffc1eff8: 38 21 00 38 addi r1,r1,56 ffc1effc: 4e 80 00 20 blr /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + ffc1f000: 54 9d f8 7e rlwinm r29,r4,31,1,31 ffc1f004: 8b 63 00 02 lbz r27,2(r3) ffc1f008: 7f bd 22 14 add r29,r29,r4 ffc1f00c: 81 23 00 58 lwz r9,88(r3) ffc1f010: 7f bb dc 30 srw r27,r29,r27 ffc1f014: 7f 7b 4a 14 add r27,r27,r9 ffc1f018: 4b ff ff 64 b ffc1ef7c ffc1f01c: 54 9d 10 3a rlwinm r29,r4,2,0,29 ffc1f020: 81 23 00 58 lwz r9,88(r3) ffc1f024: 7f bb dc 30 srw r27,r29,r27 ffc1f028: 7f 7b 4a 14 add r27,r27,r9 ffc1f02c: 4b ff ff 50 b ffc1ef7c else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(sec_buf + ofs)); ffc1f030: 81 21 00 08 lwz r9,8(r1) rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc1f034: 7f 83 e3 78 mr r3,r28 ffc1f038: 80 01 00 3c lwz r0,60(r1) else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(sec_buf + ofs)); ffc1f03c: 7d 29 ea 2e lhzx r9,r9,r29 rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc1f040: 7c 08 03 a6 mtlr r0 ffc1f044: 83 21 00 1c lwz r25,28(r1) *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(sec_buf + ofs)); *ret_val = CF_LE_W(*ret_val); ffc1f048: 55 2a c2 3e rlwinm r10,r9,24,8,31 rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc1f04c: 83 61 00 24 lwz r27,36(r1) *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(sec_buf + ofs)); *ret_val = CF_LE_W(*ret_val); ffc1f050: 55 29 44 2e rlwinm r9,r9,8,16,23 rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc1f054: 83 81 00 28 lwz r28,40(r1) *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(sec_buf + ofs)); *ret_val = CF_LE_W(*ret_val); ffc1f058: 7d 49 4b 78 or r9,r10,r9 rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc1f05c: 83 a1 00 2c lwz r29,44(r1) *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(sec_buf + ofs)); *ret_val = CF_LE_W(*ret_val); ffc1f060: 91 3a 00 00 stw r9,0(r26) rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc1f064: 83 c1 00 30 lwz r30,48(r1) ffc1f068: 83 41 00 20 lwz r26,32(r1) ffc1f06c: 83 e1 00 34 lwz r31,52(r1) ffc1f070: 38 21 00 38 addi r1,r1,56 ffc1f074: 4e 80 00 20 blr /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*(sec_buf + ofs)); if ( ofs == (fs_info->vol.bps - 1) ) ffc1f078: a1 3f 00 00 lhz r9,0(r31) case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*(sec_buf + ofs)); ffc1f07c: 81 41 00 08 lwz r10,8(r1) if ( ofs == (fs_info->vol.bps - 1) ) ffc1f080: 39 29 ff ff addi r9,r9,-1 ffc1f084: 7f 89 e8 00 cmpw cr7,r9,r29 case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*(sec_buf + ofs)); ffc1f088: 7d 2a e8 ae lbzx r9,r10,r29 ffc1f08c: 91 3a 00 00 stw r9,0(r26) if ( ofs == (fs_info->vol.bps - 1) ) ffc1f090: 41 9e 00 84 beq- cr7,ffc1f114 <== NEVER TAKEN *ret_val |= *sec_buf << 8; } else { *ret_val |= *(sec_buf + ofs + 1) << 8; ffc1f094: 7f aa ea 14 add r29,r10,r29 ffc1f098: 89 5d 00 01 lbz r10,1(r29) ffc1f09c: 55 4a 40 2e rlwinm r10,r10,8,0,23 ffc1f0a0: 7d 49 4b 78 or r9,r10,r9 ffc1f0a4: 91 3a 00 00 stw r9,0(r26) } if ( FAT_CLUSTER_IS_ODD(cln) ) ffc1f0a8: 73 ca 00 01 andi. r10,r30,1 ffc1f0ac: 41 82 00 5c beq- ffc1f108 *ret_val = (*ret_val) >> FAT12_SHIFT; ffc1f0b0: 55 29 e1 3e rlwinm r9,r9,28,4,31 ffc1f0b4: 91 3a 00 00 stw r9,0(r26) ffc1f0b8: 4b ff ff 18 b ffc1efd0 *ret_val = *((uint16_t *)(sec_buf + ofs)); *ret_val = CF_LE_W(*ret_val); break; case FAT_FAT32: *ret_val = *((uint32_t *)(sec_buf + ofs)); ffc1f0bc: 81 21 00 08 lwz r9,8(r1) ffc1f0c0: 7d 49 e8 2e lwzx r10,r9,r29 ffc1f0c4: 51 49 46 3e rlwimi r9,r10,8,24,31 ffc1f0c8: 51 49 c4 2e rlwimi r9,r10,24,16,23 ffc1f0cc: 51 49 42 1e rlwimi r9,r10,8,8,15 ffc1f0d0: 51 49 c0 0e rlwimi r9,r10,24,0,7 rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc1f0d4: 80 01 00 3c lwz r0,60(r1) ffc1f0d8: 7f 83 e3 78 mr r3,r28 *ret_val = CF_LE_W(*ret_val); break; case FAT_FAT32: *ret_val = *((uint32_t *)(sec_buf + ofs)); *ret_val = CF_LE_L(*ret_val); ffc1f0dc: 91 3a 00 00 stw r9,0(r26) rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } ffc1f0e0: 7c 08 03 a6 mtlr r0 ffc1f0e4: 83 21 00 1c lwz r25,28(r1) ffc1f0e8: 83 41 00 20 lwz r26,32(r1) ffc1f0ec: 83 61 00 24 lwz r27,36(r1) ffc1f0f0: 83 81 00 28 lwz r28,40(r1) ffc1f0f4: 83 a1 00 2c lwz r29,44(r1) ffc1f0f8: 83 c1 00 30 lwz r30,48(r1) ffc1f0fc: 83 e1 00 34 lwz r31,52(r1) ffc1f100: 38 21 00 38 addi r1,r1,56 ffc1f104: 4e 80 00 20 blr } if ( FAT_CLUSTER_IS_ODD(cln) ) *ret_val = (*ret_val) >> FAT12_SHIFT; else *ret_val = (*ret_val) & FAT_FAT12_MASK; ffc1f108: 55 29 05 3e clrlwi r9,r9,20 ffc1f10c: 91 3a 00 00 stw r9,0(r26) ffc1f110: 4b ff fe c0 b ffc1efd0 * align problems for some architectures */ *ret_val = (*(sec_buf + ofs)); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, ffc1f114: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc1f118: 38 9b 00 01 addi r4,r27,1 <== NOT EXECUTED ffc1f11c: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc1f120: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED ffc1f124: 4b ff 80 35 bl ffc17158 <== NOT EXECUTED &sec_buf); if (rc != RC_OK) ffc1f128: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc1f12c: 40 82 00 20 bne- ffc1f14c <== NOT EXECUTED return rc; *ret_val |= *sec_buf << 8; ffc1f130: 81 41 00 08 lwz r10,8(r1) <== NOT EXECUTED ffc1f134: 81 3a 00 00 lwz r9,0(r26) <== NOT EXECUTED ffc1f138: 89 4a 00 00 lbz r10,0(r10) <== NOT EXECUTED ffc1f13c: 55 4a 40 2e rlwinm r10,r10,8,0,23 <== NOT EXECUTED ffc1f140: 7d 49 4b 78 or r9,r10,r9 <== NOT EXECUTED ffc1f144: 91 3a 00 00 stw r9,0(r26) <== NOT EXECUTED ffc1f148: 4b ff ff 60 b ffc1f0a8 <== NOT EXECUTED *ret_val = (*(sec_buf + ofs)); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) ffc1f14c: 7c 7c 1b 78 mr r28,r3 <== NOT EXECUTED ffc1f150: 4b ff fe 80 b ffc1efd0 <== NOT EXECUTED =============================================================================== ffc1839c : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(fat_fs_info_t *fs_info) { ffc1839c: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED ffc183a0: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc183a4: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED ffc183a8: 93 a1 00 0c stw r29,12(r1) <== NOT EXECUTED fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) ffc183ac: 3f a0 0f ff lis r29,4095 <== NOT EXECUTED ffc183b0: 63 bd ff ff ori r29,r29,65535 <== NOT EXECUTED ffc183b4: 80 83 00 7c lwz r4,124(r3) <== NOT EXECUTED * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(fat_fs_info_t *fs_info) { ffc183b8: 93 c1 00 10 stw r30,16(r1) <== NOT EXECUTED while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) ffc183bc: 3b c0 00 00 li r30,0 <== NOT EXECUTED * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(fat_fs_info_t *fs_info) { ffc183c0: 93 e1 00 14 stw r31,20(r1) <== NOT EXECUTED ffc183c4: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) ffc183c8: 2f 84 00 00 cmpwi cr7,r4,0 <== NOT EXECUTED ffc183cc: 41 9e 00 9c beq- cr7,ffc18468 <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) ffc183d0: 81 3f 00 78 lwz r9,120(r31) <== NOT EXECUTED ffc183d4: 81 1f 00 74 lwz r8,116(r31) <== NOT EXECUTED ffc183d8: 55 2a e8 fe rlwinm r10,r9,29,3,31 <== NOT EXECUTED ffc183dc: 7c e8 50 ae lbzx r7,r8,r10 <== NOT EXECUTED ffc183e0: 55 26 07 7e clrlwi r6,r9,29 <== NOT EXECUTED ffc183e4: 7d 48 52 14 add r10,r8,r10 <== NOT EXECUTED ffc183e8: 7c e5 36 30 sraw r5,r7,r6 <== NOT EXECUTED ffc183ec: 70 a3 00 01 andi. r3,r5,1 <== NOT EXECUTED ffc183f0: 41 82 00 40 beq- ffc18430 <== 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; ffc183f4: 7c 89 03 a6 mtctr r4 <== 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++; ffc183f8: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) ffc183fc: 7f 89 20 40 cmplw cr7,r9,r4 <== 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++; ffc18400: 91 3f 00 78 stw r9,120(r31) <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) ffc18404: 41 9c 00 08 blt- cr7,ffc1840c <== NOT EXECUTED fs_info->index = 0; ffc18408: 93 df 00 78 stw r30,120(r31) <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) ffc1840c: 42 40 00 5c bdz- ffc18468 <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) ffc18410: 81 3f 00 78 lwz r9,120(r31) <== NOT EXECUTED ffc18414: 55 2a e8 fe rlwinm r10,r9,29,3,31 <== NOT EXECUTED ffc18418: 7c e8 50 ae lbzx r7,r8,r10 <== NOT EXECUTED ffc1841c: 55 26 07 7e clrlwi r6,r9,29 <== NOT EXECUTED ffc18420: 7d 48 52 14 add r10,r8,r10 <== NOT EXECUTED ffc18424: 7c e5 36 30 sraw r5,r7,r6 <== NOT EXECUTED ffc18428: 70 a3 00 01 andi. r3,r5,1 <== NOT EXECUTED ffc1842c: 40 82 ff cc bne+ ffc183f8 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); ffc18430: 39 20 00 01 li r9,1 <== NOT EXECUTED ffc18434: 7d 26 30 30 slw r6,r9,r6 <== NOT EXECUTED ffc18438: 7c c7 3b 78 or r7,r6,r7 <== NOT EXECUTED ffc1843c: 98 ea 00 00 stb r7,0(r10) <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } ffc18440: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); ffc18444: 80 7f 00 78 lwz r3,120(r31) <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } ffc18448: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); ffc1844c: 81 3f 00 80 lwz r9,128(r31) <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } ffc18450: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc18454: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); ffc18458: 7c 63 4a 14 add r3,r3,r9 <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } ffc1845c: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc18460: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc18464: 4e 80 00 20 blr <== NOT EXECUTED fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) ffc18468: 81 3f 00 80 lwz r9,128(r31) <== NOT EXECUTED ffc1846c: 54 84 08 3c rlwinm r4,r4,1,0,30 <== NOT EXECUTED ffc18470: 7d 29 e8 50 subf r9,r9,r29 <== NOT EXECUTED ffc18474: 7f 84 48 40 cmplw cr7,r4,r9 <== NOT EXECUTED ffc18478: 41 9c 00 24 blt- cr7,ffc1849c <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } ffc1847c: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED resrc_unsuff = true; } else resrc_unsuff = true; } return 0; ffc18480: 38 60 00 00 li r3,0 <== NOT EXECUTED } ffc18484: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc18488: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc1848c: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc18490: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc18494: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc18498: 4e 80 00 20 blr <== NOT EXECUTED fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; ffc1849c: 90 9f 00 7c stw r4,124(r31) <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); ffc184a0: 80 7f 00 74 lwz r3,116(r31) <== NOT EXECUTED ffc184a4: 4b fe f6 15 bl ffc07ab8 <== NOT EXECUTED if (fs_info->uino != NULL) ffc184a8: 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); ffc184ac: 90 7f 00 74 stw r3,116(r31) <== NOT EXECUTED if (fs_info->uino != NULL) ffc184b0: 41 9e ff cc beq+ cr7,ffc1847c <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; ffc184b4: 80 9f 00 7c lwz r4,124(r31) <== NOT EXECUTED ffc184b8: 90 9f 00 78 stw r4,120(r31) <== NOT EXECUTED ffc184bc: 4b ff ff 0c b ffc183c8 <== NOT EXECUTED =============================================================================== ffc182d0 : int fat_init_clusters_chain( fat_fs_info_t *fs_info, uint32_t start_cln ) { ffc182d0: 94 21 ff e0 stwu r1,-32(r1) ffc182d4: 7c 08 02 a6 mflr r0 ffc182d8: 7c 89 23 78 mr r9,r4 ffc182dc: 93 c1 00 18 stw r30,24(r1) int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; ffc182e0: 7c 3e 0b 78 mr r30,r1 int fat_init_clusters_chain( fat_fs_info_t *fs_info, uint32_t start_cln ) { ffc182e4: 93 e1 00 1c stw r31,28(r1) ffc182e8: 7c 7f 1b 78 mr r31,r3 ffc182ec: 90 01 00 24 stw r0,36(r1) int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; ffc182f0: 94 9e 00 08 stwu r4,8(r30) while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc182f4: 48 00 00 08 b ffc182fc ffc182f8: 81 21 00 08 lwz r9,8(r1) ffc182fc: 81 1f 00 10 lwz r8,16(r31) { ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); ffc18300: 7d 24 4b 78 mr r4,r9 { int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc18304: 81 5f 00 14 lwz r10,20(r31) { ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); ffc18308: 38 a0 00 00 li r5,0 { int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc1830c: 7d 29 40 38 and r9,r9,r8 ffc18310: 7f 89 50 40 cmplw cr7,r9,r10 { ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); ffc18314: 38 e0 00 00 li r7,0 ffc18318: 7f e3 fb 78 mr r3,r31 { int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) ffc1831c: 40 9c 00 48 bge- cr7,ffc18364 { ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); ffc18320: a0 df 00 06 lhz r6,6(r31) ffc18324: 4b ff f1 2d bl ffc17450 if ( ret != fs_info->vol.bpc ) ffc18328: a1 3f 00 06 lhz r9,6(r31) { return -1; } rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); ffc1832c: 7f c5 f3 78 mr r5,r30 uint32_t cur_cln = start_cln; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); if ( ret != fs_info->vol.bpc ) ffc18330: 7f 89 18 00 cmpw cr7,r9,r3 { return -1; } rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); ffc18334: 7f e3 fb 78 mr r3,r31 uint32_t cur_cln = start_cln; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); if ( ret != fs_info->vol.bpc ) ffc18338: 40 9e 00 48 bne- cr7,ffc18380 <== NEVER TAKEN { return -1; } rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); ffc1833c: 80 81 00 08 lwz r4,8(r1) ffc18340: 48 00 6b c5 bl ffc1ef04 if ( rc != RC_OK ) ffc18344: 2c 03 00 00 cmpwi r3,0 ffc18348: 41 82 ff b0 beq+ ffc182f8 <== ALWAYS TAKEN } } return rc; } ffc1834c: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED ffc18350: 83 c1 00 18 lwz r30,24(r1) <== NOT EXECUTED ffc18354: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc18358: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc1835c: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc18360: 4e 80 00 20 blr <== NOT EXECUTED ffc18364: 80 01 00 24 lwz r0,36(r1) return rc; } } return rc; ffc18368: 38 60 00 00 li r3,0 } ffc1836c: 83 c1 00 18 lwz r30,24(r1) ffc18370: 7c 08 03 a6 mtlr r0 ffc18374: 83 e1 00 1c lwz r31,28(r1) ffc18378: 38 21 00 20 addi r1,r1,32 ffc1837c: 4e 80 00 20 blr ffc18380: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); if ( ret != fs_info->vol.bpc ) { return -1; ffc18384: 38 60 ff ff li r3,-1 <== NOT EXECUTED } } return rc; } ffc18388: 83 c1 00 18 lwz r30,24(r1) <== NOT EXECUTED ffc1838c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc18390: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc18394: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc18398: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc1785c : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(fat_fs_info_t *fs_info, const char *device) { ffc1785c: 94 21 ff 28 stwu r1,-216(r1) ffc17860: 7c 08 02 a6 mflr r0 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; ffc17864: 39 40 00 00 li r10,0 * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(fat_fs_info_t *fs_info, const char *device) { ffc17868: 92 81 00 a8 stw r20,168(r1) ffc1786c: 7c 74 1b 78 mr r20,r3 ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; vol->fd = open(device, O_RDWR); ffc17870: 7c 83 23 78 mr r3,r4 ffc17874: 38 80 00 02 li r4,2 * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(fat_fs_info_t *fs_info, const char *device) { ffc17878: 90 01 00 dc stw r0,220(r1) ffc1787c: 91 c1 00 90 stw r14,144(r1) ffc17880: 91 e1 00 94 stw r15,148(r1) ffc17884: 92 01 00 98 stw r16,152(r1) ffc17888: 92 21 00 9c stw r17,156(r1) ffc1788c: 92 41 00 a0 stw r18,160(r1) ffc17890: 92 61 00 a4 stw r19,164(r1) ffc17894: 92 a1 00 ac stw r21,172(r1) ffc17898: 92 c1 00 b0 stw r22,176(r1) ffc1789c: 92 e1 00 b4 stw r23,180(r1) ffc178a0: 93 01 00 b8 stw r24,184(r1) ffc178a4: 93 21 00 bc stw r25,188(r1) ffc178a8: 93 41 00 c0 stw r26,192(r1) ffc178ac: 93 61 00 c4 stw r27,196(r1) ffc178b0: 93 81 00 c8 stw r28,200(r1) ffc178b4: 93 a1 00 cc stw r29,204(r1) ffc178b8: 93 c1 00 d0 stw r30,208(r1) ffc178bc: 93 e1 00 d4 stw r31,212(r1) 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; ffc178c0: 91 41 00 5c stw r10,92(r1) vol->fd = open(device, O_RDWR); ffc178c4: 4c c6 31 82 crclr 4*cr1+eq ffc178c8: 4b fe fe c1 bl ffc07788 if (vol->fd < 0) ffc178cc: 2f 83 00 00 cmpwi cr7,r3,0 ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; vol->fd = open(device, O_RDWR); ffc178d0: 90 74 00 60 stw r3,96(r20) if (vol->fd < 0) ffc178d4: 41 9c 06 e8 blt- cr7,ffc17fbc <== NEVER TAKEN { rtems_set_errno_and_return_minus_one(ENXIO); } rc = fstat(vol->fd, &stat_buf); ffc178d8: 38 81 00 08 addi r4,r1,8 ffc178dc: 4b fe ef 21 bl ffc067fc if (rc != 0) ffc178e0: 2f 83 00 00 cmpwi cr7,r3,0 ffc178e4: 40 9e 06 d0 bne- cr7,ffc17fb4 <== NEVER TAKEN close(vol->fd); rtems_set_errno_and_return_minus_one(ENXIO); } /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) ffc178e8: 81 41 00 14 lwz r10,20(r1) { close(vol->fd); ffc178ec: 80 74 00 60 lwz r3,96(r20) close(vol->fd); rtems_set_errno_and_return_minus_one(ENXIO); } /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) ffc178f0: 55 4a 04 26 rlwinm r10,r10,0,16,19 ffc178f4: 2f 8a 60 00 cmpwi cr7,r10,24576 ffc178f8: 40 9e 06 c0 bne- cr7,ffc17fb8 <== NEVER TAKEN static inline int rtems_disk_fd_get_disk_device( int fd, rtems_disk_device **dd_ptr ) { return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr); ffc178fc: 3c 80 40 04 lis r4,16388 ffc17900: 60 84 42 09 ori r4,r4,16905 ffc17904: 38 b4 00 64 addi r5,r20,100 ffc17908: 4c c6 31 82 crclr 4*cr1+eq ffc1790c: 48 00 1a 7d bl ffc19388 rtems_set_errno_and_return_minus_one(ENXIO); } /* check that device is registred as block device and lock it */ rc = rtems_disk_fd_get_disk_device(vol->fd, &vol->dd); if (rc != 0) { ffc17910: 2f 83 00 00 cmpwi cr7,r3,0 ffc17914: 40 9e 06 a0 bne- cr7,ffc17fb4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(ENXIO); } /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dd, 0, &block); ffc17918: 80 74 00 64 lwz r3,100(r20) ffc1791c: 38 80 00 00 li r4,0 ffc17920: 38 a1 00 5c addi r5,r1,92 ffc17924: 4b ff cb d9 bl ffc144fc if (sc != RTEMS_SUCCESSFUL) ffc17928: 2f 83 00 00 cmpwi cr7,r3,0 ffc1792c: 40 9e 06 bc bne- cr7,ffc17fe8 <== NEVER TAKEN { close(vol->fd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); ffc17930: 80 61 00 5c lwz r3,92(r1) ffc17934: 81 43 00 1c lwz r10,28(r3) ffc17938: 89 2a 00 21 lbz r9,33(r10) ffc1793c: 8b ea 00 0b lbz r31,11(r10) ffc17940: 91 21 00 6c stw r9,108(r1) ffc17944: 89 2a 00 24 lbz r9,36(r10) ffc17948: 8b ca 00 0c lbz r30,12(r10) ffc1794c: 91 21 00 70 stw r9,112(r1) ffc17950: 89 2a 00 25 lbz r9,37(r10) ffc17954: 89 ea 00 0d lbz r15,13(r10) ffc17958: 91 21 00 68 stw r9,104(r1) ffc1795c: 89 2a 00 28 lbz r9,40(r10) ffc17960: 8a ea 00 0e lbz r23,14(r10) ffc17964: 91 21 00 74 stw r9,116(r1) ffc17968: 89 2a 00 2c lbz r9,44(r10) ffc1796c: 8a ca 00 0f lbz r22,15(r10) ffc17970: 91 21 00 80 stw r9,128(r1) ffc17974: 89 2a 00 2d lbz r9,45(r10) ffc17978: 8a 4a 00 10 lbz r18,16(r10) ffc1797c: 91 21 00 84 stw r9,132(r1) ffc17980: 89 2a 00 2e lbz r9,46(r10) ffc17984: 8b aa 00 11 lbz r29,17(r10) ffc17988: 91 21 00 88 stw r9,136(r1) ffc1798c: 89 2a 00 2f lbz r9,47(r10) ffc17990: 8b 8a 00 12 lbz r28,18(r10) ffc17994: 8b 6a 00 13 lbz r27,19(r10) ffc17998: 8b 4a 00 14 lbz r26,20(r10) ffc1799c: 8b 2a 00 16 lbz r25,22(r10) ffc179a0: 8b 0a 00 17 lbz r24,23(r10) ffc179a4: 89 ca 00 20 lbz r14,32(r10) ffc179a8: 8a 2a 00 22 lbz r17,34(r10) ffc179ac: 8a 0a 00 23 lbz r16,35(r10) ffc179b0: 8a 6a 00 26 lbz r19,38(r10) ffc179b4: 8a aa 00 27 lbz r21,39(r10) ffc179b8: 91 21 00 8c stw r9,140(r1) ffc179bc: 89 2a 00 30 lbz r9,48(r10) ffc179c0: 89 4a 00 31 lbz r10,49(r10) ffc179c4: 91 21 00 78 stw r9,120(r1) ffc179c8: 91 41 00 7c stw r10,124(r1) sc = rtems_bdbuf_release( block); ffc179cc: 4b ff cd 71 bl ffc1473c if (sc != RTEMS_SUCCESSFUL) ffc179d0: 2c 03 00 00 cmpwi r3,0 ffc179d4: 40 82 06 14 bne- ffc17fe8 <== NEVER TAKEN close(vol->fd); rtems_set_errno_and_return_minus_one( EIO ); } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); ffc179d8: 57 de 40 2e rlwinm r30,r30,8,0,23 ffc179dc: 7f df fb 78 or r31,r30,r31 ffc179e0: 7f ff 07 34 extsh r31,r31 ffc179e4: 57 e4 04 3e clrlwi r4,r31,16 if ( (vol->bps != 512) && ffc179e8: 2f 84 02 00 cmpwi cr7,r4,512 close(vol->fd); rtems_set_errno_and_return_minus_one( EIO ); } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); ffc179ec: b0 94 00 00 sth r4,0(r20) if ( (vol->bps != 512) && ffc179f0: 41 9e 05 74 beq- cr7,ffc17f64 <== ALWAYS TAKEN ffc179f4: 2f 84 04 00 cmpwi cr7,r4,1024 <== NOT EXECUTED ffc179f8: 41 9e 00 14 beq- cr7,ffc17a0c <== NOT EXECUTED (vol->bps != 1024) && ffc179fc: 2f 84 08 00 cmpwi cr7,r4,2048 <== NOT EXECUTED ffc17a00: 41 9e 00 0c beq- cr7,ffc17a0c <== NOT EXECUTED (vol->bps != 2048) && ffc17a04: 2f 84 10 00 cmpwi cr7,r4,4096 <== NOT EXECUTED ffc17a08: 40 9e 05 90 bne- cr7,ffc17f98 <== NOT EXECUTED (vol->bps != 4096)) { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; ffc17a0c: 54 8a ba 7e rlwinm r10,r4,23,9,31 <== NOT EXECUTED ffc17a10: 39 00 00 01 li r8,1 <== NOT EXECUTED ffc17a14: 48 00 00 08 b ffc17a1c <== NOT EXECUTED ffc17a18: 7c e8 3b 78 mr r8,r7 <== NOT EXECUTED i >>= 1, vol->sec_mul++); ffc17a1c: 7d 4a 0e 70 srawi r10,r10,1 <== NOT EXECUTED (vol->bps != 4096)) { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; ffc17a20: 71 49 00 01 andi. r9,r10,1 <== NOT EXECUTED ffc17a24: 38 e8 00 01 addi r7,r8,1 <== NOT EXECUTED ffc17a28: 54 e7 06 3e clrlwi r7,r7,24 <== NOT EXECUTED ffc17a2c: 41 82 ff ec beq+ ffc17a18 <== NOT EXECUTED ffc17a30: 99 14 00 03 stb r8,3(r20) <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; ffc17a34: 73 e9 00 01 andi. r9,r31,1 ffc17a38: 39 40 00 00 li r10,0 ffc17a3c: 99 54 00 02 stb r10,2(r20) ffc17a40: 40 82 05 98 bne- ffc17fd8 <== NEVER TAKEN ffc17a44: 7c 8a 23 78 mr r10,r4 ffc17a48: 39 00 00 01 li r8,1 ffc17a4c: 48 00 00 08 b ffc17a54 ffc17a50: 7c e8 3b 78 mr r8,r7 i >>= 1, vol->sec_log2++); ffc17a54: 7d 4a 0e 70 srawi r10,r10,1 close(vol->fd); 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; ffc17a58: 71 49 00 01 andi. r9,r10,1 ffc17a5c: 38 e8 00 01 addi r7,r8,1 ffc17a60: 54 e7 06 3e clrlwi r7,r7,24 ffc17a64: 41 82 ff ec beq+ ffc17a50 ffc17a68: 99 14 00 02 stb r8,2(r20) 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) ffc17a6c: 2f 8f 00 00 cmpwi cr7,r15,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->bytes_per_block = vol->bps; ffc17a70: b0 94 00 0a sth r4,10(r20) vol->bytes_per_block_log2 = vol->sec_log2; vol->sectors_per_block = 1; ffc17a74: 39 40 00 01 li r10,1 i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; i >>= 1, vol->sec_log2++); vol->bytes_per_block = vol->bps; vol->bytes_per_block_log2 = vol->sec_log2; ffc17a78: 99 14 00 0c stb r8,12(r20) vol->sectors_per_block = 1; ffc17a7c: 99 54 00 09 stb r10,9(r20) vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); ffc17a80: 99 f4 00 04 stb r15,4(r20) /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) ffc17a84: 41 9e 05 14 beq- cr7,ffc17f98 <== NEVER TAKEN { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; ffc17a88: 71 e9 00 01 andi. r9,r15,1 ffc17a8c: 39 40 00 00 li r10,0 ffc17a90: 99 54 00 05 stb r10,5(r20) ffc17a94: 7d ea 7b 78 mr r10,r15 ffc17a98: 40 82 05 48 bne- ffc17fe0 ffc17a9c: 38 e0 00 01 li r7,1 ffc17aa0: 48 00 00 08 b ffc17aa8 ffc17aa4: 7c 67 1b 78 mr r7,r3 i >>= 1, vol->spc_log2++); ffc17aa8: 7d 4a 0e 70 srawi r10,r10,1 { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; ffc17aac: 71 49 00 01 andi. r9,r10,1 ffc17ab0: 38 67 00 01 addi r3,r7,1 ffc17ab4: 54 63 06 3e clrlwi r3,r3,24 ffc17ab8: 41 82 ff ec beq+ ffc17aa4 ffc17abc: 98 f4 00 05 stb r7,5(r20) 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) ffc17ac0: 7c 8a 38 30 slw r10,r4,r7 ffc17ac4: 55 47 04 3e clrlwi r7,r10,16 ffc17ac8: 2b 87 80 00 cmplwi cr7,r7,32768 ffc17acc: b0 f4 00 06 sth r7,6(r20) ffc17ad0: 41 9d 04 c8 bgt- cr7,ffc17f98 <== NEVER TAKEN { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; ffc17ad4: 71 49 00 01 andi. r9,r10,1 ffc17ad8: 38 e0 00 00 li r7,0 ffc17adc: 98 f4 00 08 stb r7,8(r20) ffc17ae0: 55 4a 04 3e clrlwi r10,r10,16 ffc17ae4: 38 e0 00 01 li r7,1 ffc17ae8: 41 a2 00 0c beq+ ffc17af4 <== ALWAYS TAKEN ffc17aec: 48 00 00 20 b ffc17b0c <== NOT EXECUTED ffc17af0: 7c 67 1b 78 mr r7,r3 i >>= 1, vol->bpc_log2++); ffc17af4: 7d 4a 0e 70 srawi r10,r10,1 { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; ffc17af8: 71 49 00 01 andi. r9,r10,1 ffc17afc: 38 67 00 01 addi r3,r7,1 ffc17b00: 54 63 06 3e clrlwi r3,r3,24 ffc17b04: 41 82 ff ec beq+ ffc17af0 ffc17b08: 98 f4 00 08 stb r7,8(r20) 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); ffc17b0c: 57 9c 40 2e rlwinm r28,r28,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); ffc17b10: 9a 54 00 0d stb r18,13(r20) vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); ffc17b14: 7f 9d eb 78 or r29,r28,r29 /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / ffc17b18: 39 44 ff ff addi r10,r4,-1 i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); ffc17b1c: b3 b4 00 24 sth r29,36(r20) /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / ffc17b20: 57 a7 28 34 rlwinm r7,r29,5,0,26 ffc17b24: 7d 47 52 14 add r10,r7,r10 ffc17b28: 7c 8a 23 d6 divw r4,r10,r4 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) ffc17b2c: 57 18 40 2e rlwinm r24,r24,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)) / ffc17b30: 90 94 00 28 stw r4,40(r20) vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) ffc17b34: 7f 19 cb 78 or r25,r24,r25 ffc17b38: 7f 38 07 35 extsh. r24,r25 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); ffc17b3c: 56 d6 40 2e rlwinm r22,r22,8,0,23 ffc17b40: 7e d7 bb 78 or r23,r22,r23 /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; ffc17b44: 7c 88 40 30 slw r8,r4,r8 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); ffc17b48: b2 f4 00 18 sth r23,24(r20) /* 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; ffc17b4c: 91 14 00 2c stw r8,44(r20) if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) ffc17b50: 40 82 01 f0 bne- ffc17d40 vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); ffc17b54: 81 21 00 68 lwz r9,104(r1) ffc17b58: 56 73 80 1e rlwinm r19,r19,16,0,15 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) ffc17b5c: 57 5a 40 2e rlwinm r26,r26,8,0,23 vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); ffc17b60: 55 39 40 2e rlwinm r25,r9,8,0,23 ffc17b64: 81 21 00 70 lwz r9,112(r1) ffc17b68: 7f 39 9b 78 or r25,r25,r19 ffc17b6c: 7f 39 4b 78 or r25,r25,r9 ffc17b70: 56 b5 c0 0e rlwinm r21,r21,24,0,7 ffc17b74: 7f 39 ab 78 or r25,r25,r21 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) ffc17b78: 7f 5b db 78 or r27,r26,r27 vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); ffc17b7c: 93 34 00 1c stw r25,28(r20) vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + ffc17b80: 7c b9 91 d6 mullw r5,r25,r18 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) ffc17b84: 7f 7a 07 35 extsh. r26,r27 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 + ffc17b88: 7c a5 ba 14 add r5,r5,r23 ffc17b8c: 7c 85 22 14 add r4,r5,r4 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; ffc17b90: 90 b4 00 20 stw r5,32(r20) 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 + ffc17b94: 90 94 00 34 stw r4,52(r20) 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) ffc17b98: 41 82 01 d4 beq- ffc17d6c <== ALWAYS TAKEN vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); ffc17b9c: 57 5b 04 3e clrlwi r27,r26,16 else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); data_secs = vol->tot_secs - vol->data_fsec; ffc17ba0: 7c 84 d8 50 subf r4,r4,r27 /* 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) vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); ffc17ba4: 93 74 00 30 stw r27,48(r20) 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; ffc17ba8: 7c c4 7b 96 divwu r6,r4,r15 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) ffc17bac: 2b 86 0f f4 cmplwi cr7,r6,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; ffc17bb0: 90 d4 00 38 stw r6,56(r20) /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) ffc17bb4: 41 9d 01 ec bgt- cr7,ffc17da0 { vol->type = FAT_FAT12; ffc17bb8: 39 40 00 01 li r10,1 ffc17bbc: 99 54 00 0e stb r10,14(r20) vol->mask = FAT_FAT12_MASK; ffc17bc0: 39 40 0f ff li r10,4095 ffc17bc4: 91 54 00 10 stw r10,16(r20) vol->eoc_val = FAT_FAT12_EOC; ffc17bc8: 39 40 0f f8 li r10,4088 ffc17bcc: 91 54 00 14 stw r10,20(r20) } } } else { vol->rdir_cl = 0; ffc17bd0: 39 40 00 00 li r10,0 vol->mirror = 0; vol->afat = 0; vol->free_cls = FAT_UNDEFINED_VALUE; ffc17bd4: 39 00 ff ff li r8,-1 } } } else { vol->rdir_cl = 0; ffc17bd8: 91 54 00 3c stw r10,60(r20) vol->mirror = 0; ffc17bdc: 99 54 00 54 stb r10,84(r20) vol->afat = 0; ffc17be0: 99 54 00 5c stb r10,92(r20) vol->free_cls = FAT_UNDEFINED_VALUE; ffc17be4: 91 14 00 44 stw r8,68(r20) vol->next_cl = FAT_UNDEFINED_VALUE; ffc17be8: 91 14 00 4c stw r8,76(r20) * 0 on success, or -1 if error occured and errno set appropriately */ int _fat_block_release(fat_fs_info_t *fs_info) { return fat_buf_release(fs_info); ffc17bec: 7e 83 a3 78 mr r3,r20 ffc17bf0: 4b ff f3 85 bl ffc16f74 vol->next_cl = FAT_UNDEFINED_VALUE; } _fat_block_release(fs_info); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; ffc17bf4: 88 f4 00 5c lbz r7,92(r20) ffc17bf8: 81 54 00 1c lwz r10,28(r20) /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); ffc17bfc: 38 60 00 02 li r3,2 vol->next_cl = FAT_UNDEFINED_VALUE; } _fat_block_release(fs_info); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; ffc17c00: a1 14 00 18 lhz r8,24(r20) /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); ffc17c04: 38 80 00 0c li r4,12 vol->next_cl = FAT_UNDEFINED_VALUE; } _fat_block_release(fs_info); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; ffc17c08: 7d 47 51 d6 mullw r10,r7,r10 ffc17c0c: 7d 4a 42 14 add r10,r10,r8 ffc17c10: 91 54 00 58 stw r10,88(r20) /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); ffc17c14: 4b fe e9 ed bl ffc06600 if ( fs_info->vhash == NULL ) ffc17c18: 2f 83 00 00 cmpwi cr7,r3,0 _fat_block_release(fs_info); 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)); ffc17c1c: 90 74 00 6c stw r3,108(r20) ffc17c20: 7c 6a 1b 78 mr r10,r3 if ( fs_info->vhash == NULL ) ffc17c24: 41 9e 04 0c beq- cr7,ffc18030 <== 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 ); ffc17c28: 38 c3 00 04 addi r6,r3,4 head->next = tail; head->previous = NULL; tail->previous = head; ffc17c2c: 91 4a 00 08 stw r10,8(r10) 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 ); ffc17c30: 39 03 00 0c addi r8,r3,12 ffc17c34: 38 e3 00 10 addi r7,r3,16 head->next = tail; ffc17c38: 90 ca 00 00 stw r6,0(r10) head->previous = NULL; ffc17c3c: 3b e0 00 00 li r31,0 ffc17c40: 93 ea 00 04 stw r31,4(r10) } 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)); ffc17c44: 38 60 00 02 li r3,2 ffc17c48: 38 80 00 0c li r4,12 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc17c4c: 90 ea 00 0c stw r7,12(r10) head->previous = NULL; ffc17c50: 93 ea 00 10 stw r31,16(r10) tail->previous = head; ffc17c54: 91 0a 00 14 stw r8,20(r10) ffc17c58: 4b fe e9 a9 bl ffc06600 if ( fs_info->rhash == NULL ) ffc17c5c: 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)); ffc17c60: 90 74 00 70 stw r3,112(r20) ffc17c64: 7c 6a 1b 78 mr r10,r3 if ( fs_info->rhash == NULL ) ffc17c68: 41 9e 03 fc beq- cr7,ffc18064 <== NEVER TAKEN } 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; ffc17c6c: 88 f4 00 03 lbz r7,3(r20) 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 ); ffc17c70: 38 c3 00 04 addi r6,r3,4 ffc17c74: 81 14 00 30 lwz r8,48(r20) fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); ffc17c78: 38 80 00 01 li r4,1 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; fs_info->index = 0; ffc17c7c: 93 f4 00 78 stw r31,120(r20) } 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; ffc17c80: 7d 08 38 30 slw r8,r8,r7 ffc17c84: 55 08 20 36 rlwinm r8,r8,4,0,27 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; ffc17c88: 38 e0 01 00 li r7,256 fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; ffc17c8c: 91 14 00 80 stw r8,128(r20) ffc17c90: 39 03 00 0c addi r8,r3,12 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; ffc17c94: 90 f4 00 7c stw r7,124(r20) ffc17c98: 38 e3 00 10 addi r7,r3,16 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)); ffc17c9c: 38 60 01 00 li r3,256 head->next = tail; ffc17ca0: 90 ca 00 00 stw r6,0(r10) head->previous = NULL; ffc17ca4: 93 ea 00 04 stw r31,4(r10) tail->previous = head; ffc17ca8: 91 4a 00 08 stw r10,8(r10) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc17cac: 90 ea 00 0c stw r7,12(r10) head->previous = NULL; ffc17cb0: 93 ea 00 10 stw r31,16(r10) tail->previous = head; ffc17cb4: 91 0a 00 14 stw r8,20(r10) ffc17cb8: 4b fe e9 49 bl ffc06600 if ( fs_info->uino == NULL ) ffc17cbc: 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)); ffc17cc0: 90 74 00 74 stw r3,116(r20) if ( fs_info->uino == NULL ) ffc17cc4: 41 9e 03 40 beq- cr7,ffc18004 <== NEVER TAKEN close(vol->fd); 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)); ffc17cc8: a0 74 00 00 lhz r3,0(r20) ffc17ccc: 38 80 00 01 li r4,1 ffc17cd0: 4b fe e9 31 bl ffc06600 if (fs_info->sec_buf == NULL) ffc17cd4: 2f 83 00 00 cmpwi cr7,r3,0 close(vol->fd); 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)); ffc17cd8: 90 74 00 90 stw r3,144(r20) if (fs_info->sec_buf == NULL) ffc17cdc: 41 9e 03 98 beq- cr7,ffc18074 <== NEVER TAKEN return bytes_written; } static bool is_cluster_aligned(const fat_vol_t *vol, uint32_t sec_num) { return (sec_num & (vol->spc - 1)) == 0; ffc17ce0: 89 54 00 04 lbz r10,4(r20) ffc17ce4: 81 14 00 34 lwz r8,52(r20) ffc17ce8: 39 4a ff ff addi r10,r10,-1 /* * If possible we will use the cluster size as bdbuf block size for faster * file access. This requires that certain sectors are aligned to cluster * borders. */ if (is_cluster_aligned(vol, vol->data_fsec) ffc17cec: 7d 49 40 39 and. r9,r10,r8 ffc17cf0: 40 82 02 18 bne- ffc17f08 <== NEVER TAKEN && (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc))) ffc17cf4: 89 14 00 0e lbz r8,14(r20) ffc17cf8: 2f 88 00 04 cmpwi cr7,r8,4 ffc17cfc: 41 9e 00 10 beq- cr7,ffc17d0c return bytes_written; } static bool is_cluster_aligned(const fat_vol_t *vol, uint32_t sec_num) { return (sec_num & (vol->spc - 1)) == 0; ffc17d00: 81 14 00 20 lwz r8,32(r20) * If possible we will use the cluster size as bdbuf block size for faster * file access. This requires that certain sectors are aligned to cluster * borders. */ if (is_cluster_aligned(vol, vol->data_fsec) && (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc))) ffc17d04: 7d 49 40 39 and. r9,r10,r8 ffc17d08: 40 82 02 00 bne- ffc17f08 <== NEVER TAKEN { sc = rtems_bdbuf_set_block_size (vol->dd, vol->bpc, true); ffc17d0c: 80 74 00 64 lwz r3,100(r20) ffc17d10: 38 a0 00 01 li r5,1 ffc17d14: a0 94 00 06 lhz r4,6(r20) ffc17d18: 4b ff cf c5 bl ffc14cdc if (sc == RTEMS_SUCCESSFUL) ffc17d1c: 2f 83 00 00 cmpwi cr7,r3,0 ffc17d20: 40 9e 01 e8 bne- cr7,ffc17f08 <== NEVER TAKEN { vol->bytes_per_block = vol->bpc; ffc17d24: a0 f4 00 06 lhz r7,6(r20) vol->bytes_per_block_log2 = vol->bpc_log2; ffc17d28: 89 14 00 08 lbz r8,8(r20) vol->sectors_per_block = vol->spc; ffc17d2c: 89 54 00 04 lbz r10,4(r20) && (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc))) { sc = rtems_bdbuf_set_block_size (vol->dd, vol->bpc, true); if (sc == RTEMS_SUCCESSFUL) { vol->bytes_per_block = vol->bpc; ffc17d30: b0 f4 00 0a sth r7,10(r20) vol->bytes_per_block_log2 = vol->bpc_log2; ffc17d34: 99 14 00 0c stb r8,12(r20) vol->sectors_per_block = vol->spc; ffc17d38: 99 54 00 09 stb r10,9(r20) ffc17d3c: 48 00 01 d0 b ffc17f0c 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) ffc17d40: 57 5a 40 2e rlwinm r26,r26,8,0,23 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); ffc17d44: 57 19 04 3e clrlwi r25,r24,16 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) ffc17d48: 7f 5b db 78 or r27,r26,r27 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); ffc17d4c: 93 34 00 1c stw r25,28(r20) else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + ffc17d50: 7c b9 91 d6 mullw r5,r25,r18 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) ffc17d54: 7f 7a 07 35 extsh. r26,r27 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 + ffc17d58: 7c a5 ba 14 add r5,r5,r23 ffc17d5c: 7c 85 22 14 add r4,r5,r4 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; ffc17d60: 90 b4 00 20 stw r5,32(r20) 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 + ffc17d64: 90 94 00 34 stw r4,52(r20) 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) ffc17d68: 40 a2 fe 34 bne- ffc17b9c vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); ffc17d6c: 81 21 00 6c lwz r9,108(r1) ffc17d70: 56 31 80 1e rlwinm r17,r17,16,0,15 ffc17d74: 56 10 c0 0e rlwinm r16,r16,24,0,7 ffc17d78: 55 3b 40 2e rlwinm r27,r9,8,0,23 ffc17d7c: 7f 7b 8b 78 or r27,r27,r17 ffc17d80: 7f 7b 73 78 or r27,r27,r14 ffc17d84: 7f 7b 83 78 or r27,r27,r16 data_secs = vol->tot_secs - vol->data_fsec; ffc17d88: 7c 84 d8 50 subf r4,r4,r27 vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); ffc17d8c: 93 74 00 30 stw r27,48(r20) data_secs = vol->tot_secs - vol->data_fsec; vol->data_cls = data_secs / vol->spc; ffc17d90: 7c c4 7b 96 divwu r6,r4,r15 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) ffc17d94: 2b 86 0f f4 cmplwi cr7,r6,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; ffc17d98: 90 d4 00 38 stw r6,56(r20) /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) ffc17d9c: 40 bd fe 1c ble- cr7,ffc17bb8 vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) ffc17da0: 2b 86 ff f4 cmplwi cr7,r6,65524 ffc17da4: 40 9d 01 c8 ble- cr7,ffc17f6c 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; ffc17da8: 81 21 00 74 lwz r9,116(r1) ffc17dac: 55 2a 00 30 rlwinm r10,r9,0,0,24 } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); ffc17db0: 81 21 00 84 lwz r9,132(r1) vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; ffc17db4: 55 4a 06 3e clrlwi r10,r10,24 } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); ffc17db8: 55 27 40 2e rlwinm r7,r9,8,0,23 ffc17dbc: 81 21 00 88 lwz r9,136(r1) vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; if (vol->mirror) ffc17dc0: 2f 8a 00 00 cmpwi cr7,r10,0 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; ffc17dc4: 99 54 00 54 stb r10,84(r20) } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); ffc17dc8: 55 28 80 1e rlwinm r8,r9,16,0,15 ffc17dcc: 81 21 00 80 lwz r9,128(r1) ffc17dd0: 7c e7 43 78 or r7,r7,r8 ffc17dd4: 7c e7 4b 78 or r7,r7,r9 ffc17dd8: 81 21 00 8c lwz r9,140(r1) ffc17ddc: 55 28 c0 0e rlwinm r8,r9,24,0,7 ffc17de0: 7c e8 43 78 or r8,r7,r8 vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; ffc17de4: 38 e0 00 04 li r7,4 } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); ffc17de8: 91 14 00 3c stw r8,60(r20) vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; ffc17dec: 98 f4 00 0e stb r7,14(r20) vol->mask = FAT_FAT32_MASK; ffc17df0: 3c e0 0f ff lis r7,4095 ffc17df4: 60 e7 ff ff ori r7,r7,65535 ffc17df8: 90 f4 00 10 stw r7,16(r20) vol->eoc_val = FAT_FAT32_EOC; ffc17dfc: 3c e0 0f ff lis r7,4095 ffc17e00: 60 e7 ff f8 ori r7,r7,65528 ffc17e04: 90 f4 00 14 stw r7,20(r20) if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; if (vol->mirror) ffc17e08: 41 9e 01 c8 beq- cr7,ffc17fd0 <== ALWAYS TAKEN vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; ffc17e0c: 81 21 00 74 lwz r9,116(r1) <== NOT EXECUTED ffc17e10: 55 2a 07 3e clrlwi r10,r9,28 <== NOT EXECUTED ffc17e14: 99 54 00 5c stb r10,92(r20) <== NOT EXECUTED else vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); ffc17e18: 81 21 00 7c lwz r9,124(r1) ffc17e1c: 55 24 40 2e rlwinm r4,r9,8,0,23 ffc17e20: 81 21 00 78 lwz r9,120(r1) ffc17e24: 7c 84 4b 78 or r4,r4,r9 if( vol->info_sec == 0 ) ffc17e28: 2f 84 00 00 cmpwi cr7,r4,0 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); ffc17e2c: b0 94 00 40 sth r4,64(r20) if( vol->info_sec == 0 ) ffc17e30: 41 9e 01 68 beq- cr7,ffc17f98 <== NEVER TAKEN close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(fs_info, vol->info_sec , 0, ffc17e34: 7e 83 a3 78 mr r3,r20 ffc17e38: 38 a0 00 00 li r5,0 ffc17e3c: 38 c0 00 04 li r6,4 ffc17e40: 38 e1 00 50 addi r7,r1,80 ffc17e44: 4b ff f4 0d bl ffc17250 <_fat_block_read> FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) ffc17e48: 2f 83 00 00 cmpwi cr7,r3,0 ffc17e4c: 41 9c 02 08 blt- cr7,ffc18054 <== NEVER TAKEN { close(vol->fd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != ffc17e50: 88 c1 00 51 lbz r6,81(r1) ffc17e54: 89 01 00 52 lbz r8,82(r1) ffc17e58: 54 c6 40 2e rlwinm r6,r6,8,0,23 ffc17e5c: 88 e1 00 50 lbz r7,80(r1) ffc17e60: 55 08 80 1e rlwinm r8,r8,16,0,15 ffc17e64: 89 41 00 53 lbz r10,83(r1) ffc17e68: 7c c8 43 78 or r8,r6,r8 ffc17e6c: 55 4a c0 0e rlwinm r10,r10,24,0,7 ffc17e70: 7d 08 3b 78 or r8,r8,r7 ffc17e74: 7d 08 53 78 or r8,r8,r10 ffc17e78: 6d 0a 41 61 xoris r10,r8,16737 ffc17e7c: 2f 8a 52 52 cmpwi cr7,r10,21074 ffc17e80: 40 9e 01 10 bne- cr7,ffc17f90 <== NEVER TAKEN close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(fs_info, vol->info_sec , FAT_FSI_INFO, ffc17e84: a0 94 00 40 lhz r4,64(r20) ffc17e88: 7e 83 a3 78 mr r3,r20 ffc17e8c: 38 a0 01 e4 li r5,484 ffc17e90: 38 c0 00 0c li r6,12 ffc17e94: 38 e1 00 50 addi r7,r1,80 ffc17e98: 4b ff f3 b9 bl ffc17250 <_fat_block_read> FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) ffc17e9c: 2f 83 00 00 cmpwi cr7,r3,0 ffc17ea0: 41 9c 01 ac blt- cr7,ffc1804c <== NEVER TAKEN close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); ffc17ea4: 89 61 00 55 lbz r11,85(r1) ffc17ea8: 88 c1 00 56 lbz r6,86(r1) vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc17eac: 88 61 00 59 lbz r3,89(r1) close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); ffc17eb0: 55 6b 40 2e rlwinm r11,r11,8,0,23 vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc17eb4: 88 e1 00 5a lbz r7,90(r1) close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); ffc17eb8: 54 c6 80 1e rlwinm r6,r6,16,0,15 ffc17ebc: 88 81 00 54 lbz r4,84(r1) vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc17ec0: 54 63 40 2e rlwinm r3,r3,8,0,23 close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); ffc17ec4: 89 01 00 57 lbz r8,87(r1) vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc17ec8: 54 e7 80 1e rlwinm r7,r7,16,0,15 ffc17ecc: 88 a1 00 58 lbz r5,88(r1) close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); ffc17ed0: 7d 66 33 78 or r6,r11,r6 vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc17ed4: 89 41 00 5b lbz r10,91(r1) ffc17ed8: 7c 67 3b 78 or r7,r3,r7 close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); ffc17edc: 7c c6 23 78 or r6,r6,r4 ffc17ee0: 55 08 c0 0e rlwinm r8,r8,24,0,7 vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc17ee4: 7c e7 2b 78 or r7,r7,r5 ffc17ee8: 55 4a c0 0e rlwinm r10,r10,24,0,7 close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); ffc17eec: 7c c8 43 78 or r8,r6,r8 vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); ffc17ef0: 7c ea 53 78 or r10,r7,r10 _fat_block_release(fs_info); close(vol->fd); return -1; } vol->free_cls_in_fs_info = ffc17ef4: 91 14 00 48 stw r8,72(r20) FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); vol->free_cls = vol->free_cls_in_fs_info; ffc17ef8: 91 14 00 44 stw r8,68(r20) vol->next_cl_in_fs_info = ffc17efc: 91 54 00 50 stw r10,80(r20) FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); vol->next_cl = vol->next_cl_in_fs_info; ffc17f00: 91 54 00 4c stw r10,76(r20) ffc17f04: 4b ff fc e8 b ffc17bec vol->bytes_per_block_log2 = vol->bpc_log2; vol->sectors_per_block = vol->spc; } } return RC_OK; ffc17f08: 38 60 00 00 li r3,0 <== NOT EXECUTED } ffc17f0c: 80 01 00 dc lwz r0,220(r1) ffc17f10: 81 c1 00 90 lwz r14,144(r1) ffc17f14: 7c 08 03 a6 mtlr r0 ffc17f18: 81 e1 00 94 lwz r15,148(r1) ffc17f1c: 82 01 00 98 lwz r16,152(r1) ffc17f20: 82 21 00 9c lwz r17,156(r1) ffc17f24: 82 41 00 a0 lwz r18,160(r1) ffc17f28: 82 61 00 a4 lwz r19,164(r1) ffc17f2c: 82 81 00 a8 lwz r20,168(r1) ffc17f30: 82 a1 00 ac lwz r21,172(r1) ffc17f34: 82 c1 00 b0 lwz r22,176(r1) ffc17f38: 82 e1 00 b4 lwz r23,180(r1) ffc17f3c: 83 01 00 b8 lwz r24,184(r1) ffc17f40: 83 21 00 bc lwz r25,188(r1) ffc17f44: 83 41 00 c0 lwz r26,192(r1) ffc17f48: 83 61 00 c4 lwz r27,196(r1) ffc17f4c: 83 81 00 c8 lwz r28,200(r1) ffc17f50: 83 a1 00 cc lwz r29,204(r1) ffc17f54: 83 c1 00 d0 lwz r30,208(r1) ffc17f58: 83 e1 00 d4 lwz r31,212(r1) ffc17f5c: 38 21 00 d8 addi r1,r1,216 ffc17f60: 4e 80 00 20 blr (vol->bps != 4096)) { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; ffc17f64: 98 74 00 03 stb r3,3(r20) ffc17f68: 4b ff fa cc b ffc17a34 } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; ffc17f6c: 39 40 00 02 li r10,2 ffc17f70: 99 54 00 0e stb r10,14(r20) vol->mask = FAT_FAT16_MASK; ffc17f74: 39 40 00 00 li r10,0 ffc17f78: 61 4a ff ff ori r10,r10,65535 ffc17f7c: 91 54 00 10 stw r10,16(r20) vol->eoc_val = FAT_FAT16_EOC; ffc17f80: 39 40 00 00 li r10,0 ffc17f84: 61 4a ff f8 ori r10,r10,65528 ffc17f88: 91 54 00 14 stw r10,20(r20) ffc17f8c: 4b ff fc 44 b ffc17bd0 * 0 on success, or -1 if error occured and errno set appropriately */ int _fat_block_release(fat_fs_info_t *fs_info) { return fat_buf_release(fs_info); ffc17f90: 7e 83 a3 78 mr r3,r20 <== NOT EXECUTED ffc17f94: 4b ff ef e1 bl ffc16f74 <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(fs_info); close(vol->fd); ffc17f98: 80 74 00 60 lwz r3,96(r20) <== NOT EXECUTED ffc17f9c: 4b fe e6 dd bl ffc06678 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); ffc17fa0: 48 00 96 fd bl ffc2169c <__errno> <== NOT EXECUTED ffc17fa4: 39 20 00 16 li r9,22 <== NOT EXECUTED ffc17fa8: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED ffc17fac: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc17fb0: 4b ff ff 5c b ffc17f0c <== NOT EXECUTED } rc = fstat(vol->fd, &stat_buf); if (rc != 0) { close(vol->fd); ffc17fb4: 80 74 00 60 lwz r3,96(r20) <== NOT EXECUTED ffc17fb8: 4b fe e6 c1 bl ffc06678 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENXIO); ffc17fbc: 48 00 96 e1 bl ffc2169c <__errno> <== NOT EXECUTED ffc17fc0: 39 20 00 06 li r9,6 <== NOT EXECUTED ffc17fc4: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED ffc17fc8: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc17fcc: 4b ff ff 40 b ffc17f0c <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; if (vol->mirror) vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; else vol->afat = 0; ffc17fd0: 99 54 00 5c stb r10,92(r20) ffc17fd4: 4b ff fe 44 b ffc17e18 close(vol->fd); 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; ffc17fd8: 39 00 00 00 li r8,0 <== NOT EXECUTED ffc17fdc: 4b ff fa 90 b ffc17a6c <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; ffc17fe0: 38 e0 00 00 li r7,0 ffc17fe4: 4b ff fa dc b ffc17ac0 memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); sc = rtems_bdbuf_release( block); if (sc != RTEMS_SUCCESSFUL) { close(vol->fd); ffc17fe8: 80 74 00 60 lwz r3,96(r20) <== NOT EXECUTED ffc17fec: 4b fe e6 8d bl ffc06678 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); ffc17ff0: 48 00 96 ad bl ffc2169c <__errno> <== NOT EXECUTED ffc17ff4: 39 20 00 05 li r9,5 <== NOT EXECUTED ffc17ff8: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED ffc17ffc: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc18000: 4b ff ff 0c b ffc17f0c <== 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 ) { close(vol->fd); ffc18004: 80 74 00 60 lwz r3,96(r20) <== NOT EXECUTED ffc18008: 4b fe e6 71 bl ffc06678 <== NOT EXECUTED free(fs_info->vhash); ffc1800c: 80 74 00 6c lwz r3,108(r20) <== NOT EXECUTED ffc18010: 4b fe e7 01 bl ffc06710 <== NOT EXECUTED free(fs_info->rhash); ffc18014: 80 74 00 70 lwz r3,112(r20) <== NOT EXECUTED if (fs_info->sec_buf == NULL) { close(vol->fd); free(fs_info->vhash); free(fs_info->rhash); free(fs_info->uino); ffc18018: 4b fe e6 f9 bl ffc06710 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); ffc1801c: 48 00 96 81 bl ffc2169c <__errno> <== NOT EXECUTED ffc18020: 39 20 00 0c li r9,12 <== NOT EXECUTED ffc18024: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED ffc18028: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc1802c: 4b ff fe e0 b ffc17f0c <== 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 ) { close(vol->fd); ffc18030: 80 74 00 60 lwz r3,96(r20) <== NOT EXECUTED ffc18034: 4b fe e6 45 bl ffc06678 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); ffc18038: 48 00 96 65 bl ffc2169c <__errno> <== NOT EXECUTED ffc1803c: 39 20 00 0c li r9,12 <== NOT EXECUTED ffc18040: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED ffc18044: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc18048: 4b ff fe c4 b ffc17f0c <== NOT EXECUTED * 0 on success, or -1 if error occured and errno set appropriately */ int _fat_block_release(fat_fs_info_t *fs_info) { return fat_buf_release(fs_info); ffc1804c: 7e 83 a3 78 mr r3,r20 <== NOT EXECUTED ffc18050: 4b ff ef 25 bl ffc16f74 <== NOT EXECUTED ret = _fat_block_read(fs_info, vol->info_sec , FAT_FSI_INFO, FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) { _fat_block_release(fs_info); close(vol->fd); ffc18054: 80 74 00 60 lwz r3,96(r20) <== NOT EXECUTED ffc18058: 4b fe e6 21 bl ffc06678 <== NOT EXECUTED return -1; ffc1805c: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc18060: 4b ff fe ac b ffc17f0c <== 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 ) { close(vol->fd); ffc18064: 80 74 00 60 lwz r3,96(r20) <== NOT EXECUTED ffc18068: 4b fe e6 11 bl ffc06678 <== NOT EXECUTED free(fs_info->vhash); ffc1806c: 80 74 00 6c lwz r3,108(r20) <== NOT EXECUTED ffc18070: 4b ff ff a8 b ffc18018 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); if (fs_info->sec_buf == NULL) { close(vol->fd); ffc18074: 80 74 00 60 lwz r3,96(r20) <== NOT EXECUTED ffc18078: 4b fe e6 01 bl ffc06678 <== NOT EXECUTED free(fs_info->vhash); ffc1807c: 80 74 00 6c lwz r3,108(r20) <== NOT EXECUTED ffc18080: 4b fe e6 91 bl ffc06710 <== NOT EXECUTED free(fs_info->rhash); ffc18084: 80 74 00 70 lwz r3,112(r20) <== NOT EXECUTED ffc18088: 4b fe e6 89 bl ffc06710 <== NOT EXECUTED free(fs_info->uino); ffc1808c: 80 74 00 74 lwz r3,116(r20) <== NOT EXECUTED ffc18090: 4b ff ff 88 b ffc18018 <== NOT EXECUTED =============================================================================== ffc1f5c4 : uint32_t count, uint32_t *cls_added, uint32_t *last_cl, bool zero_fill ) { ffc1f5c4: 94 21 ff b8 stwu r1,-72(r1) ffc1f5c8: 7d 80 00 26 mfcr r12 ffc1f5cc: 7c 08 02 a6 mflr r0 int rc = RC_OK; uint32_t cl4find = 2; uint32_t next_cln = 0; ffc1f5d0: 39 20 00 00 li r9,0 uint32_t count, uint32_t *cls_added, uint32_t *last_cl, bool zero_fill ) { ffc1f5d4: 93 21 00 2c stw r25,44(r1) uint32_t i = 2; ssize_t bytes_written; *cls_added = 0; if (count == 0) ffc1f5d8: 7c b9 2b 79 mr. r25,r5 uint32_t count, uint32_t *cls_added, uint32_t *last_cl, bool zero_fill ) { ffc1f5dc: 90 01 00 4c stw r0,76(r1) ffc1f5e0: 93 41 00 30 stw r26,48(r1) ssize_t bytes_written; *cls_added = 0; if (count == 0) return rc; ffc1f5e4: 3b 40 00 00 li r26,0 uint32_t count, uint32_t *cls_added, uint32_t *last_cl, bool zero_fill ) { ffc1f5e8: 93 61 00 34 stw r27,52(r1) ffc1f5ec: 7c db 33 78 mr r27,r6 ffc1f5f0: 93 81 00 38 stw r28,56(r1) ffc1f5f4: 93 a1 00 3c stw r29,60(r1) ffc1f5f8: 7c 7d 1b 78 mr r29,r3 ffc1f5fc: 92 a1 00 1c stw r21,28(r1) ffc1f600: 92 c1 00 20 stw r22,32(r1) ffc1f604: 92 e1 00 24 stw r23,36(r1) ffc1f608: 93 01 00 28 stw r24,40(r1) ffc1f60c: 93 c1 00 40 stw r30,64(r1) ffc1f610: 93 e1 00 44 stw r31,68(r1) ffc1f614: 91 81 00 18 stw r12,24(r1) int rc = RC_OK; 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; ffc1f618: 83 83 00 38 lwz r28,56(r3) bool zero_fill ) { int rc = RC_OK; uint32_t cl4find = 2; uint32_t next_cln = 0; ffc1f61c: 91 21 00 08 stw r9,8(r1) uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; uint32_t i = 2; ssize_t bytes_written; *cls_added = 0; ffc1f620: 91 26 00 00 stw r9,0(r6) if (count == 0) ffc1f624: 41 82 00 e0 beq- ffc1f704 <== NEVER TAKEN return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) ffc1f628: 83 e3 00 4c lwz r31,76(r3) ffc1f62c: 7c 98 23 78 mr r24,r4 ffc1f630: 7c f7 3b 78 mr r23,r7 ffc1f634: 2f 9f ff ff cmpwi cr7,r31,-1 ffc1f638: 41 9e 01 9c beq- cr7,ffc1f7d4 { int rc = RC_OK; 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; ffc1f63c: 3b 9c 00 02 addi r28,r28,2 /* * fs_info->vol.data_cls is exactly the count of data clusters * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) ffc1f640: 2b 9c 00 02 cmplwi cr7,r28,2 ffc1f644: 40 9d 01 fc ble- cr7,ffc1f840 <== NEVER TAKEN rc = fat_set_fat_cluster(fs_info, save_cln, cl4find); if ( rc != RC_OK ) goto cleanup; } if (zero_fill) ffc1f648: 2e 08 00 00 cmpwi cr4,r8,0 /* * 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) ffc1f64c: 3b c0 00 02 li r30,2 ffc1f650: 3a c0 00 00 li r22,0 { rc = fat_get_fat_cluster(fs_info, cl4find, &next_cln); ffc1f654: 7f a3 eb 78 mr r3,r29 ffc1f658: 7f e4 fb 78 mr r4,r31 ffc1f65c: 38 a1 00 08 addi r5,r1,8 ffc1f660: 4b ff f8 a5 bl ffc1ef04 if ( rc != RC_OK ) ffc1f664: 7c 7a 1b 79 mr. r26,r3 ffc1f668: 40 82 01 74 bne- ffc1f7dc <== NEVER TAKEN if (*cls_added != 0) fat_free_fat_clusters_chain(fs_info, (*chain)); return rc; } if (next_cln == FAT_GENFAT_FREE) ffc1f66c: 81 21 00 08 lwz r9,8(r1) ffc1f670: 2f 89 00 00 cmpwi cr7,r9,0 ffc1f674: 40 9e 00 48 bne- cr7,ffc1f6bc /* * 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) ffc1f678: 81 3b 00 00 lwz r9,0(r27) ffc1f67c: 2f 89 00 00 cmpwi cr7,r9,0 ffc1f680: 40 9e 00 cc bne- cr7,ffc1f74c { *chain = cl4find; ffc1f684: 93 f8 00 00 stw r31,0(r24) rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); ffc1f688: 7f a3 eb 78 mr r3,r29 ffc1f68c: 7f e4 fb 78 mr r4,r31 ffc1f690: 38 a0 ff ff li r5,-1 ffc1f694: 4b ff fa c1 bl ffc1f154 if ( rc != RC_OK ) ffc1f698: 2c 03 00 00 cmpwi r3,0 ffc1f69c: 40 82 01 88 bne- ffc1f824 <== NEVER TAKEN rc = fat_set_fat_cluster(fs_info, save_cln, cl4find); if ( rc != RC_OK ) goto cleanup; } if (zero_fill) ffc1f6a0: 40 92 01 08 bne- cr4,ffc1f7a8 goto cleanup; } } save_cln = cl4find; (*cls_added)++; ffc1f6a4: 81 3b 00 00 lwz r9,0(r27) ffc1f6a8: 39 29 00 01 addi r9,r9,1 /* have we satisfied request ? */ if (*cls_added == count) ffc1f6ac: 7f 99 48 00 cmpw cr7,r25,r9 goto cleanup; } } save_cln = cl4find; (*cls_added)++; ffc1f6b0: 91 3b 00 00 stw r9,0(r27) /* have we satisfied request ? */ if (*cls_added == count) ffc1f6b4: 41 9e 01 44 beq- cr7,ffc1f7f8 ffc1f6b8: 7f f6 fb 78 mr r22,r31 fat_buf_release(fs_info); return rc; } } i++; cl4find++; ffc1f6bc: 3b ff 00 01 addi r31,r31,1 if (cl4find >= data_cls_val) ffc1f6c0: 7f 9c f8 40 cmplw cr7,r28,r31 *last_cl = save_cln; fat_buf_release(fs_info); return rc; } } i++; ffc1f6c4: 3b de 00 01 addi r30,r30,1 cl4find++; if (cl4find >= data_cls_val) ffc1f6c8: 41 9d 00 08 bgt- cr7,ffc1f6d0 <== ALWAYS TAKEN cl4find = 2; ffc1f6cc: 3b e0 00 02 li r31,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) ffc1f6d0: 7f 9c f0 00 cmpw cr7,r28,r30 ffc1f6d4: 40 9e ff 80 bne+ cr7,ffc1f654 <== ALWAYS TAKEN if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) ffc1f6d8: 81 3d 00 44 lwz r9,68(r29) <== NOT EXECUTED cl4find++; if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; ffc1f6dc: 92 dd 00 4c stw r22,76(r29) <== NOT EXECUTED if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) ffc1f6e0: 2f 89 ff ff cmpwi cr7,r9,-1 <== NOT EXECUTED ffc1f6e4: 41 9e 00 10 beq- cr7,ffc1f6f4 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); ffc1f6e8: 81 5b 00 00 lwz r10,0(r27) <== NOT EXECUTED ffc1f6ec: 7d 2a 48 50 subf r9,r10,r9 <== NOT EXECUTED ffc1f6f0: 91 3d 00 44 stw r9,68(r29) <== NOT EXECUTED *last_cl = save_cln; ffc1f6f4: 92 d7 00 00 stw r22,0(r23) <== NOT EXECUTED fat_buf_release(fs_info); ffc1f6f8: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED return RC_OK; ffc1f6fc: 3b 40 00 00 li r26,0 <== NOT EXECUTED fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); ffc1f700: 4b ff 78 75 bl ffc16f74 <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); return rc; } ffc1f704: 80 01 00 4c lwz r0,76(r1) ffc1f708: 7f 43 d3 78 mr r3,r26 ffc1f70c: 81 81 00 18 lwz r12,24(r1) ffc1f710: 7c 08 03 a6 mtlr r0 ffc1f714: 82 a1 00 1c lwz r21,28(r1) ffc1f718: 82 c1 00 20 lwz r22,32(r1) ffc1f71c: 7d 80 81 20 mtcrf 8,r12 ffc1f720: 82 e1 00 24 lwz r23,36(r1) ffc1f724: 83 01 00 28 lwz r24,40(r1) ffc1f728: 83 21 00 2c lwz r25,44(r1) ffc1f72c: 83 41 00 30 lwz r26,48(r1) ffc1f730: 83 61 00 34 lwz r27,52(r1) ffc1f734: 83 81 00 38 lwz r28,56(r1) ffc1f738: 83 a1 00 3c lwz r29,60(r1) ffc1f73c: 83 c1 00 40 lwz r30,64(r1) ffc1f740: 83 e1 00 44 lwz r31,68(r1) ffc1f744: 38 21 00 48 addi r1,r1,72 ffc1f748: 4e 80 00 20 blr } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); ffc1f74c: 7f a3 eb 78 mr r3,r29 ffc1f750: 7f e4 fb 78 mr r4,r31 ffc1f754: 38 a0 ff ff li r5,-1 ffc1f758: 4b ff f9 fd bl ffc1f154 if ( rc != RC_OK ) ffc1f75c: 7c 75 1b 79 mr. r21,r3 ffc1f760: 40 82 00 cc bne- ffc1f82c <== NEVER TAKEN /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); return rc; } rc = fat_set_fat_cluster(fs_info, save_cln, cl4find); ffc1f764: 7e c4 b3 78 mr r4,r22 ffc1f768: 7f a3 eb 78 mr r3,r29 ffc1f76c: 7f e5 fb 78 mr r5,r31 ffc1f770: 4b ff f9 e5 bl ffc1f154 if ( rc != RC_OK ) ffc1f774: 7c 76 1b 79 mr. r22,r3 ffc1f778: 41 82 ff 28 beq+ ffc1f6a0 <== ALWAYS TAKEN return RC_OK; cleanup: /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); ffc1f77c: 80 98 00 00 lwz r4,0(r24) <== NOT EXECUTED ffc1f780: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); return rc; ffc1f784: 7e da b3 78 mr r26,r22 <== NOT EXECUTED return RC_OK; cleanup: /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); ffc1f788: 4b ff fd 01 bl ffc1f488 <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); ffc1f78c: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc1f790: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc1f794: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc1f798: 4b ff f9 bd bl ffc1f154 <== NOT EXECUTED fat_buf_release(fs_info); ffc1f79c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc1f7a0: 4b ff 77 d5 bl ffc16f74 <== NOT EXECUTED ffc1f7a4: 4b ff ff 60 b ffc1f704 <== NOT EXECUTED goto cleanup; } if (zero_fill) { bytes_written = fat_cluster_set (fs_info, cl4find, 0, fs_info->vol.bpc, 0); ffc1f7a8: a0 dd 00 06 lhz r6,6(r29) ffc1f7ac: 7f a3 eb 78 mr r3,r29 ffc1f7b0: 7f e4 fb 78 mr r4,r31 ffc1f7b4: 38 a0 00 00 li r5,0 ffc1f7b8: 38 e0 00 00 li r7,0 ffc1f7bc: 4b ff 7c 95 bl ffc17450 if (fs_info->vol.bpc != bytes_written) ffc1f7c0: a1 3d 00 06 lhz r9,6(r29) ffc1f7c4: 7f 89 18 00 cmpw cr7,r9,r3 ffc1f7c8: 41 9e fe dc beq+ cr7,ffc1f6a4 <== ALWAYS TAKEN { rc = -1; ffc1f7cc: 3a c0 ff ff li r22,-1 <== NOT EXECUTED ffc1f7d0: 4b ff ff ac b ffc1f77c <== NOT EXECUTED uint32_t *last_cl, bool zero_fill ) { int rc = RC_OK; uint32_t cl4find = 2; ffc1f7d4: 3b e0 00 02 li r31,2 ffc1f7d8: 4b ff fe 64 b ffc1f63c while (i < data_cls_val) { rc = fat_get_fat_cluster(fs_info, cl4find, &next_cln); if ( rc != RC_OK ) { if (*cls_added != 0) ffc1f7dc: 81 3b 00 00 lwz r9,0(r27) <== NOT EXECUTED ffc1f7e0: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc1f7e4: 41 9e ff 20 beq+ cr7,ffc1f704 <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); ffc1f7e8: 80 98 00 00 lwz r4,0(r24) <== NOT EXECUTED ffc1f7ec: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc1f7f0: 4b ff fc 99 bl ffc1f488 <== NOT EXECUTED ffc1f7f4: 4b ff ff 10 b ffc1f704 <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) ffc1f7f8: 81 3d 00 44 lwz r9,68(r29) (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; ffc1f7fc: 93 fd 00 4c stw r31,76(r29) if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) ffc1f800: 2f 89 ff ff cmpwi cr7,r9,-1 ffc1f804: 41 9e 00 10 beq- cr7,ffc1f814 <== ALWAYS TAKEN fs_info->vol.free_cls -= (*cls_added); ffc1f808: 81 5b 00 00 lwz r10,0(r27) <== NOT EXECUTED ffc1f80c: 7d 2a 48 50 subf r9,r10,r9 <== NOT EXECUTED ffc1f810: 91 3d 00 44 stw r9,68(r29) <== NOT EXECUTED *last_cl = save_cln; ffc1f814: 93 f7 00 00 stw r31,0(r23) fat_buf_release(fs_info); ffc1f818: 7f a3 eb 78 mr r3,r29 ffc1f81c: 4b ff 77 59 bl ffc16f74 ffc1f820: 4b ff fe e4 b ffc1f704 * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); ffc1f824: 7c 7a 1b 78 mr r26,r3 <== NOT EXECUTED ffc1f828: 4b ff fe dc b ffc1f704 <== NOT EXECUTED /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); ffc1f82c: 80 98 00 00 lwz r4,0(r24) <== NOT EXECUTED ffc1f830: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); ffc1f834: 7e ba ab 78 mr r26,r21 <== NOT EXECUTED if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); ffc1f838: 4b ff fc 51 bl ffc1f488 <== NOT EXECUTED ffc1f83c: 4b ff fe c8 b ffc1f704 <== 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) ffc1f840: 3a c0 00 00 li r22,0 <== NOT EXECUTED ffc1f844: 4b ff fe 94 b ffc1f6d8 <== NOT EXECUTED =============================================================================== ffc1732c : fat_fs_info_t *fs_info, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { ffc1732c: 94 21 ff c8 stwu r1,-56(r1) ffc17330: 7c 08 02 a6 mflr r0 ffc17334: 93 c1 00 30 stw r30,48(r1) uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while(count > 0) ffc17338: 7c de 33 79 mr. r30,r6 fat_fs_info_t *fs_info, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { ffc1733c: 90 01 00 3c stw r0,60(r1) ffc17340: 93 01 00 18 stw r24,24(r1) ffc17344: 93 21 00 1c stw r25,28(r1) ffc17348: 93 41 00 20 stw r26,32(r1) ffc1734c: 93 61 00 24 stw r27,36(r1) ffc17350: 93 81 00 28 stw r28,40(r1) ffc17354: 93 a1 00 2c stw r29,44(r1) ffc17358: 93 e1 00 34 stw r31,52(r1) uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while(count > 0) ffc1735c: 41 82 00 ec beq- ffc17448 <== NEVER TAKEN ffc17360: 7c 7d 1b 78 mr r29,r3 ffc17364: 7c f9 3b 78 mr r25,r7 ffc17368: 7c ba 2b 78 mr r26,r5 ffc1736c: 7c 9c 23 78 mr r28,r4 ffc17370: 3b 60 00 00 li r27,0 } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; ffc17374: 3b 00 00 01 li r24,1 ffc17378: 48 00 00 3c b ffc173b4 c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bytes_per_block) rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); ffc1737c: 4b ff fd dd bl ffc17158 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; sec_num++; ffc17380: 3b 9c 00 01 addi r28,r28,1 if (c == fs_info->vol.bytes_per_block) rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) ffc17384: 2f 83 00 00 cmpwi cr7,r3,0 return -1; memcpy((sec_buf + ofs), (buff + cmpltd), c); ffc17388: 7c 99 da 14 add r4,r25,r27 ffc1738c: 7f e5 fb 78 mr r5,r31 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; ffc17390: 7f 7f da 14 add r27,r31,r27 if (c == fs_info->vol.bytes_per_block) rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) ffc17394: 40 9e 00 7c bne- cr7,ffc17410 <== NEVER TAKEN return -1; memcpy((sec_buf + ofs), (buff + cmpltd), c); ffc17398: 80 61 00 08 lwz r3,8(r1) ffc1739c: 7c 63 d2 14 add r3,r3,r26 ffc173a0: 48 00 af dd bl ffc2237c uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while(count > 0) ffc173a4: 7f df f0 51 subf. r30,r31,r30 ffc173a8: 9b 1d 00 88 stb r24,136(r29) fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; sec_num++; ofs = 0; ffc173ac: 3b 40 00 00 li r26,0 uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while(count > 0) ffc173b0: 41 82 00 64 beq- ffc17414 <== ALWAYS TAKEN { c = MIN(count, (fs_info->vol.bps - ofs)); ffc173b4: a3 fd 00 00 lhz r31,0(r29) if (c == fs_info->vol.bytes_per_block) rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); ffc173b8: 7f 84 e3 78 mr r4,r28 ffc173bc: 38 a0 00 01 li r5,1 uint8_t *sec_buf; uint32_t c = 0; while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); ffc173c0: 7f fa f8 50 subf r31,r26,r31 ffc173c4: 7f 9f f0 40 cmplw cr7,r31,r30 if (c == fs_info->vol.bytes_per_block) rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); ffc173c8: 38 c1 00 08 addi r6,r1,8 ffc173cc: 7f a3 eb 78 mr r3,r29 uint8_t *sec_buf; uint32_t c = 0; while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); ffc173d0: 40 9d 00 08 ble- cr7,ffc173d8 ffc173d4: 7f df f3 78 mr r31,r30 if (c == fs_info->vol.bytes_per_block) ffc173d8: a1 3d 00 0a lhz r9,10(r29) ffc173dc: 7f 89 f8 00 cmpw cr7,r9,r31 ffc173e0: 40 9e ff 9c bne+ cr7,ffc1737c <== ALWAYS TAKEN rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); ffc173e4: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED ffc173e8: 38 a0 00 02 li r5,2 <== NOT EXECUTED ffc173ec: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc173f0: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED ffc173f4: 4b ff fd 65 bl ffc17158 <== NOT EXECUTED fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; sec_num++; ffc173f8: 3b 9c 00 01 addi r28,r28,1 <== NOT EXECUTED if (c == fs_info->vol.bytes_per_block) rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) ffc173fc: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED return -1; memcpy((sec_buf + ofs), (buff + cmpltd), c); ffc17400: 7c 99 da 14 add r4,r25,r27 <== NOT EXECUTED ffc17404: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; ffc17408: 7f 7f da 14 add r27,r31,r27 <== NOT EXECUTED if (c == fs_info->vol.bytes_per_block) rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) ffc1740c: 41 9e ff 8c beq+ cr7,ffc17398 <== NOT EXECUTED return -1; ffc17410: 3b 60 ff ff li r27,-1 <== NOT EXECUTED cmpltd +=c; sec_num++; ofs = 0; } return cmpltd; } ffc17414: 80 01 00 3c lwz r0,60(r1) ffc17418: 7f 63 db 78 mr r3,r27 ffc1741c: 83 01 00 18 lwz r24,24(r1) ffc17420: 7c 08 03 a6 mtlr r0 ffc17424: 83 21 00 1c lwz r25,28(r1) ffc17428: 83 41 00 20 lwz r26,32(r1) ffc1742c: 83 61 00 24 lwz r27,36(r1) ffc17430: 83 81 00 28 lwz r28,40(r1) ffc17434: 83 a1 00 2c lwz r29,44(r1) ffc17438: 83 c1 00 30 lwz r30,48(r1) ffc1743c: 83 e1 00 34 lwz r31,52(r1) ffc17440: 38 21 00 38 addi r1,r1,56 ffc17444: 4e 80 00 20 blr uint32_t offset, uint32_t count, const void *buff) { int rc = RC_OK; ssize_t cmpltd = 0; ffc17448: 3b 60 00 00 li r27,0 <== NOT EXECUTED ffc1744c: 4b ff ff c8 b ffc17414 <== NOT EXECUTED =============================================================================== ffc1f154 : uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; uint8_t *sec_buf = NULL; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) ffc1f154: 2b 84 00 01 cmplwi cr7,r4,1 fat_set_fat_cluster( fat_fs_info_t *fs_info, uint32_t cln, uint32_t in_val ) { ffc1f158: 94 21 ff c8 stwu r1,-56(r1) ffc1f15c: 7c 08 02 a6 mflr r0 int rc = RC_OK; uint32_t sec = 0; uint32_t ofs = 0; uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; uint8_t *sec_buf = NULL; ffc1f160: 39 20 00 00 li r9,0 fat_set_fat_cluster( fat_fs_info_t *fs_info, uint32_t cln, uint32_t in_val ) { ffc1f164: 93 c1 00 30 stw r30,48(r1) ffc1f168: 7c 9e 23 78 mr r30,r4 ffc1f16c: 90 01 00 3c stw r0,60(r1) ffc1f170: 93 21 00 1c stw r25,28(r1) ffc1f174: 93 41 00 20 stw r26,32(r1) ffc1f178: 93 61 00 24 stw r27,36(r1) ffc1f17c: 93 81 00 28 stw r28,40(r1) ffc1f180: 93 a1 00 2c stw r29,44(r1) ffc1f184: 93 e1 00 34 stw r31,52(r1) int rc = RC_OK; uint32_t sec = 0; uint32_t ofs = 0; uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; uint8_t *sec_buf = NULL; ffc1f188: 91 21 00 08 stw r9,8(r1) /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) ffc1f18c: 40 9d 00 8c ble- cr7,ffc1f218 <== NEVER TAKEN ffc1f190: 81 23 00 38 lwz r9,56(r3) ffc1f194: 7c 7f 1b 78 mr r31,r3 ffc1f198: 39 29 00 01 addi r9,r9,1 ffc1f19c: 7f 84 48 40 cmplw cr7,r4,r9 ffc1f1a0: 41 9d 00 78 bgt- cr7,ffc1f218 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + ffc1f1a4: 89 23 00 0e lbz r9,14(r3) ffc1f1a8: 7c ba 2b 78 mr r26,r5 ffc1f1ac: 71 2a 00 01 andi. r10,r9,1 ffc1f1b0: 40 82 00 a4 bne- ffc1f254 ffc1f1b4: 55 29 07 bc rlwinm r9,r9,0,30,30 ffc1f1b8: 8b 63 00 02 lbz r27,2(r3) ffc1f1bc: 71 2a 00 ff andi. r10,r9,255 ffc1f1c0: 41 82 00 b0 beq- ffc1f270 ffc1f1c4: 54 9d 08 3c rlwinm r29,r4,1,0,30 ffc1f1c8: 81 23 00 58 lwz r9,88(r3) ffc1f1cc: 7f bb dc 30 srw r27,r29,r27 ffc1f1d0: 7f 7b 4a 14 add r27,r27,r9 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); ffc1f1d4: 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); ffc1f1d8: a3 3f 00 00 lhz r25,0(r31) rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); ffc1f1dc: 7f 64 db 78 mr r4,r27 ffc1f1e0: 38 a0 00 01 li r5,1 ffc1f1e4: 38 c1 00 08 addi r6,r1,8 ffc1f1e8: 4b ff 7f 71 bl ffc17158 if (rc != RC_OK) ffc1f1ec: 2c 03 00 00 cmpwi r3,0 ffc1f1f0: 40 82 00 38 bne- ffc1f228 <== NEVER TAKEN return rc; switch ( fs_info->vol.type ) ffc1f1f4: 8b 9f 00 0e lbz r28,14(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); ffc1f1f8: 3b 39 ff ff addi r25,r25,-1 ffc1f1fc: 7f bd c8 38 and r29,r29,r25 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) ffc1f200: 2f 9c 00 02 cmpwi cr7,r28,2 ffc1f204: 41 9e 00 80 beq- cr7,ffc1f284 ffc1f208: 2f 9c 00 04 cmpwi cr7,r28,4 ffc1f20c: 41 9e 01 24 beq- cr7,ffc1f330 ffc1f210: 2f 9c 00 01 cmpwi cr7,r28,1 ffc1f214: 41 9e 00 b8 beq- cr7,ffc1f2cc <== ALWAYS TAKEN fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); ffc1f218: 48 00 24 85 bl ffc2169c <__errno> <== NOT EXECUTED ffc1f21c: 39 20 00 05 li r9,5 <== NOT EXECUTED ffc1f220: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED ffc1f224: 38 60 ff ff li r3,-1 <== NOT EXECUTED break; } return RC_OK; } ffc1f228: 80 01 00 3c lwz r0,60(r1) ffc1f22c: 83 21 00 1c lwz r25,28(r1) ffc1f230: 7c 08 03 a6 mtlr r0 ffc1f234: 83 41 00 20 lwz r26,32(r1) ffc1f238: 83 61 00 24 lwz r27,36(r1) ffc1f23c: 83 81 00 28 lwz r28,40(r1) ffc1f240: 83 a1 00 2c lwz r29,44(r1) ffc1f244: 83 c1 00 30 lwz r30,48(r1) ffc1f248: 83 e1 00 34 lwz r31,52(r1) ffc1f24c: 38 21 00 38 addi r1,r1,56 ffc1f250: 4e 80 00 20 blr /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + ffc1f254: 54 9d f8 7e rlwinm r29,r4,31,1,31 ffc1f258: 8b 63 00 02 lbz r27,2(r3) ffc1f25c: 7f bd 22 14 add r29,r29,r4 ffc1f260: 81 23 00 58 lwz r9,88(r3) ffc1f264: 7f bb dc 30 srw r27,r29,r27 ffc1f268: 7f 7b 4a 14 add r27,r27,r9 ffc1f26c: 4b ff ff 68 b ffc1f1d4 ffc1f270: 54 9d 10 3a rlwinm r29,r4,2,0,29 ffc1f274: 81 23 00 58 lwz r9,88(r3) ffc1f278: 7f bb dc 30 srw r27,r29,r27 ffc1f27c: 7f 7b 4a 14 add r27,r27,r9 ffc1f280: 4b ff ff 54 b ffc1f1d4 break; } return RC_OK; } ffc1f284: 80 01 00 3c lwz r0,60(r1) } break; case FAT_FAT16: *((uint16_t *)(sec_buf + ofs)) = (uint16_t )(CT_LE_W(in_val)); ffc1f288: 57 49 42 2e rlwinm r9,r26,8,8,23 ffc1f28c: 57 5a c6 3e rlwinm r26,r26,24,24,31 break; } return RC_OK; } ffc1f290: 83 21 00 1c lwz r25,28(r1) ffc1f294: 7c 08 03 a6 mtlr r0 } break; case FAT_FAT16: *((uint16_t *)(sec_buf + ofs)) = (uint16_t )(CT_LE_W(in_val)); ffc1f298: 7d 3a d3 78 or r26,r9,r26 } } break; case FAT_FAT16: *((uint16_t *)(sec_buf + ofs)) = ffc1f29c: 81 21 00 08 lwz r9,8(r1) break; } return RC_OK; } ffc1f2a0: 83 61 00 24 lwz r27,36(r1) } } break; case FAT_FAT16: *((uint16_t *)(sec_buf + ofs)) = ffc1f2a4: 7f 49 eb 2e sthx r26,r9,r29 } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; ffc1f2a8: 39 20 00 01 li r9,1 ffc1f2ac: 99 3f 00 88 stb r9,136(r31) break; } return RC_OK; } ffc1f2b0: 83 41 00 20 lwz r26,32(r1) ffc1f2b4: 83 81 00 28 lwz r28,40(r1) ffc1f2b8: 83 a1 00 2c lwz r29,44(r1) ffc1f2bc: 83 c1 00 30 lwz r30,48(r1) ffc1f2c0: 83 e1 00 34 lwz r31,52(r1) ffc1f2c4: 38 21 00 38 addi r1,r1,56 ffc1f2c8: 4e 80 00 20 blr return rc; switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) ffc1f2cc: 73 c9 00 01 andi. r9,r30,1 ffc1f2d0: 41 82 00 d0 beq- ffc1f3a0 { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *(sec_buf + ofs) &= 0x0F; ffc1f2d4: 81 21 00 08 lwz r9,8(r1) switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; ffc1f2d8: 57 5a 24 36 rlwinm r26,r26,4,16,27 *(sec_buf + ofs) &= 0x0F; ffc1f2dc: 7d 49 e8 ae lbzx r10,r9,r29 ffc1f2e0: 55 4a 07 3e clrlwi r10,r10,28 ffc1f2e4: 7d 49 e9 ae stbx r10,r9,r29 *(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00F0); ffc1f2e8: 81 21 00 08 lwz r9,8(r1) ffc1f2ec: 7d 49 e8 ae lbzx r10,r9,r29 ffc1f2f0: 7f 4a 53 78 or r10,r26,r10 ffc1f2f4: 7d 49 e9 ae stbx r10,r9,r29 fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) ffc1f2f8: a1 3f 00 00 lhz r9,0(r31) ffc1f2fc: 9b 9f 00 88 stb r28,136(r31) ffc1f300: 39 29 ff ff addi r9,r9,-1 ffc1f304: 7f 89 e8 00 cmpw cr7,r9,r29 ffc1f308: 41 9e 00 f8 beq- cr7,ffc1f400 <== NEVER TAKEN fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0x00; ffc1f30c: 81 21 00 08 lwz r9,8(r1) ffc1f310: 3b bd 00 01 addi r29,r29,1 *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); ffc1f314: 57 5a c2 3e rlwinm r26,r26,24,8,31 fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0x00; ffc1f318: 7c 69 e9 ae stbx r3,r9,r29 *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); ffc1f31c: 81 21 00 08 lwz r9,8(r1) ffc1f320: 7d 49 e8 ae lbzx r10,r9,r29 ffc1f324: 7d 4a d3 78 or r10,r10,r26 ffc1f328: 7d 49 e9 ae stbx r10,r9,r29 ffc1f32c: 4b ff fe fc b ffc1f228 (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)); ffc1f330: 57 5a 01 3e clrlwi r26,r26,4 ffc1f334: 53 48 46 3e rlwimi r8,r26,8,24,31 ffc1f338: 53 48 c4 2e rlwimi r8,r26,24,16,23 ffc1f33c: 53 48 42 1e rlwimi r8,r26,8,8,15 ffc1f340: 53 48 c0 0e rlwimi r8,r26,24,0,7 ffc1f344: 3d 40 f0 00 lis r10,-4096 *((uint32_t *)(sec_buf + ofs)) &= CT_LE_L(0xF0000000); ffc1f348: 81 21 00 08 lwz r9,8(r1) ffc1f34c: 51 47 46 3e rlwimi r7,r10,8,24,31 ffc1f350: 51 47 c4 2e rlwimi r7,r10,24,16,23 ffc1f354: 51 47 42 1e rlwimi r7,r10,8,8,15 ffc1f358: 51 47 c0 0e rlwimi r7,r10,24,0,7 break; } return RC_OK; } ffc1f35c: 80 01 00 3c lwz r0,60(r1) break; case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(sec_buf + ofs)) &= CT_LE_L(0xF0000000); ffc1f360: 7d 49 e8 2e lwzx r10,r9,r29 break; } return RC_OK; } ffc1f364: 7c 08 03 a6 mtlr r0 ffc1f368: 83 21 00 1c lwz r25,28(r1) break; case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(sec_buf + ofs)) &= CT_LE_L(0xF0000000); ffc1f36c: 7c ea 50 38 and r10,r7,r10 break; } return RC_OK; } ffc1f370: 83 41 00 20 lwz r26,32(r1) case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(sec_buf + ofs)) &= CT_LE_L(0xF0000000); *((uint32_t *)(sec_buf + ofs)) |= fat32_clv; ffc1f374: 7d 4a 43 78 or r10,r10,r8 break; } return RC_OK; } ffc1f378: 83 61 00 24 lwz r27,36(r1) case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(sec_buf + ofs)) &= CT_LE_L(0xF0000000); *((uint32_t *)(sec_buf + ofs)) |= fat32_clv; ffc1f37c: 7d 49 e9 2e stwx r10,r9,r29 ffc1f380: 39 20 00 01 li r9,1 ffc1f384: 99 3f 00 88 stb r9,136(r31) break; } return RC_OK; } ffc1f388: 83 81 00 28 lwz r28,40(r1) ffc1f38c: 83 a1 00 2c lwz r29,44(r1) ffc1f390: 83 c1 00 30 lwz r30,48(r1) ffc1f394: 83 e1 00 34 lwz r31,52(r1) ffc1f398: 38 21 00 38 addi r1,r1,56 ffc1f39c: 4e 80 00 20 blr } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *(sec_buf + ofs) &= 0x00; ffc1f3a0: 81 21 00 08 lwz r9,8(r1) *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; ffc1f3a4: 57 5a 05 3e clrlwi r26,r26,20 ffc1f3a8: 57 5e 04 3e clrlwi r30,r26,16 *(sec_buf + ofs) &= 0x00; ffc1f3ac: 7c 69 e9 ae stbx r3,r9,r29 *(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00FF); ffc1f3b0: 81 21 00 08 lwz r9,8(r1) ffc1f3b4: 7d 49 e8 ae lbzx r10,r9,r29 ffc1f3b8: 7d 5a d3 78 or r26,r10,r26 ffc1f3bc: 7f 49 e9 ae stbx r26,r9,r29 fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) ffc1f3c0: a1 3f 00 00 lhz r9,0(r31) ffc1f3c4: 9b 9f 00 88 stb r28,136(r31) ffc1f3c8: 39 29 ff ff addi r9,r9,-1 ffc1f3cc: 7f 89 e8 00 cmpw cr7,r9,r29 ffc1f3d0: 41 9e 00 70 beq- cr7,ffc1f440 <== NEVER TAKEN fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0xF0; ffc1f3d4: 81 21 00 08 lwz r9,8(r1) ffc1f3d8: 3b bd 00 01 addi r29,r29,1 *(sec_buf + ofs+1) |= (uint8_t)((fat16_clv & 0xFF00)>>8); ffc1f3dc: 57 de c2 3e rlwinm r30,r30,24,8,31 fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0xF0; ffc1f3e0: 7d 09 e8 ae lbzx r8,r9,r29 ffc1f3e4: 55 08 00 36 rlwinm r8,r8,0,0,27 ffc1f3e8: 7d 09 e9 ae stbx r8,r9,r29 *(sec_buf + ofs+1) |= (uint8_t)((fat16_clv & 0xFF00)>>8); ffc1f3ec: 81 21 00 08 lwz r9,8(r1) ffc1f3f0: 7d 49 e8 ae lbzx r10,r9,r29 ffc1f3f4: 7d 4a f3 78 or r10,r10,r30 ffc1f3f8: 7d 49 e9 ae stbx r10,r9,r29 ffc1f3fc: 4b ff fe 2c b ffc1f228 fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, ffc1f400: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc1f404: 38 9b 00 01 addi r4,r27,1 <== NOT EXECUTED ffc1f408: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc1f40c: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED ffc1f410: 4b ff 7d 49 bl ffc17158 <== NOT EXECUTED &sec_buf); if (rc != RC_OK) ffc1f414: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc1f418: 40 a2 fe 10 bne- ffc1f228 <== NOT EXECUTED return rc; *sec_buf &= 0x00; ffc1f41c: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); ffc1f420: 57 5a c2 3e rlwinm r26,r26,24,8,31 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return rc; *sec_buf &= 0x00; ffc1f424: 98 69 00 00 stb r3,0(r9) <== NOT EXECUTED *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); ffc1f428: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED ffc1f42c: 89 49 00 00 lbz r10,0(r9) <== NOT EXECUTED ffc1f430: 7f 4a 53 78 or r10,r26,r10 <== NOT EXECUTED ffc1f434: 99 49 00 00 stb r10,0(r9) <== NOT EXECUTED ffc1f438: 9b 9f 00 88 stb r28,136(r31) <== NOT EXECUTED ffc1f43c: 4b ff fd ec b ffc1f228 <== NOT EXECUTED fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, ffc1f440: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc1f444: 38 9b 00 01 addi r4,r27,1 <== NOT EXECUTED ffc1f448: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc1f44c: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED ffc1f450: 4b ff 7d 09 bl ffc17158 <== NOT EXECUTED &sec_buf); if (rc != RC_OK) ffc1f454: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc1f458: 40 a2 fd d0 bne- ffc1f228 <== NOT EXECUTED return rc; *sec_buf &= 0xF0; ffc1f45c: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); ffc1f460: 57 de c2 3e rlwinm r30,r30,24,8,31 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return rc; *sec_buf &= 0xF0; ffc1f464: 89 49 00 00 lbz r10,0(r9) <== NOT EXECUTED ffc1f468: 55 4a 00 36 rlwinm r10,r10,0,0,27 <== NOT EXECUTED ffc1f46c: 99 49 00 00 stb r10,0(r9) <== NOT EXECUTED *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); ffc1f470: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED ffc1f474: 89 49 00 00 lbz r10,0(r9) <== NOT EXECUTED ffc1f478: 7f ca 53 78 or r10,r30,r10 <== NOT EXECUTED ffc1f47c: 99 49 00 00 stb r10,0(r9) <== NOT EXECUTED ffc1f480: 9b 9f 00 88 stb r28,136(r31) <== NOT EXECUTED ffc1f484: 4b ff fd a4 b ffc1f228 <== NOT EXECUTED =============================================================================== ffc181c8 : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_shutdown_drive(fat_fs_info_t *fs_info) { ffc181c8: 94 21 ff e0 stwu r1,-32(r1) ffc181cc: 7d 80 00 26 mfcr r12 ffc181d0: 7c 08 02 a6 mflr r0 ffc181d4: 93 81 00 10 stw r28,16(r1) ffc181d8: 93 c1 00 18 stw r30,24(r1) ffc181dc: 7c 7e 1b 78 mr r30,r3 ffc181e0: 90 01 00 24 stw r0,36(r1) ffc181e4: 93 a1 00 14 stw r29,20(r1) ffc181e8: 93 e1 00 1c stw r31,28(r1) ffc181ec: 91 81 00 0c stw r12,12(r1) int rc = RC_OK; int i = 0; rc = fat_sync(fs_info); ffc181f0: 4b ff fe a5 bl ffc18094 if ( rc != RC_OK ) ffc181f4: 2e 03 00 00 cmpwi cr4,r3,0 ffc181f8: 7c 7c 1b 78 mr r28,r3 ffc181fc: 40 92 00 c8 bne- cr4,ffc182c4 <== NEVER TAKEN rc = -1; ffc18200: 3b a0 00 00 li r29,0 for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; ffc18204: 83 fe 00 6c lwz r31,108(r30) ffc18208: 7f ff ea 14 add r31,r31,r29 while ( (node = rtems_chain_get(the_chain)) != NULL ) ffc1820c: 48 00 00 08 b ffc18214 free(node); ffc18210: 4b fe e5 01 bl ffc06710 */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); ffc18214: 7f e3 fb 78 mr r3,r31 ffc18218: 4b ff 47 81 bl ffc0c998 <_Chain_Get> 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 ) ffc1821c: 2f 83 00 00 cmpwi cr7,r3,0 ffc18220: 40 9e ff f0 bne+ cr7,ffc18210 rc = fat_sync(fs_info); if ( rc != RC_OK ) rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) ffc18224: 2f 9d 00 0c cmpwi cr7,r29,12 ffc18228: 3b bd 00 0c addi r29,r29,12 ffc1822c: 40 be ff d8 bne- cr7,ffc18204 ffc18230: 3b a0 00 00 li r29,0 } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; ffc18234: 83 fe 00 70 lwz r31,112(r30) ffc18238: 7f ff ea 14 add r31,r31,r29 while ( (node = rtems_chain_get(the_chain)) != NULL ) ffc1823c: 48 00 00 08 b ffc18244 free(node); ffc18240: 4b fe e4 d1 bl ffc06710 <== NOT EXECUTED ffc18244: 7f e3 fb 78 mr r3,r31 ffc18248: 4b ff 47 51 bl ffc0c998 <_Chain_Get> 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 ) ffc1824c: 2f 83 00 00 cmpwi cr7,r3,0 ffc18250: 40 9e ff f0 bne+ cr7,ffc18240 <== NEVER TAKEN while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } for (i = 0; i < FAT_HASH_SIZE; i++) ffc18254: 2f 9d 00 0c cmpwi cr7,r29,12 ffc18258: 3b bd 00 0c addi r29,r29,12 ffc1825c: 40 be ff d8 bne- cr7,ffc18234 while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); ffc18260: 80 7e 00 6c lwz r3,108(r30) ffc18264: 4b fe e4 ad bl ffc06710 free(fs_info->rhash); ffc18268: 80 7e 00 70 lwz r3,112(r30) ffc1826c: 4b fe e4 a5 bl ffc06710 free(fs_info->uino); ffc18270: 80 7e 00 74 lwz r3,116(r30) ffc18274: 4b fe e4 9d bl ffc06710 free(fs_info->sec_buf); ffc18278: 80 7e 00 90 lwz r3,144(r30) ffc1827c: 4b fe e4 95 bl ffc06710 close(fs_info->vol.fd); ffc18280: 80 7e 00 60 lwz r3,96(r30) ffc18284: 4b fe e3 f5 bl ffc06678 if (rc) ffc18288: 41 b2 00 10 beq+ cr4,ffc18298 <== ALWAYS TAKEN errno = EIO; ffc1828c: 48 00 94 11 bl ffc2169c <__errno> <== NOT EXECUTED ffc18290: 39 20 00 05 li r9,5 <== NOT EXECUTED ffc18294: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED return rc; } ffc18298: 80 01 00 24 lwz r0,36(r1) ffc1829c: 7f 83 e3 78 mr r3,r28 ffc182a0: 81 81 00 0c lwz r12,12(r1) ffc182a4: 7c 08 03 a6 mtlr r0 ffc182a8: 83 81 00 10 lwz r28,16(r1) ffc182ac: 83 a1 00 14 lwz r29,20(r1) ffc182b0: 7d 80 81 20 mtcrf 8,r12 ffc182b4: 83 c1 00 18 lwz r30,24(r1) ffc182b8: 83 e1 00 1c lwz r31,28(r1) ffc182bc: 38 21 00 20 addi r1,r1,32 ffc182c0: 4e 80 00 20 blr int rc = RC_OK; int i = 0; rc = fat_sync(fs_info); if ( rc != RC_OK ) rc = -1; ffc182c4: 3b 80 ff ff li r28,-1 <== NOT EXECUTED ffc182c8: 2e 1c 00 00 cmpwi cr4,r28,0 <== NOT EXECUTED ffc182cc: 4b ff ff 34 b ffc18200 <== NOT EXECUTED =============================================================================== ffc18094 : return RC_OK; } int fat_sync(fat_fs_info_t *fs_info) { ffc18094: 94 21 ff d8 stwu r1,-40(r1) ffc18098: 7c 08 02 a6 mflr r0 ffc1809c: 93 e1 00 24 stw r31,36(r1) ffc180a0: 7c 7f 1b 78 mr r31,r3 ffc180a4: 90 01 00 2c stw r0,44(r1) ffc180a8: 93 81 00 18 stw r28,24(r1) ffc180ac: 93 a1 00 1c stw r29,28(r1) ffc180b0: 93 c1 00 20 stw r30,32(r1) static int fat_fat32_update_fsinfo_sector(fat_fs_info_t *fs_info) { ssize_t ret1 = 0, ret2 = 0; if (fs_info->vol.type == FAT_FAT32) ffc180b4: 89 23 00 0e lbz r9,14(r3) ffc180b8: 2f 89 00 04 cmpwi cr7,r9,4 ffc180bc: 41 9e 00 44 beq- cr7,ffc18100 * RC_OK on success, or -1 if error occured (errno set appropriately) */ static int fat_fat32_update_fsinfo_sector(fat_fs_info_t *fs_info) { ssize_t ret1 = 0, ret2 = 0; ffc180c0: 3b c0 00 00 li r30,0 rc = fat_fat32_update_fsinfo_sector(fs_info); if ( rc != RC_OK ) rc = -1; fat_buf_release(fs_info); ffc180c4: 7f e3 fb 78 mr r3,r31 ffc180c8: 4b ff ee ad bl ffc16f74 if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) ffc180cc: 80 7f 00 64 lwz r3,100(r31) ffc180d0: 4b ff c9 45 bl ffc14a14 ffc180d4: 2f 83 00 00 cmpwi cr7,r3,0 ffc180d8: 40 9e 00 e8 bne- cr7,ffc181c0 <== NEVER TAKEN rc = -1; return rc; } ffc180dc: 80 01 00 2c lwz r0,44(r1) ffc180e0: 7f c3 f3 78 mr r3,r30 ffc180e4: 83 81 00 18 lwz r28,24(r1) ffc180e8: 7c 08 03 a6 mtlr r0 ffc180ec: 83 a1 00 1c lwz r29,28(r1) ffc180f0: 83 c1 00 20 lwz r30,32(r1) ffc180f4: 83 e1 00 24 lwz r31,36(r1) ffc180f8: 38 21 00 28 addi r1,r1,40 ffc180fc: 4e 80 00 20 blr { ssize_t ret1 = 0, ret2 = 0; if (fs_info->vol.type == FAT_FAT32) { uint32_t free_count = fs_info->vol.free_cls; ffc18100: 81 23 00 44 lwz r9,68(r3) uint32_t next_free = fs_info->vol.next_cl; if (free_count != fs_info->vol.free_cls_in_fs_info) ffc18104: 81 43 00 48 lwz r10,72(r3) ssize_t ret1 = 0, ret2 = 0; if (fs_info->vol.type == FAT_FAT32) { uint32_t free_count = fs_info->vol.free_cls; uint32_t next_free = fs_info->vol.next_cl; ffc18108: 83 a3 00 4c lwz r29,76(r3) if (free_count != fs_info->vol.free_cls_in_fs_info) ffc1810c: 7f 89 50 00 cmpw cr7,r9,r10 ffc18110: 41 9e 00 54 beq- cr7,ffc18164 <== ALWAYS TAKEN uint32_t value ) { uint32_t swapped; __asm__ volatile("rlwimi %0,%1,8,24,31;" ffc18114: 51 2a 46 3e rlwimi r10,r9,8,24,31 <== NOT EXECUTED ffc18118: 51 2a c4 2e rlwimi r10,r9,24,16,23 <== NOT EXECUTED ffc1811c: 51 2a 42 1e rlwimi r10,r9,8,8,15 <== NOT EXECUTED ffc18120: 51 2a c0 0e rlwimi r10,r9,24,0,7 <== NOT EXECUTED { uint32_t le_free_count = CT_LE_L(free_count); ffc18124: 7c 3e 0b 78 mr r30,r1 <== NOT EXECUTED fs_info->vol.free_cls_in_fs_info = free_count; ffc18128: 91 23 00 48 stw r9,72(r3) <== NOT EXECUTED ret1 = fat_sector_write(fs_info, ffc1812c: 38 a0 01 e8 li r5,488 <== NOT EXECUTED uint32_t free_count = fs_info->vol.free_cls; uint32_t next_free = fs_info->vol.next_cl; if (free_count != fs_info->vol.free_cls_in_fs_info) { uint32_t le_free_count = CT_LE_L(free_count); ffc18130: 95 5e 00 08 stwu r10,8(r30) <== NOT EXECUTED fs_info->vol.free_cls_in_fs_info = free_count; ret1 = fat_sector_write(fs_info, ffc18134: 38 c0 00 04 li r6,4 <== NOT EXECUTED ffc18138: a0 83 00 40 lhz r4,64(r3) <== NOT EXECUTED ffc1813c: 7f c7 f3 78 mr r7,r30 <== NOT EXECUTED ffc18140: 4b ff f1 ed bl ffc1732c <== NOT EXECUTED FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, sizeof(le_free_count), &le_free_count); } if (next_free != fs_info->vol.next_cl_in_fs_info) ffc18144: 81 3f 00 50 lwz r9,80(r31) <== NOT EXECUTED { uint32_t le_free_count = CT_LE_L(free_count); fs_info->vol.free_cls_in_fs_info = free_count; ret1 = fat_sector_write(fs_info, ffc18148: 7c 7c 1b 78 mr r28,r3 <== NOT EXECUTED FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, sizeof(le_free_count), &le_free_count); } if (next_free != fs_info->vol.next_cl_in_fs_info) ffc1814c: 7f 9d 48 00 cmpw cr7,r29,r9 <== NOT EXECUTED ffc18150: 40 9e 00 28 bne- cr7,ffc18178 <== NOT EXECUTED sizeof(le_next_free), &le_next_free); } } if ( (ret1 < 0) || (ret2 < 0) ) ffc18154: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc18158: 40 9c ff 68 bge+ cr7,ffc180c0 <== NOT EXECUTED { int rc = RC_OK; rc = fat_fat32_update_fsinfo_sector(fs_info); if ( rc != RC_OK ) rc = -1; ffc1815c: 3b c0 ff ff li r30,-1 <== NOT EXECUTED ffc18160: 4b ff ff 64 b ffc180c4 <== NOT EXECUTED FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, sizeof(le_free_count), &le_free_count); } if (next_free != fs_info->vol.next_cl_in_fs_info) ffc18164: 81 23 00 50 lwz r9,80(r3) ffc18168: 7f 9d 48 00 cmpw cr7,r29,r9 ffc1816c: 41 be ff 54 beq- cr7,ffc180c0 <== NEVER TAKEN * RC_OK on success, or -1 if error occured (errno set appropriately) */ static int fat_fat32_update_fsinfo_sector(fat_fs_info_t *fs_info) { ssize_t ret1 = 0, ret2 = 0; ffc18170: 3b 80 00 00 li r28,0 ffc18174: 3b c1 00 08 addi r30,r1,8 ffc18178: 53 a9 46 3e rlwimi r9,r29,8,24,31 ffc1817c: 53 a9 c4 2e rlwimi r9,r29,24,16,23 ffc18180: 53 a9 42 1e rlwimi r9,r29,8,8,15 ffc18184: 53 a9 c0 0e rlwimi r9,r29,24,0,7 if (next_free != fs_info->vol.next_cl_in_fs_info) { uint32_t le_next_free = CT_LE_L(next_free); fs_info->vol.next_cl_in_fs_info = next_free; ffc18188: 93 bf 00 50 stw r29,80(r31) ret2 = fat_sector_write(fs_info, ffc1818c: 7f e3 fb 78 mr r3,r31 ffc18190: 38 a0 01 ec li r5,492 ffc18194: a0 9f 00 40 lhz r4,64(r31) ffc18198: 38 c0 00 04 li r6,4 ffc1819c: 7f c7 f3 78 mr r7,r30 &le_free_count); } if (next_free != fs_info->vol.next_cl_in_fs_info) { uint32_t le_next_free = CT_LE_L(next_free); ffc181a0: 91 21 00 08 stw r9,8(r1) fs_info->vol.next_cl_in_fs_info = next_free; ret2 = fat_sector_write(fs_info, ffc181a4: 4b ff f1 89 bl ffc1732c sizeof(le_next_free), &le_next_free); } } if ( (ret1 < 0) || (ret2 < 0) ) ffc181a8: 2f 9c 00 00 cmpwi cr7,r28,0 ffc181ac: 41 bc ff b0 blt- cr7,ffc1815c <== NEVER TAKEN ffc181b0: 2f 83 00 00 cmpwi cr7,r3,0 ffc181b4: 40 9c ff 0c bge+ cr7,ffc180c0 <== ALWAYS TAKEN { int rc = RC_OK; rc = fat_fat32_update_fsinfo_sector(fs_info); if ( rc != RC_OK ) rc = -1; ffc181b8: 3b c0 ff ff li r30,-1 <== NOT EXECUTED ffc181bc: 4b ff ff 08 b ffc180c4 <== NOT EXECUTED fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) rc = -1; ffc181c0: 3b c0 ff ff li r30,-1 <== NOT EXECUTED ffc181c4: 4b ff ff 18 b ffc180dc <== NOT EXECUTED =============================================================================== ffc3e6f8 : st.st_mode = 0; st.st_uid = 0; st.st_gid = 0; rtems_libio_check_fd( fd ); ffc3e6f8: 3d 20 00 00 lis r9,0 /** * compatible with SVr4, 4.4BSD and X/OPEN - Change Directory */ int fchdir( int fd ) { ffc3e6fc: 94 21 ff 88 stwu r1,-120(r1) ffc3e700: 7c 08 02 a6 mflr r0 st.st_mode = 0; st.st_uid = 0; st.st_gid = 0; rtems_libio_check_fd( fd ); ffc3e704: 81 29 33 d8 lwz r9,13272(r9) /** * compatible with SVr4, 4.4BSD and X/OPEN - Change Directory */ int fchdir( int fd ) { ffc3e708: 90 01 00 7c stw r0,124(r1) st.st_mode = 0; st.st_uid = 0; st.st_gid = 0; rtems_libio_check_fd( fd ); ffc3e70c: 7f 83 48 40 cmplw cr7,r3,r9 int rv = 0; rtems_libio_t *iop; struct stat st; rtems_filesystem_location_info_t loc; st.st_mode = 0; ffc3e710: 39 20 00 00 li r9,0 /** * compatible with SVr4, 4.4BSD and X/OPEN - Change Directory */ int fchdir( int fd ) { ffc3e714: 93 a1 00 6c stw r29,108(r1) ffc3e718: 93 c1 00 70 stw r30,112(r1) ffc3e71c: 93 e1 00 74 stw r31,116(r1) int rv = 0; rtems_libio_t *iop; struct stat st; rtems_filesystem_location_info_t loc; st.st_mode = 0; ffc3e720: 91 21 00 14 stw r9,20(r1) st.st_uid = 0; ffc3e724: b1 21 00 1a sth r9,26(r1) st.st_gid = 0; ffc3e728: b1 21 00 1c sth r9,28(r1) rtems_libio_check_fd( fd ); ffc3e72c: 40 9c 01 08 bge- cr7,ffc3e834 iop = rtems_libio_iop( fd ); ffc3e730: 3d 20 00 00 lis r9,0 ffc3e734: 83 e9 34 c8 lwz r31,13512(r9) ffc3e738: 1c 63 00 38 mulli r3,r3,56 ffc3e73c: 7f ff 1a 14 add r31,r31,r3 rtems_libio_check_is_open( iop ); ffc3e740: 81 3f 00 10 lwz r9,16(r31) ffc3e744: 71 2a 01 00 andi. r10,r9,256 ffc3e748: 41 82 00 ec beq- ffc3e834 if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); } return rv; } ffc3e74c: 80 7f 00 28 lwz r3,40(r31) rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st ); ffc3e750: 3b bf 00 14 addi r29,r31,20 const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->lock_h)( mt_entry ); ffc3e754: 81 23 00 0c lwz r9,12(r3) ffc3e758: 81 29 00 00 lwz r9,0(r9) ffc3e75c: 7d 29 03 a6 mtctr r9 ffc3e760: 4e 80 04 21 bctrl ffc3e764: 81 3f 00 24 lwz r9,36(r31) ffc3e768: 7f a3 eb 78 mr r3,r29 ffc3e76c: 81 29 00 18 lwz r9,24(r9) ffc3e770: 38 81 00 08 addi r4,r1,8 ffc3e774: 7d 29 03 a6 mtctr r9 ffc3e778: 4e 80 04 21 bctrl if ( rv == 0 ) { ffc3e77c: 7c 7e 1b 79 mr. r30,r3 ffc3e780: 41 82 00 38 beq- ffc3e7b8 <== ALWAYS TAKEN if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); } return rv; } ffc3e784: 80 7f 00 28 lwz r3,40(r31) const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->unlock_h)( mt_entry ); ffc3e788: 81 23 00 0c lwz r9,12(r3) ffc3e78c: 81 29 00 04 lwz r9,4(r9) ffc3e790: 7d 29 03 a6 mtctr r9 ffc3e794: 4e 80 04 21 bctrl ffc3e798: 80 01 00 7c lwz r0,124(r1) ffc3e79c: 7f c3 f3 78 mr r3,r30 ffc3e7a0: 83 a1 00 6c lwz r29,108(r1) ffc3e7a4: 7c 08 03 a6 mtlr r0 ffc3e7a8: 83 c1 00 70 lwz r30,112(r1) ffc3e7ac: 83 e1 00 74 lwz r31,116(r1) ffc3e7b0: 38 21 00 78 addi r1,r1,120 ffc3e7b4: 4e 80 00 20 blr rtems_libio_check_is_open( iop ); rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st ); if ( rv == 0 ) { bool access_ok = rtems_filesystem_check_access( ffc3e7b8: 80 81 00 14 lwz r4,20(r1) ffc3e7bc: 38 60 00 01 li r3,1 ffc3e7c0: a0 a1 00 1a lhz r5,26(r1) ffc3e7c4: a0 c1 00 1c lhz r6,28(r1) ffc3e7c8: 4b fd 36 b9 bl ffc11e80 st.st_mode, st.st_uid, st.st_gid ); if ( access_ok ) { ffc3e7cc: 2f 83 00 00 cmpwi cr7,r3,0 ffc3e7d0: 41 9e 00 50 beq- cr7,ffc3e820 rtems_filesystem_location_clone( &loc, &iop->pathinfo ); ffc3e7d4: 7f a4 eb 78 mr r4,r29 ffc3e7d8: 38 61 00 50 addi r3,r1,80 ffc3e7dc: 4b fd 2d bd bl ffc11598 if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); } return rv; } ffc3e7e0: 80 7f 00 28 lwz r3,40(r31) ffc3e7e4: 81 23 00 0c lwz r9,12(r3) ffc3e7e8: 81 29 00 04 lwz r9,4(r9) ffc3e7ec: 7d 29 03 a6 mtctr r9 ffc3e7f0: 4e 80 04 21 bctrl } } rtems_filesystem_instance_unlock( &iop->pathinfo ); if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); ffc3e7f4: 38 61 00 50 addi r3,r1,80 ffc3e7f8: 4b fe d6 d1 bl ffc2bec8 } return rv; } ffc3e7fc: 80 01 00 7c lwz r0,124(r1) } } rtems_filesystem_instance_unlock( &iop->pathinfo ); if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); ffc3e800: 7c 7e 1b 78 mr r30,r3 } return rv; } ffc3e804: 83 a1 00 6c lwz r29,108(r1) ffc3e808: 7c 08 03 a6 mtlr r0 ffc3e80c: 7f c3 f3 78 mr r3,r30 ffc3e810: 83 e1 00 74 lwz r31,116(r1) ffc3e814: 83 c1 00 70 lwz r30,112(r1) ffc3e818: 38 21 00 78 addi r1,r1,120 ffc3e81c: 4e 80 00 20 blr ); if ( access_ok ) { rtems_filesystem_location_clone( &loc, &iop->pathinfo ); } else { errno = EACCES; ffc3e820: 48 00 51 f9 bl ffc43a18 <__errno> ffc3e824: 39 20 00 0d li r9,13 ffc3e828: 91 23 00 00 stw r9,0(r3) rv = -1; ffc3e82c: 3b c0 ff ff li r30,-1 ffc3e830: 4b ff ff 54 b ffc3e784 st.st_uid = 0; st.st_gid = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); ffc3e834: 48 00 51 e5 bl ffc43a18 <__errno> ffc3e838: 39 20 00 09 li r9,9 ffc3e83c: 91 23 00 00 stw r9,0(r3) ffc3e840: 3b c0 ff ff li r30,-1 ffc3e844: 4b ff ff 54 b ffc3e798 =============================================================================== ffc2c57c : int fchmod( int fd, mode_t mode ) { int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc2c57c: 3d 20 00 00 lis r9,0 /** * POSIX 1003.1b 5.6.4 - Change File Modes */ int fchmod( int fd, mode_t mode ) { ffc2c580: 94 21 ff e8 stwu r1,-24(r1) ffc2c584: 7c 08 02 a6 mflr r0 int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc2c588: 81 29 33 d8 lwz r9,13272(r9) /** * POSIX 1003.1b 5.6.4 - Change File Modes */ int fchmod( int fd, mode_t mode ) { ffc2c58c: 90 01 00 1c stw r0,28(r1) int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc2c590: 7f 83 48 40 cmplw cr7,r3,r9 /** * POSIX 1003.1b 5.6.4 - Change File Modes */ int fchmod( int fd, mode_t mode ) { ffc2c594: 93 c1 00 10 stw r30,16(r1) ffc2c598: 93 e1 00 14 stw r31,20(r1) int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc2c59c: 40 9c 00 c0 bge- cr7,ffc2c65c iop = rtems_libio_iop( fd ); ffc2c5a0: 3d 20 00 00 lis r9,0 ffc2c5a4: 83 e9 34 c8 lwz r31,13512(r9) ffc2c5a8: 1c 63 00 38 mulli r3,r3,56 ffc2c5ac: 7f ff 1a 14 add r31,r31,r3 rtems_libio_check_is_open(iop); ffc2c5b0: 81 3f 00 10 lwz r9,16(r31) ffc2c5b4: 71 2a 01 00 andi. r10,r9,256 ffc2c5b8: 41 82 00 a4 beq- ffc2c65c if (iop->pathinfo.mt_entry->writeable) { ffc2c5bc: 80 7f 00 28 lwz r3,40(r31) ffc2c5c0: 89 23 00 29 lbz r9,41(r3) ffc2c5c4: 2f 89 00 00 cmpwi cr7,r9,0 ffc2c5c8: 40 9e 00 30 bne- cr7,ffc2c5f8 <== ALWAYS TAKEN rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode ); rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; ffc2c5cc: 48 01 74 4d bl ffc43a18 <__errno> <== NOT EXECUTED ffc2c5d0: 39 20 00 1e li r9,30 <== NOT EXECUTED ffc2c5d4: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED rv = -1; ffc2c5d8: 3b c0 ff ff li r30,-1 <== NOT EXECUTED } return rv; } ffc2c5dc: 80 01 00 1c lwz r0,28(r1) ffc2c5e0: 7f c3 f3 78 mr r3,r30 ffc2c5e4: 83 e1 00 14 lwz r31,20(r1) ffc2c5e8: 7c 08 03 a6 mtlr r0 ffc2c5ec: 83 c1 00 10 lwz r30,16(r1) ffc2c5f0: 38 21 00 18 addi r1,r1,24 ffc2c5f4: 4e 80 00 20 blr const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->lock_h)( mt_entry ); ffc2c5f8: 81 23 00 0c lwz r9,12(r3) ffc2c5fc: 81 29 00 00 lwz r9,0(r9) ffc2c600: 90 81 00 08 stw r4,8(r1) ffc2c604: 7d 29 03 a6 mtctr r9 ffc2c608: 4e 80 04 21 bctrl iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); if (iop->pathinfo.mt_entry->writeable) { rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode ); ffc2c60c: 81 3f 00 28 lwz r9,40(r31) ffc2c610: 80 81 00 08 lwz r4,8(r1) ffc2c614: 38 7f 00 14 addi r3,r31,20 ffc2c618: 81 29 00 0c lwz r9,12(r9) ffc2c61c: 81 29 00 20 lwz r9,32(r9) ffc2c620: 7d 29 03 a6 mtctr r9 ffc2c624: 4e 80 04 21 bctrl ffc2c628: 7c 7e 1b 78 mr r30,r3 errno = EROFS; rv = -1; } return rv; } ffc2c62c: 80 7f 00 28 lwz r3,40(r31) const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->unlock_h)( mt_entry ); ffc2c630: 81 23 00 0c lwz r9,12(r3) ffc2c634: 81 29 00 04 lwz r9,4(r9) ffc2c638: 7d 29 03 a6 mtctr r9 ffc2c63c: 4e 80 04 21 bctrl ffc2c640: 80 01 00 1c lwz r0,28(r1) ffc2c644: 7f c3 f3 78 mr r3,r30 ffc2c648: 83 e1 00 14 lwz r31,20(r1) ffc2c64c: 7c 08 03 a6 mtlr r0 ffc2c650: 83 c1 00 10 lwz r30,16(r1) ffc2c654: 38 21 00 18 addi r1,r1,24 ffc2c658: 4e 80 00 20 blr int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); ffc2c65c: 48 01 73 bd bl ffc43a18 <__errno> ffc2c660: 39 20 00 09 li r9,9 ffc2c664: 91 23 00 00 stw r9,0(r3) ffc2c668: 3b c0 ff ff li r30,-1 ffc2c66c: 4b ff ff 70 b ffc2c5dc =============================================================================== ffc2c670 : int fchown( int fd, uid_t owner, gid_t group ) { int rv = 0; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc2c670: 3d 20 00 00 lis r9,0 /** * POSIX 1003.1b 5.6.5 - Change Owner and Group of a File */ int fchown( int fd, uid_t owner, gid_t group ) { ffc2c674: 94 21 ff e8 stwu r1,-24(r1) ffc2c678: 7c 08 02 a6 mflr r0 int rv = 0; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc2c67c: 81 29 33 d8 lwz r9,13272(r9) /** * POSIX 1003.1b 5.6.5 - Change Owner and Group of a File */ int fchown( int fd, uid_t owner, gid_t group ) { ffc2c680: 90 01 00 1c stw r0,28(r1) int rv = 0; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc2c684: 7f 83 48 40 cmplw cr7,r3,r9 /** * POSIX 1003.1b 5.6.5 - Change Owner and Group of a File */ int fchown( int fd, uid_t owner, gid_t group ) { ffc2c688: 93 c1 00 10 stw r30,16(r1) ffc2c68c: 93 e1 00 14 stw r31,20(r1) int rv = 0; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc2c690: 40 9c 00 c8 bge- cr7,ffc2c758 iop = rtems_libio_iop( fd ); ffc2c694: 3d 20 00 00 lis r9,0 ffc2c698: 83 e9 34 c8 lwz r31,13512(r9) ffc2c69c: 1c 63 00 38 mulli r3,r3,56 ffc2c6a0: 7f ff 1a 14 add r31,r31,r3 rtems_libio_check_is_open(iop); ffc2c6a4: 81 3f 00 10 lwz r9,16(r31) ffc2c6a8: 71 2a 01 00 andi. r10,r9,256 ffc2c6ac: 41 82 00 ac beq- ffc2c758 if (iop->pathinfo.mt_entry->writeable) { ffc2c6b0: 80 7f 00 28 lwz r3,40(r31) ffc2c6b4: 89 23 00 29 lbz r9,41(r3) ffc2c6b8: 2f 89 00 00 cmpwi cr7,r9,0 ffc2c6bc: 40 9e 00 30 bne- cr7,ffc2c6ec <== ALWAYS TAKEN owner, group ); rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; ffc2c6c0: 48 01 73 59 bl ffc43a18 <__errno> <== NOT EXECUTED ffc2c6c4: 39 20 00 1e li r9,30 <== NOT EXECUTED ffc2c6c8: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED rv = -1; ffc2c6cc: 3b c0 ff ff li r30,-1 <== NOT EXECUTED } return rv; } ffc2c6d0: 80 01 00 1c lwz r0,28(r1) ffc2c6d4: 7f c3 f3 78 mr r3,r30 ffc2c6d8: 83 e1 00 14 lwz r31,20(r1) ffc2c6dc: 7c 08 03 a6 mtlr r0 ffc2c6e0: 83 c1 00 10 lwz r30,16(r1) ffc2c6e4: 38 21 00 18 addi r1,r1,24 ffc2c6e8: 4e 80 00 20 blr const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->lock_h)( mt_entry ); ffc2c6ec: 81 23 00 0c lwz r9,12(r3) ffc2c6f0: 81 29 00 00 lwz r9,0(r9) ffc2c6f4: 90 81 00 08 stw r4,8(r1) ffc2c6f8: 7d 29 03 a6 mtctr r9 ffc2c6fc: 90 a1 00 0c stw r5,12(r1) ffc2c700: 4e 80 04 21 bctrl iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); if (iop->pathinfo.mt_entry->writeable) { rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->chown_h)( ffc2c704: 81 3f 00 28 lwz r9,40(r31) ffc2c708: 80 81 00 08 lwz r4,8(r1) ffc2c70c: 38 7f 00 14 addi r3,r31,20 ffc2c710: 81 29 00 0c lwz r9,12(r9) ffc2c714: 80 a1 00 0c lwz r5,12(r1) ffc2c718: 81 29 00 24 lwz r9,36(r9) ffc2c71c: 7d 29 03 a6 mtctr r9 ffc2c720: 4e 80 04 21 bctrl ffc2c724: 7c 7e 1b 78 mr r30,r3 errno = EROFS; rv = -1; } return rv; } ffc2c728: 80 7f 00 28 lwz r3,40(r31) const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->unlock_h)( mt_entry ); ffc2c72c: 81 23 00 0c lwz r9,12(r3) ffc2c730: 81 29 00 04 lwz r9,4(r9) ffc2c734: 7d 29 03 a6 mtctr r9 ffc2c738: 4e 80 04 21 bctrl ffc2c73c: 80 01 00 1c lwz r0,28(r1) ffc2c740: 7f c3 f3 78 mr r3,r30 ffc2c744: 83 e1 00 14 lwz r31,20(r1) ffc2c748: 7c 08 03 a6 mtlr r0 ffc2c74c: 83 c1 00 10 lwz r30,16(r1) ffc2c750: 38 21 00 18 addi r1,r1,24 ffc2c754: 4e 80 00 20 blr int rv = 0; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); ffc2c758: 48 01 72 c1 bl ffc43a18 <__errno> ffc2c75c: 39 20 00 09 li r9,9 ffc2c760: 91 23 00 00 stw r9,0(r3) ffc2c764: 3b c0 ff ff li r30,-1 ffc2c768: 4b ff ff 68 b ffc2c6d0 =============================================================================== ffc38de8 : int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc38de8: 3d 20 00 00 lis r9,0 int fcntl( int fd, int cmd, ... ) { ffc38dec: 7d 80 00 26 mfcr r12 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc38df0: 81 29 27 b8 lwz r9,10168(r9) ... ) { int ret; va_list ap; va_start( ap, cmd ); ffc38df4: 39 40 00 02 li r10,2 int fcntl( int fd, int cmd, ... ) { ffc38df8: 94 21 ff b8 stwu r1,-72(r1) ffc38dfc: 7c 08 02 a6 mflr r0 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc38e00: 7f 83 48 40 cmplw cr7,r3,r9 ... ) { int ret; va_list ap; va_start( ap, cmd ); ffc38e04: 99 41 00 08 stb r10,8(r1) ffc38e08: 39 41 00 50 addi r10,r1,80 ffc38e0c: 91 41 00 0c stw r10,12(r1) ffc38e10: 39 41 00 10 addi r10,r1,16 int fcntl( int fd, int cmd, ... ) { ffc38e14: 90 01 00 4c stw r0,76(r1) ffc38e18: 93 41 00 30 stw r26,48(r1) ffc38e1c: 93 61 00 34 stw r27,52(r1) ffc38e20: 93 81 00 38 stw r28,56(r1) ffc38e24: 93 a1 00 3c stw r29,60(r1) ffc38e28: 93 c1 00 40 stw r30,64(r1) ffc38e2c: 93 e1 00 44 stw r31,68(r1) ffc38e30: 91 81 00 2c stw r12,44(r1) ffc38e34: 90 a1 00 18 stw r5,24(r1) ffc38e38: 90 c1 00 1c stw r6,28(r1) ffc38e3c: 90 e1 00 20 stw r7,32(r1) int ret; va_list ap; va_start( ap, cmd ); ffc38e40: 91 41 00 10 stw r10,16(r1) int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc38e44: 40 9c 02 8c bge- cr7,ffc390d0 iop = rtems_libio_iop( fd ); ffc38e48: 3f 80 00 00 lis r28,0 ffc38e4c: 1f a3 00 38 mulli r29,r3,56 ffc38e50: 81 3c 28 68 lwz r9,10344(r28) ffc38e54: 7f a9 ea 14 add r29,r9,r29 rtems_libio_check_is_open(iop); ffc38e58: 80 7d 00 10 lwz r3,16(r29) ffc38e5c: 70 69 01 00 andi. r9,r3,256 ffc38e60: 41 82 02 70 beq- ffc390d0 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { ffc38e64: 2b 84 00 09 cmplwi cr7,r4,9 ffc38e68: 7c 9e 23 78 mr r30,r4 ffc38e6c: 40 9d 00 48 ble- cr7,ffc38eb4 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; ffc38e70: 4b ff 01 89 bl ffc28ff8 <__errno> ffc38e74: 39 20 00 16 li r9,22 ffc38e78: 91 23 00 00 stw r9,0(r3) int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); ffc38e7c: 3b e0 ff ff li r31,-1 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } ffc38e80: 80 01 00 4c lwz r0,76(r1) ffc38e84: 7f e3 fb 78 mr r3,r31 ffc38e88: 81 81 00 2c lwz r12,44(r1) ffc38e8c: 7c 08 03 a6 mtlr r0 ffc38e90: 83 41 00 30 lwz r26,48(r1) ffc38e94: 83 61 00 34 lwz r27,52(r1) ffc38e98: 7d 80 81 20 mtcrf 8,r12 ffc38e9c: 83 81 00 38 lwz r28,56(r1) ffc38ea0: 83 a1 00 3c lwz r29,60(r1) ffc38ea4: 83 c1 00 40 lwz r30,64(r1) ffc38ea8: 83 e1 00 44 lwz r31,68(r1) ffc38eac: 38 21 00 48 addi r1,r1,72 ffc38eb0: 4e 80 00 20 blr /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { ffc38eb4: 3d 20 ff c4 lis r9,-60 ffc38eb8: 39 29 f8 c0 addi r9,r9,-1856 ffc38ebc: 54 8a 10 3a rlwinm r10,r4,2,0,29 ffc38ec0: 7d 49 50 2e lwzx r10,r9,r10 ffc38ec4: 7d 2a 4a 14 add r9,r10,r9 ffc38ec8: 7d 29 03 a6 mtctr r9 ffc38ecc: 4e 80 04 20 bctr errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; ffc38ed0: 4b ff 01 29 bl ffc28ff8 <__errno> ffc38ed4: 39 20 00 86 li r9,134 ffc38ed8: 91 23 00 00 stw r9,0(r3) ffc38edc: 4b ff ff a0 b ffc38e7c case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); ffc38ee0: 89 21 00 08 lbz r9,8(r1) ffc38ee4: 2b 89 00 07 cmplwi cr7,r9,7 ffc38ee8: 40 9d 01 d0 ble- cr7,ffc390b8 <== ALWAYS TAKEN ffc38eec: 81 41 00 0c lwz r10,12(r1) <== NOT EXECUTED ffc38ef0: 39 2a 00 04 addi r9,r10,4 <== NOT EXECUTED ffc38ef4: 91 21 00 0c stw r9,12(r1) <== NOT EXECUTED ffc38ef8: 80 6a 00 00 lwz r3,0(r10) { rtems_libio_t *iop; int fd2; int flags; int mask; int ret = 0; ffc38efc: 3b e0 00 00 li r31,0 case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); ffc38f00: 4b fd 17 ed bl ffc0a6ec /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); ffc38f04: 81 3d 00 10 lwz r9,16(r29) ffc38f08: 70 63 02 01 andi. r3,r3,513 ffc38f0c: 39 40 fd fe li r10,-514 ffc38f10: 7d 49 48 38 and r9,r10,r9 ffc38f14: 7c 69 4b 78 or r9,r3,r9 ffc38f18: 91 3d 00 10 stw r9,16(r29) ffc38f1c: 48 00 00 14 b ffc38f30 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); ffc38f20: 4b fd 18 2d bl ffc0a74c ffc38f24: 2e 03 00 00 cmpwi cr4,r3,0 ffc38f28: 7c 7f 1b 78 mr r31,r3 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { ffc38f2c: 41 b0 ff 54 blt- cr4,ffc38e80 <== NEVER TAKEN int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd ); ffc38f30: 81 3d 00 24 lwz r9,36(r29) ffc38f34: 7f c4 f3 78 mr r4,r30 ffc38f38: 7f a3 eb 78 mr r3,r29 ffc38f3c: 81 29 00 28 lwz r9,40(r9) ffc38f40: 7d 29 03 a6 mtctr r9 ffc38f44: 4e 80 04 21 bctrl if (err) { ffc38f48: 7c 7e 1b 79 mr. r30,r3 ffc38f4c: 41 82 ff 34 beq+ ffc38e80 <== ALWAYS TAKEN errno = err; ffc38f50: 4b ff 00 a9 bl ffc28ff8 <__errno> <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } ffc38f54: 80 01 00 4c lwz r0,76(r1) <== NOT EXECUTED ffc38f58: 81 81 00 2c lwz r12,44(r1) <== NOT EXECUTED if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd ); if (err) { errno = err; ret = -1; ffc38f5c: 3b e0 ff ff li r31,-1 <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } ffc38f60: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED */ if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd ); if (err) { errno = err; ffc38f64: 93 c3 00 00 stw r30,0(r3) <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } ffc38f68: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED ffc38f6c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc38f70: 83 41 00 30 lwz r26,48(r1) <== NOT EXECUTED ffc38f74: 83 61 00 34 lwz r27,52(r1) <== NOT EXECUTED ffc38f78: 83 81 00 38 lwz r28,56(r1) <== NOT EXECUTED ffc38f7c: 83 a1 00 3c lwz r29,60(r1) <== NOT EXECUTED ffc38f80: 83 c1 00 40 lwz r30,64(r1) <== NOT EXECUTED ffc38f84: 83 e1 00 44 lwz r31,68(r1) <== NOT EXECUTED ffc38f88: 38 21 00 48 addi r1,r1,72 <== NOT EXECUTED ffc38f8c: 4e 80 00 20 blr <== NOT EXECUTED * if a new process is exec()'ed. Since RTEMS does not support * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) ffc38f90: 89 21 00 08 lbz r9,8(r1) ffc38f94: 2b 89 00 07 cmplwi cr7,r9,7 ffc38f98: 41 9d 01 10 bgt- cr7,ffc390a8 <== NEVER TAKEN ffc38f9c: 55 28 10 3a rlwinm r8,r9,2,0,29 ffc38fa0: 81 41 00 10 lwz r10,16(r1) ffc38fa4: 39 29 00 01 addi r9,r9,1 ffc38fa8: 99 21 00 08 stb r9,8(r1) ffc38fac: 7d 4a 42 14 add r10,r10,r8 ffc38fb0: 81 2a 00 00 lwz r9,0(r10) ffc38fb4: 2f 89 00 00 cmpwi cr7,r9,0 ffc38fb8: 41 9e 01 2c beq- cr7,ffc390e4 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; ffc38fbc: 60 63 08 00 ori r3,r3,2048 ffc38fc0: 90 7d 00 10 stw r3,16(r29) { rtems_libio_t *iop; int fd2; int flags; int mask; int ret = 0; ffc38fc4: 3b e0 00 00 li r31,0 ffc38fc8: 4b ff ff 68 b ffc38f30 fd2 = va_arg( ap, int ); ret = duplicate_iop( iop, fd2 ); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); ffc38fcc: 54 7f af fe rlwinm r31,r3,21,31,31 ffc38fd0: 4b ff ff 60 b ffc38f30 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); ffc38fd4: 89 21 00 08 lbz r9,8(r1) ffc38fd8: 2b 89 00 07 cmplwi cr7,r9,7 ffc38fdc: 41 9d 00 bc bgt- cr7,ffc39098 <== NEVER TAKEN ffc38fe0: 39 29 00 01 addi r9,r9,1 ffc38fe4: 99 21 00 08 stb r9,8(r1) /* * FIXME: We ignore the start value fd2 for the file descriptor search. This * is not POSIX conform. */ rtems_libio_t *diop = rtems_libio_allocate(); ffc38fe8: 4b fd 17 b5 bl ffc0a79c if (diop != NULL) { ffc38fec: 7c 7b 1b 79 mr. r27,r3 ffc38ff0: 41 a2 fe 8c beq- ffc38e7c int oflag = rtems_libio_to_fcntl_flags( iop->flags ); ffc38ff4: 80 7d 00 10 lwz r3,16(r29) ffc38ff8: 4b fd 17 55 bl ffc0a74c oflag &= ~O_CREAT; diop->flags |= rtems_libio_fcntl_flags( oflag ); ffc38ffc: 83 5b 00 10 lwz r26,16(r27) rtems_libio_t *diop = rtems_libio_allocate(); if (diop != NULL) { int oflag = rtems_libio_to_fcntl_flags( iop->flags ); oflag &= ~O_CREAT; ffc39000: 54 7f 05 ea rlwinm r31,r3,0,23,21 diop->flags |= rtems_libio_fcntl_flags( oflag ); ffc39004: 7f e3 fb 78 mr r3,r31 ffc39008: 4b fd 16 e5 bl ffc0a6ec int cmd, int arg ) { return fcntl( fd, cmd, arg ); } ffc3900c: 81 3d 00 28 lwz r9,40(r29) if (diop != NULL) { int oflag = rtems_libio_to_fcntl_flags( iop->flags ); oflag &= ~O_CREAT; diop->flags |= rtems_libio_fcntl_flags( oflag ); ffc39010: 7c 7a d3 78 or r26,r3,r26 const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->lock_h)( mt_entry ); ffc39014: 81 49 00 0c lwz r10,12(r9) ffc39018: 7d 23 4b 78 mr r3,r9 ffc3901c: 81 2a 00 00 lwz r9,0(r10) ffc39020: 93 5b 00 10 stw r26,16(r27) ffc39024: 7d 29 03 a6 mtctr r9 ffc39028: 4e 80 04 21 bctrl rtems_filesystem_instance_lock( &iop->pathinfo ); rtems_filesystem_location_clone( &diop->pathinfo, &iop->pathinfo ); ffc3902c: 38 9d 00 14 addi r4,r29,20 ffc39030: 38 7b 00 14 addi r3,r27,20 ffc39034: 4b fe 31 65 bl ffc1c198 int cmd, int arg ) { return fcntl( fd, cmd, arg ); } ffc39038: 80 7d 00 28 lwz r3,40(r29) const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->unlock_h)( mt_entry ); ffc3903c: 81 23 00 0c lwz r9,12(r3) ffc39040: 81 29 00 04 lwz r9,4(r9) ffc39044: 7d 29 03 a6 mtctr r9 ffc39048: 4e 80 04 21 bctrl /* * XXX: We call the open handler here to have a proper open and close pair. * * FIXME: What to do with the path? */ rv = (*diop->pathinfo.handlers->open_h)( diop, NULL, oflag, 0 ); ffc3904c: 81 3b 00 24 lwz r9,36(r27) ffc39050: 7f e5 fb 78 mr r5,r31 ffc39054: 81 29 00 00 lwz r9,0(r9) ffc39058: 7f 63 db 78 mr r3,r27 ffc3905c: 38 80 00 00 li r4,0 ffc39060: 38 c0 00 00 li r6,0 ffc39064: 7d 29 03 a6 mtctr r9 ffc39068: 4e 80 04 21 bctrl if ( rv == 0 ) { ffc3906c: 2e 03 00 00 cmpwi cr4,r3,0 ffc39070: 7c 7f 1b 78 mr r31,r3 ffc39074: 40 92 00 80 bne- cr4,ffc390f4 <== NEVER TAKEN rv = diop - rtems_libio_iops; ffc39078: 83 fc 28 68 lwz r31,10344(r28) ffc3907c: 3d 20 b6 db lis r9,-18725 ffc39080: 61 29 6d b7 ori r9,r9,28087 ffc39084: 7f ff d8 50 subf r31,r31,r27 ffc39088: 7f ff 1e 70 srawi r31,r31,3 ffc3908c: 7f ff 49 d6 mullw r31,r31,r9 ffc39090: 2e 1f 00 00 cmpwi cr4,r31,0 ffc39094: 4b ff fe 98 b ffc38f2c * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); ffc39098: 81 21 00 0c lwz r9,12(r1) <== NOT EXECUTED ffc3909c: 39 29 00 04 addi r9,r9,4 <== NOT EXECUTED ffc390a0: 91 21 00 0c stw r9,12(r1) <== NOT EXECUTED ffc390a4: 4b ff ff 44 b ffc38fe8 <== NOT EXECUTED * if a new process is exec()'ed. Since RTEMS does not support * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) ffc390a8: 81 41 00 0c lwz r10,12(r1) <== NOT EXECUTED ffc390ac: 39 2a 00 04 addi r9,r10,4 <== NOT EXECUTED ffc390b0: 91 21 00 0c stw r9,12(r1) <== NOT EXECUTED ffc390b4: 4b ff fe fc b ffc38fb0 <== NOT EXECUTED case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); ffc390b8: 81 41 00 10 lwz r10,16(r1) ffc390bc: 55 28 10 3a rlwinm r8,r9,2,0,29 ffc390c0: 39 29 00 01 addi r9,r9,1 ffc390c4: 7d 4a 42 14 add r10,r10,r8 ffc390c8: 99 21 00 08 stb r9,8(r1) ffc390cc: 4b ff fe 2c b ffc38ef8 int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); ffc390d0: 4b fe ff 29 bl ffc28ff8 <__errno> ffc390d4: 39 20 00 09 li r9,9 ffc390d8: 91 23 00 00 stw r9,0(r3) ffc390dc: 3b e0 ff ff li r31,-1 ffc390e0: 4b ff fd a0 b ffc38e80 */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; ffc390e4: 54 63 05 66 rlwinm r3,r3,0,21,19 ffc390e8: 90 7d 00 10 stw r3,16(r29) { rtems_libio_t *iop; int fd2; int flags; int mask; int ret = 0; ffc390ec: 3b e0 00 00 li r31,0 ffc390f0: 4b ff fe 40 b ffc38f30 */ rv = (*diop->pathinfo.handlers->open_h)( diop, NULL, oflag, 0 ); if ( rv == 0 ) { rv = diop - rtems_libio_iops; } else { rtems_libio_free( diop ); ffc390f4: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc390f8: 4b fd 17 21 bl ffc0a818 <== NOT EXECUTED ffc390fc: 4b ff fe 30 b ffc38f2c <== NOT EXECUTED =============================================================================== ffc110c0 : int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc110c0: 94 21 ff d0 stwu r1,-48(r1) ffc110c4: 7c 08 02 a6 mflr r0 ffc110c8: 93 e1 00 2c stw r31,44(r1) static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { ffc110cc: 3f e0 00 00 lis r31,0 ffc110d0: 81 3f 2a 20 lwz r9,10784(r31) int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc110d4: 93 81 00 20 stw r28,32(r1) ffc110d8: 7c 9c 23 78 mr r28,r4 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { ffc110dc: 2f 89 00 00 cmpwi cr7,r9,0 int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc110e0: 93 a1 00 24 stw r29,36(r1) ffc110e4: 7c 7d 1b 78 mr r29,r3 ffc110e8: 93 c1 00 28 stw r30,40(r1) static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { ffc110ec: 3b df 2a 20 addi r30,r31,10784 int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc110f0: 90 01 00 34 stw r0,52(r1) ffc110f4: 93 41 00 18 stw r26,24(r1) ffc110f8: 93 61 00 1c stw r27,28(r1) static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { ffc110fc: 41 9e 00 54 beq- cr7,ffc11150 rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc11100: 7d 23 4b 78 mr r3,r9 ffc11104: 38 80 00 00 li r4,0 ffc11108: 38 a0 00 00 li r5,0 ffc1110c: 4b ff a4 dd bl ffc0b5e8 } if (sc == RTEMS_SUCCESSFUL) { ffc11110: 2f 83 00 00 cmpwi cr7,r3,0 ffc11114: 40 9e 01 a8 bne- cr7,ffc112bc <== NEVER TAKEN err = pipe_lock(); if (err) return err; pipe = *pipep; ffc11118: 83 dd 00 00 lwz r30,0(r29) if (pipe == NULL) { ffc1111c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc11120: 41 9e 00 60 beq- cr7,ffc11180 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) ffc11124: 80 7e 00 28 lwz r3,40(r30) ffc11128: 38 80 00 00 li r4,0 ffc1112c: 38 a0 00 00 li r5,0 ffc11130: 4b ff a4 b9 bl ffc0b5e8 ffc11134: 2f 83 00 00 cmpwi cr7,r3,0 ffc11138: 41 9e 02 28 beq- cr7,ffc11360 <== ALWAYS TAKEN err = -EINTR; if (*pipep == NULL) { ffc1113c: 81 3d 00 00 lwz r9,0(r29) <== NOT EXECUTED ffc11140: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc11144: 41 9e 01 a8 beq- cr7,ffc112ec <== NOT EXECUTED if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; ffc11148: 3b c0 ff fc li r30,-4 <== NOT EXECUTED ffc1114c: 48 00 01 cc b ffc11318 <== NOT EXECUTED */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); ffc11150: 3f 60 00 00 lis r27,0 ffc11154: 80 7b 28 30 lwz r3,10288(r27) ffc11158: 38 80 00 00 li r4,0 ffc1115c: 38 a0 00 00 li r5,0 ffc11160: 4b ff a4 89 bl ffc0b5e8 rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { ffc11164: 81 3f 2a 20 lwz r9,10784(r31) ffc11168: 2f 89 00 00 cmpwi cr7,r9,0 ffc1116c: 41 9e 01 20 beq- cr7,ffc1128c <== ALWAYS TAKEN } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc11170: 80 7b 28 30 lwz r3,10288(r27) <== NOT EXECUTED ffc11174: 4b ff a6 15 bl ffc0b788 <== NOT EXECUTED ffc11178: 81 3f 2a 20 lwz r9,10784(r31) <== NOT EXECUTED ffc1117c: 4b ff ff 84 b ffc11100 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); ffc11180: 38 60 00 34 li r3,52 ffc11184: 4b ff 52 81 bl ffc06404 if (pipe == NULL) ffc11188: 7c 7e 1b 79 mr. r30,r3 ffc1118c: 41 82 01 c4 beq- ffc11350 <== NEVER TAKEN return err; memset(pipe, 0, sizeof(pipe_control_t)); ffc11190: 38 80 00 00 li r4,0 ffc11194: 38 a0 00 34 li r5,52 ffc11198: 48 00 58 cd bl ffc16a64 pipe->Size = PIPE_BUF; ffc1119c: 39 20 02 00 li r9,512 ffc111a0: 91 3e 00 04 stw r9,4(r30) pipe->Buffer = malloc(pipe->Size); ffc111a4: 38 60 02 00 li r3,512 ffc111a8: 4b ff 52 5d bl ffc06404 if (! pipe->Buffer) ffc111ac: 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); ffc111b0: 90 7e 00 00 stw r3,0(r30) if (! pipe->Buffer) ffc111b4: 41 9e 01 94 beq- cr7,ffc11348 <== NEVER TAKEN goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), ffc111b8: 3f 60 00 00 lis r27,0 ffc111bc: 88 7b 22 14 lbz r3,8724(r27) if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( ffc111c0: 38 80 00 00 li r4,0 ffc111c4: 38 a0 00 00 li r5,0 ffc111c8: 64 63 50 49 oris r3,r3,20553 ffc111cc: 60 63 72 00 ori r3,r3,29184 ffc111d0: 38 de 00 2c addi r6,r30,44 ffc111d4: 48 00 1d b5 bl ffc12f88 ffc111d8: 2f 83 00 00 cmpwi cr7,r3,0 ffc111dc: 40 9e 01 64 bne- cr7,ffc11340 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), ffc111e0: 88 7b 22 14 lbz r3,8724(r27) if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( ffc111e4: 38 80 00 00 li r4,0 ffc111e8: 38 a0 00 00 li r5,0 ffc111ec: 64 63 50 49 oris r3,r3,20553 ffc111f0: 60 63 77 00 ori r3,r3,30464 ffc111f4: 38 de 00 30 addi r6,r30,48 ffc111f8: 48 00 1d 91 bl ffc12f88 ffc111fc: 2f 83 00 00 cmpwi cr7,r3,0 ffc11200: 40 9e 01 38 bne- cr7,ffc11338 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, ffc11204: 88 7b 22 14 lbz r3,8724(r27) if (rtems_barrier_create( rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( ffc11208: 38 80 00 01 li r4,1 ffc1120c: 38 a0 00 10 li r5,16 ffc11210: 64 63 50 49 oris r3,r3,20553 ffc11214: 60 63 73 00 ori r3,r3,29440 ffc11218: 38 c0 00 00 li r6,0 ffc1121c: 38 fe 00 28 addi r7,r30,40 ffc11220: 4b ff a0 b5 bl ffc0b2d4 ffc11224: 2f 83 00 00 cmpwi cr7,r3,0 ffc11228: 40 9e 01 08 bne- cr7,ffc11330 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) ffc1122c: 3f 40 00 00 lis r26,0 ffc11230: 80 9e 00 2c lwz r4,44(r30) ffc11234: 3b 5a 35 9c addi r26,r26,13724 ffc11238: 38 a1 00 08 addi r5,r1,8 ffc1123c: 7f 43 d3 78 mr r3,r26 ffc11240: 4b ff c4 09 bl ffc0d648 <_Objects_Get> static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; ffc11244: 81 23 00 4c lwz r9,76(r3) ffc11248: 65 29 10 00 oris r9,r9,4096 ffc1124c: 91 23 00 4c stw r9,76(r3) _Thread_Enable_dispatch(); ffc11250: 4b ff d4 49 bl ffc0e698 <_Thread_Enable_dispatch> ffc11254: 80 9e 00 30 lwz r4,48(r30) ffc11258: 38 a1 00 08 addi r5,r1,8 ffc1125c: 7f 43 d3 78 mr r3,r26 ffc11260: 4b ff c3 e9 bl ffc0d648 <_Objects_Get> _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; ffc11264: 81 23 00 4c lwz r9,76(r3) ffc11268: 65 29 10 00 oris r9,r9,4096 ffc1126c: 91 23 00 4c stw r9,76(r3) _Thread_Enable_dispatch(); ffc11270: 4b ff d4 29 bl ffc0e698 <_Thread_Enable_dispatch> #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') ffc11274: 89 3b 22 14 lbz r9,8724(r27) ffc11278: 2f 89 00 7a cmpwi cr7,r9,122 ffc1127c: 41 9e 00 a8 beq- cr7,ffc11324 ffc11280: 39 29 00 01 addi r9,r9,1 ffc11284: 99 3b 22 14 stb r9,8724(r27) ffc11288: 4b ff fe 9c b ffc11124 if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { sc = rtems_semaphore_create( ffc1128c: 3c 60 50 49 lis r3,20553 ffc11290: 7f c7 f3 78 mr r7,r30 ffc11294: 38 80 00 01 li r4,1 ffc11298: 38 a0 00 54 li r5,84 ffc1129c: 38 c0 00 00 li r6,0 ffc112a0: 60 63 50 45 ori r3,r3,20549 ffc112a4: 4b ff a0 31 bl ffc0b2d4 ffc112a8: 7c 7e 1b 78 mr r30,r3 ffc112ac: 80 7b 28 30 lwz r3,10288(r27) ffc112b0: 4b ff a4 d9 bl ffc0b788 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { ffc112b4: 2f 9e 00 00 cmpwi cr7,r30,0 ffc112b8: 41 9e 00 a0 beq- cr7,ffc11358 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); err = -ENXIO; ffc112bc: 3b c0 ff f4 li r30,-12 return 0; out_error: pipe_release(pipep, iop); return err; } ffc112c0: 80 01 00 34 lwz r0,52(r1) ffc112c4: 7f c3 f3 78 mr r3,r30 ffc112c8: 83 41 00 18 lwz r26,24(r1) ffc112cc: 7c 08 03 a6 mtlr r0 ffc112d0: 83 61 00 1c lwz r27,28(r1) ffc112d4: 83 81 00 20 lwz r28,32(r1) ffc112d8: 83 a1 00 24 lwz r29,36(r1) ffc112dc: 83 c1 00 28 lwz r30,40(r1) ffc112e0: 83 e1 00 2c lwz r31,44(r1) ffc112e4: 38 21 00 30 addi r1,r1,48 ffc112e8: 4e 80 00 20 blr /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); ffc112ec: 80 7e 00 2c lwz r3,44(r30) <== NOT EXECUTED ffc112f0: 48 00 1d a9 bl ffc13098 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); ffc112f4: 80 7e 00 30 lwz r3,48(r30) <== NOT EXECUTED ffc112f8: 48 00 1d a1 bl ffc13098 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); ffc112fc: 80 7e 00 28 lwz r3,40(r30) <== NOT EXECUTED ffc11300: 4b ff a1 f5 bl ffc0b4f4 <== NOT EXECUTED free(pipe->Buffer); ffc11304: 80 7e 00 00 lwz r3,0(r30) <== NOT EXECUTED ffc11308: 4b ff 4b 7d bl ffc05e84 <== NOT EXECUTED free(pipe); ffc1130c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc11310: 4b ff 4b 75 bl ffc05e84 <== NOT EXECUTED if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; ffc11314: 3b c0 ff fc li r30,-4 <== NOT EXECUTED #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); ffc11318: 80 7f 2a 20 lwz r3,10784(r31) ffc1131c: 4b ff a4 6d bl ffc0b788 ffc11320: 4b ff ff a0 b ffc112c0 pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') c = 'a'; ffc11324: 39 20 00 61 li r9,97 ffc11328: 99 3b 22 14 stb r9,8724(r27) ffc1132c: 4b ff fd f8 b ffc11124 return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); ffc11330: 80 7e 00 30 lwz r3,48(r30) ffc11334: 48 00 1d 65 bl ffc13098 err_wbar: rtems_barrier_delete(pipe->readBarrier); ffc11338: 80 7e 00 2c lwz r3,44(r30) ffc1133c: 48 00 1d 5d bl ffc13098 err_rbar: free(pipe->Buffer); ffc11340: 80 7e 00 00 lwz r3,0(r30) ffc11344: 4b ff 4b 41 bl ffc05e84 err_buf: free(pipe); ffc11348: 7f c3 f3 78 mr r3,r30 ffc1134c: 4b ff 4b 39 bl ffc05e84 if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; ffc11350: 3b c0 ff f4 li r30,-12 ffc11354: 4b ff ff c4 b ffc11318 ffc11358: 81 3f 2a 20 lwz r9,10784(r31) ffc1135c: 4b ff fd a4 b ffc11100 if (*pipep == NULL) { ffc11360: 81 3d 00 00 lwz r9,0(r29) ffc11364: 2f 89 00 00 cmpwi cr7,r9,0 ffc11368: 40 be 00 08 bne+ cr7,ffc11370 if (err) pipe_free(pipe); else *pipep = pipe; ffc1136c: 93 dd 00 00 stw r30,0(r29) #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); ffc11370: 80 7f 2a 20 lwz r3,10784(r31) ffc11374: 4b ff a4 15 bl ffc0b788 err = pipe_new(pipep); if (err) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { ffc11378: 81 3c 00 10 lwz r9,16(r28) int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; ffc1137c: 83 fd 00 00 lwz r31,0(r29) switch (LIBIO_ACCMODE(iop)) { ffc11380: 55 29 07 7c rlwinm r9,r9,0,29,30 ffc11384: 2f 89 00 04 cmpwi cr7,r9,4 ffc11388: 41 9e 00 4c beq- cr7,ffc113d4 ffc1138c: 2f 89 00 06 cmpwi cr7,r9,6 ffc11390: 41 9e 01 5c beq- cr7,ffc114ec ffc11394: 2f 89 00 02 cmpwi cr7,r9,2 ffc11398: 41 9e 00 d0 beq- cr7,ffc11468 <== ALWAYS TAKEN if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); ffc1139c: 80 7f 00 28 lwz r3,40(r31) return 0; ffc113a0: 3b c0 00 00 li r30,0 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); ffc113a4: 4b ff a3 e5 bl ffc0b788 return 0; out_error: pipe_release(pipep, iop); return err; } ffc113a8: 80 01 00 34 lwz r0,52(r1) ffc113ac: 7f c3 f3 78 mr r3,r30 ffc113b0: 83 41 00 18 lwz r26,24(r1) ffc113b4: 7c 08 03 a6 mtlr r0 ffc113b8: 83 61 00 1c lwz r27,28(r1) ffc113bc: 83 81 00 20 lwz r28,32(r1) ffc113c0: 83 a1 00 24 lwz r29,36(r1) ffc113c4: 83 c1 00 28 lwz r30,40(r1) ffc113c8: 83 e1 00 2c lwz r31,44(r1) ffc113cc: 38 21 00 30 addi r1,r1,48 ffc113d0: 4e 80 00 20 blr break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) ffc113d4: 81 3f 00 14 lwz r9,20(r31) } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; ffc113d8: 81 5f 00 24 lwz r10,36(r31) if (pipe->Writers ++ == 0) ffc113dc: 2f 89 00 00 cmpwi cr7,r9,0 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; ffc113e0: 39 4a 00 01 addi r10,r10,1 if (pipe->Writers ++ == 0) ffc113e4: 39 29 00 01 addi r9,r9,1 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; ffc113e8: 91 5f 00 24 stw r10,36(r31) if (pipe->Writers ++ == 0) ffc113ec: 91 3f 00 14 stw r9,20(r31) ffc113f0: 41 9e 01 6c beq- cr7,ffc1155c <== ALWAYS TAKEN PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { ffc113f4: 81 3f 00 10 lwz r9,16(r31) ffc113f8: 2f 89 00 00 cmpwi cr7,r9,0 ffc113fc: 40 be ff a0 bne- cr7,ffc1139c ffc11400: 81 3c 00 10 lwz r9,16(r28) ffc11404: 71 2a 00 01 andi. r10,r9,1 ffc11408: 40 82 01 64 bne- ffc1156c err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; ffc1140c: 83 df 00 20 lwz r30,32(r31) ffc11410: 48 00 00 20 b ffc11430 err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) ffc11414: 80 7f 00 28 lwz r3,40(r31) ffc11418: 4b ff a1 d1 bl ffc0b5e8 ffc1141c: 2f 83 00 00 cmpwi cr7,r3,0 ffc11420: 40 9e 00 34 bne- cr7,ffc11454 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->readerCounter); ffc11424: 81 3f 00 20 lwz r9,32(r31) ffc11428: 7f 89 f0 00 cmpw cr7,r9,r30 ffc1142c: 40 be ff 70 bne- cr7,ffc1139c <== ALWAYS TAKEN if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); ffc11430: 80 7f 00 28 lwz r3,40(r31) ffc11434: 4b ff a3 55 bl ffc0b788 if (! PIPE_WRITEWAIT(pipe)) ffc11438: 80 7f 00 30 lwz r3,48(r31) ffc1143c: 38 80 00 00 li r4,0 ffc11440: 48 00 1d b9 bl ffc131f8 goto out_error; if (! PIPE_LOCK(pipe)) ffc11444: 38 80 00 00 li r4,0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ffc11448: 2f 83 00 00 cmpwi cr7,r3,0 goto out_error; if (! PIPE_LOCK(pipe)) ffc1144c: 38 a0 00 00 li r5,0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ffc11450: 41 9e ff c4 beq+ cr7,ffc11414 <== ALWAYS TAKEN /* Not an error */ if (LIBIO_NODELAY(iop)) break; prevCounter = pipe->writerCounter; err = -EINTR; ffc11454: 3b c0 ff fc li r30,-4 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); ffc11458: 7f a3 eb 78 mr r3,r29 ffc1145c: 7f 84 e3 78 mr r4,r28 ffc11460: 4b ff fb 09 bl ffc10f68 return err; ffc11464: 4b ff fe 5c b ffc112c0 pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) ffc11468: 81 3f 00 10 lwz r9,16(r31) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc1146c: 81 5f 00 20 lwz r10,32(r31) if (pipe->Readers ++ == 0) ffc11470: 2f 89 00 00 cmpwi cr7,r9,0 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc11474: 39 4a 00 01 addi r10,r10,1 if (pipe->Readers ++ == 0) ffc11478: 39 29 00 01 addi r9,r9,1 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc1147c: 91 5f 00 20 stw r10,32(r31) if (pipe->Readers ++ == 0) ffc11480: 91 3f 00 10 stw r9,16(r31) ffc11484: 41 9e 00 b8 beq- cr7,ffc1153c <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { ffc11488: 81 3f 00 14 lwz r9,20(r31) ffc1148c: 2f 89 00 00 cmpwi cr7,r9,0 ffc11490: 40 be ff 0c bne- cr7,ffc1139c /* Not an error */ if (LIBIO_NODELAY(iop)) ffc11494: 81 3c 00 10 lwz r9,16(r28) ffc11498: 71 2a 00 01 andi. r10,r9,1 ffc1149c: 40 a2 ff 00 bne- ffc1139c break; prevCounter = pipe->writerCounter; ffc114a0: 83 df 00 24 lwz r30,36(r31) ffc114a4: 48 00 00 20 b ffc114c4 /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) ffc114a8: 80 7f 00 28 lwz r3,40(r31) ffc114ac: 4b ff a1 3d bl ffc0b5e8 ffc114b0: 2f 83 00 00 cmpwi cr7,r3,0 ffc114b4: 40 be ff a0 bne- cr7,ffc11454 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->writerCounter); ffc114b8: 81 3f 00 24 lwz r9,36(r31) ffc114bc: 7f 89 f0 00 cmpw cr7,r9,r30 ffc114c0: 40 be fe dc bne- cr7,ffc1139c <== ALWAYS TAKEN prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); ffc114c4: 80 7f 00 28 lwz r3,40(r31) ffc114c8: 4b ff a2 c1 bl ffc0b788 if (! PIPE_READWAIT(pipe)) ffc114cc: 80 7f 00 2c lwz r3,44(r31) ffc114d0: 38 80 00 00 li r4,0 ffc114d4: 48 00 1d 25 bl ffc131f8 goto out_error; if (! PIPE_LOCK(pipe)) ffc114d8: 38 80 00 00 li r4,0 prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ffc114dc: 2f 83 00 00 cmpwi cr7,r3,0 goto out_error; if (! PIPE_LOCK(pipe)) ffc114e0: 38 a0 00 00 li r5,0 prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ffc114e4: 41 9e ff c4 beq+ cr7,ffc114a8 <== ALWAYS TAKEN ffc114e8: 4b ff ff 6c b ffc11454 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) ffc114ec: 81 3f 00 10 lwz r9,16(r31) } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc114f0: 81 5f 00 20 lwz r10,32(r31) if (pipe->Readers ++ == 0) ffc114f4: 2f 89 00 00 cmpwi cr7,r9,0 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc114f8: 39 4a 00 01 addi r10,r10,1 if (pipe->Readers ++ == 0) ffc114fc: 39 29 00 01 addi r9,r9,1 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc11500: 91 5f 00 20 stw r10,32(r31) if (pipe->Readers ++ == 0) ffc11504: 91 3f 00 10 stw r9,16(r31) ffc11508: 41 9e 00 44 beq- cr7,ffc1154c <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) ffc1150c: 81 3f 00 14 lwz r9,20(r31) case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; ffc11510: 81 5f 00 24 lwz r10,36(r31) if (pipe->Writers ++ == 0) ffc11514: 2f 89 00 00 cmpwi cr7,r9,0 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; ffc11518: 39 4a 00 01 addi r10,r10,1 if (pipe->Writers ++ == 0) ffc1151c: 39 29 00 01 addi r9,r9,1 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; ffc11520: 91 5f 00 24 stw r10,36(r31) if (pipe->Writers ++ == 0) ffc11524: 91 3f 00 14 stw r9,20(r31) ffc11528: 40 9e fe 74 bne+ cr7,ffc1139c <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); ffc1152c: 80 7f 00 2c lwz r3,44(r31) ffc11530: 38 81 00 0c addi r4,r1,12 ffc11534: 48 00 1c 2d bl ffc13160 ffc11538: 4b ff fe 64 b ffc1139c switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); ffc1153c: 80 7f 00 30 lwz r3,48(r31) ffc11540: 38 81 00 0c addi r4,r1,12 ffc11544: 48 00 1c 1d bl ffc13160 ffc11548: 4b ff ff 40 b ffc11488 break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); ffc1154c: 80 7f 00 30 lwz r3,48(r31) ffc11550: 38 81 00 0c addi r4,r1,12 ffc11554: 48 00 1c 0d bl ffc13160 ffc11558: 4b ff ff b4 b ffc1150c case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); ffc1155c: 80 7f 00 2c lwz r3,44(r31) ffc11560: 38 81 00 0c addi r4,r1,12 ffc11564: 48 00 1b fd bl ffc13160 ffc11568: 4b ff fe 8c b ffc113f4 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); ffc1156c: 80 7f 00 28 lwz r3,40(r31) err = -ENXIO; ffc11570: 3b c0 ff fa li r30,-6 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); ffc11574: 4b ff a2 15 bl ffc0b788 err = -ENXIO; goto out_error; ffc11578: 4b ff fe e0 b ffc11458 =============================================================================== ffc0c45c : { long return_value; rtems_libio_t *iop; const rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); ffc0c45c: 3d 20 00 00 lis r9,0 */ long fpathconf( int fd, int name ) { ffc0c460: 94 21 ff f8 stwu r1,-8(r1) ffc0c464: 7c 08 02 a6 mflr r0 long return_value; rtems_libio_t *iop; const rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); ffc0c468: 81 29 27 3c lwz r9,10044(r9) */ long fpathconf( int fd, int name ) { ffc0c46c: 90 01 00 0c stw r0,12(r1) long return_value; rtems_libio_t *iop; const rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); ffc0c470: 7f 83 48 40 cmplw cr7,r3,r9 ffc0c474: 40 9c 00 cc bge- cr7,ffc0c540 iop = rtems_libio_iop(fd); ffc0c478: 3d 20 00 00 lis r9,0 ffc0c47c: 81 29 27 ec lwz r9,10220(r9) ffc0c480: 1c 63 00 38 mulli r3,r3,56 ffc0c484: 7c 69 1a 14 add r3,r9,r3 rtems_libio_check_is_open(iop); ffc0c488: 81 23 00 10 lwz r9,16(r3) ffc0c48c: 71 2a 01 00 andi. r10,r9,256 ffc0c490: 41 82 00 b0 beq- ffc0c540 <== NEVER TAKEN * Now process the information request. */ the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { ffc0c494: 2b 84 00 0b cmplwi cr7,r4,11 /* * Now process the information request. */ the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options; ffc0c498: 81 23 00 28 lwz r9,40(r3) ffc0c49c: 81 29 00 2c lwz r9,44(r9) switch ( name ) { ffc0c4a0: 40 9d 00 24 ble- cr7,ffc0c4c4 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc0c4a4: 48 00 2a 99 bl ffc0ef3c <__errno> ffc0c4a8: 39 20 00 16 li r9,22 ffc0c4ac: 91 23 00 00 stw r9,0(r3) ffc0c4b0: 38 60 ff ff li r3,-1 break; } return return_value; } ffc0c4b4: 80 01 00 0c lwz r0,12(r1) ffc0c4b8: 38 21 00 08 addi r1,r1,8 ffc0c4bc: 7c 08 03 a6 mtlr r0 ffc0c4c0: 4e 80 00 20 blr * Now process the information request. */ the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { ffc0c4c4: 3d 40 ff c1 lis r10,-63 ffc0c4c8: 39 4a 5b 1c addi r10,r10,23324 ffc0c4cc: 54 84 10 3a rlwinm r4,r4,2,0,29 ffc0c4d0: 7d 0a 20 2e lwzx r8,r10,r4 ffc0c4d4: 7d 48 52 14 add r10,r8,r10 ffc0c4d8: 7d 49 03 a6 mtctr r10 ffc0c4dc: 4e 80 04 20 bctr break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; ffc0c4e0: 80 69 00 24 lwz r3,36(r9) break; ffc0c4e4: 4b ff ff d0 b ffc0c4b4 break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; ffc0c4e8: 80 69 00 18 lwz r3,24(r9) break; ffc0c4ec: 4b ff ff c8 b ffc0c4b4 break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; ffc0c4f0: 80 69 00 2c lwz r3,44(r9) break; ffc0c4f4: 4b ff ff c0 b ffc0c4b4 break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; ffc0c4f8: 80 69 00 20 lwz r3,32(r9) break; ffc0c4fc: 4b ff ff b8 b ffc0c4b4 break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; ffc0c500: 80 69 00 1c lwz r3,28(r9) break; ffc0c504: 4b ff ff b0 b ffc0c4b4 break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; ffc0c508: 80 69 00 14 lwz r3,20(r9) break; ffc0c50c: 4b ff ff a8 b ffc0c4b4 break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; ffc0c510: 80 69 00 10 lwz r3,16(r9) break; ffc0c514: 4b ff ff a0 b ffc0c4b4 break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; ffc0c518: 80 69 00 0c lwz r3,12(r9) break; ffc0c51c: 4b ff ff 98 b ffc0c4b4 break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; ffc0c520: 80 69 00 08 lwz r3,8(r9) break; ffc0c524: 4b ff ff 90 b ffc0c4b4 switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; ffc0c528: 80 69 00 04 lwz r3,4(r9) break; ffc0c52c: 4b ff ff 88 b ffc0c4b4 the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; ffc0c530: 80 69 00 00 lwz r3,0(r9) break; ffc0c534: 4b ff ff 80 b ffc0c4b4 break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; ffc0c538: 80 69 00 28 lwz r3,40(r9) break; ffc0c53c: 4b ff ff 78 b ffc0c4b4 rtems_libio_t *iop; const rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); ffc0c540: 48 00 29 fd bl ffc0ef3c <__errno> ffc0c544: 39 20 00 09 li r9,9 ffc0c548: 91 23 00 00 stw r9,0(r3) ffc0c54c: 38 60 ff ff li r3,-1 ffc0c550: 4b ff ff 64 b ffc0c4b4 =============================================================================== ffc04b68 : #include void free( void *ptr ) { ffc04b68: 94 21 ff f0 stwu r1,-16(r1) ffc04b6c: 7c 08 02 a6 mflr r0 MSBUMP(free_calls, 1); ffc04b70: 3d 20 00 00 lis r9,0 #include void free( void *ptr ) { ffc04b74: 90 01 00 14 stw r0,20(r1) MSBUMP(free_calls, 1); ffc04b78: 39 29 2b a0 addi r9,r9,11168 #include void free( void *ptr ) { ffc04b7c: 93 e1 00 0c stw r31,12(r1) MSBUMP(free_calls, 1); if ( !ptr ) ffc04b80: 7c 7f 1b 79 mr. r31,r3 void free( void *ptr ) { MSBUMP(free_calls, 1); ffc04b84: 81 49 00 0c lwz r10,12(r9) #include void free( void *ptr ) { ffc04b88: 93 c1 00 08 stw r30,8(r1) MSBUMP(free_calls, 1); ffc04b8c: 39 4a 00 01 addi r10,r10,1 ffc04b90: 91 49 00 0c stw r10,12(r9) if ( !ptr ) ffc04b94: 41 82 00 4c beq- ffc04be0 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && ffc04b98: 3d 20 00 00 lis r9,0 ffc04b9c: 81 29 28 90 lwz r9,10384(r9) ffc04ba0: 2f 89 00 03 cmpwi cr7,r9,3 ffc04ba4: 41 9e 00 88 beq- cr7,ffc04c2c <== ALWAYS TAKEN } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) ffc04ba8: 3d 20 00 00 lis r9,0 ffc04bac: 81 29 28 08 lwz r9,10248(r9) ffc04bb0: 2f 89 00 00 cmpwi cr7,r9,0 ffc04bb4: 41 9e 00 14 beq- cr7,ffc04bc8 (*rtems_malloc_statistics_helpers->at_free)(ptr); ffc04bb8: 81 29 00 08 lwz r9,8(r9) ffc04bbc: 7f e3 fb 78 mr r3,r31 ffc04bc0: 7d 29 03 a6 mtctr r9 ffc04bc4: 4e 80 04 21 bctrl if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { ffc04bc8: 3f c0 00 00 lis r30,0 ffc04bcc: 80 7e 27 90 lwz r3,10128(r30) ffc04bd0: 7f e4 fb 78 mr r4,r31 ffc04bd4: 48 00 71 dd bl ffc0bdb0 <_Protected_heap_Free> ffc04bd8: 2f 83 00 00 cmpwi cr7,r3,0 ffc04bdc: 41 9e 00 1c beq- cr7,ffc04bf8 RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } ffc04be0: 80 01 00 14 lwz r0,20(r1) ffc04be4: 83 c1 00 08 lwz r30,8(r1) ffc04be8: 7c 08 03 a6 mtlr r0 ffc04bec: 83 e1 00 0c lwz r31,12(r1) ffc04bf0: 38 21 00 10 addi r1,r1,16 ffc04bf4: 4e 80 00 20 blr ffc04bf8: 80 01 00 14 lwz r0,20(r1) */ 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", ffc04bfc: 3c 60 ff c2 lis r3,-62 ptr, RTEMS_Malloc_Heap->area_begin, ffc04c00: 81 3e 27 90 lwz r9,10128(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", ffc04c04: 7f e4 fb 78 mr r4,r31 RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } ffc04c08: 7c 08 03 a6 mtlr r0 ffc04c0c: 83 c1 00 08 lwz r30,8(r1) ffc04c10: 83 e1 00 0c lwz r31,12(r1) */ 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", ffc04c14: 38 63 fc b8 addi r3,r3,-840 ffc04c18: 80 a9 00 18 lwz r5,24(r9) ffc04c1c: 80 c9 00 1c lwz r6,28(r9) RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } ffc04c20: 38 21 00 10 addi r1,r1,16 */ 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", ffc04c24: 4c c6 31 82 crclr 4*cr1+eq ffc04c28: 48 00 10 a0 b ffc05cc8 /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { ffc04c2c: 48 00 01 d9 bl ffc04e04 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && ffc04c30: 2f 83 00 00 cmpwi cr7,r3,0 ffc04c34: 40 9e ff 74 bne+ cr7,ffc04ba8 RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } ffc04c38: 80 01 00 14 lwz r0,20(r1) /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); ffc04c3c: 7f e3 fb 78 mr r3,r31 RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } ffc04c40: 83 c1 00 08 lwz r30,8(r1) ffc04c44: 7c 08 03 a6 mtlr r0 ffc04c48: 83 e1 00 0c lwz r31,12(r1) ffc04c4c: 38 21 00 10 addi r1,r1,16 /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); ffc04c50: 48 00 02 24 b ffc04e74 =============================================================================== ffc1dba8 : int fstat( int fd, struct stat *sbuf ) { ffc1dba8: 94 21 ff f0 stwu r1,-16(r1) ffc1dbac: 7c 08 02 a6 mflr r0 ffc1dbb0: 93 e1 00 0c stw r31,12(r1) rtems_libio_t *iop; /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) ffc1dbb4: 7c 9f 23 79 mr. r31,r4 int fstat( int fd, struct stat *sbuf ) { ffc1dbb8: 90 01 00 14 stw r0,20(r1) ffc1dbbc: 93 c1 00 08 stw r30,8(r1) rtems_libio_t *iop; /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) ffc1dbc0: 41 82 00 94 beq- ffc1dc54 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); ffc1dbc4: 3d 20 00 00 lis r9,0 ffc1dbc8: 81 29 27 98 lwz r9,10136(r9) ffc1dbcc: 7f 83 48 40 cmplw cr7,r3,r9 ffc1dbd0: 40 9c 00 5c bge- cr7,ffc1dc2c ffc1dbd4: 3d 20 00 00 lis r9,0 ffc1dbd8: 83 c9 28 4c lwz r30,10316(r9) ffc1dbdc: 1c 63 00 38 mulli r3,r3,56 ffc1dbe0: 7f de 1a 14 add r30,r30,r3 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); ffc1dbe4: 81 3e 00 10 lwz r9,16(r30) ffc1dbe8: 71 2a 01 00 andi. r10,r9,256 ffc1dbec: 41 82 00 40 beq- ffc1dc2c /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); ffc1dbf0: 38 80 00 00 li r4,0 ffc1dbf4: 7f e3 fb 78 mr r3,r31 ffc1dbf8: 38 a0 00 48 li r5,72 ffc1dbfc: 4b ff 62 75 bl ffc13e70 return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); ffc1dc00: 81 3e 00 24 lwz r9,36(r30) } ffc1dc04: 80 01 00 14 lwz r0,20(r1) * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); ffc1dc08: 38 7e 00 14 addi r3,r30,20 ffc1dc0c: 81 29 00 18 lwz r9,24(r9) ffc1dc10: 7f e4 fb 78 mr r4,r31 } ffc1dc14: 7c 08 03 a6 mtlr r0 ffc1dc18: 83 c1 00 08 lwz r30,8(r1) * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); ffc1dc1c: 7d 29 03 a6 mtctr r9 } ffc1dc20: 83 e1 00 0c lwz r31,12(r1) ffc1dc24: 38 21 00 10 addi r1,r1,16 * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); ffc1dc28: 4e 80 04 20 bctr /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); ffc1dc2c: 4b ff 54 4d bl ffc13078 <__errno> ffc1dc30: 39 20 00 09 li r9,9 ffc1dc34: 91 23 00 00 stw r9,0(r3) * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); } ffc1dc38: 80 01 00 14 lwz r0,20(r1) ffc1dc3c: 38 60 ff ff li r3,-1 ffc1dc40: 83 c1 00 08 lwz r30,8(r1) ffc1dc44: 7c 08 03 a6 mtlr r0 ffc1dc48: 83 e1 00 0c lwz r31,12(r1) ffc1dc4c: 38 21 00 10 addi r1,r1,16 ffc1dc50: 4e 80 00 20 blr /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); ffc1dc54: 4b ff 54 25 bl ffc13078 <__errno> <== NOT EXECUTED ffc1dc58: 39 20 00 0e li r9,14 <== NOT EXECUTED ffc1dc5c: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED ffc1dc60: 4b ff ff d8 b ffc1dc38 <== NOT EXECUTED =============================================================================== ffc04588 : 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) { ffc04588: 3d 20 00 00 lis r9,0 ffc0458c: 81 49 28 e0 lwz r10,10464(r9) ffc04590: 39 29 28 e0 addi r9,r9,10464 ffc04594: 7f 8a 18 40 cmplw cr7,r10,r3 ffc04598: 40 9d 00 64 ble- cr7,ffc045fc <== NEVER TAKEN ffc0459c: 81 29 00 04 lwz r9,4(r9) ffc045a0: 2f 89 00 00 cmpwi cr7,r9,0 ffc045a4: 41 9e 00 58 beq- cr7,ffc045fc <== NEVER TAKEN rtems_disk_device_table *dtab = disktab + major; ffc045a8: 54 63 18 38 rlwinm r3,r3,3,0,28 ffc045ac: 7d 49 1a 14 add r10,r9,r3 if (minor < dtab->size && dtab->minor != NULL) { ffc045b0: 81 4a 00 04 lwz r10,4(r10) ffc045b4: 7f 8a 20 40 cmplw cr7,r10,r4 ffc045b8: 40 9d 00 44 ble- cr7,ffc045fc <== NEVER TAKEN ffc045bc: 7d 29 18 2e lwzx r9,r9,r3 ffc045c0: 2f 89 00 00 cmpwi cr7,r9,0 ffc045c4: 41 9e 00 38 beq- cr7,ffc045fc <== NEVER TAKEN rtems_disk_device *dd = dtab->minor [minor]; ffc045c8: 54 84 10 3a rlwinm r4,r4,2,0,29 ffc045cc: 7c 69 20 2e lwzx r3,r9,r4 if (dd != NULL && !lookup_only) { ffc045d0: 2f 83 00 00 cmpwi cr7,r3,0 ffc045d4: 4d 9e 00 20 beqlr cr7 ffc045d8: 2f 85 00 00 cmpwi cr7,r5,0 ffc045dc: 4c 9e 00 20 bnelr cr7 if (!dd->deleted) { ffc045e0: 89 23 00 40 lbz r9,64(r3) ffc045e4: 2f 89 00 00 cmpwi cr7,r9,0 ffc045e8: 40 9e 00 14 bne- cr7,ffc045fc ++dd->uses; ffc045ec: 81 23 00 14 lwz r9,20(r3) ffc045f0: 39 29 00 01 addi r9,r9,1 ffc045f4: 91 23 00 14 stw r9,20(r3) ffc045f8: 4e 80 00 20 blr return dd; } } return NULL; ffc045fc: 38 60 00 00 li r3,0 } ffc04600: 4e 80 00 20 blr =============================================================================== ffc067c4 : * NOTES: * get_sector() operates with device via bdbuf library, * and does not support devices with sector size other than 512 bytes */ static rtems_status_code get_sector(int fd, ffc067c4: 94 21 ff e8 stwu r1,-24(r1) ffc067c8: 7c 08 02 a6 mflr r0 ffc067cc: 93 c1 00 10 stw r30,16(r1) ffc067d0: 7c 7e 1b 78 mr r30,r3 new_off = lseek(fd, off, SEEK_SET); if (new_off != off) { return RTEMS_IO_ERROR; } s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE); ffc067d4: 38 60 02 04 li r3,516 * NOTES: * get_sector() operates with device via bdbuf library, * and does not support devices with sector size other than 512 bytes */ static rtems_status_code get_sector(int fd, ffc067d8: 93 81 00 08 stw r28,8(r1) ffc067dc: 7c 9c 23 78 mr r28,r4 ffc067e0: 93 a1 00 0c stw r29,12(r1) ffc067e4: 7c bd 2b 78 mr r29,r5 ffc067e8: 93 e1 00 14 stw r31,20(r1) ffc067ec: 90 01 00 1c stw r0,28(r1) new_off = lseek(fd, off, SEEK_SET); if (new_off != off) { return RTEMS_IO_ERROR; } s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE); ffc067f0: 48 00 19 7d bl ffc0816c if (s == NULL) ffc067f4: 7c 7f 1b 79 mr. r31,r3 ffc067f8: 41 82 00 48 beq- ffc06840 <== NEVER TAKEN { return RTEMS_NO_MEMORY; } n = read(fd, s->data, RTEMS_IDE_SECTOR_SIZE); ffc067fc: 7f c3 f3 78 mr r3,r30 ffc06800: 38 9f 00 04 addi r4,r31,4 ffc06804: 38 a0 02 00 li r5,512 ffc06808: 48 00 26 81 bl ffc08e88 if (n != RTEMS_IDE_SECTOR_SIZE) ffc0680c: 2f 83 02 00 cmpwi cr7,r3,512 ffc06810: 41 9e 00 54 beq- cr7,ffc06864 <== ALWAYS TAKEN { free(s); ffc06814: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc06818: 48 00 11 bd bl ffc079d4 <== NOT EXECUTED s->sector_num = sector_num; *sector = s; return RTEMS_SUCCESSFUL; } ffc0681c: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc06820: 83 81 00 08 lwz r28,8(r1) <== NOT EXECUTED n = read(fd, s->data, RTEMS_IDE_SECTOR_SIZE); if (n != RTEMS_IDE_SECTOR_SIZE) { free(s); return RTEMS_IO_ERROR; ffc06824: 38 60 00 1b li r3,27 <== NOT EXECUTED s->sector_num = sector_num; *sector = s; return RTEMS_SUCCESSFUL; } ffc06828: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0682c: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc06830: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc06834: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc06838: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc0683c: 4e 80 00 20 blr <== NOT EXECUTED ffc06840: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED } s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE); if (s == NULL) { return RTEMS_NO_MEMORY; ffc06844: 38 60 00 1a li r3,26 <== NOT EXECUTED s->sector_num = sector_num; *sector = s; return RTEMS_SUCCESSFUL; } ffc06848: 83 81 00 08 lwz r28,8(r1) <== NOT EXECUTED ffc0684c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc06850: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc06854: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc06858: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc0685c: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc06860: 4e 80 00 20 blr <== NOT EXECUTED ffc06864: 80 01 00 1c lwz r0,28(r1) s->sector_num = sector_num; *sector = s; return RTEMS_SUCCESSFUL; ffc06868: 38 60 00 00 li r3,0 { free(s); return RTEMS_IO_ERROR; } s->sector_num = sector_num; ffc0686c: 93 9f 00 00 stw r28,0(r31) *sector = s; return RTEMS_SUCCESSFUL; } ffc06870: 7c 08 03 a6 mtlr r0 return RTEMS_IO_ERROR; } s->sector_num = sector_num; *sector = s; ffc06874: 93 fd 00 00 stw r31,0(r29) return RTEMS_SUCCESSFUL; } ffc06878: 83 81 00 08 lwz r28,8(r1) ffc0687c: 83 a1 00 0c lwz r29,12(r1) ffc06880: 83 c1 00 10 lwz r30,16(r1) ffc06884: 83 e1 00 14 lwz r31,20(r1) ffc06888: 38 21 00 18 addi r1,r1,24 ffc0688c: 4e 80 00 20 blr =============================================================================== ffc3911c : rtems_filesystem_node_types_t type; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); ffc3911c: 3d 20 00 00 lis r9,0 int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc39120: 94 21 ff e8 stwu r1,-24(r1) ffc39124: 7c 08 02 a6 mflr r0 rtems_filesystem_node_types_t type; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); ffc39128: 81 29 27 b8 lwz r9,10168(r9) int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc3912c: 93 a1 00 0c stw r29,12(r1) ffc39130: 7c 9d 23 78 mr r29,r4 rtems_filesystem_node_types_t type; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); ffc39134: 7f 83 48 40 cmplw cr7,r3,r9 int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc39138: 93 c1 00 10 stw r30,16(r1) ffc3913c: 7c be 2b 78 mr r30,r5 ffc39140: 93 e1 00 14 stw r31,20(r1) rtems_filesystem_node_types_t type; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); ffc39144: 3b e0 00 00 li r31,0 int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc39148: 90 01 00 1c stw r0,28(r1) rtems_filesystem_node_types_t type; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); ffc3914c: 40 9c 00 14 bge- cr7,ffc39160 <== NEVER TAKEN ffc39150: 3d 20 00 00 lis r9,0 ffc39154: 1c 63 00 38 mulli r3,r3,56 ffc39158: 83 e9 28 68 lwz r31,10344(r9) ffc3915c: 7f ff 1a 14 add r31,r31,r3 /* * Make sure we are working on a directory */ type = rtems_filesystem_node_type( &iop->pathinfo ); ffc39160: 38 7f 00 14 addi r3,r31,20 ffc39164: 4b fd 39 c9 bl ffc0cb2c if ( type != RTEMS_FILESYSTEM_DIRECTORY ) ffc39168: 2f 83 00 00 cmpwi cr7,r3,0 ffc3916c: 40 9e 00 38 bne- cr7,ffc391a4 /* * 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 ); ffc39170: 81 3f 00 24 lwz r9,36(r31) ffc39174: 7f e3 fb 78 mr r3,r31 } ffc39178: 80 01 00 1c lwz r0,28(r1) /* * 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 ); ffc3917c: 7f a4 eb 78 mr r4,r29 ffc39180: 81 29 00 08 lwz r9,8(r9) ffc39184: 7f c5 f3 78 mr r5,r30 } ffc39188: 7c 08 03 a6 mtlr r0 ffc3918c: 83 a1 00 0c lwz r29,12(r1) /* * 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 ); ffc39190: 7d 29 03 a6 mtctr r9 } ffc39194: 83 c1 00 10 lwz r30,16(r1) ffc39198: 83 e1 00 14 lwz r31,20(r1) ffc3919c: 38 21 00 18 addi r1,r1,24 /* * 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 ); ffc391a0: 4e 80 04 20 bctr /* * Make sure we are working on a directory */ type = rtems_filesystem_node_type( &iop->pathinfo ); if ( type != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc391a4: 4b fe fe 55 bl ffc28ff8 <__errno> /* * 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 ); } ffc391a8: 80 01 00 1c lwz r0,28(r1) /* * Make sure we are working on a directory */ type = rtems_filesystem_node_type( &iop->pathinfo ); if ( type != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc391ac: 39 20 00 14 li r9,20 /* * 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 ); } ffc391b0: 83 a1 00 0c lwz r29,12(r1) ffc391b4: 7c 08 03 a6 mtlr r0 /* * Make sure we are working on a directory */ type = rtems_filesystem_node_type( &iop->pathinfo ); if ( type != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc391b8: 91 23 00 00 stw r9,0(r3) /* * 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 ); } ffc391bc: 38 60 ff ff li r3,-1 ffc391c0: 83 c1 00 10 lwz r30,16(r1) ffc391c4: 83 e1 00 14 lwz r31,20(r1) ffc391c8: 38 21 00 18 addi r1,r1,24 ffc391cc: 4e 80 00 20 blr =============================================================================== ffc121ec : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc121ec: 94 21 fe b0 stwu r1,-336(r1) ffc121f0: 7c 08 02 a6 mflr r0 ffc121f4: 90 01 01 54 stw r0,340(r1) ffc121f8: 93 41 01 38 stw r26,312(r1) ffc121fc: 7c 7a 1b 78 mr r26,r3 } rtems_filesystem_instance_unlock( &iop->pathinfo ); return bytes_transferred; } ffc12200: 80 63 00 28 lwz r3,40(r3) ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc12204: 93 61 01 3c stw r27,316(r1) bytes_transferred = 0; first_entry = iop->offset; /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count / sizeof( struct dirent )) * sizeof( struct dirent ); ffc12208: 3f 60 0e a0 lis r27,3744 ffc1220c: 63 7b ea 0f ori r27,r27,59919 const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->lock_h)( mt_entry ); ffc12210: 81 23 00 0c lwz r9,12(r3) ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc12214: 93 e1 01 4c stw r31,332(r1) ffc12218: 7c bf 2b 78 mr r31,r5 bytes_transferred = 0; first_entry = iop->offset; /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count / sizeof( struct dirent )) * sizeof( struct dirent ); ffc1221c: 57 ff e8 fe rlwinm r31,r31,29,3,31 ffc12220: 81 29 00 00 lwz r9,0(r9) ffc12224: 7f 7f d8 16 mulhwu r27,r31,r27 ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc12228: 92 e1 01 2c stw r23,300(r1) ffc1222c: 7d 29 03 a6 mtctr r9 ffc12230: 7c 97 23 78 mr r23,r4 ffc12234: 93 81 01 40 stw r28,320(r1) bytes_transferred = 0; first_entry = iop->offset; /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count / sizeof( struct dirent )) * sizeof( struct dirent ); ffc12238: 57 7b f8 7e rlwinm r27,r27,31,1,31 ffc1223c: 1f 7b 01 18 mulli r27,r27,280 ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc12240: 93 a1 01 44 stw r29,324(r1) ffc12244: 93 c1 01 48 stw r30,328(r1) ffc12248: 92 c1 01 28 stw r22,296(r1) ffc1224c: 93 01 01 30 stw r24,304(r1) ffc12250: 93 21 01 34 stw r25,308(r1) ffc12254: 4e 80 04 21 bctrl the_chain = &the_jnode->info.directory.Entries; /* Move to the first of the desired directory entries */ bytes_transferred = 0; first_entry = iop->offset; ffc12258: 83 ba 00 0c lwz r29,12(r26) int last_entry; struct dirent tmp_dirent; rtems_filesystem_instance_lock( &iop->pathinfo ); the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; ffc1225c: 83 9a 00 1c lwz r28,28(r26) /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count / sizeof( struct dirent )) * sizeof( struct dirent ); /* The directory was not empty so try to move to the desired entry in chain*/ for ( ffc12260: 7f 7b ea 15 add. r27,r27,r29 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc12264: 83 dc 00 50 lwz r30,80(r28) ffc12268: 40 81 01 0c ble- ffc12374 <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( const Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Immutable_tail( the_chain )); ffc1226c: 3b 9c 00 54 addi r28,r28,84 current_entry = 0, the_node = rtems_chain_first( the_chain ); current_entry < last_entry && !rtems_chain_is_tail( the_chain, the_node ); ffc12270: 7f 9e e0 00 cmpw cr7,r30,r28 ffc12274: 41 9e 01 00 beq- cr7,ffc12374 ffc12278: 3b e0 00 00 li r31,0 ffc1227c: 3b 20 00 00 li r25,0 the_node = rtems_chain_next( the_node ) ) { if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); ffc12280: 3a c0 01 18 li r22,280 ffc12284: 48 00 00 1c b ffc122a0 #include "imfs.h" #include #include ssize_t imfs_dir_read( ffc12288: 3b ff 01 18 addi r31,r31,280 } rtems_filesystem_instance_unlock( &iop->pathinfo ); return bytes_transferred; } ffc1228c: 83 de 00 00 lwz r30,0(r30) /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count / sizeof( struct dirent )) * sizeof( struct dirent ); /* The directory was not empty so try to move to the desired entry in chain*/ for ( ffc12290: 7f 9b f8 00 cmpw cr7,r27,r31 current_entry = 0, the_node = rtems_chain_first( the_chain ); current_entry < last_entry && !rtems_chain_is_tail( the_chain, the_node ); ffc12294: 7f 1e e0 00 cmpw cr6,r30,r28 /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count / sizeof( struct dirent )) * sizeof( struct dirent ); /* The directory was not empty so try to move to the desired entry in chain*/ for ( ffc12298: 40 9d 00 8c ble- cr7,ffc12324 <== NEVER TAKEN current_entry = 0, the_node = rtems_chain_first( the_chain ); current_entry < last_entry && !rtems_chain_is_tail( the_chain, the_node ); ffc1229c: 41 9a 00 88 beq- cr6,ffc12324 current_entry += sizeof( struct dirent ), the_node = rtems_chain_next( the_node ) ) { if( current_entry >= first_entry ) { ffc122a0: 7f 9d f8 00 cmpw cr7,r29,r31 ffc122a4: 41 9d ff e4 bgt+ cr7,ffc12288 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; ffc122a8: 81 3e 00 38 lwz r9,56(r30) tmp_dirent.d_namlen = strlen( the_jnode->name ); ffc122ac: 3b 1e 00 0c addi r24,r30,12 current_entry += sizeof( struct dirent ), the_node = rtems_chain_next( the_node ) ) { if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; ffc122b0: 7f ea fe 70 srawi r10,r31,31 ffc122b4: 93 e1 00 14 stw r31,20(r1) tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); ffc122b8: 7f 03 c3 78 mr r3,r24 current_entry += sizeof( struct dirent ), the_node = rtems_chain_next( the_node ) ) { if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; ffc122bc: 91 41 00 10 stw r10,16(r1) #include "imfs.h" #include #include ssize_t imfs_dir_read( ffc122c0: 3b ff 01 18 addi r31,r31,280 if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; ffc122c4: 91 21 00 08 stw r9,8(r1) the_node = rtems_chain_next( the_node ) ) { if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); ffc122c8: b2 c1 00 18 sth r22,24(r1) the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); ffc122cc: 48 00 26 01 bl ffc148cc ffc122d0: 7c 69 1b 78 mr r9,r3 strcpy( tmp_dirent.d_name, the_jnode->name ); ffc122d4: 38 a3 00 01 addi r5,r3,1 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); ffc122d8: b1 21 00 1a sth r9,26(r1) strcpy( tmp_dirent.d_name, the_jnode->name ); ffc122dc: 7f 04 c3 78 mr r4,r24 ffc122e0: 38 61 00 1c addi r3,r1,28 ffc122e4: 48 00 1a 99 bl ffc13d7c memcpy( ffc122e8: 7c 77 ca 14 add r3,r23,r25 ffc122ec: 38 81 00 08 addi r4,r1,8 ffc122f0: 38 a0 01 18 li r5,280 ffc122f4: 48 00 1a 89 bl ffc13d7c /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count / sizeof( struct dirent )) * sizeof( struct dirent ); /* The directory was not empty so try to move to the desired entry in chain*/ for ( ffc122f8: 7f 9b f8 00 cmpw cr7,r27,r31 memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset += sizeof( struct dirent ); ffc122fc: 81 5a 00 08 lwz r10,8(r26) bytes_transferred += sizeof( struct dirent ); ffc12300: 3b 39 01 18 addi r25,r25,280 memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset += sizeof( struct dirent ); ffc12304: 81 7a 00 0c lwz r11,12(r26) } rtems_filesystem_instance_unlock( &iop->pathinfo ); return bytes_transferred; } ffc12308: 83 de 00 00 lwz r30,0(r30) memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset += sizeof( struct dirent ); ffc1230c: 31 6b 01 18 addic r11,r11,280 ffc12310: 7d 4a 01 94 addze r10,r10 ffc12314: 91 5a 00 08 stw r10,8(r26) /* The directory was not empty so try to move to the desired entry in chain*/ for ( current_entry = 0, the_node = rtems_chain_first( the_chain ); current_entry < last_entry && !rtems_chain_is_tail( the_chain, the_node ); ffc12318: 7f 1e e0 00 cmpw cr6,r30,r28 memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset += sizeof( struct dirent ); ffc1231c: 91 7a 00 0c stw r11,12(r26) /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count / sizeof( struct dirent )) * sizeof( struct dirent ); /* The directory was not empty so try to move to the desired entry in chain*/ for ( ffc12320: 41 9d ff 7c bgt+ cr7,ffc1229c <== NEVER TAKEN } rtems_filesystem_instance_unlock( &iop->pathinfo ); return bytes_transferred; } ffc12324: 80 7a 00 28 lwz r3,40(r26) const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->unlock_h)( mt_entry ); ffc12328: 81 23 00 0c lwz r9,12(r3) ffc1232c: 81 29 00 04 lwz r9,4(r9) ffc12330: 7d 29 03 a6 mtctr r9 ffc12334: 4e 80 04 21 bctrl ffc12338: 80 01 01 54 lwz r0,340(r1) ffc1233c: 7f 23 cb 78 mr r3,r25 ffc12340: 82 c1 01 28 lwz r22,296(r1) ffc12344: 7c 08 03 a6 mtlr r0 ffc12348: 82 e1 01 2c lwz r23,300(r1) ffc1234c: 83 01 01 30 lwz r24,304(r1) ffc12350: 83 21 01 34 lwz r25,308(r1) ffc12354: 83 41 01 38 lwz r26,312(r1) ffc12358: 83 61 01 3c lwz r27,316(r1) ffc1235c: 83 81 01 40 lwz r28,320(r1) ffc12360: 83 a1 01 44 lwz r29,324(r1) ffc12364: 83 c1 01 48 lwz r30,328(r1) ffc12368: 83 e1 01 4c lwz r31,332(r1) ffc1236c: 38 21 01 50 addi r1,r1,336 ffc12370: 4e 80 00 20 blr the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; the_chain = &the_jnode->info.directory.Entries; /* Move to the first of the desired directory entries */ bytes_transferred = 0; ffc12374: 3b 20 00 00 li r25,0 ffc12378: 4b ff ff ac b ffc12324 =============================================================================== ffc2ce80 : void init_etc_passwd_group(void) { FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc2ce80: 3d 20 00 00 lis r9,0 ffc2ce84: 89 49 5d 64 lbz r10,23908(r9) ffc2ce88: 2f 8a 00 00 cmpwi cr7,r10,0 ffc2ce8c: 4c be 00 20 bnelr+ cr7 /** * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc2ce90: 94 21 ff f0 stwu r1,-16(r1) ffc2ce94: 7c 08 02 a6 mflr r0 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); ffc2ce98: 3c 60 ff c6 lis r3,-58 /** * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc2ce9c: 93 c1 00 08 stw r30,8(r1) mkdir("/etc", 0777); /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc2cea0: 3f c0 ff c6 lis r30,-58 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; ffc2cea4: 39 40 00 01 li r10,1 /** * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc2cea8: 93 e1 00 0c stw r31,12(r1) mkdir("/etc", 0777); /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc2ceac: 3f e0 ff c6 lis r31,-58 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); ffc2ceb0: 38 80 01 ff li r4,511 ffc2ceb4: 38 63 7f 64 addi r3,r3,32612 /** * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc2ceb8: 90 01 00 14 stw r0,20(r1) mkdir("/etc", 0777); /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc2cebc: 3b de 7f 6c addi r30,r30,32620 ffc2cec0: 3b ff 70 30 addi r31,r31,28720 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; ffc2cec4: 99 49 5d 64 stb r10,23908(r9) mkdir("/etc", 0777); ffc2cec8: 4b fd 7c 11 bl ffc04ad8 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc2cecc: 7f c3 f3 78 mr r3,r30 ffc2ced0: 7f e4 fb 78 mr r4,r31 ffc2ced4: 48 01 78 e9 bl ffc447bc ffc2ced8: 2f 83 00 00 cmpwi cr7,r3,0 ffc2cedc: 41 9e 00 3c beq- cr7,ffc2cf18 } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); ffc2cee0: 48 01 6c c5 bl ffc43ba4 } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { ffc2cee4: 3f c0 ff c6 lis r30,-58 ffc2cee8: 3b de 7f e0 addi r30,r30,32736 ffc2ceec: 7f c3 f3 78 mr r3,r30 ffc2cef0: 7f e4 fb 78 mr r4,r31 ffc2cef4: 48 01 78 c9 bl ffc447bc ffc2cef8: 2f 83 00 00 cmpwi cr7,r3,0 ffc2cefc: 41 9e 00 54 beq- cr7,ffc2cf50 fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } ffc2cf00: 80 01 00 14 lwz r0,20(r1) ffc2cf04: 83 c1 00 08 lwz r30,8(r1) ffc2cf08: 7c 08 03 a6 mtlr r0 ffc2cf0c: 83 e1 00 0c lwz r31,12(r1) ffc2cf10: 38 21 00 10 addi r1,r1,16 } else if ((fp = fopen("/etc/group", "w")) != NULL) { fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); ffc2cf14: 48 01 6c 90 b ffc43ba4 * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { ffc2cf18: 3c 80 ff c6 lis r4,-58 ffc2cf1c: 7f c3 f3 78 mr r3,r30 ffc2cf20: 38 84 2f f8 addi r4,r4,12280 ffc2cf24: 48 01 78 99 bl ffc447bc ffc2cf28: 7c 7e 1b 79 mr. r30,r3 ffc2cf2c: 41 a2 ff b8 beq- ffc2cee4 <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" ffc2cf30: 3c 60 ff c6 lis r3,-58 ffc2cf34: 38 63 7f 78 addi r3,r3,32632 ffc2cf38: 38 80 00 01 li r4,1 ffc2cf3c: 38 a0 00 66 li r5,102 ffc2cf40: 7f c6 f3 78 mr r6,r30 ffc2cf44: 48 01 8f cd bl ffc45f10 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); ffc2cf48: 7f c3 f3 78 mr r3,r30 ffc2cf4c: 4b ff ff 94 b ffc2cee0 * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { ffc2cf50: 3c 80 ff c6 lis r4,-58 ffc2cf54: 7f c3 f3 78 mr r3,r30 ffc2cf58: 38 84 2f f8 addi r4,r4,12280 ffc2cf5c: 48 01 78 61 bl ffc447bc ffc2cf60: 7c 7f 1b 79 mr. r31,r3 ffc2cf64: 41 82 00 24 beq- ffc2cf88 <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" ffc2cf68: 3c 60 ff c6 lis r3,-58 ffc2cf6c: 38 63 7f ec addi r3,r3,32748 ffc2cf70: 38 80 00 01 li r4,1 ffc2cf74: 38 a0 00 2a li r5,42 ffc2cf78: 7f e6 fb 78 mr r6,r31 ffc2cf7c: 48 01 8f 95 bl ffc45f10 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); ffc2cf80: 7f e3 fb 78 mr r3,r31 ffc2cf84: 4b ff ff 7c b ffc2cf00 } } ffc2cf88: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc2cf8c: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc2cf90: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc2cf94: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc2cf98: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc2cf9c: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc08048 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { ffc08048: 94 21 ff f0 stwu r1,-16(r1) ffc0804c: 7c 08 02 a6 mflr r0 ffc08050: 90 01 00 14 stw r0,20(r1) if (tty->termios.c_iflag & ISTRIP) ffc08054: 81 24 00 30 lwz r9,48(r4) /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { ffc08058: 93 c1 00 08 stw r30,8(r1) ffc0805c: 7c 9e 23 78 mr r30,r4 if (tty->termios.c_iflag & ISTRIP) ffc08060: 71 28 00 20 andi. r8,r9,32 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { ffc08064: 93 e1 00 0c stw r31,12(r1) ffc08068: 7c 7f 1b 78 mr r31,r3 if (tty->termios.c_iflag & ISTRIP) ffc0806c: 41 82 00 08 beq- ffc08074 <== ALWAYS TAKEN c &= 0x7f; ffc08070: 54 7f 06 7e clrlwi r31,r3,25 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) ffc08074: 71 2a 02 00 andi. r10,r9,512 ffc08078: 41 82 00 28 beq- ffc080a0 c = tolower (c); ffc0807c: 3d 40 00 00 lis r10,0 ffc08080: 81 0a 27 e0 lwz r8,10208(r10) ffc08084: 7f ea fb 78 mr r10,r31 ffc08088: 7f e8 fa 14 add r31,r8,r31 ffc0808c: 89 1f 00 01 lbz r8,1(r31) ffc08090: 55 08 07 be clrlwi r8,r8,30 ffc08094: 2f 88 00 01 cmpwi cr7,r8,1 ffc08098: 41 9e 01 3c beq- cr7,ffc081d4 ffc0809c: 55 5f 06 3e clrlwi r31,r10,24 if (c == '\r') { ffc080a0: 2f 9f 00 0d cmpwi cr7,r31,13 ffc080a4: 41 9e 00 98 beq- cr7,ffc0813c if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { ffc080a8: 2f 9f 00 0a cmpwi cr7,r31,10 ffc080ac: 41 9e 01 18 beq- cr7,ffc081c4 c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { ffc080b0: 2f 9f 00 00 cmpwi cr7,r31,0 ffc080b4: 40 9e 00 9c bne- cr7,ffc08150 <== ALWAYS TAKEN } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { ffc080b8: 3d 20 00 00 lis r9,0 ffc080bc: 81 49 21 64 lwz r10,8548(r9) ffc080c0: 81 3e 00 20 lwz r9,32(r30) ffc080c4: 39 4a ff ff addi r10,r10,-1 ffc080c8: 7f 89 50 40 cmplw cr7,r9,r10 ffc080cc: 40 9c 00 54 bge- cr7,ffc08120 <== NEVER TAKEN if (tty->termios.c_lflag & ECHO) ffc080d0: 81 5e 00 3c lwz r10,60(r30) ffc080d4: 71 48 00 08 andi. r8,r10,8 ffc080d8: 40 82 01 04 bne- ffc081dc <== ALWAYS TAKEN echo (c, tty); tty->cbuf[tty->ccount++] = c; ffc080dc: 81 5e 00 1c lwz r10,28(r30) ffc080e0: 39 09 00 01 addi r8,r9,1 } return 0; ffc080e4: 38 60 00 00 li r3,0 * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; ffc080e8: 7f ea 49 ae stbx r31,r10,r9 ffc080ec: 91 1e 00 20 stw r8,32(r30) } return 0; } ffc080f0: 80 01 00 14 lwz r0,20(r1) ffc080f4: 83 c1 00 08 lwz r30,8(r1) ffc080f8: 7c 08 03 a6 mtlr r0 ffc080fc: 83 e1 00 0c lwz r31,12(r1) ffc08100: 38 21 00 10 addi r1,r1,16 ffc08104: 4e 80 00 20 blr * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) ffc08108: 81 3e 00 20 lwz r9,32(r30) ffc0810c: 2f 89 00 00 cmpwi cr7,r9,0 ffc08110: 41 9e 00 10 beq- cr7,ffc08120 ffc08114: 7f c3 f3 78 mr r3,r30 ffc08118: 38 80 00 00 li r4,0 ffc0811c: 4b ff fc fd bl ffc07e18 if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } ffc08120: 80 01 00 14 lwz r0,20(r1) } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; ffc08124: 38 60 00 00 li r3,0 if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } ffc08128: 83 c1 00 08 lwz r30,8(r1) ffc0812c: 7c 08 03 a6 mtlr r0 ffc08130: 83 e1 00 0c lwz r31,12(r1) ffc08134: 38 21 00 10 addi r1,r1,16 ffc08138: 4e 80 00 20 blr if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) ffc0813c: 71 28 00 80 andi. r8,r9,128 ffc08140: 40 a2 ff e0 bne- ffc08120 <== NEVER TAKEN return 0; if (tty->termios.c_iflag & ICRNL) ffc08144: 71 2a 01 00 andi. r10,r9,256 ffc08148: 41 82 00 08 beq- ffc08150 <== NEVER TAKEN c = '\n'; ffc0814c: 3b e0 00 0a li r31,10 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { ffc08150: 81 3e 00 3c lwz r9,60(r30) ffc08154: 71 2a 00 02 andi. r10,r9,2 ffc08158: 41 a2 ff 60 beq- ffc080b8 if (c == tty->termios.c_cc[VERASE]) { ffc0815c: 89 5e 00 43 lbz r10,67(r30) ffc08160: 7f 8a f8 00 cmpw cr7,r10,r31 ffc08164: 41 be ff a4 beq- cr7,ffc08108 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { ffc08168: 89 5e 00 44 lbz r10,68(r30) ffc0816c: 7f 8a f8 00 cmpw cr7,r10,r31 ffc08170: 41 9e 00 90 beq- cr7,ffc08200 erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { ffc08174: 89 5e 00 45 lbz r10,69(r30) ffc08178: 7f 8a f8 00 cmpw cr7,r10,r31 ffc0817c: 41 9e 00 e8 beq- cr7,ffc08264 <== NEVER TAKEN return 1; } else if (c == '\n') { ffc08180: 2f 9f 00 0a cmpwi cr7,r31,10 ffc08184: 41 9e 00 ac beq- cr7,ffc08230 if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) || ffc08188: 89 5e 00 4c lbz r10,76(r30) ffc0818c: 7f 8a f8 00 cmpw cr7,r10,r31 ffc08190: 41 9e 00 10 beq- cr7,ffc081a0 <== NEVER TAKEN ffc08194: 89 5e 00 51 lbz r10,81(r30) ffc08198: 7f 8a f8 00 cmpw cr7,r10,r31 ffc0819c: 40 9e ff 1c bne+ cr7,ffc080b8 <== ALWAYS TAKEN (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) ffc081a0: 71 28 00 08 andi. r8,r9,8 <== NOT EXECUTED ffc081a4: 40 82 00 4c bne- ffc081f0 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; ffc081a8: 81 3e 00 20 lwz r9,32(r30) <== NOT EXECUTED return 1; ffc081ac: 38 60 00 01 li r3,1 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; ffc081b0: 81 5e 00 1c lwz r10,28(r30) <== NOT EXECUTED ffc081b4: 39 09 00 01 addi r8,r9,1 <== NOT EXECUTED ffc081b8: 7f ea 49 ae stbx r31,r10,r9 <== NOT EXECUTED ffc081bc: 91 1e 00 20 stw r8,32(r30) <== NOT EXECUTED return 1; ffc081c0: 4b ff ff 30 b ffc080f0 <== NOT EXECUTED if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { ffc081c4: 71 28 00 40 andi. r8,r9,64 ffc081c8: 41 a2 ff 88 beq- ffc08150 <== ALWAYS TAKEN c = '\r'; ffc081cc: 3b e0 00 0d li r31,13 <== NOT EXECUTED ffc081d0: 4b ff ff 80 b ffc08150 <== NOT EXECUTED { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); ffc081d4: 39 4a 00 20 addi r10,r10,32 ffc081d8: 4b ff fe c4 b ffc0809c /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); ffc081dc: 7f e3 fb 78 mr r3,r31 ffc081e0: 7f c4 f3 78 mr r4,r30 ffc081e4: 4b ff fb 8d bl ffc07d70 ffc081e8: 81 3e 00 20 lwz r9,32(r30) ffc081ec: 4b ff fe f0 b ffc080dc tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); ffc081f0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc081f4: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc081f8: 4b ff fb 79 bl ffc07d70 <== NOT EXECUTED ffc081fc: 4b ff ff ac b ffc081a8 <== NOT EXECUTED * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) ffc08200: 81 5e 00 20 lwz r10,32(r30) ffc08204: 2f 8a 00 00 cmpwi cr7,r10,0 ffc08208: 41 be ff 18 beq- cr7,ffc08120 <== NEVER TAKEN return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { ffc0820c: 71 2a 00 08 andi. r10,r9,8 ffc08210: 41 82 00 5c beq- ffc0826c <== NEVER TAKEN tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { ffc08214: 71 2a 00 10 andi. r10,r9,16 ffc08218: 41 82 00 60 beq- ffc08278 <== NEVER TAKEN ffc0821c: 7f c3 f3 78 mr r3,r30 ffc08220: 38 80 00 01 li r4,1 ffc08224: 4b ff fb f5 bl ffc07e18 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; ffc08228: 38 60 00 00 li r3,0 ffc0822c: 4b ff fe c4 b ffc080f0 } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) ffc08230: 71 2a 00 48 andi. r10,r9,72 ffc08234: 41 a2 00 10 beq+ ffc08244 <== NEVER TAKEN echo (c, tty); ffc08238: 38 60 00 0a li r3,10 ffc0823c: 7f c4 f3 78 mr r4,r30 ffc08240: 4b ff fb 31 bl ffc07d70 tty->cbuf[tty->ccount++] = c; ffc08244: 81 3e 00 20 lwz r9,32(r30) ffc08248: 38 e0 00 0a li r7,10 ffc0824c: 81 5e 00 1c lwz r10,28(r30) return 1; ffc08250: 38 60 00 01 li r3,1 else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; ffc08254: 39 09 00 01 addi r8,r9,1 ffc08258: 7c ea 49 ae stbx r7,r10,r9 ffc0825c: 91 1e 00 20 stw r8,32(r30) return 1; ffc08260: 4b ff fe 90 b ffc080f0 else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; ffc08264: 38 60 00 01 li r3,1 <== NOT EXECUTED ffc08268: 4b ff fe 88 b ffc080f0 <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; ffc0826c: 91 5e 00 20 stw r10,32(r30) <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; ffc08270: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc08274: 4b ff fe 7c b ffc080f0 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; ffc08278: 91 5e 00 20 stw r10,32(r30) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); ffc0827c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc08280: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc08284: 4b ff fa ed bl ffc07d70 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) ffc08288: 81 3e 00 3c lwz r9,60(r30) <== NOT EXECUTED ffc0828c: 71 28 00 20 andi. r8,r9,32 <== NOT EXECUTED ffc08290: 41 82 fe 90 beq+ ffc08120 <== NOT EXECUTED echo ('\n', tty); ffc08294: 38 60 00 0a li r3,10 <== NOT EXECUTED ffc08298: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc0829c: 4b ff fa d5 bl ffc07d70 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; ffc082a0: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc082a4: 4b ff fe 4c b ffc080f0 <== NOT EXECUTED =============================================================================== ffc1e064 : int killinfo( pid_t pid, int sig, const union sigval *value ) { ffc1e064: 94 21 ff d0 stwu r1,-48(r1) ffc1e068: 7c 08 02 a6 mflr r0 ffc1e06c: 93 61 00 1c stw r27,28(r1) ffc1e070: 7c bb 2b 78 mr r27,r5 ffc1e074: 93 c1 00 28 stw r30,40(r1) ffc1e078: 7c 9e 23 78 mr r30,r4 ffc1e07c: 93 e1 00 2c stw r31,44(r1) ffc1e080: 7c 7f 1b 78 mr r31,r3 ffc1e084: 90 01 00 34 stw r0,52(r1) ffc1e088: 93 41 00 18 stw r26,24(r1) ffc1e08c: 93 81 00 20 stw r28,32(r1) ffc1e090: 93 a1 00 24 stw r29,36(r1) POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) ffc1e094: 4b ff fb dd bl ffc1dc70 ffc1e098: 7f 83 f8 00 cmpw cr7,r3,r31 ffc1e09c: 40 9e 02 ac bne- cr7,ffc1e348 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) ffc1e0a0: 2f 9e 00 00 cmpwi cr7,r30,0 ffc1e0a4: 41 9e 02 b8 beq- cr7,ffc1e35c static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); ffc1e0a8: 3b fe ff ff addi r31,r30,-1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) ffc1e0ac: 2b 9f 00 1f cmplwi cr7,r31,31 ffc1e0b0: 41 9d 02 ac bgt- cr7,ffc1e35c rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) ffc1e0b4: 1f be 00 0c mulli r29,r30,12 ffc1e0b8: 3f 80 00 00 lis r28,0 ffc1e0bc: 3b 9c 32 20 addi r28,r28,12832 ffc1e0c0: 7d 3c ea 14 add r9,r28,r29 ffc1e0c4: 81 29 00 08 lwz r9,8(r9) ffc1e0c8: 2f 89 00 01 cmpwi cr7,r9,1 ffc1e0cc: 41 9e 02 58 beq- cr7,ffc1e324 /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) ffc1e0d0: 2f 9e 00 08 cmpwi cr7,r30,8 ffc1e0d4: 41 9e 01 d0 beq- cr7,ffc1e2a4 ffc1e0d8: 2f 9e 00 04 cmpwi cr7,r30,4 ffc1e0dc: 41 9e 01 c8 beq- cr7,ffc1e2a4 ffc1e0e0: 2f 9e 00 0b cmpwi cr7,r30,11 ffc1e0e4: 41 9e 01 c0 beq- cr7,ffc1e2a4 * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { ffc1e0e8: 2f 9b 00 00 cmpwi cr7,r27,0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; ffc1e0ec: 93 c1 00 08 stw r30,8(r1) static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); ffc1e0f0: 39 20 00 01 li r9,1 ffc1e0f4: 7d 3f f8 30 slw r31,r9,r31 siginfo->si_code = SI_USER; ffc1e0f8: 91 21 00 0c stw r9,12(r1) if ( !value ) { ffc1e0fc: 41 9e 02 30 beq- cr7,ffc1e32c siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; ffc1e100: 81 3b 00 00 lwz r9,0(r27) ffc1e104: 91 21 00 10 stw r9,16(r1) * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc1e108: 3d 20 00 00 lis r9,0 ffc1e10c: 81 49 28 68 lwz r10,10344(r9) ++level; ffc1e110: 39 4a 00 01 addi r10,r10,1 _Thread_Dispatch_disable_level = level; ffc1e114: 91 49 28 68 stw r10,10344(r9) */ void _POSIX_signals_Manager_Initialization(void); static inline void _POSIX_signals_Add_post_switch_extension(void) { _API_extensions_Add_post_switch( &_POSIX_signals_Post_switch ); ffc1e118: 3c 60 00 00 lis r3,0 ffc1e11c: 38 63 22 20 addi r3,r3,8736 ffc1e120: 4b fe c5 01 bl ffc0a620 <_API_extensions_Add_post_switch> /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; ffc1e124: 3d 20 00 00 lis r9,0 ffc1e128: 80 69 31 b0 lwz r3,12720(r9) api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { ffc1e12c: 81 23 01 50 lwz r9,336(r3) ffc1e130: 81 29 00 d0 lwz r9,208(r9) ffc1e134: 7f e6 48 79 andc. r6,r31,r9 ffc1e138: 40 82 01 14 bne- ffc1e24c */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; ffc1e13c: 3d 20 00 00 lis r9,0 ffc1e140: 38 e9 33 ac addi r7,r9,13228 ffc1e144: 81 29 33 ac lwz r9,13228(r9) /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); ffc1e148: 38 e7 00 04 addi r7,r7,4 ffc1e14c: 7f 89 38 00 cmpw cr7,r9,r7 ffc1e150: 41 9e 00 4c beq- cr7,ffc1e19c #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) ffc1e154: 81 49 00 30 lwz r10,48(r9) for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc1e158: 81 09 01 50 lwz r8,336(r9) #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) ffc1e15c: 7f eb 50 39 and. r11,r31,r10 ffc1e160: 40 82 01 78 bne- ffc1e2d8 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) ffc1e164: 81 48 00 d0 lwz r10,208(r8) ffc1e168: 7f fa 50 79 andc. r26,r31,r10 ffc1e16c: 41 a2 00 24 beq+ ffc1e190 ffc1e170: 48 00 01 68 b ffc1e2d8 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) ffc1e174: 81 49 00 30 lwz r10,48(r9) <== NOT EXECUTED for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc1e178: 81 09 01 50 lwz r8,336(r9) <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) ffc1e17c: 7f fb 50 39 and. r27,r31,r10 <== NOT EXECUTED ffc1e180: 40 82 01 58 bne- ffc1e2d8 <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) ffc1e184: 81 48 00 d0 lwz r10,208(r8) <== NOT EXECUTED ffc1e188: 7f e6 50 79 andc. r6,r31,r10 <== NOT EXECUTED ffc1e18c: 40 82 01 4c bne- ffc1e2d8 <== NOT EXECUTED the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { ffc1e190: 81 29 00 00 lwz r9,0(r9) /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); ffc1e194: 7f 89 38 00 cmpw cr7,r9,r7 ffc1e198: 40 9e ff dc bne+ cr7,ffc1e174 <== NEVER TAKEN * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; ffc1e19c: 3d 20 00 00 lis r9,0 ffc1e1a0: 88 89 27 84 lbz r4,10116(r9) ffc1e1a4: 3d 20 00 00 lis r9,0 ffc1e1a8: 39 29 2c 7c addi r9,r9,11388 ffc1e1ac: 38 84 00 01 addi r4,r4,1 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( ffc1e1b0: 38 09 00 08 addi r0,r9,8 * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; ffc1e1b4: 38 60 00 00 li r3,0 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and an API is not configured. */ if ( !_Objects_Information_table[ the_api ] ) ffc1e1b8: 85 49 00 04 lwzu r10,4(r9) ffc1e1bc: 2f 8a 00 00 cmpwi cr7,r10,0 ffc1e1c0: 41 9e 00 7c beq- cr7,ffc1e23c <== NEVER TAKEN continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; ffc1e1c4: 81 4a 00 04 lwz r10,4(r10) */ if ( !the_info ) continue; #endif maximum = the_info->maximum; ffc1e1c8: a0 aa 00 10 lhz r5,16(r10) object_table = the_info->local_table; ffc1e1cc: 80 ea 00 1c lwz r7,28(r10) for ( index = 1 ; index <= maximum ; index++ ) { ffc1e1d0: 2f 85 00 00 cmpwi cr7,r5,0 ffc1e1d4: 41 9e 00 68 beq- cr7,ffc1e23c ffc1e1d8: 39 00 00 01 li r8,1 the_thread = (Thread_Control *) object_table[ index ]; ffc1e1dc: 85 47 00 04 lwzu r10,4(r7) if ( !the_thread ) ffc1e1e0: 2f 8a 00 00 cmpwi cr7,r10,0 ffc1e1e4: 41 9e 00 4c beq- cr7,ffc1e230 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) ffc1e1e8: 80 ca 00 14 lwz r6,20(r10) ffc1e1ec: 7f 86 20 40 cmplw cr7,r6,r4 ffc1e1f0: 41 9d 00 40 bgt- cr7,ffc1e230 #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) ffc1e1f4: 81 6a 01 50 lwz r11,336(r10) ffc1e1f8: 81 6b 00 d0 lwz r11,208(r11) ffc1e1fc: 7f fa 58 79 andc. r26,r31,r11 ffc1e200: 41 82 00 30 beq- ffc1e230 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { ffc1e204: 41 9c 00 24 blt- cr7,ffc1e228 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( interested && !_States_Is_ready( interested->current_state ) ) { ffc1e208: 2f 83 00 00 cmpwi cr7,r3,0 ffc1e20c: 41 9e 00 24 beq- cr7,ffc1e230 <== NEVER TAKEN ffc1e210: 81 63 00 10 lwz r11,16(r3) ffc1e214: 2f 8b 00 00 cmpwi cr7,r11,0 ffc1e218: 41 9e 00 18 beq- cr7,ffc1e230 <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { ffc1e21c: 83 6a 00 10 lwz r27,16(r10) ffc1e220: 2f 9b 00 00 cmpwi cr7,r27,0 ffc1e224: 40 9e 01 10 bne- cr7,ffc1e334 ffc1e228: 7c c4 33 78 mr r4,r6 ffc1e22c: 7d 43 53 78 mr r3,r10 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { ffc1e230: 39 08 00 01 addi r8,r8,1 ffc1e234: 7f 85 40 40 cmplw cr7,r5,r8 ffc1e238: 40 9c ff a4 bge+ cr7,ffc1e1dc * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { ffc1e23c: 7f 89 00 00 cmpw cr7,r9,r0 ffc1e240: 40 be ff 78 bne- cr7,ffc1e1b8 } } } } if ( interested ) { ffc1e244: 2f 83 00 00 cmpwi cr7,r3,0 ffc1e248: 41 9e 00 18 beq- cr7,ffc1e260 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { ffc1e24c: 7f c4 f3 78 mr r4,r30 ffc1e250: 38 a1 00 08 addi r5,r1,8 ffc1e254: 48 00 01 5d bl ffc1e3b0 <_POSIX_signals_Unblock_thread> ffc1e258: 2f 83 00 00 cmpwi cr7,r3,0 ffc1e25c: 40 9e 00 18 bne- cr7,ffc1e274 /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); ffc1e260: 7f e3 fb 78 mr r3,r31 ffc1e264: 48 00 01 25 bl ffc1e388 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { ffc1e268: 7d 3c e8 2e lwzx r9,r28,r29 ffc1e26c: 2f 89 00 02 cmpwi cr7,r9,2 ffc1e270: 41 9e 00 70 beq- cr7,ffc1e2e0 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { _Thread_Enable_dispatch(); ffc1e274: 4b fe e8 4d bl ffc0cac0 <_Thread_Enable_dispatch> } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } ffc1e278: 80 01 00 34 lwz r0,52(r1) ffc1e27c: 83 41 00 18 lwz r26,24(r1) * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { _Thread_Enable_dispatch(); return 0; ffc1e280: 38 60 00 00 li r3,0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } ffc1e284: 7c 08 03 a6 mtlr r0 ffc1e288: 83 61 00 1c lwz r27,28(r1) ffc1e28c: 83 81 00 20 lwz r28,32(r1) ffc1e290: 83 a1 00 24 lwz r29,36(r1) ffc1e294: 83 c1 00 28 lwz r30,40(r1) ffc1e298: 83 e1 00 2c lwz r31,44(r1) ffc1e29c: 38 21 00 30 addi r1,r1,48 ffc1e2a0: 4e 80 00 20 blr * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); ffc1e2a4: 48 00 03 79 bl ffc1e61c ffc1e2a8: 7f c4 f3 78 mr r4,r30 ffc1e2ac: 48 00 02 61 bl ffc1e50c } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } ffc1e2b0: 80 01 00 34 lwz r0,52(r1) ffc1e2b4: 83 41 00 18 lwz r26,24(r1) ffc1e2b8: 7c 08 03 a6 mtlr r0 ffc1e2bc: 83 61 00 1c lwz r27,28(r1) ffc1e2c0: 83 81 00 20 lwz r28,32(r1) ffc1e2c4: 83 a1 00 24 lwz r29,36(r1) ffc1e2c8: 83 c1 00 28 lwz r30,40(r1) ffc1e2cc: 83 e1 00 2c lwz r31,44(r1) ffc1e2d0: 38 21 00 30 addi r1,r1,48 ffc1e2d4: 4e 80 00 20 blr the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { ffc1e2d8: 7d 23 4b 78 mr r3,r9 ffc1e2dc: 4b ff ff 70 b ffc1e24c */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) ffc1e2e0: 3c 60 00 00 lis r3,0 ffc1e2e4: 38 63 33 a0 addi r3,r3,13216 ffc1e2e8: 4b fe c5 15 bl ffc0a7fc <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { ffc1e2ec: 7c 69 1b 79 mr. r9,r3 ffc1e2f0: 41 82 00 80 beq- ffc1e370 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; ffc1e2f4: 81 41 00 08 lwz r10,8(r1) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); ffc1e2f8: 3c 60 00 00 lis r3,0 ffc1e2fc: 38 63 34 14 addi r3,r3,13332 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; ffc1e300: 91 49 00 08 stw r10,8(r9) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); ffc1e304: 7c 63 ea 14 add r3,r3,r29 ffc1e308: 7d 24 4b 78 mr r4,r9 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; ffc1e30c: 81 41 00 0c lwz r10,12(r1) ffc1e310: 91 49 00 0c stw r10,12(r9) ffc1e314: 81 41 00 10 lwz r10,16(r1) ffc1e318: 91 49 00 10 stw r10,16(r9) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); ffc1e31c: 4b fe c4 b1 bl ffc0a7cc <_Chain_Append> ffc1e320: 4b ff ff 54 b ffc1e274 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) return 0; ffc1e324: 38 60 00 00 li r3,0 ffc1e328: 4b ff ff 88 b ffc1e2b0 */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; ffc1e32c: 93 61 00 10 stw r27,16(r1) ffc1e330: 4b ff fd d8 b ffc1e108 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { ffc1e334: 75 7a 10 00 andis. r26,r11,4096 ffc1e338: 40 a2 fe f8 bne- ffc1e230 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { ffc1e33c: 77 6b 10 00 andis. r11,r27,4096 ffc1e340: 41 a2 fe f0 beq- ffc1e230 ffc1e344: 4b ff fe e4 b ffc1e228 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); ffc1e348: 4b ff 4d 31 bl ffc13078 <__errno> ffc1e34c: 39 20 00 03 li r9,3 ffc1e350: 91 23 00 00 stw r9,0(r3) ffc1e354: 38 60 ff ff li r3,-1 ffc1e358: 4b ff ff 58 b ffc1e2b0 */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc1e35c: 4b ff 4d 1d bl ffc13078 <__errno> ffc1e360: 39 20 00 16 li r9,22 ffc1e364: 91 23 00 00 stw r9,0(r3) ffc1e368: 38 60 ff ff li r3,-1 ffc1e36c: 4b ff ff 44 b ffc1e2b0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); ffc1e370: 4b fe e7 51 bl ffc0cac0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); ffc1e374: 4b ff 4d 05 bl ffc13078 <__errno> ffc1e378: 39 20 00 0b li r9,11 ffc1e37c: 91 23 00 00 stw r9,0(r3) ffc1e380: 38 60 ff ff li r3,-1 ffc1e384: 4b ff ff 2c b ffc1e2b0 =============================================================================== ffc04f94 : #include "malloc_p.h" void *malloc( size_t size ) { ffc04f94: 94 21 ff e8 stwu r1,-24(r1) ffc04f98: 7c 08 02 a6 mflr r0 void *return_this; MSBUMP(malloc_calls, 1); ffc04f9c: 3d 20 00 00 lis r9,0 #include "malloc_p.h" void *malloc( size_t size ) { ffc04fa0: 90 01 00 1c stw r0,28(r1) void *return_this; MSBUMP(malloc_calls, 1); ffc04fa4: 39 29 2b a0 addi r9,r9,11168 ffc04fa8: 81 49 00 04 lwz r10,4(r9) #include "malloc_p.h" void *malloc( size_t size ) { ffc04fac: 93 e1 00 14 stw r31,20(r1) ffc04fb0: 7c 7f 1b 78 mr r31,r3 void *return_this; MSBUMP(malloc_calls, 1); ffc04fb4: 39 4a 00 01 addi r10,r10,1 #include "malloc_p.h" void *malloc( size_t size ) { ffc04fb8: 93 a1 00 0c stw r29,12(r1) ffc04fbc: 93 c1 00 10 stw r30,16(r1) void *return_this; MSBUMP(malloc_calls, 1); ffc04fc0: 91 49 00 04 stw r10,4(r9) /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); ffc04fc4: 4b ff fe 6d bl ffc04e30 /* * Validate the parameters */ if ( !size ) ffc04fc8: 2f 9f 00 00 cmpwi cr7,r31,0 ffc04fcc: 41 9e 00 a0 beq- cr7,ffc0506c return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc04fd0: 3d 20 00 00 lis r9,0 ffc04fd4: 81 29 28 90 lwz r9,10384(r9) ffc04fd8: 2f 89 00 03 cmpwi cr7,r9,3 ffc04fdc: 41 9e 00 84 beq- cr7,ffc05060 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); ffc04fe0: 3f a0 00 00 lis r29,0 ffc04fe4: 80 7d 27 90 lwz r3,10128(r29) ffc04fe8: 7f e4 fb 78 mr r4,r31 ffc04fec: 38 a0 00 00 li r5,0 ffc04ff0: 38 c0 00 00 li r6,0 ffc04ff4: 48 00 6d 51 bl ffc0bd44 <_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 ) { ffc04ff8: 7c 7e 1b 79 mr. r30,r3 ffc04ffc: 41 82 00 94 beq- ffc05090 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) ffc05000: 3d 20 00 00 lis r9,0 ffc05004: 81 29 28 04 lwz r9,10244(r9) ffc05008: 2f 89 00 00 cmpwi cr7,r9,0 ffc0500c: 41 9e 00 14 beq- cr7,ffc05020 (*rtems_malloc_dirty_helper)( return_this, size ); ffc05010: 7f c3 f3 78 mr r3,r30 ffc05014: 7d 29 03 a6 mtctr r9 ffc05018: 7f e4 fb 78 mr r4,r31 ffc0501c: 4e 80 04 21 bctrl /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) ffc05020: 3d 20 00 00 lis r9,0 ffc05024: 81 29 28 08 lwz r9,10248(r9) ffc05028: 2f 89 00 00 cmpwi cr7,r9,0 ffc0502c: 41 9e 00 14 beq- cr7,ffc05040 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); ffc05030: 81 29 00 04 lwz r9,4(r9) ffc05034: 7f c3 f3 78 mr r3,r30 ffc05038: 7d 29 03 a6 mtctr r9 ffc0503c: 4e 80 04 21 bctrl return return_this; } ffc05040: 80 01 00 1c lwz r0,28(r1) ffc05044: 7f c3 f3 78 mr r3,r30 ffc05048: 83 a1 00 0c lwz r29,12(r1) ffc0504c: 7c 08 03 a6 mtlr r0 ffc05050: 83 c1 00 10 lwz r30,16(r1) ffc05054: 83 e1 00 14 lwz r31,20(r1) ffc05058: 38 21 00 18 addi r1,r1,24 ffc0505c: 4e 80 00 20 blr /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) ffc05060: 4b ff fd a5 bl ffc04e04 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc05064: 2f 83 00 00 cmpwi cr7,r3,0 ffc05068: 40 9e ff 78 bne+ cr7,ffc04fe0 <== ALWAYS TAKEN */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); return return_this; } ffc0506c: 80 01 00 1c lwz r0,28(r1) /* * Validate the parameters */ if ( !size ) return (void *) 0; ffc05070: 3b c0 00 00 li r30,0 */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); return return_this; } ffc05074: 7f c3 f3 78 mr r3,r30 ffc05078: 83 a1 00 0c lwz r29,12(r1) ffc0507c: 7c 08 03 a6 mtlr r0 ffc05080: 83 c1 00 10 lwz r30,16(r1) ffc05084: 83 e1 00 14 lwz r31,20(r1) ffc05088: 38 21 00 18 addi r1,r1,24 ffc0508c: 4e 80 00 20 blr */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { return_this = (*rtems_malloc_extend_handler)( RTEMS_Malloc_Heap, size ); ffc05090: 3d 20 00 00 lis r9,0 ffc05094: 80 7d 27 90 lwz r3,10128(r29) ffc05098: 81 29 27 8c lwz r9,10124(r9) ffc0509c: 7f e4 fb 78 mr r4,r31 ffc050a0: 7d 29 03 a6 mtctr r9 ffc050a4: 4e 80 04 21 bctrl if ( !return_this ) { ffc050a8: 7c 7e 1b 79 mr. r30,r3 ffc050ac: 40 82 ff 54 bne+ ffc05000 <== NEVER TAKEN errno = ENOMEM; ffc050b0: 48 00 df c9 bl ffc13078 <__errno> ffc050b4: 39 20 00 0c li r9,12 ffc050b8: 91 23 00 00 stw r9,0(r3) return (void *) 0; ffc050bc: 4b ff ff 84 b ffc05040 =============================================================================== ffc10fcc : void *memfile_alloc_block(void) { void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); ffc10fcc: 3d 20 00 00 lis r9,0 * Allocate a block for an in-memory file. */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { ffc10fd0: 94 21 ff f8 stwu r1,-8(r1) ffc10fd4: 7c 08 02 a6 mflr r0 void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); ffc10fd8: 38 60 00 01 li r3,1 ffc10fdc: 80 89 28 44 lwz r4,10308(r9) * Allocate a block for an in-memory file. */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { ffc10fe0: 90 01 00 0c stw r0,12(r1) void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); ffc10fe4: 4b ff 37 d5 bl ffc047b8 if ( memory ) ffc10fe8: 2c 03 00 00 cmpwi r3,0 ffc10fec: 41 82 00 14 beq- ffc11000 <== NEVER TAKEN memfile_blocks_allocated++; ffc10ff0: 3d 20 00 00 lis r9,0 ffc10ff4: 81 49 28 ac lwz r10,10412(r9) ffc10ff8: 39 4a 00 01 addi r10,r10,1 ffc10ffc: 91 49 28 ac stw r10,10412(r9) return memory; } ffc11000: 80 01 00 0c lwz r0,12(r1) ffc11004: 38 21 00 08 addi r1,r1,8 ffc11008: 7c 08 03 a6 mtlr r0 ffc1100c: 4e 80 00 20 blr =============================================================================== ffc11644 : */ static void memfile_free_blocks_in_table( block_p **block_table, int entries ) { ffc11644: 94 21 ff e0 stwu r1,-32(r1) ffc11648: 7c 08 02 a6 mflr r0 ffc1164c: 93 a1 00 14 stw r29,20(r1) /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i<== NEVER TAKEN * memfile_free_blocks_in_table * * This is a support routine for IMFS_memfile_remove. It frees all the * blocks in one of the indirection tables. */ static void memfile_free_blocks_in_table( ffc11674: 3b c3 ff fc addi r30,r3,-4 /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i memfile_free_block( b[i] ); ffc11690: 4b ff ff 85 bl ffc11614 b[i] = 0; ffc11694: 93 9e 00 00 stw r28,0(r30) /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i ffc116a0: 80 7b 00 00 lwz r3,0(r27) /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); ffc116a4: 4b ff ff 71 bl ffc11614 *block_table = 0; } ffc116a8: 80 01 00 24 lwz r0,36(r1) /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); *block_table = 0; ffc116ac: 39 20 00 00 li r9,0 } ffc116b0: 83 81 00 10 lwz r28,16(r1) ffc116b4: 7c 08 03 a6 mtlr r0 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); *block_table = 0; ffc116b8: 91 3b 00 00 stw r9,0(r27) } ffc116bc: 83 a1 00 14 lwz r29,20(r1) ffc116c0: 83 61 00 0c lwz r27,12(r1) ffc116c4: 83 c1 00 18 lwz r30,24(r1) ffc116c8: 83 e1 00 1c lwz r31,28(r1) ffc116cc: 38 21 00 20 addi r1,r1,32 ffc116d0: 4e 80 00 20 blr =============================================================================== ffc11f0c : int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { ffc11f0c: 94 21 ff e0 stwu r1,-32(r1) ffc11f10: 7c 08 02 a6 mflr r0 ffc11f14: 90 01 00 24 stw r0,36(r1) ffc11f18: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; ffc11f1c: 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 ) ffc11f20: 81 3f 00 50 lwz r9,80(r31) ffc11f24: 7f 89 28 00 cmpw cr7,r9,r5 ffc11f28: 41 9c 00 48 blt- cr7,ffc11f70 <== NEVER TAKEN ffc11f2c: 41 9e 00 38 beq- cr7,ffc11f64 <== ALWAYS TAKEN /* * The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; ffc11f30: 90 bf 00 50 stw r5,80(r31) IMFS_update_atime( the_jnode ); ffc11f34: 38 61 00 08 addi r3,r1,8 ffc11f38: 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; ffc11f3c: 90 df 00 54 stw r6,84(r31) IMFS_update_atime( the_jnode ); ffc11f40: 4b ff 2d 15 bl ffc04c54 return 0; } ffc11f44: 80 01 00 24 lwz r0,36(r1) * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; IMFS_update_atime( the_jnode ); ffc11f48: 81 21 00 08 lwz r9,8(r1) return 0; ffc11f4c: 38 60 00 00 li r3,0 } ffc11f50: 7c 08 03 a6 mtlr r0 * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; IMFS_update_atime( the_jnode ); ffc11f54: 91 3f 00 40 stw r9,64(r31) return 0; } ffc11f58: 83 e1 00 1c lwz r31,28(r1) ffc11f5c: 38 21 00 20 addi r1,r1,32 ffc11f60: 4e 80 00 20 blr * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) ffc11f64: 81 3f 00 54 lwz r9,84(r31) ffc11f68: 7f 89 30 40 cmplw cr7,r9,r6 ffc11f6c: 40 9c ff c4 bge+ cr7,ffc11f30 return IMFS_memfile_extend( the_jnode, true, length ); ffc11f70: 7f e3 fb 78 mr r3,r31 ffc11f74: 38 80 00 01 li r4,1 ffc11f78: 4b ff f9 45 bl ffc118bc the_jnode->info.file.size = length; IMFS_update_atime( the_jnode ); return 0; } ffc11f7c: 80 01 00 24 lwz r0,36(r1) ffc11f80: 83 e1 00 1c lwz r31,28(r1) ffc11f84: 7c 08 03 a6 mtlr r0 ffc11f88: 38 21 00 20 addi r1,r1,32 ffc11f8c: 4e 80 00 20 blr =============================================================================== ffc11e6c : the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & LIBIO_FLAGS_WRITE) ffc11e6c: 81 23 00 10 lwz r9,16(r3) mode_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; ffc11e70: 80 63 00 1c lwz r3,28(r3) /* * Perform 'copy on write' for linear files */ if ((iop->flags & LIBIO_FLAGS_WRITE) ffc11e74: 71 2a 00 04 andi. r10,r9,4 ffc11e78: 41 82 00 14 beq- ffc11e8c ffc11e7c: 81 23 00 4c lwz r9,76(r3) && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { ffc11e80: 81 29 00 00 lwz r9,0(r9) ffc11e84: 2f 89 00 05 cmpwi cr7,r9,5 ffc11e88: 41 9e 00 0c beq- cr7,ffc11e94 <== NEVER TAKEN if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } return 0; ffc11e8c: 38 60 00 00 li r3,0 } ffc11e90: 4e 80 00 20 blr /* * Perform 'copy on write' for linear files */ if ((iop->flags & LIBIO_FLAGS_WRITE) && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; ffc11e94: 81 03 00 54 lwz r8,84(r3) <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->control = &IMFS_node_control_memfile; ffc11e98: 3d 40 ff c2 lis r10,-62 <== NOT EXECUTED ffc11e9c: 39 4a ff a0 addi r10,r10,-96 <== NOT EXECUTED * Perform 'copy on write' for linear files */ if ((iop->flags & LIBIO_FLAGS_WRITE) && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; ffc11ea0: 80 e3 00 58 lwz r7,88(r3) <== NOT EXECUTED the_jnode->control = &IMFS_node_control_memfile; 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) ffc11ea4: 2f 88 00 00 cmpwi cr7,r8,0 <== NOT EXECUTED if ((iop->flags & LIBIO_FLAGS_WRITE) && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->control = &IMFS_node_control_memfile; ffc11ea8: 91 43 00 4c stw r10,76(r3) <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; ffc11eac: 39 20 00 00 li r9,0 <== NOT EXECUTED && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->control = &IMFS_node_control_memfile; the_jnode->info.file.size = 0; ffc11eb0: 39 40 00 00 li r10,0 <== NOT EXECUTED the_jnode->info.file.indirect = 0; ffc11eb4: 91 23 00 58 stw r9,88(r3) <== NOT EXECUTED && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->control = &IMFS_node_control_memfile; the_jnode->info.file.size = 0; ffc11eb8: 39 60 00 00 li r11,0 <== NOT EXECUTED ffc11ebc: 91 43 00 50 stw r10,80(r3) <== NOT EXECUTED ffc11ec0: 91 63 00 54 stw r11,84(r3) <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; ffc11ec4: 91 23 00 5c stw r9,92(r3) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; ffc11ec8: 91 23 00 60 stw r9,96(r3) <== NOT EXECUTED if ((count != 0) ffc11ecc: 41 9e ff c0 beq+ cr7,ffc11e8c <== NOT EXECUTED rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { ffc11ed0: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED ffc11ed4: 7c 08 02 a6 mflr r0 <== 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)) ffc11ed8: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc11edc: 38 c0 00 00 li r6,0 <== NOT EXECUTED rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { ffc11ee0: 90 01 00 0c stw r0,12(r1) <== 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)) ffc11ee4: 4b ff fc 69 bl ffc11b4c <== NOT EXECUTED ffc11ee8: 2f 83 ff ff cmpwi cr7,r3,-1 <== NOT EXECUTED return -1; } return 0; ffc11eec: 38 60 00 00 li r3,0 <== 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)) ffc11ef0: 41 9e 00 14 beq- cr7,ffc11f04 <== NOT EXECUTED return -1; } return 0; } ffc11ef4: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc11ef8: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc11efc: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc11f00: 4e 80 00 20 blr <== 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) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; ffc11f04: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc11f08: 4b ff ff ec b ffc11ef4 <== NOT EXECUTED =============================================================================== ffc051f0 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { ffc051f0: 7d 80 00 26 mfcr r12 int rv = 0; if ( ffc051f4: 2b 86 00 01 cmplwi cr7,r6,1 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { ffc051f8: 94 21 ff 70 stwu r1,-144(r1) ffc051fc: 7c 08 02 a6 mflr r0 ffc05200: 93 21 00 74 stw r25,116(r1) ffc05204: 7c d9 33 78 mr r25,r6 ffc05208: 90 01 00 94 stw r0,148(r1) ffc0520c: 92 81 00 60 stw r20,96(r1) ffc05210: 92 a1 00 64 stw r21,100(r1) ffc05214: 92 c1 00 68 stw r22,104(r1) ffc05218: 92 e1 00 6c stw r23,108(r1) ffc0521c: 93 01 00 70 stw r24,112(r1) ffc05220: 93 41 00 78 stw r26,120(r1) ffc05224: 93 61 00 7c stw r27,124(r1) ffc05228: 93 81 00 80 stw r28,128(r1) ffc0522c: 93 a1 00 84 stw r29,132(r1) ffc05230: 93 c1 00 88 stw r30,136(r1) ffc05234: 93 e1 00 8c stw r31,140(r1) ffc05238: 91 81 00 5c stw r12,92(r1) int rv = 0; if ( ffc0523c: 41 9d 02 b0 bgt- cr7,ffc054ec ffc05240: 7c 7b 1b 78 mr r27,r3 options == RTEMS_FILESYSTEM_READ_ONLY || options == RTEMS_FILESYSTEM_READ_WRITE ) { rtems_filesystem_fsmount_me_t fsmount_me_h = ffc05244: 7c a3 2b 78 mr r3,r5 ffc05248: 7c 9d 23 78 mr r29,r4 ffc0524c: 7c bc 2b 78 mr r28,r5 ffc05250: 7c f6 3b 78 mr r22,r7 ffc05254: 48 00 9e 61 bl ffc0f0b4 rtems_filesystem_get_mount_handler( filesystemtype ); if ( fsmount_me_h != NULL ) { ffc05258: 7c 75 1b 79 mr. r21,r3 ffc0525c: 41 82 02 90 beq- ffc054ec const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; ffc05260: 2d 9d 00 00 cmpwi cr3,r29,0 ffc05264: 41 8e 02 30 beq- cr3,ffc05494 size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; ffc05268: 2e 1b 00 00 cmpwi cr4,r27,0 } return rv; } int mount( ffc0526c: 7f a3 eb 78 mr r3,r29 ffc05270: 7f b4 eb 78 mr r20,r29 ffc05274: 48 00 f6 59 bl ffc148cc ffc05278: 3b 03 00 01 addi r24,r3,1 const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; ffc0527c: 7f 83 e3 78 mr r3,r28 ffc05280: 48 00 f6 4d bl ffc148cc ffc05284: 7c 7f 1b 78 mr r31,r3 ffc05288: 3a e3 00 01 addi r23,r3,1 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; ffc0528c: 41 92 02 2c beq- cr4,ffc054b8 ffc05290: 7f 63 db 78 mr r3,r27 ffc05294: 48 00 f6 39 bl ffc148cc size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size ffc05298: 7f ff c2 14 add r31,r31,r24 ) { 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; ffc0529c: 3b 43 00 01 addi r26,r3,1 size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size ffc052a0: 38 9f 00 65 addi r4,r31,101 + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); ffc052a4: 38 60 00 01 li r3,1 ffc052a8: 7c 84 d2 14 add r4,r4,r26 ffc052ac: 4b ff f5 0d bl ffc047b8 if ( mt_entry != NULL ) { ffc052b0: 7c 7f 1b 79 mr. r31,r3 ffc052b4: 41 82 02 24 beq- ffc054d8 <== NEVER TAKEN rtems_filesystem_global_location_t *mt_fs_root = (rtems_filesystem_global_location_t *) ((char *) mt_entry + sizeof( *mt_entry )); char *str = (char *) mt_fs_root + sizeof( *mt_fs_root ); ffc052b8: 3b df 00 64 addi r30,r31,100 memcpy( str, filesystemtype, filesystemtype_size ); ffc052bc: 7f c3 f3 78 mr r3,r30 ffc052c0: 7f 84 e3 78 mr r4,r28 ffc052c4: 7e e5 bb 78 mr r5,r23 ffc052c8: 48 00 ea b5 bl ffc13d7c + filesystemtype_size + source_size + target_size + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); if ( mt_entry != NULL ) { rtems_filesystem_global_location_t *mt_fs_root = ffc052cc: 3b 9f 00 40 addi r28,r31,64 (rtems_filesystem_global_location_t *) ((char *) mt_entry + sizeof( *mt_entry )); char *str = (char *) mt_fs_root + sizeof( *mt_fs_root ); memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; ffc052d0: 93 df 00 34 stw r30,52(r31) str += filesystemtype_size; ffc052d4: 7f de ba 14 add r30,r30,r23 if ( source_or_null != NULL ) { ffc052d8: 41 92 00 1c beq- cr4,ffc052f4 memcpy( str, source_or_null, source_size ); ffc052dc: 7f c3 f3 78 mr r3,r30 ffc052e0: 7f 64 db 78 mr r4,r27 ffc052e4: 7f 45 d3 78 mr r5,r26 ffc052e8: 48 00 ea 95 bl ffc13d7c mt_entry->dev = str; ffc052ec: 93 df 00 38 stw r30,56(r31) str += source_size; ffc052f0: 7f de d2 14 add r30,r30,r26 } memcpy( str, target, target_size ); ffc052f4: 7e 84 a3 78 mr r4,r20 ffc052f8: 7f 05 c3 78 mr r5,r24 ffc052fc: 7f c3 f3 78 mr r3,r30 ffc05300: 48 00 ea 7d bl ffc13d7c mt_entry->target = str; str += target_size; mt_entry->mounted = true; ffc05304: 39 20 00 01 li r9,1 ffc05308: 99 3f 00 28 stb r9,40(r31) mt_entry->mt_fs_root = mt_fs_root; mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf; ffc0530c: 3d 20 ff c2 lis r9,-62 ffc05310: 39 29 fc f0 addi r9,r9,-784 ffc05314: 91 3f 00 2c stw r9,44(r31) mt_fs_root->location.mt_entry = mt_entry; mt_fs_root->reference_count = 1; ffc05318: 39 20 00 01 li r9,1 void *starting_address, size_t number_nodes, size_t node_size ) { _Chain_Initialize( the_chain, starting_address, number_nodes, node_size ); ffc0531c: 38 7f 00 14 addi r3,r31,20 mt_entry->dev = str; str += source_size; } memcpy( str, target, target_size ); mt_entry->target = str; ffc05320: 93 df 00 30 stw r30,48(r31) ffc05324: 7f 84 e3 78 mr r4,r28 ffc05328: 38 a0 00 01 li r5,1 mt_entry->mounted = true; mt_entry->mt_fs_root = mt_fs_root; mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf; mt_fs_root->location.mt_entry = mt_entry; mt_fs_root->reference_count = 1; ffc0532c: 91 3f 00 58 stw r9,88(r31) ffc05330: 38 c0 00 24 li r6,36 filesystemtype, &target_length ); if ( mt_entry != NULL ) { mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE; ffc05334: 57 39 07 fe clrlwi r25,r25,31 memcpy( str, target, target_size ); mt_entry->target = str; str += target_size; mt_entry->mounted = true; mt_entry->mt_fs_root = mt_fs_root; ffc05338: 93 9f 00 24 stw r28,36(r31) mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf; mt_fs_root->location.mt_entry = mt_entry; ffc0533c: 93 ff 00 54 stw r31,84(r31) ffc05340: 48 00 54 fd bl ffc0a83c <_Chain_Initialize> filesystemtype, &target_length ); if ( mt_entry != NULL ) { mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE; ffc05344: 9b 3f 00 29 stb r25,41(r31) rv = (*fsmount_me_h)( mt_entry, data ); ffc05348: 7f e3 fb 78 mr r3,r31 ffc0534c: 7e a9 03 a6 mtctr r21 ffc05350: 7e c4 b3 78 mr r4,r22 ffc05354: 4e 80 04 21 bctrl if ( rv == 0 ) { ffc05358: 2e 03 00 00 cmpwi cr4,r3,0 ffc0535c: 7c 7e 1b 78 mr r30,r3 ffc05360: 40 92 00 a0 bne- cr4,ffc05400 if ( target != NULL ) { ffc05364: 41 8e 01 9c beq- cr3,ffc05500 { int rv = 0; rtems_filesystem_eval_path_context_t ctx; int eval_flags = RTEMS_FS_PERMS_RWX | RTEMS_FS_FOLLOW_LINK; rtems_filesystem_location_info_t *currentloc = ffc05368: 7f a4 eb 78 mr r4,r29 ffc0536c: 38 a0 00 1f li r5,31 ffc05370: 38 61 00 08 addi r3,r1,8 ffc05374: 48 00 0e 99 bl ffc0620c static inline bool rtems_filesystem_location_is_instance_root( const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; ffc05378: 81 23 00 14 lwz r9,20(r3) return (*mt_entry->ops->are_nodes_equal_h)( ffc0537c: 81 49 00 0c lwz r10,12(r9) ffc05380: 80 89 00 24 lwz r4,36(r9) ffc05384: 81 2a 00 10 lwz r9,16(r10) ffc05388: 7d 29 03 a6 mtctr r9 ffc0538c: 4e 80 04 21 bctrl rtems_filesystem_eval_path_start( &ctx, target, eval_flags ); if ( !rtems_filesystem_location_is_instance_root( currentloc ) ) { ffc05390: 2f 83 00 00 cmpwi cr7,r3,0 ffc05394: 40 9e 01 f4 bne- cr7,ffc05588 static inline void rtems_filesystem_eval_path_extract_currentloc( rtems_filesystem_eval_path_context_t *ctx, rtems_filesystem_location_info_t *get ) { rtems_filesystem_location_copy_and_detach( ffc05398: 38 81 00 20 addi r4,r1,32 ffc0539c: 38 61 00 40 addi r3,r1,64 ffc053a0: 48 00 13 b9 bl ffc06758 rtems_filesystem_location_info_t targetloc; rtems_filesystem_global_location_t *mt_point_node; rtems_filesystem_eval_path_extract_currentloc( &ctx, &targetloc ); mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc ); ffc053a4: 38 61 00 40 addi r3,r1,64 ffc053a8: 48 00 16 69 bl ffc06a10 mt_entry->mt_point_node = mt_point_node; rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry ); ffc053ac: 81 23 00 14 lwz r9,20(r3) if ( !rtems_filesystem_location_is_instance_root( currentloc ) ) { rtems_filesystem_location_info_t targetloc; rtems_filesystem_global_location_t *mt_point_node; rtems_filesystem_eval_path_extract_currentloc( &ctx, &targetloc ); mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc ); ffc053b0: 7c 7d 1b 78 mr r29,r3 mt_entry->mt_point_node = mt_point_node; ffc053b4: 90 7f 00 20 stw r3,32(r31) rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry ); ffc053b8: 7f e3 fb 78 mr r3,r31 ffc053bc: 81 29 00 0c lwz r9,12(r9) ffc053c0: 81 29 00 30 lwz r9,48(r9) ffc053c4: 7d 29 03 a6 mtctr r9 ffc053c8: 4e 80 04 21 bctrl if ( rv == 0 ) { ffc053cc: 2e 03 00 00 cmpwi cr4,r3,0 ffc053d0: 7c 7e 1b 78 mr r30,r3 ffc053d4: 41 92 00 80 beq- cr4,ffc05454 &rtems_filesystem_mount_table, &mt_entry->mt_node ); rtems_filesystem_mt_unlock(); } else { rtems_filesystem_global_location_release( mt_point_node ); ffc053d8: 7f a3 eb 78 mr r3,r29 ffc053dc: 48 00 14 a9 bl ffc06884 } else { rtems_filesystem_eval_path_error( &ctx, EBUSY ); rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); ffc053e0: 38 61 00 08 addi r3,r1,8 ffc053e4: 48 00 0f 71 bl ffc06354 rv = register_subordinate_file_system( mt_entry, target ); } else { rv = register_root_file_system( mt_entry ); } if ( rv != 0 ) { ffc053e8: 41 b2 00 20 beq+ cr4,ffc05408 (*mt_entry->ops->fsunmount_me_h)( mt_entry ); ffc053ec: 81 3f 00 0c lwz r9,12(r31) ffc053f0: 7f e3 fb 78 mr r3,r31 ffc053f4: 81 29 00 3c lwz r9,60(r9) ffc053f8: 7d 29 03 a6 mtctr r9 ffc053fc: 4e 80 04 21 bctrl } } if ( rv != 0 ) { free( mt_entry ); ffc05400: 7f e3 fb 78 mr r3,r31 ffc05404: 4b ff f7 65 bl ffc04b68 errno = EINVAL; rv = -1; } return rv; } ffc05408: 80 01 00 94 lwz r0,148(r1) ffc0540c: 7f c3 f3 78 mr r3,r30 ffc05410: 81 81 00 5c lwz r12,92(r1) ffc05414: 7c 08 03 a6 mtlr r0 ffc05418: 82 81 00 60 lwz r20,96(r1) ffc0541c: 82 a1 00 64 lwz r21,100(r1) ffc05420: 7d 81 81 20 mtcrf 24,r12 ffc05424: 82 c1 00 68 lwz r22,104(r1) ffc05428: 82 e1 00 6c lwz r23,108(r1) ffc0542c: 83 01 00 70 lwz r24,112(r1) ffc05430: 83 21 00 74 lwz r25,116(r1) ffc05434: 83 41 00 78 lwz r26,120(r1) ffc05438: 83 61 00 7c lwz r27,124(r1) ffc0543c: 83 81 00 80 lwz r28,128(r1) ffc05440: 83 a1 00 84 lwz r29,132(r1) ffc05444: 83 c1 00 88 lwz r30,136(r1) ffc05448: 83 e1 00 8c lwz r31,140(r1) ffc0544c: 38 21 00 90 addi r1,r1,144 ffc05450: 4e 80 00 20 blr */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); ffc05454: 3f a0 00 00 lis r29,0 ffc05458: 80 7d 28 54 lwz r3,10324(r29) ffc0545c: 38 80 00 00 li r4,0 ffc05460: 38 a0 00 00 li r5,0 ffc05464: 48 00 45 bd bl ffc09a20 Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; ffc05468: 3d 20 00 00 lis r9,0 ffc0546c: 39 29 21 50 addi r9,r9,8528 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc05470: 80 7d 28 54 lwz r3,10324(r29) ffc05474: 81 49 00 08 lwz r10,8(r9) the_node->next = tail; ffc05478: 39 09 00 04 addi r8,r9,4 ffc0547c: 91 1f 00 00 stw r8,0(r31) tail->previous = the_node; old_last->next = the_node; the_node->previous = old_last; ffc05480: 91 5f 00 04 stw r10,4(r31) Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; old_last->next = the_node; ffc05484: 93 ea 00 00 stw r31,0(r10) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; ffc05488: 93 e9 00 08 stw r31,8(r9) ffc0548c: 48 00 47 35 bl ffc09bc0 ffc05490: 4b ff ff 50 b ffc053e0 ) { 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; ffc05494: 2e 1b 00 00 cmpwi cr4,r27,0 const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; ffc05498: 7f 83 e3 78 mr r3,r28 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; ffc0549c: 3e 80 ff c2 lis r20,-62 size_t filesystemtype_size = strlen( filesystemtype ) + 1; ffc054a0: 48 00 f4 2d bl ffc148cc const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; ffc054a4: 3b 00 00 02 li r24,2 ffc054a8: 3a 94 fd 20 addi r20,r20,-736 size_t filesystemtype_size = strlen( filesystemtype ) + 1; ffc054ac: 7c 7f 1b 78 mr r31,r3 ffc054b0: 3a e3 00 01 addi r23,r3,1 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; ffc054b4: 40 92 fd dc bne+ cr4,ffc05290 <== NEVER TAKEN size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size ffc054b8: 7f ff c2 14 add r31,r31,r24 ffc054bc: 38 9f 00 65 addi r4,r31,101 ) { 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; ffc054c0: 3b 40 00 00 li r26,0 size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); ffc054c4: 38 60 00 01 li r3,1 ffc054c8: 7c 84 d2 14 add r4,r4,r26 ffc054cc: 4b ff f2 ed bl ffc047b8 if ( mt_entry != NULL ) { ffc054d0: 7c 7f 1b 79 mr. r31,r3 ffc054d4: 40 82 fd e4 bne+ ffc052b8 <== ALWAYS TAKEN if ( rv != 0 ) { free( mt_entry ); } } else { errno = ENOMEM; ffc054d8: 48 00 db a1 bl ffc13078 <__errno> <== NOT EXECUTED ffc054dc: 39 20 00 0c li r9,12 <== NOT EXECUTED ffc054e0: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED rv = -1; ffc054e4: 3b c0 ff ff li r30,-1 <== NOT EXECUTED ffc054e8: 4b ff ff 20 b ffc05408 <== NOT EXECUTED } else { errno = EINVAL; rv = -1; } } else { errno = EINVAL; ffc054ec: 48 00 db 8d bl ffc13078 <__errno> ffc054f0: 39 20 00 16 li r9,22 ffc054f4: 91 23 00 00 stw r9,0(r3) rv = -1; ffc054f8: 3b c0 ff ff li r30,-1 ffc054fc: 4b ff ff 0c b ffc05408 */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); ffc05500: 3f a0 00 00 lis r29,0 ffc05504: 80 7d 28 54 lwz r3,10324(r29) ffc05508: 38 80 00 00 li r4,0 ffc0550c: 38 a0 00 00 li r5,0 ffc05510: 48 00 45 11 bl ffc09a20 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; ffc05514: 3d 40 00 00 lis r10,0 ffc05518: 39 2a 21 50 addi r9,r10,8528 ) { int rv = 0; rtems_filesystem_mt_lock(); if ( rtems_chain_is_empty( &rtems_filesystem_mount_table ) ) { ffc0551c: 81 4a 21 50 lwz r10,8528(r10) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc05520: 39 09 00 04 addi r8,r9,4 ffc05524: 7f 8a 40 00 cmpw cr7,r10,r8 ffc05528: 40 9e 00 78 bne- cr7,ffc055a0 <== NEVER TAKEN Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; ffc0552c: 81 09 00 08 lwz r8,8(r9) } rtems_filesystem_mt_unlock(); if ( rv == 0 ) { rtems_filesystem_global_location_t *new_fs_root = rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); ffc05530: 3b 9f 00 24 addi r28,r31,36 the_node->next = tail; ffc05534: 91 5f 00 00 stw r10,0(r31) rtems_filesystem_global_location_t *new_fs_current = rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( ffc05538: 3f 60 00 00 lis r27,0 tail->previous = the_node; old_last->next = the_node; ffc0553c: 93 e8 00 00 stw r31,0(r8) the_node->previous = old_last; ffc05540: 91 1f 00 04 stw r8,4(r31) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; ffc05544: 93 e9 00 08 stw r31,8(r9) } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc05548: 80 7d 28 54 lwz r3,10324(r29) ffc0554c: 48 00 46 75 bl ffc09bc0 rv = -1; } rtems_filesystem_mt_unlock(); if ( rv == 0 ) { rtems_filesystem_global_location_t *new_fs_root = ffc05550: 7f 83 e3 78 mr r3,r28 ffc05554: 48 00 13 a5 bl ffc068f8 ffc05558: 7c 7d 1b 78 mr r29,r3 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_t *new_fs_current = ffc0555c: 7f 83 e3 78 mr r3,r28 ffc05560: 48 00 13 99 bl ffc068f8 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( ffc05564: 7f a4 eb 78 mr r4,r29 rtems_filesystem_mt_unlock(); if ( rv == 0 ) { rtems_filesystem_global_location_t *new_fs_root = rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_t *new_fs_current = ffc05568: 7c 7f 1b 78 mr r31,r3 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( ffc0556c: 80 7b 27 d8 lwz r3,10200(r27) ffc05570: 38 63 00 04 addi r3,r3,4 ffc05574: 48 00 13 61 bl ffc068d4 &rtems_filesystem_root, new_fs_root ); rtems_filesystem_global_location_assign( ffc05578: 80 7b 27 d8 lwz r3,10200(r27) ffc0557c: 7f e4 fb 78 mr r4,r31 ffc05580: 48 00 13 55 bl ffc068d4 ffc05584: 4b ff fe 84 b ffc05408 rtems_filesystem_mt_unlock(); } else { rtems_filesystem_global_location_release( mt_point_node ); } } else { rtems_filesystem_eval_path_error( &ctx, EBUSY ); ffc05588: 38 61 00 08 addi r3,r1,8 ffc0558c: 38 80 00 10 li r4,16 rv = -1; ffc05590: 3b c0 ff ff li r30,-1 rtems_filesystem_mt_unlock(); } else { rtems_filesystem_global_location_release( mt_point_node ); } } else { rtems_filesystem_eval_path_error( &ctx, EBUSY ); ffc05594: 48 00 08 a9 bl ffc05e3c ffc05598: 2e 1e 00 00 cmpwi cr4,r30,0 ffc0559c: 4b ff fe 44 b ffc053e0 rtems_chain_append_unprotected( &rtems_filesystem_mount_table, &mt_entry->mt_node ); } else { errno = EINVAL; ffc055a0: 48 00 da d9 bl ffc13078 <__errno> <== NOT EXECUTED ffc055a4: 39 20 00 16 li r9,22 <== NOT EXECUTED ffc055a8: 91 23 00 00 stw r9,0(r3) <== NOT EXECUTED rv = -1; ffc055ac: 3b c0 ff ff li r30,-1 <== NOT EXECUTED ffc055b0: 80 7d 28 54 lwz r3,10324(r29) <== NOT EXECUTED ffc055b4: 48 00 46 0d bl ffc09bc0 <== NOT EXECUTED ffc055b8: 4b ff fe 34 b ffc053ec <== NOT EXECUTED =============================================================================== ffc0acf0 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { ffc0acf0: 94 21 ff e0 stwu r1,-32(r1) ffc0acf4: 7c 08 02 a6 mflr r0 ffc0acf8: 93 e1 00 1c stw r31,28(r1) int rv = -1; if (target != NULL) { ffc0acfc: 7c 9f 23 79 mr. r31,r4 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { ffc0ad00: 90 01 00 24 stw r0,36(r1) ffc0ad04: 93 61 00 0c stw r27,12(r1) ffc0ad08: 93 81 00 10 stw r28,16(r1) ffc0ad0c: 93 a1 00 14 stw r29,20(r1) ffc0ad10: 93 c1 00 18 stw r30,24(r1) int rv = -1; if (target != NULL) { ffc0ad14: 41 82 00 84 beq- ffc0ad98 ffc0ad18: 7c 7e 1b 78 mr r30,r3 rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); ffc0ad1c: 38 80 01 ff li r4,511 ffc0ad20: 7f e3 fb 78 mr r3,r31 ffc0ad24: 7c bb 2b 78 mr r27,r5 ffc0ad28: 7c dc 33 78 mr r28,r6 ffc0ad2c: 7c fd 3b 78 mr r29,r7 ffc0ad30: 48 00 0e 9d bl ffc0bbcc if (rv == 0) { ffc0ad34: 2c 03 00 00 cmpwi r3,0 ffc0ad38: 41 82 00 28 beq- ffc0ad60 <== ALWAYS TAKEN } else { errno = EINVAL; } return rv; } ffc0ad3c: 80 01 00 24 lwz r0,36(r1) ffc0ad40: 83 61 00 0c lwz r27,12(r1) ffc0ad44: 7c 08 03 a6 mtlr r0 ffc0ad48: 83 81 00 10 lwz r28,16(r1) ffc0ad4c: 83 a1 00 14 lwz r29,20(r1) ffc0ad50: 83 c1 00 18 lwz r30,24(r1) ffc0ad54: 83 e1 00 1c lwz r31,28(r1) ffc0ad58: 38 21 00 20 addi r1,r1,32 ffc0ad5c: 4e 80 00 20 blr ffc0ad60: 80 01 00 24 lwz r0,36(r1) int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( ffc0ad64: 7f c3 f3 78 mr r3,r30 ffc0ad68: 7f e4 fb 78 mr r4,r31 } else { errno = EINVAL; } return rv; } ffc0ad6c: 83 c1 00 18 lwz r30,24(r1) ffc0ad70: 7c 08 03 a6 mtlr r0 ffc0ad74: 83 e1 00 1c lwz r31,28(r1) int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( ffc0ad78: 7f 65 db 78 mr r5,r27 } else { errno = EINVAL; } return rv; } ffc0ad7c: 83 61 00 0c lwz r27,12(r1) int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( ffc0ad80: 7f 86 e3 78 mr r6,r28 } else { errno = EINVAL; } return rv; } ffc0ad84: 83 81 00 10 lwz r28,16(r1) int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( ffc0ad88: 7f a7 eb 78 mr r7,r29 } else { errno = EINVAL; } return rv; } ffc0ad8c: 83 a1 00 14 lwz r29,20(r1) ffc0ad90: 38 21 00 20 addi r1,r1,32 int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( ffc0ad94: 48 00 00 18 b ffc0adac options, data ); } } else { errno = EINVAL; ffc0ad98: 48 01 e2 61 bl ffc28ff8 <__errno> ffc0ad9c: 39 20 00 16 li r9,22 ffc0ada0: 91 23 00 00 stw r9,0(r3) const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; ffc0ada4: 38 60 ff ff li r3,-1 ffc0ada8: 4b ff ff 94 b ffc0ad3c =============================================================================== ffc09ca0 : * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; ffc09ca0: 3d 20 00 00 lis r9,0 int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { ffc09ca4: 94 21 ff b0 stwu r1,-80(r1) ffc09ca8: 7c 08 02 a6 mflr r0 ffc09cac: 81 49 28 a8 lwz r10,10408(r9) ffc09cb0: 7d 80 00 26 mfcr r12 ffc09cb4: 93 81 00 40 stw r28,64(r1) ffc09cb8: 7c 7c 1b 78 mr r28,r3 ++level; ffc09cbc: 39 4a 00 01 addi r10,r10,1 ffc09cc0: 93 c1 00 48 stw r30,72(r1) ffc09cc4: 7c 9e 23 78 mr r30,r4 ffc09cc8: 90 01 00 54 stw r0,84(r1) ffc09ccc: 93 21 00 34 stw r25,52(r1) ffc09cd0: 93 41 00 38 stw r26,56(r1) ffc09cd4: 93 61 00 3c stw r27,60(r1) ffc09cd8: 93 a1 00 44 stw r29,68(r1) ffc09cdc: 93 e1 00 4c stw r31,76(r1) ffc09ce0: 91 81 00 30 stw r12,48(r1) ffc09ce4: 90 a1 00 28 stw r5,40(r1) ffc09ce8: 90 c1 00 2c stw r6,44(r1) _Thread_Dispatch_disable_level = level; ffc09cec: 91 49 28 a8 stw r10,10408(r9) Objects_Locations location; size_t name_len; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { ffc09cf0: 54 89 bf fe rlwinm r9,r4,23,31,31 ffc09cf4: 2e 09 00 00 cmpwi cr4,r9,0 /* struct mq_attr attr */ ) { va_list arg; mode_t mode; struct mq_attr *attr = NULL; ffc09cf8: 3b 20 00 00 li r25,0 Objects_Locations location; size_t name_len; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { ffc09cfc: 40 92 01 20 bne- cr4,ffc09e1c */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) ffc09d00: 3f a0 00 00 lis r29,0 ffc09d04: 3b bd 5b 0c addi r29,r29,23308 ffc09d08: 7f a3 eb 78 mr r3,r29 ffc09d0c: 48 00 3a 9d bl ffc0d7a8 <_Objects_Allocate> attr = va_arg( arg, struct mq_attr * ); va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { ffc09d10: 7c 7f 1b 79 mr. r31,r3 ffc09d14: 41 82 01 3c beq- ffc09e50 <== NEVER TAKEN const char *name, Objects_Id *id, size_t *len ) { return _POSIX_Name_to_id( &_POSIX_Message_queue_Information, name, id, len ); ffc09d18: 3f 60 00 00 lis r27,0 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; ffc09d1c: 93 df 00 14 stw r30,20(r31) ffc09d20: 3b 7b 59 80 addi r27,r27,22912 ffc09d24: 7f 63 db 78 mr r3,r27 ffc09d28: 7f 84 e3 78 mr r4,r28 ffc09d2c: 38 a1 00 20 addi r5,r1,32 ffc09d30: 38 c1 00 14 addi r6,r1,20 ffc09d34: 48 00 06 49 bl ffc0a37c <_POSIX_Name_to_id> * If the name to id translation worked, then the message queue exists * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ if ( status ) { ffc09d38: 7c 7a 1b 79 mr. r26,r3 ffc09d3c: 40 82 00 88 bne- ffc09dc4 } else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { ffc09d40: 73 de 0a 00 andi. r30,r30,2560 ffc09d44: 2f 9e 0a 00 cmpwi cr7,r30,2560 ffc09d48: 41 9e 01 50 beq- cr7,ffc09e98 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) ffc09d4c: 80 81 00 20 lwz r4,32(r1) ffc09d50: 38 a1 00 18 addi r5,r1,24 ffc09d54: 7f 63 db 78 mr r3,r27 ffc09d58: 48 00 40 39 bl ffc0dd90 <_Objects_Get> Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( ffc09d5c: a1 5f 00 0a lhz r10,10(r31) /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); the_mq->open_count += 1; ffc09d60: 81 23 00 18 lwz r9,24(r3) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc09d64: 81 1d 00 1c lwz r8,28(r29) ffc09d68: 55 4a 10 3a rlwinm r10,r10,2,0,29 ffc09d6c: 39 29 00 01 addi r9,r9,1 /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); ffc09d70: 90 61 00 1c stw r3,28(r1) the_mq->open_count += 1; ffc09d74: 91 23 00 18 stw r9,24(r3) the_mq_fd->Queue = the_mq; ffc09d78: 90 7f 00 10 stw r3,16(r31) ffc09d7c: 7f e8 51 2e stwx r31,r8,r10 the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; ffc09d80: 93 5f 00 0c stw r26,12(r31) _Objects_Open_string( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); ffc09d84: 48 00 52 09 bl ffc0ef8c <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); ffc09d88: 48 00 52 05 bl ffc0ef8c <_Thread_Enable_dispatch> return (mqd_t)the_mq_fd->Object.id; ffc09d8c: 80 7f 00 08 lwz r3,8(r31) ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc09d90: 80 01 00 54 lwz r0,84(r1) ffc09d94: 81 81 00 30 lwz r12,48(r1) ffc09d98: 7c 08 03 a6 mtlr r0 ffc09d9c: 83 21 00 34 lwz r25,52(r1) ffc09da0: 83 41 00 38 lwz r26,56(r1) ffc09da4: 7d 80 81 20 mtcrf 8,r12 ffc09da8: 83 61 00 3c lwz r27,60(r1) ffc09dac: 83 81 00 40 lwz r28,64(r1) ffc09db0: 83 a1 00 44 lwz r29,68(r1) ffc09db4: 83 c1 00 48 lwz r30,72(r1) ffc09db8: 83 e1 00 4c lwz r31,76(r1) ffc09dbc: 38 21 00 50 addi r1,r1,80 ffc09dc0: 4e 80 00 20 blr if ( status ) { /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { ffc09dc4: 2f 9a 00 02 cmpwi cr7,r26,2 ffc09dc8: 41 9e 01 24 beq- cr7,ffc09eec RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); ffc09dcc: 7f a3 eb 78 mr r3,r29 ffc09dd0: 7f e4 fb 78 mr r4,r31 ffc09dd4: 48 00 3d e5 bl ffc0dbb8 <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); ffc09dd8: 48 00 51 b5 bl ffc0ef8c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); ffc09ddc: 48 00 ba a1 bl ffc1587c <__errno> ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc09de0: 80 01 00 54 lwz r0,84(r1) ffc09de4: 81 81 00 30 lwz r12,48(r1) ffc09de8: 7c 08 03 a6 mtlr r0 * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); ffc09dec: 93 43 00 00 stw r26,0(r3) ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc09df0: 7d 80 81 20 mtcrf 8,r12 * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); ffc09df4: 38 60 ff ff li r3,-1 ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc09df8: 83 21 00 34 lwz r25,52(r1) ffc09dfc: 83 41 00 38 lwz r26,56(r1) ffc09e00: 83 61 00 3c lwz r27,60(r1) ffc09e04: 83 81 00 40 lwz r28,64(r1) ffc09e08: 83 a1 00 44 lwz r29,68(r1) ffc09e0c: 83 c1 00 48 lwz r30,72(r1) ffc09e10: 83 e1 00 4c lwz r31,76(r1) ffc09e14: 38 21 00 50 addi r1,r1,80 ffc09e18: 4e 80 00 20 blr size_t name_len; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); ffc09e1c: 39 21 00 58 addi r9,r1,88 mode = va_arg( arg, mode_t ); attr = va_arg( arg, struct mq_attr * ); ffc09e20: 83 21 00 2c lwz r25,44(r1) */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) ffc09e24: 3f a0 00 00 lis r29,0 size_t name_len; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); ffc09e28: 91 21 00 0c stw r9,12(r1) ffc09e2c: 3b bd 5b 0c addi r29,r29,23308 ffc09e30: 39 21 00 20 addi r9,r1,32 ffc09e34: 91 21 00 10 stw r9,16(r1) ffc09e38: 7f a3 eb 78 mr r3,r29 mode = va_arg( arg, mode_t ); ffc09e3c: 39 20 00 03 li r9,3 ffc09e40: 99 21 00 08 stb r9,8(r1) ffc09e44: 48 00 39 65 bl ffc0d7a8 <_Objects_Allocate> attr = va_arg( arg, struct mq_attr * ); va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { ffc09e48: 7c 7f 1b 79 mr. r31,r3 ffc09e4c: 40 82 fe cc bne+ ffc09d18 _Thread_Enable_dispatch(); ffc09e50: 48 00 51 3d bl ffc0ef8c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); ffc09e54: 48 00 ba 29 bl ffc1587c <__errno> ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc09e58: 80 01 00 54 lwz r0,84(r1) ffc09e5c: 81 81 00 30 lwz r12,48(r1) } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); ffc09e60: 39 20 00 17 li r9,23 ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc09e64: 7c 08 03 a6 mtlr r0 } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); ffc09e68: 91 23 00 00 stw r9,0(r3) ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc09e6c: 7d 80 81 20 mtcrf 8,r12 } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); ffc09e70: 38 60 ff ff li r3,-1 ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc09e74: 83 21 00 34 lwz r25,52(r1) ffc09e78: 83 41 00 38 lwz r26,56(r1) ffc09e7c: 83 61 00 3c lwz r27,60(r1) ffc09e80: 83 81 00 40 lwz r28,64(r1) ffc09e84: 83 a1 00 44 lwz r29,68(r1) ffc09e88: 83 c1 00 48 lwz r30,72(r1) ffc09e8c: 83 e1 00 4c lwz r31,76(r1) ffc09e90: 38 21 00 50 addi r1,r1,80 ffc09e94: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); ffc09e98: 7f a3 eb 78 mr r3,r29 ffc09e9c: 7f e4 fb 78 mr r4,r31 ffc09ea0: 48 00 3d 19 bl ffc0dbb8 <_Objects_Free> /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); ffc09ea4: 48 00 50 e9 bl ffc0ef8c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); ffc09ea8: 48 00 b9 d5 bl ffc1587c <__errno> ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc09eac: 80 01 00 54 lwz r0,84(r1) ffc09eb0: 81 81 00 30 lwz r12,48(r1) * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); ffc09eb4: 39 20 00 11 li r9,17 ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc09eb8: 7c 08 03 a6 mtlr r0 * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); ffc09ebc: 91 23 00 00 stw r9,0(r3) ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc09ec0: 7d 80 81 20 mtcrf 8,r12 * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); ffc09ec4: 38 60 ff ff li r3,-1 ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc09ec8: 83 21 00 34 lwz r25,52(r1) ffc09ecc: 83 41 00 38 lwz r26,56(r1) ffc09ed0: 83 61 00 3c lwz r27,60(r1) ffc09ed4: 83 81 00 40 lwz r28,64(r1) ffc09ed8: 83 a1 00 44 lwz r29,68(r1) ffc09edc: 83 c1 00 48 lwz r30,72(r1) ffc09ee0: 83 e1 00 4c lwz r31,76(r1) ffc09ee4: 38 21 00 50 addi r1,r1,80 ffc09ee8: 4e 80 00 20 blr if ( status ) { /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { ffc09eec: 41 92 fe e0 beq+ cr4,ffc09dcc /* * At this point, the message queue does not exist and everything has been * checked. We should go ahead and create a message queue. */ status = _POSIX_Message_queue_Create_support( ffc09ef0: 80 81 00 14 lwz r4,20(r1) ffc09ef4: 7f 83 e3 78 mr r3,r28 ffc09ef8: 38 a0 00 01 li r5,1 ffc09efc: 7f 26 cb 78 mr r6,r25 ffc09f00: 38 e1 00 1c addi r7,r1,28 ffc09f04: 48 00 81 a5 bl ffc120a8 <_POSIX_Message_queue_Create_support> ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { ffc09f08: 2f 83 ff ff cmpwi cr7,r3,-1 ffc09f0c: 41 9e 00 30 beq- cr7,ffc09f3c _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return (mqd_t) -1; } the_mq_fd->Queue = the_mq; ffc09f10: 81 21 00 1c lwz r9,28(r1) Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( ffc09f14: a1 5f 00 0a lhz r10,10(r31) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc09f18: 81 1d 00 1c lwz r8,28(r29) ffc09f1c: 55 4a 10 3a rlwinm r10,r10,2,0,29 ffc09f20: 91 3f 00 10 stw r9,16(r31) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; ffc09f24: 39 20 00 00 li r9,0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc09f28: 7f e8 51 2e stwx r31,r8,r10 the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; ffc09f2c: 91 3f 00 0c stw r9,12(r31) &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); ffc09f30: 48 00 50 5d bl ffc0ef8c <_Thread_Enable_dispatch> return (mqd_t) the_mq_fd->Object.id; ffc09f34: 80 7f 00 08 lwz r3,8(r31) ffc09f38: 4b ff fe 58 b ffc09d90 ffc09f3c: 7f a3 eb 78 mr r3,r29 ffc09f40: 7f e4 fb 78 mr r4,r31 ffc09f44: 48 00 3c 75 bl ffc0dbb8 <_Objects_Free> /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); ffc09f48: 48 00 50 45 bl ffc0ef8c <_Thread_Enable_dispatch> return (mqd_t) -1; ffc09f4c: 38 60 ff ff li r3,-1 ffc09f50: 4b ff fe 40 b ffc09d90 =============================================================================== ffc1cba4 : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { ffc1cba4: 94 21 ff 30 stwu r1,-208(r1) ffc1cba8: 7c 08 02 a6 mflr r0 fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; dir_pos->sname.ofs = 0; dir_pos->lname.cln = FAT_FILE_SHORT_NAME; ffc1cbac: 39 20 ff ff li r9,-1 ffc1cbb0: 90 01 00 d4 stw r0,212(r1) int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; ffc1cbb4: 81 43 00 14 lwz r10,20(r3) msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { ffc1cbb8: 93 41 00 b8 stw r26,184(r1) ffc1cbbc: 7c 9a 23 78 mr r26,r4 uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); ffc1cbc0: 38 80 00 00 li r4,0 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { ffc1cbc4: 93 81 00 c0 stw r28,192(r1) ffc1cbc8: 7c bc 2b 78 mr r28,r5 uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); ffc1cbcc: 38 a0 00 40 li r5,64 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { ffc1cbd0: 93 a1 00 c4 stw r29,196(r1) ffc1cbd4: 7c dd 33 78 mr r29,r6 ffc1cbd8: 93 c1 00 c8 stw r30,200(r1) ffc1cbdc: 7c 7e 1b 78 mr r30,r3 uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); ffc1cbe0: 38 61 00 08 addi r3,r1,8 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { ffc1cbe4: 93 e1 00 cc stw r31,204(r1) int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; ffc1cbe8: 3b e0 00 00 li r31,0 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { ffc1cbec: 92 e1 00 ac stw r23,172(r1) ffc1cbf0: 7d 17 43 78 mr r23,r8 ffc1cbf4: 93 01 00 b0 stw r24,176(r1) ffc1cbf8: 93 61 00 bc stw r27,188(r1) ffc1cbfc: 93 21 00 b4 stw r25,180(r1) int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; ffc1cc00: 83 6a 00 08 lwz r27,8(r10) fat_file_fd_t *parent_fat_fd = parent_loc->node_access; ffc1cc04: 83 1e 00 08 lwz r24,8(r30) fat_file_fd_t *fat_fd = NULL; ffc1cc08: 93 e1 00 98 stw r31,152(r1) time_t time_ret = 0; uint16_t time_val = 0; ffc1cc0c: b3 e1 00 9e sth r31,158(r1) uint16_t date = 0; ffc1cc10: b3 e1 00 9c sth r31,156(r1) static inline void fat_dir_pos_init( fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; ffc1cc14: 93 e1 00 88 stw r31,136(r1) dir_pos->sname.ofs = 0; ffc1cc18: 93 e1 00 8c stw r31,140(r1) dir_pos->lname.cln = FAT_FILE_SHORT_NAME; ffc1cc1c: 91 21 00 90 stw r9,144(r1) dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; ffc1cc20: 91 21 00 94 stw r9,148(r1) uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); ffc1cc24: 93 e1 00 68 stw r31,104(r1) ffc1cc28: 93 e1 00 6c stw r31,108(r1) ffc1cc2c: 93 e1 00 70 stw r31,112(r1) ffc1cc30: 93 e1 00 74 stw r31,116(r1) ffc1cc34: 93 e1 00 78 stw r31,120(r1) ffc1cc38: 93 e1 00 7c stw r31,124(r1) ffc1cc3c: 93 e1 00 80 stw r31,128(r1) ffc1cc40: 93 e1 00 84 stw r31,132(r1) memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); ffc1cc44: 48 00 58 2d bl ffc22470 if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) { ffc1cc48: 2f 9d 01 04 cmpwi cr7,r29,260 ffc1cc4c: 41 9d 03 f8 bgt- cr7,ffc1d044 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(ENAMETOOLONG); } name_type = msdos_long_to_short (name, name_len, ffc1cc50: 7f 83 e3 78 mr r3,r28 ffc1cc54: 7f a4 eb 78 mr r4,r29 ffc1cc58: 38 a1 00 68 addi r5,r1,104 ffc1cc5c: 38 c0 00 0b li r6,11 ffc1cc60: 48 00 05 79 bl ffc1d1d8 MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); if (name_type == MSDOS_NAME_INVALID) { ffc1cc64: 7c 79 1b 79 mr. r25,r3 ffc1cc68: 41 82 03 f0 beq- ffc1d058 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EINVAL); } /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; ffc1cc6c: 39 20 00 00 li r9,0 /* set up last write date and time */ time_ret = time(NULL); ffc1cc70: 38 60 00 00 li r3,0 if (name_type == MSDOS_NAME_INVALID) { rtems_set_errno_and_return_minus_one(EINVAL); } /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; ffc1cc74: 99 21 00 74 stb r9,116(r1) /* set up last write date and time */ time_ret = time(NULL); ffc1cc78: 48 00 95 d9 bl ffc26250