=============================================================================== ffc0b734 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { ffc0b734: 81 63 00 00 lwz r11,0(r3) ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; ffc0b738: 81 23 00 10 lwz r9,16(r3) switch( node->type ) { ffc0b73c: 81 6b 00 4c lwz r11,76(r11) ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; ffc0b740: 81 29 00 34 lwz r9,52(r9) switch( node->type ) { ffc0b744: 38 0b ff ff addi r0,r11,-1 ffc0b748: 2b 80 00 06 cmplwi cr7,r0,6 ffc0b74c: 41 9d 00 50 bgt- cr7,ffc0b79c <== NEVER TAKEN ffc0b750: 3d 60 ff c1 lis r11,-63 ffc0b754: 39 6b 5f b4 addi r11,r11,24500 ffc0b758: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0b75c: 7c 0b 00 2e lwzx r0,r11,r0 ffc0b760: 7d 60 5a 14 add r11,r0,r11 ffc0b764: 7d 69 03 a6 mtctr r11 ffc0b768: 4e 80 04 20 bctr case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; ffc0b76c: 80 09 00 0c lwz r0,12(r9) ffc0b770: 48 00 00 28 b ffc0b798 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; ffc0b774: 3d 20 ff c1 lis r9,-63 ffc0b778: 38 09 5f dc addi r0,r9,24540 ffc0b77c: 48 00 00 1c b ffc0b798 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; ffc0b780: 3d 20 ff c1 lis r9,-63 ffc0b784: 38 09 60 4c addi r0,r9,24652 ffc0b788: 48 00 00 10 b ffc0b798 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; ffc0b78c: 80 09 00 08 lwz r0,8(r9) ffc0b790: 48 00 00 08 b ffc0b798 break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; ffc0b794: 80 09 00 10 lwz r0,16(r9) ffc0b798: 90 03 00 08 stw r0,8(r3) break; } return 0; } ffc0b79c: 38 60 00 00 li r3,0 ffc0b7a0: 4e 80 00 20 blr =============================================================================== ffc0b594 : IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) ffc0b594: 2c 03 00 00 cmpwi r3,0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ffc0b598: 94 21 ff e0 stwu r1,-32(r1) ffc0b59c: 7c 08 02 a6 mflr r0 ffc0b5a0: bf 61 00 0c stmw r27,12(r1) ffc0b5a4: 7c 9f 23 78 mr r31,r4 ffc0b5a8: 7c fe 3b 78 mr r30,r7 ffc0b5ac: 90 01 00 24 stw r0,36(r1) /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) return NULL; ffc0b5b0: 3b 60 00 00 li r27,0 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) ffc0b5b4: 41 82 01 24 beq- ffc0b6d8 <== NEVER TAKEN fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && ffc0b5b8: 2f 84 00 07 cmpwi cr7,r4,7 */ if ( parent_loc == NULL ) return NULL; parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; ffc0b5bc: 81 23 00 10 lwz r9,16(r3) * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) return NULL; parent = parent_loc->node_access; ffc0b5c0: 83 83 00 00 lwz r28,0(r3) fs_info = parent_loc->mt_entry->fs_info; ffc0b5c4: 83 a9 00 34 lwz r29,52(r9) /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && ffc0b5c8: 40 9e 00 18 bne- cr7,ffc0b5e0 ffc0b5cc: 81 3d 00 10 lwz r9,16(r29) ffc0b5d0: 3d 60 ff c1 lis r11,-63 ffc0b5d4: 38 0b 5f 4c addi r0,r11,24396 ffc0b5d8: 7f 89 00 00 cmpw cr7,r9,r0 ffc0b5dc: 41 be 00 fc beq+ cr7,ffc0b6d8 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); ffc0b5e0: 3d 20 00 00 lis r9,0 ffc0b5e4: 81 29 26 e4 lwz r9,9956(r9) ffc0b5e8: 7c a4 2b 78 mr r4,r5 ffc0b5ec: 7f e3 fb 78 mr r3,r31 ffc0b5f0: 80 09 00 2c lwz r0,44(r9) ffc0b5f4: 7c c5 00 78 andc r5,r6,r0 ffc0b5f8: 4b ff ff 19 bl ffc0b510 if ( !node ) ffc0b5fc: 7c 7b 1b 79 mr. r27,r3 ffc0b600: 41 82 00 d8 beq- ffc0b6d8 return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { ffc0b604: 2f 9f 00 01 cmpwi cr7,r31,1 ffc0b608: 40 be 00 1c bne+ cr7,ffc0b624 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 ); ffc0b60c: 38 1b 00 54 addi r0,r27,84 head->next = tail; ffc0b610: 90 1b 00 50 stw r0,80(r27) head->previous = NULL; ffc0b614: 38 00 00 00 li r0,0 ffc0b618: 90 1b 00 54 stw r0,84(r27) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); ffc0b61c: 38 1b 00 50 addi r0,r27,80 ffc0b620: 48 00 00 54 b ffc0b674 rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { ffc0b624: 2f 9f 00 03 cmpwi cr7,r31,3 ffc0b628: 41 9e 00 0c beq- cr7,ffc0b634 node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { ffc0b62c: 2f 9f 00 04 cmpwi cr7,r31,4 ffc0b630: 40 be 00 0c bne+ cr7,ffc0b63c node->info.sym_link.name = info->sym_link.name; ffc0b634: 80 1e 00 00 lwz r0,0(r30) ffc0b638: 48 00 00 7c b ffc0b6b4 } else if ( type == IMFS_DEVICE ) { ffc0b63c: 2f 9f 00 02 cmpwi cr7,r31,2 ffc0b640: 40 be 00 18 bne+ cr7,ffc0b658 node->info.device.major = info->device.major; ffc0b644: 80 1e 00 00 lwz r0,0(r30) ffc0b648: 90 1b 00 50 stw r0,80(r27) node->info.device.minor = info->device.minor; ffc0b64c: 80 1e 00 04 lwz r0,4(r30) ffc0b650: 90 1b 00 54 stw r0,84(r27) ffc0b654: 48 00 00 64 b ffc0b6b8 } else if ( type == IMFS_LINEAR_FILE ) { ffc0b658: 2f 9f 00 06 cmpwi cr7,r31,6 ffc0b65c: 40 be 00 20 bne+ cr7,ffc0b67c node->info.linearfile.size = 0; ffc0b660: 39 20 00 00 li r9,0 ffc0b664: 39 40 00 00 li r10,0 ffc0b668: 91 3b 00 50 stw r9,80(r27) node->info.linearfile.direct = 0; ffc0b66c: 38 00 00 00 li r0,0 node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { node->info.linearfile.size = 0; ffc0b670: 91 5b 00 54 stw r10,84(r27) node->info.linearfile.direct = 0; ffc0b674: 90 1b 00 58 stw r0,88(r27) ffc0b678: 48 00 00 40 b ffc0b6b8 } else if ( type == IMFS_MEMORY_FILE ) { ffc0b67c: 2f 9f 00 05 cmpwi cr7,r31,5 ffc0b680: 40 be 00 28 bne+ cr7,ffc0b6a8 node->info.file.size = 0; node->info.file.indirect = 0; ffc0b684: 38 00 00 00 li r0,0 node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { node->info.file.size = 0; ffc0b688: 39 20 00 00 li r9,0 node->info.file.indirect = 0; ffc0b68c: 90 1b 00 58 stw r0,88(r27) node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { node->info.file.size = 0; ffc0b690: 39 40 00 00 li r10,0 ffc0b694: 91 3b 00 50 stw r9,80(r27) ffc0b698: 91 5b 00 54 stw r10,84(r27) node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; ffc0b69c: 90 1b 00 5c stw r0,92(r27) node->info.file.triply_indirect = 0; ffc0b6a0: 90 1b 00 60 stw r0,96(r27) ffc0b6a4: 48 00 00 14 b ffc0b6b8 } else if ( type == IMFS_FIFO ) { ffc0b6a8: 2f 9f 00 07 cmpwi cr7,r31,7 ffc0b6ac: 40 be 00 0c bne+ cr7,ffc0b6b8 <== NEVER TAKEN node->info.fifo.pipe = NULL; ffc0b6b0: 38 00 00 00 li r0,0 ffc0b6b4: 90 1b 00 50 stw r0,80(r27) /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; ffc0b6b8: 81 3d 00 04 lwz r9,4(r29) ffc0b6bc: 38 7c 00 50 addi r3,r28,80 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; ffc0b6c0: 93 9b 00 08 stw r28,8(r27) ffc0b6c4: 7f 64 db 78 mr r4,r27 node->st_ino = ++fs_info->ino_count; ffc0b6c8: 38 09 00 01 addi r0,r9,1 ffc0b6cc: 90 1d 00 04 stw r0,4(r29) ffc0b6d0: 90 1b 00 38 stw r0,56(r27) ffc0b6d4: 4b ff cc 35 bl ffc08308 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } ffc0b6d8: 39 61 00 20 addi r11,r1,32 ffc0b6dc: 7f 63 db 78 mr r3,r27 ffc0b6e0: 48 00 8b 00 b ffc141e0 <_restgpr_27_x> =============================================================================== ffc0b858 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc0b858: 94 21 ff 88 stwu r1,-120(r1) ffc0b85c: 7c 08 02 a6 mflr r0 ffc0b860: 90 01 00 7c stw r0,124(r1) char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { ffc0b864: 54 a0 00 39 rlwinm. r0,r5,0,0,28 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc0b868: be a1 00 4c stmw r21,76(r1) ffc0b86c: 7c 7b 1b 78 mr r27,r3 ffc0b870: 7c 9e 23 78 mr r30,r4 ffc0b874: 7c bc 2b 78 mr r28,r5 ffc0b878: 7c df 33 78 mr r31,r6 char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { ffc0b87c: 41 a2 00 10 beq+ ffc0b88c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); ffc0b880: 48 00 39 91 bl ffc0f210 <__errno> <== NOT EXECUTED ffc0b884: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc0b888: 48 00 01 fc b ffc0ba84 <== NOT EXECUTED /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; ffc0b88c: 83 46 00 00 lwz r26,0(r6) size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; ffc0b890: 3b a0 00 00 li r29,0 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); ffc0b894: 3b 21 00 20 addi r25,r1,32 ffc0b898: 3a e1 00 08 addi r23,r1,8 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0b89c: 3f 00 00 00 lis r24,0 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); ffc0b8a0: 7c 7b ea 14 add r3,r27,r29 ffc0b8a4: 7f c4 f3 78 mr r4,r30 ffc0b8a8: 7f 25 cb 78 mr r5,r25 ffc0b8ac: 7e e6 bb 78 mr r6,r23 ffc0b8b0: 48 00 06 ed bl ffc0bf9c pathnamelen -= len; i += len; if ( !pathloc->node_access ) ffc0b8b4: 80 1f 00 00 lwz r0,0(r31) * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); ffc0b8b8: 7c 76 1b 78 mr r22,r3 pathnamelen -= len; ffc0b8bc: 82 a1 00 08 lwz r21,8(r1) i += len; if ( !pathloc->node_access ) ffc0b8c0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b8c4: 41 9e 01 0c beq- cr7,ffc0b9d0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) ffc0b8c8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b8cc: 41 9e 00 24 beq- cr7,ffc0b8f0 if ( node->type == IMFS_DIRECTORY ) ffc0b8d0: 80 1a 00 4c lwz r0,76(r26) ffc0b8d4: 2f 80 00 01 cmpwi cr7,r0,1 ffc0b8d8: 40 be 00 18 bne+ cr7,ffc0b8f0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) ffc0b8dc: 7f e3 fb 78 mr r3,r31 ffc0b8e0: 38 80 00 01 li r4,1 ffc0b8e4: 4b ff fe c1 bl ffc0b7a4 ffc0b8e8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b8ec: 41 9e 01 90 beq- cr7,ffc0ba7c rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { ffc0b8f0: 2f 96 00 03 cmpwi cr7,r22,3 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; ffc0b8f4: 83 5f 00 00 lwz r26,0(r31) */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; ffc0b8f8: 7f d5 f0 50 subf r30,r21,r30 i += len; ffc0b8fc: 7f bd aa 14 add r29,r29,r21 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { ffc0b900: 41 9e 00 54 beq- cr7,ffc0b954 ffc0b904: 2f 96 00 04 cmpwi cr7,r22,4 ffc0b908: 41 9e 00 dc beq- cr7,ffc0b9e4 ffc0b90c: 2f 16 00 02 cmpwi cr6,r22,2 ffc0b910: 40 ba 00 e0 bne+ cr6,ffc0b9f0 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0b914: 81 38 26 e4 lwz r9,9956(r24) ffc0b918: 80 09 00 18 lwz r0,24(r9) ffc0b91c: 7f 9a 00 00 cmpw cr7,r26,r0 ffc0b920: 41 be ff 80 beq- cr7,ffc0b8a0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { ffc0b924: 80 9f 00 10 lwz r4,16(r31) /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == ffc0b928: 80 04 00 1c lwz r0,28(r4) ffc0b92c: 7f 9a 00 00 cmpw cr7,r26,r0 ffc0b930: 40 be 00 0c bne+ cr7,ffc0b93c */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; ffc0b934: 38 84 00 08 addi r4,r4,8 ffc0b938: 48 00 00 e0 b ffc0ba18 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) ffc0b93c: 83 5a 00 08 lwz r26,8(r26) ffc0b940: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0b944: 40 be 00 98 bne+ cr7,ffc0b9dc rtems_set_errno_and_return_minus_one( ENOENT ); ffc0b948: 48 00 38 c9 bl ffc0f210 <__errno> ffc0b94c: 92 c3 00 00 stw r22,0(r3) ffc0b950: 48 00 01 38 b ffc0ba88 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { ffc0b954: 80 1a 00 4c lwz r0,76(r26) ffc0b958: 2f 80 00 03 cmpwi cr7,r0,3 ffc0b95c: 40 be 00 18 bne+ cr7,ffc0b974 IMFS_evaluate_hard_link( pathloc, 0 ); ffc0b960: 7f e3 fb 78 mr r3,r31 ffc0b964: 38 80 00 00 li r4,0 ffc0b968: 4b ff fe 91 bl ffc0b7f8 node = pathloc->node_access; ffc0b96c: 83 5f 00 00 lwz r26,0(r31) ffc0b970: 48 00 00 28 b ffc0b998 * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { ffc0b974: 2f 80 00 04 cmpwi cr7,r0,4 ffc0b978: 40 be 00 20 bne+ cr7,ffc0b998 result = IMFS_evaluate_sym_link( pathloc, 0 ); ffc0b97c: 7f e3 fb 78 mr r3,r31 ffc0b980: 38 80 00 00 li r4,0 ffc0b984: 48 00 01 15 bl ffc0ba98 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; ffc0b988: 83 5f 00 00 lwz r26,0(r31) if ( result == -1 ) ffc0b98c: 2f 83 ff ff cmpwi cr7,r3,-1 * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); ffc0b990: 7c 76 1b 78 mr r22,r3 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) ffc0b994: 41 9e 00 f8 beq- cr7,ffc0ba8c <== NEVER TAKEN } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) ffc0b998: 80 1a 00 4c lwz r0,76(r26) ffc0b99c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0b9a0: 41 be 00 10 beq+ cr7,ffc0b9b0 rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc0b9a4: 48 00 38 6d bl ffc0f210 <__errno> ffc0b9a8: 38 00 00 14 li r0,20 ffc0b9ac: 48 00 00 d8 b ffc0ba84 /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { ffc0b9b0: 80 9a 00 5c lwz r4,92(r26) ffc0b9b4: 2f 84 00 00 cmpwi cr7,r4,0 ffc0b9b8: 40 9e 00 5c bne- cr7,ffc0ba14 } /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); ffc0b9bc: 7f 43 d3 78 mr r3,r26 ffc0b9c0: 7f 24 cb 78 mr r4,r25 ffc0b9c4: 48 00 05 45 bl ffc0bf08 if ( !node ) ffc0b9c8: 7c 7a 1b 79 mr. r26,r3 ffc0b9cc: 40 a2 00 10 bne+ ffc0b9dc rtems_set_errno_and_return_minus_one( ENOENT ); ffc0b9d0: 48 00 38 41 bl ffc0f210 <__errno> ffc0b9d4: 38 00 00 02 li r0,2 ffc0b9d8: 48 00 00 ac b ffc0ba84 /* * Set the node access to the point we have found. */ pathloc->node_access = node; ffc0b9dc: 93 5f 00 00 stw r26,0(r31) ffc0b9e0: 4b ff fe c0 b ffc0b8a0 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); ffc0b9e4: 48 00 38 2d bl ffc0f210 <__errno> ffc0b9e8: 38 00 00 5b li r0,91 ffc0b9ec: 48 00 00 98 b ffc0ba84 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { ffc0b9f0: 2f 16 00 00 cmpwi cr6,r22,0 ffc0b9f4: 41 9a 00 08 beq- cr6,ffc0b9fc ffc0b9f8: 40 9e fe a8 bne+ cr7,ffc0b8a0 <== ALWAYS TAKEN * new fs root node and let let the mounted filesystem set the handlers. * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { ffc0b9fc: 80 1a 00 4c lwz r0,76(r26) ffc0ba00: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ba04: 40 9e 00 58 bne- cr7,ffc0ba5c if ( node->info.directory.mt_fs != NULL ) { ffc0ba08: 80 9a 00 5c lwz r4,92(r26) ffc0ba0c: 2f 84 00 00 cmpwi cr7,r4,0 ffc0ba10: 41 9e 00 4c beq- cr7,ffc0ba5c newloc = node->info.directory.mt_fs->mt_fs_root; ffc0ba14: 38 84 00 1c addi r4,r4,28 ffc0ba18: 39 61 00 0c addi r11,r1,12 ffc0ba1c: 7c a4 a4 aa lswi r5,r4,20 ffc0ba20: 7c ab a5 aa stswi r5,r11,20 *pathloc = newloc; ffc0ba24: 7c ab a4 aa lswi r5,r11,20 ffc0ba28: 7c bf a5 aa stswi r5,r31,20 return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0ba2c: 7f 85 e3 78 mr r5,r28 ffc0ba30: 7f e6 fb 78 mr r6,r31 ffc0ba34: 81 3f 00 0c lwz r9,12(r31) ffc0ba38: 80 81 00 08 lwz r4,8(r1) ffc0ba3c: 80 09 00 00 lwz r0,0(r9) ffc0ba40: 7c 64 e8 50 subf r3,r4,r29 ffc0ba44: 7c 7b 1a 14 add r3,r27,r3 ffc0ba48: 7c 09 03 a6 mtctr r0 ffc0ba4c: 7c 9e 22 14 add r4,r30,r4 ffc0ba50: 4e 80 04 21 bctrl ffc0ba54: 7c 76 1b 78 mr r22,r3 ffc0ba58: 48 00 00 34 b ffc0ba8c flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); ffc0ba5c: 7f e3 fb 78 mr r3,r31 ffc0ba60: 4b ff fc d5 bl ffc0b734 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) ffc0ba64: 7f 84 e3 78 mr r4,r28 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); ffc0ba68: 7c 76 1b 78 mr r22,r3 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) ffc0ba6c: 7f e3 fb 78 mr r3,r31 ffc0ba70: 4b ff fd 35 bl ffc0b7a4 ffc0ba74: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ba78: 40 be 00 14 bne+ cr7,ffc0ba8c rtems_set_errno_and_return_minus_one( EACCES ); ffc0ba7c: 48 00 37 95 bl ffc0f210 <__errno> ffc0ba80: 38 00 00 0d li r0,13 ffc0ba84: 90 03 00 00 stw r0,0(r3) ffc0ba88: 3a c0 ff ff li r22,-1 return result; } ffc0ba8c: 39 61 00 78 addi r11,r1,120 ffc0ba90: 7e c3 b3 78 mr r3,r22 ffc0ba94: 48 00 87 34 b ffc141c8 <_restgpr_21_x> =============================================================================== ffc0bbec : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { ffc0bbec: 94 21 ff 88 stwu r1,-120(r1) ffc0bbf0: 7c 08 02 a6 mflr r0 ffc0bbf4: 90 01 00 7c stw r0,124(r1) ffc0bbf8: be a1 00 4c stmw r21,76(r1) ffc0bbfc: 7c 7d 1b 78 mr r29,r3 ffc0bc00: 7c 9f 23 78 mr r31,r4 ffc0bc04: 7c bc 2b 78 mr r28,r5 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; ffc0bc08: 83 64 00 00 lwz r27,0(r4) /* * Get the path length. */ pathlen = strlen( path ); ffc0bc0c: 48 00 48 8d bl ffc10498 const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; ffc0bc10: 3b c0 00 00 li r30,0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); ffc0bc14: 7c 7a 1b 78 mr r26,r3 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); ffc0bc18: 3b 21 00 20 addi r25,r1,32 ffc0bc1c: 3a e1 00 08 addi r23,r1,8 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0bc20: 3f 00 00 00 lis r24,0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); ffc0bc24: 7f 44 d3 78 mr r4,r26 ffc0bc28: 7c 7d f2 14 add r3,r29,r30 ffc0bc2c: 7f 25 cb 78 mr r5,r25 ffc0bc30: 7e e6 bb 78 mr r6,r23 ffc0bc34: 48 00 03 69 bl ffc0bf9c pathlen -= len; i += len; if ( !pathloc->node_access ) ffc0bc38: 80 1f 00 00 lwz r0,0(r31) */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; ffc0bc3c: 82 a1 00 08 lwz r21,8(r1) * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); ffc0bc40: 7c 76 1b 78 mr r22,r3 pathlen -= len; i += len; if ( !pathloc->node_access ) ffc0bc44: 2f 80 00 00 cmpwi cr7,r0,0 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; ffc0bc48: 7f 55 d0 50 subf r26,r21,r26 i += len; if ( !pathloc->node_access ) ffc0bc4c: 41 9e 01 90 beq- cr7,ffc0bddc <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) ffc0bc50: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bc54: 41 9e 00 24 beq- cr7,ffc0bc78 if ( node->type == IMFS_DIRECTORY ) ffc0bc58: 80 1b 00 4c lwz r0,76(r27) ffc0bc5c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0bc60: 40 be 00 18 bne+ cr7,ffc0bc78 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) ffc0bc64: 7f e3 fb 78 mr r3,r31 ffc0bc68: 38 80 00 01 li r4,1 ffc0bc6c: 4b ff fb 39 bl ffc0b7a4 ffc0bc70: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bc74: 41 9e 01 bc beq- cr7,ffc0be30 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { ffc0bc78: 2f 96 00 02 cmpwi cr7,r22,2 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; ffc0bc7c: 83 7f 00 00 lwz r27,0(r31) while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; ffc0bc80: 7f de aa 14 add r30,r30,r21 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { ffc0bc84: 41 9e 00 2c beq- cr7,ffc0bcb0 ffc0bc88: 2b 96 00 02 cmplwi cr7,r22,2 ffc0bc8c: 41 9d 00 10 bgt- cr7,ffc0bc9c ffc0bc90: 2f 96 00 00 cmpwi cr7,r22,0 ffc0bc94: 41 9e 01 08 beq- cr7,ffc0bd9c ffc0bc98: 4b ff ff 8c b ffc0bc24 ffc0bc9c: 2f 96 00 03 cmpwi cr7,r22,3 ffc0bca0: 41 9e 00 50 beq- cr7,ffc0bcf0 ffc0bca4: 2f 96 00 04 cmpwi cr7,r22,4 ffc0bca8: 40 9e ff 7c bne+ cr7,ffc0bc24 <== NEVER TAKEN ffc0bcac: 48 00 00 fc b ffc0bda8 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0bcb0: 81 38 26 e4 lwz r9,9956(r24) ffc0bcb4: 80 09 00 18 lwz r0,24(r9) ffc0bcb8: 7f 9b 00 00 cmpw cr7,r27,r0 ffc0bcbc: 41 be ff 68 beq- cr7,ffc0bc24 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ ffc0bcc0: 80 9f 00 10 lwz r4,16(r31) ffc0bcc4: 80 04 00 1c lwz r0,28(r4) ffc0bcc8: 7f 9b 00 00 cmpw cr7,r27,r0 ffc0bccc: 40 be 00 0c bne+ cr7,ffc0bcd8 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; ffc0bcd0: 38 84 00 08 addi r4,r4,8 ffc0bcd4: 48 00 00 70 b ffc0bd44 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) ffc0bcd8: 83 7b 00 08 lwz r27,8(r27) ffc0bcdc: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0bce0: 40 be 00 b4 bne+ cr7,ffc0bd94 rtems_set_errno_and_return_minus_one( ENOENT ); ffc0bce4: 48 00 35 2d bl ffc0f210 <__errno> ffc0bce8: 92 c3 00 00 stw r22,0(r3) ffc0bcec: 48 00 01 50 b ffc0be3c pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { ffc0bcf0: 80 1b 00 4c lwz r0,76(r27) ffc0bcf4: 2f 80 00 03 cmpwi cr7,r0,3 ffc0bcf8: 41 9e 00 0c beq- cr7,ffc0bd04 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { ffc0bcfc: 2f 80 00 04 cmpwi cr7,r0,4 ffc0bd00: 40 be 00 1c bne+ cr7,ffc0bd1c result = IMFS_evaluate_link( pathloc, 0 ); ffc0bd04: 7f e3 fb 78 mr r3,r31 ffc0bd08: 38 80 00 00 li r4,0 ffc0bd0c: 4b ff fe 25 bl ffc0bb30 if ( result == -1 ) ffc0bd10: 2f 83 ff ff cmpwi cr7,r3,-1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); ffc0bd14: 7c 7b 1b 78 mr r27,r3 if ( result == -1 ) ffc0bd18: 41 9e 01 28 beq- cr7,ffc0be40 <== NEVER TAKEN return -1; } node = pathloc->node_access; ffc0bd1c: 80 7f 00 00 lwz r3,0(r31) if ( !node ) ffc0bd20: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bd24: 41 9e 00 ec beq- cr7,ffc0be10 <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) ffc0bd28: 80 03 00 4c lwz r0,76(r3) ffc0bd2c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0bd30: 40 9e 00 e0 bne- cr7,ffc0be10 /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { ffc0bd34: 80 83 00 5c lwz r4,92(r3) ffc0bd38: 2f 84 00 00 cmpwi cr7,r4,0 ffc0bd3c: 41 be 00 48 beq+ cr7,ffc0bd84 newloc = node->info.directory.mt_fs->mt_fs_root; ffc0bd40: 38 84 00 1c addi r4,r4,28 ffc0bd44: 39 61 00 0c addi r11,r1,12 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0bd48: 80 01 00 08 lwz r0,8(r1) * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; ffc0bd4c: 7c a4 a4 aa lswi r5,r4,20 ffc0bd50: 7c ab a5 aa stswi r5,r11,20 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0bd54: 7f e4 fb 78 mr r4,r31 ffc0bd58: 7f c0 f0 50 subf r30,r0,r30 * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; ffc0bd5c: 7c ab a4 aa lswi r5,r11,20 ffc0bd60: 7c bf a5 aa stswi r5,r31,20 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0bd64: 7c 7d f2 14 add r3,r29,r30 ffc0bd68: 7f 85 e3 78 mr r5,r28 ffc0bd6c: 81 3f 00 0c lwz r9,12(r31) ffc0bd70: 80 09 00 04 lwz r0,4(r9) ffc0bd74: 7c 09 03 a6 mtctr r0 ffc0bd78: 4e 80 04 21 bctrl ffc0bd7c: 7c 7b 1b 78 mr r27,r3 ffc0bd80: 48 00 00 c0 b ffc0be40 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); ffc0bd84: 7f 24 cb 78 mr r4,r25 ffc0bd88: 48 00 01 81 bl ffc0bf08 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) ffc0bd8c: 7c 7b 1b 79 mr. r27,r3 ffc0bd90: 41 82 00 24 beq- ffc0bdb4 done = true; else pathloc->node_access = node; ffc0bd94: 93 7f 00 00 stw r27,0(r31) ffc0bd98: 4b ff fe 8c b ffc0bc24 break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); ffc0bd9c: 48 00 34 75 bl ffc0f210 <__errno> ffc0bda0: 38 00 00 11 li r0,17 ffc0bda4: 48 00 00 94 b ffc0be38 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); ffc0bda8: 48 00 34 69 bl ffc0f210 <__errno> ffc0bdac: 38 00 00 5b li r0,91 ffc0bdb0: 48 00 00 88 b ffc0be38 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; ffc0bdb4: 80 01 00 08 lwz r0,8(r1) ffc0bdb8: 7c 00 f0 50 subf r0,r0,r30 ffc0bdbc: 7c 1d 02 14 add r0,r29,r0 * pathloc is returned with a pointer to the parent of the new node. * name is returned with a pointer to the first character in the * new node name. The parent node is verified to be a directory. */ int IMFS_evaluate_for_make( ffc0bdc0: 3b de ff ff addi r30,r30,-1 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; ffc0bdc4: 90 1c 00 00 stw r0,0(r28) * pathloc is returned with a pointer to the parent of the new node. * name is returned with a pointer to the first character in the * new node name. The parent node is verified to be a directory. */ int IMFS_evaluate_for_make( ffc0bdc8: 7f bd f2 14 add r29,r29,r30 /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { ffc0bdcc: 48 00 00 1c b ffc0bde8 if ( !IMFS_is_separator( path[ i ] ) ) ffc0bdd0: 4b ff 93 15 bl ffc050e4 ffc0bdd4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bdd8: 40 be 00 10 bne+ cr7,ffc0bde8 rtems_set_errno_and_return_minus_one( ENOENT ); ffc0bddc: 48 00 34 35 bl ffc0f210 <__errno> ffc0bde0: 38 00 00 02 li r0,2 ffc0bde4: 48 00 00 54 b ffc0be38 /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { ffc0bde8: 8c 7d 00 01 lbzu r3,1(r29) ffc0bdec: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bdf0: 40 9e ff e0 bne+ cr7,ffc0bdd0 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); ffc0bdf4: 7f e3 fb 78 mr r3,r31 ffc0bdf8: 4b ff f9 3d bl ffc0b734 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) ffc0bdfc: 81 3f 00 00 lwz r9,0(r31) /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); ffc0be00: 7c 7b 1b 78 mr r27,r3 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) ffc0be04: 80 09 00 4c lwz r0,76(r9) ffc0be08: 2f 80 00 01 cmpwi cr7,r0,1 ffc0be0c: 41 be 00 10 beq+ cr7,ffc0be1c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc0be10: 48 00 34 01 bl ffc0f210 <__errno> ffc0be14: 38 00 00 14 li r0,20 ffc0be18: 48 00 00 20 b ffc0be38 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) ffc0be1c: 7f e3 fb 78 mr r3,r31 ffc0be20: 38 80 00 03 li r4,3 ffc0be24: 4b ff f9 81 bl ffc0b7a4 ffc0be28: 2f 83 00 00 cmpwi cr7,r3,0 ffc0be2c: 40 be 00 14 bne+ cr7,ffc0be40 rtems_set_errno_and_return_minus_one( EACCES ); ffc0be30: 48 00 33 e1 bl ffc0f210 <__errno> ffc0be34: 38 00 00 0d li r0,13 ffc0be38: 90 03 00 00 stw r0,0(r3) ffc0be3c: 3b 60 ff ff li r27,-1 return result; } ffc0be40: 39 61 00 78 addi r11,r1,120 ffc0be44: 7f 63 db 78 mr r3,r27 ffc0be48: 48 00 83 80 b ffc141c8 <_restgpr_21_x> =============================================================================== ffc0b7a4 : */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { ffc0b7a4: 7c 08 02 a6 mflr r0 ffc0b7a8: 94 21 ff f8 stwu r1,-8(r1) ffc0b7ac: 90 01 00 0c stw r0,12(r1) uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) ffc0b7b0: 54 80 00 39 rlwinm. r0,r4,0,0,28 ffc0b7b4: 41 a2 00 18 beq+ ffc0b7cc <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); ffc0b7b8: 48 00 3a 59 bl ffc0f210 <__errno> <== NOT EXECUTED ffc0b7bc: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0b7c0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0b7c4: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0b7c8: 48 00 00 20 b ffc0b7e8 <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) ffc0b7cc: 81 23 00 00 lwz r9,0(r3) */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; ffc0b7d0: 54 84 30 32 rlwinm r4,r4,6,0,25 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) ffc0b7d4: 80 69 00 30 lwz r3,48(r9) ffc0b7d8: 7c 83 18 38 and r3,r4,r3 gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); ffc0b7dc: 7c 63 22 78 xor r3,r3,r4 ffc0b7e0: 7c 63 00 34 cntlzw r3,r3 ffc0b7e4: 54 63 d9 7e rlwinm r3,r3,27,5,31 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } ffc0b7e8: 80 01 00 0c lwz r0,12(r1) ffc0b7ec: 38 21 00 08 addi r1,r1,8 ffc0b7f0: 7c 08 03 a6 mtlr r0 ffc0b7f4: 4e 80 00 20 blr =============================================================================== ffc04c6c : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { ffc04c6c: 7c 2b 0b 78 mr r11,r1 ffc04c70: 7c 08 02 a6 mflr r0 ffc04c74: 94 21 ff f0 stwu r1,-16(r1) ffc04c78: 7c 68 1b 78 mr r8,r3 ffc04c7c: 90 01 00 14 stw r0,20(r1) ffc04c80: 48 01 b3 0d bl ffc1ff8c <_savegpr_31> off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); ffc04c84: 81 23 00 1c lwz r9,28(r3) ffc04c88: 80 69 00 50 lwz r3,80(r9) ffc04c8c: 48 00 a2 d1 bl ffc0ef5c IMFS_FIFO_RETURN(err); ffc04c90: 7c 69 fe 71 srawi. r9,r3,31 rtems_libio_t *iop, rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); ffc04c94: 7c 7f 1b 78 mr r31,r3 IMFS_FIFO_RETURN(err); ffc04c98: 41 80 00 0c blt- ffc04ca4 <== ALWAYS TAKEN ffc04c9c: 7c 6a 1b 78 mr r10,r3 ffc04ca0: 48 00 00 18 b ffc04cb8 ffc04ca4: 48 00 c6 6d bl ffc11310 <__errno> ffc04ca8: 7f ff 00 d0 neg r31,r31 ffc04cac: 93 e3 00 00 stw r31,0(r3) ffc04cb0: 39 20 ff ff li r9,-1 ffc04cb4: 39 40 ff ff li r10,-1 } ffc04cb8: 39 61 00 10 addi r11,r1,16 ffc04cbc: 7d 23 4b 78 mr r3,r9 ffc04cc0: 7d 44 53 78 mr r4,r10 ffc04cc4: 48 01 b3 14 b ffc1ffd8 <_restgpr_31_x> =============================================================================== ffc04d54 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { ffc04d54: 94 21 ff e0 stwu r1,-32(r1) ffc04d58: 7c 08 02 a6 mflr r0 ffc04d5c: 7c 66 1b 78 mr r6,r3 ffc04d60: 90 01 00 24 stw r0,36(r1) ffc04d64: bf c1 00 18 stmw r30,24(r1) IMFS_jnode_t *jnode = iop->pathinfo.node_access; ffc04d68: 83 e3 00 1c lwz r31,28(r3) int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); ffc04d6c: 80 7f 00 50 lwz r3,80(r31) ffc04d70: 48 00 9f a5 bl ffc0ed14 if (err > 0) { ffc04d74: 7c 7e 1b 79 mr. r30,r3 ffc04d78: 40 81 00 24 ble- ffc04d9c IMFS_mtime_ctime_update(jnode); ffc04d7c: 38 61 00 08 addi r3,r1,8 ffc04d80: 38 80 00 00 li r4,0 ffc04d84: 48 00 11 d1 bl ffc05f54 ffc04d88: 80 01 00 08 lwz r0,8(r1) ffc04d8c: 7f c3 f3 78 mr r3,r30 ffc04d90: 90 1f 00 44 stw r0,68(r31) ffc04d94: 90 1f 00 48 stw r0,72(r31) ffc04d98: 48 00 00 20 b ffc04db8 } IMFS_FIFO_RETURN(err); ffc04d9c: 41 a2 00 18 beq+ ffc04db4 <== NEVER TAKEN ffc04da0: 48 00 c5 71 bl ffc11310 <__errno> ffc04da4: 7f de 00 d0 neg r30,r30 ffc04da8: 93 c3 00 00 stw r30,0(r3) ffc04dac: 38 60 ff ff li r3,-1 ffc04db0: 48 00 00 08 b ffc04db8 ffc04db4: 38 60 00 00 li r3,0 } ffc04db8: 39 61 00 20 addi r11,r1,32 ffc04dbc: 48 01 b2 18 b ffc1ffd4 <_restgpr_30_x> =============================================================================== ffc0bf08 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0bf08: 94 21 ff e8 stwu r1,-24(r1) ffc0bf0c: 7c 08 02 a6 mflr r0 ffc0bf10: bf a1 00 0c stmw r29,12(r1) /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0bf14: 3f c0 ff c1 lis r30,-63 ffc0bf18: 3b de 5f d0 addi r30,r30,24528 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0bf1c: 7c 7f 1b 78 mr r31,r3 ffc0bf20: 90 01 00 1c stw r0,28(r1) /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0bf24: 7c 83 23 78 mr r3,r4 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0bf28: 7c 9d 23 78 mr r29,r4 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0bf2c: 7f c4 f3 78 mr r4,r30 ffc0bf30: 48 00 43 a5 bl ffc102d4 ffc0bf34: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bf38: 41 9e 00 58 beq- cr7,ffc0bf90 <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) ffc0bf3c: 7f a3 eb 78 mr r3,r29 ffc0bf40: 38 9e 00 04 addi r4,r30,4 ffc0bf44: 48 00 43 91 bl ffc102d4 ffc0bf48: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bf4c: 40 9e 00 0c bne- cr7,ffc0bf58 <== ALWAYS TAKEN return directory->Parent; ffc0bf50: 83 ff 00 08 lwz r31,8(r31) <== NOT EXECUTED ffc0bf54: 48 00 00 3c b ffc0bf90 <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } ffc0bf58: 83 df 00 50 lwz r30,80(r31) RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); ffc0bf5c: 3b ff 00 54 addi r31,r31,84 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); ffc0bf60: 48 00 00 1c b ffc0bf7c !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) ffc0bf64: 7f a3 eb 78 mr r3,r29 ffc0bf68: 38 9e 00 0c addi r4,r30,12 ffc0bf6c: 48 00 43 69 bl ffc102d4 ffc0bf70: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bf74: 41 9e 00 18 beq- cr7,ffc0bf8c the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { ffc0bf78: 83 de 00 00 lwz r30,0(r30) if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); ffc0bf7c: 7f 9e f8 00 cmpw cr7,r30,r31 ffc0bf80: 40 9e ff e4 bne+ cr7,ffc0bf64 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; ffc0bf84: 3b e0 00 00 li r31,0 ffc0bf88: 48 00 00 08 b ffc0bf90 for ( the_node = rtems_chain_first( the_chain ); !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; ffc0bf8c: 7f df f3 78 mr r31,r30 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } ffc0bf90: 39 61 00 18 addi r11,r1,24 ffc0bf94: 7f e3 fb 78 mr r3,r31 ffc0bf98: 48 00 82 50 b ffc141e8 <_restgpr_29_x> =============================================================================== ffc0be4c : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc0be4c: 94 21 ff c8 stwu r1,-56(r1) ffc0be50: 7c 08 02 a6 mflr r0 /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; ffc0be54: 7c 6b 1b 78 mr r11,r3 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc0be58: 90 01 00 3c stw r0,60(r1) * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; ffc0be5c: 38 81 00 08 addi r4,r1,8 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; ffc0be60: 38 00 00 00 li r0,0 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc0be64: bf a1 00 2c stmw r29,44(r1) temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); ffc0be68: 7c 9e 23 78 mr r30,r4 /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; ffc0be6c: 87 eb 00 1c lwzu r31,28(r11) loc = temp_mt_entry->mt_fs_root; ffc0be70: 7c ab a4 aa lswi r5,r11,20 ffc0be74: 7c a4 a5 aa stswi r5,r4,20 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; ffc0be78: 90 03 00 1c stw r0,28(r3) do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); ffc0be7c: 7f c3 f3 78 mr r3,r30 */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; ffc0be80: 83 bf 00 08 lwz r29,8(r31) loc.node_access = (void *)jnode; ffc0be84: 93 e1 00 08 stw r31,8(r1) IMFS_Set_handlers( &loc ); ffc0be88: 4b ff f8 ad bl ffc0b734 if ( jnode->type != IMFS_DIRECTORY ) { ffc0be8c: 80 1f 00 4c lwz r0,76(r31) ffc0be90: 2f 80 00 01 cmpwi cr7,r0,1 ffc0be94: 40 9e 00 14 bne- cr7,ffc0bea8 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { ffc0be98: 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 ); ffc0be9c: 38 1f 00 54 addi r0,r31,84 ffc0bea0: 7f 89 00 00 cmpw cr7,r9,r0 ffc0bea4: 40 be 00 1c bne+ cr7,ffc0bec0 result = IMFS_unlink( NULL, &loc ); ffc0bea8: 38 60 00 00 li r3,0 ffc0beac: 7f c4 f3 78 mr r4,r30 ffc0beb0: 4b ff 7d 01 bl ffc03bb0 if (result != 0) ffc0beb4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0beb8: 40 9e 00 3c bne- cr7,ffc0bef4 <== NEVER TAKEN return -1; jnode = next; ffc0bebc: 7f bf eb 78 mr r31,r29 } if ( jnode != NULL ) { ffc0bec0: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0bec4: 41 9e 00 38 beq- cr7,ffc0befc if ( jnode->type == IMFS_DIRECTORY ) { ffc0bec8: 80 1f 00 4c lwz r0,76(r31) ffc0becc: 2f 80 00 01 cmpwi cr7,r0,1 ffc0bed0: 40 9e ff ac bne+ cr7,ffc0be7c <== NEVER TAKEN } } } while (jnode != NULL); return 0; } ffc0bed4: 80 1f 00 50 lwz r0,80(r31) ffc0bed8: 39 3f 00 54 addi r9,r31,84 return -1; jnode = next; } if ( jnode != NULL ) { if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) ffc0bedc: 7f 80 48 00 cmpw cr7,r0,r9 ffc0bee0: 41 be ff 9c beq- cr7,ffc0be7c jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); ffc0bee4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bee8: 7c 1f 03 78 mr r31,r0 ffc0beec: 40 9e ff 90 bne+ cr7,ffc0be7c <== ALWAYS TAKEN ffc0bef0: 48 00 00 0c b ffc0befc <== NOT EXECUTED return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; ffc0bef4: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0bef8: 48 00 00 08 b ffc0bf00 <== NOT EXECUTED jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; ffc0befc: 38 60 00 00 li r3,0 } ffc0bf00: 39 61 00 38 addi r11,r1,56 ffc0bf04: 48 00 82 e4 b ffc141e8 <_restgpr_29_x> =============================================================================== ffc0bf9c : const char *path, int pathlen, char *token, int *token_len ) { ffc0bf9c: 94 21 ff e0 stwu r1,-32(r1) ffc0bfa0: 7c 08 02 a6 mflr r0 ffc0bfa4: bf 41 00 08 stmw r26,8(r1) ffc0bfa8: 7c 7f 1b 78 mr r31,r3 ffc0bfac: 7c 9d 23 78 mr r29,r4 ffc0bfb0: 90 01 00 24 stw r0,36(r1) ffc0bfb4: 7c be 2b 78 mr r30,r5 ffc0bfb8: 7c da 33 78 mr r26,r6 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; ffc0bfbc: 8b 63 00 00 lbz r27,0(r3) int pathlen, char *token, int *token_len ) { register int i = 0; ffc0bfc0: 3b 80 00 00 li r28,0 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { ffc0bfc4: 48 00 00 18 b ffc0bfdc token[i] = c; if ( i == IMFS_NAME_MAX ) ffc0bfc8: 2f 9c 00 20 cmpwi cr7,r28,32 * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; ffc0bfcc: 7f 7e e1 ae stbx r27,r30,r28 if ( i == IMFS_NAME_MAX ) ffc0bfd0: 41 9e 00 b4 beq- cr7,ffc0c084 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; ffc0bfd4: 3b 9c 00 01 addi r28,r28,1 ffc0bfd8: 7f 7f e0 ae lbzx r27,r31,r28 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { ffc0bfdc: 7f 63 db 78 mr r3,r27 ffc0bfe0: 4b ff 91 05 bl ffc050e4 ffc0bfe4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bfe8: 40 9e 00 0c bne- cr7,ffc0bff4 ffc0bfec: 7f 9c e8 00 cmpw cr7,r28,r29 ffc0bff0: 41 9c ff d8 blt+ cr7,ffc0bfc8 /* * Copy a seperator into token. */ if ( i == 0 ) { ffc0bff4: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0bff8: 40 9e 00 24 bne- cr7,ffc0c01c token[i] = c; if ( (token[i] != '\0') && pathlen ) { ffc0bffc: 2f 9b 00 00 cmpwi cr7,r27,0 /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; ffc0c000: 9b 7e 00 00 stb r27,0(r30) if ( (token[i] != '\0') && pathlen ) { i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; ffc0c004: 3b e0 00 00 li r31,0 */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { ffc0c008: 41 9e 00 3c beq- cr7,ffc0c044 ffc0c00c: 2f 9d 00 00 cmpwi cr7,r29,0 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; ffc0c010: 7f 9f e3 78 mr r31,r28 */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { ffc0c014: 41 9e 00 30 beq- cr7,ffc0c044 ffc0c018: 48 00 00 24 b ffc0c03c i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { ffc0c01c: 7d 3e e2 14 add r9,r30,r28 ffc0c020: 88 09 ff ff lbz r0,-1(r9) char *token, int *token_len ) { register int i = 0; IMFS_token_types type = IMFS_NAME; ffc0c024: 3b e0 00 03 li r31,3 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { ffc0c028: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c02c: 41 9e 00 18 beq- cr7,ffc0c044 <== NEVER TAKEN token[i] = '\0'; ffc0c030: 38 00 00 00 li r0,0 ffc0c034: 7c 1e e1 ae stbx r0,r30,r28 ffc0c038: 48 00 00 0c b ffc0c044 if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; type = IMFS_CURRENT_DIR; ffc0c03c: 3b e0 00 01 li r31,1 if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; ffc0c040: 3b 80 00 01 li r28,1 /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { ffc0c044: 2f 9f 00 03 cmpwi cr7,r31,3 /* * Set token_len to the number of characters copied. */ *token_len = i; ffc0c048: 93 9a 00 00 stw r28,0(r26) /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { ffc0c04c: 40 be 00 4c bne+ cr7,ffc0c098 if ( strcmp( token, "..") == 0 ) ffc0c050: 3c 80 ff c1 lis r4,-63 ffc0c054: 7f c3 f3 78 mr r3,r30 ffc0c058: 38 84 5f d7 addi r4,r4,24535 ffc0c05c: 48 00 42 79 bl ffc102d4 ffc0c060: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c064: 41 9e 00 28 beq- cr7,ffc0c08c type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) ffc0c068: 3c 80 ff c1 lis r4,-63 ffc0c06c: 7f c3 f3 78 mr r3,r30 ffc0c070: 38 84 5f d8 addi r4,r4,24536 ffc0c074: 48 00 42 61 bl ffc102d4 ffc0c078: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c07c: 41 9e 00 18 beq- cr7,ffc0c094 ffc0c080: 48 00 00 18 b ffc0c098 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; if ( i == IMFS_NAME_MAX ) return IMFS_INVALID_TOKEN; ffc0c084: 3b e0 00 04 li r31,4 ffc0c088: 48 00 00 10 b ffc0c098 * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; ffc0c08c: 3b e0 00 02 li r31,2 ffc0c090: 48 00 00 08 b ffc0c098 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; ffc0c094: 3b e0 00 01 li r31,1 } return type; } ffc0c098: 39 61 00 20 addi r11,r1,32 ffc0c09c: 7f e3 fb 78 mr r3,r31 ffc0c0a0: 48 00 81 3c b ffc141dc <_restgpr_26_x> =============================================================================== ffc0e0e4 : */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc0e0e4: 94 21 ff d8 stwu r1,-40(r1) IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc0e0e8: 3d 20 00 00 lis r9,0 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc0e0ec: 7c 08 02 a6 mflr r0 ffc0e0f0: bf 01 00 08 stmw r24,8(r1) ffc0e0f4: 7c 7f 1b 78 mr r31,r3 ffc0e0f8: 7c bc 2b 78 mr r28,r5 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc0e0fc: 83 c9 27 44 lwz r30,10052(r9) */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc0e100: 7c dd 33 78 mr r29,r6 ffc0e104: 90 01 00 2c stw r0,44(r1) IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc0e108: 57 c9 f0 be rlwinm r9,r30,30,2,31 ffc0e10c: 39 69 00 01 addi r11,r9,1 ffc0e110: 7d 6b 49 d6 mullw r11,r11,r9 ffc0e114: 38 0b 00 01 addi r0,r11,1 ffc0e118: 7d 20 49 d6 mullw r9,r0,r9 ffc0e11c: 38 00 00 00 li r0,0 ffc0e120: 7f 80 28 00 cmpw cr7,r0,r5 ffc0e124: 39 29 ff ff addi r9,r9,-1 ffc0e128: 7d 29 f1 d6 mullw r9,r9,r30 ffc0e12c: 41 bd 00 1c bgt+ cr7,ffc0e148 <== NEVER TAKEN ffc0e130: 40 9e 00 0c bne- cr7,ffc0e13c <== NEVER TAKEN ffc0e134: 7f 89 30 40 cmplw cr7,r9,r6 ffc0e138: 41 bd 00 10 bgt+ cr7,ffc0e148 rtems_set_errno_and_return_minus_one( EINVAL ); ffc0e13c: 48 00 10 d5 bl ffc0f210 <__errno> ffc0e140: 38 00 00 16 li r0,22 ffc0e144: 48 00 00 94 b ffc0e1d8 /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) ffc0e148: 83 3f 00 50 lwz r25,80(r31) ffc0e14c: 83 5f 00 54 lwz r26,84(r31) ffc0e150: 7f 9c c8 00 cmpw cr7,r28,r25 ffc0e154: 41 bd 00 10 bgt+ cr7,ffc0e164 <== NEVER TAKEN ffc0e158: 40 9e 00 a0 bne- cr7,ffc0e1f8 <== NEVER TAKEN ffc0e15c: 7f 9d d0 40 cmplw cr7,r29,r26 ffc0e160: 40 9d 00 98 ble- cr7,ffc0e1f8 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0e164: 7f db fe 70 srawi r27,r30,31 ffc0e168: 7f 65 db 78 mr r5,r27 ffc0e16c: 7f c6 f3 78 mr r6,r30 ffc0e170: 7f 83 e3 78 mr r3,r28 ffc0e174: 7f a4 eb 78 mr r4,r29 ffc0e178: 48 00 50 65 bl ffc131dc <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0e17c: 7f 65 db 78 mr r5,r27 ffc0e180: 7f c6 f3 78 mr r6,r30 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0e184: 7c 98 23 78 mr r24,r4 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0e188: 7f 23 cb 78 mr r3,r25 ffc0e18c: 7f 44 d3 78 mr r4,r26 ffc0e190: 48 00 50 4d bl ffc131dc <__divdi3> ffc0e194: 7c 9b 23 78 mr r27,r4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ffc0e198: 7c 9e 23 78 mr r30,r4 ffc0e19c: 48 00 00 4c b ffc0e1e8 if ( IMFS_memfile_addblock( the_jnode, block ) ) { ffc0e1a0: 7f e3 fb 78 mr r3,r31 ffc0e1a4: 7f c4 f3 78 mr r4,r30 ffc0e1a8: 4b ff fc e9 bl ffc0de90 ffc0e1ac: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e1b0: 41 be 00 34 beq+ cr7,ffc0e1e4 ffc0e1b4: 48 00 00 14 b ffc0e1c8 for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); ffc0e1b8: 7f c4 f3 78 mr r4,r30 ffc0e1bc: 7f e3 fb 78 mr r3,r31 ffc0e1c0: 4b ff fe e9 bl ffc0e0a8 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { ffc0e1c4: 3b de ff ff addi r30,r30,-1 ffc0e1c8: 7f 9e d8 40 cmplw cr7,r30,r27 ffc0e1cc: 40 9c ff ec bge+ cr7,ffc0e1b8 IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); ffc0e1d0: 48 00 10 41 bl ffc0f210 <__errno> ffc0e1d4: 38 00 00 1c li r0,28 ffc0e1d8: 90 03 00 00 stw r0,0(r3) ffc0e1dc: 38 60 ff ff li r3,-1 ffc0e1e0: 48 00 00 1c b ffc0e1fc old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ffc0e1e4: 3b de 00 01 addi r30,r30,1 ffc0e1e8: 7f 9e c0 40 cmplw cr7,r30,r24 ffc0e1ec: 40 9d ff b4 ble+ cr7,ffc0e1a0 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; ffc0e1f0: 93 9f 00 50 stw r28,80(r31) ffc0e1f4: 93 bf 00 54 stw r29,84(r31) /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) return 0; ffc0e1f8: 38 60 00 00 li r3,0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } ffc0e1fc: 39 61 00 28 addi r11,r1,40 ffc0e200: 48 00 5f d4 b ffc141d4 <_restgpr_24_x> =============================================================================== ffc0daa4 : my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc0daa4: 3d 20 00 00 lis r9,0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc0daa8: 94 21 ff e0 stwu r1,-32(r1) ffc0daac: 7c 08 02 a6 mflr r0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc0dab0: 81 29 27 44 lwz r9,10052(r9) #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc0dab4: 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 ) { ffc0dab8: 55 29 f0 be rlwinm r9,r9,30,2,31 ffc0dabc: 38 09 ff ff addi r0,r9,-1 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc0dac0: bf 61 00 0c stmw r27,12(r1) my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc0dac4: 7f 84 00 40 cmplw cr7,r4,r0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc0dac8: 7c 7f 1b 78 mr r31,r3 ffc0dacc: 7c 9e 23 78 mr r30,r4 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc0dad0: 41 9d 00 44 bgt- cr7,ffc0db14 p = info->indirect; if ( malloc_it ) { ffc0dad4: 2f 05 00 00 cmpwi cr6,r5,0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; ffc0dad8: 80 03 00 58 lwz r0,88(r3) ffc0dadc: 2f 80 00 00 cmpwi cr7,r0,0 if ( malloc_it ) { ffc0dae0: 41 9a 00 2c beq- cr6,ffc0db0c if ( !p ) { ffc0dae4: 40 be 00 18 bne+ cr7,ffc0dafc p = memfile_alloc_block(); ffc0dae8: 4b ff ff 79 bl ffc0da60 if ( !p ) return 0; ffc0daec: 3b a0 00 00 li r29,0 if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) ffc0daf0: 2c 03 00 00 cmpwi r3,0 ffc0daf4: 41 82 01 78 beq- ffc0dc6c <== NEVER TAKEN return 0; info->indirect = p; ffc0daf8: 90 7f 00 58 stw r3,88(r31) } return &info->indirect[ my_block ]; ffc0dafc: 83 bf 00 58 lwz r29,88(r31) ffc0db00: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc0db04: 7f bd f2 14 add r29,r29,r30 ffc0db08: 48 00 01 64 b ffc0dc6c } if ( !p ) ffc0db0c: 40 be 01 50 bne+ cr7,ffc0dc5c <== ALWAYS TAKEN ffc0db10: 48 00 01 58 b ffc0dc68 <== NOT EXECUTED /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { ffc0db14: 39 69 00 01 addi r11,r9,1 ffc0db18: 7d 6b 49 d6 mullw r11,r11,r9 ffc0db1c: 38 0b ff ff addi r0,r11,-1 ffc0db20: 7f 84 00 40 cmplw cr7,r4,r0 ffc0db24: 41 9d 00 60 bgt- cr7,ffc0db84 my_block -= FIRST_DOUBLY_INDIRECT; ffc0db28: 7f c9 20 50 subf r30,r9,r4 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; ffc0db2c: 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; ffc0db30: 7f 9e 4b 96 divwu r28,r30,r9 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { ffc0db34: 2f 05 00 00 cmpwi cr6,r5,0 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ffc0db38: 7d 3c 49 d6 mullw r9,r28,r9 ffc0db3c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0db40: 7f c9 f0 50 subf r30,r9,r30 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { ffc0db44: 41 9a 00 2c beq- cr6,ffc0db70 if ( !p ) { ffc0db48: 40 be 00 18 bne+ cr7,ffc0db60 p = memfile_alloc_block(); ffc0db4c: 4b ff ff 15 bl ffc0da60 if ( !p ) return 0; ffc0db50: 3b a0 00 00 li r29,0 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) ffc0db54: 2c 03 00 00 cmpwi r3,0 ffc0db58: 41 82 01 14 beq- ffc0dc6c <== NEVER TAKEN return 0; info->doubly_indirect = p; ffc0db5c: 90 7f 00 5c stw r3,92(r31) } p1 = (block_p *)p[ doubly ]; ffc0db60: 57 9c 10 3a rlwinm r28,r28,2,0,29 ffc0db64: 7f e3 e2 14 add r31,r3,r28 ffc0db68: 7c 63 e0 2e lwzx r3,r3,r28 ffc0db6c: 48 00 00 a4 b ffc0dc10 } return (block_p *)&p1[ singly ]; } if ( !p ) ffc0db70: 41 be 00 f8 beq+ cr7,ffc0dc68 <== NEVER TAKEN return 0; p = (block_p *)p[ doubly ]; ffc0db74: 57 9c 10 3a rlwinm r28,r28,2,0,29 ffc0db78: 7c 03 e0 2e lwzx r0,r3,r28 if ( !p ) return 0; ffc0db7c: 3b a0 00 00 li r29,0 ffc0db80: 48 00 00 d4 b ffc0dc54 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { ffc0db84: 39 4b 00 01 addi r10,r11,1 ffc0db88: 7d 4a 49 d6 mullw r10,r10,r9 } /* * This means the requested block number is out of range. */ return 0; ffc0db8c: 3b a0 00 00 li r29,0 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { ffc0db90: 38 0a ff ff addi r0,r10,-1 ffc0db94: 7f 84 00 40 cmplw cr7,r4,r0 ffc0db98: 41 9d 00 d4 bgt- cr7,ffc0dc6c <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; ffc0db9c: 7f cb 20 50 subf r30,r11,r4 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; ffc0dba0: 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; ffc0dba4: 7c 1e 4b 96 divwu r0,r30,r9 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; ffc0dba8: 7f 80 4b 96 divwu r28,r0,r9 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { ffc0dbac: 2f 05 00 00 cmpwi cr6,r5,0 * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ffc0dbb0: 7d 60 49 d6 mullw r11,r0,r9 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; ffc0dbb4: 7f 7c 49 d6 mullw r27,r28,r9 * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ffc0dbb8: 7f cb f0 50 subf r30,r11,r30 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; ffc0dbbc: 7f 7b 00 50 subf r27,r27,r0 ffc0dbc0: 2f 83 00 00 cmpwi cr7,r3,0 p = info->triply_indirect; if ( malloc_it ) { ffc0dbc4: 41 9a 00 74 beq- cr6,ffc0dc38 if ( !p ) { ffc0dbc8: 40 be 00 14 bne+ cr7,ffc0dbdc p = memfile_alloc_block(); ffc0dbcc: 4b ff fe 95 bl ffc0da60 if ( !p ) ffc0dbd0: 2c 03 00 00 cmpwi r3,0 ffc0dbd4: 41 82 00 98 beq- ffc0dc6c <== NEVER TAKEN return 0; info->triply_indirect = p; ffc0dbd8: 90 7f 00 60 stw r3,96(r31) } p1 = (block_p *) p[ triply ]; ffc0dbdc: 57 9c 10 3a rlwinm r28,r28,2,0,29 ffc0dbe0: 7f e3 e2 14 add r31,r3,r28 ffc0dbe4: 7c 63 e0 2e lwzx r3,r3,r28 if ( !p1 ) { ffc0dbe8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0dbec: 40 be 00 18 bne+ cr7,ffc0dc04 p1 = memfile_alloc_block(); ffc0dbf0: 4b ff fe 71 bl ffc0da60 if ( !p1 ) return 0; ffc0dbf4: 3b a0 00 00 li r29,0 } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) ffc0dbf8: 2c 03 00 00 cmpwi r3,0 ffc0dbfc: 41 82 00 70 beq- ffc0dc6c <== NEVER TAKEN return 0; p[ triply ] = (block_p) p1; ffc0dc00: 90 7f 00 00 stw r3,0(r31) } p2 = (block_p *)p1[ doubly ]; ffc0dc04: 57 7b 10 3a rlwinm r27,r27,2,0,29 ffc0dc08: 7f e3 da 14 add r31,r3,r27 ffc0dc0c: 7c 63 d8 2e lwzx r3,r3,r27 if ( !p2 ) { ffc0dc10: 2f 83 00 00 cmpwi cr7,r3,0 ffc0dc14: 40 be 00 18 bne+ cr7,ffc0dc2c p2 = memfile_alloc_block(); ffc0dc18: 4b ff fe 49 bl ffc0da60 if ( !p2 ) return 0; ffc0dc1c: 3b a0 00 00 li r29,0 } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) ffc0dc20: 2c 03 00 00 cmpwi r3,0 ffc0dc24: 41 82 00 48 beq- ffc0dc6c <== NEVER TAKEN return 0; p1[ doubly ] = (block_p) p2; ffc0dc28: 90 7f 00 00 stw r3,0(r31) } return (block_p *)&p2[ singly ]; ffc0dc2c: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc0dc30: 7f a3 f2 14 add r29,r3,r30 ffc0dc34: 48 00 00 38 b ffc0dc6c } if ( !p ) ffc0dc38: 41 be 00 34 beq+ cr7,ffc0dc6c <== NEVER TAKEN return 0; p1 = (block_p *) p[ triply ]; ffc0dc3c: 57 9c 10 3a rlwinm r28,r28,2,0,29 ffc0dc40: 7d 23 e0 2e lwzx r9,r3,r28 if ( !p1 ) ffc0dc44: 2f 89 00 00 cmpwi cr7,r9,0 ffc0dc48: 41 be 00 24 beq+ cr7,ffc0dc6c <== NEVER TAKEN return 0; p2 = (block_p *)p1[ doubly ]; ffc0dc4c: 57 7b 10 3a rlwinm r27,r27,2,0,29 ffc0dc50: 7c 09 d8 2e lwzx r0,r9,r27 if ( !p2 ) ffc0dc54: 2f 80 00 00 cmpwi cr7,r0,0 ffc0dc58: 41 9e 00 14 beq- cr7,ffc0dc6c <== NEVER TAKEN return 0; return (block_p *)&p2[ singly ]; ffc0dc5c: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc0dc60: 7f a0 f2 14 add r29,r0,r30 ffc0dc64: 48 00 00 08 b ffc0dc6c return (block_p *)&p1[ singly ]; } if ( !p ) return 0; ffc0dc68: 3b a0 00 00 li r29,0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } ffc0dc6c: 39 61 00 20 addi r11,r1,32 ffc0dc70: 7f a3 eb 78 mr r3,r29 ffc0dc74: 48 00 65 6c b ffc141e0 <_restgpr_27_x> =============================================================================== ffc0dc78 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc0dc78: 94 21 ff c8 stwu r1,-56(r1) ffc0dc7c: 7c 08 02 a6 mflr r0 ffc0dc80: 90 01 00 3c stw r0,60(r1) * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { ffc0dc84: 80 03 00 4c lwz r0,76(r3) IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc0dc88: bf 01 00 18 stmw r24,24(r1) ffc0dc8c: 7c 7d 1b 78 mr r29,r3 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { ffc0dc90: 2f 80 00 06 cmpwi cr7,r0,6 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc0dc94: 7c df 33 78 mr r31,r6 ffc0dc98: 7c be 2b 78 mr r30,r5 ffc0dc9c: 7c fc 3b 78 mr r28,r7 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { ffc0dca0: 40 be 00 68 bne+ cr7,ffc0dd08 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) ffc0dca4: 81 23 00 50 lwz r9,80(r3) ffc0dca8: 38 00 00 00 li r0,0 ffc0dcac: 81 43 00 54 lwz r10,84(r3) my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; ffc0dcb0: 80 83 00 58 lwz r4,88(r3) if (my_length > (the_jnode->info.linearfile.size - start)) ffc0dcb4: 7d 9f 50 10 subfc r12,r31,r10 ffc0dcb8: 7d 7e 49 10 subfe r11,r30,r9 ffc0dcbc: 7f 80 58 00 cmpw cr7,r0,r11 ffc0dcc0: 41 bd 00 10 bgt+ cr7,ffc0dcd0 <== NEVER TAKEN ffc0dcc4: 40 9e 00 14 bne- cr7,ffc0dcd8 <== NEVER TAKEN ffc0dcc8: 7f 88 60 40 cmplw cr7,r8,r12 ffc0dccc: 40 9d 00 0c ble- cr7,ffc0dcd8 <== NEVER TAKEN my_length = the_jnode->info.linearfile.size - start; ffc0dcd0: 7f 7f 50 50 subf r27,r31,r10 ffc0dcd4: 48 00 00 08 b ffc0dcdc /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; ffc0dcd8: 7d 1b 43 78 mr r27,r8 <== NOT EXECUTED file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); ffc0dcdc: 7c 84 fa 14 add r4,r4,r31 ffc0dce0: 7f 65 db 78 mr r5,r27 ffc0dce4: 7f 83 e3 78 mr r3,r28 ffc0dce8: 48 00 21 89 bl ffc0fe70 IMFS_update_atime( the_jnode ); ffc0dcec: 38 61 00 08 addi r3,r1,8 ffc0dcf0: 38 80 00 00 li r4,0 ffc0dcf4: 4b ff 65 35 bl ffc04228 ffc0dcf8: 80 01 00 08 lwz r0,8(r1) return my_length; ffc0dcfc: 7f 7e db 78 mr r30,r27 if (my_length > (the_jnode->info.linearfile.size - start)) my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); IMFS_update_atime( the_jnode ); ffc0dd00: 90 1d 00 40 stw r0,64(r29) return my_length; ffc0dd04: 48 00 01 64 b ffc0de68 /* * 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 ) ffc0dd08: 81 63 00 50 lwz r11,80(r3) ffc0dd0c: 39 40 00 00 li r10,0 /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; ffc0dd10: 7c c0 33 78 mr r0,r6 if ( last_byte > the_jnode->info.file.size ) ffc0dd14: 83 63 00 54 lwz r27,84(r3) ffc0dd18: 7f 8a 58 00 cmpw cr7,r10,r11 /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; ffc0dd1c: 7d 28 32 14 add r9,r8,r6 if ( last_byte > the_jnode->info.file.size ) ffc0dd20: 41 9d 00 10 bgt- cr7,ffc0dd30 <== NEVER TAKEN ffc0dd24: 40 9e 00 14 bne- cr7,ffc0dd38 <== NEVER TAKEN ffc0dd28: 7f 89 d8 40 cmplw cr7,r9,r27 ffc0dd2c: 40 9d 00 0c ble- cr7,ffc0dd38 my_length = the_jnode->info.file.size - start; ffc0dd30: 7f 60 d8 50 subf r27,r0,r27 ffc0dd34: 48 00 00 08 b ffc0dd3c /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; ffc0dd38: 7d 1b 43 78 mr r27,r8 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0dd3c: 3d 20 00 00 lis r9,0 ffc0dd40: 83 49 27 44 lwz r26,10052(r9) ffc0dd44: 7f c3 f3 78 mr r3,r30 ffc0dd48: 7f e4 fb 78 mr r4,r31 ffc0dd4c: 7f 58 fe 70 srawi r24,r26,31 ffc0dd50: 7f 05 c3 78 mr r5,r24 ffc0dd54: 7f 46 d3 78 mr r6,r26 ffc0dd58: 48 00 58 9d bl ffc135f4 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0dd5c: 7f c3 f3 78 mr r3,r30 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0dd60: 7c 99 23 78 mr r25,r4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0dd64: 7f 05 c3 78 mr r5,r24 ffc0dd68: 7f e4 fb 78 mr r4,r31 ffc0dd6c: 7f 46 d3 78 mr r6,r26 ffc0dd70: 48 00 54 6d bl ffc131dc <__divdi3> if ( start_offset ) { ffc0dd74: 2f 99 00 00 cmpwi cr7,r25,0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0dd78: 7c 98 23 78 mr r24,r4 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; ffc0dd7c: 7f 9f e3 78 mr r31,r28 */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; copied = 0; ffc0dd80: 3b c0 00 00 li r30,0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { ffc0dd84: 41 9e 00 4c beq- cr7,ffc0ddd0 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 ); ffc0dd88: 7f a3 eb 78 mr r3,r29 ffc0dd8c: 38 a0 00 00 li r5,0 ffc0dd90: 4b ff fd 15 bl ffc0daa4 if ( !block_ptr ) ffc0dd94: 2c 03 00 00 cmpwi r3,0 ffc0dd98: 41 82 00 d0 beq- ffc0de68 <== NEVER TAKEN * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; ffc0dd9c: 7f 59 d0 50 subf r26,r25,r26 ffc0dda0: 7f 9b d0 40 cmplw cr7,r27,r26 ffc0dda4: 7f 7e db 78 mr r30,r27 ffc0dda8: 40 9d 00 08 ble- cr7,ffc0ddb0 ffc0ddac: 7f 5e d3 78 mr r30,r26 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); ffc0ddb0: 80 83 00 00 lwz r4,0(r3) ffc0ddb4: 7f c5 f3 78 mr r5,r30 ffc0ddb8: 7f 83 e3 78 mr r3,r28 ffc0ddbc: 7c 84 ca 14 add r4,r4,r25 ffc0ddc0: 48 00 20 b1 bl ffc0fe70 dest += to_copy; ffc0ddc4: 7f fc f2 14 add r31,r28,r30 block++; ffc0ddc8: 3b 18 00 01 addi r24,r24,1 my_length -= to_copy; ffc0ddcc: 7f 7e d8 50 subf r27,r30,r27 } /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0ddd0: 3f 40 00 00 lis r26,0 ffc0ddd4: 83 9a 27 44 lwz r28,10052(r26) while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc0ddd8: 48 00 00 3c b ffc0de14 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc0dddc: 7f a3 eb 78 mr r3,r29 ffc0dde0: 7f 04 c3 78 mr r4,r24 ffc0dde4: 38 a0 00 00 li r5,0 ffc0dde8: 4b ff fc bd bl ffc0daa4 if ( !block_ptr ) ffc0ddec: 7c 69 1b 79 mr. r9,r3 ffc0ddf0: 41 82 00 78 beq- ffc0de68 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); ffc0ddf4: 80 89 00 00 lwz r4,0(r9) ffc0ddf8: 7f e3 fb 78 mr r3,r31 ffc0ddfc: 7f 85 e3 78 mr r5,r28 ffc0de00: 48 00 20 71 bl ffc0fe70 dest += to_copy; ffc0de04: 7f ff e2 14 add r31,r31,r28 block++; ffc0de08: 3b 18 00 01 addi r24,r24,1 my_length -= to_copy; ffc0de0c: 7f 7c d8 50 subf r27,r28,r27 copied += to_copy; ffc0de10: 7f de e2 14 add r30,r30,r28 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc0de14: 80 1a 27 44 lwz r0,10052(r26) ffc0de18: 7f 9b 00 40 cmplw cr7,r27,r0 ffc0de1c: 40 9c ff c0 bge+ cr7,ffc0dddc /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { ffc0de20: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0de24: 41 9e 00 30 beq- cr7,ffc0de54 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc0de28: 7f a3 eb 78 mr r3,r29 ffc0de2c: 7f 04 c3 78 mr r4,r24 ffc0de30: 38 a0 00 00 li r5,0 ffc0de34: 4b ff fc 71 bl ffc0daa4 if ( !block_ptr ) ffc0de38: 7c 69 1b 79 mr. r9,r3 ffc0de3c: 41 82 00 2c beq- ffc0de68 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); ffc0de40: 80 89 00 00 lwz r4,0(r9) ffc0de44: 7f e3 fb 78 mr r3,r31 ffc0de48: 7f 65 db 78 mr r5,r27 ffc0de4c: 48 00 20 25 bl ffc0fe70 copied += my_length; ffc0de50: 7f db f2 14 add r30,r27,r30 } IMFS_update_atime( the_jnode ); ffc0de54: 38 61 00 08 addi r3,r1,8 ffc0de58: 38 80 00 00 li r4,0 ffc0de5c: 4b ff 63 cd bl ffc04228 ffc0de60: 80 01 00 08 lwz r0,8(r1) ffc0de64: 90 1d 00 40 stw r0,64(r29) return copied; } ffc0de68: 39 61 00 38 addi r11,r1,56 ffc0de6c: 7f c3 f3 78 mr r3,r30 ffc0de70: 48 00 63 64 b ffc141d4 <_restgpr_24_x> =============================================================================== ffc0df78 : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc0df78: 94 21 ff d8 stwu r1,-40(r1) ffc0df7c: 7c 08 02 a6 mflr r0 /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; ffc0df80: 3d 20 00 00 lis r9,0 * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc0df84: bf 21 00 0c stmw r25,12(r1) ffc0df88: 7c 7f 1b 78 mr r31,r3 ffc0df8c: 90 01 00 2c stw r0,44(r1) * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { ffc0df90: 80 03 00 58 lwz r0,88(r3) /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; ffc0df94: 83 c9 27 44 lwz r30,10052(r9) * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { ffc0df98: 2f 80 00 00 cmpwi cr7,r0,0 /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; ffc0df9c: 57 de f0 be rlwinm r30,r30,30,2,31 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { ffc0dfa0: 41 9e 00 10 beq- cr7,ffc0dfb0 memfile_free_blocks_in_table( &info->indirect, to_free ); ffc0dfa4: 38 63 00 58 addi r3,r3,88 ffc0dfa8: 7f c4 f3 78 mr r4,r30 ffc0dfac: 4b ff ff 69 bl ffc0df14 } if ( info->doubly_indirect ) { ffc0dfb0: 80 1f 00 5c lwz r0,92(r31) ffc0dfb4: 3b a0 00 00 li r29,0 for ( i=0 ; iindirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { ffc0dfbc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0dfc0: 40 be 00 2c bne+ cr7,ffc0dfec ffc0dfc4: 48 00 00 44 b ffc0e008 for ( i=0 ; idoubly_indirect[i] ) { ffc0dfc8: 80 7f 00 5c lwz r3,92(r31) ffc0dfcc: 57 a0 10 3a rlwinm r0,r29,2,0,29 ffc0dfd0: 7d 23 00 2e lwzx r9,r3,r0 ffc0dfd4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0dfd8: 41 9e 00 10 beq- cr7,ffc0dfe8 <== NEVER TAKEN memfile_free_blocks_in_table( ffc0dfdc: 7c 63 02 14 add r3,r3,r0 ffc0dfe0: 7f c4 f3 78 mr r4,r30 ffc0dfe4: 4b ff ff 31 bl ffc0df14 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 ); ffc0dffc: 38 7f 00 5c addi r3,r31,92 ffc0e000: 7f c4 f3 78 mr r4,r30 ffc0e004: 4b ff ff 11 bl ffc0df14 } if ( info->triply_indirect ) { ffc0e008: 80 1f 00 60 lwz r0,96(r31) ffc0e00c: 3b a0 00 00 li r29,0 for ( i=0 ; idoubly_indirect, to_free ); } if ( info->triply_indirect ) { ffc0e014: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e018: 40 be 00 68 bne+ cr7,ffc0e080 ffc0e01c: 48 00 00 80 b ffc0e09c for ( i=0 ; itriply_indirect[i]; ffc0e020: 81 3f 00 60 lwz r9,96(r31) } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { ffc0e024: 57 b9 10 3a rlwinm r25,r29,2,0,29 for ( i=0 ; itriply_indirect[i]; ffc0e028: 7f 69 c8 2e lwzx r27,r9,r25 if ( !p ) /* ensure we have a valid pointer */ ffc0e02c: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0e030: 41 9e 00 60 beq- cr7,ffc0e090 <== NEVER TAKEN * a significant difference in the performance of this routine. * * Regardless until the IMFS implementation is proven, it * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( ffc0e034: 3b 7b ff fc addi r27,r27,-4 ffc0e038: 3b 80 00 00 li r28,0 ffc0e03c: 48 00 00 20 b ffc0e05c for ( i=0 ; itriply_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); ffc0e04c: 7f 63 db 78 mr r3,r27 ffc0e050: 7f c4 f3 78 mr r4,r30 ffc0e054: 4b ff fe c1 bl ffc0df14 if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( ffc0e06c: 80 7f 00 60 lwz r3,96(r31) ffc0e070: 7f c4 f3 78 mr r4,r30 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( ffc0e090: 38 7f 00 60 addi r3,r31,96 ffc0e094: 7f c4 f3 78 mr r4,r30 ffc0e098: 4b ff fe 7d bl ffc0df14 (block_p **)&info->triply_indirect, to_free ); } return 0; } ffc0e09c: 39 61 00 28 addi r11,r1,40 ffc0e0a0: 38 60 00 00 li r3,0 ffc0e0a4: 48 00 61 34 b ffc141d8 <_restgpr_25_x> =============================================================================== ffc0e204 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ffc0e204: 94 21 ff c8 stwu r1,-56(r1) ffc0e208: 7c 08 02 a6 mflr r0 ffc0e20c: bf 01 00 18 stmw r24,24(r1) ffc0e210: 7c de 33 78 mr r30,r6 ffc0e214: 7c 7f 1b 78 mr r31,r3 ffc0e218: 90 01 00 3c stw r0,60(r1) ffc0e21c: 7c bd 2b 78 mr r29,r5 ffc0e220: 7c fc 3b 78 mr r28,r7 * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { ffc0e224: 80 03 00 50 lwz r0,80(r3) IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ffc0e228: 7d 1b 43 78 mr r27,r8 /* * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; ffc0e22c: 7c c8 32 14 add r6,r8,r6 if ( last_byte > the_jnode->info.file.size ) { ffc0e230: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e234: 41 9c 00 14 blt- cr7,ffc0e248 <== NEVER TAKEN ffc0e238: 40 be 00 38 bne+ cr7,ffc0e270 <== NEVER TAKEN ffc0e23c: 80 03 00 54 lwz r0,84(r3) ffc0e240: 7f 80 30 40 cmplw cr7,r0,r6 ffc0e244: 40 bc 00 2c bge+ cr7,ffc0e270 <== NEVER TAKEN status = IMFS_memfile_extend( the_jnode, last_byte ); ffc0e248: 7f e3 fb 78 mr r3,r31 ffc0e24c: 38 a0 00 00 li r5,0 ffc0e250: 4b ff fe 95 bl ffc0e0e4 if ( status ) ffc0e254: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e258: 41 be 00 18 beq+ cr7,ffc0e270 rtems_set_errno_and_return_minus_one( ENOSPC ); ffc0e25c: 48 00 0f b5 bl ffc0f210 <__errno> ffc0e260: 38 00 00 1c li r0,28 ffc0e264: 90 03 00 00 stw r0,0(r3) ffc0e268: 38 00 ff ff li r0,-1 ffc0e26c: 48 00 01 3c b ffc0e3a8 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0e270: 3d 20 00 00 lis r9,0 ffc0e274: 83 49 27 44 lwz r26,10052(r9) ffc0e278: 7f c4 f3 78 mr r4,r30 ffc0e27c: 7f a3 eb 78 mr r3,r29 ffc0e280: 7f 58 fe 70 srawi r24,r26,31 ffc0e284: 7f 05 c3 78 mr r5,r24 ffc0e288: 7f 46 d3 78 mr r6,r26 ffc0e28c: 48 00 53 69 bl ffc135f4 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0e290: 7f a3 eb 78 mr r3,r29 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0e294: 7c 99 23 78 mr r25,r4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0e298: 7f 05 c3 78 mr r5,r24 ffc0e29c: 7f c4 f3 78 mr r4,r30 ffc0e2a0: 7f 46 d3 78 mr r6,r26 ffc0e2a4: 48 00 4f 39 bl ffc131dc <__divdi3> if ( start_offset ) { ffc0e2a8: 2f 99 00 00 cmpwi cr7,r25,0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0e2ac: 7c 9e 23 78 mr r30,r4 if ( start_offset ) { ffc0e2b0: 41 9e 00 50 beq- cr7,ffc0e300 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 ); ffc0e2b4: 7f e3 fb 78 mr r3,r31 ffc0e2b8: 38 a0 00 00 li r5,0 ffc0e2bc: 4b ff f7 e9 bl ffc0daa4 if ( !block_ptr ) return copied; ffc0e2c0: 38 00 00 00 li r0,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 ) ffc0e2c4: 2c 03 00 00 cmpwi r3,0 ffc0e2c8: 41 82 00 e0 beq- ffc0e3a8 <== NEVER TAKEN * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; ffc0e2cc: 7f 59 d0 50 subf r26,r25,r26 ffc0e2d0: 7f 9a d8 40 cmplw cr7,r26,r27 ffc0e2d4: 40 9d 00 08 ble- cr7,ffc0e2dc ffc0e2d8: 7f 7a db 78 mr r26,r27 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); ffc0e2dc: 80 63 00 00 lwz r3,0(r3) ffc0e2e0: 7f 84 e3 78 mr r4,r28 ffc0e2e4: 7f 45 d3 78 mr r5,r26 ffc0e2e8: 7c 63 ca 14 add r3,r3,r25 ffc0e2ec: 48 00 1b 85 bl ffc0fe70 src += to_copy; ffc0e2f0: 7f 9c d2 14 add r28,r28,r26 block++; ffc0e2f4: 3b de 00 01 addi r30,r30,1 my_length -= to_copy; ffc0e2f8: 7f 7a d8 50 subf r27,r26,r27 ffc0e2fc: 48 00 00 08 b ffc0e304 status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); } copied = 0; ffc0e300: 3b 40 00 00 li r26,0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; ffc0e304: 3f 20 00 00 lis r25,0 ffc0e308: 83 b9 27 44 lwz r29,10052(r25) while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc0e30c: 48 00 00 3c b ffc0e348 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc0e310: 7f e3 fb 78 mr r3,r31 ffc0e314: 7f c4 f3 78 mr r4,r30 ffc0e318: 38 a0 00 00 li r5,0 ffc0e31c: 4b ff f7 89 bl ffc0daa4 if ( !block_ptr ) ffc0e320: 2c 03 00 00 cmpwi r3,0 ffc0e324: 41 82 00 80 beq- ffc0e3a4 <== NEVER TAKEN return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); ffc0e328: 80 63 00 00 lwz r3,0(r3) ffc0e32c: 7f 84 e3 78 mr r4,r28 ffc0e330: 7f a5 eb 78 mr r5,r29 ffc0e334: 48 00 1b 3d bl ffc0fe70 src += to_copy; ffc0e338: 7f 9c ea 14 add r28,r28,r29 block++; ffc0e33c: 3b de 00 01 addi r30,r30,1 my_length -= to_copy; ffc0e340: 7f 7d d8 50 subf r27,r29,r27 * IMFS_memfile_write * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( ffc0e344: 7f 5a ea 14 add r26,r26,r29 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc0e348: 80 19 27 44 lwz r0,10052(r25) ffc0e34c: 7f 9b 00 40 cmplw cr7,r27,r0 ffc0e350: 40 9c ff c0 bge+ cr7,ffc0e310 * 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 ) { ffc0e354: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0e358: 41 9e 00 34 beq- cr7,ffc0e38c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc0e35c: 7f e3 fb 78 mr r3,r31 ffc0e360: 7f c4 f3 78 mr r4,r30 ffc0e364: 38 a0 00 00 li r5,0 ffc0e368: 4b ff f7 3d bl ffc0daa4 if ( !block_ptr ) ffc0e36c: 7f 40 d3 78 mr r0,r26 ffc0e370: 2c 03 00 00 cmpwi r3,0 ffc0e374: 41 82 00 34 beq- ffc0e3a8 <== 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 ); ffc0e378: 80 63 00 00 lwz r3,0(r3) ffc0e37c: 7f 84 e3 78 mr r4,r28 ffc0e380: 7f 65 db 78 mr r5,r27 ffc0e384: 48 00 1a ed bl ffc0fe70 my_length = 0; copied += to_copy; ffc0e388: 7f 5a da 14 add r26,r26,r27 } IMFS_mtime_ctime_update( the_jnode ); ffc0e38c: 38 61 00 08 addi r3,r1,8 ffc0e390: 38 80 00 00 li r4,0 ffc0e394: 4b ff 5e 95 bl ffc04228 ffc0e398: 80 01 00 08 lwz r0,8(r1) ffc0e39c: 90 1f 00 44 stw r0,68(r31) ffc0e3a0: 90 1f 00 48 stw r0,72(r31) */ 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 ) ffc0e3a4: 7f 40 d3 78 mr r0,r26 } IMFS_mtime_ctime_update( the_jnode ); return copied; } ffc0e3a8: 39 61 00 38 addi r11,r1,56 ffc0e3ac: 7c 03 03 78 mr r3,r0 ffc0e3b0: 48 00 5e 24 b ffc141d4 <_restgpr_24_x> =============================================================================== ffc03a10 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { ffc03a10: 7c 08 02 a6 mflr r0 ffc03a14: 94 21 ff f8 stwu r1,-8(r1) ffc03a18: 90 01 00 0c stw r0,12(r1) IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; ffc03a1c: 81 23 00 08 lwz r9,8(r3) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) ffc03a20: 80 09 00 4c lwz r0,76(r9) ffc03a24: 2f 80 00 01 cmpwi cr7,r0,1 ffc03a28: 41 be 00 18 beq+ cr7,ffc03a40 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc03a2c: 48 00 b7 e5 bl ffc0f210 <__errno> <== NOT EXECUTED ffc03a30: 38 00 00 14 li r0,20 <== NOT EXECUTED ffc03a34: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc03a38: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc03a3c: 48 00 00 0c b ffc03a48 <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; ffc03a40: 90 69 00 5c stw r3,92(r9) return 0; ffc03a44: 38 60 00 00 li r3,0 } ffc03a48: 80 01 00 0c lwz r0,12(r1) ffc03a4c: 38 21 00 08 addi r1,r1,8 ffc03a50: 7c 08 03 a6 mtlr r0 ffc03a54: 4e 80 00 20 blr =============================================================================== ffc06a74 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { ffc06a74: 94 21 ff f0 stwu r1,-16(r1) ffc06a78: 7c 08 02 a6 mflr r0 ffc06a7c: bf c1 00 08 stmw r30,8(r1) IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); ffc06a80: 3f c0 00 00 lis r30,0 * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { ffc06a84: 7c 7f 1b 78 mr r31,r3 ffc06a88: 90 01 00 14 stw r0,20(r1) IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); ffc06a8c: 38 63 00 0c addi r3,r3,12 ffc06a90: 81 3e 27 38 lwz r9,10040(r30) ffc06a94: 80 89 00 08 lwz r4,8(r9) ffc06a98: 48 00 dc e5 bl ffc1477c switch( the_jnode->type ) { ffc06a9c: 80 bf 00 4c lwz r5,76(r31) ffc06aa0: 38 05 ff ff addi r0,r5,-1 ffc06aa4: 2b 80 00 06 cmplwi cr7,r0,6 ffc06aa8: 41 9d 00 bc bgt- cr7,ffc06b64 <== NEVER TAKEN ffc06aac: 3d 20 ff c2 lis r9,-62 ffc06ab0: 39 29 64 74 addi r9,r9,25716 ffc06ab4: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc06ab8: 7c 09 00 2e lwzx r0,r9,r0 ffc06abc: 7d 20 4a 14 add r9,r0,r9 ffc06ac0: 7d 29 03 a6 mtctr r9 ffc06ac4: 4e 80 04 20 bctr case IMFS_DIRECTORY: fprintf(stdout, "/" ); ffc06ac8: 81 3e 27 38 lwz r9,10040(r30) ffc06acc: 38 60 00 2f li r3,47 ffc06ad0: 80 89 00 08 lwz r4,8(r9) ffc06ad4: 48 00 db 8d bl ffc14660 break; ffc06ad8: 48 00 00 a8 b ffc06b80 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", ffc06adc: 81 3e 27 38 lwz r9,10040(r30) ffc06ae0: 3c 80 ff c2 lis r4,-62 ffc06ae4: 38 84 64 90 addi r4,r4,25744 ffc06ae8: 80 bf 00 50 lwz r5,80(r31) ffc06aec: 80 69 00 08 lwz r3,8(r9) ffc06af0: 80 df 00 54 lwz r6,84(r31) ffc06af4: 48 00 00 1c b ffc06b10 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", ffc06af8: 81 3e 27 38 lwz r9,10040(r30) ffc06afc: 3c 80 ff c2 lis r4,-62 ffc06b00: 80 bf 00 54 lwz r5,84(r31) ffc06b04: 38 84 64 a3 addi r4,r4,25763 ffc06b08: 80 69 00 08 lwz r3,8(r9) ffc06b0c: 80 df 00 58 lwz r6,88(r31) ffc06b10: 4c c6 31 82 crclr 4*cr1+eq ffc06b14: 48 00 da 65 bl ffc14578 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; ffc06b18: 48 00 00 68 b ffc06b80 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", ffc06b1c: 81 3e 27 38 lwz r9,10040(r30) ffc06b20: 3c 80 ff c2 lis r4,-62 ffc06b24: 80 bf 00 54 lwz r5,84(r31) ffc06b28: 38 84 64 b2 addi r4,r4,25778 ffc06b2c: 80 69 00 08 lwz r3,8(r9) ffc06b30: 4c c6 31 82 crclr 4*cr1+eq ffc06b34: 48 00 da 45 bl ffc14578 (uint32_t)the_jnode->info.file.size ); #endif break; ffc06b38: 48 00 00 48 b ffc06b80 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); ffc06b3c: 3c 60 ff c2 lis r3,-62 ffc06b40: 81 3e 27 38 lwz r9,10040(r30) <== NOT EXECUTED ffc06b44: 38 63 64 be addi r3,r3,25790 <== NOT EXECUTED ffc06b48: 48 00 00 10 b ffc06b58 <== NOT EXECUTED return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); ffc06b4c: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc06b50: 81 3e 27 38 lwz r9,10040(r30) <== NOT EXECUTED ffc06b54: 38 63 64 d2 addi r3,r3,25810 <== NOT EXECUTED ffc06b58: 80 89 00 08 lwz r4,8(r9) <== NOT EXECUTED ffc06b5c: 48 00 dc 21 bl ffc1477c <== NOT EXECUTED return; ffc06b60: 48 00 00 2c b ffc06b8c <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); ffc06b64: 81 3e 27 38 lwz r9,10040(r30) <== NOT EXECUTED ffc06b68: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc06b6c: 38 84 64 e5 addi r4,r4,25829 <== NOT EXECUTED ffc06b70: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED ffc06b74: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc06b78: 48 00 da 01 bl ffc14578 <== NOT EXECUTED return; ffc06b7c: 48 00 00 10 b ffc06b8c <== NOT EXECUTED } puts(""); ffc06b80: 3c 60 ff c2 lis r3,-62 ffc06b84: 38 63 67 0b addi r3,r3,26379 ffc06b88: 48 00 fb c1 bl ffc16748 } ffc06b8c: 39 61 00 10 addi r11,r1,16 ffc06b90: 4b ff c9 e0 b ffc03570 <_restgpr_30_x> =============================================================================== ffc03a64 : ssize_t IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { ffc03a64: 2f 85 00 00 cmpwi cr7,r5,0 IMFS_jnode_t *node; ssize_t i; node = loc->node_access; ffc03a68: 81 63 00 00 lwz r11,0(r3) IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) ffc03a6c: 38 05 00 01 addi r0,r5,1 ffc03a70: 38 60 00 00 li r3,0 ffc03a74: 40 be 00 14 bne+ cr7,ffc03a88 <== ALWAYS TAKEN ffc03a78: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc03a7c: 48 00 00 0c b ffc03a88 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; ffc03a80: 7d 24 19 ae stbx r9,r4,r3 node = loc->node_access; IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) ffc03a84: 38 63 00 01 addi r3,r3,1 ffc03a88: 34 00 ff ff addic. r0,r0,-1 ffc03a8c: 4d 82 00 20 beqlr ffc03a90: 81 2b 00 50 lwz r9,80(r11) ffc03a94: 7d 29 18 ae lbzx r9,r9,r3 ffc03a98: 2f 89 00 00 cmpwi cr7,r9,0 ffc03a9c: 40 9e ff e4 bne+ cr7,ffc03a80 buf[i] = node->info.sym_link.name[i]; return i; } ffc03aa0: 4e 80 00 20 blr =============================================================================== ffc03aa4 : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { ffc03aa4: 94 21 ff e0 stwu r1,-32(r1) ffc03aa8: 7c 08 02 a6 mflr r0 ffc03aac: 90 01 00 24 stw r0,36(r1) ffc03ab0: bf c1 00 18 stmw r30,24(r1) ffc03ab4: 7c be 2b 78 mr r30,r5 IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); ffc03ab8: 38 a0 00 20 li r5,32 ) { IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; ffc03abc: 83 e4 00 00 lwz r31,0(r4) strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); ffc03ac0: 7c c4 33 78 mr r4,r6 ffc03ac4: 38 7f 00 0c addi r3,r31,12 ffc03ac8: 48 00 ca 75 bl ffc1053c if ( the_jnode->Parent != NULL ) ffc03acc: 80 1f 00 08 lwz r0,8(r31) ffc03ad0: 2f 80 00 00 cmpwi cr7,r0,0 ffc03ad4: 41 9e 00 0c beq- cr7,ffc03ae0 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc03ad8: 7f e3 fb 78 mr r3,r31 ffc03adc: 48 00 48 5d bl ffc08338 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; ffc03ae0: 80 7e 00 00 lwz r3,0(r30) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); ffc03ae4: 7f e4 fb 78 mr r4,r31 the_jnode->Parent = new_parent; ffc03ae8: 90 7f 00 08 stw r3,8(r31) ffc03aec: 38 63 00 50 addi r3,r3,80 ffc03af0: 48 00 48 19 bl ffc08308 <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); ffc03af4: 38 61 00 08 addi r3,r1,8 ffc03af8: 38 80 00 00 li r4,0 ffc03afc: 48 00 07 2d bl ffc04228 ffc03b00: 80 01 00 08 lwz r0,8(r1) return 0; } ffc03b04: 39 61 00 20 addi r11,r1,32 ffc03b08: 38 60 00 00 li r3,0 rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); ffc03b0c: 90 1f 00 48 stw r0,72(r31) return 0; } ffc03b10: 48 01 06 dc b ffc141ec <_restgpr_30_x> =============================================================================== ffc0c1b0 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { ffc0c1b0: 7c 08 02 a6 mflr r0 ffc0c1b4: 94 21 ff f8 stwu r1,-8(r1) ffc0c1b8: 90 01 00 0c stw r0,12(r1) IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; ffc0c1bc: 81 63 00 00 lwz r11,0(r3) switch ( the_jnode->type ) { ffc0c1c0: 81 2b 00 4c lwz r9,76(r11) ffc0c1c4: 38 09 ff fe addi r0,r9,-2 ffc0c1c8: 2b 80 00 05 cmplwi cr7,r0,5 ffc0c1cc: 41 9d 00 54 bgt- cr7,ffc0c220 <== NEVER TAKEN ffc0c1d0: 3d 20 ff c1 lis r9,-63 ffc0c1d4: 39 29 60 bc addi r9,r9,24764 ffc0c1d8: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0c1dc: 7c 09 00 2e lwzx r0,r9,r0 ffc0c1e0: 7d 20 4a 14 add r9,r0,r9 ffc0c1e4: 7d 29 03 a6 mtctr r9 ffc0c1e8: 4e 80 04 20 bctr case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); ffc0c1ec: 80 0b 00 54 lwz r0,84(r11) rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; ffc0c1f0: 81 2b 00 50 lwz r9,80(r11) ffc0c1f4: 90 04 00 1c stw r0,28(r4) ffc0c1f8: 91 24 00 18 stw r9,24(r4) break; ffc0c1fc: 48 00 00 38 b ffc0c234 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; ffc0c200: 81 2b 00 50 lwz r9,80(r11) ffc0c204: 81 4b 00 54 lwz r10,84(r11) ffc0c208: 48 00 00 0c b ffc0c214 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; ffc0c20c: 39 20 00 00 li r9,0 ffc0c210: 39 40 00 00 li r10,0 ffc0c214: 91 24 00 20 stw r9,32(r4) ffc0c218: 91 44 00 24 stw r10,36(r4) break; ffc0c21c: 48 00 00 18 b ffc0c234 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc0c220: 48 00 2f f1 bl ffc0f210 <__errno> ffc0c224: 38 00 00 86 li r0,134 ffc0c228: 90 03 00 00 stw r0,0(r3) ffc0c22c: 38 60 ff ff li r3,-1 ffc0c230: 48 00 00 64 b ffc0c294 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; ffc0c234: 81 23 00 10 lwz r9,16(r3) buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; ffc0c238: 38 60 00 00 li r3,0 * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); ffc0c23c: 81 29 00 34 lwz r9,52(r9) ffc0c240: 80 09 00 00 lwz r0,0(r9) ffc0c244: 39 20 00 00 li r9,0 ffc0c248: 61 29 ff fe ori r9,r9,65534 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = ffc0c24c: 90 04 00 04 stw r0,4(r4) rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; ffc0c250: 80 0b 00 30 lwz r0,48(r11) /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = ffc0c254: 91 24 00 00 stw r9,0(r4) rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; ffc0c258: 90 04 00 0c stw r0,12(r4) buf->st_nlink = the_jnode->st_nlink; ffc0c25c: a0 0b 00 34 lhz r0,52(r11) ffc0c260: b0 04 00 10 sth r0,16(r4) buf->st_ino = the_jnode->st_ino; ffc0c264: 80 0b 00 38 lwz r0,56(r11) ffc0c268: 90 04 00 08 stw r0,8(r4) buf->st_uid = the_jnode->st_uid; ffc0c26c: a0 0b 00 3c lhz r0,60(r11) ffc0c270: b0 04 00 12 sth r0,18(r4) buf->st_gid = the_jnode->st_gid; ffc0c274: a0 0b 00 3e lhz r0,62(r11) ffc0c278: b0 04 00 14 sth r0,20(r4) buf->st_atime = the_jnode->stat_atime; ffc0c27c: 80 0b 00 40 lwz r0,64(r11) ffc0c280: 90 04 00 28 stw r0,40(r4) buf->st_mtime = the_jnode->stat_mtime; ffc0c284: 80 0b 00 44 lwz r0,68(r11) ffc0c288: 90 04 00 30 stw r0,48(r4) buf->st_ctime = the_jnode->stat_ctime; ffc0c28c: 80 0b 00 48 lwz r0,72(r11) ffc0c290: 90 04 00 38 stw r0,56(r4) return 0; } ffc0c294: 80 01 00 0c lwz r0,12(r1) ffc0c298: 38 21 00 08 addi r1,r1,8 ffc0c29c: 7c 08 03 a6 mtlr r0 ffc0c2a0: 4e 80 00 20 blr =============================================================================== ffc03bb0 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { ffc03bb0: 94 21 ff c8 stwu r1,-56(r1) ffc03bb4: 7c 08 02 a6 mflr r0 ffc03bb8: 90 01 00 3c stw r0,60(r1) ffc03bbc: bf 81 00 28 stmw r28,40(r1) ffc03bc0: 7c 7d 1b 78 mr r29,r3 ffc03bc4: 7c 9f 23 78 mr r31,r4 IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; ffc03bc8: 83 c4 00 00 lwz r30,0(r4) /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { ffc03bcc: 80 1e 00 4c lwz r0,76(r30) ffc03bd0: 2f 80 00 03 cmpwi cr7,r0,3 ffc03bd4: 40 9e 00 94 bne- cr7,ffc03c68 if ( !node->info.hard_link.link_node ) ffc03bd8: 80 1e 00 50 lwz r0,80(r30) ffc03bdc: 2f 80 00 00 cmpwi cr7,r0,0 ffc03be0: 40 be 00 18 bne+ cr7,ffc03bf8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ffc03be4: 48 00 b6 2d bl ffc0f210 <__errno> <== NOT EXECUTED ffc03be8: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc03bec: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc03bf0: 38 00 ff ff li r0,-1 <== NOT EXECUTED ffc03bf4: 48 00 00 90 b ffc03c84 <== NOT EXECUTED the_link = *loc; ffc03bf8: 3b 81 00 10 addi r28,r1,16 the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); ffc03bfc: 7f 83 e3 78 mr r3,r28 if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; ffc03c00: 7c a4 a4 aa lswi r5,r4,20 ffc03c04: 7c bc a5 aa stswi r5,r28,20 the_link.node_access = node->info.hard_link.link_node; ffc03c08: 90 01 00 10 stw r0,16(r1) IMFS_Set_handlers( &the_link ); ffc03c0c: 48 00 7b 29 bl ffc0b734 /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) ffc03c10: 81 3e 00 50 lwz r9,80(r30) ffc03c14: a1 69 00 34 lhz r11,52(r9) ffc03c18: 2f 8b 00 01 cmpwi cr7,r11,1 ffc03c1c: 40 be 00 2c bne+ cr7,ffc03c48 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); ffc03c20: 81 21 00 18 lwz r9,24(r1) ffc03c24: 7f a3 eb 78 mr r3,r29 ffc03c28: 7f 84 e3 78 mr r4,r28 ffc03c2c: 80 09 00 34 lwz r0,52(r9) ffc03c30: 7c 09 03 a6 mtctr r0 ffc03c34: 4e 80 04 21 bctrl if ( result != 0 ) return -1; ffc03c38: 38 00 ff ff li r0,-1 */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); if ( result != 0 ) ffc03c3c: 2f 83 00 00 cmpwi cr7,r3,0 ffc03c40: 41 be 00 28 beq+ cr7,ffc03c68 ffc03c44: 48 00 00 40 b ffc03c84 return -1; } else { node->info.hard_link.link_node->st_nlink --; ffc03c48: 39 6b ff ff addi r11,r11,-1 ffc03c4c: b1 69 00 34 sth r11,52(r9) IMFS_update_ctime( node->info.hard_link.link_node ); ffc03c50: 38 61 00 08 addi r3,r1,8 ffc03c54: 38 80 00 00 li r4,0 ffc03c58: 48 00 05 d1 bl ffc04228 ffc03c5c: 81 3e 00 50 lwz r9,80(r30) ffc03c60: 80 01 00 08 lwz r0,8(r1) ffc03c64: 90 09 00 48 stw r0,72(r9) /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); ffc03c68: 81 3f 00 08 lwz r9,8(r31) ffc03c6c: 7f a3 eb 78 mr r3,r29 ffc03c70: 7f e4 fb 78 mr r4,r31 ffc03c74: 80 09 00 34 lwz r0,52(r9) ffc03c78: 7c 09 03 a6 mtctr r0 ffc03c7c: 4e 80 04 21 bctrl ffc03c80: 7c 60 1b 78 mr r0,r3 return result; } ffc03c84: 39 61 00 38 addi r11,r1,56 ffc03c88: 7c 03 03 78 mr r3,r0 ffc03c8c: 48 01 05 58 b ffc141e4 <_restgpr_28_x> =============================================================================== ffc03c90 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { ffc03c90: 7c 08 02 a6 mflr r0 ffc03c94: 94 21 ff f8 stwu r1,-8(r1) ffc03c98: 90 01 00 0c stw r0,12(r1) IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; ffc03c9c: 81 23 00 08 lwz r9,8(r3) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) ffc03ca0: 80 09 00 4c lwz r0,76(r9) ffc03ca4: 2f 80 00 01 cmpwi cr7,r0,1 ffc03ca8: 41 be 00 10 beq+ cr7,ffc03cb8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc03cac: 48 00 b5 65 bl ffc0f210 <__errno> <== NOT EXECUTED ffc03cb0: 38 00 00 14 li r0,20 <== NOT EXECUTED ffc03cb4: 48 00 00 18 b ffc03ccc <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) ffc03cb8: 80 09 00 5c lwz r0,92(r9) ffc03cbc: 2f 80 00 00 cmpwi cr7,r0,0 ffc03cc0: 40 be 00 18 bne+ cr7,ffc03cd8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ ffc03cc4: 48 00 b5 4d bl ffc0f210 <__errno> <== NOT EXECUTED ffc03cc8: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc03ccc: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc03cd0: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc03cd4: 48 00 00 10 b ffc03ce4 <== NOT EXECUTED /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; ffc03cd8: 38 00 00 00 li r0,0 ffc03cdc: 90 09 00 5c stw r0,92(r9) return 0; ffc03ce0: 38 60 00 00 li r3,0 } ffc03ce4: 80 01 00 0c lwz r0,12(r1) ffc03ce8: 38 21 00 08 addi r1,r1,8 ffc03cec: 7c 08 03 a6 mtlr r0 ffc03cf0: 4e 80 00 20 blr =============================================================================== ffc0343c : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc0343c: 94 21 ff c0 stwu r1,-64(r1) ffc03440: 7c 08 02 a6 mflr r0 ffc03444: 90 01 00 44 stw r0,68(r1) * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) ffc03448: 3c 00 a5 a5 lis r0,-23131 ffc0344c: 60 00 a5 a5 ori r0,r0,42405 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc03450: be e1 00 1c stmw r23,28(r1) ffc03454: 7c 7b 1b 78 mr r27,r3 { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); ffc03458: 81 63 00 b8 lwz r11,184(r3) size = Stack_check_usable_stack_size(stack); ffc0345c: 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); ffc03460: 39 6b 00 80 addi r11,r11,128 current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); ffc03464: 83 43 00 c4 lwz r26,196(r3) } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); ffc03468: 3b 9c ff 80 addi r28,r28,-128 /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; ffc0346c: 39 2b 00 80 addi r9,r11,128 for (ebase = base + length; base < ebase; base++) ffc03470: 57 8a 00 3a rlwinm r10,r28,0,0,29 ffc03474: 7d 49 52 14 add r10,r9,r10 ffc03478: 48 00 00 14 b ffc0348c if (*base != U32_PATTERN) ffc0347c: 81 09 00 00 lwz r8,0(r9) ffc03480: 7f 88 00 00 cmpw cr7,r8,r0 ffc03484: 40 9e 00 18 bne- cr7,ffc0349c * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) ffc03488: 39 29 00 04 addi r9,r9,4 ffc0348c: 7f 89 50 40 cmplw cr7,r9,r10 ffc03490: 41 9c ff ec blt+ cr7,ffc0347c <== 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; ffc03494: 3b a0 00 00 li r29,0 <== NOT EXECUTED ffc03498: 48 00 00 18 b ffc034b0 <== NOT EXECUTED low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) ffc0349c: 2f 89 00 00 cmpwi cr7,r9,0 used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; ffc034a0: 3b a0 00 00 li r29,0 low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) ffc034a4: 41 9e 00 0c beq- cr7,ffc034b0 <== NEVER TAKEN used = Stack_check_Calculate_used( low, size, high_water_mark ); ffc034a8: 7f ab e2 14 add r29,r11,r28 ffc034ac: 7f a9 e8 50 subf r29,r9,r29 #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) #endif { (*print_handler)( ffc034b0: 3f c0 00 00 lis r30,0 ffc034b4: 83 1b 00 08 lwz r24,8(r27) ffc034b8: 3b fe 28 10 addi r31,r30,10256 ffc034bc: 83 3e 28 10 lwz r25,10256(r30) ffc034c0: 82 ff 00 04 lwz r23,4(r31) ffc034c4: 38 80 00 05 li r4,5 ffc034c8: 38 a1 00 08 addi r5,r1,8 ffc034cc: 7f 03 c3 78 mr r3,r24 ffc034d0: 48 00 42 39 bl ffc07708 ffc034d4: 3c 80 ff c1 lis r4,-63 ffc034d8: 7c 66 1b 78 mr r6,r3 ffc034dc: 7f 29 03 a6 mtctr r25 ffc034e0: 38 84 5d 9c addi r4,r4,23964 ffc034e4: 7f 05 c3 78 mr r5,r24 ffc034e8: 7e e3 bb 78 mr r3,r23 ffc034ec: 4c c6 31 82 crclr 4*cr1+eq ffc034f0: 4e 80 04 21 bctrl (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, ffc034f4: 80 db 00 b4 lwz r6,180(r27) else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( ffc034f8: 80 1e 28 10 lwz r0,10256(r30) ffc034fc: 3c 80 ff c1 lis r4,-63 print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, ffc03500: 80 bb 00 b8 lwz r5,184(r27) ffc03504: 38 c6 ff ff addi r6,r6,-1 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( ffc03508: 7c 09 03 a6 mtctr r0 ffc0350c: 80 7f 00 04 lwz r3,4(r31) ffc03510: 38 84 5d a9 addi r4,r4,23977 ffc03514: 7c c5 32 14 add r6,r5,r6 ffc03518: 7f 47 d3 78 mr r7,r26 ffc0351c: 7f 88 e3 78 mr r8,r28 ffc03520: 4c c6 31 82 crclr 4*cr1+eq ffc03524: 4e 80 04 21 bctrl stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { ffc03528: 80 1f 00 08 lwz r0,8(r31) ffc0352c: 2f 80 00 00 cmpwi cr7,r0,0 ffc03530: 40 be 00 24 bne+ cr7,ffc03554 <== ALWAYS TAKEN (*print_handler)( print_context, "Unavailable\n" ); ffc03534: 80 1e 28 10 lwz r0,10256(r30) <== NOT EXECUTED ffc03538: 3c 80 ff c1 lis r4,-63 <== NOT EXECUTED ffc0353c: 80 7f 00 04 lwz r3,4(r31) <== NOT EXECUTED ffc03540: 38 84 5d c7 addi r4,r4,24007 <== NOT EXECUTED ffc03544: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc03548: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc0354c: 4e 80 04 21 bctrl <== NOT EXECUTED ffc03550: 48 00 00 24 b ffc03574 <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); ffc03554: 80 1e 28 10 lwz r0,10256(r30) ffc03558: 3c 80 ff c1 lis r4,-63 ffc0355c: 80 7f 00 04 lwz r3,4(r31) ffc03560: 38 84 5d d4 addi r4,r4,24020 ffc03564: 7f a5 eb 78 mr r5,r29 ffc03568: 7c 09 03 a6 mtctr r0 ffc0356c: 4c c6 31 82 crclr 4*cr1+eq ffc03570: 4e 80 04 21 bctrl } } ffc03574: 39 61 00 40 addi r11,r1,64 ffc03578: 48 01 0c b8 b ffc14230 <_restgpr_23_x> =============================================================================== ffc0364c : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { ffc0364c: 94 21 ff c8 stwu r1,-56(r1) ffc03650: 7c 08 02 a6 mflr r0 ffc03654: 90 01 00 3c stw r0,60(r1) ffc03658: bf a1 00 2c stmw r29,44(r1) ffc0365c: 7c 7d 1b 78 mr r29,r3 ffc03660: 7c 9e 23 78 mr r30,r4 Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); ffc03664: 83 e3 00 b8 lwz r31,184(r3) char name[32]; printk("BLOWN STACK!!!\n"); ffc03668: 3c 60 ff c1 lis r3,-63 ffc0366c: 38 63 5d da addi r3,r3,24026 ffc03670: 4c c6 31 82 crclr 4*cr1+eq ffc03674: 48 00 1a e9 bl ffc0515c printk("task control block: 0x%08" PRIxPTR "\n", running); ffc03678: 3c 60 ff c1 lis r3,-63 ffc0367c: 38 63 5d ea addi r3,r3,24042 ffc03680: 7f a4 eb 78 mr r4,r29 ffc03684: 4c c6 31 82 crclr 4*cr1+eq ffc03688: 48 00 1a d5 bl ffc0515c printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); ffc0368c: 80 9d 00 08 lwz r4,8(r29) ffc03690: 3c 60 ff c1 lis r3,-63 ffc03694: 38 63 5e 07 addi r3,r3,24071 ffc03698: 4c c6 31 82 crclr 4*cr1+eq ffc0369c: 48 00 1a c1 bl ffc0515c printk( ffc036a0: 80 9d 00 0c lwz r4,12(r29) ffc036a4: 3c 60 ff c1 lis r3,-63 ffc036a8: 38 63 5e 19 addi r3,r3,24089 ffc036ac: 4c c6 31 82 crclr 4*cr1+eq ffc036b0: 48 00 1a ad bl ffc0515c "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( ffc036b4: 80 7d 00 08 lwz r3,8(r29) ffc036b8: 38 a1 00 08 addi r5,r1,8 ffc036bc: 38 80 00 20 li r4,32 ffc036c0: 48 00 40 49 bl ffc07708 ffc036c4: 7c 64 1b 78 mr r4,r3 ffc036c8: 3c 60 ff c1 lis r3,-63 ffc036cc: 38 63 5e 2d addi r3,r3,24109 ffc036d0: 4c c6 31 82 crclr 4*cr1+eq ffc036d4: 48 00 1a 89 bl ffc0515c ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ffc036d8: 80 bd 00 b8 lwz r5,184(r29) ffc036dc: 80 9d 00 b4 lwz r4,180(r29) ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( ffc036e0: 3c 60 ff c1 lis r3,-63 ffc036e4: 38 63 5e 43 addi r3,r3,24131 ffc036e8: 7c c5 22 14 add r6,r5,r4 ffc036ec: 4c c6 31 82 crclr 4*cr1+eq ffc036f0: 48 00 1a 6d bl ffc0515c "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) { ffc036f4: 2f 9e 00 00 cmpwi cr7,r30,0 ffc036f8: 40 be 00 20 bne+ cr7,ffc03718 <== NEVER TAKEN printk( ffc036fc: 3c 60 ff c1 lis r3,-63 ffc03700: 38 63 5e 74 addi r3,r3,24180 ffc03704: 38 80 00 80 li r4,128 ffc03708: 38 bf 00 08 addi r5,r31,8 ffc0370c: 38 df 00 88 addi r6,r31,136 ffc03710: 4c c6 31 82 crclr 4*cr1+eq ffc03714: 48 00 1a 49 bl ffc0515c rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); ffc03718: 38 60 00 81 li r3,129 ffc0371c: 48 00 4a 09 bl ffc08124 =============================================================================== ffc19b00 <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { ffc19b00: 94 21 ff e0 stwu r1,-32(r1) ffc19b04: 7c 08 02 a6 mflr r0 ffc19b08: 90 01 00 24 stw r0,36(r1) Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { ffc19b0c: 80 03 00 4c lwz r0,76(r3) Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { ffc19b10: bf 41 00 08 stmw r26,8(r1) ffc19b14: 7c 7f 1b 78 mr r31,r3 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { ffc19b18: 7f 85 00 40 cmplw cr7,r5,r0 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { ffc19b1c: 7c 9d 23 78 mr r29,r4 ffc19b20: 7c be 2b 78 mr r30,r5 ffc19b24: 7d 1b 43 78 mr r27,r8 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; ffc19b28: 38 60 00 01 li r3,1 { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { ffc19b2c: 41 9d 00 54 bgt- cr7,ffc19b80 <_CORE_message_queue_Broadcast+0x80><== NEVER TAKEN * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { ffc19b30: 80 1f 00 48 lwz r0,72(r31) ffc19b34: 3b 80 00 00 li r28,0 ffc19b38: 2f 80 00 00 cmpwi cr7,r0,0 ffc19b3c: 41 be 00 30 beq+ cr7,ffc19b6c <_CORE_message_queue_Broadcast+0x6c> *count = 0; ffc19b40: 38 00 00 00 li r0,0 ffc19b44: 90 08 00 00 stw r0,0(r8) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; ffc19b48: 38 60 00 00 li r3,0 ffc19b4c: 48 00 00 34 b ffc19b80 <_CORE_message_queue_Broadcast+0x80> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); ffc19b50: 80 7a 00 2c lwz r3,44(r26) ffc19b54: 7f a4 eb 78 mr r4,r29 ffc19b58: 7f c5 f3 78 mr r5,r30 ffc19b5c: 48 00 88 8d bl ffc223e8 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; ffc19b60: 81 3a 00 28 lwz r9,40(r26) */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; ffc19b64: 3b 9c 00 01 addi r28,r28,1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; ffc19b68: 93 c9 00 00 stw r30,0(r9) /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = ffc19b6c: 7f e3 fb 78 mr r3,r31 ffc19b70: 48 00 2d 2d bl ffc1c89c <_Thread_queue_Dequeue> ffc19b74: 7c 7a 1b 79 mr. r26,r3 ffc19b78: 40 82 ff d8 bne+ ffc19b50 <_CORE_message_queue_Broadcast+0x50> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; ffc19b7c: 93 9b 00 00 stw r28,0(r27) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } ffc19b80: 39 61 00 20 addi r11,r1,32 ffc19b84: 4b ff 47 24 b ffc0e2a8 <_restgpr_26_x> =============================================================================== ffc118fc <_CORE_message_queue_Initialize>: CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { ffc118fc: 94 21 ff e0 stwu r1,-32(r1) ffc11900: 7c 08 02 a6 mflr r0 /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { ffc11904: 7c c9 33 78 mr r9,r6 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { ffc11908: 90 01 00 24 stw r0,36(r1) size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; ffc1190c: 38 00 00 00 li r0,0 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { ffc11910: bf 81 00 10 stmw r28,16(r1) ffc11914: 7c 7f 1b 78 mr r31,r3 ffc11918: 7c 9d 23 78 mr r29,r4 size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; ffc1191c: 90 03 00 48 stw r0,72(r3) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { ffc11920: 70 c0 00 03 andi. r0,r6,3 ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; ffc11924: 90 a3 00 44 stw r5,68(r3) the_message_queue->number_of_pending_messages = 0; the_message_queue->maximum_message_size = maximum_message_size; ffc11928: 90 c3 00 4c stw r6,76(r3) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { ffc1192c: 41 82 00 18 beq- ffc11944 <_CORE_message_queue_Initialize+0x48> allocated_message_size += sizeof(uint32_t); ffc11930: 39 26 00 04 addi r9,r6,4 allocated_message_size &= ~(sizeof(uint32_t) - 1); ffc11934: 55 29 00 3a rlwinm r9,r9,0,0,29 } if (allocated_message_size < maximum_message_size) ffc11938: 7f 89 30 40 cmplw cr7,r9,r6 return false; ffc1193c: 3b c0 00 00 li r30,0 if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); allocated_message_size &= ~(sizeof(uint32_t) - 1); } if (allocated_message_size < maximum_message_size) ffc11940: 41 bc 00 78 blt+ cr7,ffc119b8 <_CORE_message_queue_Initialize+0xbc><== NEVER TAKEN /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); ffc11944: 3b 89 00 10 addi r28,r9,16 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * ffc11948: 7c 7c 29 d6 mullw r3,r28,r5 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) return false; ffc1194c: 3b c0 00 00 li r30,0 * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) ffc11950: 7f 83 48 40 cmplw cr7,r3,r9 ffc11954: 41 bc 00 64 blt+ cr7,ffc119b8 <_CORE_message_queue_Initialize+0xbc><== NEVER TAKEN /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); ffc11958: 90 a1 00 08 stw r5,8(r1) ffc1195c: 48 00 32 0d bl ffc14b68 <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) ffc11960: 2f 83 00 00 cmpwi cr7,r3,0 /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); ffc11964: 7c 64 1b 78 mr r4,r3 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) ffc11968: 90 7f 00 5c stw r3,92(r31) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) ffc1196c: 80 a1 00 08 lwz r5,8(r1) ffc11970: 41 9e 00 48 beq- cr7,ffc119b8 <_CORE_message_queue_Initialize+0xbc> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( ffc11974: 38 7f 00 60 addi r3,r31,96 ffc11978: 7f 86 e3 78 mr r6,r28 ffc1197c: 48 00 4f 01 bl ffc1687c <_Chain_Initialize> 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 ); ffc11980: 38 1f 00 54 addi r0,r31,84 head->next = tail; ffc11984: 90 1f 00 50 stw r0,80(r31) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); ffc11988: 38 1f 00 50 addi r0,r31,80 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( ffc1198c: 7f e3 fb 78 mr r3,r31 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; ffc11990: 93 df 00 54 stw r30,84(r31) ffc11994: 38 a0 00 80 li r5,128 ffc11998: 38 c0 00 06 li r6,6 tail->previous = head; ffc1199c: 90 1f 00 58 stw r0,88(r31) THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; ffc119a0: 3b c0 00 01 li r30,1 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( ffc119a4: 80 9d 00 00 lwz r4,0(r29) ffc119a8: 68 84 00 01 xori r4,r4,1 ffc119ac: 7c 84 00 34 cntlzw r4,r4 ffc119b0: 54 84 d9 7e rlwinm r4,r4,27,5,31 ffc119b4: 48 00 25 ed bl ffc13fa0 <_Thread_queue_Initialize> STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc119b8: 39 61 00 20 addi r11,r1,32 ffc119bc: 7f c3 f3 78 mr r3,r30 ffc119c0: 4b ff 40 18 b ffc059d8 <_restgpr_28_x> =============================================================================== ffc119c4 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { ffc119c4: 94 21 ff f0 stwu r1,-16(r1) ffc119c8: 7c 08 02 a6 mflr r0 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; ffc119cc: 3d 20 00 00 lis r9,0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { ffc119d0: 90 01 00 14 stw r0,20(r1) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; ffc119d4: 39 60 00 00 li r11,0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { ffc119d8: 7c 80 23 78 mr r0,r4 ffc119dc: bf c1 00 08 stmw r30,8(r1) ffc119e0: 7c 7f 1b 78 mr r31,r3 ffc119e4: 7c a3 2b 78 mr r3,r5 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; ffc119e8: 81 29 2f 24 lwz r9,12068(r9) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; ffc119ec: 91 69 00 34 stw r11,52(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc119f0: 7d 60 00 a6 mfmsr r11 ffc119f4: 7d 50 42 a6 mfsprg r10,0 ffc119f8: 7d 6a 50 78 andc r10,r11,r10 ffc119fc: 7d 40 01 24 mtmsr r10 executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } ffc11a00: 83 df 00 50 lwz r30,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 ); ffc11a04: 39 5f 00 54 addi r10,r31,84 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) ffc11a08: 7f 9e 50 00 cmpw cr7,r30,r10 ffc11a0c: 41 9e 00 5c beq- cr7,ffc11a68 <_CORE_message_queue_Seize+0xa4> executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { ffc11a10: 2f 9e 00 00 cmpwi cr7,r30,0 Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; ffc11a14: 80 be 00 00 lwz r5,0(r30) head->next = new_first; ffc11a18: 7f ea fb 78 mr r10,r31 ffc11a1c: 94 aa 00 50 stwu r5,80(r10) new_first->previous = head; ffc11a20: 91 45 00 04 stw r10,4(r5) ffc11a24: 41 9e 00 44 beq- cr7,ffc11a68 <_CORE_message_queue_Seize+0xa4><== NEVER TAKEN the_message_queue->number_of_pending_messages -= 1; ffc11a28: 81 3f 00 48 lwz r9,72(r31) ffc11a2c: 38 09 ff ff addi r0,r9,-1 ffc11a30: 90 1f 00 48 stw r0,72(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc11a34: 7d 60 01 24 mtmsr r11 _ISR_Enable( level ); *size_p = the_message->Contents.size; _Thread_Executing->Wait.count = ffc11a38: 3d 20 00 00 lis r9,0 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; ffc11a3c: 80 be 00 08 lwz r5,8(r30) _Thread_Executing->Wait.count = ffc11a40: 81 29 2f 24 lwz r9,12068(r9) ffc11a44: 38 00 00 00 li r0,0 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; ffc11a48: 90 a6 00 00 stw r5,0(r6) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); ffc11a4c: 38 9e 00 0c addi r4,r30,12 _Thread_Executing->Wait.count = ffc11a50: 90 09 00 24 stw r0,36(r9) ffc11a54: 48 00 7c 2d bl ffc19680 RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); ffc11a58: 38 7f 00 60 addi r3,r31,96 ffc11a5c: 7f c4 f3 78 mr r4,r30 ffc11a60: 4b ff fd d9 bl ffc11838 <_Chain_Append> /* * There is not an API with blocking sends enabled. * So return immediately. */ _CORE_message_queue_Free_message_buffer(the_message_queue, the_message); return; ffc11a64: 48 00 00 4c b ffc11ab0 <_CORE_message_queue_Seize+0xec> return; } #endif } if ( !wait ) { ffc11a68: 2f 87 00 00 cmpwi cr7,r7,0 ffc11a6c: 40 9e 00 14 bne- cr7,ffc11a80 <_CORE_message_queue_Seize+0xbc> ffc11a70: 7d 60 01 24 mtmsr r11 _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; ffc11a74: 38 00 00 04 li r0,4 ffc11a78: 90 09 00 34 stw r0,52(r9) return; ffc11a7c: 48 00 00 34 b ffc11ab0 <_CORE_message_queue_Seize+0xec> 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; ffc11a80: 39 40 00 01 li r10,1 ffc11a84: 91 5f 00 30 stw r10,48(r31) } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; ffc11a88: 93 e9 00 44 stw r31,68(r9) executing->Wait.id = id; ffc11a8c: 90 09 00 20 stw r0,32(r9) executing->Wait.return_argument_second.mutable_object = buffer; ffc11a90: 90 69 00 2c stw r3,44(r9) executing->Wait.return_argument = size_p; ffc11a94: 90 c9 00 28 stw r6,40(r9) ffc11a98: 7d 60 01 24 mtmsr r11 /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); ffc11a9c: 3c a0 ff c1 lis r5,-63 ffc11aa0: 7f e3 fb 78 mr r3,r31 ffc11aa4: 7d 04 43 78 mr r4,r8 ffc11aa8: 38 a5 40 7c addi r5,r5,16508 ffc11aac: 48 00 22 19 bl ffc13cc4 <_Thread_queue_Enqueue_with_handler> } ffc11ab0: 39 61 00 10 addi r11,r1,16 ffc11ab4: 4b ff 3f 2c b ffc059e0 <_restgpr_30_x> =============================================================================== ffc084f8 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc084f8: 94 21 ff e0 stwu r1,-32(r1) ffc084fc: 7c 08 02 a6 mflr r0 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc08500: 3d 20 00 00 lis r9,0 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc08504: 90 01 00 24 stw r0,36(r1) _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc08508: 80 09 27 64 lwz r0,10084(r9) Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc0850c: bf 81 00 10 stmw r28,16(r1) ffc08510: 7c 7f 1b 78 mr r31,r3 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc08514: 2f 80 00 00 cmpwi cr7,r0,0 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc08518: 7c 9e 23 78 mr r30,r4 ffc0851c: 90 e1 00 08 stw r7,8(r1) ffc08520: 7c bd 2b 78 mr r29,r5 ffc08524: 7c dc 33 78 mr r28,r6 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc08528: 41 9e 00 2c beq- cr7,ffc08554 <_CORE_mutex_Seize+0x5c> ffc0852c: 2f 85 00 00 cmpwi cr7,r5,0 ffc08530: 41 9e 00 24 beq- cr7,ffc08554 <_CORE_mutex_Seize+0x5c> <== NEVER TAKEN ffc08534: 3d 20 00 00 lis r9,0 ffc08538: 80 09 27 a8 lwz r0,10152(r9) ffc0853c: 2b 80 00 01 cmplwi cr7,r0,1 ffc08540: 40 bd 00 14 ble+ cr7,ffc08554 <_CORE_mutex_Seize+0x5c> ffc08544: 38 60 00 00 li r3,0 ffc08548: 38 80 00 00 li r4,0 ffc0854c: 38 a0 00 12 li r5,18 ffc08550: 48 00 07 a1 bl ffc08cf0 <_Internal_error_Occurred> ffc08554: 7f e3 fb 78 mr r3,r31 ffc08558: 38 81 00 08 addi r4,r1,8 ffc0855c: 48 00 4a b5 bl ffc0d010 <_CORE_mutex_Seize_interrupt_trylock> ffc08560: 2f 83 00 00 cmpwi cr7,r3,0 ffc08564: 41 9e 00 64 beq- cr7,ffc085c8 <_CORE_mutex_Seize+0xd0> ffc08568: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0856c: 3d 20 00 00 lis r9,0 ffc08570: 39 29 2d 78 addi r9,r9,11640 ffc08574: 40 9e 00 1c bne- cr7,ffc08590 <_CORE_mutex_Seize+0x98> ffc08578: 80 01 00 08 lwz r0,8(r1) ffc0857c: 7c 00 01 24 mtmsr r0 ffc08580: 81 29 00 0c lwz r9,12(r9) ffc08584: 38 00 00 01 li r0,1 ffc08588: 90 09 00 34 stw r0,52(r9) ffc0858c: 48 00 00 3c b ffc085c8 <_CORE_mutex_Seize+0xd0> ffc08590: 81 29 00 0c lwz r9,12(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; ffc08594: 38 00 00 01 li r0,1 ffc08598: 90 1f 00 30 stw r0,48(r31) ffc0859c: 93 e9 00 44 stw r31,68(r9) ffc085a0: 93 c9 00 20 stw r30,32(r9) ffc085a4: 3d 20 00 00 lis r9,0 ffc085a8: 81 69 27 64 lwz r11,10084(r9) ffc085ac: 38 0b 00 01 addi r0,r11,1 ffc085b0: 90 09 27 64 stw r0,10084(r9) ffc085b4: 80 01 00 08 lwz r0,8(r1) ffc085b8: 7c 00 01 24 mtmsr r0 ffc085bc: 7f e3 fb 78 mr r3,r31 ffc085c0: 7f 84 e3 78 mr r4,r28 ffc085c4: 4b ff fe c1 bl ffc08484 <_CORE_mutex_Seize_interrupt_blocking> } ffc085c8: 39 61 00 20 addi r11,r1,32 ffc085cc: 48 00 bc 18 b ffc141e4 <_restgpr_28_x> =============================================================================== ffc0d010 <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { ffc0d010: 94 21 ff f8 stwu r1,-8(r1) ffc0d014: 7c 08 02 a6 mflr r0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; ffc0d018: 3d 60 00 00 lis r11,0 ffc0d01c: 90 01 00 0c stw r0,12(r1) executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; ffc0d020: 38 00 00 00 li r0,0 ffc0d024: 7c 69 1b 78 mr r9,r3 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { ffc0d028: 81 43 00 50 lwz r10,80(r3) { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; ffc0d02c: 81 6b 2d 84 lwz r11,11652(r11) executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { ffc0d030: 2f 8a 00 00 cmpwi cr7,r10,0 Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; ffc0d034: 90 0b 00 34 stw r0,52(r11) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { ffc0d038: 41 9e 00 b4 beq- cr7,ffc0d0ec <_CORE_mutex_Seize_interrupt_trylock+0xdc> the_mutex->lock = CORE_MUTEX_LOCKED; ffc0d03c: 90 03 00 50 stw r0,80(r3) the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; ffc0d040: 80 0b 00 08 lwz r0,8(r11) executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; ffc0d044: 91 63 00 5c stw r11,92(r3) the_mutex->holder_id = executing->Object.id; ffc0d048: 90 03 00 60 stw r0,96(r3) the_mutex->nest_count = 1; ffc0d04c: 38 00 00 01 li r0,1 ffc0d050: 90 03 00 54 stw r0,84(r3) return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } ffc0d054: 80 03 00 48 lwz r0,72(r3) if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || ffc0d058: 2f 80 00 02 cmpwi cr7,r0,2 ffc0d05c: 41 9e 00 0c beq- cr7,ffc0d068 <_CORE_mutex_Seize_interrupt_trylock+0x58> ffc0d060: 2f 80 00 03 cmpwi cr7,r0,3 ffc0d064: 40 be 00 18 bne+ cr7,ffc0d07c <_CORE_mutex_Seize_interrupt_trylock+0x6c> #endif executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { ffc0d068: 2f 80 00 03 cmpwi cr7,r0,3 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; ffc0d06c: 81 4b 00 1c lwz r10,28(r11) ffc0d070: 39 0a 00 01 addi r8,r10,1 ffc0d074: 91 0b 00 1c stw r8,28(r11) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { ffc0d078: 41 be 00 08 beq+ cr7,ffc0d080 <_CORE_mutex_Seize_interrupt_trylock+0x70> _ISR_Enable( *level_p ); ffc0d07c: 48 00 00 b0 b ffc0d12c <_CORE_mutex_Seize_interrupt_trylock+0x11c> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; ffc0d080: 80 09 00 4c lwz r0,76(r9) current = executing->current_priority; ffc0d084: 81 0b 00 14 lwz r8,20(r11) if ( current == ceiling ) { ffc0d088: 7f 88 00 00 cmpw cr7,r8,r0 ffc0d08c: 40 be 00 08 bne+ cr7,ffc0d094 <_CORE_mutex_Seize_interrupt_trylock+0x84> _ISR_Enable( *level_p ); ffc0d090: 48 00 00 9c b ffc0d12c <_CORE_mutex_Seize_interrupt_trylock+0x11c> return 0; } if ( current > ceiling ) { ffc0d094: 7f 88 00 40 cmplw cr7,r8,r0 ffc0d098: 40 bd 00 34 ble+ cr7,ffc0d0cc <_CORE_mutex_Seize_interrupt_trylock+0xbc> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0d09c: 3d 60 00 00 lis r11,0 ffc0d0a0: 81 4b 27 64 lwz r10,10084(r11) ffc0d0a4: 38 0a 00 01 addi r0,r10,1 ffc0d0a8: 90 0b 27 64 stw r0,10084(r11) ffc0d0ac: 80 04 00 00 lwz r0,0(r4) ffc0d0b0: 7c 00 01 24 mtmsr r0 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); _Thread_Change_priority( ffc0d0b4: 80 69 00 5c lwz r3,92(r9) ffc0d0b8: 38 a0 00 00 li r5,0 ffc0d0bc: 80 89 00 4c lwz r4,76(r9) ffc0d0c0: 4b ff c8 f5 bl ffc099b4 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); ffc0d0c4: 4b ff ce 59 bl ffc09f1c <_Thread_Enable_dispatch> ffc0d0c8: 48 00 00 6c b ffc0d134 <_CORE_mutex_Seize_interrupt_trylock+0x124> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; ffc0d0cc: 38 00 00 06 li r0,6 ffc0d0d0: 90 0b 00 34 stw r0,52(r11) the_mutex->lock = CORE_MUTEX_UNLOCKED; ffc0d0d4: 38 00 00 01 li r0,1 ffc0d0d8: 90 09 00 50 stw r0,80(r9) the_mutex->nest_count = 0; /* undo locking above */ ffc0d0dc: 38 00 00 00 li r0,0 ffc0d0e0: 90 09 00 54 stw r0,84(r9) executing->resource_count--; /* undo locking above */ ffc0d0e4: 91 4b 00 1c stw r10,28(r11) _ISR_Enable( *level_p ); ffc0d0e8: 48 00 00 44 b ffc0d12c <_CORE_mutex_Seize_interrupt_trylock+0x11c> /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { ffc0d0ec: 81 43 00 5c lwz r10,92(r3) /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; ffc0d0f0: 38 60 00 01 li r3,1 /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { ffc0d0f4: 7f 8a 58 00 cmpw cr7,r10,r11 ffc0d0f8: 40 be 00 40 bne+ cr7,ffc0d138 <_CORE_mutex_Seize_interrupt_trylock+0x128> switch ( the_mutex->Attributes.lock_nesting_behavior ) { ffc0d0fc: 80 09 00 40 lwz r0,64(r9) ffc0d100: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d104: 41 9e 00 10 beq- cr7,ffc0d114 <_CORE_mutex_Seize_interrupt_trylock+0x104> ffc0d108: 2f 80 00 01 cmpwi cr7,r0,1 ffc0d10c: 40 be 00 2c bne+ cr7,ffc0d138 <_CORE_mutex_Seize_interrupt_trylock+0x128><== ALWAYS TAKEN ffc0d110: 48 00 00 14 b ffc0d124 <_CORE_mutex_Seize_interrupt_trylock+0x114><== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; ffc0d114: 81 69 00 54 lwz r11,84(r9) ffc0d118: 38 0b 00 01 addi r0,r11,1 ffc0d11c: 90 09 00 54 stw r0,84(r9) _ISR_Enable( *level_p ); ffc0d120: 48 00 00 0c b ffc0d12c <_CORE_mutex_Seize_interrupt_trylock+0x11c> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; ffc0d124: 38 00 00 02 li r0,2 <== NOT EXECUTED ffc0d128: 90 0a 00 34 stw r0,52(r10) <== NOT EXECUTED ffc0d12c: 80 04 00 00 lwz r0,0(r4) ffc0d130: 7c 00 01 24 mtmsr r0 _ISR_Enable( *level_p ); return 0; ffc0d134: 38 60 00 00 li r3,0 ffc0d138: 80 01 00 0c lwz r0,12(r1) ffc0d13c: 38 21 00 08 addi r1,r1,8 ffc0d140: 7c 08 03 a6 mtlr r0 ffc0d144: 4e 80 00 20 blr =============================================================================== ffc08770 <_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 ) { ffc08770: 7c 08 02 a6 mflr r0 ffc08774: 7c 2b 0b 78 mr r11,r1 ffc08778: 94 21 ff f0 stwu r1,-16(r1) ffc0877c: 90 01 00 14 stw r0,20(r1) ffc08780: 48 00 ba 25 bl ffc141a4 <_savegpr_31> ffc08784: 7c 7f 1b 78 mr r31,r3 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { ffc08788: 48 00 1b 25 bl ffc0a2ac <_Thread_queue_Dequeue> ffc0878c: 2f 83 00 00 cmpwi cr7,r3,0 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc08790: 38 00 00 00 li r0,0 if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { ffc08794: 40 be 00 38 bne+ cr7,ffc087cc <_CORE_semaphore_Surrender+0x5c> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc08798: 7d 60 00 a6 mfmsr r11 ffc0879c: 7c 10 42 a6 mfsprg r0,0 ffc087a0: 7d 60 00 78 andc r0,r11,r0 ffc087a4: 7c 00 01 24 mtmsr r0 (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) ffc087a8: 81 3f 00 48 lwz r9,72(r31) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; ffc087ac: 38 00 00 04 li r0,4 (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) ffc087b0: 81 5f 00 40 lwz r10,64(r31) ffc087b4: 7f 89 50 40 cmplw cr7,r9,r10 ffc087b8: 40 9c 00 10 bge- cr7,ffc087c8 <_CORE_semaphore_Surrender+0x58><== NEVER TAKEN the_semaphore->count += 1; ffc087bc: 39 29 00 01 addi r9,r9,1 ffc087c0: 91 3f 00 48 stw r9,72(r31) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc087c4: 38 00 00 00 li r0,0 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc087c8: 7d 60 01 24 mtmsr r11 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc087cc: 39 61 00 10 addi r11,r1,16 ffc087d0: 7c 03 03 78 mr r3,r0 ffc087d4: 48 00 ba 1c b ffc141f0 <_restgpr_31_x> =============================================================================== ffc073c4 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { ffc073c4: 7c 2b 0b 78 mr r11,r1 ffc073c8: 7c 08 02 a6 mflr r0 ffc073cc: 94 21 ff f0 stwu r1,-16(r1) ffc073d0: 90 01 00 14 stw r0,20(r1) ffc073d4: 48 00 cd d1 bl ffc141a4 <_savegpr_31> ffc073d8: 7c 7f 1b 78 mr r31,r3 rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; ffc073dc: 81 03 01 2c lwz r8,300(r3) option_set = (rtems_option) the_thread->Wait.option; ffc073e0: 80 e3 00 30 lwz r7,48(r3) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc073e4: 7c 00 00 a6 mfmsr r0 ffc073e8: 7d 30 42 a6 mfsprg r9,0 ffc073ec: 7c 09 48 78 andc r9,r0,r9 ffc073f0: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); pending_events = api->pending_events; ffc073f4: 81 68 00 00 lwz r11,0(r8) event_condition = (rtems_event_set) the_thread->Wait.count; ffc073f8: 81 43 00 24 lwz r10,36(r3) seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { ffc073fc: 7d 49 58 39 and. r9,r10,r11 ffc07400: 40 a2 00 08 bne+ ffc07408 <_Event_Surrender+0x44> _ISR_Enable( level ); ffc07404: 48 00 00 f4 b ffc074f8 <_Event_Surrender+0x134> /* * 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() && ffc07408: 3c c0 00 00 lis r6,0 ffc0740c: 38 c6 2d 78 addi r6,r6,11640 ffc07410: 80 a6 00 08 lwz r5,8(r6) ffc07414: 2f 85 00 00 cmpwi cr7,r5,0 ffc07418: 41 9e 00 64 beq- cr7,ffc0747c <_Event_Surrender+0xb8> ffc0741c: 80 c6 00 0c lwz r6,12(r6) ffc07420: 7f 83 30 00 cmpw cr7,r3,r6 ffc07424: 40 be 00 58 bne+ cr7,ffc0747c <_Event_Surrender+0xb8> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || ffc07428: 3c c0 00 00 lis r6,0 ffc0742c: 80 a6 27 b0 lwz r5,10160(r6) /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ffc07430: 2f 85 00 02 cmpwi cr7,r5,2 ffc07434: 41 9e 00 10 beq- cr7,ffc07444 <_Event_Surrender+0x80> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { ffc07438: 80 c6 27 b0 lwz r6,10160(r6) * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || ffc0743c: 2f 86 00 01 cmpwi cr7,r6,1 ffc07440: 40 be 00 3c bne+ cr7,ffc0747c <_Event_Surrender+0xb8> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { ffc07444: 7f 89 50 00 cmpw cr7,r9,r10 ffc07448: 41 9e 00 0c beq- cr7,ffc07454 <_Event_Surrender+0x90> ffc0744c: 70 e5 00 02 andi. r5,r7,2 ffc07450: 41 82 00 28 beq- ffc07478 <_Event_Surrender+0xb4> <== NEVER TAKEN RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); ffc07454: 7d 6b 48 78 andc r11,r11,r9 api->pending_events = _Event_sets_Clear( pending_events,seized_events ); ffc07458: 91 68 00 00 stw r11,0(r8) the_thread->Wait.count = 0; ffc0745c: 39 60 00 00 li r11,0 ffc07460: 91 7f 00 24 stw r11,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc07464: 81 7f 00 28 lwz r11,40(r31) ffc07468: 91 2b 00 00 stw r9,0(r11) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; ffc0746c: 39 60 00 03 li r11,3 ffc07470: 3d 20 00 00 lis r9,0 ffc07474: 91 69 27 b0 stw r11,10160(r9) } _ISR_Enable( level ); ffc07478: 48 00 00 80 b ffc074f8 <_Event_Surrender+0x134> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_EVENT); ffc0747c: 80 df 00 10 lwz r6,16(r31) } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { ffc07480: 70 c5 01 00 andi. r5,r6,256 ffc07484: 41 82 00 74 beq- ffc074f8 <_Event_Surrender+0x134> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { ffc07488: 7f 89 50 00 cmpw cr7,r9,r10 ffc0748c: 41 9e 00 0c beq- cr7,ffc07498 <_Event_Surrender+0xd4> ffc07490: 70 ea 00 02 andi. r10,r7,2 ffc07494: 41 82 00 64 beq- ffc074f8 <_Event_Surrender+0x134> <== NEVER TAKEN ffc07498: 7d 6b 48 78 andc r11,r11,r9 api->pending_events = _Event_sets_Clear( pending_events, seized_events ); ffc0749c: 91 68 00 00 stw r11,0(r8) the_thread->Wait.count = 0; ffc074a0: 39 60 00 00 li r11,0 ffc074a4: 91 7f 00 24 stw r11,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc074a8: 81 7f 00 28 lwz r11,40(r31) ffc074ac: 91 2b 00 00 stw r9,0(r11) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc074b0: 7d 20 00 a6 mfmsr r9 ffc074b4: 7c 00 01 24 mtmsr r0 ffc074b8: 7d 20 01 24 mtmsr r9 _ISR_Flash( level ); if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc074bc: 81 3f 00 50 lwz r9,80(r31) ffc074c0: 2f 89 00 02 cmpwi cr7,r9,2 ffc074c4: 41 9e 00 0c beq- cr7,ffc074d0 <_Event_Surrender+0x10c> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc074c8: 7c 00 01 24 mtmsr r0 ffc074cc: 48 00 00 18 b ffc074e4 <_Event_Surrender+0x120> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; ffc074d0: 39 20 00 03 li r9,3 ffc074d4: 91 3f 00 50 stw r9,80(r31) ffc074d8: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); ffc074dc: 38 7f 00 48 addi r3,r31,72 ffc074e0: 48 00 3c 39 bl ffc0b118 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc074e4: 3c 80 10 03 lis r4,4099 ffc074e8: 7f e3 fb 78 mr r3,r31 ffc074ec: 60 84 ff f8 ori r4,r4,65528 ffc074f0: 48 00 26 51 bl ffc09b40 <_Thread_Clear_state> ffc074f4: 48 00 00 08 b ffc074fc <_Event_Surrender+0x138> ffc074f8: 7c 00 01 24 mtmsr r0 } return; } } _ISR_Enable( level ); } ffc074fc: 39 61 00 10 addi r11,r1,16 ffc07500: 48 00 cc f0 b ffc141f0 <_restgpr_31_x> =============================================================================== ffc07504 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { ffc07504: 94 21 ff e8 stwu r1,-24(r1) ffc07508: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc0750c: 38 81 00 08 addi r4,r1,8 void _Event_Timeout( Objects_Id id, void *ignored ) { ffc07510: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc07514: 48 00 2a 29 bl ffc09f3c <_Thread_Get> switch ( location ) { ffc07518: 80 01 00 08 lwz r0,8(r1) ffc0751c: 2f 80 00 00 cmpwi cr7,r0,0 ffc07520: 40 9e 00 68 bne- cr7,ffc07588 <_Event_Timeout+0x84> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc07524: 7d 60 00 a6 mfmsr r11 ffc07528: 7d 30 42 a6 mfsprg r9,0 ffc0752c: 7d 69 48 78 andc r9,r11,r9 ffc07530: 7d 20 01 24 mtmsr r9 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc07534: 3d 20 00 00 lis r9,0 _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; ffc07538: 90 03 00 24 stw r0,36(r3) if ( _Thread_Is_executing( the_thread ) ) { ffc0753c: 80 09 2d 84 lwz r0,11652(r9) ffc07540: 7f 83 00 00 cmpw cr7,r3,r0 ffc07544: 40 be 00 1c bne+ cr7,ffc07560 <_Event_Timeout+0x5c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) ffc07548: 3d 20 00 00 lis r9,0 ffc0754c: 80 09 27 b0 lwz r0,10160(r9) ffc07550: 2f 80 00 01 cmpwi cr7,r0,1 ffc07554: 40 be 00 0c bne+ cr7,ffc07560 <_Event_Timeout+0x5c> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ffc07558: 38 00 00 02 li r0,2 ffc0755c: 90 09 27 b0 stw r0,10160(r9) } the_thread->Wait.return_code = RTEMS_TIMEOUT; ffc07560: 38 00 00 06 li r0,6 ffc07564: 90 03 00 34 stw r0,52(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc07568: 7d 60 01 24 mtmsr r11 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc0756c: 3c 80 10 03 lis r4,4099 ffc07570: 60 84 ff f8 ori r4,r4,65528 ffc07574: 48 00 25 cd bl ffc09b40 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc07578: 3d 20 00 00 lis r9,0 ffc0757c: 81 69 27 64 lwz r11,10084(r9) ffc07580: 38 0b ff ff addi r0,r11,-1 ffc07584: 90 09 27 64 stw r0,10084(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc07588: 80 01 00 1c lwz r0,28(r1) ffc0758c: 38 21 00 18 addi r1,r1,24 ffc07590: 7c 08 03 a6 mtlr r0 ffc07594: 4e 80 00 20 blr =============================================================================== ffc0d868 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc0d868: 94 21 ff c0 stwu r1,-64(r1) ffc0d86c: 7c 08 02 a6 mflr r0 ffc0d870: be c1 00 18 stmw r22,24(r1) Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; ffc0d874: 7f c4 2a 14 add r30,r4,r5 uintptr_t const free_size = stats->free_size; uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { ffc0d878: 7f 9e 20 40 cmplw cr7,r30,r4 Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc0d87c: 90 01 00 44 stw r0,68(r1) Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; ffc0d880: 3b 40 00 00 li r26,0 Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc0d884: 7c d9 33 78 mr r25,r6 ffc0d888: 7c 7f 1b 78 mr r31,r3 Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; ffc0d88c: 83 83 00 20 lwz r28,32(r3) Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc0d890: 7c 9d 23 78 mr r29,r4 Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; ffc0d894: 93 41 00 08 stw r26,8(r1) uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { return false; ffc0d898: 38 00 00 00 li r0,0 Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; ffc0d89c: 93 41 00 0c stw r26,12(r1) uintptr_t const page_size = heap->page_size; ffc0d8a0: 83 63 00 10 lwz r27,16(r3) uintptr_t const min_block_size = heap->min_block_size; ffc0d8a4: 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; ffc0d8a8: 83 03 00 30 lwz r24,48(r3) uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { ffc0d8ac: 41 bc 02 70 blt+ cr7,ffc0db1c <_Heap_Extend+0x2b4> return false; } extend_area_ok = _Heap_Get_first_and_last_block( ffc0d8b0: 7c 83 23 78 mr r3,r4 ffc0d8b4: 38 e1 00 08 addi r7,r1,8 ffc0d8b8: 7c a4 2b 78 mr r4,r5 ffc0d8bc: 39 01 00 0c addi r8,r1,12 ffc0d8c0: 7f 65 db 78 mr r5,r27 ffc0d8c4: 4b ff b5 d5 bl ffc08e98 <_Heap_Get_first_and_last_block> &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { /* For simplicity we reject extend areas that are too small */ return false; ffc0d8c8: 7f 40 d3 78 mr r0,r26 page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { ffc0d8cc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0d8d0: 41 9e 02 4c beq- cr7,ffc0db1c <_Heap_Extend+0x2b4> ffc0d8d4: 7f 89 e3 78 mr r9,r28 ffc0d8d8: 3a c0 00 00 li r22,0 ffc0d8dc: 39 40 00 00 li r10,0 ffc0d8e0: 3a e0 00 00 li r23,0 return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; ffc0d8e4: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0d8e8: 7d 2b 4b 78 mr r11,r9 ffc0d8ec: 40 be 00 08 bne+ cr7,ffc0d8f4 <_Heap_Extend+0x8c> ffc0d8f0: 81 7f 00 18 lwz r11,24(r31) uintptr_t const sub_area_end = start_block->prev_size; ffc0d8f4: 80 09 00 00 lwz r0,0(r9) Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( ffc0d8f8: 7f 80 e8 40 cmplw cr7,r0,r29 ffc0d8fc: 40 9d 00 0c ble- cr7,ffc0d908 <_Heap_Extend+0xa0> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ffc0d900: 7f 9e 58 40 cmplw cr7,r30,r11 ffc0d904: 41 9d 02 14 bgt- cr7,ffc0db18 <_Heap_Extend+0x2b0> ) { return false; } if ( extend_area_end == sub_area_begin ) { ffc0d908: 7f 9e 58 00 cmpw cr7,r30,r11 ffc0d90c: 41 9e 00 10 beq- cr7,ffc0d91c <_Heap_Extend+0xb4> <== NEVER TAKEN merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { ffc0d910: 7f 9e 00 40 cmplw cr7,r30,r0 ffc0d914: 41 9c 00 10 blt- cr7,ffc0d924 <_Heap_Extend+0xbc> ffc0d918: 48 00 00 10 b ffc0d928 <_Heap_Extend+0xc0> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { ffc0d91c: 7d 37 4b 78 mr r23,r9 <== NOT EXECUTED ffc0d920: 48 00 00 08 b ffc0d928 <_Heap_Extend+0xc0> <== NOT EXECUTED merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { ffc0d924: 7d 2a 4b 78 mr r10,r9 ffc0d928: 7d 60 db 96 divwu r11,r0,r27 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { ffc0d92c: 7f 80 e8 00 cmpw cr7,r0,r29 ffc0d930: 7d 6b d9 d6 mullw r11,r11,r27 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc0d934: 39 6b ff f8 addi r11,r11,-8 ffc0d938: 40 be 00 10 bne+ cr7,ffc0d948 <_Heap_Extend+0xe0> start_block->prev_size = extend_area_end; ffc0d93c: 93 c9 00 00 stw r30,0(r9) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) ffc0d940: 7d 7a 5b 78 mr r26,r11 ffc0d944: 48 00 00 10 b ffc0d954 <_Heap_Extend+0xec> merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { ffc0d948: 7f 80 e8 40 cmplw cr7,r0,r29 ffc0d94c: 40 9c 00 08 bge- cr7,ffc0d954 <_Heap_Extend+0xec> ffc0d950: 7d 76 5b 78 mr r22,r11 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0d954: 81 2b 00 04 lwz r9,4(r11) ffc0d958: 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); ffc0d95c: 7d 2b 4a 14 add r9,r11,r9 link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); ffc0d960: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0d964: 40 9e ff 80 bne+ cr7,ffc0d8e4 <_Heap_Extend+0x7c> if ( extend_area_begin < heap->area_begin ) { ffc0d968: 80 1f 00 18 lwz r0,24(r31) ffc0d96c: 7f 9d 00 40 cmplw cr7,r29,r0 ffc0d970: 40 9c 00 0c bge- cr7,ffc0d97c <_Heap_Extend+0x114> heap->area_begin = extend_area_begin; ffc0d974: 93 bf 00 18 stw r29,24(r31) ffc0d978: 48 00 00 14 b ffc0d98c <_Heap_Extend+0x124> } else if ( heap->area_end < extend_area_end ) { ffc0d97c: 80 1f 00 1c lwz r0,28(r31) ffc0d980: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0d984: 40 9c 00 08 bge- cr7,ffc0d98c <_Heap_Extend+0x124> heap->area_end = extend_area_end; ffc0d988: 93 df 00 1c stw r30,28(r31) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; ffc0d98c: 81 61 00 08 lwz r11,8(r1) ffc0d990: 81 21 00 0c lwz r9,12(r1) extend_first_block->prev_size = extend_area_end; ffc0d994: 93 cb 00 00 stw r30,0(r11) heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = ffc0d998: 7c 0b 48 50 subf r0,r11,r9 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; ffc0d99c: 60 08 00 01 ori r8,r0,1 _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; ffc0d9a0: 90 09 00 00 stw r0,0(r9) extend_last_block->size_and_flag = 0; ffc0d9a4: 38 00 00 00 li r0,0 extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = ffc0d9a8: 91 0b 00 04 stw r8,4(r11) extend_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; ffc0d9ac: 90 09 00 04 stw r0,4(r9) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc0d9b0: 80 1f 00 20 lwz r0,32(r31) ffc0d9b4: 7f 80 58 40 cmplw cr7,r0,r11 ffc0d9b8: 40 9d 00 0c ble- cr7,ffc0d9c4 <_Heap_Extend+0x15c> heap->first_block = extend_first_block; ffc0d9bc: 91 7f 00 20 stw r11,32(r31) ffc0d9c0: 48 00 00 14 b ffc0d9d4 <_Heap_Extend+0x16c> } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { ffc0d9c4: 80 1f 00 24 lwz r0,36(r31) ffc0d9c8: 7f 80 48 40 cmplw cr7,r0,r9 ffc0d9cc: 40 9c 00 08 bge- cr7,ffc0d9d4 <_Heap_Extend+0x16c> heap->last_block = extend_last_block; ffc0d9d0: 91 3f 00 24 stw r9,36(r31) } if ( merge_below_block != NULL ) { ffc0d9d4: 2f 97 00 00 cmpwi cr7,r23,0 ffc0d9d8: 41 9e 00 48 beq- cr7,ffc0da20 <_Heap_Extend+0x1b8> <== ALWAYS TAKEN Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; ffc0d9dc: 80 1f 00 10 lwz r0,16(r31) <== NOT EXECUTED uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); ffc0d9e0: 3b bd 00 08 addi r29,r29,8 <== NOT EXECUTED RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; ffc0d9e4: 7d 3d 03 96 divwu r9,r29,r0 <== NOT EXECUTED ffc0d9e8: 7d 29 01 d6 mullw r9,r9,r0 <== NOT EXECUTED if ( remainder != 0 ) { ffc0d9ec: 7d 29 e8 51 subf. r9,r9,r29 <== NOT EXECUTED ffc0d9f0: 41 82 00 0c beq- ffc0d9fc <_Heap_Extend+0x194> <== NOT EXECUTED return value - remainder + alignment; ffc0d9f4: 7f bd 02 14 add r29,r29,r0 <== NOT EXECUTED ffc0d9f8: 7f a9 e8 50 subf r29,r9,r29 <== NOT EXECUTED 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; ffc0d9fc: 80 17 00 00 lwz r0,0(r23) <== NOT EXECUTED ) { uintptr_t const page_size = heap->page_size; uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = ffc0da00: 38 9d ff f8 addi r4,r29,-8 <== NOT EXECUTED Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Free_block( heap, new_first_block ); ffc0da04: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED 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; ffc0da08: 90 1d ff f8 stw r0,-8(r29) <== NOT EXECUTED 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 = ffc0da0c: 7c 04 b8 50 subf r0,r4,r23 <== NOT EXECUTED 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; ffc0da10: 60 00 00 01 ori r0,r0,1 <== NOT EXECUTED ffc0da14: 90 04 00 04 stw r0,4(r4) <== NOT EXECUTED _Heap_Free_block( heap, new_first_block ); ffc0da18: 4b ff fe 15 bl ffc0d82c <_Heap_Free_block> <== NOT EXECUTED ffc0da1c: 48 00 00 1c b ffc0da38 <_Heap_Extend+0x1d0> <== NOT EXECUTED heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { ffc0da20: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0da24: 41 9e 00 14 beq- cr7,ffc0da38 <_Heap_Extend+0x1d0> _Heap_Link_below( ffc0da28: 81 21 00 0c lwz r9,12(r1) { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = (link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED; ffc0da2c: 7d 49 50 50 subf r10,r9,r10 ffc0da30: 61 4a 00 01 ori r10,r10,1 ) { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = ffc0da34: 91 49 00 04 stw r10,4(r9) link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { ffc0da38: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0da3c: 41 9e 00 4c beq- cr7,ffc0da88 <_Heap_Extend+0x220> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc0da40: 80 1f 00 10 lwz r0,16(r31) ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE, ffc0da44: 3b de ff f8 addi r30,r30,-8 uintptr_t extend_area_end ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( ffc0da48: 7f da f0 50 subf r30,r26,r30 ffc0da4c: 7f de 03 96 divwu r30,r30,r0 ffc0da50: 7f de 01 d6 mullw r30,r30,r0 ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) ffc0da54: 80 1a 00 04 lwz r0,4(r26) | HEAP_PREV_BLOCK_USED; _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); ffc0da58: 7f e3 fb 78 mr r3,r31 ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) ffc0da5c: 7c 1e 00 50 subf r0,r30,r0 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = ffc0da60: 7d 3e d2 14 add r9,r30,r26 (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; ffc0da64: 60 00 00 01 ori r0,r0,1 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = ffc0da68: 90 09 00 04 stw r0,4(r9) (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); ffc0da6c: 7f 44 d3 78 mr r4,r26 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0da70: 80 1a 00 04 lwz r0,4(r26) ffc0da74: 54 00 07 fe clrlwi r0,r0,31 block->size_and_flag = size | flag; ffc0da78: 7f de 03 78 or r30,r30,r0 ffc0da7c: 93 da 00 04 stw r30,4(r26) ffc0da80: 4b ff fd ad bl ffc0d82c <_Heap_Free_block> ffc0da84: 48 00 00 34 b ffc0dab8 <_Heap_Extend+0x250> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { ffc0da88: 2f 96 00 00 cmpwi cr7,r22,0 ffc0da8c: 41 9e 00 2c beq- cr7,ffc0dab8 <_Heap_Extend+0x250> RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0da90: 80 16 00 04 lwz r0,4(r22) ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); ffc0da94: 81 61 00 08 lwz r11,8(r1) ffc0da98: 54 00 07 fe clrlwi r0,r0,31 } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { _Heap_Link_above( ffc0da9c: 81 21 00 0c lwz r9,12(r1) ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); ffc0daa0: 7d 76 58 50 subf r11,r22,r11 block->size_and_flag = size | flag; ffc0daa4: 7d 60 03 78 or r0,r11,r0 ffc0daa8: 90 16 00 04 stw r0,4(r22) last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; ffc0daac: 80 09 00 04 lwz r0,4(r9) ffc0dab0: 60 00 00 01 ori r0,r0,1 ffc0dab4: 90 09 00 04 stw r0,4(r9) extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { ffc0dab8: 2f 97 00 00 cmpwi cr7,r23,0 ffc0dabc: 40 be 00 18 bne+ cr7,ffc0dad4 <_Heap_Extend+0x26c> <== NEVER TAKEN ffc0dac0: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0dac4: 40 be 00 10 bne+ cr7,ffc0dad4 <_Heap_Extend+0x26c> _Heap_Free_block( heap, extend_first_block ); ffc0dac8: 80 81 00 08 lwz r4,8(r1) ffc0dacc: 7f e3 fb 78 mr r3,r31 ffc0dad0: 4b ff fd 5d bl ffc0d82c <_Heap_Free_block> */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( heap->last_block, (uintptr_t) heap->first_block - (uintptr_t) heap->last_block ffc0dad4: 81 3f 00 24 lwz r9,36(r31) extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) ffc0dad8: 2f 99 00 00 cmpwi cr7,r25,0 * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( ffc0dadc: 81 7f 00 20 lwz r11,32(r31) RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0dae0: 80 09 00 04 lwz r0,4(r9) * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( ffc0dae4: 7d 69 58 50 subf r11,r9,r11 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0dae8: 54 00 07 fe clrlwi r0,r0,31 block->size_and_flag = size | flag; ffc0daec: 7d 60 03 78 or r0,r11,r0 ffc0daf0: 90 09 00 04 stw r0,4(r9) _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; ffc0daf4: 80 1f 00 30 lwz r0,48(r31) ffc0daf8: 7f 18 00 50 subf r24,r24,r0 /* Statistics */ stats->size += extended_size; ffc0dafc: 80 1f 00 2c lwz r0,44(r31) ffc0db00: 7c 00 c2 14 add r0,r0,r24 ffc0db04: 90 1f 00 2c stw r0,44(r31) if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; ffc0db08: 38 00 00 01 li r0,1 extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) ffc0db0c: 41 9e 00 10 beq- cr7,ffc0db1c <_Heap_Extend+0x2b4> <== NEVER TAKEN *extended_size_ptr = extended_size; ffc0db10: 93 19 00 00 stw r24,0(r25) ffc0db14: 48 00 00 08 b ffc0db1c <_Heap_Extend+0x2b4> _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; ffc0db18: 38 00 00 00 li r0,0 if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } ffc0db1c: 39 61 00 40 addi r11,r1,64 ffc0db20: 7c 03 03 78 mr r3,r0 ffc0db24: 4b ff 2a 7c b ffc005a0 <_restgpr_22_x> =============================================================================== ffc0d354 <_Heap_Free>: ffc0d354: 80 03 00 10 lwz r0,16(r3) return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { ffc0d358: 7c 69 1b 78 mr r9,r3 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block ffc0d35c: 80 a3 00 20 lwz r5,32(r3) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc0d360: 7d 64 03 96 divwu r11,r4,r0 ffc0d364: 94 21 ff f0 stwu r1,-16(r1) ffc0d368: 93 e1 00 0c stw r31,12(r1) ffc0d36c: 7d 6b 01 d6 mullw r11,r11,r0 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0d370: 38 00 00 00 li r0,0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc0d374: 39 6b ff f8 addi r11,r11,-8 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0d378: 7f 8b 28 40 cmplw cr7,r11,r5 ffc0d37c: 41 9c 00 14 blt- cr7,ffc0d390 <_Heap_Free+0x3c> ffc0d380: 80 03 00 24 lwz r0,36(r3) ffc0d384: 7c 0b 00 10 subfc r0,r11,r0 ffc0d388: 38 00 00 00 li r0,0 ffc0d38c: 7c 00 01 14 adde r0,r0,r0 uintptr_t next_block_size = 0; bool next_is_free = false; _Heap_Protection_block_check( heap, block ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { ffc0d390: 2f 80 00 00 cmpwi cr7,r0,0 return false; ffc0d394: 38 60 00 00 li r3,0 uintptr_t next_block_size = 0; bool next_is_free = false; _Heap_Protection_block_check( heap, block ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { ffc0d398: 41 9e 01 b0 beq- cr7,ffc0d548 <_Heap_Free+0x1f4> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc0d39c: 80 cb 00 04 lwz r6,4(r11) ffc0d3a0: 38 00 00 00 li r0,0 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0d3a4: 54 c8 00 3c rlwinm r8,r6,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc0d3a8: 7d 4b 42 14 add r10,r11,r8 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; ffc0d3ac: 7f 8a 28 40 cmplw cr7,r10,r5 ffc0d3b0: 41 9c 00 14 blt- cr7,ffc0d3c4 <_Heap_Free+0x70> <== NEVER TAKEN ffc0d3b4: 80 09 00 24 lwz r0,36(r9) ffc0d3b8: 7c 0a 00 10 subfc r0,r10,r0 ffc0d3bc: 38 00 00 00 li r0,0 ffc0d3c0: 7c 00 01 14 adde r0,r0,r0 block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { ffc0d3c4: 2f 80 00 00 cmpwi cr7,r0,0 _HAssert( false ); return false; ffc0d3c8: 38 60 00 00 li r3,0 block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { ffc0d3cc: 41 9e 01 7c beq- cr7,ffc0d548 <_Heap_Free+0x1f4> <== NEVER TAKEN --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc0d3d0: 80 0a 00 04 lwz r0,4(r10) if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc0d3d4: 70 04 00 01 andi. r4,r0,1 ffc0d3d8: 41 82 01 70 beq- ffc0d548 <_Heap_Free+0x1f4> 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 ffc0d3dc: 80 69 00 24 lwz r3,36(r9) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0d3e0: 54 00 00 3c rlwinm r0,r0,0,0,30 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); ffc0d3e4: 38 80 00 00 li r4,0 ffc0d3e8: 7f 8a 18 00 cmpw cr7,r10,r3 ffc0d3ec: 41 9e 00 18 beq- cr7,ffc0d404 <_Heap_Free+0xb0> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc0d3f0: 7c ea 02 14 add r7,r10,r0 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0d3f4: 80 e7 00 04 lwz r7,4(r7) return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) ffc0d3f8: 70 ff 00 01 andi. r31,r7,1 ffc0d3fc: 7c 80 00 26 mfcr r4 ffc0d400: 54 84 1f fe rlwinm r4,r4,3,31,31 next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { ffc0d404: 70 c7 00 01 andi. r7,r6,1 if ( !_Heap_Protection_determine_block_free( heap, block ) ) { return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block ffc0d408: 54 84 06 3e clrlwi r4,r4,24 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { ffc0d40c: 40 82 00 98 bne- ffc0d4a4 <_Heap_Free+0x150> uintptr_t const prev_size = block->prev_size; ffc0d410: 80 cb 00 00 lwz r6,0(r11) const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0d414: 39 80 00 00 li r12,0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc0d418: 7c e6 58 50 subf r7,r6,r11 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0d41c: 7f 87 28 40 cmplw cr7,r7,r5 ffc0d420: 41 9c 00 10 blt- cr7,ffc0d430 <_Heap_Free+0xdc> <== NEVER TAKEN ffc0d424: 7d 87 18 10 subfc r12,r7,r3 ffc0d428: 39 80 00 00 li r12,0 ffc0d42c: 7d 8c 61 14 adde r12,r12,r12 Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { ffc0d430: 2f 8c 00 00 cmpwi cr7,r12,0 _HAssert( false ); return( false ); ffc0d434: 38 60 00 00 li r3,0 if ( !_Heap_Is_prev_used( block ) ) { uintptr_t const prev_size = block->prev_size; Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { ffc0d438: 41 9e 01 10 beq- cr7,ffc0d548 <_Heap_Free+0x1f4> <== 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; ffc0d43c: 80 a7 00 04 lwz r5,4(r7) return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { ffc0d440: 70 bf 00 01 andi. r31,r5,1 ffc0d444: 41 82 01 04 beq- ffc0d548 <_Heap_Free+0x1f4> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ ffc0d448: 2f 84 00 00 cmpwi cr7,r4,0 ffc0d44c: 41 9e 00 38 beq- cr7,ffc0d484 <_Heap_Free+0x130> return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; ffc0d450: 81 6a 00 08 lwz r11,8(r10) uintptr_t const size = block_size + prev_size + next_block_size; ffc0d454: 7c 08 02 14 add r0,r8,r0 Heap_Block *prev = block->prev; ffc0d458: 81 4a 00 0c lwz r10,12(r10) ffc0d45c: 7c c0 32 14 add r6,r0,r6 prev->next = next; ffc0d460: 91 6a 00 08 stw r11,8(r10) next->prev = prev; ffc0d464: 91 4b 00 0c stw r10,12(r11) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc0d468: 81 69 00 38 lwz r11,56(r9) ffc0d46c: 38 0b ff ff addi r0,r11,-1 ffc0d470: 90 09 00 38 stw r0,56(r9) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0d474: 60 c0 00 01 ori r0,r6,1 ffc0d478: 90 07 00 04 stw r0,4(r7) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; ffc0d47c: 7c c7 31 2e stwx r6,r7,r6 ffc0d480: 48 00 00 a0 b ffc0d520 <_Heap_Free+0x1cc> } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; ffc0d484: 7c c8 32 14 add r6,r8,r6 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0d488: 60 c0 00 01 ori r0,r6,1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; ffc0d48c: 7c cb 41 2e stwx r6,r11,r8 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; ffc0d490: 90 07 00 04 stw r0,4(r7) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc0d494: 80 0a 00 04 lwz r0,4(r10) ffc0d498: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc0d49c: 90 0a 00 04 stw r0,4(r10) ffc0d4a0: 48 00 00 80 b ffc0d520 <_Heap_Free+0x1cc> next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ ffc0d4a4: 2f 84 00 00 cmpwi cr7,r4,0 ffc0d4a8: 41 9e 00 30 beq- cr7,ffc0d4d8 <_Heap_Free+0x184> RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; ffc0d4ac: 80 ca 00 08 lwz r6,8(r10) uintptr_t const size = block_size + next_block_size; ffc0d4b0: 7c e0 42 14 add r7,r0,r8 Heap_Block *prev = old_block->prev; ffc0d4b4: 81 4a 00 0c lwz r10,12(r10) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0d4b8: 60 e0 00 01 ori r0,r7,1 new_block->next = next; ffc0d4bc: 90 cb 00 08 stw r6,8(r11) new_block->prev = prev; ffc0d4c0: 91 4b 00 0c stw r10,12(r11) next->prev = new_block; prev->next = new_block; ffc0d4c4: 91 6a 00 08 stw r11,8(r10) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; ffc0d4c8: 91 66 00 0c stw r11,12(r6) ffc0d4cc: 90 0b 00 04 stw r0,4(r11) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; ffc0d4d0: 7c eb 39 2e stwx r7,r11,r7 ffc0d4d4: 48 00 00 4c b ffc0d520 <_Heap_Free+0x1cc> } 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; ffc0d4d8: 61 00 00 01 ori r0,r8,1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; ffc0d4dc: 80 e9 00 08 lwz r7,8(r9) ffc0d4e0: 90 0b 00 04 stw r0,4(r11) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc0d4e4: 80 0a 00 04 lwz r0,4(r10) new_block->next = next; ffc0d4e8: 90 eb 00 08 stw r7,8(r11) ffc0d4ec: 54 00 00 3c rlwinm r0,r0,0,0,30 new_block->prev = block_before; ffc0d4f0: 91 2b 00 0c stw r9,12(r11) next_block->prev_size = block_size; ffc0d4f4: 7d 0b 41 2e stwx r8,r11,r8 block_before->next = new_block; next->prev = new_block; ffc0d4f8: 91 67 00 0c stw r11,12(r7) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; ffc0d4fc: 91 69 00 08 stw r11,8(r9) /* Statistics */ ++stats->free_blocks; ffc0d500: 81 69 00 38 lwz r11,56(r9) } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc0d504: 90 0a 00 04 stw r0,4(r10) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; ffc0d508: 38 0b 00 01 addi r0,r11,1 if ( stats->max_free_blocks < stats->free_blocks ) { ffc0d50c: 81 69 00 3c lwz r11,60(r9) block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; ffc0d510: 90 09 00 38 stw r0,56(r9) if ( stats->max_free_blocks < stats->free_blocks ) { ffc0d514: 7f 8b 00 40 cmplw cr7,r11,r0 ffc0d518: 40 9c 00 08 bge- cr7,ffc0d520 <_Heap_Free+0x1cc> stats->max_free_blocks = stats->free_blocks; ffc0d51c: 90 09 00 3c stw r0,60(r9) } } /* Statistics */ --stats->used_blocks; ffc0d520: 81 69 00 40 lwz r11,64(r9) ++stats->frees; stats->free_size += block_size; return( true ); ffc0d524: 38 60 00 01 li r3,1 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc0d528: 38 0b ff ff addi r0,r11,-1 ++stats->frees; ffc0d52c: 81 69 00 50 lwz r11,80(r9) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc0d530: 90 09 00 40 stw r0,64(r9) ++stats->frees; ffc0d534: 38 0b 00 01 addi r0,r11,1 ffc0d538: 90 09 00 50 stw r0,80(r9) stats->free_size += block_size; ffc0d53c: 80 09 00 30 lwz r0,48(r9) ffc0d540: 7d 00 42 14 add r8,r0,r8 ffc0d544: 91 09 00 30 stw r8,48(r9) return( true ); } ffc0d548: 83 e1 00 0c lwz r31,12(r1) ffc0d54c: 38 21 00 10 addi r1,r1,16 ffc0d550: 4e 80 00 20 blr =============================================================================== ffc14d88 <_Heap_Size_of_alloc_area>: RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc14d88: 80 03 00 10 lwz r0,16(r3) bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { ffc14d8c: 7c 69 1b 78 mr r9,r3 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block ffc14d90: 81 03 00 20 lwz r8,32(r3) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc14d94: 7d 44 03 96 divwu r10,r4,r0 ffc14d98: 7d 4a 01 d6 mullw r10,r10,r0 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc14d9c: 38 00 00 00 li r0,0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc14da0: 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; ffc14da4: 7f 8a 40 40 cmplw cr7,r10,r8 ffc14da8: 41 9c 00 14 blt- cr7,ffc14dbc <_Heap_Size_of_alloc_area+0x34> ffc14dac: 80 03 00 24 lwz r0,36(r3) ffc14db0: 7c 0a 00 10 subfc r0,r10,r0 ffc14db4: 38 00 00 00 li r0,0 ffc14db8: 7c 00 01 14 adde r0,r0,r0 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { ffc14dbc: 2f 80 00 00 cmpwi cr7,r0,0 return false; ffc14dc0: 38 60 00 00 li r3,0 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { ffc14dc4: 4d 9e 00 20 beqlr cr7 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc14dc8: 81 6a 00 04 lwz r11,4(r10) const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc14dcc: 38 00 00 00 li r0,0 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc14dd0: 55 6b 00 3c rlwinm r11,r11,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc14dd4: 7d 6a 5a 14 add r11,r10,r11 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc14dd8: 7f 8b 40 40 cmplw cr7,r11,r8 ffc14ddc: 41 9c 00 14 blt- cr7,ffc14df0 <_Heap_Size_of_alloc_area+0x68><== NEVER TAKEN ffc14de0: 80 09 00 24 lwz r0,36(r9) ffc14de4: 7c 0b 00 10 subfc r0,r11,r0 ffc14de8: 38 00 00 00 li r0,0 ffc14dec: 7c 00 01 14 adde r0,r0,r0 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( ffc14df0: 2f 80 00 00 cmpwi cr7,r0,0 !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; ffc14df4: 38 60 00 00 li r3,0 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( ffc14df8: 4d 9e 00 20 beqlr cr7 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc14dfc: 80 0b 00 04 lwz r0,4(r11) !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ffc14e00: 70 09 00 01 andi. r9,r0,1 ffc14e04: 4d 82 00 20 beqlr ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; ffc14e08: 20 84 00 04 subfic r4,r4,4 ffc14e0c: 7d 64 5a 14 add r11,r4,r11 ffc14e10: 91 65 00 00 stw r11,0(r5) return true; ffc14e14: 38 60 00 01 li r3,1 } ffc14e18: 4e 80 00 20 blr =============================================================================== ffc099dc <_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; ffc099dc: 2f 85 00 00 cmpwi cr7,r5,0 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { ffc099e0: 94 21 ff 98 stwu r1,-104(r1) ffc099e4: 7c 08 02 a6 mflr r0 ffc099e8: bd c1 00 20 stmw r14,32(r1) ffc099ec: 7c 7e 1b 78 mr r30,r3 ffc099f0: 7c 9f 23 78 mr r31,r4 ffc099f4: 90 01 00 6c stw r0,108(r1) uintptr_t const page_size = heap->page_size; ffc099f8: 83 43 00 10 lwz r26,16(r3) uintptr_t const min_block_size = heap->min_block_size; ffc099fc: 83 23 00 14 lwz r25,20(r3) Heap_Block *const first_block = heap->first_block; ffc09a00: 83 03 00 20 lwz r24,32(r3) Heap_Block *const last_block = heap->last_block; ffc09a04: 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; ffc09a08: 41 9e 00 10 beq- cr7,ffc09a18 <_Heap_Walk+0x3c> ffc09a0c: 3d 20 ff c1 lis r9,-63 ffc09a10: 39 29 99 2c addi r9,r9,-26324 ffc09a14: 48 00 00 0c b ffc09a20 <_Heap_Walk+0x44> ffc09a18: 3d 20 ff c1 lis r9,-63 ffc09a1c: 39 29 99 28 addi r9,r9,-26328 ffc09a20: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc09a24: 3d 20 00 00 lis r9,0 return true; ffc09a28: 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() ) ) { ffc09a2c: 80 09 27 a8 lwz r0,10152(r9) ffc09a30: 2f 80 00 03 cmpwi cr7,r0,3 ffc09a34: 40 be 04 c4 bne+ cr7,ffc09ef8 <_Heap_Walk+0x51c> 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)( ffc09a38: 80 1e 00 08 lwz r0,8(r30) ffc09a3c: 3c a0 ff c1 lis r5,-63 ffc09a40: 81 1e 00 18 lwz r8,24(r30) ffc09a44: 7f e3 fb 78 mr r3,r31 ffc09a48: 90 01 00 0c stw r0,12(r1) ffc09a4c: 38 80 00 00 li r4,0 ffc09a50: 38 a5 72 25 addi r5,r5,29221 ffc09a54: 80 1e 00 0c lwz r0,12(r30) ffc09a58: 7f 46 d3 78 mr r6,r26 ffc09a5c: 81 3e 00 1c lwz r9,28(r30) ffc09a60: 7f 27 cb 78 mr r7,r25 ffc09a64: 90 01 00 10 stw r0,16(r1) ffc09a68: 7f 0a c3 78 mr r10,r24 ffc09a6c: 80 01 00 18 lwz r0,24(r1) ffc09a70: 92 e1 00 08 stw r23,8(r1) ffc09a74: 7c 09 03 a6 mtctr r0 ffc09a78: 4c c6 31 82 crclr 4*cr1+eq ffc09a7c: 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 ) { ffc09a80: 2f 9a 00 00 cmpwi cr7,r26,0 ffc09a84: 40 be 00 18 bne+ cr7,ffc09a9c <_Heap_Walk+0xc0> (*printer)( source, true, "page size is zero\n" ); ffc09a88: 3c a0 ff c1 lis r5,-63 ffc09a8c: 7f e3 fb 78 mr r3,r31 ffc09a90: 38 80 00 01 li r4,1 ffc09a94: 38 a5 72 b6 addi r5,r5,29366 ffc09a98: 48 00 00 94 b ffc09b2c <_Heap_Walk+0x150> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { ffc09a9c: 73 49 00 07 andi. r9,r26,7 ffc09aa0: 41 a2 00 1c beq+ ffc09abc <_Heap_Walk+0xe0> (*printer)( ffc09aa4: 3c a0 ff c1 lis r5,-63 ffc09aa8: 7f e3 fb 78 mr r3,r31 ffc09aac: 38 80 00 01 li r4,1 ffc09ab0: 38 a5 72 c9 addi r5,r5,29385 ffc09ab4: 7f 46 d3 78 mr r6,r26 ffc09ab8: 48 00 04 5c b ffc09f14 <_Heap_Walk+0x538> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc09abc: 7c 19 d3 96 divwu r0,r25,r26 ffc09ac0: 7c 00 d1 d6 mullw r0,r0,r26 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { ffc09ac4: 7f 99 00 00 cmpw cr7,r25,r0 ffc09ac8: 41 be 00 1c beq+ cr7,ffc09ae4 <_Heap_Walk+0x108> (*printer)( ffc09acc: 3c a0 ff c1 lis r5,-63 ffc09ad0: 7f e3 fb 78 mr r3,r31 ffc09ad4: 38 80 00 01 li r4,1 ffc09ad8: 38 a5 72 e7 addi r5,r5,29415 ffc09adc: 7f 26 cb 78 mr r6,r25 ffc09ae0: 48 00 04 34 b ffc09f14 <_Heap_Walk+0x538> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc09ae4: 38 18 00 08 addi r0,r24,8 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc09ae8: 7d 20 d3 96 divwu r9,r0,r26 ffc09aec: 7d 29 d1 d6 mullw r9,r9,r26 ); return false; } if ( ffc09af0: 7f 80 48 00 cmpw cr7,r0,r9 ffc09af4: 41 be 00 1c beq+ cr7,ffc09b10 <_Heap_Walk+0x134> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( ffc09af8: 3c a0 ff c1 lis r5,-63 ffc09afc: 7f e3 fb 78 mr r3,r31 ffc09b00: 38 80 00 01 li r4,1 ffc09b04: 38 a5 73 0b addi r5,r5,29451 ffc09b08: 7f 06 c3 78 mr r6,r24 ffc09b0c: 48 00 04 08 b ffc09f14 <_Heap_Walk+0x538> 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; ffc09b10: 80 18 00 04 lwz r0,4(r24) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { ffc09b14: 70 09 00 01 andi. r9,r0,1 ffc09b18: 40 a2 00 28 bne+ ffc09b40 <_Heap_Walk+0x164> (*printer)( ffc09b1c: 3c a0 ff c1 lis r5,-63 ffc09b20: 7f e3 fb 78 mr r3,r31 ffc09b24: 38 80 00 01 li r4,1 ffc09b28: 38 a5 73 3c addi r5,r5,29500 ffc09b2c: 80 01 00 18 lwz r0,24(r1) ffc09b30: 7c 09 03 a6 mtctr r0 ffc09b34: 4c c6 31 82 crclr 4*cr1+eq ffc09b38: 4e 80 04 21 bctrl ffc09b3c: 48 00 01 18 b ffc09c54 <_Heap_Walk+0x278> - 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; ffc09b40: 83 b7 00 04 lwz r29,4(r23) ffc09b44: 57 bd 00 3c rlwinm r29,r29,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc09b48: 7f b7 ea 14 add r29,r23,r29 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc09b4c: 80 1d 00 04 lwz r0,4(r29) ); return false; } if ( _Heap_Is_free( last_block ) ) { ffc09b50: 70 09 00 01 andi. r9,r0,1 ffc09b54: 40 a2 00 18 bne+ ffc09b6c <_Heap_Walk+0x190> (*printer)( ffc09b58: 3c a0 ff c1 lis r5,-63 ffc09b5c: 7f e3 fb 78 mr r3,r31 ffc09b60: 38 80 00 01 li r4,1 ffc09b64: 38 a5 73 6a addi r5,r5,29546 ffc09b68: 4b ff ff c4 b ffc09b2c <_Heap_Walk+0x150> ); return false; } if ( ffc09b6c: 7f 9d c0 00 cmpw cr7,r29,r24 ffc09b70: 41 9e 00 18 beq- cr7,ffc09b88 <_Heap_Walk+0x1ac> <== ALWAYS TAKEN _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( ffc09b74: 3c a0 ff c1 lis r5,-63 <== NOT EXECUTED ffc09b78: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc09b7c: 38 80 00 01 li r4,1 <== NOT EXECUTED ffc09b80: 38 a5 73 7f addi r5,r5,29567 <== NOT EXECUTED ffc09b84: 4b ff ff a8 b ffc09b2c <_Heap_Walk+0x150> <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; ffc09b88: 81 3e 00 10 lwz r9,16(r30) const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); ffc09b8c: 7f c0 f3 78 mr r0,r30 block = next_block; } while ( block != first_block ); return true; } ffc09b90: 80 de 00 08 lwz r6,8(r30) ffc09b94: 48 00 00 d0 b ffc09c64 <_Heap_Walk+0x288> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc09b98: 81 5e 00 20 lwz r10,32(r30) ffc09b9c: 39 60 00 00 li r11,0 ffc09ba0: 7f 8a 30 40 cmplw cr7,r10,r6 ffc09ba4: 41 9d 00 14 bgt- cr7,ffc09bb8 <_Heap_Walk+0x1dc> ffc09ba8: 81 7e 00 24 lwz r11,36(r30) ffc09bac: 7d 66 58 10 subfc r11,r6,r11 ffc09bb0: 39 60 00 00 li r11,0 ffc09bb4: 7d 6b 59 14 adde r11,r11,r11 const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { ffc09bb8: 2f 8b 00 00 cmpwi cr7,r11,0 ffc09bbc: 40 be 00 18 bne+ cr7,ffc09bd4 <_Heap_Walk+0x1f8> (*printer)( ffc09bc0: 3c a0 ff c1 lis r5,-63 ffc09bc4: 7f e3 fb 78 mr r3,r31 ffc09bc8: 38 80 00 01 li r4,1 ffc09bcc: 38 a5 73 ae addi r5,r5,29614 ffc09bd0: 48 00 03 44 b ffc09f14 <_Heap_Walk+0x538> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc09bd4: 39 66 00 08 addi r11,r6,8 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc09bd8: 7d 4b 4b 96 divwu r10,r11,r9 ffc09bdc: 7d 4a 49 d6 mullw r10,r10,r9 ); return false; } if ( ffc09be0: 7f 8b 50 00 cmpw cr7,r11,r10 ffc09be4: 41 be 00 18 beq+ cr7,ffc09bfc <_Heap_Walk+0x220> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( ffc09be8: 3c a0 ff c1 lis r5,-63 ffc09bec: 7f e3 fb 78 mr r3,r31 ffc09bf0: 38 80 00 01 li r4,1 ffc09bf4: 38 a5 73 ce addi r5,r5,29646 ffc09bf8: 48 00 03 1c b ffc09f14 <_Heap_Walk+0x538> - 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; ffc09bfc: 81 66 00 04 lwz r11,4(r6) ffc09c00: 55 6b 00 3c rlwinm r11,r11,0,0,30 block = next_block; } while ( block != first_block ); return true; } ffc09c04: 7d 66 5a 14 add r11,r6,r11 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc09c08: 81 6b 00 04 lwz r11,4(r11) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc09c0c: 71 6a 00 01 andi. r10,r11,1 ffc09c10: 41 a2 00 18 beq+ ffc09c28 <_Heap_Walk+0x24c> (*printer)( ffc09c14: 3c a0 ff c1 lis r5,-63 ffc09c18: 7f e3 fb 78 mr r3,r31 ffc09c1c: 38 80 00 01 li r4,1 ffc09c20: 38 a5 73 fe addi r5,r5,29694 ffc09c24: 48 00 02 f0 b ffc09f14 <_Heap_Walk+0x538> ); return false; } if ( free_block->prev != prev_block ) { ffc09c28: 80 e6 00 0c lwz r7,12(r6) ffc09c2c: 7f 87 00 00 cmpw cr7,r7,r0 ffc09c30: 41 be 00 2c beq+ cr7,ffc09c5c <_Heap_Walk+0x280> (*printer)( ffc09c34: 3c a0 ff c1 lis r5,-63 ffc09c38: 7f e3 fb 78 mr r3,r31 ffc09c3c: 38 80 00 01 li r4,1 ffc09c40: 38 a5 74 1a addi r5,r5,29722 ffc09c44: 80 01 00 18 lwz r0,24(r1) ffc09c48: 7c 09 03 a6 mtctr r0 ffc09c4c: 4c c6 31 82 crclr 4*cr1+eq ffc09c50: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc09c54: 38 60 00 00 li r3,0 ffc09c58: 48 00 02 a0 b ffc09ef8 <_Heap_Walk+0x51c> return false; } prev_block = free_block; free_block = free_block->next; ffc09c5c: 7c c0 33 78 mr r0,r6 ffc09c60: 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 ) { ffc09c64: 7f 86 f0 00 cmpw cr7,r6,r30 ffc09c68: 40 9e ff 30 bne+ cr7,ffc09b98 <_Heap_Walk+0x1bc> ffc09c6c: 48 00 00 0c b ffc09c78 <_Heap_Walk+0x29c> block->prev_size ); } block = next_block; } while ( block != first_block ); ffc09c70: 7f 7d db 78 mr r29,r27 ffc09c74: 48 00 00 30 b ffc09ca4 <_Heap_Walk+0x2c8> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc09c78: 3e 60 ff c1 lis r19,-63 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( ffc09c7c: 3e 80 ff c1 lis r20,-63 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( ffc09c80: 3e 40 ff c1 lis r18,-63 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc09c84: 3a 73 75 ba addi r19,r19,30138 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( ffc09c88: 3a 94 75 a3 addi r20,r20,30115 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)( ffc09c8c: 3a 52 75 06 addi r18,r18,29958 ffc09c90: 3e 20 ff c1 lis r17,-63 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc09c94: 3e c0 ff c1 lis r22,-63 ffc09c98: 3e 00 ff c1 lis r16,-63 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( ffc09c9c: 3d e0 ff c1 lis r15,-63 block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc09ca0: 3d c0 ff c1 lis r14,-63 block = next_block; } while ( block != first_block ); return true; } ffc09ca4: 82 bd 00 04 lwz r21,4(r29) const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc09ca8: 38 00 00 00 li r0,0 ffc09cac: 81 3e 00 20 lwz r9,32(r30) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc09cb0: 56 bc 00 3c rlwinm r28,r21,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc09cb4: 7f 7d e2 14 add r27,r29,r28 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; ffc09cb8: 7f 89 d8 40 cmplw cr7,r9,r27 ffc09cbc: 41 9d 00 14 bgt- cr7,ffc09cd0 <_Heap_Walk+0x2f4> <== NEVER TAKEN ffc09cc0: 80 1e 00 24 lwz r0,36(r30) ffc09cc4: 7c 1b 00 10 subfc r0,r27,r0 ffc09cc8: 38 00 00 00 li r0,0 ffc09ccc: 7c 00 01 14 adde r0,r0,r0 bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { ffc09cd0: 2f 80 00 00 cmpwi cr7,r0,0 ffc09cd4: 40 be 00 18 bne+ cr7,ffc09cec <_Heap_Walk+0x310> (*printer)( ffc09cd8: 3c a0 ff c1 lis r5,-63 ffc09cdc: 7f e3 fb 78 mr r3,r31 ffc09ce0: 38 80 00 01 li r4,1 ffc09ce4: 38 a5 74 4c addi r5,r5,29772 ffc09ce8: 48 00 00 a8 b ffc09d90 <_Heap_Walk+0x3b4> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc09cec: 7d 3c d3 96 divwu r9,r28,r26 ffc09cf0: 7d 29 d1 d6 mullw r9,r9,r26 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; ffc09cf4: 7f a0 ba 78 xor r0,r29,r23 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { ffc09cf8: 7f 9c 48 00 cmpw cr7,r28,r9 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; ffc09cfc: 7c 00 00 34 cntlzw r0,r0 ffc09d00: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc09d04: 68 00 00 01 xori r0,r0,1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { ffc09d08: 41 9e 00 28 beq- cr7,ffc09d30 <_Heap_Walk+0x354> ffc09d0c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09d10: 41 be 00 20 beq+ cr7,ffc09d30 <_Heap_Walk+0x354> (*printer)( ffc09d14: 3c a0 ff c1 lis r5,-63 ffc09d18: 7f e3 fb 78 mr r3,r31 ffc09d1c: 38 80 00 01 li r4,1 ffc09d20: 38 a5 74 79 addi r5,r5,29817 ffc09d24: 7f a6 eb 78 mr r6,r29 ffc09d28: 7f 87 e3 78 mr r7,r28 ffc09d2c: 4b ff ff 18 b ffc09c44 <_Heap_Walk+0x268> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { ffc09d30: 7f 9c c8 40 cmplw cr7,r28,r25 ffc09d34: 40 9c 00 3c bge- cr7,ffc09d70 <_Heap_Walk+0x394> ffc09d38: 2f 80 00 00 cmpwi cr7,r0,0 ffc09d3c: 41 be 00 34 beq+ cr7,ffc09d70 <_Heap_Walk+0x394> <== NEVER TAKEN (*printer)( ffc09d40: 80 01 00 18 lwz r0,24(r1) ffc09d44: 3c a0 ff c1 lis r5,-63 ffc09d48: 7f e3 fb 78 mr r3,r31 ffc09d4c: 38 80 00 01 li r4,1 ffc09d50: 7c 09 03 a6 mtctr r0 ffc09d54: 38 a5 74 a7 addi r5,r5,29863 ffc09d58: 7f a6 eb 78 mr r6,r29 ffc09d5c: 7f 87 e3 78 mr r7,r28 ffc09d60: 7f 28 cb 78 mr r8,r25 ffc09d64: 4c c6 31 82 crclr 4*cr1+eq ffc09d68: 4e 80 04 21 bctrl ffc09d6c: 4b ff fe e8 b ffc09c54 <_Heap_Walk+0x278> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { ffc09d70: 7f 9b e8 40 cmplw cr7,r27,r29 ffc09d74: 41 9d 00 28 bgt- cr7,ffc09d9c <_Heap_Walk+0x3c0> ffc09d78: 2f 80 00 00 cmpwi cr7,r0,0 ffc09d7c: 41 be 00 20 beq+ cr7,ffc09d9c <_Heap_Walk+0x3c0> (*printer)( ffc09d80: 3c a0 ff c1 lis r5,-63 ffc09d84: 7f e3 fb 78 mr r3,r31 ffc09d88: 38 80 00 01 li r4,1 ffc09d8c: 38 a5 74 d2 addi r5,r5,29906 ffc09d90: 7f a6 eb 78 mr r6,r29 ffc09d94: 7f 67 db 78 mr r7,r27 ffc09d98: 4b ff fe ac b ffc09c44 <_Heap_Walk+0x268> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc09d9c: 80 1b 00 04 lwz r0,4(r27) ffc09da0: 56 b5 07 fe clrlwi r21,r21,31 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc09da4: 70 09 00 01 andi. r9,r0,1 ffc09da8: 40 a2 00 ec bne+ ffc09e94 <_Heap_Walk+0x4b8> false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? ffc09dac: 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)( ffc09db0: 39 2f 71 f2 addi r9,r15,29170 ffc09db4: 80 1e 00 08 lwz r0,8(r30) block = next_block; } while ( block != first_block ); return true; } ffc09db8: 81 7e 00 0c lwz r11,12(r30) 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)( ffc09dbc: 7f 88 00 00 cmpw cr7,r8,r0 ffc09dc0: 41 9e 00 14 beq- cr7,ffc09dd4 <_Heap_Walk+0x3f8> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc09dc4: 7f 88 f0 00 cmpw cr7,r8,r30 ffc09dc8: 39 36 71 27 addi r9,r22,28967 ffc09dcc: 40 be 00 08 bne+ cr7,ffc09dd4 <_Heap_Walk+0x3f8> ffc09dd0: 39 2e 72 02 addi r9,r14,29186 block->next, block->next == last_free_block ? ffc09dd4: 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)( ffc09dd8: 38 11 72 0c addi r0,r17,29196 ffc09ddc: 7f 8a 58 00 cmpw cr7,r10,r11 ffc09de0: 41 9e 00 14 beq- cr7,ffc09df4 <_Heap_Walk+0x418> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc09de4: 7f 8a f0 00 cmpw cr7,r10,r30 ffc09de8: 38 16 71 27 addi r0,r22,28967 ffc09dec: 40 be 00 08 bne+ cr7,ffc09df4 <_Heap_Walk+0x418> ffc09df0: 38 10 72 1b addi r0,r16,29211 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)( ffc09df4: 90 01 00 08 stw r0,8(r1) ffc09df8: 7f e3 fb 78 mr r3,r31 ffc09dfc: 38 80 00 00 li r4,0 ffc09e00: 80 01 00 18 lwz r0,24(r1) ffc09e04: 7e 45 93 78 mr r5,r18 ffc09e08: 7f a6 eb 78 mr r6,r29 ffc09e0c: 7f 87 e3 78 mr r7,r28 ffc09e10: 7c 09 03 a6 mtctr r0 ffc09e14: 4c c6 31 82 crclr 4*cr1+eq ffc09e18: 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 ) { ffc09e1c: 81 1b 00 00 lwz r8,0(r27) ffc09e20: 7f 9c 40 00 cmpw cr7,r28,r8 ffc09e24: 41 be 00 34 beq+ cr7,ffc09e58 <_Heap_Walk+0x47c> (*printer)( ffc09e28: 80 01 00 18 lwz r0,24(r1) ffc09e2c: 3c a0 ff c1 lis r5,-63 ffc09e30: 7f e3 fb 78 mr r3,r31 ffc09e34: 38 80 00 01 li r4,1 ffc09e38: 7c 09 03 a6 mtctr r0 ffc09e3c: 38 a5 75 3b addi r5,r5,30011 ffc09e40: 7f a6 eb 78 mr r6,r29 ffc09e44: 7f 87 e3 78 mr r7,r28 ffc09e48: 7f 69 db 78 mr r9,r27 ffc09e4c: 4c c6 31 82 crclr 4*cr1+eq ffc09e50: 4e 80 04 21 bctrl ffc09e54: 4b ff fe 00 b ffc09c54 <_Heap_Walk+0x278> ); return false; } if ( !prev_used ) { ffc09e58: 2f 95 00 00 cmpwi cr7,r21,0 ffc09e5c: 40 be 00 18 bne+ cr7,ffc09e74 <_Heap_Walk+0x498> (*printer)( ffc09e60: 3c a0 ff c1 lis r5,-63 ffc09e64: 7f e3 fb 78 mr r3,r31 ffc09e68: 38 80 00 01 li r4,1 ffc09e6c: 38 a5 75 74 addi r5,r5,30068 ffc09e70: 48 00 00 a0 b ffc09f10 <_Heap_Walk+0x534> block = next_block; } while ( block != first_block ); return true; } ffc09e74: 81 3e 00 08 lwz r9,8(r30) ffc09e78: 48 00 00 10 b ffc09e88 <_Heap_Walk+0x4ac> { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { if ( free_block == block ) { ffc09e7c: 7f 89 e8 00 cmpw cr7,r9,r29 ffc09e80: 41 9e 00 6c beq- cr7,ffc09eec <_Heap_Walk+0x510> return true; } free_block = free_block->next; ffc09e84: 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 ) { ffc09e88: 7f 89 f0 00 cmpw cr7,r9,r30 ffc09e8c: 40 9e ff f0 bne+ cr7,ffc09e7c <_Heap_Walk+0x4a0> ffc09e90: 48 00 00 70 b ffc09f00 <_Heap_Walk+0x524> if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { ffc09e94: 2f 95 00 00 cmpwi cr7,r21,0 ffc09e98: 41 9e 00 2c beq- cr7,ffc09ec4 <_Heap_Walk+0x4e8> (*printer)( ffc09e9c: 80 01 00 18 lwz r0,24(r1) ffc09ea0: 7f e3 fb 78 mr r3,r31 ffc09ea4: 38 80 00 00 li r4,0 ffc09ea8: 7e 85 a3 78 mr r5,r20 ffc09eac: 7c 09 03 a6 mtctr r0 ffc09eb0: 7f a6 eb 78 mr r6,r29 ffc09eb4: 7f 87 e3 78 mr r7,r28 ffc09eb8: 4c c6 31 82 crclr 4*cr1+eq ffc09ebc: 4e 80 04 21 bctrl ffc09ec0: 48 00 00 2c b ffc09eec <_Heap_Walk+0x510> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc09ec4: 80 01 00 18 lwz r0,24(r1) ffc09ec8: 7f e3 fb 78 mr r3,r31 ffc09ecc: 38 80 00 00 li r4,0 ffc09ed0: 81 1d 00 00 lwz r8,0(r29) ffc09ed4: 7e 65 9b 78 mr r5,r19 ffc09ed8: 7c 09 03 a6 mtctr r0 ffc09edc: 7f a6 eb 78 mr r6,r29 ffc09ee0: 7f 87 e3 78 mr r7,r28 ffc09ee4: 4c c6 31 82 crclr 4*cr1+eq ffc09ee8: 4e 80 04 21 bctrl block->prev_size ); } block = next_block; } while ( block != first_block ); ffc09eec: 7f 9b c0 00 cmpw cr7,r27,r24 ffc09ef0: 40 9e fd 80 bne+ cr7,ffc09c70 <_Heap_Walk+0x294> return true; ffc09ef4: 38 60 00 01 li r3,1 } ffc09ef8: 39 61 00 68 addi r11,r1,104 ffc09efc: 4b ff 6b c4 b ffc00ac0 <_restgpr_14_x> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( ffc09f00: 3c a0 ff c1 lis r5,-63 ffc09f04: 7f e3 fb 78 mr r3,r31 ffc09f08: 38 80 00 01 li r4,1 ffc09f0c: 38 a5 75 df addi r5,r5,30175 ffc09f10: 7f a6 eb 78 mr r6,r29 ffc09f14: 80 01 00 18 lwz r0,24(r1) ffc09f18: 7c 09 03 a6 mtctr r0 ffc09f1c: 4c c6 31 82 crclr 4*cr1+eq ffc09f20: 4e 80 04 21 bctrl ffc09f24: 4b ff fd 30 b ffc09c54 <_Heap_Walk+0x278> =============================================================================== ffc0992c <_Heap_Walk_print>: static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0992c: 7c 08 02 a6 mflr r0 ffc09930: 7c 2b 0b 78 mr r11,r1 ffc09934: 94 21 ff 88 stwu r1,-120(r1) ffc09938: 90 01 00 7c stw r0,124(r1) ffc0993c: 4b ff 71 7d bl ffc00ab8 <_savegpr_31> ffc09940: 7c 60 1b 78 mr r0,r3 ffc09944: 90 c1 00 1c stw r6,28(r1) ffc09948: 90 e1 00 20 stw r7,32(r1) ffc0994c: 91 01 00 24 stw r8,36(r1) ffc09950: 91 21 00 28 stw r9,40(r1) ffc09954: 91 41 00 2c stw r10,44(r1) ffc09958: 40 86 00 24 bne- cr1,ffc0997c <_Heap_Walk_print+0x50> <== ALWAYS TAKEN ffc0995c: d8 21 00 30 stfd f1,48(r1) ffc09960: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc09964: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc09968: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc0996c: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc09970: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc09974: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc09978: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list ap; if ( error ) { ffc0997c: 2f 84 00 00 cmpwi cr7,r4,0 { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc09980: 7c bf 2b 78 mr r31,r5 va_list ap; if ( error ) { ffc09984: 41 be 00 10 beq+ cr7,ffc09994 <_Heap_Walk_print+0x68> printk( "FAIL[%d]: ", source ); ffc09988: 3c 60 ff c1 lis r3,-63 ffc0998c: 38 63 71 dc addi r3,r3,29148 ffc09990: 48 00 00 0c b ffc0999c <_Heap_Walk_print+0x70> } else { printk( "PASS[%d]: ", source ); ffc09994: 3c 60 ff c1 lis r3,-63 ffc09998: 38 63 71 e7 addi r3,r3,29159 ffc0999c: 7c 04 03 78 mr r4,r0 ffc099a0: 4c c6 31 82 crclr 4*cr1+eq ffc099a4: 4b ff bf 05 bl ffc058a8 } va_start( ap, fmt ); ffc099a8: 38 00 00 03 li r0,3 ffc099ac: 98 01 00 08 stb r0,8(r1) ffc099b0: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc099b4: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc099b8: 98 01 00 09 stb r0,9(r1) ffc099bc: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc099c0: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc099c4: 90 01 00 0c stw r0,12(r1) ffc099c8: 38 01 00 10 addi r0,r1,16 ffc099cc: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc099d0: 4b ff dc 9d bl ffc0766c va_end( ap ); } ffc099d4: 39 61 00 78 addi r11,r1,120 ffc099d8: 4b ff 71 2c b ffc00b04 <_restgpr_31_x> =============================================================================== ffc07fb0 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { ffc07fb0: 94 21 ff e0 stwu r1,-32(r1) ffc07fb4: 7c 08 02 a6 mflr r0 uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; ffc07fb8: 3d 20 00 00 lis r9,0 * workspace. * */ void _IO_Manager_initialization(void) { ffc07fbc: 90 01 00 24 stw r0,36(r1) uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; ffc07fc0: 39 29 20 a0 addi r9,r9,8352 * workspace. * */ void _IO_Manager_initialization(void) { ffc07fc4: bf 41 00 08 stmw r26,8(r1) ffc07fc8: 3f a0 00 00 lis r29,0 ffc07fcc: 3f 40 00 00 lis r26,0 rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; drivers_in_table = Configuration.number_of_device_drivers; ffc07fd0: 83 c9 00 34 lwz r30,52(r9) number_of_drivers = Configuration.maximum_drivers; ffc07fd4: 83 69 00 30 lwz r27,48(r9) uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; ffc07fd8: 83 e9 00 38 lwz r31,56(r9) /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) ffc07fdc: 7f 9b f0 40 cmplw cr7,r27,r30 ffc07fe0: 40 9d 00 40 ble- cr7,ffc08020 <_IO_Manager_initialization+0x70> * 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 ) ffc07fe4: 1f 9b 00 18 mulli r28,r27,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( ffc07fe8: 7f 83 e3 78 mr r3,r28 ffc07fec: 48 00 33 5d bl ffc0b348 <_Workspace_Allocate_or_fatal_error> sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( ffc07ff0: 38 80 00 00 li r4,0 ffc07ff4: 7f 85 e3 78 mr r5,r28 /* * 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 *) ffc07ff8: 90 7d 27 b8 stw r3,10168(r29) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; ffc07ffc: 93 7a 27 b4 stw r27,10164(r26) memset( ffc08000: 48 00 7f 51 bl ffc0ff50 ffc08004: 2f 9e 00 00 cmpwi cr7,r30,0 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc08008: 39 60 00 00 li r11,0 _IO_Driver_address_table[index] = driver_table[index]; ffc0800c: 7f a4 eb 78 mr r4,r29 ffc08010: 38 1e 00 01 addi r0,r30,1 ffc08014: 40 be 00 30 bne+ cr7,ffc08044 <_IO_Manager_initialization+0x94><== ALWAYS TAKEN ffc08018: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0801c: 48 00 00 28 b ffc08044 <_IO_Manager_initialization+0x94><== NOT EXECUTED * 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; ffc08020: 93 fd 27 b8 stw r31,10168(r29) _IO_Number_of_drivers = number_of_drivers; ffc08024: 93 da 27 b4 stw r30,10164(r26) return; ffc08028: 48 00 00 24 b ffc0804c <_IO_Manager_initialization+0x9c> _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]; ffc0802c: 80 64 27 b8 lwz r3,10168(r4) ffc08030: 7d 9f 5a 14 add r12,r31,r11 ffc08034: 7c 63 5a 14 add r3,r3,r11 ffc08038: 7c ac c4 aa lswi r5,r12,24 ffc0803c: 7c a3 c5 aa stswi r5,r3,24 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc08040: 39 6b 00 18 addi r11,r11,24 ffc08044: 34 00 ff ff addic. r0,r0,-1 ffc08048: 40 82 ff e4 bne+ ffc0802c <_IO_Manager_initialization+0x7c> _IO_Driver_address_table[index] = driver_table[index]; } ffc0804c: 39 61 00 20 addi r11,r1,32 ffc08050: 48 00 c1 8c b ffc141dc <_restgpr_26_x> =============================================================================== ffc08cf0 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc08cf0: 7c 2b 0b 78 mr r11,r1 ffc08cf4: 94 21 ff f0 stwu r1,-16(r1) ffc08cf8: 7c 08 02 a6 mflr r0 ffc08cfc: 48 00 b4 a9 bl ffc141a4 <_savegpr_31> _Internal_errors_What_happened.the_source = the_source; ffc08d00: 3d 60 00 00 lis r11,0 ffc08d04: 39 2b 2c 90 addi r9,r11,11408 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc08d08: 90 01 00 14 stw r0,20(r1) ffc08d0c: 7c bf 2b 78 mr r31,r5 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; ffc08d10: 98 89 00 04 stb r4,4(r9) _Internal_errors_What_happened.the_error = the_error; ffc08d14: 90 a9 00 08 stw r5,8(r9) bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; ffc08d18: 90 6b 2c 90 stw r3,11408(r11) _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); ffc08d1c: 48 00 20 bd bl ffc0add8 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; ffc08d20: 38 00 00 05 li r0,5 ffc08d24: 3d 20 00 00 lis r9,0 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); ffc08d28: 7f e3 fb 78 mr r3,r31 ffc08d2c: 90 09 27 a8 stw r0,10152(r9) ffc08d30: 4b ff a5 b1 bl ffc032e0 <_BSP_Fatal_error> ffc08d34: 48 00 00 00 b ffc08d34 <_Internal_error_Occurred+0x44><== NOT EXECUTED =============================================================================== ffc08d4c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc08d4c: 94 21 ff f0 stwu r1,-16(r1) ffc08d50: 7c 08 02 a6 mflr r0 ffc08d54: 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 ) ffc08d58: 80 03 00 18 lwz r0,24(r3) */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc08d5c: bf c1 00 08 stmw r30,8(r1) ffc08d60: 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 ) ffc08d64: 2f 80 00 00 cmpwi cr7,r0,0 return NULL; ffc08d68: 38 60 00 00 li r3,0 * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) ffc08d6c: 41 be 00 70 beq+ cr7,ffc08ddc <_Objects_Allocate+0x90> <== NEVER TAKEN /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); ffc08d70: 3b df 00 20 addi r30,r31,32 ffc08d74: 7f c3 f3 78 mr r3,r30 ffc08d78: 4b ff f5 e9 bl ffc08360 <_Chain_Get> if ( information->auto_extend ) { ffc08d7c: 88 1f 00 12 lbz r0,18(r31) ffc08d80: 2f 80 00 00 cmpwi cr7,r0,0 ffc08d84: 41 9e 00 58 beq- cr7,ffc08ddc <_Objects_Allocate+0x90> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { ffc08d88: 2f 83 00 00 cmpwi cr7,r3,0 ffc08d8c: 40 be 00 1c bne+ cr7,ffc08da8 <_Objects_Allocate+0x5c> _Objects_Extend_information( information ); ffc08d90: 7f e3 fb 78 mr r3,r31 ffc08d94: 48 00 00 85 bl ffc08e18 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); ffc08d98: 7f c3 f3 78 mr r3,r30 ffc08d9c: 4b ff f5 c5 bl ffc08360 <_Chain_Get> } if ( the_object ) { ffc08da0: 2c 03 00 00 cmpwi r3,0 ffc08da4: 41 a2 00 38 beq+ ffc08ddc <_Objects_Allocate+0x90> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc08da8: a1 23 00 0a lhz r9,10(r3) ffc08dac: a0 1f 00 0a lhz r0,10(r31) ffc08db0: 7c 00 48 50 subf r0,r0,r9 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; ffc08db4: a1 3f 00 14 lhz r9,20(r31) ffc08db8: 7c 00 4b 96 divwu r0,r0,r9 information->inactive_per_block[ block ]--; ffc08dbc: 81 3f 00 30 lwz r9,48(r31) ffc08dc0: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc08dc4: 7d 69 00 2e lwzx r11,r9,r0 ffc08dc8: 39 6b ff ff addi r11,r11,-1 ffc08dcc: 7d 69 01 2e stwx r11,r9,r0 information->inactive--; ffc08dd0: a1 3f 00 2c lhz r9,44(r31) ffc08dd4: 38 09 ff ff addi r0,r9,-1 ffc08dd8: b0 1f 00 2c sth r0,44(r31) ); } #endif return the_object; } ffc08ddc: 39 61 00 10 addi r11,r1,16 ffc08de0: 48 00 b4 0c b ffc141ec <_restgpr_30_x> =============================================================================== ffc08e18 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { ffc08e18: 94 21 ff b8 stwu r1,-72(r1) ffc08e1c: 7c 08 02 a6 mflr r0 ffc08e20: 90 01 00 4c stw r0,76(r1) minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc08e24: 81 63 00 34 lwz r11,52(r3) */ void _Objects_Extend_information( Objects_Information *information ) { ffc08e28: be a1 00 1c stmw r21,28(r1) ffc08e2c: 7c 7f 1b 78 mr r31,r3 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc08e30: 2f 8b 00 00 cmpwi cr7,r11,0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); ffc08e34: a3 83 00 0a lhz r28,10(r3) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc08e38: 41 9e 00 54 beq- cr7,ffc08e8c <_Objects_Extend_information+0x74> block_count = 0; else { block_count = information->maximum / information->allocation_size; ffc08e3c: a1 23 00 14 lhz r9,20(r3) * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc08e40: 39 6b ff fc addi r11,r11,-4 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; ffc08e44: a3 63 00 10 lhz r27,16(r3) /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); ffc08e48: 7f 9e e3 78 mr r30,r28 index_base = minimum_index; block = 0; ffc08e4c: 3b a0 00 00 li r29,0 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; ffc08e50: 7f 7b 4b 96 divwu r27,r27,r9 ffc08e54: 2f 9b 00 00 cmpwi cr7,r27,0 * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc08e58: 38 1b 00 01 addi r0,r27,1 ffc08e5c: 40 be 00 20 bne+ cr7,ffc08e7c <_Objects_Extend_information+0x64><== ALWAYS TAKEN ffc08e60: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc08e64: 48 00 00 18 b ffc08e7c <_Objects_Extend_information+0x64><== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { ffc08e68: 85 4b 00 04 lwzu r10,4(r11) ffc08e6c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc08e70: 41 9e 00 30 beq- cr7,ffc08ea0 <_Objects_Extend_information+0x88> ffc08e74: 7f de 4a 14 add r30,r30,r9 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { ffc08e78: 3b bd 00 01 addi r29,r29,1 ffc08e7c: 34 00 ff ff addic. r0,r0,-1 ffc08e80: 40 82 ff e8 bne+ ffc08e68 <_Objects_Extend_information+0x50> /* * 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; ffc08e84: 3b 20 00 01 li r25,1 ffc08e88: 48 00 00 1c b ffc08ea4 <_Objects_Extend_information+0x8c> minimum_index = _Objects_Get_index( information->minimum_id ); ffc08e8c: 7f 9e e3 78 mr r30,r28 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; ffc08e90: 3b 20 00 01 li r25,1 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc08e94: 3b a0 00 00 li r29,0 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; ffc08e98: 3b 60 00 00 li r27,0 ffc08e9c: 48 00 00 08 b ffc08ea4 <_Objects_Extend_information+0x8c> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; ffc08ea0: 3b 20 00 00 li r25,0 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; ffc08ea4: a0 1f 00 14 lhz r0,20(r31) ffc08ea8: a2 ff 00 10 lhz r23,16(r31) ffc08eac: 7e e0 ba 14 add r23,r0,r23 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { ffc08eb0: 2b 97 ff ff cmplwi cr7,r23,65535 ffc08eb4: 41 9d 02 08 bgt- cr7,ffc090bc <_Objects_Extend_information+0x2a4> /* * 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; ffc08eb8: 80 7f 00 18 lwz r3,24(r31) ffc08ebc: 7c 60 19 d6 mullw r3,r0,r3 if ( information->auto_extend ) { ffc08ec0: 88 1f 00 12 lbz r0,18(r31) ffc08ec4: 2f 80 00 00 cmpwi cr7,r0,0 ffc08ec8: 41 9e 00 14 beq- cr7,ffc08edc <_Objects_Extend_information+0xc4> new_object_block = _Workspace_Allocate( block_size ); ffc08ecc: 48 00 24 1d bl ffc0b2e8 <_Workspace_Allocate> if ( !new_object_block ) ffc08ed0: 7c 7a 1b 79 mr. r26,r3 ffc08ed4: 40 a2 00 10 bne+ ffc08ee4 <_Objects_Extend_information+0xcc> ffc08ed8: 48 00 01 e4 b ffc090bc <_Objects_Extend_information+0x2a4> return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); ffc08edc: 48 00 24 6d bl ffc0b348 <_Workspace_Allocate_or_fatal_error> ffc08ee0: 7c 7a 1b 78 mr r26,r3 } /* * Do we need to grow the tables? */ if ( do_extend ) { ffc08ee4: 2f 99 00 00 cmpwi cr7,r25,0 ffc08ee8: 41 9e 01 54 beq- cr7,ffc0903c <_Objects_Extend_information+0x224> */ /* * Up the block count and maximum */ block_count++; ffc08eec: 3b 3b 00 01 addi r25,r27,1 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ffc08ef0: 1c 19 00 03 mulli r0,r25,3 ((maximum + minimum_index) * sizeof(Objects_Control *)); ffc08ef4: 7c 77 e2 14 add r3,r23,r28 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ffc08ef8: 7c 63 02 14 add r3,r3,r0 ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); ffc08efc: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc08f00: 48 00 23 e9 bl ffc0b2e8 <_Workspace_Allocate> if ( !object_blocks ) { ffc08f04: 7c 76 1b 79 mr. r22,r3 ffc08f08: 40 a2 00 10 bne+ ffc08f18 <_Objects_Extend_information+0x100> _Workspace_Free( new_object_block ); ffc08f0c: 7f 43 d3 78 mr r3,r26 ffc08f10: 48 00 24 0d bl ffc0b31c <_Workspace_Free> return; ffc08f14: 48 00 01 a8 b ffc090bc <_Objects_Extend_information+0x2a4> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc08f18: a0 1f 00 10 lhz r0,16(r31) } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( ffc08f1c: 57 39 10 3a rlwinm r25,r25,2,0,29 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); ffc08f20: 7f 16 ca 14 add r24,r22,r25 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc08f24: 7f 80 e0 40 cmplw cr7,r0,r28 ffc08f28: 7f 38 ca 14 add r25,r24,r25 ffc08f2c: 41 9d 00 20 bgt- cr7,ffc08f4c <_Objects_Extend_information+0x134> ffc08f30: 2f 9c 00 00 cmpwi cr7,r28,0 ffc08f34: 39 39 ff fc addi r9,r25,-4 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; ffc08f38: 39 60 00 00 li r11,0 ffc08f3c: 38 1c 00 01 addi r0,r28,1 ffc08f40: 40 be 00 4c bne+ cr7,ffc08f8c <_Objects_Extend_information+0x174><== ALWAYS TAKEN ffc08f44: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc08f48: 48 00 00 44 b ffc08f8c <_Objects_Extend_information+0x174><== NOT EXECUTED * separate parts as size of each block has changed. */ memcpy( object_blocks, information->object_blocks, block_count * sizeof(void*) ); ffc08f4c: 57 75 10 3a rlwinm r21,r27,2,0,29 /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, ffc08f50: 80 9f 00 34 lwz r4,52(r31) ffc08f54: 7e a5 ab 78 mr r5,r21 ffc08f58: 48 00 6f 19 bl ffc0fe70 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, ffc08f5c: 80 9f 00 30 lwz r4,48(r31) ffc08f60: 7e a5 ab 78 mr r5,r21 ffc08f64: 7f 03 c3 78 mr r3,r24 ffc08f68: 48 00 6f 09 bl ffc0fe70 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); ffc08f6c: a0 1f 00 10 lhz r0,16(r31) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc08f70: 80 9f 00 1c lwz r4,28(r31) ffc08f74: 7f 23 cb 78 mr r3,r25 information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); ffc08f78: 7f 9c 02 14 add r28,r28,r0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc08f7c: 57 85 10 3a rlwinm r5,r28,2,0,29 ffc08f80: 48 00 6e f1 bl ffc0fe70 ffc08f84: 48 00 00 10 b ffc08f94 <_Objects_Extend_information+0x17c> /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; ffc08f88: 95 69 00 04 stwu r11,4(r9) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc08f8c: 34 00 ff ff addic. r0,r0,-1 ffc08f90: 40 82 ff f8 bne+ ffc08f88 <_Objects_Extend_information+0x170> */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc08f94: a1 5f 00 14 lhz r10,20(r31) * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc08f98: 57 c9 10 3a rlwinm r9,r30,2,0,29 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc08f9c: 38 00 00 00 li r0,0 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc08fa0: 7d 7e 52 14 add r11,r30,r10 ffc08fa4: 7f 9e 58 40 cmplw cr7,r30,r11 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc08fa8: 57 7b 10 3a rlwinm r27,r27,2,0,29 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc08fac: 39 29 ff fc addi r9,r9,-4 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc08fb0: 7c 16 d9 2e stwx r0,r22,r27 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc08fb4: 7d 29 ca 14 add r9,r9,r25 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; ffc08fb8: 7c 18 d9 2e stwx r0,r24,r27 for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc08fbc: 39 00 00 00 li r8,0 ffc08fc0: 38 0a 00 01 addi r0,r10,1 ffc08fc4: 41 9d 00 0c bgt- cr7,ffc08fd0 <_Objects_Extend_information+0x1b8><== NEVER TAKEN ffc08fc8: 2f 8b 00 00 cmpwi cr7,r11,0 ffc08fcc: 40 be 00 10 bne+ cr7,ffc08fdc <_Objects_Extend_information+0x1c4><== ALWAYS TAKEN ffc08fd0: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc08fd4: 48 00 00 08 b ffc08fdc <_Objects_Extend_information+0x1c4><== NOT EXECUTED ffc08fd8: 95 09 00 04 stwu r8,4(r9) * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; ffc08fdc: 34 00 ff ff addic. r0,r0,-1 ffc08fe0: 40 82 ff f8 bne+ ffc08fd8 <_Objects_Extend_information+0x1c0> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc08fe4: 7c 00 00 a6 mfmsr r0 ffc08fe8: 7d 30 42 a6 mfsprg r9,0 ffc08fec: 7c 09 48 78 andc r9,r0,r9 ffc08ff0: 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) | ffc08ff4: 81 3f 00 00 lwz r9,0(r31) old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; ffc08ff8: 56 f7 04 3e clrlwi r23,r23,16 information->maximum_id = _Objects_Build_id( ffc08ffc: a1 7f 00 04 lhz r11,4(r31) ffc09000: 55 29 c0 0e rlwinm r9,r9,24,0,7 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; ffc09004: b2 ff 00 10 sth r23,16(r31) (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc09008: 55 6b d8 08 rlwinm r11,r11,27,0,4 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc0900c: 65 29 00 01 oris r9,r9,1 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; ffc09010: 80 7f 00 34 lwz r3,52(r31) (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc09014: 7d 29 5b 78 or r9,r9,r11 information->object_blocks = object_blocks; ffc09018: 92 df 00 34 stw r22,52(r31) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc0901c: 7d 37 bb 78 or r23,r9,r23 information->inactive_per_block = inactive_per_block; ffc09020: 93 1f 00 30 stw r24,48(r31) information->local_table = local_table; ffc09024: 93 3f 00 1c stw r25,28(r31) information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( ffc09028: 92 ff 00 0c stw r23,12(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0902c: 7c 00 01 24 mtmsr r0 information->maximum ); _ISR_Enable( level ); if ( old_tables ) ffc09030: 2f 83 00 00 cmpwi cr7,r3,0 ffc09034: 41 9e 00 08 beq- cr7,ffc0903c <_Objects_Extend_information+0x224> _Workspace_Free( old_tables ); ffc09038: 48 00 22 e5 bl ffc0b31c <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc0903c: 81 3f 00 34 lwz r9,52(r31) ffc09040: 57 bd 10 3a rlwinm r29,r29,2,0,29 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc09044: 3b 81 00 08 addi r28,r1,8 ffc09048: a0 bf 00 14 lhz r5,20(r31) } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc0904c: 7f 49 e9 2e stwx r26,r9,r29 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc09050: 7f 83 e3 78 mr r3,r28 ffc09054: 7f 44 d3 78 mr r4,r26 ffc09058: 80 df 00 18 lwz r6,24(r31) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0905c: 3b 7f 00 20 addi r27,r31,32 information->object_blocks[ block ] = new_object_block; /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc09060: 48 00 3f 75 bl ffc0cfd4 <_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 ) { ffc09064: 48 00 00 30 b ffc09094 <_Objects_Extend_information+0x27c> ffc09068: 81 3f 00 00 lwz r9,0(r31) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0906c: 7f 63 db 78 mr r3,r27 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( ffc09070: a0 1f 00 04 lhz r0,4(r31) ffc09074: 55 29 c0 0e rlwinm r9,r9,24,0,7 ffc09078: 65 29 00 01 oris r9,r9,1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc0907c: 54 00 d8 08 rlwinm r0,r0,27,0,4 ffc09080: 7d 20 03 78 or r0,r9,r0 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc09084: 7c 00 f3 78 or r0,r0,r30 ffc09088: 90 04 00 08 stw r0,8(r4) index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; ffc0908c: 3b de 00 01 addi r30,r30,1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc09090: 4b ff f2 79 bl ffc08308 <_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 ) { ffc09094: 7f 83 e3 78 mr r3,r28 ffc09098: 4b ff f2 c9 bl ffc08360 <_Chain_Get> ffc0909c: 7c 64 1b 79 mr. r4,r3 ffc090a0: 40 82 ff c8 bne+ ffc09068 <_Objects_Extend_information+0x250> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc090a4: a0 1f 00 14 lhz r0,20(r31) ffc090a8: 81 3f 00 30 lwz r9,48(r31) ffc090ac: 7c 09 e9 2e stwx r0,r9,r29 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); ffc090b0: a1 3f 00 2c lhz r9,44(r31) ffc090b4: 7c 00 4a 14 add r0,r0,r9 index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = ffc090b8: b0 1f 00 2c sth r0,44(r31) (Objects_Maximum)(information->inactive + information->allocation_size); } ffc090bc: 39 61 00 48 addi r11,r1,72 ffc090c0: 48 00 b1 08 b ffc141c8 <_restgpr_21_x> =============================================================================== ffc09178 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc09178: 94 21 ff e8 stwu r1,-24(r1) ffc0917c: 7c 08 02 a6 mflr r0 ffc09180: bf a1 00 0c stmw r29,12(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc09184: 7c 9d 23 79 mr. r29,r4 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc09188: 7c 7e 1b 78 mr r30,r3 ffc0918c: 90 01 00 1c stw r0,28(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) return NULL; ffc09190: 3b e0 00 00 li r31,0 ) { Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc09194: 41 a2 00 50 beq+ ffc091e4 <_Objects_Get_information+0x6c> /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); ffc09198: 48 00 43 bd bl ffc0d554 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) ffc0919c: 2c 03 00 00 cmpwi r3,0 ffc091a0: 41 a2 00 44 beq+ ffc091e4 <_Objects_Get_information+0x6c> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) ffc091a4: 7f 9d 18 40 cmplw cr7,r29,r3 ffc091a8: 41 bd 00 3c bgt+ cr7,ffc091e4 <_Objects_Get_information+0x6c> return NULL; if ( !_Objects_Information_table[ the_api ] ) ffc091ac: 3d 20 00 00 lis r9,0 ffc091b0: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc091b4: 39 29 2b 80 addi r9,r9,11136 ffc091b8: 7d 29 f0 2e lwzx r9,r9,r30 ffc091bc: 2f 89 00 00 cmpwi cr7,r9,0 ffc091c0: 41 be 00 24 beq+ cr7,ffc091e4 <_Objects_Get_information+0x6c><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; ffc091c4: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc091c8: 7f e9 e8 2e lwzx r31,r9,r29 if ( !info ) ffc091cc: 2f 9f 00 00 cmpwi cr7,r31,0 ffc091d0: 41 be 00 14 beq+ cr7,ffc091e4 <_Objects_Get_information+0x6c><== NEVER TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) ffc091d4: a0 1f 00 10 lhz r0,16(r31) ffc091d8: 2f 80 00 00 cmpwi cr7,r0,0 ffc091dc: 40 be 00 08 bne+ cr7,ffc091e4 <_Objects_Get_information+0x6c> return NULL; ffc091e0: 3b e0 00 00 li r31,0 #endif return info; } ffc091e4: 39 61 00 18 addi r11,r1,24 ffc091e8: 7f e3 fb 78 mr r3,r31 ffc091ec: 48 00 af fc b ffc141e8 <_restgpr_29_x> =============================================================================== ffc1b808 <_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; ffc1b808: 80 03 00 08 lwz r0,8(r3) if ( information->maximum >= index ) { ffc1b80c: a1 23 00 10 lhz r9,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; ffc1b810: 20 00 00 01 subfic r0,r0,1 ffc1b814: 7c 00 22 14 add r0,r0,r4 if ( information->maximum >= index ) { ffc1b818: 7f 89 00 40 cmplw cr7,r9,r0 ffc1b81c: 41 9c 00 24 blt- cr7,ffc1b840 <_Objects_Get_no_protection+0x38> if ( (the_object = information->local_table[ index ]) != NULL ) { ffc1b820: 81 23 00 1c lwz r9,28(r3) ffc1b824: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc1b828: 7c 69 00 2e lwzx r3,r9,r0 ffc1b82c: 2f 83 00 00 cmpwi cr7,r3,0 ffc1b830: 41 9e 00 10 beq- cr7,ffc1b840 <_Objects_Get_no_protection+0x38><== NEVER TAKEN *location = OBJECTS_LOCAL; ffc1b834: 38 00 00 00 li r0,0 ffc1b838: 90 05 00 00 stw r0,0(r5) return the_object; ffc1b83c: 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; ffc1b840: 38 00 00 01 li r0,1 ffc1b844: 90 05 00 00 stw r0,0(r5) return NULL; ffc1b848: 38 60 00 00 li r3,0 } ffc1b84c: 4e 80 00 20 blr =============================================================================== ffc0abf8 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc0abf8: 94 21 ff e0 stwu r1,-32(r1) ffc0abfc: 7c 08 02 a6 mflr r0 ffc0ac00: bf c1 00 18 stmw r30,24(r1) ffc0ac04: 7c 9e 23 78 mr r30,r4 /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0ac08: 7c 64 1b 79 mr. r4,r3 */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc0ac0c: 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; ffc0ac10: 40 82 00 10 bne- ffc0ac20 <_Objects_Id_to_name+0x28> ffc0ac14: 3d 20 00 00 lis r9,0 ffc0ac18: 81 29 2d c4 lwz r9,11716(r9) ffc0ac1c: 80 89 00 08 lwz r4,8(r9) */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); ffc0ac20: 54 89 47 7e rlwinm r9,r4,8,29,31 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) ffc0ac24: 38 09 ff ff addi r0,r9,-1 ffc0ac28: 2b 80 00 02 cmplwi cr7,r0,2 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; ffc0ac2c: 3b e0 00 03 li r31,3 ffc0ac30: 41 9d 00 38 bgt- cr7,ffc0ac68 <_Objects_Id_to_name+0x70> ffc0ac34: 48 00 00 40 b ffc0ac74 <_Objects_Id_to_name+0x7c> if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; ffc0ac38: 54 80 3e 7a rlwinm r0,r4,7,25,29 ffc0ac3c: 7c 69 00 2e lwzx r3,r9,r0 if ( !information ) ffc0ac40: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ac44: 41 9e 00 24 beq- cr7,ffc0ac68 <_Objects_Id_to_name+0x70><== NEVER TAKEN #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); ffc0ac48: 38 a1 00 08 addi r5,r1,8 ffc0ac4c: 4b ff ff 31 bl ffc0ab7c <_Objects_Get> if ( !the_object ) ffc0ac50: 2c 03 00 00 cmpwi r3,0 ffc0ac54: 41 82 00 14 beq- ffc0ac68 <_Objects_Id_to_name+0x70> return OBJECTS_INVALID_ID; *name = the_object->name; ffc0ac58: 80 03 00 0c lwz r0,12(r3) _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; ffc0ac5c: 3b e0 00 00 li r31,0 the_object = _Objects_Get( information, tmpId, &ignored_location ); if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; ffc0ac60: 90 1e 00 00 stw r0,0(r30) _Thread_Enable_dispatch(); ffc0ac64: 48 00 0c 6d bl ffc0b8d0 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } ffc0ac68: 39 61 00 20 addi r11,r1,32 ffc0ac6c: 7f e3 fb 78 mr r3,r31 ffc0ac70: 4b ff 6a 28 b ffc01698 <_restgpr_30_x> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) ffc0ac74: 3d 60 00 00 lis r11,0 ffc0ac78: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0ac7c: 39 6b 2b c0 addi r11,r11,11200 ffc0ac80: 7d 2b 48 2e lwzx r9,r11,r9 ffc0ac84: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ac88: 40 9e ff b0 bne+ cr7,ffc0ac38 <_Objects_Id_to_name+0x40> ffc0ac8c: 4b ff ff dc b ffc0ac68 <_Objects_Id_to_name+0x70> =============================================================================== ffc092dc <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { ffc092dc: 94 21 ff f8 stwu r1,-8(r1) ffc092e0: 7c 08 02 a6 mflr r0 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; ffc092e4: 3d 60 00 00 lis r11,0 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { ffc092e8: 90 01 00 0c stw r0,12(r1) #endif information->the_api = the_api; information->the_class = the_class; information->size = size; information->local_table = 0; ffc092ec: 38 00 00 00 li r0,0 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; ffc092f0: 39 6b 2b 80 addi r11,r11,11136 #endif information->the_api = the_api; information->the_class = the_class; information->size = size; information->local_table = 0; ffc092f4: 90 03 00 1c stw r0,28(r3) information->inactive_per_block = 0; ffc092f8: 90 03 00 30 stw r0,48(r3) information->object_blocks = 0; ffc092fc: 90 03 00 34 stw r0,52(r3) information->inactive = 0; ffc09300: b0 03 00 2c sth r0,44(r3) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; ffc09304: b0 03 00 10 sth r0,16(r3) /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; ffc09308: 54 80 10 3a rlwinm r0,r4,2,0,29 ffc0930c: 7d 6b 00 2e lwzx r11,r11,r0 ffc09310: 54 a0 10 3a rlwinm r0,r5,2,0,29 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; ffc09314: 90 83 00 00 stw r4,0(r3) information->the_class = the_class; ffc09318: b0 a3 00 04 sth r5,4(r3) information->size = size; ffc0931c: 90 e3 00 18 stw r7,24(r3) information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; ffc09320: 7c 6b 01 2e stwx r3,r11,r0 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; ffc09324: 54 c0 0f fe rlwinm r0,r6,1,31,31 maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { ffc09328: 2f 80 00 00 cmpwi cr7,r0,0 _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = ffc0932c: 98 03 00 12 stb r0,18(r3) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; ffc09330: 54 c6 00 7e clrlwi r6,r6,1 /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { ffc09334: 41 9e 00 1c beq- cr7,ffc09350 <_Objects_Initialize_information+0x74> ffc09338: 2f 86 00 00 cmpwi cr7,r6,0 ffc0933c: 40 be 00 14 bne+ cr7,ffc09350 <_Objects_Initialize_information+0x74> _Internal_error_Occurred( ffc09340: 38 60 00 00 li r3,0 ffc09344: 38 80 00 01 li r4,1 ffc09348: 38 a0 00 13 li r5,19 ffc0934c: 4b ff f9 a5 bl ffc08cf0 <_Internal_error_Occurred> information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; ffc09350: 3d 60 00 00 lis r11,0 } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; ffc09354: b0 c3 00 14 sth r6,20(r3) /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; ffc09358: 38 0b 29 1c addi r0,r11,10524 ffc0935c: 90 03 00 1c stw r0,28(r3) ffc09360: 54 84 c0 0e rlwinm r4,r4,24,0,7 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; ffc09364: 7c c0 00 34 cntlzw r0,r6 ffc09368: 64 84 00 01 oris r4,r4,1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc0936c: 54 a5 d8 08 rlwinm r5,r5,27,0,4 ffc09370: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc09374: 7c 85 2b 78 or r5,r4,r5 ffc09378: 68 00 00 01 xori r0,r0,1 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc0937c: 7c a0 03 78 or r0,r5,r0 information->minimum_id = ffc09380: 90 03 00 08 stw r0,8(r3) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) ffc09384: 71 20 00 03 andi. r0,r9,3 ffc09388: 41 82 00 0c beq- ffc09394 <_Objects_Initialize_information+0xb8><== ALWAYS TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ffc0938c: 39 29 00 04 addi r9,r9,4 <== NOT EXECUTED ffc09390: 55 29 00 3a rlwinm r9,r9,0,0,29 <== NOT EXECUTED _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { ffc09394: 2f 86 00 00 cmpwi cr7,r6,0 if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; ffc09398: b1 23 00 38 sth r9,56(r3) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); ffc0939c: 38 03 00 24 addi r0,r3,36 head->next = tail; ffc093a0: 90 03 00 20 stw r0,32(r3) head->previous = NULL; ffc093a4: 38 00 00 00 li r0,0 ffc093a8: 90 03 00 24 stw r0,36(r3) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); ffc093ac: 38 03 00 20 addi r0,r3,32 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; tail->previous = head; ffc093b0: 90 03 00 28 stw r0,40(r3) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { ffc093b4: 41 be 00 08 beq+ cr7,ffc093bc <_Objects_Initialize_information+0xe0> /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); ffc093b8: 4b ff fa 61 bl ffc08e18 <_Objects_Extend_information> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } ffc093bc: 80 01 00 0c lwz r0,12(r1) ffc093c0: 38 21 00 08 addi r1,r1,8 ffc093c4: 7c 08 03 a6 mtlr r0 ffc093c8: 4e 80 00 20 blr =============================================================================== ffc09468 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { ffc09468: 94 21 ff e8 stwu r1,-24(r1) ffc0946c: 7c 08 02 a6 mflr r0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc09470: 39 20 00 00 li r9,0 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc09474: 90 01 00 1c stw r0,28(r1) ffc09478: bf 81 00 08 stmw r28,8(r1) ffc0947c: 7c 7f 1b 78 mr r31,r3 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); ffc09480: a3 c3 00 0a lhz r30,10(r3) block_count = (information->maximum - index_base) / ffc09484: a1 43 00 10 lhz r10,16(r3) ffc09488: a1 63 00 14 lhz r11,20(r3) ffc0948c: 7d 5e 50 50 subf r10,r30,r10 ffc09490: 7d 4a 5b 96 divwu r10,r10,r11 ffc09494: 2f 8a 00 00 cmpwi cr7,r10,0 information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc09498: 38 0a 00 01 addi r0,r10,1 ffc0949c: 40 be 00 90 bne+ cr7,ffc0952c <_Objects_Shrink_information+0xc4><== ALWAYS TAKEN ffc094a0: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc094a4: 48 00 00 88 b ffc0952c <_Objects_Shrink_information+0xc4><== NOT EXECUTED if ( information->inactive_per_block[ block ] == ffc094a8: 81 5f 00 30 lwz r10,48(r31) index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc094ac: 55 3d 10 3a rlwinm r29,r9,2,0,29 if ( information->inactive_per_block[ block ] == ffc094b0: 7d 4a e8 2e lwzx r10,r10,r29 ffc094b4: 7f 8a 58 00 cmpw cr7,r10,r11 ffc094b8: 40 be 00 6c bne+ cr7,ffc09524 <_Objects_Shrink_information+0xbc> information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); ffc094bc: 80 7f 00 20 lwz r3,32(r31) ffc094c0: 48 00 00 08 b ffc094c8 <_Objects_Shrink_information+0x60> 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; ffc094c4: 7f 83 e3 78 mr r3,r28 * 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 ); ffc094c8: a0 03 00 0a lhz r0,10(r3) /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; ffc094cc: 83 83 00 00 lwz r28,0(r3) if ((index >= index_base) && ffc094d0: 7f 80 f0 40 cmplw cr7,r0,r30 ffc094d4: 41 9c 00 18 blt- cr7,ffc094ec <_Objects_Shrink_information+0x84> (index < (index_base + information->allocation_size))) { ffc094d8: a1 3f 00 14 lhz r9,20(r31) ffc094dc: 7d 3e 4a 14 add r9,r30,r9 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && ffc094e0: 7f 80 48 40 cmplw cr7,r0,r9 ffc094e4: 40 bc 00 08 bge+ cr7,ffc094ec <_Objects_Shrink_information+0x84> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); ffc094e8: 4b ff ee 51 bl ffc08338 <_Chain_Extract> } } while ( the_object ); ffc094ec: 2f 9c 00 00 cmpwi cr7,r28,0 ffc094f0: 40 9e ff d4 bne+ cr7,ffc094c4 <_Objects_Shrink_information+0x5c> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); ffc094f4: 81 3f 00 34 lwz r9,52(r31) ffc094f8: 7c 69 e8 2e lwzx r3,r9,r29 ffc094fc: 48 00 1e 21 bl ffc0b31c <_Workspace_Free> information->object_blocks[ block ] = NULL; ffc09500: 81 3f 00 34 lwz r9,52(r31) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc09504: a0 1f 00 14 lhz r0,20(r31) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; ffc09508: 7f 89 e9 2e stwx r28,r9,r29 information->inactive_per_block[ block ] = 0; ffc0950c: 81 3f 00 30 lwz r9,48(r31) ffc09510: 7f 89 e9 2e stwx r28,r9,r29 information->inactive -= information->allocation_size; ffc09514: a1 3f 00 2c lhz r9,44(r31) ffc09518: 7c 00 48 50 subf r0,r0,r9 ffc0951c: b0 1f 00 2c sth r0,44(r31) return; ffc09520: 48 00 00 14 b ffc09534 <_Objects_Shrink_information+0xcc> } index_base += information->allocation_size; ffc09524: 7f de 5a 14 add r30,r30,r11 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc09528: 39 29 00 01 addi r9,r9,1 ffc0952c: 34 00 ff ff addic. r0,r0,-1 ffc09530: 40 82 ff 78 bne+ ffc094a8 <_Objects_Shrink_information+0x40> return; } index_base += information->allocation_size; } } ffc09534: 39 61 00 18 addi r11,r1,24 ffc09538: 48 00 ac ac b ffc141e4 <_restgpr_28_x> =============================================================================== ffc0ccd8 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc0ccd8: 94 21 ff d8 stwu r1,-40(r1) ffc0ccdc: 7c 08 02 a6 mflr r0 ffc0cce0: 90 01 00 2c stw r0,44(r1) ffc0cce4: bf a1 00 1c stmw r29,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 ]; ffc0cce8: 83 e3 01 2c lwz r31,300(r3) if ( !api ) ffc0ccec: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0ccf0: 41 9e 00 80 beq- cr7,ffc0cd70 <_RTEMS_tasks_Post_switch_extension+0x98><== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0ccf4: 7c 00 00 a6 mfmsr r0 ffc0ccf8: 7d 30 42 a6 mfsprg r9,0 ffc0ccfc: 7c 09 48 78 andc r9,r0,r9 ffc0cd00: 7d 20 01 24 mtmsr r9 asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; asr->signals_posted = 0; ffc0cd04: 39 20 00 00 li r9,0 */ asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; ffc0cd08: 83 bf 00 14 lwz r29,20(r31) asr->signals_posted = 0; ffc0cd0c: 91 3f 00 14 stw r9,20(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0cd10: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ ffc0cd14: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0cd18: 41 be 00 58 beq+ cr7,ffc0cd70 <_RTEMS_tasks_Post_switch_extension+0x98> return; asr->nest_level += 1; ffc0cd1c: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0cd20: 3b c1 00 08 addi r30,r1,8 ffc0cd24: 80 7f 00 10 lwz r3,16(r31) ffc0cd28: 38 80 00 00 li r4,0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; ffc0cd2c: 38 09 00 01 addi r0,r9,1 ffc0cd30: 90 1f 00 1c stw r0,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0cd34: 60 84 ff ff ori r4,r4,65535 ffc0cd38: 7f c5 f3 78 mr r5,r30 ffc0cd3c: 48 00 1f ad bl ffc0ece8 (*asr->handler)( signal_set ); ffc0cd40: 80 1f 00 0c lwz r0,12(r31) ffc0cd44: 7f a3 eb 78 mr r3,r29 ffc0cd48: 7c 09 03 a6 mtctr r0 ffc0cd4c: 4e 80 04 21 bctrl asr->nest_level -= 1; ffc0cd50: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0cd54: 38 80 00 00 li r4,0 ffc0cd58: 80 61 00 08 lwz r3,8(r1) asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; ffc0cd5c: 38 09 ff ff addi r0,r9,-1 ffc0cd60: 90 1f 00 1c stw r0,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0cd64: 60 84 ff ff ori r4,r4,65535 ffc0cd68: 7f c5 f3 78 mr r5,r30 ffc0cd6c: 48 00 1f 7d bl ffc0ece8 } ffc0cd70: 39 61 00 28 addi r11,r1,40 ffc0cd74: 48 00 74 74 b ffc141e8 <_restgpr_29_x> =============================================================================== ffc090d8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { ffc090d8: 7c 2b 0b 78 mr r11,r1 ffc090dc: 94 21 ff e0 stwu r1,-32(r1) ffc090e0: 7c 08 02 a6 mflr r0 ffc090e4: 7c 64 1b 78 mr r4,r3 ffc090e8: 3c 60 00 00 lis r3,0 ffc090ec: 48 01 2b c5 bl ffc1bcb0 <_savegpr_31> ffc090f0: 38 63 2b e0 addi r3,r3,11232 ffc090f4: 90 01 00 24 stw r0,36(r1) ffc090f8: 38 a1 00 08 addi r5,r1,8 ffc090fc: 48 00 20 ed bl ffc0b1e8 <_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 ) { ffc09100: 80 01 00 08 lwz r0,8(r1) ffc09104: 7c 7f 1b 78 mr r31,r3 ffc09108: 2f 80 00 00 cmpwi cr7,r0,0 ffc0910c: 40 9e 00 84 bne- cr7,ffc09190 <_Rate_monotonic_Timeout+0xb8><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; ffc09110: 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); ffc09114: 80 03 00 10 lwz r0,16(r3) if ( _States_Is_waiting_for_period( the_thread->current_state ) && ffc09118: 70 09 40 00 andi. r9,r0,16384 ffc0911c: 41 82 00 24 beq- ffc09140 <_Rate_monotonic_Timeout+0x68> ffc09120: 81 23 00 20 lwz r9,32(r3) ffc09124: 80 1f 00 08 lwz r0,8(r31) ffc09128: 7f 89 00 00 cmpw cr7,r9,r0 ffc0912c: 40 be 00 14 bne+ cr7,ffc09140 <_Rate_monotonic_Timeout+0x68> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc09130: 3c 80 10 03 lis r4,4099 ffc09134: 60 84 ff f8 ori r4,r4,65528 ffc09138: 48 00 29 91 bl ffc0bac8 <_Thread_Clear_state> ffc0913c: 48 00 00 18 b ffc09154 <_Rate_monotonic_Timeout+0x7c> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { ffc09140: 80 1f 00 38 lwz r0,56(r31) ffc09144: 2f 80 00 01 cmpwi cr7,r0,1 ffc09148: 40 be 00 30 bne+ cr7,ffc09178 <_Rate_monotonic_Timeout+0xa0> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; ffc0914c: 38 00 00 03 li r0,3 ffc09150: 90 1f 00 38 stw r0,56(r31) _Rate_monotonic_Initiate_statistics( the_period ); ffc09154: 7f e3 fb 78 mr r3,r31 ffc09158: 4b ff f9 45 bl ffc08a9c <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0915c: 80 1f 00 3c lwz r0,60(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc09160: 3c 60 00 00 lis r3,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc09164: 90 1f 00 1c stw r0,28(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc09168: 38 63 2d c8 addi r3,r3,11720 ffc0916c: 38 9f 00 10 addi r4,r31,16 ffc09170: 48 00 3e dd bl ffc0d04c <_Watchdog_Insert> ffc09174: 48 00 00 0c b ffc09180 <_Rate_monotonic_Timeout+0xa8> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; ffc09178: 38 00 00 04 li r0,4 ffc0917c: 90 1f 00 38 stw r0,56(r31) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc09180: 3d 20 00 00 lis r9,0 ffc09184: 81 69 27 e8 lwz r11,10216(r9) ffc09188: 38 0b ff ff addi r0,r11,-1 ffc0918c: 90 09 27 e8 stw r0,10216(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc09190: 39 61 00 20 addi r11,r1,32 ffc09194: 4b ff 80 38 b ffc011cc <_restgpr_31_x> =============================================================================== ffc0d578 <_Scheduler_priority_Block>: RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_extract( Thread_Control *the_thread ) { Chain_Control *ready = the_thread->scheduler.priority->ready_chain; ffc0d578: 81 24 00 8c lwz r9,140(r4) ffc0d57c: 81 29 00 00 lwz r9,0(r9) if ( _Chain_Has_only_one_node( ready ) ) { ffc0d580: 81 69 00 00 lwz r11,0(r9) ffc0d584: 80 09 00 08 lwz r0,8(r9) ffc0d588: 7f 8b 00 00 cmpw cr7,r11,r0 ffc0d58c: 40 be 00 50 bne+ cr7,ffc0d5dc <_Scheduler_priority_Block+0x64> 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 ); ffc0d590: 38 09 00 04 addi r0,r9,4 head->next = tail; head->previous = NULL; tail->previous = head; ffc0d594: 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; ffc0d598: 90 09 00 00 stw r0,0(r9) head->previous = NULL; ffc0d59c: 38 00 00 00 li r0,0 ffc0d5a0: 90 09 00 04 stw r0,4(r9) _Chain_Initialize_empty( ready ); _Priority_bit_map_Remove( &the_thread->scheduler.priority->Priority_map ); ffc0d5a4: 81 24 00 8c lwz r9,140(r4) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc0d5a8: 81 69 00 04 lwz r11,4(r9) ffc0d5ac: 80 09 00 14 lwz r0,20(r9) ffc0d5b0: 81 4b 00 00 lwz r10,0(r11) ffc0d5b4: 7d 40 00 38 and r0,r10,r0 if ( *the_priority_map->minor == 0 ) ffc0d5b8: 2f 80 00 00 cmpwi cr7,r0,0 RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc0d5bc: 90 0b 00 00 stw r0,0(r11) if ( *the_priority_map->minor == 0 ) ffc0d5c0: 40 9e 00 2c bne- cr7,ffc0d5ec <_Scheduler_priority_Block+0x74> _Priority_Major_bit_map &= the_priority_map->block_major; ffc0d5c4: 3d 60 00 00 lis r11,0 ffc0d5c8: 80 09 00 10 lwz r0,16(r9) ffc0d5cc: 81 4b 27 ac lwz r10,10156(r11) ffc0d5d0: 7d 40 00 38 and r0,r10,r0 ffc0d5d4: 90 0b 27 ac stw r0,10156(r11) ffc0d5d8: 48 00 00 14 b ffc0d5ec <_Scheduler_priority_Block+0x74> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0d5dc: 81 64 00 00 lwz r11,0(r4) previous = the_node->previous; ffc0d5e0: 81 24 00 04 lwz r9,4(r4) next->previous = previous; ffc0d5e4: 91 2b 00 04 stw r9,4(r11) previous->next = next; ffc0d5e8: 91 69 00 00 stw r11,0(r9) RTEMS_INLINE_ROUTINE bool _Thread_Is_heir ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Heir ); ffc0d5ec: 3d 20 00 00 lis r9,0 { _Scheduler_priority_Ready_queue_extract(the_thread); /* TODO: flash critical section */ if ( _Thread_Is_heir( the_thread ) ) ffc0d5f0: 80 09 2d 88 lwz r0,11656(r9) ffc0d5f4: 7f 84 00 00 cmpw cr7,r4,r0 ffc0d5f8: 40 be 00 60 bne+ cr7,ffc0d658 <_Scheduler_priority_Block+0xe0> 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 ); ffc0d5fc: 3d 40 00 00 lis r10,0 Scheduler_Control *the_scheduler, Thread_Control *the_thread ) { _Scheduler_priority_Block_body(the_scheduler, the_thread); } ffc0d600: 81 23 00 00 lwz r9,0(r3) ffc0d604: 80 0a 27 ac lwz r0,10156(r10) ffc0d608: 7c 0b 00 34 cntlzw r11,r0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0d60c: 3d 00 00 00 lis r8,0 RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0d610: 90 0a 27 ac stw r0,10156(r10) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0d614: 39 08 2d a0 addi r8,r8,11680 ffc0d618: 55 6a 10 3a rlwinm r10,r11,2,0,29 ffc0d61c: 7c 08 50 2e lwzx r0,r8,r10 ffc0d620: 7c 07 00 34 cntlzw r7,r0 ffc0d624: 7c 08 51 2e stwx r0,r8,r10 return (_Priority_Bits_index( major ) << 4) + ffc0d628: 55 60 20 36 rlwinm r0,r11,4,0,27 ffc0d62c: 7c 00 3a 14 add r0,r0,r7 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc0d630: 1c 00 00 0c mulli r0,r0,12 ffc0d634: 7d 69 02 14 add r11,r9,r0 ffc0d638: 7d 29 00 2e lwzx r9,r9,r0 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0d63c: 39 6b 00 04 addi r11,r11,4 ffc0d640: 7f 89 58 00 cmpw cr7,r9,r11 return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; ffc0d644: 38 00 00 00 li r0,0 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc0d648: 41 9e 00 08 beq- cr7,ffc0d650 <_Scheduler_priority_Block+0xd8><== NEVER TAKEN return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); ffc0d64c: 7d 20 4b 78 mr r0,r9 RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body( Scheduler_Control *the_scheduler ) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( ffc0d650: 3d 20 00 00 lis r9,0 ffc0d654: 90 09 2d 88 stw r0,11656(r9) RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc0d658: 3d 20 00 00 lis r9,0 ffc0d65c: 39 29 2d 78 addi r9,r9,11640 /* TODO: flash critical section */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(the_scheduler); if ( _Thread_Is_executing( the_thread ) ) ffc0d660: 80 09 00 0c lwz r0,12(r9) ffc0d664: 7f 84 00 00 cmpw cr7,r4,r0 ffc0d668: 4c be 00 20 bnelr+ cr7 _Thread_Dispatch_necessary = true; ffc0d66c: 38 00 00 01 li r0,1 ffc0d670: 98 09 00 18 stb r0,24(r9) ffc0d674: 4e 80 00 20 blr =============================================================================== ffc09704 <_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 ); ffc09704: 3d 40 00 00 lis r10,0 void _Scheduler_priority_Schedule( Scheduler_Control *the_scheduler ) { _Scheduler_priority_Schedule_body( the_scheduler ); } ffc09708: 81 23 00 00 lwz r9,0(r3) ffc0970c: 80 0a 27 ac lwz r0,10156(r10) ffc09710: 7c 0b 00 34 cntlzw r11,r0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc09714: 3d 00 00 00 lis r8,0 RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc09718: 90 0a 27 ac stw r0,10156(r10) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0971c: 39 08 2d a0 addi r8,r8,11680 ffc09720: 55 6a 10 3a rlwinm r10,r11,2,0,29 ffc09724: 7c 08 50 2e lwzx r0,r8,r10 ffc09728: 7c 07 00 34 cntlzw r7,r0 ffc0972c: 7c 08 51 2e stwx r0,r8,r10 return (_Priority_Bits_index( major ) << 4) + ffc09730: 55 60 20 36 rlwinm r0,r11,4,0,27 ffc09734: 7c 00 3a 14 add r0,r0,r7 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc09738: 1c 00 00 0c mulli r0,r0,12 ffc0973c: 7d 69 02 14 add r11,r9,r0 ffc09740: 7d 29 00 2e lwzx r9,r9,r0 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc09744: 39 6b 00 04 addi r11,r11,4 ffc09748: 7f 89 58 00 cmpw cr7,r9,r11 return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; ffc0974c: 38 00 00 00 li r0,0 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc09750: 41 9e 00 08 beq- cr7,ffc09758 <_Scheduler_priority_Schedule+0x54><== NEVER TAKEN return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); ffc09754: 7d 20 4b 78 mr r0,r9 RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body( Scheduler_Control *the_scheduler ) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( ffc09758: 3d 20 00 00 lis r9,0 ffc0975c: 90 09 2d 88 stw r0,11656(r9) ffc09760: 4e 80 00 20 blr =============================================================================== ffc098a8 <_Scheduler_priority_Yield>: { ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ffc098a8: 3d 40 00 00 lis r10,0 ffc098ac: 39 4a 2d 78 addi r10,r10,11640 ffc098b0: 81 2a 00 0c lwz r9,12(r10) ready = executing->scheduler.priority->ready_chain; ffc098b4: 81 69 00 8c lwz r11,140(r9) ffc098b8: 81 6b 00 00 lwz r11,0(r11) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc098bc: 7c 00 00 a6 mfmsr r0 ffc098c0: 7d 10 42 a6 mfsprg r8,0 ffc098c4: 7c 08 40 78 andc r8,r0,r8 ffc098c8: 7d 00 01 24 mtmsr r8 _ISR_Disable( level ); if ( !_Chain_Has_only_one_node( ready ) ) { ffc098cc: 80 eb 00 00 lwz r7,0(r11) ffc098d0: 81 0b 00 08 lwz r8,8(r11) ffc098d4: 7f 87 40 00 cmpw cr7,r7,r8 ffc098d8: 41 9e 00 60 beq- cr7,ffc09938 <_Scheduler_priority_Yield+0x90> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc098dc: 80 e9 00 00 lwz r7,0(r9) previous = the_node->previous; ffc098e0: 81 09 00 04 lwz r8,4(r9) next->previous = previous; ffc098e4: 91 07 00 04 stw r8,4(r7) previous->next = next; ffc098e8: 90 e8 00 00 stw r7,0(r8) RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); ffc098ec: 38 eb 00 04 addi r7,r11,4 Chain_Node *old_last = tail->previous; ffc098f0: 81 0b 00 08 lwz r8,8(r11) the_node->next = tail; ffc098f4: 90 e9 00 00 stw r7,0(r9) tail->previous = the_node; ffc098f8: 91 2b 00 08 stw r9,8(r11) old_last->next = the_node; ffc098fc: 91 28 00 00 stw r9,0(r8) the_node->previous = old_last; ffc09900: 91 09 00 04 stw r8,4(r9) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc09904: 7d 00 00 a6 mfmsr r8 ffc09908: 7c 00 01 24 mtmsr r0 ffc0990c: 7d 00 01 24 mtmsr r8 _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) ffc09910: 81 0a 00 10 lwz r8,16(r10) ffc09914: 7f 89 40 00 cmpw cr7,r9,r8 ffc09918: 40 be 00 0c bne+ cr7,ffc09924 <_Scheduler_priority_Yield+0x7c><== NEVER TAKEN _Thread_Heir = (Thread_Control *) _Chain_First( ready ); ffc0991c: 81 2b 00 00 lwz r9,0(r11) ffc09920: 91 2a 00 10 stw r9,16(r10) _Thread_Dispatch_necessary = true; ffc09924: 3d 20 00 00 lis r9,0 ffc09928: 39 60 00 01 li r11,1 ffc0992c: 39 29 2d 78 addi r9,r9,11640 ffc09930: 99 69 00 18 stb r11,24(r9) ffc09934: 48 00 00 18 b ffc0994c <_Scheduler_priority_Yield+0xa4> } else if ( !_Thread_Is_heir( executing ) ) ffc09938: 81 6a 00 10 lwz r11,16(r10) ffc0993c: 7f 89 58 00 cmpw cr7,r9,r11 ffc09940: 41 9e 00 0c beq- cr7,ffc0994c <_Scheduler_priority_Yield+0xa4><== ALWAYS TAKEN _Thread_Dispatch_necessary = true; ffc09944: 39 20 00 01 li r9,1 <== NOT EXECUTED ffc09948: 99 2a 00 18 stb r9,24(r10) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0994c: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); } ffc09950: 4e 80 00 20 blr =============================================================================== ffc08b50 <_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) || ffc08b50: 2c 03 00 00 cmpwi r3,0 { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); ffc08b54: 3d 20 00 00 lis r9,0 ffc08b58: 81 29 20 cc lwz r9,8396(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; ffc08b5c: 38 00 00 00 li r0,0 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || ffc08b60: 41 82 00 94 beq- ffc08bf4 <_TOD_Validate+0xa4> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / ffc08b64: 3d 60 00 0f lis r11,15 ffc08b68: 61 6b 42 40 ori r11,r11,16960 ffc08b6c: 7d 2b 4b 96 divwu r9,r11,r9 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || ffc08b70: 81 63 00 18 lwz r11,24(r3) ffc08b74: 7f 8b 48 40 cmplw cr7,r11,r9 ffc08b78: 40 9c 00 7c bge- cr7,ffc08bf4 <_TOD_Validate+0xa4> (the_tod->ticks >= ticks_per_second) || ffc08b7c: 81 23 00 14 lwz r9,20(r3) ffc08b80: 2b 89 00 3b cmplwi cr7,r9,59 ffc08b84: 41 9d 00 70 bgt- cr7,ffc08bf4 <_TOD_Validate+0xa4> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || ffc08b88: 81 23 00 10 lwz r9,16(r3) ffc08b8c: 2b 89 00 3b cmplwi cr7,r9,59 ffc08b90: 41 9d 00 64 bgt- cr7,ffc08bf4 <_TOD_Validate+0xa4> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || ffc08b94: 81 23 00 0c lwz r9,12(r3) ffc08b98: 2b 89 00 17 cmplwi cr7,r9,23 ffc08b9c: 41 9d 00 58 bgt- cr7,ffc08bf4 <_TOD_Validate+0xa4> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || ffc08ba0: 81 23 00 04 lwz r9,4(r3) rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || ffc08ba4: 2f 89 00 00 cmpwi cr7,r9,0 ffc08ba8: 41 9e 00 4c beq- cr7,ffc08bf4 <_TOD_Validate+0xa4> <== NEVER TAKEN (the_tod->month == 0) || ffc08bac: 2b 89 00 0c cmplwi cr7,r9,12 ffc08bb0: 41 9d 00 44 bgt- cr7,ffc08bf4 <_TOD_Validate+0xa4> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || ffc08bb4: 81 43 00 00 lwz r10,0(r3) (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || ffc08bb8: 2b 8a 07 c3 cmplwi cr7,r10,1987 ffc08bbc: 40 9d 00 38 ble- cr7,ffc08bf4 <_TOD_Validate+0xa4> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) ffc08bc0: 81 63 00 08 lwz r11,8(r3) (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || ffc08bc4: 2f 8b 00 00 cmpwi cr7,r11,0 ffc08bc8: 41 9e 00 2c beq- cr7,ffc08bf4 <_TOD_Validate+0xa4> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) ffc08bcc: 71 40 00 03 andi. r0,r10,3 ffc08bd0: 3d 40 ff c2 lis r10,-62 ffc08bd4: 39 4a e8 cc addi r10,r10,-5940 ffc08bd8: 40 82 00 08 bne- ffc08be0 <_TOD_Validate+0x90> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; ffc08bdc: 39 29 00 0d addi r9,r9,13 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; ffc08be0: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc08be4: 7c 0a 48 2e lwzx r0,r10,r9 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( ffc08be8: 7c 0b 00 10 subfc r0,r11,r0 ffc08bec: 38 00 00 00 li r0,0 ffc08bf0: 7c 00 01 14 adde r0,r0,r0 if ( the_tod->day > days_in_month ) return false; return true; } ffc08bf4: 7c 03 03 78 mr r3,r0 ffc08bf8: 4e 80 00 20 blr =============================================================================== ffc099b4 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { ffc099b4: 94 21 ff e0 stwu r1,-32(r1) ffc099b8: 7c 08 02 a6 mflr r0 ffc099bc: 90 01 00 24 stw r0,36(r1) ffc099c0: bf 81 00 10 stmw r28,16(r1) ffc099c4: 7c 7f 1b 78 mr r31,r3 ffc099c8: 7c be 2b 78 mr r30,r5 */ /* * Save original state */ original_state = the_thread->current_state; ffc099cc: 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 ); ffc099d0: 90 81 00 08 stw r4,8(r1) ffc099d4: 48 00 0f 11 bl ffc0a8e4 <_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 ) ffc099d8: 80 1f 00 14 lwz r0,20(r31) ffc099dc: 80 81 00 08 lwz r4,8(r1) ffc099e0: 7f 80 20 00 cmpw cr7,r0,r4 ffc099e4: 41 9e 00 0c beq- cr7,ffc099f0 <_Thread_Change_priority+0x3c> _Thread_Set_priority( the_thread, new_priority ); ffc099e8: 7f e3 fb 78 mr r3,r31 ffc099ec: 48 00 0e 55 bl ffc0a840 <_Thread_Set_priority> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc099f0: 7f 80 00 a6 mfmsr r28 ffc099f4: 7c 10 42 a6 mfsprg r0,0 ffc099f8: 7f 80 00 78 andc r0,r28,r0 ffc099fc: 7c 00 01 24 mtmsr r0 /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; ffc09a00: 80 1f 00 10 lwz r0,16(r31) ffc09a04: 57 bd 07 7a rlwinm r29,r29,0,29,29 if ( state != STATES_TRANSIENT ) { ffc09a08: 2f 80 00 04 cmpwi cr7,r0,4 ffc09a0c: 41 9e 00 38 beq- cr7,ffc09a44 <_Thread_Change_priority+0x90> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) ffc09a10: 2f 9d 00 00 cmpwi cr7,r29,0 ffc09a14: 40 9e 00 0c bne- cr7,ffc09a20 <_Thread_Change_priority+0x6c><== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); ffc09a18: 54 09 07 b8 rlwinm r9,r0,0,30,28 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); ffc09a1c: 91 3f 00 10 stw r9,16(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09a20: 7f 80 01 24 mtmsr r28 _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc09a24: 3d 20 00 03 lis r9,3 ffc09a28: 61 29 be e0 ori r9,r9,48864 ffc09a2c: 7c 0b 48 39 and. r11,r0,r9 ffc09a30: 41 a2 01 08 beq+ ffc09b38 <_Thread_Change_priority+0x184> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); ffc09a34: 80 7f 00 44 lwz r3,68(r31) ffc09a38: 7f e4 fb 78 mr r4,r31 ffc09a3c: 48 00 0d 4d bl ffc0a788 <_Thread_queue_Requeue> ffc09a40: 48 00 00 f8 b ffc09b38 <_Thread_Change_priority+0x184> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { ffc09a44: 2f 9d 00 00 cmpwi cr7,r29,0 ffc09a48: 40 9e 00 a0 bne- cr7,ffc09ae8 <_Thread_Change_priority+0x134><== NEVER TAKEN * FIXME: hard-coded for priority scheduling. Might be ok since this * function is specific to priority scheduling? */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); if ( prepend_it ) ffc09a4c: 2f 9e 00 00 cmpwi cr7,r30,0 * Ready Queue with interrupts off. * * FIXME: hard-coded for priority scheduling. Might be ok since this * function is specific to priority scheduling? */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); ffc09a50: 93 bf 00 10 stw r29,16(r31) ffc09a54: 3d 60 00 00 lis r11,0 ffc09a58: 81 3f 00 8c lwz r9,140(r31) if ( prepend_it ) ffc09a5c: 41 9e 00 48 beq- cr7,ffc09aa4 <_Thread_Change_priority+0xf0> RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc09a60: 81 49 00 04 lwz r10,4(r9) ffc09a64: 80 09 00 0c lwz r0,12(r9) ffc09a68: 81 0a 00 00 lwz r8,0(r10) ffc09a6c: 7d 00 03 78 or r0,r8,r0 ffc09a70: 90 0a 00 00 stw r0,0(r10) _Priority_Major_bit_map |= the_priority_map->ready_major; ffc09a74: 80 09 00 08 lwz r0,8(r9) Thread_Control *the_thread ) { _Priority_bit_map_Add( &the_thread->scheduler.priority->Priority_map ); _Chain_Prepend_unprotected( the_thread->scheduler.priority->ready_chain, ffc09a78: 81 3f 00 8c lwz r9,140(r31) ffc09a7c: 81 4b 27 ac lwz r10,10156(r11) ffc09a80: 81 29 00 00 lwz r9,0(r9) ffc09a84: 7d 40 03 78 or r0,r10,r0 ffc09a88: 90 0b 27 ac stw r0,10156(r11) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc09a8c: 81 69 00 00 lwz r11,0(r9) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc09a90: 91 3f 00 04 stw r9,4(r31) before_node = after_node->next; after_node->next = the_node; ffc09a94: 93 e9 00 00 stw r31,0(r9) the_node->next = before_node; before_node->previous = the_node; ffc09a98: 93 eb 00 04 stw r31,4(r11) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc09a9c: 91 7f 00 00 stw r11,0(r31) ffc09aa0: 48 00 00 48 b ffc09ae8 <_Thread_Change_priority+0x134> RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc09aa4: 81 49 00 04 lwz r10,4(r9) ffc09aa8: 80 09 00 0c lwz r0,12(r9) ffc09aac: 81 0a 00 00 lwz r8,0(r10) ffc09ab0: 7d 00 03 78 or r0,r8,r0 ffc09ab4: 90 0a 00 00 stw r0,0(r10) _Priority_Major_bit_map |= the_priority_map->ready_major; ffc09ab8: 80 09 00 08 lwz r0,8(r9) Thread_Control *the_thread ) { _Priority_bit_map_Add( &the_thread->scheduler.priority->Priority_map ); _Chain_Append_unprotected( the_thread->scheduler.priority->ready_chain, ffc09abc: 81 3f 00 8c lwz r9,140(r31) ffc09ac0: 81 4b 27 ac lwz r10,10156(r11) ffc09ac4: 81 29 00 00 lwz r9,0(r9) ffc09ac8: 7d 40 03 78 or r0,r10,r0 ffc09acc: 90 0b 27 ac stw r0,10156(r11) RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); ffc09ad0: 38 09 00 04 addi r0,r9,4 Chain_Node *old_last = tail->previous; ffc09ad4: 81 69 00 08 lwz r11,8(r9) the_node->next = tail; ffc09ad8: 90 1f 00 00 stw r0,0(r31) tail->previous = the_node; ffc09adc: 93 e9 00 08 stw r31,8(r9) old_last->next = the_node; ffc09ae0: 93 eb 00 00 stw r31,0(r11) the_node->previous = old_last; ffc09ae4: 91 7f 00 04 stw r11,4(r31) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc09ae8: 7c 00 00 a6 mfmsr r0 ffc09aec: 7f 80 01 24 mtmsr r28 ffc09af0: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( Scheduler_Control *the_scheduler ) { the_scheduler->Operations.schedule( the_scheduler ); ffc09af4: 3c 60 00 00 lis r3,0 ffc09af8: 38 63 2c 60 addi r3,r3,11360 ffc09afc: 80 03 00 04 lwz r0,4(r3) ffc09b00: 7c 09 03 a6 mtctr r0 ffc09b04: 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 ); ffc09b08: 3d 20 00 00 lis r9,0 ffc09b0c: 39 29 2d 78 addi r9,r9,11640 ffc09b10: 81 69 00 0c lwz r11,12(r9) * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Scheduler_Schedule(&_Scheduler); if ( !_Thread_Is_executing_also_the_heir() && ffc09b14: 80 09 00 10 lwz r0,16(r9) ffc09b18: 7f 8b 00 00 cmpw cr7,r11,r0 ffc09b1c: 41 9e 00 18 beq- cr7,ffc09b34 <_Thread_Change_priority+0x180> ffc09b20: 88 0b 00 74 lbz r0,116(r11) ffc09b24: 2f 80 00 00 cmpwi cr7,r0,0 ffc09b28: 41 9e 00 0c beq- cr7,ffc09b34 <_Thread_Change_priority+0x180> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; ffc09b2c: 38 00 00 01 li r0,1 ffc09b30: 98 09 00 18 stb r0,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09b34: 7f 80 01 24 mtmsr r28 _ISR_Enable( level ); } ffc09b38: 39 61 00 20 addi r11,r1,32 ffc09b3c: 48 00 a6 a8 b ffc141e4 <_restgpr_28_x> =============================================================================== ffc09ba8 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { ffc09ba8: 94 21 ff e8 stwu r1,-24(r1) ffc09bac: 7c 08 02 a6 mflr r0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc09bb0: 39 60 00 00 li r11,0 ffc09bb4: 90 01 00 1c stw r0,28(r1) RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( ffc09bb8: a0 04 00 0a lhz r0,10(r4) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc09bbc: 81 23 00 1c lwz r9,28(r3) ffc09bc0: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc09bc4: bf a1 00 0c stmw r29,12(r1) ffc09bc8: 7c 7e 1b 78 mr r30,r3 ffc09bcc: 7d 69 01 2e stwx r11,r9,r0 ffc09bd0: 7c 9f 23 78 mr r31,r4 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc09bd4: 3f a0 00 00 lis r29,0 ffc09bd8: 81 3d 27 64 lwz r9,10084(r29) * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); ffc09bdc: 7c 83 23 78 mr r3,r4 ffc09be0: 38 09 ff ff addi r0,r9,-1 ffc09be4: 90 1d 27 64 stw r0,10084(r29) ffc09be8: 48 00 12 c5 bl ffc0aeac <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc09bec: 81 3d 27 64 lwz r9,10084(r29) ffc09bf0: 38 09 00 01 addi r0,r9,1 ffc09bf4: 90 1d 27 64 stw r0,10084(r29) /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); ffc09bf8: 7f c3 f3 78 mr r3,r30 ffc09bfc: 7f e4 fb 78 mr r4,r31 ffc09c00: 4b ff f1 e5 bl ffc08de4 <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); ffc09c04: 7f e3 fb 78 mr r3,r31 ffc09c08: 38 80 00 01 li r4,1 ffc09c0c: 48 00 0c 71 bl ffc0a87c <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { ffc09c10: 7f e3 fb 78 mr r3,r31 ffc09c14: 48 00 0a 91 bl ffc0a6a4 <_Thread_queue_Extract_with_proxy> ffc09c18: 2f 83 00 00 cmpwi cr7,r3,0 ffc09c1c: 40 9e 00 18 bne- cr7,ffc09c34 <_Thread_Close+0x8c> if ( _Watchdog_Is_active( &the_thread->Timer ) ) ffc09c20: 80 1f 00 50 lwz r0,80(r31) ffc09c24: 2f 80 00 02 cmpwi cr7,r0,2 ffc09c28: 40 be 00 0c bne+ cr7,ffc09c34 <_Thread_Close+0x8c> (void) _Watchdog_Remove( &the_thread->Timer ); ffc09c2c: 38 7f 00 48 addi r3,r31,72 ffc09c30: 48 00 14 e9 bl ffc0b118 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Scheduler_Thread_scheduler_free( Scheduler_Control *the_scheduler, Thread_Control *the_thread ) { return the_scheduler->Operations.scheduler_free( the_scheduler, the_thread ); ffc09c34: 3c 60 00 00 lis r3,0 ffc09c38: 38 63 2c 60 addi r3,r3,11360 ffc09c3c: 80 03 00 18 lwz r0,24(r3) ffc09c40: 7f e4 fb 78 mr r4,r31 ffc09c44: 7c 09 03 a6 mtctr r0 ffc09c48: 4e 80 04 21 bctrl if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; if ( the_thread->Start.fp_context ) ffc09c4c: 80 7f 00 bc lwz r3,188(r31) #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; ffc09c50: 38 00 00 00 li r0,0 if ( the_thread->Start.fp_context ) ffc09c54: 2f 83 00 00 cmpwi cr7,r3,0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; ffc09c58: 90 1f 01 24 stw r0,292(r31) if ( the_thread->Start.fp_context ) ffc09c5c: 41 9e 00 08 beq- cr7,ffc09c64 <_Thread_Close+0xbc> <== NEVER TAKEN (void) _Workspace_Free( the_thread->Start.fp_context ); ffc09c60: 48 00 16 bd bl ffc0b31c <_Workspace_Free> /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); ffc09c64: 7f e3 fb 78 mr r3,r31 ffc09c68: 48 00 0d 8d bl ffc0a9f4 <_Thread_Stack_Free> the_thread->Start.stack = NULL; if ( the_thread->extensions ) ffc09c6c: 80 7f 01 34 lwz r3,308(r31) /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; ffc09c70: 38 00 00 00 li r0,0 if ( the_thread->extensions ) ffc09c74: 2f 83 00 00 cmpwi cr7,r3,0 /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; ffc09c78: 90 1f 00 c0 stw r0,192(r31) if ( the_thread->extensions ) ffc09c7c: 41 9e 00 08 beq- cr7,ffc09c84 <_Thread_Close+0xdc> (void) _Workspace_Free( the_thread->extensions ); ffc09c80: 48 00 16 9d bl ffc0b31c <_Workspace_Free> the_thread->extensions = NULL; ffc09c84: 38 00 00 00 li r0,0 } ffc09c88: 39 61 00 18 addi r11,r1,24 _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; if ( the_thread->extensions ) (void) _Workspace_Free( the_thread->extensions ); the_thread->extensions = NULL; ffc09c8c: 90 1f 01 34 stw r0,308(r31) } ffc09c90: 48 00 a5 58 b ffc141e8 <_restgpr_29_x> =============================================================================== ffc09d78 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc09d78: 94 21 ff e8 stwu r1,-24(r1) ffc09d7c: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc09d80: 38 81 00 08 addi r4,r1,8 void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc09d84: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc09d88: 48 00 01 b5 bl ffc09f3c <_Thread_Get> switch ( location ) { ffc09d8c: 80 01 00 08 lwz r0,8(r1) ffc09d90: 2f 80 00 00 cmpwi cr7,r0,0 ffc09d94: 40 9e 00 20 bne- cr7,ffc09db4 <_Thread_Delay_ended+0x3c><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( ffc09d98: 3c 80 10 00 lis r4,4096 ffc09d9c: 60 84 00 18 ori r4,r4,24 ffc09da0: 4b ff fd a1 bl ffc09b40 <_Thread_Clear_state> ffc09da4: 3d 20 00 00 lis r9,0 ffc09da8: 81 69 27 64 lwz r11,10084(r9) ffc09dac: 38 0b ff ff addi r0,r11,-1 ffc09db0: 90 09 27 64 stw r0,10084(r9) | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } ffc09db4: 80 01 00 1c lwz r0,28(r1) ffc09db8: 38 21 00 18 addi r1,r1,24 ffc09dbc: 7c 08 03 a6 mtlr r0 ffc09dc0: 4e 80 00 20 blr =============================================================================== ffc09dc4 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { ffc09dc4: 94 21 ff b8 stwu r1,-72(r1) ffc09dc8: 7c 08 02 a6 mflr r0 ffc09dcc: be a1 00 1c stmw r21,28(r1) Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; ffc09dd0: 3f 40 00 00 lis r26,0 ffc09dd4: 39 3a 2d 78 addi r9,r26,11640 * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { ffc09dd8: 90 01 00 4c stw r0,76(r1) Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; ffc09ddc: 83 e9 00 0c lwz r31,12(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc09de0: 7c 00 00 a6 mfmsr r0 ffc09de4: 7d 30 42 a6 mfsprg r9,0 ffc09de8: 7c 09 48 78 andc r9,r0,r9 ffc09dec: 7d 20 01 24 mtmsr r9 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( ffc09df0: 3f 80 00 00 lis r28,0 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; ffc09df4: 3e a0 00 00 lis r21,0 ffc09df8: 3a c0 00 01 li r22,1 _Thread_Dispatch_necessary = false; ffc09dfc: 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 ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc09e00: 3f 00 00 00 lis r24,0 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); ffc09e04: 3b 61 00 08 addi r27,r1,8 _Timestamp_Subtract( ffc09e08: 3b 9c 27 94 addi r28,r28,10132 ffc09e0c: 3b a1 00 10 addi r29,r1,16 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc09e10: 3f 20 00 00 lis r25,0 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { ffc09e14: 48 00 00 dc b ffc09ef0 <_Thread_Dispatch+0x12c> heir = _Thread_Heir; ffc09e18: 83 c9 00 10 lwz r30,16(r9) _Thread_Dispatch_disable_level = 1; ffc09e1c: 92 d5 27 64 stw r22,10084(r21) /* * 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 ) ffc09e20: 7f 9e f8 00 cmpw cr7,r30,r31 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Thread_Dispatch_necessary = false; ffc09e24: 9a e9 00 18 stb r23,24(r9) _Thread_Executing = heir; ffc09e28: 93 c9 00 0c stw r30,12(r9) /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) ffc09e2c: 41 9e 00 d4 beq- cr7,ffc09f00 <_Thread_Dispatch+0x13c> */ #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 ) ffc09e30: 81 3e 00 7c lwz r9,124(r30) ffc09e34: 2f 89 00 01 cmpwi cr7,r9,1 ffc09e38: 40 be 00 0c bne+ cr7,ffc09e44 <_Thread_Dispatch+0x80> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc09e3c: 81 38 27 60 lwz r9,10080(r24) ffc09e40: 91 3e 00 78 stw r9,120(r30) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09e44: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); ffc09e48: 7f 63 db 78 mr r3,r27 ffc09e4c: 48 00 32 fd bl ffc0d148 <_TOD_Get_uptime> _Timestamp_Subtract( ffc09e50: 7f 83 e3 78 mr r3,r28 ffc09e54: 7f 64 db 78 mr r4,r27 ffc09e58: 7f a5 eb 78 mr r5,r29 ffc09e5c: 48 00 0d e1 bl ffc0ac3c <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); ffc09e60: 38 7f 00 84 addi r3,r31,132 ffc09e64: 7f a4 eb 78 mr r4,r29 ffc09e68: 48 00 0d 79 bl ffc0abe0 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; ffc09e6c: 81 21 00 08 lwz r9,8(r1) ffc09e70: 81 41 00 0c lwz r10,12(r1) ffc09e74: 91 3c 00 00 stw r9,0(r28) #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc09e78: 81 39 27 78 lwz r9,10104(r25) &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc09e7c: 91 5c 00 04 stw r10,4(r28) #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc09e80: 2f 89 00 00 cmpwi cr7,r9,0 ffc09e84: 41 9e 00 14 beq- cr7,ffc09e98 <_Thread_Dispatch+0xd4> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; ffc09e88: 80 09 00 00 lwz r0,0(r9) ffc09e8c: 90 1f 01 28 stw r0,296(r31) *_Thread_libc_reent = heir->libc_reent; ffc09e90: 80 1e 01 28 lwz r0,296(r30) ffc09e94: 90 09 00 00 stw r0,0(r9) } _User_extensions_Thread_switch( executing, heir ); ffc09e98: 7f e3 fb 78 mr r3,r31 ffc09e9c: 7f c4 f3 78 mr r4,r30 ffc09ea0: 48 00 10 c9 bl ffc0af68 <_User_extensions_Thread_switch> * operations. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE ) if ( executing->fp_context != NULL ) ffc09ea4: 80 1f 01 24 lwz r0,292(r31) ffc09ea8: 2f 80 00 00 cmpwi cr7,r0,0 ffc09eac: 41 9e 00 0c beq- cr7,ffc09eb8 <_Thread_Dispatch+0xf4> _Context_Save_fp( &executing->fp_context ); ffc09eb0: 38 7f 01 24 addi r3,r31,292 ffc09eb4: 48 00 a4 0d bl ffc142c0 <_CPU_Context_save_fp> #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); ffc09eb8: 38 7f 00 c4 addi r3,r31,196 ffc09ebc: 38 9e 00 c4 addi r4,r30,196 ffc09ec0: 48 00 a5 81 bl ffc14440 <_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 ) ffc09ec4: 80 1f 01 24 lwz r0,292(r31) ffc09ec8: 2f 80 00 00 cmpwi cr7,r0,0 ffc09ecc: 41 9e 00 0c beq- cr7,ffc09ed8 <_Thread_Dispatch+0x114> _Context_Restore_fp( &executing->fp_context ); ffc09ed0: 38 7f 01 24 addi r3,r31,292 ffc09ed4: 48 00 a4 ad bl ffc14380 <_CPU_Context_restore_fp> #endif #endif executing = _Thread_Executing; ffc09ed8: 39 3a 2d 78 addi r9,r26,11640 ffc09edc: 83 e9 00 0c lwz r31,12(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc09ee0: 7c 00 00 a6 mfmsr r0 ffc09ee4: 7d 30 42 a6 mfsprg r9,0 ffc09ee8: 7c 09 48 78 andc r9,r0,r9 ffc09eec: 7d 20 01 24 mtmsr r9 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { ffc09ef0: 39 3a 2d 78 addi r9,r26,11640 ffc09ef4: 89 69 00 18 lbz r11,24(r9) ffc09ef8: 2f 8b 00 00 cmpwi cr7,r11,0 ffc09efc: 40 9e ff 1c bne+ cr7,ffc09e18 <_Thread_Dispatch+0x54> _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; ffc09f00: 39 60 00 00 li r11,0 ffc09f04: 3d 20 00 00 lis r9,0 ffc09f08: 91 69 27 64 stw r11,10084(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09f0c: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _API_extensions_Run_postswitch(); ffc09f10: 4b ff e2 71 bl ffc08180 <_API_extensions_Run_postswitch> } ffc09f14: 39 61 00 48 addi r11,r1,72 ffc09f18: 48 00 a2 b0 b ffc141c8 <_restgpr_21_x> =============================================================================== ffc09f3c <_Thread_Get>: */ Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { ffc09f3c: 7c 85 23 78 mr r5,r4 ffc09f40: 94 21 ff f8 stwu r1,-8(r1) uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { ffc09f44: 7c 64 1b 79 mr. r4,r3 */ Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { ffc09f48: 7c 08 02 a6 mflr r0 ffc09f4c: 90 01 00 0c stw r0,12(r1) uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { ffc09f50: 40 a2 00 24 bne+ ffc09f74 <_Thread_Get+0x38> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc09f54: 3d 20 00 00 lis r9,0 ffc09f58: 81 69 27 64 lwz r11,10084(r9) ffc09f5c: 38 0b 00 01 addi r0,r11,1 ffc09f60: 90 09 27 64 stw r0,10084(r9) _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; ffc09f64: 3d 20 00 00 lis r9,0 Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; ffc09f68: 90 85 00 00 stw r4,0(r5) tp = _Thread_Executing; ffc09f6c: 80 69 2d 84 lwz r3,11652(r9) goto done; ffc09f70: 48 00 00 58 b ffc09fc8 <_Thread_Get+0x8c> */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); ffc09f74: 54 89 47 7e rlwinm r9,r4,8,29,31 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) ffc09f78: 38 09 ff ff addi r0,r9,-1 ffc09f7c: 2b 80 00 02 cmplwi cr7,r0,2 ffc09f80: 40 9d 00 58 ble- cr7,ffc09fd8 <_Thread_Get+0x9c> goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; ffc09f84: 38 00 00 01 li r0,1 ffc09f88: 48 00 00 1c b ffc09fa4 <_Thread_Get+0x68> goto done; } api_information = _Objects_Information_table[ the_api ]; ffc09f8c: 3d 60 00 00 lis r11,0 ffc09f90: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc09f94: 39 6b 2b 80 addi r11,r11,11136 ffc09f98: 7d 2b 48 2e lwzx r9,r11,r9 /* * There is no way for this to happen if POSIX is enabled. */ #if !defined(RTEMS_POSIX_API) if ( !api_information ) { ffc09f9c: 2f 89 00 00 cmpwi cr7,r9,0 ffc09fa0: 40 be 00 10 bne+ cr7,ffc09fb0 <_Thread_Get+0x74> <== ALWAYS TAKEN *location = OBJECTS_ERROR; ffc09fa4: 90 05 00 00 stw r0,0(r5) { uint32_t the_api; uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; ffc09fa8: 38 60 00 00 li r3,0 * There is no way for this to happen if POSIX is enabled. */ #if !defined(RTEMS_POSIX_API) if ( !api_information ) { *location = OBJECTS_ERROR; goto done; ffc09fac: 48 00 00 1c b ffc09fc8 <_Thread_Get+0x8c> } #endif information = api_information[ the_class ]; ffc09fb0: 80 69 00 04 lwz r3,4(r9) if ( !information ) { ffc09fb4: 2f 83 00 00 cmpwi cr7,r3,0 ffc09fb8: 40 be 00 0c bne+ cr7,ffc09fc4 <_Thread_Get+0x88> *location = OBJECTS_ERROR; ffc09fbc: 90 05 00 00 stw r0,0(r5) goto done; ffc09fc0: 48 00 00 08 b ffc09fc8 <_Thread_Get+0x8c> } tp = (Thread_Control *) _Objects_Get( information, id, location ); ffc09fc4: 4b ff f2 9d bl ffc09260 <_Objects_Get> done: return tp; } ffc09fc8: 80 01 00 0c lwz r0,12(r1) ffc09fcc: 38 21 00 08 addi r1,r1,8 ffc09fd0: 7c 08 03 a6 mtlr r0 ffc09fd4: 4e 80 00 20 blr */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) ffc09fd8: 54 80 2e fe rlwinm r0,r4,5,27,31 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ ffc09fdc: 2f 80 00 01 cmpwi cr7,r0,1 ffc09fe0: 41 9e ff ac beq+ cr7,ffc09f8c <_Thread_Get+0x50> ffc09fe4: 4b ff ff a0 b ffc09f84 <_Thread_Get+0x48> =============================================================================== ffc0f07c <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc0f07c: 94 21 ff f0 stwu r1,-16(r1) ffc0f080: 7c 08 02 a6 mflr r0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; ffc0f084: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc0f088: 90 01 00 14 stw r0,20(r1) ffc0f08c: bf c1 00 08 stmw r30,8(r1) #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; ffc0f090: 83 e9 2d 84 lwz r31,11652(r9) /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; ffc0f094: 81 3f 00 ac lwz r9,172(r31) } static inline void _CPU_ISR_Set_level( uint32_t level ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc0f098: 38 00 00 00 li r0,0 ffc0f09c: 7c 00 00 a6 mfmsr r0 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc0f0a0: 71 2b 00 01 andi. r11,r9,1 ffc0f0a4: 40 82 00 10 bne- ffc0f0b4 <_Thread_Handler+0x38> static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; asm volatile ( ffc0f0a8: 7d 30 42 a6 mfsprg r9,0 msr |= ppc_interrupt_get_disable_mask(); ffc0f0ac: 7d 20 03 78 or r0,r9,r0 ffc0f0b0: 48 00 00 0c b ffc0f0bc <_Thread_Handler+0x40> ffc0f0b4: 7d 30 42 a6 mfsprg r9,0 } else { msr &= ~ppc_interrupt_get_disable_mask(); ffc0f0b8: 7c 00 48 78 andc r0,r0,r9 } _CPU_MSR_SET(msr); ffc0f0bc: 7c 00 01 24 mtmsr r0 _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; ffc0f0c0: 3d 20 00 00 lis r9,0 ffc0f0c4: 8b c9 29 20 lbz r30,10528(r9) doneConstructors = 1; ffc0f0c8: 38 00 00 01 li r0,1 /* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); ffc0f0cc: 7f e3 fb 78 mr r3,r31 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; ffc0f0d0: 98 09 29 20 stb r0,10528(r9) /* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); ffc0f0d4: 4b ff bc 61 bl ffc0ad34 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); ffc0f0d8: 4b ff ae 45 bl ffc09f1c <_Thread_Enable_dispatch> /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { ffc0f0dc: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0f0e0: 40 be 00 08 bne+ cr7,ffc0f0e8 <_Thread_Handler+0x6c> INIT_NAME (); ffc0f0e4: 48 00 61 f9 bl ffc152dc <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { ffc0f0e8: 80 1f 00 94 lwz r0,148(r31) ffc0f0ec: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f0f0: 40 be 00 18 bne+ cr7,ffc0f108 <_Thread_Handler+0x8c> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( ffc0f0f4: 80 1f 00 90 lwz r0,144(r31) ffc0f0f8: 80 7f 00 9c lwz r3,156(r31) ffc0f0fc: 7c 09 03 a6 mtctr r0 ffc0f100: 4e 80 04 21 bctrl INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = ffc0f104: 90 7f 00 28 stw r3,40(r31) * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); ffc0f108: 7f e3 fb 78 mr r3,r31 ffc0f10c: 4b ff bc 7d bl ffc0ad88 <_User_extensions_Thread_exitted> _Internal_error_Occurred( ffc0f110: 38 60 00 00 li r3,0 ffc0f114: 38 80 00 01 li r4,1 ffc0f118: 38 a0 00 05 li r5,5 ffc0f11c: 4b ff 9b d5 bl ffc08cf0 <_Internal_error_Occurred> =============================================================================== ffc09fe8 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc09fe8: 94 21 ff d0 stwu r1,-48(r1) ffc09fec: 7c 08 02 a6 mflr r0 ffc09ff0: be e1 00 0c stmw r23,12(r1) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc09ff4: 3b 20 00 00 li r25,0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc09ff8: 7d 3a 4b 78 mr r26,r9 ffc09ffc: 90 01 00 34 stw r0,52(r1) ffc0a000: 7c 7e 1b 78 mr r30,r3 ffc0a004: 7c 9f 23 78 mr r31,r4 ffc0a008: 81 21 00 40 lwz r9,64(r1) /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); ffc0a00c: 7c 83 23 78 mr r3,r4 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0a010: 93 24 01 2c stw r25,300(r4) Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0a014: 7c dd 33 78 mr r29,r6 ffc0a018: 7c fc 3b 78 mr r28,r7 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0a01c: 93 24 01 30 stw r25,304(r4) Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0a020: 7d 1b 43 78 mr r27,r8 ffc0a024: 7d 57 53 78 mr r23,r10 */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; the_thread->libc_reent = NULL; ffc0a028: 93 24 01 28 stw r25,296(r4) /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); ffc0a02c: 7c c4 33 78 mr r4,r6 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0a030: 83 09 00 00 lwz r24,0(r9) /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); ffc0a034: 48 00 09 4d bl ffc0a980 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0a038: 2c 03 00 00 cmpwi r3,0 return false; /* stack allocation failed */ ffc0a03c: 38 00 00 00 li r0,0 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0a040: 41 82 01 b0 beq- ffc0a1f0 <_Thread_Initialize+0x208> ffc0a044: 7f 83 e8 40 cmplw cr7,r3,r29 ffc0a048: 41 9c 01 a8 blt- cr7,ffc0a1f0 <_Thread_Initialize+0x208><== NEVER TAKEN /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { ffc0a04c: 2f 9c 00 00 cmpwi cr7,r28,0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0a050: 80 1f 00 c0 lwz r0,192(r31) the_stack->size = size; ffc0a054: 90 7f 00 b4 stw r3,180(r31) Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0a058: 90 1f 00 b8 stw r0,184(r31) ffc0a05c: 41 be 00 14 beq+ cr7,ffc0a070 <_Thread_Initialize+0x88> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); ffc0a060: 38 60 01 08 li r3,264 ffc0a064: 48 00 12 85 bl ffc0b2e8 <_Workspace_Allocate> if ( !fp_area ) ffc0a068: 7c 79 1b 79 mr. r25,r3 ffc0a06c: 41 82 01 10 beq- ffc0a17c <_Thread_Initialize+0x194> #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0a070: 3d 20 00 00 lis r9,0 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; ffc0a074: 93 3f 01 24 stw r25,292(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0a078: 38 00 00 00 li r0,0 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0a07c: 80 69 27 84 lwz r3,10116(r9) * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; ffc0a080: 3b a0 00 00 li r29,0 if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; the_thread->Start.fp_context = fp_area; ffc0a084: 93 3f 00 bc stw r25,188(r31) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0a088: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a08c: 90 1f 00 50 stw r0,80(r31) the_watchdog->routine = routine; ffc0a090: 90 1f 00 64 stw r0,100(r31) the_watchdog->id = id; ffc0a094: 90 1f 00 68 stw r0,104(r31) the_watchdog->user_data = user_data; ffc0a098: 90 1f 00 6c stw r0,108(r31) ffc0a09c: 41 be 00 18 beq+ cr7,ffc0a0b4 <_Thread_Initialize+0xcc> extensions_area = _Workspace_Allocate( ffc0a0a0: 38 63 00 01 addi r3,r3,1 ffc0a0a4: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc0a0a8: 48 00 12 41 bl ffc0b2e8 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) ffc0a0ac: 7c 7d 1b 79 mr. r29,r3 ffc0a0b0: 41 82 00 d0 beq- ffc0a180 <_Thread_Initialize+0x198> * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { ffc0a0b4: 2f 9d 00 00 cmpwi cr7,r29,0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0a0b8: 93 bf 01 34 stw r29,308(r31) * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { ffc0a0bc: 41 9e 00 2c beq- cr7,ffc0a0e8 <_Thread_Initialize+0x100> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) ffc0a0c0: 3d 20 00 00 lis r9,0 ffc0a0c4: 81 49 27 84 lwz r10,10116(r9) * all memory associated with this thread. It completes by adding * the thread to the local object table so operations on this * thread id are allowed. */ bool _Thread_Initialize( ffc0a0c8: 39 7d ff fc addi r11,r29,-4 ffc0a0cc: 39 20 00 00 li r9,0 * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) the_thread->extensions[i] = NULL; ffc0a0d0: 38 00 00 00 li r0,0 ffc0a0d4: 48 00 00 0c b ffc0a0e0 <_Thread_Initialize+0xf8> ffc0a0d8: 94 0b 00 04 stwu r0,4(r11) * 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++ ) ffc0a0dc: 39 29 00 01 addi r9,r9,1 ffc0a0e0: 7f 89 50 40 cmplw cr7,r9,r10 ffc0a0e4: 40 9d ff f4 ble+ cr7,ffc0a0d8 <_Thread_Initialize+0xf0> * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0a0e8: 80 01 00 38 lwz r0,56(r1) Scheduler_Control *the_scheduler, Thread_Control *the_thread ) { return the_scheduler->Operations.scheduler_allocate( the_scheduler, the_thread ); ffc0a0ec: 3c 60 00 00 lis r3,0 ffc0a0f0: 38 63 2c 60 addi r3,r3,11360 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; ffc0a0f4: 9b 5f 00 a0 stb r26,160(r31) } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; ffc0a0f8: 3b 40 00 00 li r26,0 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0a0fc: 90 1f 00 a8 stw r0,168(r31) RTEMS_INLINE_ROUTINE void* _Scheduler_Thread_scheduler_allocate( Scheduler_Control *the_scheduler, Thread_Control *the_thread ) { return ffc0a100: 7f e4 fb 78 mr r4,r31 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0a104: 80 01 00 3c lwz r0,60(r1) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; ffc0a108: 92 ff 00 a4 stw r23,164(r31) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0a10c: 90 1f 00 ac stw r0,172(r31) the_thread->current_state = STATES_DORMANT; ffc0a110: 38 00 00 01 li r0,1 ffc0a114: 90 1f 00 10 stw r0,16(r31) ffc0a118: 80 03 00 14 lwz r0,20(r3) the_thread->Wait.queue = NULL; ffc0a11c: 93 5f 00 44 stw r26,68(r31) ffc0a120: 7c 09 03 a6 mtctr r0 the_thread->resource_count = 0; ffc0a124: 93 5f 00 1c stw r26,28(r31) the_thread->real_priority = priority; ffc0a128: 93 7f 00 18 stw r27,24(r31) the_thread->Start.initial_priority = priority; ffc0a12c: 93 7f 00 b0 stw r27,176(r31) ffc0a130: 4e 80 04 21 bctrl sched =_Scheduler_Thread_scheduler_allocate( &_Scheduler, the_thread ); if ( !sched ) ffc0a134: 7c 7c 1b 79 mr. r28,r3 ffc0a138: 41 82 00 4c beq- ffc0a184 <_Thread_Initialize+0x19c> goto failed; _Thread_Set_priority( the_thread, priority ); ffc0a13c: 7f e3 fb 78 mr r3,r31 ffc0a140: 7f 64 db 78 mr r4,r27 ffc0a144: 48 00 06 fd bl ffc0a840 <_Thread_Set_priority> Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( ffc0a148: a0 1f 00 0a lhz r0,10(r31) _Thread_Stack_Free( the_thread ); return false; } ffc0a14c: 81 3e 00 1c lwz r9,28(r30) * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); ffc0a150: 7f e3 fb 78 mr r3,r31 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0a154: 54 00 10 3a rlwinm r0,r0,2,0,29 /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); ffc0a158: 93 5f 00 84 stw r26,132(r31) ffc0a15c: 93 5f 00 88 stw r26,136(r31) ffc0a160: 7f e9 01 2e stwx r31,r9,r0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc0a164: 93 1f 00 0c stw r24,12(r31) * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); ffc0a168: 48 00 0c d1 bl ffc0ae38 <_User_extensions_Thread_create> if ( extension_status ) return true; ffc0a16c: 38 00 00 01 li r0,1 * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) ffc0a170: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a174: 41 be 00 10 beq+ cr7,ffc0a184 <_Thread_Initialize+0x19c> ffc0a178: 48 00 00 78 b ffc0a1f0 <_Thread_Initialize+0x208> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; ffc0a17c: 3b a0 00 00 li r29,0 size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; ffc0a180: 3b 80 00 00 li r28,0 extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: if ( the_thread->libc_reent ) ffc0a184: 80 7f 01 28 lwz r3,296(r31) ffc0a188: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a18c: 41 9e 00 08 beq- cr7,ffc0a194 <_Thread_Initialize+0x1ac> _Workspace_Free( the_thread->libc_reent ); ffc0a190: 48 00 11 8d bl ffc0b31c <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) ffc0a194: 80 7f 01 2c lwz r3,300(r31) ffc0a198: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a19c: 41 9e 00 08 beq- cr7,ffc0a1a4 <_Thread_Initialize+0x1bc> _Workspace_Free( the_thread->API_Extensions[i] ); ffc0a1a0: 48 00 11 7d bl ffc0b31c <_Workspace_Free> failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) ffc0a1a4: 80 7f 01 30 lwz r3,304(r31) ffc0a1a8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a1ac: 41 9e 00 08 beq- cr7,ffc0a1b4 <_Thread_Initialize+0x1cc><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); ffc0a1b0: 48 00 11 6d bl ffc0b31c <_Workspace_Free> <== NOT EXECUTED if ( extensions_area ) ffc0a1b4: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0a1b8: 41 9e 00 0c beq- cr7,ffc0a1c4 <_Thread_Initialize+0x1dc> (void) _Workspace_Free( extensions_area ); ffc0a1bc: 7f a3 eb 78 mr r3,r29 ffc0a1c0: 48 00 11 5d bl ffc0b31c <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) ffc0a1c4: 2f 99 00 00 cmpwi cr7,r25,0 ffc0a1c8: 41 9e 00 0c beq- cr7,ffc0a1d4 <_Thread_Initialize+0x1ec> (void) _Workspace_Free( fp_area ); ffc0a1cc: 7f 23 cb 78 mr r3,r25 ffc0a1d0: 48 00 11 4d bl ffc0b31c <_Workspace_Free> #endif if ( sched ) ffc0a1d4: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0a1d8: 41 9e 00 0c beq- cr7,ffc0a1e4 <_Thread_Initialize+0x1fc> (void) _Workspace_Free( sched ); ffc0a1dc: 7f 83 e3 78 mr r3,r28 ffc0a1e0: 48 00 11 3d bl ffc0b31c <_Workspace_Free> _Thread_Stack_Free( the_thread ); ffc0a1e4: 7f e3 fb 78 mr r3,r31 ffc0a1e8: 48 00 08 0d bl ffc0a9f4 <_Thread_Stack_Free> return false; ffc0a1ec: 38 00 00 00 li r0,0 } ffc0a1f0: 39 61 00 30 addi r11,r1,48 ffc0a1f4: 7c 03 03 78 mr r3,r0 ffc0a1f8: 48 00 9f d8 b ffc141d0 <_restgpr_23_x> =============================================================================== ffc0b830 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0b830: 7c 2b 0b 78 mr r11,r1 ffc0b834: 7c 08 02 a6 mflr r0 ffc0b838: 94 21 ff e8 stwu r1,-24(r1) ffc0b83c: 90 01 00 1c stw r0,28(r1) ffc0b840: 48 00 f5 69 bl ffc1ada8 <_savegpr_31> _Thread_Restart_self(); return true; } return false; ffc0b844: 38 00 00 00 li r0,0 */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); ffc0b848: 81 23 00 10 lwz r9,16(r3) bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0b84c: 7c 7f 1b 78 mr r31,r3 if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0b850: 71 2b 00 01 andi. r11,r9,1 ffc0b854: 40 a2 00 70 bne+ ffc0b8c4 <_Thread_Restart+0x94> _Thread_Set_transient( the_thread ); ffc0b858: 90 81 00 08 stw r4,8(r1) ffc0b85c: 90 a1 00 0c stw r5,12(r1) ffc0b860: 48 00 01 15 bl ffc0b974 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); ffc0b864: 7f e3 fb 78 mr r3,r31 ffc0b868: 80 81 00 08 lwz r4,8(r1) ffc0b86c: 80 a1 00 0c lwz r5,12(r1) ffc0b870: 48 00 32 ed bl ffc0eb5c <_Thread_Reset> _Thread_Load_environment( the_thread ); ffc0b874: 7f e3 fb 78 mr r3,r31 ffc0b878: 48 00 2f 9d bl ffc0e814 <_Thread_Load_environment> _Thread_Ready( the_thread ); ffc0b87c: 7f e3 fb 78 mr r3,r31 ffc0b880: 48 00 32 8d bl ffc0eb0c <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); ffc0b884: 7f e3 fb 78 mr r3,r31 ffc0b888: 48 00 07 11 bl ffc0bf98 <_User_extensions_Thread_restart> RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc0b88c: 3d 20 00 00 lis r9,0 if ( _Thread_Is_executing ( the_thread ) ) ffc0b890: 81 29 2d c4 lwz r9,11716(r9) _Thread_Restart_self(); return true; ffc0b894: 38 00 00 01 li r0,1 _Thread_Ready( the_thread ); _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) ffc0b898: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0b89c: 40 be 00 28 bne+ cr7,ffc0b8c4 <_Thread_Restart+0x94> */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) ffc0b8a0: 80 1f 01 24 lwz r0,292(r31) ffc0b8a4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b8a8: 41 9e 00 0c beq- cr7,ffc0b8b4 <_Thread_Restart+0x84> <== NEVER TAKEN _Context_Restore_fp( &_Thread_Executing->fp_context ); ffc0b8ac: 38 7f 01 24 addi r3,r31,292 ffc0b8b0: 48 00 f6 71 bl ffc1af20 <_CPU_Context_restore_fp> #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); ffc0b8b4: 3d 20 00 00 lis r9,0 ffc0b8b8: 80 69 2d c4 lwz r3,11716(r9) ffc0b8bc: 38 63 00 c4 addi r3,r3,196 ffc0b8c0: 48 00 f8 21 bl ffc1b0e0 <_CPU_Context_restore> return true; } return false; } ffc0b8c4: 39 61 00 18 addi r11,r1,24 ffc0b8c8: 7c 03 03 78 mr r3,r0 ffc0b8cc: 4b ff 54 8c b ffc00d58 <_restgpr_31_x> =============================================================================== ffc0dea0 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { ffc0dea0: 7c 2b 0b 78 mr r11,r1 ffc0dea4: 7c 08 02 a6 mflr r0 ffc0dea8: 94 21 ff f0 stwu r1,-16(r1) ffc0deac: 7c 64 1b 78 mr r4,r3 ffc0deb0: 90 01 00 14 stw r0,20(r1) ffc0deb4: 4b ff 27 91 bl ffc00644 <_savegpr_31> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0deb8: 7f e0 00 a6 mfmsr r31 ffc0debc: 7c 10 42 a6 mfsprg r0,0 ffc0dec0: 7f e0 00 78 andc r0,r31,r0 ffc0dec4: 7c 00 01 24 mtmsr r0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); current_state = the_thread->current_state; ffc0dec8: 80 03 00 10 lwz r0,16(r3) if ( current_state & STATES_SUSPENDED ) { ffc0decc: 70 09 00 02 andi. r9,r0,2 ffc0ded0: 41 82 00 28 beq- ffc0def8 <_Thread_Resume+0x58> <== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); ffc0ded4: 54 00 07 fa rlwinm r0,r0,0,31,29 current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { ffc0ded8: 2f 80 00 00 cmpwi cr7,r0,0 _ISR_Disable( level ); current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); ffc0dedc: 90 03 00 10 stw r0,16(r3) if ( _States_Is_ready( current_state ) ) { ffc0dee0: 40 be 00 18 bne+ cr7,ffc0def8 <_Thread_Resume+0x58> RTEMS_INLINE_ROUTINE void _Scheduler_Unblock( Scheduler_Control *the_scheduler, Thread_Control *the_thread ) { the_scheduler->Operations.unblock( the_scheduler, the_thread ); ffc0dee4: 3c 60 00 00 lis r3,0 ffc0dee8: 38 63 2d 40 addi r3,r3,11584 ffc0deec: 80 03 00 10 lwz r0,16(r3) ffc0def0: 7c 09 03 a6 mtctr r0 ffc0def4: 4e 80 04 21 bctrl return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0def8: 7f e0 01 24 mtmsr r31 _Scheduler_Unblock( &_Scheduler, the_thread ); } } _ISR_Enable( level ); } ffc0defc: 39 61 00 10 addi r11,r1,16 ffc0df00: 4b ff 27 90 b ffc00690 <_restgpr_31_x> =============================================================================== ffc0d908 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { ffc0d908: 7c 08 02 a6 mflr r0 ffc0d90c: 94 21 ff f8 stwu r1,-8(r1) ffc0d910: 7c 64 1b 78 mr r4,r3 ffc0d914: 90 01 00 0c stw r0,12(r1) Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; ffc0d918: 80 63 00 44 lwz r3,68(r3) * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && ffc0d91c: 80 03 00 30 lwz r0,48(r3) ffc0d920: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d924: 41 9e 00 30 beq- cr7,ffc0d954 <_Thread_queue_Process_timeout+0x4c> RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc0d928: 3d 20 00 00 lis r9,0 ffc0d92c: 81 29 2d 84 lwz r9,11652(r9) ffc0d930: 7f 84 48 00 cmpw cr7,r4,r9 ffc0d934: 40 be 00 20 bne+ cr7,ffc0d954 <_Thread_queue_Process_timeout+0x4c><== NEVER TAKEN _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { ffc0d938: 2f 80 00 03 cmpwi cr7,r0,3 ffc0d93c: 41 9e 00 24 beq- cr7,ffc0d960 <_Thread_queue_Process_timeout+0x58> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; ffc0d940: 80 03 00 3c lwz r0,60(r3) ffc0d944: 90 04 00 34 stw r0,52(r4) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ffc0d948: 38 00 00 02 li r0,2 ffc0d94c: 90 03 00 30 stw r0,48(r3) ffc0d950: 48 00 00 10 b ffc0d960 <_Thread_queue_Process_timeout+0x58> } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; ffc0d954: 80 03 00 3c lwz r0,60(r3) ffc0d958: 90 04 00 34 stw r0,52(r4) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); ffc0d95c: 4b ff fe 81 bl ffc0d7dc <_Thread_queue_Extract> } } ffc0d960: 80 01 00 0c lwz r0,12(r1) ffc0d964: 38 21 00 08 addi r1,r1,8 ffc0d968: 7c 08 03 a6 mtlr r0 ffc0d96c: 4e 80 00 20 blr =============================================================================== ffc0a788 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0a788: 94 21 ff d8 stwu r1,-40(r1) ffc0a78c: 7c 08 02 a6 mflr r0 ffc0a790: bf a1 00 1c stmw r29,28(r1) /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) ffc0a794: 7c 7f 1b 79 mr. r31,r3 void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0a798: 7c 9e 23 78 mr r30,r4 ffc0a79c: 90 01 00 2c stw r0,44(r1) /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) ffc0a7a0: 41 82 00 54 beq- ffc0a7f4 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { ffc0a7a4: 80 1f 00 34 lwz r0,52(r31) ffc0a7a8: 2f 80 00 01 cmpwi cr7,r0,1 ffc0a7ac: 40 be 00 48 bne+ cr7,ffc0a7f4 <_Thread_queue_Requeue+0x6c><== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0a7b0: 7f a0 00 a6 mfmsr r29 ffc0a7b4: 7d 30 42 a6 mfsprg r9,0 ffc0a7b8: 7f a9 48 78 andc r9,r29,r9 ffc0a7bc: 7d 20 01 24 mtmsr r9 Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { ffc0a7c0: 3d 60 00 03 lis r11,3 ffc0a7c4: 81 24 00 10 lwz r9,16(r4) ffc0a7c8: 61 6b be e0 ori r11,r11,48864 ffc0a7cc: 7d 6a 48 39 and. r10,r11,r9 ffc0a7d0: 41 a2 00 20 beq+ ffc0a7f0 <_Thread_queue_Requeue+0x68> <== NEVER TAKEN RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc0a7d4: 90 1f 00 30 stw r0,48(r31) _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); ffc0a7d8: 38 a0 00 01 li r5,1 ffc0a7dc: 48 00 30 39 bl ffc0d814 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); ffc0a7e0: 7f e3 fb 78 mr r3,r31 ffc0a7e4: 7f c4 f3 78 mr r4,r30 ffc0a7e8: 38 a1 00 08 addi r5,r1,8 ffc0a7ec: 4b ff fd 0d bl ffc0a4f8 <_Thread_queue_Enqueue_priority> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0a7f0: 7f a0 01 24 mtmsr r29 } _ISR_Enable( level ); } } ffc0a7f4: 39 61 00 28 addi r11,r1,40 ffc0a7f8: 48 00 99 f0 b ffc141e8 <_restgpr_29_x> =============================================================================== ffc0a7fc <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0a7fc: 94 21 ff e8 stwu r1,-24(r1) ffc0a800: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0a804: 38 81 00 08 addi r4,r1,8 void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0a808: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0a80c: 4b ff f7 31 bl ffc09f3c <_Thread_Get> switch ( location ) { ffc0a810: 80 01 00 08 lwz r0,8(r1) ffc0a814: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a818: 40 9e 00 18 bne- cr7,ffc0a830 <_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 ); ffc0a81c: 48 00 30 ed bl ffc0d908 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0a820: 3d 20 00 00 lis r9,0 ffc0a824: 81 69 27 64 lwz r11,10084(r9) ffc0a828: 38 0b ff ff addi r0,r11,-1 ffc0a82c: 90 09 27 64 stw r0,10084(r9) _Thread_Unnest_dispatch(); break; } } ffc0a830: 80 01 00 1c lwz r0,28(r1) ffc0a834: 38 21 00 18 addi r1,r1,24 ffc0a838: 7c 08 03 a6 mtlr r0 ffc0a83c: 4e 80 00 20 blr =============================================================================== ffc18e50 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc18e50: 94 21 ff a0 stwu r1,-96(r1) ffc18e54: 7c 08 02 a6 mflr r0 ffc18e58: be 41 00 28 stmw r18,40(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc18e5c: 3a a1 00 0c addi r21,r1,12 head->previous = NULL; tail->previous = head; ffc18e60: 3a 41 00 08 addi r18,r1,8 ffc18e64: 90 01 00 64 stw r0,100(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc18e68: 3b 81 00 14 addi r28,r1,20 head->previous = NULL; ffc18e6c: 38 00 00 00 li r0,0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc18e70: 3b 61 00 18 addi r27,r1,24 ffc18e74: 92 a1 00 08 stw r21,8(r1) ffc18e78: 7c 7f 1b 78 mr r31,r3 head->previous = NULL; ffc18e7c: 90 01 00 0c stw r0,12(r1) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc18e80: 3e 60 00 00 lis r19,0 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc18e84: 3b 43 00 30 addi r26,r3,48 tail->previous = head; ffc18e88: 92 41 00 10 stw r18,16(r1) static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc18e8c: 3e 80 00 00 lis r20,0 /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); ffc18e90: 3b a3 00 68 addi r29,r3,104 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc18e94: 93 61 00 14 stw r27,20(r1) _ISR_Disable( level ); tmp = ts->insert_chain; if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; do_loop = false; ffc18e98: 3a c0 00 00 li r22,0 _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; ffc18e9c: 3a e0 00 01 li r23,1 head->previous = NULL; ffc18ea0: 90 01 00 18 stw r0,24(r1) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc18ea4: 3b 03 00 08 addi r24,r3,8 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc18ea8: 3b 23 00 40 addi r25,r3,64 tail->previous = head; ffc18eac: 93 81 00 1c stw r28,28(r1) Chain_Control *tmp; /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; ffc18eb0: 92 5f 00 78 stw r18,120(r31) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc18eb4: 80 13 28 98 lwz r0,10392(r19) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc18eb8: 7f 85 e3 78 mr r5,r28 Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; ffc18ebc: 80 9f 00 3c lwz r4,60(r31) watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc18ec0: 7f 43 d3 78 mr r3,r26 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; ffc18ec4: 90 1f 00 3c stw r0,60(r31) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc18ec8: 7c 84 00 50 subf r4,r4,r0 ffc18ecc: 48 00 49 75 bl ffc1d840 <_Watchdog_Adjust_to_chain> static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc18ed0: 83 d4 28 74 lwz r30,10356(r20) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; ffc18ed4: 80 bf 00 74 lwz r5,116(r31) /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { ffc18ed8: 7f 9e 28 40 cmplw cr7,r30,r5 ffc18edc: 40 bd 00 18 ble+ cr7,ffc18ef4 <_Timer_server_Body+0xa4> /* * 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 ); ffc18ee0: 7c 85 f0 50 subf r4,r5,r30 ffc18ee4: 7f a3 eb 78 mr r3,r29 ffc18ee8: 7f 85 e3 78 mr r5,r28 ffc18eec: 48 00 49 55 bl ffc1d840 <_Watchdog_Adjust_to_chain> ffc18ef0: 48 00 00 18 b ffc18f08 <_Timer_server_Body+0xb8> } else if ( snapshot < last_snapshot ) { ffc18ef4: 40 bc 00 14 bge+ cr7,ffc18f08 <_Timer_server_Body+0xb8> /* * 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 ); ffc18ef8: 7f a3 eb 78 mr r3,r29 ffc18efc: 38 80 00 01 li r4,1 ffc18f00: 7c be 28 50 subf r5,r30,r5 ffc18f04: 48 00 48 85 bl ffc1d788 <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; ffc18f08: 93 df 00 74 stw r30,116(r31) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); ffc18f0c: 80 7f 00 78 lwz r3,120(r31) ffc18f10: 48 00 0b 75 bl ffc19a84 <_Chain_Get> if ( timer == NULL ) { ffc18f14: 7c 7e 1b 79 mr. r30,r3 ffc18f18: 41 82 00 2c beq- ffc18f44 <_Timer_server_Body+0xf4> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc18f1c: 80 1e 00 38 lwz r0,56(r30) _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc18f20: 7f 43 d3 78 mr r3,r26 static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc18f24: 2f 80 00 01 cmpwi cr7,r0,1 ffc18f28: 41 9e 00 10 beq- cr7,ffc18f38 <_Timer_server_Body+0xe8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc18f2c: 2f 80 00 03 cmpwi cr7,r0,3 ffc18f30: 40 9e ff dc bne+ cr7,ffc18f0c <_Timer_server_Body+0xbc> <== NEVER TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc18f34: 7f a3 eb 78 mr r3,r29 ffc18f38: 38 9e 00 10 addi r4,r30,16 ffc18f3c: 48 00 49 b9 bl ffc1d8f4 <_Watchdog_Insert> ffc18f40: 4b ff ff cc b ffc18f0c <_Timer_server_Body+0xbc> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); ffc18f44: 4b ff fe 25 bl ffc18d68 tmp = ts->insert_chain; if ( _Chain_Is_empty( insert_chain ) ) { ffc18f48: 81 21 00 08 lwz r9,8(r1) * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); tmp = ts->insert_chain; ffc18f4c: 80 1f 00 78 lwz r0,120(r31) if ( _Chain_Is_empty( insert_chain ) ) { ffc18f50: 38 00 00 01 li r0,1 ffc18f54: 7f 89 a8 00 cmpw cr7,r9,r21 ffc18f58: 40 be 00 0c bne+ cr7,ffc18f64 <_Timer_server_Body+0x114> ts->insert_chain = NULL; ffc18f5c: 93 df 00 78 stw r30,120(r31) do_loop = false; ffc18f60: 38 00 00 00 li r0,0 ffc18f64: 7c 60 01 24 mtmsr 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; while ( do_loop ) { ffc18f68: 2f 80 00 00 cmpwi cr7,r0,0 ffc18f6c: 40 9e ff 48 bne+ cr7,ffc18eb4 <_Timer_server_Body+0x64> _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 ) ) { ffc18f70: 81 21 00 14 lwz r9,20(r1) ffc18f74: 7f 89 d8 00 cmpw cr7,r9,r27 ffc18f78: 41 9e 00 50 beq- cr7,ffc18fc8 <_Timer_server_Body+0x178> /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); ffc18f7c: 4b ff fd ed bl ffc18d68 initialized = false; } #endif return status; } ffc18f80: 81 21 00 14 lwz r9,20(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) ffc18f84: 7f 89 d8 00 cmpw cr7,r9,r27 ffc18f88: 41 9e 00 38 beq- cr7,ffc18fc0 <_Timer_server_Body+0x170> * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { ffc18f8c: 2f 89 00 00 cmpwi cr7,r9,0 Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; ffc18f90: 81 69 00 00 lwz r11,0(r9) head->next = new_first; ffc18f94: 91 61 00 14 stw r11,20(r1) new_first->previous = head; ffc18f98: 93 8b 00 04 stw r28,4(r11) ffc18f9c: 41 9e 00 24 beq- cr7,ffc18fc0 <_Timer_server_Body+0x170><== NEVER TAKEN watchdog->state = WATCHDOG_INACTIVE; ffc18fa0: 92 c9 00 08 stw r22,8(r9) ffc18fa4: 7c 60 01 24 mtmsr r3 /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); ffc18fa8: 80 09 00 1c lwz r0,28(r9) ffc18fac: 80 69 00 20 lwz r3,32(r9) ffc18fb0: 80 89 00 24 lwz r4,36(r9) ffc18fb4: 7c 09 03 a6 mtctr r0 ffc18fb8: 4e 80 04 21 bctrl } ffc18fbc: 4b ff ff c0 b ffc18f7c <_Timer_server_Body+0x12c> ffc18fc0: 7c 60 01 24 mtmsr r3 ffc18fc4: 4b ff fe ec b ffc18eb0 <_Timer_server_Body+0x60> } else { ts->active = false; ffc18fc8: 98 1f 00 7c stb r0,124(r31) /* * Block until there is something to do. */ _Thread_Disable_dispatch(); ffc18fcc: 4b ff fd b1 bl ffc18d7c <_Thread_Disable_dispatch> _Thread_Set_state( ts->thread, STATES_DELAYING ); ffc18fd0: 80 7f 00 00 lwz r3,0(r31) ffc18fd4: 38 80 00 08 li r4,8 ffc18fd8: 48 00 3f 99 bl ffc1cf70 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); ffc18fdc: 7f e3 fb 78 mr r3,r31 ffc18fe0: 4b ff fd b1 bl ffc18d90 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); ffc18fe4: 7f e3 fb 78 mr r3,r31 ffc18fe8: 4b ff fe 09 bl ffc18df0 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); ffc18fec: 48 00 35 21 bl ffc1c50c <_Thread_Enable_dispatch> ts->active = true; ffc18ff0: 9a ff 00 7c stb r23,124(r31) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc18ff4: 7f 03 c3 78 mr r3,r24 ffc18ff8: 48 00 4a 59 bl ffc1da50 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc18ffc: 7f 23 cb 78 mr r3,r25 ffc19000: 48 00 4a 51 bl ffc1da50 <_Watchdog_Remove> ffc19004: 4b ff fe ac b ffc18eb0 <_Timer_server_Body+0x60> =============================================================================== ffc19008 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc19008: 94 21 ff f0 stwu r1,-16(r1) ffc1900c: 7c 08 02 a6 mflr r0 ffc19010: 90 01 00 14 stw r0,20(r1) if ( ts->insert_chain == NULL ) { ffc19014: 80 03 00 78 lwz r0,120(r3) static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc19018: bf c1 00 08 stmw r30,8(r1) ffc1901c: 7c 7f 1b 78 mr r31,r3 if ( ts->insert_chain == NULL ) { ffc19020: 2f 80 00 00 cmpwi cr7,r0,0 static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc19024: 7c 9e 23 78 mr r30,r4 if ( ts->insert_chain == NULL ) { ffc19028: 40 be 01 00 bne+ cr7,ffc19128 <_Timer_server_Schedule_operation_method+0x120> * is the reference point for the delta chain. Thus if we do not update the * reference point we have to add DT to the initial delta of the watchdog * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); ffc1902c: 4b ff fd 51 bl ffc18d7c <_Thread_Disable_dispatch> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc19030: 80 1e 00 38 lwz r0,56(r30) ffc19034: 2f 80 00 01 cmpwi cr7,r0,1 ffc19038: 40 be 00 6c bne+ cr7,ffc190a4 <_Timer_server_Schedule_operation_method+0x9c> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); ffc1903c: 4b ff fd 2d bl ffc18d68 snapshot = _Watchdog_Ticks_since_boot; ffc19040: 3d 20 00 00 lis r9,0 ffc19044: 80 09 28 98 lwz r0,10392(r9) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc19048: 39 7f 00 34 addi r11,r31,52 initialized = false; } #endif return status; } ffc1904c: 81 3f 00 30 lwz r9,48(r31) * 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; last_snapshot = ts->Interval_watchdogs.last_snapshot; ffc19050: 81 5f 00 3c lwz r10,60(r31) if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { ffc19054: 7f 89 58 00 cmpw cr7,r9,r11 ffc19058: 41 9e 00 20 beq- cr7,ffc19078 <_Timer_server_Schedule_operation_method+0x70> /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; ffc1905c: 81 09 00 10 lwz r8,16(r9) first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; ffc19060: 7d 4a 00 50 subf r10,r10,r0 delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; ffc19064: 39 60 00 00 li r11,0 * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { ffc19068: 7f 88 50 40 cmplw cr7,r8,r10 ffc1906c: 40 9d 00 08 ble- cr7,ffc19074 <_Timer_server_Schedule_operation_method+0x6c> delta_interval -= delta; ffc19070: 7d 6a 40 50 subf r11,r10,r8 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; ffc19074: 91 69 00 10 stw r11,16(r9) } ts->Interval_watchdogs.last_snapshot = snapshot; ffc19078: 90 1f 00 3c stw r0,60(r31) ffc1907c: 7c 60 01 24 mtmsr r3 _ISR_Enable( level ); _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc19080: 38 7f 00 30 addi r3,r31,48 ffc19084: 38 9e 00 10 addi r4,r30,16 ffc19088: 48 00 48 6d bl ffc1d8f4 <_Watchdog_Insert> if ( !ts->active ) { ffc1908c: 88 1f 00 7c lbz r0,124(r31) ffc19090: 2f 80 00 00 cmpwi cr7,r0,0 ffc19094: 40 be 00 8c bne+ cr7,ffc19120 <_Timer_server_Schedule_operation_method+0x118> _Timer_server_Reset_interval_system_watchdog( ts ); ffc19098: 7f e3 fb 78 mr r3,r31 ffc1909c: 4b ff fc f5 bl ffc18d90 <_Timer_server_Reset_interval_system_watchdog> ffc190a0: 48 00 00 80 b ffc19120 <_Timer_server_Schedule_operation_method+0x118> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc190a4: 2f 80 00 03 cmpwi cr7,r0,3 ffc190a8: 40 be 00 78 bne+ cr7,ffc19120 <_Timer_server_Schedule_operation_method+0x118> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); ffc190ac: 4b ff fc bd bl ffc18d68 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc190b0: 3d 20 00 00 lis r9,0 last_snapshot = ts->TOD_watchdogs.last_snapshot; ffc190b4: 81 1f 00 74 lwz r8,116(r31) /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc190b8: 80 09 28 74 lwz r0,10356(r9) ffc190bc: 39 7f 00 6c addi r11,r31,108 initialized = false; } #endif return status; } ffc190c0: 81 3f 00 68 lwz r9,104(r31) * the watchdog chain accordingly. */ _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 ) ) { ffc190c4: 7f 89 58 00 cmpw cr7,r9,r11 ffc190c8: 41 9e 00 30 beq- cr7,ffc190f8 <_Timer_server_Schedule_operation_method+0xf0> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { ffc190cc: 7f 80 40 40 cmplw cr7,r0,r8 _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; ffc190d0: 81 49 00 10 lwz r10,16(r9) } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; ffc190d4: 7d 6a 42 14 add r11,r10,r8 delta_interval += delta; ffc190d8: 7d 60 58 50 subf r11,r0,r11 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { ffc190dc: 40 9d 00 18 ble- cr7,ffc190f4 <_Timer_server_Schedule_operation_method+0xec> /* * We advanced in time. */ delta = snapshot - last_snapshot; ffc190e0: 7d 08 00 50 subf r8,r8,r0 if (delta_interval > delta) { ffc190e4: 7f 8a 40 40 cmplw cr7,r10,r8 delta_interval -= delta; } else { delta_interval = 0; ffc190e8: 39 60 00 00 li r11,0 if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { ffc190ec: 40 9d 00 08 ble- cr7,ffc190f4 <_Timer_server_Schedule_operation_method+0xec><== NEVER TAKEN delta_interval -= delta; ffc190f0: 7d 68 50 50 subf r11,r8,r10 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; ffc190f4: 91 69 00 10 stw r11,16(r9) } ts->TOD_watchdogs.last_snapshot = snapshot; ffc190f8: 90 1f 00 74 stw r0,116(r31) ffc190fc: 7c 60 01 24 mtmsr r3 _ISR_Enable( level ); _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc19100: 38 7f 00 68 addi r3,r31,104 ffc19104: 38 9e 00 10 addi r4,r30,16 ffc19108: 48 00 47 ed bl ffc1d8f4 <_Watchdog_Insert> if ( !ts->active ) { ffc1910c: 88 1f 00 7c lbz r0,124(r31) ffc19110: 2f 80 00 00 cmpwi cr7,r0,0 ffc19114: 40 be 00 0c bne+ cr7,ffc19120 <_Timer_server_Schedule_operation_method+0x118> _Timer_server_Reset_tod_system_watchdog( ts ); ffc19118: 7f e3 fb 78 mr r3,r31 ffc1911c: 4b ff fc d5 bl ffc18df0 <_Timer_server_Reset_tod_system_watchdog> } } _Thread_Enable_dispatch(); ffc19120: 48 00 33 ed bl ffc1c50c <_Thread_Enable_dispatch> ffc19124: 48 00 00 0c b ffc19130 <_Timer_server_Schedule_operation_method+0x128> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); ffc19128: 80 63 00 78 lwz r3,120(r3) ffc1912c: 48 00 09 01 bl ffc19a2c <_Chain_Append> } } ffc19130: 39 61 00 10 addi r11,r1,16 ffc19134: 4b ff 51 84 b ffc0e2b8 <_restgpr_30_x> =============================================================================== ffc0ac80 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { ffc0ac80: 94 21 ff e8 stwu r1,-24(r1) ffc0ac84: 7c 08 02 a6 mflr r0 User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; ffc0ac88: 3d 20 00 00 lis r9,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0ac8c: 90 01 00 1c stw r0,28(r1) User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; ffc0ac90: 39 29 20 a0 addi r9,r9,8352 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0ac94: 3d 60 00 00 lis r11,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0ac98: bf 81 00 08 stmw r28,8(r1) uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; initial_extensions = Configuration.User_extension_table; ffc0ac9c: 83 a9 00 40 lwz r29,64(r9) User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; ffc0aca0: 83 c9 00 3c lwz r30,60(r9) ffc0aca4: 39 2b 2d 34 addi r9,r11,11572 initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { ffc0aca8: 2f 9d 00 00 cmpwi cr7,r29,0 head->previous = NULL; tail->previous = head; ffc0acac: 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; ffc0acb0: 38 09 00 04 addi r0,r9,4 ffc0acb4: 90 0b 2d 34 stw r0,11572(r11) head->previous = NULL; ffc0acb8: 38 00 00 00 li r0,0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0acbc: 3d 60 00 00 lis r11,0 head->previous = NULL; ffc0acc0: 90 09 00 04 stw r0,4(r9) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0acc4: 39 2b 2b f0 addi r9,r11,11248 ffc0acc8: 39 49 00 04 addi r10,r9,4 ffc0accc: 91 4b 2b f0 stw r10,11248(r11) head->previous = NULL; ffc0acd0: 90 09 00 04 stw r0,4(r9) tail->previous = head; ffc0acd4: 91 29 00 08 stw r9,8(r9) ffc0acd8: 41 9e 00 54 beq- cr7,ffc0ad2c <_User_extensions_Handler_initialization+0xac><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ffc0acdc: 1f 9e 00 34 mulli r28,r30,52 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( ffc0ace0: 7f 83 e3 78 mr r3,r28 ffc0ace4: 48 00 06 65 bl ffc0b348 <_Workspace_Allocate_or_fatal_error> number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0ace8: 7f 85 e3 78 mr r5,r28 ffc0acec: 38 80 00 00 li r4,0 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( ffc0acf0: 7c 7f 1b 78 mr r31,r3 number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0acf4: 48 00 52 5d bl ffc0ff50 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0acf8: 3b 80 00 00 li r28,0 ffc0acfc: 48 00 00 28 b ffc0ad24 <_User_extensions_Handler_initialization+0xa4> #include #include #include #include void _User_extensions_Handler_initialization(void) ffc0ad00: 57 83 28 34 rlwinm r3,r28,5,0,26 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; ffc0ad04: 38 9f 00 14 addi r4,r31,20 ffc0ad08: 7c 7d 1a 14 add r3,r29,r3 ffc0ad0c: 7c a3 04 aa lswi r5,r3,32 ffc0ad10: 7c a4 05 aa stswi r5,r4,32 _User_extensions_Add_set( extension ); ffc0ad14: 7f e3 fb 78 mr r3,r31 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0ad18: 3b 9c 00 01 addi r28,r28,1 ffc0ad1c: 48 00 2c a5 bl ffc0d9c0 <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; ffc0ad20: 3b ff 00 34 addi r31,r31,52 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0ad24: 7f 9c f0 40 cmplw cr7,r28,r30 ffc0ad28: 41 9c ff d8 blt+ cr7,ffc0ad00 <_User_extensions_Handler_initialization+0x80> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } ffc0ad2c: 39 61 00 18 addi r11,r1,24 ffc0ad30: 48 00 94 b4 b ffc141e4 <_restgpr_28_x> =============================================================================== ffc0d104 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { ffc0d104: 94 21 ff e0 stwu r1,-32(r1) ffc0d108: 7c 08 02 a6 mflr r0 ffc0d10c: bf 61 00 0c stmw r27,12(r1) ffc0d110: 7c 7f 1b 78 mr r31,r3 ffc0d114: 7c be 2b 78 mr r30,r5 ffc0d118: 90 01 00 24 stw r0,36(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0d11c: 7c 00 00 a6 mfmsr r0 ffc0d120: 7d 30 42 a6 mfsprg r9,0 ffc0d124: 7c 09 48 78 andc r9,r0,r9 ffc0d128: 7d 20 01 24 mtmsr r9 } } _ISR_Enable( level ); } ffc0d12c: 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 ); ffc0d130: 3b 83 00 04 addi r28,r3,4 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { ffc0d134: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0d138: 41 9e 00 78 beq- cr7,ffc0d1b0 <_Watchdog_Adjust+0xac> switch ( direction ) { ffc0d13c: 2f 84 00 00 cmpwi cr7,r4,0 if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0d140: 3b 60 00 01 li r27,1 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { ffc0d144: 41 9e 00 64 beq- cr7,ffc0d1a8 <_Watchdog_Adjust+0xa4> ffc0d148: 2f 84 00 01 cmpwi cr7,r4,1 ffc0d14c: 40 be 00 64 bne+ cr7,ffc0d1b0 <_Watchdog_Adjust+0xac> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; ffc0d150: 81 69 00 10 lwz r11,16(r9) ffc0d154: 7f cb 2a 14 add r30,r11,r5 ffc0d158: 48 00 00 18 b ffc0d170 <_Watchdog_Adjust+0x6c> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); ffc0d15c: 81 3f 00 00 lwz r9,0(r31) break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { ffc0d160: 83 a9 00 10 lwz r29,16(r9) ffc0d164: 7f 9e e8 40 cmplw cr7,r30,r29 ffc0d168: 40 bc 00 10 bge+ cr7,ffc0d178 <_Watchdog_Adjust+0x74> _Watchdog_First( header )->delta_interval -= units; ffc0d16c: 7f de e8 50 subf r30,r30,r29 ffc0d170: 93 c9 00 10 stw r30,16(r9) break; ffc0d174: 48 00 00 3c b ffc0d1b0 <_Watchdog_Adjust+0xac> } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0d178: 93 69 00 10 stw r27,16(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0d17c: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _Watchdog_Tickle( header ); ffc0d180: 7f e3 fb 78 mr r3,r31 ffc0d184: 48 00 02 3d bl ffc0d3c0 <_Watchdog_Tickle> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0d188: 7c 00 00 a6 mfmsr r0 ffc0d18c: 7d 30 42 a6 mfsprg r9,0 ffc0d190: 7c 09 48 78 andc r9,r0,r9 ffc0d194: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0d198: 81 3f 00 00 lwz r9,0(r31) ffc0d19c: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0d1a0: 41 9e 00 10 beq- cr7,ffc0d1b0 <_Watchdog_Adjust+0xac> while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; ffc0d1a4: 7f dd f0 50 subf r30,r29,r30 switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0d1a8: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0d1ac: 40 9e ff b0 bne+ cr7,ffc0d15c <_Watchdog_Adjust+0x58> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0d1b0: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0d1b4: 39 61 00 20 addi r11,r1,32 ffc0d1b8: 4b ff 41 88 b ffc01340 <_restgpr_27_x> =============================================================================== ffc0b118 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { ffc0b118: 7c 69 1b 78 mr r9,r3 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b11c: 7c 00 00 a6 mfmsr r0 ffc0b120: 7d 70 42 a6 mfsprg r11,0 ffc0b124: 7c 0b 58 78 andc r11,r0,r11 ffc0b128: 7d 60 01 24 mtmsr r11 ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; ffc0b12c: 80 63 00 08 lwz r3,8(r3) switch ( previous_state ) { ffc0b130: 2f 83 00 01 cmpwi cr7,r3,1 ffc0b134: 41 9e 00 18 beq- cr7,ffc0b14c <_Watchdog_Remove+0x34> ffc0b138: 2b 83 00 01 cmplwi cr7,r3,1 ffc0b13c: 41 9c 00 70 blt- cr7,ffc0b1ac <_Watchdog_Remove+0x94> ffc0b140: 2b 83 00 03 cmplwi cr7,r3,3 ffc0b144: 41 9d 00 68 bgt- cr7,ffc0b1ac <_Watchdog_Remove+0x94> <== NEVER TAKEN ffc0b148: 48 00 00 10 b ffc0b158 <_Watchdog_Remove+0x40> /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; ffc0b14c: 39 60 00 00 li r11,0 ffc0b150: 91 69 00 08 stw r11,8(r9) break; ffc0b154: 48 00 00 58 b ffc0b1ac <_Watchdog_Remove+0x94> case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; ffc0b158: 39 60 00 00 li r11,0 ffc0b15c: 91 69 00 08 stw r11,8(r9) } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } ffc0b160: 81 69 00 00 lwz r11,0(r9) case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) ffc0b164: 81 4b 00 00 lwz r10,0(r11) ffc0b168: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0b16c: 41 9e 00 14 beq- cr7,ffc0b180 <_Watchdog_Remove+0x68> next_watchdog->delta_interval += the_watchdog->delta_interval; ffc0b170: 81 0b 00 10 lwz r8,16(r11) ffc0b174: 81 49 00 10 lwz r10,16(r9) ffc0b178: 7d 48 52 14 add r10,r8,r10 ffc0b17c: 91 4b 00 10 stw r10,16(r11) if ( _Watchdog_Sync_count ) ffc0b180: 3d 40 00 00 lis r10,0 ffc0b184: 81 4a 27 9c lwz r10,10140(r10) ffc0b188: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0b18c: 41 9e 00 14 beq- cr7,ffc0b1a0 <_Watchdog_Remove+0x88> _Watchdog_Sync_level = _ISR_Nest_level; ffc0b190: 3d 40 00 00 lis r10,0 ffc0b194: 81 0a 2d 80 lwz r8,11648(r10) ffc0b198: 3d 40 00 00 lis r10,0 ffc0b19c: 91 0a 27 8c stw r8,10124(r10) { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0b1a0: 81 49 00 04 lwz r10,4(r9) next->previous = previous; ffc0b1a4: 91 4b 00 04 stw r10,4(r11) previous->next = next; ffc0b1a8: 91 6a 00 00 stw r11,0(r10) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0b1ac: 3d 60 00 00 lis r11,0 ffc0b1b0: 81 6b 27 a0 lwz r11,10144(r11) ffc0b1b4: 91 69 00 18 stw r11,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0b1b8: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); return( previous_state ); } ffc0b1bc: 4e 80 00 20 blr =============================================================================== ffc0c97c <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { ffc0c97c: 94 21 ff e8 stwu r1,-24(r1) ffc0c980: 7c 08 02 a6 mflr r0 ffc0c984: bf 81 00 08 stmw r28,8(r1) ffc0c988: 7c 7e 1b 78 mr r30,r3 ffc0c98c: 7c 9f 23 78 mr r31,r4 ffc0c990: 90 01 00 1c stw r0,28(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0c994: 7f a0 00 a6 mfmsr r29 ffc0c998: 7c 10 42 a6 mfsprg r0,0 ffc0c99c: 7f a0 00 78 andc r0,r29,r0 ffc0c9a0: 7c 00 01 24 mtmsr r0 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); ffc0c9a4: 3c 60 ff c2 lis r3,-62 ffc0c9a8: 7f e5 fb 78 mr r5,r31 ffc0c9ac: 38 63 e1 80 addi r3,r3,-7808 ffc0c9b0: 7f c4 f3 78 mr r4,r30 ffc0c9b4: 4c c6 31 82 crclr 4*cr1+eq ffc0c9b8: 4b ff 96 65 bl ffc0601c printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } ffc0c9bc: 83 9f 00 00 lwz r28,0(r31) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0c9c0: 3b ff 00 04 addi r31,r31,4 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { ffc0c9c4: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0c9c8: 41 9e 00 34 beq- cr7,ffc0c9fc <_Watchdog_Report_chain+0x80> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); ffc0c9cc: 7f 84 e3 78 mr r4,r28 ffc0c9d0: 38 60 00 00 li r3,0 ffc0c9d4: 48 00 00 45 bl ffc0ca18 <_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 ) ffc0c9d8: 83 9c 00 00 lwz r28,0(r28) Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; ffc0c9dc: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0c9e0: 40 9e ff ec bne+ cr7,ffc0c9cc <_Watchdog_Report_chain+0x50><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); ffc0c9e4: 3c 60 ff c2 lis r3,-62 ffc0c9e8: 38 63 e1 97 addi r3,r3,-7785 ffc0c9ec: 7f c4 f3 78 mr r4,r30 ffc0c9f0: 4c c6 31 82 crclr 4*cr1+eq ffc0c9f4: 4b ff 96 29 bl ffc0601c ffc0c9f8: 48 00 00 14 b ffc0ca0c <_Watchdog_Report_chain+0x90> } else { printk( "Chain is empty\n" ); ffc0c9fc: 3c 60 ff c2 lis r3,-62 ffc0ca00: 38 63 e1 a6 addi r3,r3,-7770 ffc0ca04: 4c c6 31 82 crclr 4*cr1+eq ffc0ca08: 4b ff 96 15 bl ffc0601c return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ca0c: 7f a0 01 24 mtmsr r29 } _ISR_Enable( level ); } ffc0ca10: 39 61 00 18 addi r11,r1,24 ffc0ca14: 4b ff 44 b0 b ffc00ec4 <_restgpr_28_x> =============================================================================== ffc24544 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } ffc24544: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc24548: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc042a0 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); ffc042a0: 4b ff ff 88 b ffc04228 <== NOT EXECUTED =============================================================================== ffc08f44 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { ffc08f44: 94 21 ff 88 stwu r1,-120(r1) ffc08f48: 7d 80 00 26 mfcr r12 ffc08f4c: 7c 08 02 a6 mflr r0 /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); ffc08f50: 7c 83 23 78 mr r3,r4 int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { ffc08f54: bf 41 00 60 stmw r26,96(r1) ffc08f58: 7c 9d 23 78 mr r29,r4 ffc08f5c: 7c bb 2b 78 mr r27,r5 ffc08f60: 90 01 00 7c stw r0,124(r1) ffc08f64: 91 81 00 5c stw r12,92(r1) /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); ffc08f68: 4b ff e7 ed bl ffc07754 if ( old_parent_pathlen == 0 ) ffc08f6c: 7c 7a 1b 79 mr. r26,r3 ffc08f70: 38 c1 00 24 addi r6,r1,36 ffc08f74: 40 82 00 1c bne- ffc08f90 <_rename_r+0x4c> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); ffc08f78: 7f a3 eb 78 mr r3,r29 ffc08f7c: 38 81 00 08 addi r4,r1,8 ffc08f80: 7c c5 33 78 mr r5,r6 ffc08f84: 48 00 03 99 bl ffc0931c rtems_filesystem_location_info_t old_parent_loc; rtems_filesystem_location_info_t new_parent_loc; int i; int result; const char *name; bool free_old_parentloc = false; ffc08f88: 3b c0 00 00 li r30,0 ffc08f8c: 48 00 00 28 b ffc08fb4 <_rename_r+0x70> old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, ffc08f90: 7f a3 eb 78 mr r3,r29 ffc08f94: 7f 44 d3 78 mr r4,r26 ffc08f98: 38 a0 00 02 li r5,2 ffc08f9c: 38 e0 00 00 li r7,0 ffc08fa0: 4b ff e7 59 bl ffc076f8 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) return -1; ffc08fa4: 3b 80 ff ff li r28,-1 else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) ffc08fa8: 2f 83 00 00 cmpwi cr7,r3,0 ffc08fac: 40 9e 01 5c bne- cr7,ffc09108 <_rename_r+0x1c4> <== NEVER TAKEN return -1; free_old_parentloc = true; ffc08fb0: 3b c0 00 01 li r30,1 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; ffc08fb4: 3b 81 00 10 addi r28,r1,16 ffc08fb8: 3b e1 00 24 addi r31,r1,36 ffc08fbc: 7c bf a4 aa lswi r5,r31,20 ffc08fc0: 7c bc a5 aa stswi r5,r28,20 name = old + old_parent_pathlen; ffc08fc4: 7f bd d2 14 add r29,r29,r26 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc08fc8: 7f a3 eb 78 mr r3,r29 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; ffc08fcc: 93 a1 00 0c stw r29,12(r1) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc08fd0: 48 00 e1 39 bl ffc17108 ffc08fd4: 7c 64 1b 78 mr r4,r3 ffc08fd8: 7f a3 eb 78 mr r3,r29 ffc08fdc: 4b ff e7 c1 bl ffc0779c ffc08fe0: 7f bd 1a 14 add r29,r29,r3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc08fe4: 7f a3 eb 78 mr r3,r29 * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc08fe8: 93 a1 00 0c stw r29,12(r1) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc08fec: 48 00 e1 1d bl ffc17108 ffc08ff0: 38 a0 00 00 li r5,0 ffc08ff4: 7c 64 1b 78 mr r4,r3 ffc08ff8: 7f 86 e3 78 mr r6,r28 ffc08ffc: 7f a3 eb 78 mr r3,r29 ffc09000: 38 e0 00 00 li r7,0 ffc09004: 4b ff e6 71 bl ffc07674 0, &old_loc, false ); if ( result != 0 ) { ffc09008: 2f 83 00 00 cmpwi cr7,r3,0 ffc0900c: 41 be 00 18 beq+ cr7,ffc09024 <_rename_r+0xe0> if ( free_old_parentloc ) ffc09010: 2f 9e 00 00 cmpwi cr7,r30,0 rtems_filesystem_freenode( &old_parent_loc ); return -1; ffc09014: 3b 80 ff ff li r28,-1 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); ffc09018: 7f e3 fb 78 mr r3,r31 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) ffc0901c: 41 be 00 ec beq+ cr7,ffc09108 <_rename_r+0x1c4> <== NEVER TAKEN ffc09020: 48 00 00 e4 b ffc09104 <_rename_r+0x1c0> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); ffc09024: 3b a1 00 38 addi r29,r1,56 ffc09028: 7f 63 db 78 mr r3,r27 ffc0902c: 38 81 00 08 addi r4,r1,8 ffc09030: 7f a5 eb 78 mr r5,r29 ffc09034: 48 00 02 e9 bl ffc0931c result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); ffc09038: 81 21 00 44 lwz r9,68(r1) ffc0903c: 80 61 00 08 lwz r3,8(r1) ffc09040: 7f a4 eb 78 mr r4,r29 ffc09044: 80 09 00 04 lwz r0,4(r9) ffc09048: 38 a1 00 0c addi r5,r1,12 ffc0904c: 7c 7b 1a 14 add r3,r27,r3 ffc09050: 7c 09 03 a6 mtctr r0 ffc09054: 4e 80 04 21 bctrl if ( result != 0 ) { ffc09058: 2f 83 00 00 cmpwi cr7,r3,0 ffc0905c: 41 be 00 28 beq+ cr7,ffc09084 <_rename_r+0x140> rtems_filesystem_freenode( &new_parent_loc ); ffc09060: 7f a3 eb 78 mr r3,r29 ffc09064: 4b ff e9 d1 bl ffc07a34 if ( free_old_parentloc ) ffc09068: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0906c: 41 be 00 0c beq+ cr7,ffc09078 <_rename_r+0x134> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); ffc09070: 7f e3 fb 78 mr r3,r31 ffc09074: 4b ff e9 c1 bl ffc07a34 rtems_filesystem_freenode( &old_loc ); ffc09078: 38 61 00 10 addi r3,r1,16 ffc0907c: 4b ff e9 b9 bl ffc07a34 ffc09080: 48 00 00 40 b ffc090c0 <_rename_r+0x17c> /* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { ffc09084: 80 01 00 48 lwz r0,72(r1) ffc09088: 2e 1e 00 00 cmpwi cr4,r30,0 ffc0908c: 81 21 00 34 lwz r9,52(r1) ffc09090: 7f 89 00 00 cmpw cr7,r9,r0 ffc09094: 41 be 00 34 beq+ cr7,ffc090c8 <_rename_r+0x184> rtems_filesystem_freenode( &new_parent_loc ); ffc09098: 7f a3 eb 78 mr r3,r29 ffc0909c: 4b ff e9 99 bl ffc07a34 if ( free_old_parentloc ) ffc090a0: 41 b2 00 0c beq+ cr4,ffc090ac <_rename_r+0x168> rtems_filesystem_freenode( &old_parent_loc ); ffc090a4: 7f e3 fb 78 mr r3,r31 ffc090a8: 4b ff e9 8d bl ffc07a34 rtems_filesystem_freenode( &old_loc ); ffc090ac: 38 61 00 10 addi r3,r1,16 ffc090b0: 4b ff e9 85 bl ffc07a34 rtems_set_errno_and_return_minus_one( EXDEV ); ffc090b4: 48 00 a6 e1 bl ffc13794 <__errno> ffc090b8: 38 00 00 12 li r0,18 ffc090bc: 90 03 00 00 stw r0,0(r3) ffc090c0: 3b 80 ff ff li r28,-1 ffc090c4: 48 00 00 44 b ffc09108 <_rename_r+0x1c4> } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); ffc090c8: 81 21 00 44 lwz r9,68(r1) ffc090cc: 7f 84 e3 78 mr r4,r28 ffc090d0: 7f e3 fb 78 mr r3,r31 ffc090d4: 80 c1 00 0c lwz r6,12(r1) ffc090d8: 80 09 00 40 lwz r0,64(r9) ffc090dc: 7f a5 eb 78 mr r5,r29 ffc090e0: 7c 09 03 a6 mtctr r0 ffc090e4: 4e 80 04 21 bctrl ffc090e8: 7c 7c 1b 78 mr r28,r3 rtems_filesystem_freenode( &new_parent_loc ); ffc090ec: 7f a3 eb 78 mr r3,r29 ffc090f0: 4b ff e9 45 bl ffc07a34 if ( free_old_parentloc ) ffc090f4: 41 b2 00 0c beq+ cr4,ffc09100 <_rename_r+0x1bc> rtems_filesystem_freenode( &old_parent_loc ); ffc090f8: 7f e3 fb 78 mr r3,r31 ffc090fc: 4b ff e9 39 bl ffc07a34 rtems_filesystem_freenode( &old_loc ); ffc09100: 38 61 00 10 addi r3,r1,16 ffc09104: 4b ff e9 31 bl ffc07a34 return result; } ffc09108: 81 81 00 5c lwz r12,92(r1) ffc0910c: 39 61 00 78 addi r11,r1,120 ffc09110: 7f 83 e3 78 mr r3,r28 ffc09114: 7d 80 81 20 mtcrf 8,r12 ffc09118: 4b ff a4 48 b ffc03560 <_restgpr_26_x> =============================================================================== ffc0413c : #include int chroot( const char *pathname ) { ffc0413c: 94 21 ff c8 stwu r1,-56(r1) ffc04140: 7c 08 02 a6 mflr r0 int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { ffc04144: 3d 20 00 00 lis r9,0 #include int chroot( const char *pathname ) { ffc04148: bf a1 00 2c stmw r29,44(r1) int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { ffc0414c: 3f c0 00 00 lis r30,0 #include int chroot( const char *pathname ) { ffc04150: 7c 7d 1b 78 mr r29,r3 int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { ffc04154: 83 fe 26 bc lwz r31,9916(r30) #include int chroot( const char *pathname ) { ffc04158: 90 01 00 3c stw r0,60(r1) int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { ffc0415c: 38 09 2a 98 addi r0,r9,10904 ffc04160: 7f 9f 00 00 cmpw cr7,r31,r0 ffc04164: 40 be 00 24 bne+ cr7,ffc04188 rtems_libio_set_private_env(); /* try to set a new private env*/ ffc04168: 48 00 15 31 bl ffc05698 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ ffc0416c: 80 1e 26 bc lwz r0,9916(r30) ffc04170: 7f 80 f8 00 cmpw cr7,r0,r31 ffc04174: 40 be 00 14 bne+ cr7,ffc04188 rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc04178: 48 00 b6 01 bl ffc0f778 <__errno> ffc0417c: 38 00 00 86 li r0,134 ffc04180: 90 03 00 00 stw r0,0(r3) ffc04184: 48 00 00 28 b ffc041ac } result = chdir(pathname); ffc04188: 7f a3 eb 78 mr r3,r29 ffc0418c: 48 00 89 d9 bl ffc0cb64 if (result) { ffc04190: 2f 83 00 00 cmpwi cr7,r3,0 ffc04194: 41 be 00 20 beq+ cr7,ffc041b4 rtems_set_errno_and_return_minus_one( errno ); ffc04198: 48 00 b5 e1 bl ffc0f778 <__errno> ffc0419c: 7c 7f 1b 78 mr r31,r3 ffc041a0: 48 00 b5 d9 bl ffc0f778 <__errno> ffc041a4: 80 03 00 00 lwz r0,0(r3) ffc041a8: 90 1f 00 00 stw r0,0(r31) ffc041ac: 38 60 ff ff li r3,-1 ffc041b0: 48 00 00 50 b ffc04200 } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { ffc041b4: 3c 60 ff c1 lis r3,-63 ffc041b8: 3b e1 00 08 addi r31,r1,8 ffc041bc: 38 63 65 a4 addi r3,r3,26020 ffc041c0: 38 80 00 01 li r4,1 ffc041c4: 38 a0 00 00 li r5,0 ffc041c8: 7f e6 fb 78 mr r6,r31 ffc041cc: 38 e0 00 00 li r7,0 ffc041d0: 48 00 01 49 bl ffc04318 ffc041d4: 2f 83 00 00 cmpwi cr7,r3,0 ffc041d8: 40 be ff c0 bne- cr7,ffc04198 <== NEVER TAKEN /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); ffc041dc: 3f c0 00 00 lis r30,0 ffc041e0: 80 7e 26 bc lwz r3,9916(r30) ffc041e4: 38 63 00 18 addi r3,r3,24 ffc041e8: 48 00 02 25 bl ffc0440c rtems_filesystem_root = loc; ffc041ec: 81 7e 26 bc lwz r11,9916(r30) return 0; ffc041f0: 38 60 00 00 li r3,0 if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; ffc041f4: 39 6b 00 18 addi r11,r11,24 ffc041f8: 7c bf a4 aa lswi r5,r31,20 ffc041fc: 7c ab a5 aa stswi r5,r11,20 return 0; } ffc04200: 39 61 00 38 addi r11,r1,56 ffc04204: 48 01 04 64 b ffc14668 <_restgpr_29_x> =============================================================================== ffc0b590 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { ffc0b590: 94 21 ff d8 stwu r1,-40(r1) ffc0b594: 7c 08 02 a6 mflr r0 ffc0b598: 90 01 00 2c stw r0,44(r1) int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) ffc0b59c: 54 a0 00 39 rlwinm. r0,r5,0,0,28 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { ffc0b5a0: bf 21 00 0c stmw r25,12(r1) ffc0b5a4: 7c 7e 1b 78 mr r30,r3 ffc0b5a8: 7c 9f 23 78 mr r31,r4 ffc0b5ac: 7c dd 33 78 mr r29,r6 int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) ffc0b5b0: 41 a2 00 10 beq+ ffc0b5c0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); ffc0b5b4: 48 00 1d 15 bl ffc0d2c8 <__errno> <== NOT EXECUTED ffc0b5b8: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0b5bc: 48 00 00 a0 b ffc0b65c <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; ffc0b5c0: 83 86 00 00 lwz r28,0(r6) if (!device_name_table) ffc0b5c4: 3b 60 00 00 li r27,0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { ffc0b5c8: 3f 20 00 00 lis r25,0 if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) ffc0b5cc: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0b5d0: 40 be 00 78 bne+ cr7,ffc0b648 rtems_set_errno_and_return_minus_one( EFAULT ); ffc0b5d4: 48 00 1c f5 bl ffc0d2c8 <__errno> ffc0b5d8: 38 00 00 0e li r0,14 ffc0b5dc: 48 00 00 80 b ffc0b65c for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) ffc0b5e0: 83 5c 00 00 lwz r26,0(r28) ffc0b5e4: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0b5e8: 41 9e 00 58 beq- cr7,ffc0b640 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) ffc0b5ec: 7f c3 f3 78 mr r3,r30 ffc0b5f0: 7f 44 d3 78 mr r4,r26 ffc0b5f4: 7f e5 fb 78 mr r5,r31 ffc0b5f8: 48 00 2e 05 bl ffc0e3fc ffc0b5fc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b600: 40 9e 00 40 bne- cr7,ffc0b640 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') ffc0b604: 7c 1a f8 ae lbzx r0,r26,r31 ffc0b608: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b60c: 40 be 00 34 bne+ cr7,ffc0b640 <== NEVER TAKEN continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; ffc0b610: 3d 20 00 00 lis r9,0 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; ffc0b614: 93 9d 00 00 stw r28,0(r29) pathloc->handlers = &devFS_file_handlers; ffc0b618: 38 09 21 6c addi r0,r9,8556 pathloc->ops = &devFS_ops; ffc0b61c: 3d 20 00 00 lis r9,0 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; ffc0b620: 90 1d 00 08 stw r0,8(r29) pathloc->ops = &devFS_ops; ffc0b624: 38 09 21 a4 addi r0,r9,8612 pathloc->mt_entry = rtems_filesystem_root.mt_entry; ffc0b628: 3d 20 00 00 lis r9,0 continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; ffc0b62c: 90 1d 00 0c stw r0,12(r29) pathloc->mt_entry = rtems_filesystem_root.mt_entry; ffc0b630: 81 29 27 64 lwz r9,10084(r9) ffc0b634: 80 09 00 28 lwz r0,40(r9) ffc0b638: 90 1d 00 10 stw r0,16(r29) return 0; ffc0b63c: 48 00 00 28 b ffc0b664 /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { ffc0b640: 3b 7b 00 01 addi r27,r27,1 ffc0b644: 3b 9c 00 14 addi r28,r28,20 ffc0b648: 80 19 27 10 lwz r0,10000(r25) ffc0b64c: 7f 9b 00 40 cmplw cr7,r27,r0 ffc0b650: 41 9c ff 90 blt+ cr7,ffc0b5e0 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); ffc0b654: 48 00 1c 75 bl ffc0d2c8 <__errno> ffc0b658: 38 00 00 02 li r0,2 ffc0b65c: 90 03 00 00 stw r0,0(r3) ffc0b660: 38 60 ff ff li r3,-1 } ffc0b664: 39 61 00 28 addi r11,r1,40 ffc0b668: 48 00 63 24 b ffc1198c <_restgpr_25_x> =============================================================================== ffc0389c : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { ffc0389c: 94 21 ff d8 stwu r1,-40(r1) ffc038a0: 7c 08 02 a6 mflr r0 ffc038a4: bf 01 00 08 stmw r24,8(r1) ffc038a8: 7c 7f 1b 78 mr r31,r3 ffc038ac: 7c 9e 23 78 mr r30,r4 ffc038b0: 90 01 00 2c stw r0,44(r1) ffc038b4: 7c bd 2b 78 mr r29,r5 ffc038b8: 7c dc 33 78 mr r28,r6 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && ffc038bc: 88 03 00 00 lbz r0,0(r3) ffc038c0: 2f 80 00 64 cmpwi cr7,r0,100 ffc038c4: 40 be 00 2c bne+ cr7,ffc038f0 ffc038c8: 88 03 00 01 lbz r0,1(r3) ffc038cc: 2f 80 00 65 cmpwi cr7,r0,101 ffc038d0: 40 be 00 20 bne+ cr7,ffc038f0 <== NEVER TAKEN ffc038d4: 88 03 00 02 lbz r0,2(r3) ffc038d8: 2f 80 00 76 cmpwi cr7,r0,118 ffc038dc: 40 be 00 14 bne+ cr7,ffc038f0 <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) ffc038e0: 88 03 00 03 lbz r0,3(r3) return 0; ffc038e4: 38 60 00 00 li r3,0 * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && (path[2] == 'v') && (path[3] == '\0')) ffc038e8: 2f 80 00 00 cmpwi cr7,r0,0 ffc038ec: 41 9e 00 e4 beq- cr7,ffc039d0 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) ffc038f0: 57 c0 04 26 rlwinm r0,r30,0,16,19 ffc038f4: 2f 80 60 00 cmpwi cr7,r0,24576 ffc038f8: 41 9e 00 18 beq- cr7,ffc03910 ffc038fc: 2f 80 20 00 cmpwi cr7,r0,8192 ffc03900: 41 be 00 10 beq+ cr7,ffc03910 rtems_set_errno_and_return_minus_one( EINVAL ); ffc03904: 48 00 99 c5 bl ffc0d2c8 <__errno> ffc03908: 38 00 00 16 li r0,22 ffc0390c: 48 00 00 28 b ffc03934 else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; ffc03910: 83 47 00 00 lwz r26,0(r7) if (!device_name_table) ffc03914: 2f 9a 00 00 cmpwi cr7,r26,0 ffc03918: 41 9e 00 14 beq- cr7,ffc0392c ffc0391c: 3b 20 ff ff li r25,-1 ffc03920: 3b 60 00 00 li r27,0 rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ ffc03924: 3f 00 00 00 lis r24,0 ffc03928: 48 00 00 4c b ffc03974 rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); ffc0392c: 48 00 99 9d bl ffc0d2c8 <__errno> ffc03930: 38 00 00 0e li r0,14 ffc03934: 90 03 00 00 stw r0,0(r3) ffc03938: 38 60 ff ff li r3,-1 ffc0393c: 48 00 00 94 b ffc039d0 #include #include #include "devfs.h" int devFS_mknod( ffc03940: 1c 1b 00 14 mulli r0,r27,20 device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) ffc03944: 7c 9a 00 2e lwzx r4,r26,r0 ffc03948: 2f 84 00 00 cmpwi cr7,r4,0 ffc0394c: 41 9e 00 20 beq- cr7,ffc0396c slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) ffc03950: 7f e3 fb 78 mr r3,r31 ffc03954: 48 00 a9 51 bl ffc0e2a4 ffc03958: 2f 83 00 00 cmpwi cr7,r3,0 ffc0395c: 40 be 00 14 bne+ cr7,ffc03970 rtems_set_errno_and_return_minus_one( EEXIST ); ffc03960: 48 00 99 69 bl ffc0d2c8 <__errno> ffc03964: 38 00 00 11 li r0,17 ffc03968: 4b ff ff cc b ffc03934 if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; ffc0396c: 7f 79 db 78 mr r25,r27 /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ ffc03970: 3b 7b 00 01 addi r27,r27,1 ffc03974: 80 18 27 10 lwz r0,10000(r24) ffc03978: 7f 9b 00 40 cmplw cr7,r27,r0 ffc0397c: 41 9c ff c4 blt+ cr7,ffc03940 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) ffc03980: 2f 99 ff ff cmpwi cr7,r25,-1 ffc03984: 40 be 00 10 bne+ cr7,ffc03994 rtems_set_errno_and_return_minus_one( ENOMEM ); ffc03988: 48 00 99 41 bl ffc0d2c8 <__errno> ffc0398c: 38 00 00 0c li r0,12 ffc03990: 4b ff ff a4 b ffc03934 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc03994: 7f 00 00 a6 mfmsr r24 ffc03998: 7c 10 42 a6 mfsprg r0,0 ffc0399c: 7f 00 00 78 andc r0,r24,r0 ffc039a0: 7c 00 01 24 mtmsr r0 _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; ffc039a4: 1f 39 00 14 mulli r25,r25,20 ffc039a8: 7f fa c9 2e stwx r31,r26,r25 device_name_table[slot].device_name_length = strlen(path); ffc039ac: 7f e3 fb 78 mr r3,r31 if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; ffc039b0: 7f 7a ca 14 add r27,r26,r25 device_name_table[slot].device_name_length = strlen(path); ffc039b4: 48 00 a9 a5 bl ffc0e358 device_name_table[slot].major = major; ffc039b8: 93 bb 00 08 stw r29,8(r27) if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); ffc039bc: 90 7b 00 04 stw r3,4(r27) device_name_table[slot].major = major; device_name_table[slot].minor = minor; ffc039c0: 93 9b 00 0c stw r28,12(r27) device_name_table[slot].mode = mode; ffc039c4: 93 db 00 10 stw r30,16(r27) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc039c8: 7f 00 01 24 mtmsr r24 _ISR_Enable(level); return 0; ffc039cc: 38 60 00 00 li r3,0 } ffc039d0: 39 61 00 28 addi r11,r1,40 ffc039d4: 48 00 df b4 b ffc11988 <_restgpr_24_x> =============================================================================== ffc05170 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { ffc05170: 94 21 ff f0 stwu r1,-16(r1) ffc05174: 7c 08 02 a6 mflr r0 ffc05178: 90 01 00 14 stw r0,20(r1) rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { ffc0517c: 80 03 00 b4 lwz r0,180(r3) /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { ffc05180: bf c1 00 08 stmw r30,8(r1) ffc05184: 7c 7f 1b 78 mr r31,r3 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { ffc05188: 2f 80 00 00 cmpwi cr7,r0,0 ffc0518c: 41 be 00 4c beq+ cr7,ffc051d8 rtems_interrupt_disable (level); ffc05190: 4b ff ff cd bl ffc0515c while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; ffc05194: 3b c0 00 02 li r30,2 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) { ffc05198: 48 00 00 2c b ffc051c4 tty->rawOutBufState = rob_wait; ffc0519c: 93 df 00 94 stw r30,148(r31) <== NOT EXECUTED static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc051a0: 7c 60 01 24 mtmsr r3 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( ffc051a4: 80 7f 00 8c lwz r3,140(r31) <== NOT EXECUTED ffc051a8: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc051ac: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc051b0: 48 00 26 69 bl ffc07818 <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) ffc051b4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc051b8: 41 be 00 08 beq+ cr7,ffc051c0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); ffc051bc: 48 00 2d d9 bl ffc07f94 <== NOT EXECUTED rtems_interrupt_disable (level); ffc051c0: 4b ff ff 9d bl ffc0515c <== 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) { ffc051c4: 81 3f 00 84 lwz r9,132(r31) ffc051c8: 80 1f 00 80 lwz r0,128(r31) ffc051cc: 7f 89 00 00 cmpw cr7,r9,r0 ffc051d0: 40 9e ff cc bne+ cr7,ffc0519c <== NEVER TAKEN ffc051d4: 7c 60 01 24 mtmsr r3 rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); } } ffc051d8: 39 61 00 10 addi r11,r1,16 ffc051dc: 48 00 f0 10 b ffc141ec <_restgpr_30_x> =============================================================================== ffc05e4c : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { ffc05e4c: 7c 08 02 a6 mflr r0 ffc05e50: 7c 2b 0b 78 mr r11,r1 ffc05e54: 94 21 ff e0 stwu r1,-32(r1) ffc05e58: 90 01 00 24 stw r0,36(r1) ffc05e5c: 48 00 e3 49 bl ffc141a4 <_savegpr_31> ffc05e60: 7c 9f 23 78 mr r31,r4 if ((tty->termios.c_lflag & ECHOCTL) && ffc05e64: 80 04 00 3c lwz r0,60(r4) ffc05e68: 70 09 02 00 andi. r9,r0,512 ffc05e6c: 41 82 00 5c beq- ffc05ec8 <== NEVER TAKEN iscntrl(c) && (c != '\t') && (c != '\n')) { ffc05e70: 3d 20 00 00 lis r9,0 ffc05e74: 81 29 26 ec lwz r9,9964(r9) ffc05e78: 7d 29 1a 14 add r9,r9,r3 ffc05e7c: 88 09 00 01 lbz r0,1(r9) * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && ffc05e80: 70 09 00 20 andi. r9,r0,32 ffc05e84: 41 82 00 44 beq- ffc05ec8 iscntrl(c) && (c != '\t') && (c != '\n')) { ffc05e88: 2f 83 00 09 cmpwi cr7,r3,9 ffc05e8c: 41 9e 00 3c beq- cr7,ffc05ec8 ffc05e90: 2f 83 00 0a cmpwi cr7,r3,10 ffc05e94: 41 be 00 34 beq+ cr7,ffc05ec8 char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; ffc05e98: 68 63 00 40 xori r3,r3,64 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; ffc05e9c: 38 00 00 5e li r0,94 echobuf[1] = c ^ 0x40; ffc05ea0: 98 61 00 09 stb r3,9(r1) rtems_termios_puts (echobuf, 2, tty); ffc05ea4: 38 80 00 02 li r4,2 ffc05ea8: 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] = '^'; ffc05eac: 98 01 00 08 stb r0,8(r1) echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); ffc05eb0: 7f e5 fb 78 mr r5,r31 ffc05eb4: 4b ff fd 05 bl ffc05bb8 tty->column += 2; ffc05eb8: 81 3f 00 28 lwz r9,40(r31) ffc05ebc: 38 09 00 02 addi r0,r9,2 ffc05ec0: 90 1f 00 28 stw r0,40(r31) */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { ffc05ec4: 48 00 00 0c b ffc05ed0 echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); ffc05ec8: 7f e4 fb 78 mr r4,r31 ffc05ecc: 4b ff fe 15 bl ffc05ce0 } } ffc05ed0: 39 61 00 20 addi r11,r1,32 ffc05ed4: 48 00 e3 1c b ffc141f0 <_restgpr_31_x> =============================================================================== ffc0540c : void endgrent(void) { if (group_fp != NULL) ffc0540c: 3d 20 00 00 lis r9,0 fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { ffc05410: 94 21 ff f8 stwu r1,-8(r1) ffc05414: 7c 08 02 a6 mflr r0 if (group_fp != NULL) ffc05418: 80 69 29 dc lwz r3,10716(r9) fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { ffc0541c: 90 01 00 0c stw r0,12(r1) if (group_fp != NULL) ffc05420: 2f 83 00 00 cmpwi cr7,r3,0 ffc05424: 41 9e 00 08 beq- cr7,ffc0542c <== NEVER TAKEN fclose(group_fp); ffc05428: 48 00 b2 35 bl ffc1065c } ffc0542c: 80 01 00 0c lwz r0,12(r1) ffc05430: 38 21 00 08 addi r1,r1,8 ffc05434: 7c 08 03 a6 mtlr r0 ffc05438: 4e 80 00 20 blr =============================================================================== ffc0524c : void endpwent(void) { if (passwd_fp != NULL) ffc0524c: 3d 20 00 00 lis r9,0 fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { ffc05250: 94 21 ff f8 stwu r1,-8(r1) ffc05254: 7c 08 02 a6 mflr r0 if (passwd_fp != NULL) ffc05258: 80 69 29 00 lwz r3,10496(r9) fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { ffc0525c: 90 01 00 0c stw r0,12(r1) if (passwd_fp != NULL) ffc05260: 2f 83 00 00 cmpwi cr7,r3,0 ffc05264: 41 9e 00 08 beq- cr7,ffc0526c <== NEVER TAKEN fclose(passwd_fp); ffc05268: 48 00 b3 f5 bl ffc1065c } ffc0526c: 80 01 00 0c lwz r0,12(r1) ffc05270: 38 21 00 08 addi r1,r1,8 ffc05274: 7c 08 03 a6 mtlr r0 ffc05278: 4e 80 00 20 blr =============================================================================== ffc05ed8 : * 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) { ffc05ed8: 94 21 ff e0 stwu r1,-32(r1) ffc05edc: 7c 08 02 a6 mflr r0 ffc05ee0: 7d 80 00 26 mfcr r12 ffc05ee4: 90 01 00 24 stw r0,36(r1) if (tty->ccount == 0) ffc05ee8: 80 03 00 20 lwz r0,32(r3) * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { ffc05eec: bf 61 00 0c stmw r27,12(r1) ffc05ef0: 7c 7f 1b 78 mr r31,r3 if (tty->ccount == 0) ffc05ef4: 2f 80 00 00 cmpwi cr7,r0,0 * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { ffc05ef8: 91 81 00 08 stw r12,8(r1) if (tty->ccount == 0) ffc05efc: 41 9e 01 d8 beq- cr7,ffc060d4 return; if (lineFlag) { ffc05f00: 2f 84 00 00 cmpwi cr7,r4,0 ffc05f04: 41 9e 01 ac beq- cr7,ffc060b0 if (!(tty->termios.c_lflag & ECHO)) { ffc05f08: 80 03 00 3c lwz r0,60(r3) ffc05f0c: 70 09 00 08 andi. r9,r0,8 ffc05f10: 40 a2 00 0c bne+ ffc05f1c <== ALWAYS TAKEN tty->ccount = 0; ffc05f14: 91 23 00 20 stw r9,32(r3) <== NOT EXECUTED return; ffc05f18: 48 00 01 bc b ffc060d4 <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { ffc05f1c: 70 00 00 10 andi. r0,r0,16 ffc05f20: 40 a2 01 90 bne+ ffc060b0 <== ALWAYS TAKEN tty->ccount = 0; ffc05f24: 90 03 00 20 stw r0,32(r3) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); ffc05f28: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc05f2c: 88 63 00 44 lbz r3,68(r3) <== NOT EXECUTED ffc05f30: 4b ff ff 1d bl ffc05e4c <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) ffc05f34: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED echo ('\n', tty); ffc05f38: 38 60 00 0a li r3,10 <== NOT EXECUTED return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) ffc05f3c: 70 07 00 20 andi. r7,r0,32 <== NOT EXECUTED ffc05f40: 41 a2 01 94 beq+ ffc060d4 <== NOT EXECUTED ffc05f44: 48 00 00 30 b ffc05f74 <== NOT EXECUTED } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { ffc05f48: 80 1f 00 3c lwz r0,60(r31) return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; ffc05f4c: 39 29 ff ff addi r9,r9,-1 ffc05f50: 81 5f 00 1c lwz r10,28(r31) if (tty->termios.c_lflag & ECHO) { ffc05f54: 70 0b 00 08 andi. r11,r0,8 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; ffc05f58: 91 3f 00 20 stw r9,32(r31) ffc05f5c: 7f ca 48 ae lbzx r30,r10,r9 if (tty->termios.c_lflag & ECHO) { ffc05f60: 41 82 01 48 beq- ffc060a8 <== NEVER TAKEN if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { ffc05f64: 40 92 00 30 bne- cr4,ffc05f94 ffc05f68: 70 07 00 10 andi. r7,r0,16 ffc05f6c: 40 a2 00 28 bne+ ffc05f94 <== ALWAYS TAKEN echo (tty->termios.c_cc[VERASE], tty); ffc05f70: 88 7f 00 43 lbz r3,67(r31) <== NOT EXECUTED } } if (!lineFlag) break; } } ffc05f74: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); ffc05f78: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED } } if (!lineFlag) break; } } ffc05f7c: 81 81 00 08 lwz r12,8(r1) <== NOT EXECUTED ffc05f80: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05f84: bb 61 00 0c lmw r27,12(r1) <== NOT EXECUTED ffc05f88: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc05f8c: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); ffc05f90: 4b ff fe bc b ffc05e4c <== NOT EXECUTED } else if (c == '\t') { ffc05f94: 2f 9e 00 09 cmpwi cr7,r30,9 ffc05f98: 40 be 00 90 bne+ cr7,ffc06028 while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) ffc05f9c: 39 29 00 01 addi r9,r9,1 if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; ffc05fa0: 83 df 00 2c lwz r30,44(r31) */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { ffc05fa4: 81 1d 26 ec lwz r8,9964(r29) if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; int i = 0; ffc05fa8: 39 60 00 00 li r11,0 while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) ffc05fac: 70 07 02 00 andi. r7,r0,512 ffc05fb0: 7d 29 03 a6 mtctr r9 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc05fb4: 48 00 00 40 b ffc05ff4 c = tty->cbuf[i++]; ffc05fb8: 7c 0a 58 ae lbzx r0,r10,r11 ffc05fbc: 39 6b 00 01 addi r11,r11,1 if (c == '\t') { ffc05fc0: 2f 80 00 09 cmpwi cr7,r0,9 ffc05fc4: 40 be 00 0c bne+ cr7,ffc05fd0 col = (col | 7) + 1; ffc05fc8: 63 de 00 07 ori r30,r30,7 ffc05fcc: 48 00 00 24 b ffc05ff0 } else if (iscntrl (c)) { ffc05fd0: 7d 28 02 14 add r9,r8,r0 ffc05fd4: 88 09 00 01 lbz r0,1(r9) ffc05fd8: 54 09 df fe rlwinm r9,r0,27,31,31 ffc05fdc: 2f 89 00 00 cmpwi cr7,r9,0 ffc05fe0: 41 9e 00 10 beq- cr7,ffc05ff0 <== ALWAYS TAKEN if (tty->termios.c_lflag & ECHOCTL) ffc05fe4: 41 82 00 10 beq- ffc05ff4 <== NOT EXECUTED col += 2; ffc05fe8: 3b de 00 02 addi r30,r30,2 <== NOT EXECUTED ffc05fec: 48 00 00 08 b ffc05ff4 <== NOT EXECUTED } else { col++; ffc05ff0: 3b de 00 01 addi r30,r30,1 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc05ff4: 42 00 ff c4 bdnz+ ffc05fb8 ffc05ff8: 48 00 00 20 b ffc06018 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); ffc05ffc: 7f 63 db 78 mr r3,r27 ffc06000: 38 80 00 01 li r4,1 ffc06004: 7f e5 fb 78 mr r5,r31 ffc06008: 4b ff fb b1 bl ffc05bb8 tty->column--; ffc0600c: 81 3f 00 28 lwz r9,40(r31) ffc06010: 38 09 ff ff addi r0,r9,-1 ffc06014: 90 1f 00 28 stw r0,40(r31) } /* * Back up over the tab */ while (tty->column > col) { ffc06018: 80 1f 00 28 lwz r0,40(r31) ffc0601c: 7f 80 f0 00 cmpw cr7,r0,r30 ffc06020: 41 9d ff dc bgt+ cr7,ffc05ffc ffc06024: 48 00 00 84 b ffc060a8 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { ffc06028: 81 3d 26 ec lwz r9,9964(r29) ffc0602c: 3b de 00 01 addi r30,r30,1 ffc06030: 7d 29 f0 ae lbzx r9,r9,r30 ffc06034: 71 2b 00 20 andi. r11,r9,32 ffc06038: 41 82 00 30 beq- ffc06068 <== ALWAYS TAKEN ffc0603c: 70 07 02 00 andi. r7,r0,512 <== NOT EXECUTED ffc06040: 41 a2 00 28 beq+ ffc06068 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); ffc06044: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc06048: 38 80 00 03 li r4,3 <== NOT EXECUTED ffc0604c: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED ffc06050: 4b ff fb 69 bl ffc05bb8 <== NOT EXECUTED if (tty->column) ffc06054: 81 3f 00 28 lwz r9,40(r31) <== NOT EXECUTED ffc06058: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc0605c: 41 9e 00 0c beq- cr7,ffc06068 <== NOT EXECUTED tty->column--; ffc06060: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED ffc06064: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { ffc06068: 81 3d 26 ec lwz r9,9964(r29) ffc0606c: 7c 09 f0 ae lbzx r0,r9,r30 ffc06070: 70 09 00 20 andi. r9,r0,32 ffc06074: 41 82 00 10 beq- ffc06084 <== ALWAYS TAKEN ffc06078: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED ffc0607c: 70 0b 02 00 andi. r11,r0,512 <== NOT EXECUTED ffc06080: 41 82 00 28 beq- ffc060a8 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); ffc06084: 7f 83 e3 78 mr r3,r28 ffc06088: 38 80 00 03 li r4,3 ffc0608c: 7f e5 fb 78 mr r5,r31 ffc06090: 4b ff fb 29 bl ffc05bb8 if (tty->column) ffc06094: 81 3f 00 28 lwz r9,40(r31) ffc06098: 2f 89 00 00 cmpwi cr7,r9,0 ffc0609c: 41 9e 00 0c beq- cr7,ffc060a8 <== NEVER TAKEN tty->column--; ffc060a0: 39 29 ff ff addi r9,r9,-1 ffc060a4: 91 3f 00 28 stw r9,40(r31) } } } if (!lineFlag) ffc060a8: 40 b2 00 20 bne+ cr4,ffc060c8 ffc060ac: 48 00 00 28 b ffc060d4 while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { ffc060b0: 2e 04 00 00 cmpwi cr4,r4,0 rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); ffc060b4: 3f 80 ff c1 lis r28,-63 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); ffc060b8: 3f 60 ff c1 lis r27,-63 ffc060bc: 3f a0 00 00 lis r29,0 rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); ffc060c0: 3b 9c 5e 94 addi r28,r28,24212 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); ffc060c4: 3b 7b 5e 96 addi r27,r27,24214 echo ('\n', tty); return; } } while (tty->ccount) { ffc060c8: 81 3f 00 20 lwz r9,32(r31) ffc060cc: 2f 89 00 00 cmpwi cr7,r9,0 ffc060d0: 40 9e fe 78 bne+ cr7,ffc05f48 } } if (!lineFlag) break; } } ffc060d4: 81 81 00 08 lwz r12,8(r1) ffc060d8: 39 61 00 20 addi r11,r1,32 ffc060dc: 7d 80 81 20 mtcrf 8,r12 ffc060e0: 48 00 e1 00 b ffc141e0 <_restgpr_27_x> =============================================================================== ffc04d38 : int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc04d38: 3d 20 00 00 lis r9,0 int fcntl( int fd, int cmd, ... ) { ffc04d3c: 94 21 ff c8 stwu r1,-56(r1) ffc04d40: 7c 08 02 a6 mflr r0 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc04d44: 81 09 26 8c lwz r8,9868(r9) int fcntl( int fd, int cmd, ... ) { ffc04d48: 90 01 00 3c stw r0,60(r1) int ret; va_list ap; va_start( ap, cmd ); ffc04d4c: 38 00 00 02 li r0,2 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc04d50: 7f 83 40 40 cmplw cr7,r3,r8 ... ) { int ret; va_list ap; va_start( ap, cmd ); ffc04d54: 98 01 00 08 stb r0,8(r1) ffc04d58: 38 01 00 40 addi r0,r1,64 ffc04d5c: 90 01 00 0c stw r0,12(r1) ffc04d60: 38 01 00 10 addi r0,r1,16 int fcntl( int fd, int cmd, ... ) { ffc04d64: bf a1 00 2c stmw r29,44(r1) ffc04d68: 7c 9e 23 78 mr r30,r4 ffc04d6c: 90 a1 00 18 stw r5,24(r1) ffc04d70: 90 c1 00 1c stw r6,28(r1) ffc04d74: 90 e1 00 20 stw r7,32(r1) int ret; va_list ap; va_start( ap, cmd ); ffc04d78: 90 01 00 10 stw r0,16(r1) int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc04d7c: 40 9c 00 20 bge- cr7,ffc04d9c iop = rtems_libio_iop( fd ); ffc04d80: 3d 20 00 00 lis r9,0 ffc04d84: 81 49 27 48 lwz r10,10056(r9) ffc04d88: 54 7f 30 32 rlwinm r31,r3,6,0,25 ffc04d8c: 7f ea fa 14 add r31,r10,r31 rtems_libio_check_is_open(iop); ffc04d90: 80 7f 00 18 lwz r3,24(r31) ffc04d94: 70 60 01 00 andi. r0,r3,256 ffc04d98: 40 a2 00 10 bne+ ffc04da8 ffc04d9c: 48 00 b8 d1 bl ffc1066c <__errno> ffc04da0: 38 00 00 09 li r0,9 ffc04da4: 48 00 01 80 b ffc04f24 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { ffc04da8: 2b 84 00 09 cmplwi cr7,r4,9 ffc04dac: 41 9d 01 70 bgt- cr7,ffc04f1c ffc04db0: 3d 20 ff c1 lis r9,-63 ffc04db4: 39 29 7e b4 addi r9,r9,32436 ffc04db8: 54 80 10 3a rlwinm r0,r4,2,0,29 ffc04dbc: 7c 09 00 2e lwzx r0,r9,r0 ffc04dc0: 7d 20 4a 14 add r9,r0,r9 ffc04dc4: 7d 29 03 a6 mtctr r9 ffc04dc8: 4e 80 04 20 bctr case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); ffc04dcc: 89 61 00 08 lbz r11,8(r1) ffc04dd0: 2b 8b 00 07 cmplwi cr7,r11,7 ffc04dd4: 41 9d 00 1c bgt- cr7,ffc04df0 <== NEVER TAKEN ffc04dd8: 81 21 00 10 lwz r9,16(r1) ffc04ddc: 55 60 10 3a rlwinm r0,r11,2,0,29 ffc04de0: 39 6b 00 01 addi r11,r11,1 ffc04de4: 7d 29 02 14 add r9,r9,r0 ffc04de8: 99 61 00 08 stb r11,8(r1) ffc04dec: 48 00 00 10 b ffc04dfc ffc04df0: 81 21 00 0c lwz r9,12(r1) <== NOT EXECUTED ffc04df4: 38 09 00 04 addi r0,r9,4 <== NOT EXECUTED ffc04df8: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc04dfc: 80 09 00 00 lwz r0,0(r9) if ( fd2 ) ffc04e00: 2f 80 00 00 cmpwi cr7,r0,0 ffc04e04: 41 9e 00 1c beq- cr7,ffc04e20 diop = rtems_libio_iop( fd2 ); ffc04e08: 7f 80 40 40 cmplw cr7,r0,r8 ffc04e0c: 38 60 00 00 li r3,0 ffc04e10: 40 9c 00 1c bge- cr7,ffc04e2c <== NEVER TAKEN ffc04e14: 54 03 30 32 rlwinm r3,r0,6,0,25 ffc04e18: 7c 6a 1a 14 add r3,r10,r3 ffc04e1c: 48 00 00 10 b ffc04e2c else { /* allocate a file control block */ diop = rtems_libio_allocate(); ffc04e20: 48 00 07 01 bl ffc05520 if ( diop == 0 ) { ffc04e24: 2c 03 00 00 cmpwi r3,0 ffc04e28: 41 82 01 34 beq- ffc04f5c <== NEVER TAKEN break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc04e2c: 39 63 00 1c addi r11,r3,28 ret = -1; break; } } diop->flags = iop->flags; ffc04e30: 80 1f 00 18 lwz r0,24(r31) diop->pathinfo = iop->pathinfo; ffc04e34: 38 9f 00 1c addi r4,r31,28 ffc04e38: 7c a4 a4 aa lswi r5,r4,20 ffc04e3c: 7c ab a5 aa stswi r5,r11,20 ret = (int) (diop - rtems_libio_iops); ffc04e40: 3d 20 00 00 lis r9,0 ffc04e44: 83 a9 27 48 lwz r29,10056(r9) ret = -1; break; } } diop->flags = iop->flags; ffc04e48: 90 03 00 18 stw r0,24(r3) diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); ffc04e4c: 7c 7d 18 50 subf r3,r29,r3 ffc04e50: 7c 7d 36 70 srawi r29,r3,6 ffc04e54: 48 00 00 d8 b ffc04f2c break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); ffc04e58: 54 7d af fe rlwinm r29,r3,21,31,31 ffc04e5c: 48 00 00 d8 b ffc04f34 * 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 ) ) ffc04e60: 89 61 00 08 lbz r11,8(r1) ffc04e64: 2b 8b 00 07 cmplwi cr7,r11,7 ffc04e68: 41 9d 00 1c bgt- cr7,ffc04e84 <== NEVER TAKEN ffc04e6c: 81 21 00 10 lwz r9,16(r1) ffc04e70: 55 60 10 3a rlwinm r0,r11,2,0,29 ffc04e74: 39 6b 00 01 addi r11,r11,1 ffc04e78: 7d 29 02 14 add r9,r9,r0 ffc04e7c: 99 61 00 08 stb r11,8(r1) ffc04e80: 48 00 00 10 b ffc04e90 ffc04e84: 81 21 00 0c lwz r9,12(r1) <== NOT EXECUTED ffc04e88: 38 09 00 04 addi r0,r9,4 <== NOT EXECUTED ffc04e8c: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc04e90: 80 09 00 00 lwz r0,0(r9) ffc04e94: 2f 80 00 00 cmpwi cr7,r0,0 ffc04e98: 41 9e 00 0c beq- cr7,ffc04ea4 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; ffc04e9c: 60 63 08 00 ori r3,r3,2048 ffc04ea0: 48 00 00 64 b ffc04f04 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; ffc04ea4: 54 63 05 66 rlwinm r3,r3,0,21,19 ffc04ea8: 48 00 00 5c b ffc04f04 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); ffc04eac: 48 00 06 29 bl ffc054d4 ffc04eb0: 7c 7d 1b 78 mr r29,r3 ffc04eb4: 48 00 00 78 b ffc04f2c break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); ffc04eb8: 89 61 00 08 lbz r11,8(r1) ffc04ebc: 2b 8b 00 07 cmplwi cr7,r11,7 ffc04ec0: 41 9d 00 1c bgt- cr7,ffc04edc <== NEVER TAKEN ffc04ec4: 81 21 00 10 lwz r9,16(r1) ffc04ec8: 55 60 10 3a rlwinm r0,r11,2,0,29 ffc04ecc: 39 6b 00 01 addi r11,r11,1 ffc04ed0: 7d 29 02 14 add r9,r9,r0 ffc04ed4: 99 61 00 08 stb r11,8(r1) ffc04ed8: 48 00 00 10 b ffc04ee8 ffc04edc: 81 21 00 0c lwz r9,12(r1) <== NOT EXECUTED ffc04ee0: 38 09 00 04 addi r0,r9,4 <== NOT EXECUTED ffc04ee4: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc04ee8: 80 69 00 00 lwz r3,0(r9) ffc04eec: 48 00 05 a5 bl ffc05490 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); ffc04ef0: 80 1f 00 18 lwz r0,24(r31) ffc04ef4: 70 63 02 01 andi. r3,r3,513 ffc04ef8: 39 20 fd fe li r9,-514 ffc04efc: 7d 20 00 38 and r0,r9,r0 ffc04f00: 7c 63 03 78 or r3,r3,r0 ffc04f04: 90 7f 00 18 stw r3,24(r31) rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; ffc04f08: 3b a0 00 00 li r29,0 ffc04f0c: 48 00 00 28 b ffc04f34 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; ffc04f10: 48 00 b7 5d bl ffc1066c <__errno> ffc04f14: 38 00 00 86 li r0,134 ffc04f18: 48 00 00 0c b ffc04f24 ret = -1; break; default: errno = EINVAL; ffc04f1c: 48 00 b7 51 bl ffc1066c <__errno> ffc04f20: 38 00 00 16 li r0,22 ffc04f24: 90 03 00 00 stw r0,0(r3) ffc04f28: 48 00 00 34 b ffc04f5c /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { ffc04f2c: 2f 9d 00 00 cmpwi cr7,r29,0 ffc04f30: 41 9c 00 30 blt- cr7,ffc04f60 <== NEVER TAKEN int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); ffc04f34: 81 3f 00 24 lwz r9,36(r31) ffc04f38: 7f e4 fb 78 mr r4,r31 ffc04f3c: 7f c3 f3 78 mr r3,r30 ffc04f40: 80 09 00 30 lwz r0,48(r9) ffc04f44: 7c 09 03 a6 mtctr r0 ffc04f48: 4e 80 04 21 bctrl if (err) { ffc04f4c: 7c 7f 1b 79 mr. r31,r3 ffc04f50: 41 a2 00 10 beq+ ffc04f60 <== ALWAYS TAKEN errno = err; ffc04f54: 48 00 b7 19 bl ffc1066c <__errno> <== NOT EXECUTED ffc04f58: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED ret = -1; ffc04f5c: 3b a0 ff ff li r29,-1 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } ffc04f60: 39 61 00 38 addi r11,r1,56 ffc04f64: 7f a3 eb 78 mr r3,r29 ffc04f68: 4b ff bd b8 b ffc00d20 <_restgpr_29_x> =============================================================================== ffc0e798 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc0e798: 94 21 ff d0 stwu r1,-48(r1) ffc0e79c: 7c 08 02 a6 mflr r0 ffc0e7a0: bf 41 00 18 stmw r26,24(r1) static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { ffc0e7a4: 3f c0 00 00 lis r30,0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc0e7a8: 7c 7c 1b 78 mr r28,r3 ffc0e7ac: 90 01 00 34 stw r0,52(r1) ffc0e7b0: 7c 9b 23 78 mr r27,r4 static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { ffc0e7b4: 3b fe 29 40 addi r31,r30,10560 ffc0e7b8: 80 1e 29 40 lwz r0,10560(r30) ffc0e7bc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e7c0: 40 be 00 5c bne+ cr7,ffc0e81c rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); ffc0e7c4: 3d 20 00 00 lis r9,0 ffc0e7c8: 80 69 27 70 lwz r3,10096(r9) ffc0e7cc: 38 80 00 00 li r4,0 ffc0e7d0: 38 a0 00 00 li r5,0 ffc0e7d4: 4b ff b3 45 bl ffc09b18 rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { ffc0e7d8: 80 1e 29 40 lwz r0,10560(r30) free(pipe); } static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; ffc0e7dc: 3b c0 00 00 li r30,0 if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { ffc0e7e0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e7e4: 40 be 00 24 bne+ cr7,ffc0e808 <== NEVER TAKEN sc = rtems_semaphore_create( ffc0e7e8: 3c 60 50 49 lis r3,20553 ffc0e7ec: 60 63 50 45 ori r3,r3,20549 ffc0e7f0: 38 80 00 01 li r4,1 ffc0e7f4: 38 a0 00 54 li r5,84 ffc0e7f8: 38 c0 00 00 li r6,0 ffc0e7fc: 7f e7 fb 78 mr r7,r31 ffc0e800: 4b ff b0 99 bl ffc09898 ffc0e804: 7c 7e 1b 78 mr r30,r3 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc0e808: 3d 20 00 00 lis r9,0 ffc0e80c: 80 69 27 70 lwz r3,10096(r9) ffc0e810: 4b ff b4 31 bl ffc09c40 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { ffc0e814: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0e818: 40 be 00 24 bne+ cr7,ffc0e83c sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc0e81c: 3d 20 00 00 lis r9,0 ffc0e820: 80 69 29 40 lwz r3,10560(r9) ffc0e824: 38 80 00 00 li r4,0 ffc0e828: 38 a0 00 00 li r5,0 ffc0e82c: 4b ff b2 ed bl ffc09b18 } if (sc == RTEMS_SUCCESSFUL) { return 0; ffc0e830: 3b c0 00 00 li r30,0 if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); } if (sc == RTEMS_SUCCESSFUL) { ffc0e834: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e838: 41 be 00 08 beq+ cr7,ffc0e840 <== ALWAYS TAKEN return 0; } else { return -ENOMEM; ffc0e83c: 3b c0 ff f4 li r30,-12 { pipe_control_t *pipe; int err = 0; err = pipe_lock(); if (err) ffc0e840: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0e844: 40 9e 03 18 bne- cr7,ffc0eb5c return err; pipe = *pipep; ffc0e848: 83 fc 00 00 lwz r31,0(r28) if (pipe == NULL) { ffc0e84c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0e850: 40 be 01 00 bne+ cr7,ffc0e950 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); ffc0e854: 38 60 00 34 li r3,52 ffc0e858: 4b ff 7e 99 bl ffc066f0 if (pipe == NULL) ffc0e85c: 2f 83 00 00 cmpwi cr7,r3,0 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); ffc0e860: 7c 7f 1b 78 mr r31,r3 ffc0e864: 7c 7a 1b 78 mr r26,r3 if (pipe == NULL) ffc0e868: 41 9e 00 e0 beq- cr7,ffc0e948 return err; memset(pipe, 0, sizeof(pipe_control_t)); ffc0e86c: 38 80 00 00 li r4,0 ffc0e870: 38 a0 00 34 li r5,52 ffc0e874: 48 00 41 f5 bl ffc12a68 pipe->Size = PIPE_BUF; ffc0e878: 38 00 02 00 li r0,512 ffc0e87c: 90 1f 00 04 stw r0,4(r31) pipe->Buffer = malloc(pipe->Size); ffc0e880: 38 60 02 00 li r3,512 ffc0e884: 4b ff 7e 6d bl ffc066f0 if (! pipe->Buffer) ffc0e888: 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); ffc0e88c: 90 7f 00 00 stw r3,0(r31) if (! pipe->Buffer) ffc0e890: 41 9e 00 b0 beq- cr7,ffc0e940 <== NEVER TAKEN goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), ffc0e894: 3f a0 00 00 lis r29,0 ffc0e898: 88 7d 21 85 lbz r3,8581(r29) if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( ffc0e89c: 38 80 00 00 li r4,0 ffc0e8a0: 38 a0 00 00 li r5,0 ffc0e8a4: 64 63 50 49 oris r3,r3,20553 ffc0e8a8: 60 63 72 00 ori r3,r3,29184 ffc0e8ac: 38 df 00 2c addi r6,r31,44 ffc0e8b0: 48 00 11 25 bl ffc0f9d4 ffc0e8b4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e8b8: 40 9e 00 80 bne- cr7,ffc0e938 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), ffc0e8bc: 88 7d 21 85 lbz r3,8581(r29) 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( ffc0e8c0: 38 80 00 00 li r4,0 ffc0e8c4: 38 a0 00 00 li r5,0 ffc0e8c8: 64 63 50 49 oris r3,r3,20553 ffc0e8cc: 60 63 77 00 ori r3,r3,30464 ffc0e8d0: 38 df 00 30 addi r6,r31,48 ffc0e8d4: 48 00 11 01 bl ffc0f9d4 ffc0e8d8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e8dc: 40 9e 00 54 bne- cr7,ffc0e930 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, ffc0e8e0: 88 7d 21 85 lbz r3,8581(r29) 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( ffc0e8e4: 38 80 00 01 li r4,1 ffc0e8e8: 38 a0 00 10 li r5,16 ffc0e8ec: 64 63 50 49 oris r3,r3,20553 ffc0e8f0: 60 63 73 00 ori r3,r3,29440 ffc0e8f4: 38 c0 00 00 li r6,0 ffc0e8f8: 38 ff 00 28 addi r7,r31,40 ffc0e8fc: 4b ff af 9d bl ffc09898 ffc0e900: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e904: 40 9e 00 24 bne- cr7,ffc0e928 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') ffc0e908: 89 3d 21 85 lbz r9,8581(r29) ffc0e90c: 2f 89 00 7a cmpwi cr7,r9,122 ffc0e910: 38 09 00 01 addi r0,r9,1 ffc0e914: 98 1d 21 85 stb r0,8581(r29) ffc0e918: 40 be 00 38 bne+ cr7,ffc0e950 c = 'a'; ffc0e91c: 38 00 00 61 li r0,97 ffc0e920: 98 1d 21 85 stb r0,8581(r29) ffc0e924: 48 00 00 2c b ffc0e950 return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); ffc0e928: 80 7f 00 30 lwz r3,48(r31) ffc0e92c: 48 00 11 75 bl ffc0faa0 err_wbar: rtems_barrier_delete(pipe->readBarrier); ffc0e930: 80 7a 00 2c lwz r3,44(r26) ffc0e934: 48 00 11 6d bl ffc0faa0 err_rbar: free(pipe->Buffer); ffc0e938: 80 7a 00 00 lwz r3,0(r26) ffc0e93c: 4b ff 75 65 bl ffc05ea0 err_buf: free(pipe); ffc0e940: 7f 43 d3 78 mr r3,r26 ffc0e944: 4b ff 75 5d bl ffc05ea0 if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; ffc0e948: 3b c0 ff f4 li r30,-12 ffc0e94c: 48 00 00 44 b ffc0e990 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) ffc0e950: 80 7f 00 28 lwz r3,40(r31) ffc0e954: 38 80 00 00 li r4,0 ffc0e958: 38 a0 00 00 li r5,0 ffc0e95c: 4b ff b1 bd bl ffc09b18 ffc0e960: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e964: 41 9e 00 08 beq- cr7,ffc0e96c <== ALWAYS TAKEN err = -EINTR; ffc0e968: 3b c0 ff fc li r30,-4 <== NOT EXECUTED if (*pipep == NULL) { ffc0e96c: 80 1c 00 00 lwz r0,0(r28) ffc0e970: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e974: 40 be 00 1c bne+ cr7,ffc0e990 if (err) ffc0e978: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0e97c: 41 be 00 10 beq+ cr7,ffc0e98c <== ALWAYS TAKEN pipe_free(pipe); ffc0e980: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0e984: 4b ff fd 19 bl ffc0e69c <== NOT EXECUTED ffc0e988: 48 00 00 08 b ffc0e990 <== NOT EXECUTED else *pipep = pipe; ffc0e98c: 93 fc 00 00 stw r31,0(r28) } out: pipe_unlock(); ffc0e990: 4b ff fc e5 bl ffc0e674 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) ffc0e994: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0e998: 40 9e 01 c4 bne- cr7,ffc0eb5c return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { ffc0e99c: 80 1b 00 18 lwz r0,24(r27) int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; ffc0e9a0: 83 fc 00 00 lwz r31,0(r28) switch (LIBIO_ACCMODE(iop)) { ffc0e9a4: 54 00 07 7c rlwinm r0,r0,0,29,30 ffc0e9a8: 2f 80 00 04 cmpwi cr7,r0,4 ffc0e9ac: 41 9e 00 a0 beq- cr7,ffc0ea4c ffc0e9b0: 2f 80 00 06 cmpwi cr7,r0,6 ffc0e9b4: 41 9e 01 34 beq- cr7,ffc0eae8 ffc0e9b8: 2f 80 00 02 cmpwi cr7,r0,2 ffc0e9bc: 40 be 01 84 bne+ cr7,ffc0eb40 <== NEVER TAKEN case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc0e9c0: 81 3f 00 20 lwz r9,32(r31) ffc0e9c4: 38 09 00 01 addi r0,r9,1 if (pipe->Readers ++ == 0) ffc0e9c8: 81 3f 00 10 lwz r9,16(r31) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc0e9cc: 90 1f 00 20 stw r0,32(r31) if (pipe->Readers ++ == 0) ffc0e9d0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0e9d4: 38 09 00 01 addi r0,r9,1 ffc0e9d8: 90 1f 00 10 stw r0,16(r31) ffc0e9dc: 40 be 00 10 bne+ cr7,ffc0e9ec <== NEVER TAKEN PIPE_WAKEUPWRITERS(pipe); ffc0e9e0: 80 7f 00 30 lwz r3,48(r31) ffc0e9e4: 38 81 00 08 addi r4,r1,8 ffc0e9e8: 48 00 11 71 bl ffc0fb58 if (pipe->Writers == 0) { ffc0e9ec: 80 1f 00 14 lwz r0,20(r31) ffc0e9f0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e9f4: 40 9e 01 4c bne- cr7,ffc0eb40 /* Not an error */ if (LIBIO_NODELAY(iop)) ffc0e9f8: 80 1b 00 18 lwz r0,24(r27) ffc0e9fc: 70 09 00 01 andi. r9,r0,1 ffc0ea00: 40 82 01 40 bne- ffc0eb40 break; prevCounter = pipe->writerCounter; ffc0ea04: 83 bf 00 24 lwz r29,36(r31) err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); ffc0ea08: 80 7f 00 28 lwz r3,40(r31) ffc0ea0c: 4b ff b2 35 bl ffc09c40 if (! PIPE_READWAIT(pipe)) ffc0ea10: 80 7f 00 2c lwz r3,44(r31) ffc0ea14: 38 80 00 00 li r4,0 ffc0ea18: 48 00 11 ad bl ffc0fbc4 ffc0ea1c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ea20: 40 9e 01 2c bne- cr7,ffc0eb4c <== NEVER TAKEN goto out_error; if (! PIPE_LOCK(pipe)) ffc0ea24: 80 7f 00 28 lwz r3,40(r31) ffc0ea28: 38 80 00 00 li r4,0 ffc0ea2c: 38 a0 00 00 li r5,0 ffc0ea30: 4b ff b0 e9 bl ffc09b18 ffc0ea34: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ea38: 40 9e 01 14 bne- cr7,ffc0eb4c <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->writerCounter); ffc0ea3c: 80 1f 00 24 lwz r0,36(r31) ffc0ea40: 7f 9d 00 00 cmpw cr7,r29,r0 ffc0ea44: 41 9e ff c4 beq+ cr7,ffc0ea08 <== NEVER TAKEN ffc0ea48: 48 00 00 f8 b ffc0eb40 } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; ffc0ea4c: 81 3f 00 24 lwz r9,36(r31) ffc0ea50: 38 09 00 01 addi r0,r9,1 if (pipe->Writers ++ == 0) ffc0ea54: 81 3f 00 14 lwz r9,20(r31) } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; ffc0ea58: 90 1f 00 24 stw r0,36(r31) if (pipe->Writers ++ == 0) ffc0ea5c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ea60: 38 09 00 01 addi r0,r9,1 ffc0ea64: 90 1f 00 14 stw r0,20(r31) ffc0ea68: 40 be 00 10 bne+ cr7,ffc0ea78 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); ffc0ea6c: 80 7f 00 2c lwz r3,44(r31) ffc0ea70: 38 81 00 08 addi r4,r1,8 ffc0ea74: 48 00 10 e5 bl ffc0fb58 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { ffc0ea78: 80 1f 00 10 lwz r0,16(r31) ffc0ea7c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ea80: 40 9e 00 c0 bne- cr7,ffc0eb40 ffc0ea84: 80 1b 00 18 lwz r0,24(r27) ffc0ea88: 70 09 00 01 andi. r9,r0,1 ffc0ea8c: 41 a2 00 14 beq+ ffc0eaa0 PIPE_UNLOCK(pipe); ffc0ea90: 80 7f 00 28 lwz r3,40(r31) err = -ENXIO; ffc0ea94: 3b c0 ff fa li r30,-6 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); ffc0ea98: 4b ff b1 a9 bl ffc09c40 err = -ENXIO; goto out_error; ffc0ea9c: 48 00 00 b4 b ffc0eb50 } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; ffc0eaa0: 83 bf 00 20 lwz r29,32(r31) err = -EINTR; do { PIPE_UNLOCK(pipe); ffc0eaa4: 80 7f 00 28 lwz r3,40(r31) ffc0eaa8: 4b ff b1 99 bl ffc09c40 if (! PIPE_WRITEWAIT(pipe)) ffc0eaac: 80 7f 00 30 lwz r3,48(r31) ffc0eab0: 38 80 00 00 li r4,0 ffc0eab4: 48 00 11 11 bl ffc0fbc4 ffc0eab8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0eabc: 40 9e 00 90 bne- cr7,ffc0eb4c <== NEVER TAKEN goto out_error; if (! PIPE_LOCK(pipe)) ffc0eac0: 80 7f 00 28 lwz r3,40(r31) ffc0eac4: 38 80 00 00 li r4,0 ffc0eac8: 38 a0 00 00 li r5,0 ffc0eacc: 4b ff b0 4d bl ffc09b18 ffc0ead0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ead4: 40 9e 00 78 bne- cr7,ffc0eb4c <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->readerCounter); ffc0ead8: 80 1f 00 20 lwz r0,32(r31) ffc0eadc: 7f 9d 00 00 cmpw cr7,r29,r0 ffc0eae0: 41 9e ff c4 beq+ cr7,ffc0eaa4 <== NEVER TAKEN ffc0eae4: 48 00 00 5c b ffc0eb40 } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc0eae8: 81 3f 00 20 lwz r9,32(r31) ffc0eaec: 38 09 00 01 addi r0,r9,1 if (pipe->Readers ++ == 0) ffc0eaf0: 81 3f 00 10 lwz r9,16(r31) } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc0eaf4: 90 1f 00 20 stw r0,32(r31) if (pipe->Readers ++ == 0) ffc0eaf8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0eafc: 38 09 00 01 addi r0,r9,1 ffc0eb00: 90 1f 00 10 stw r0,16(r31) ffc0eb04: 40 be 00 10 bne+ cr7,ffc0eb14 <== NEVER TAKEN PIPE_WAKEUPWRITERS(pipe); ffc0eb08: 80 7f 00 30 lwz r3,48(r31) ffc0eb0c: 38 81 00 08 addi r4,r1,8 ffc0eb10: 48 00 10 49 bl ffc0fb58 pipe->writerCounter ++; ffc0eb14: 81 3f 00 24 lwz r9,36(r31) ffc0eb18: 38 09 00 01 addi r0,r9,1 if (pipe->Writers ++ == 0) ffc0eb1c: 81 3f 00 14 lwz r9,20(r31) case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; ffc0eb20: 90 1f 00 24 stw r0,36(r31) if (pipe->Writers ++ == 0) ffc0eb24: 2f 89 00 00 cmpwi cr7,r9,0 ffc0eb28: 38 09 00 01 addi r0,r9,1 ffc0eb2c: 90 1f 00 14 stw r0,20(r31) ffc0eb30: 40 be 00 10 bne+ cr7,ffc0eb40 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); ffc0eb34: 80 7f 00 2c lwz r3,44(r31) ffc0eb38: 38 81 00 08 addi r4,r1,8 ffc0eb3c: 48 00 10 1d bl ffc0fb58 break; } PIPE_UNLOCK(pipe); ffc0eb40: 80 7f 00 28 lwz r3,40(r31) ffc0eb44: 4b ff b0 fd bl ffc09c40 return 0; ffc0eb48: 48 00 00 14 b ffc0eb5c goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; ffc0eb4c: 3b c0 ff fc li r30,-4 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); ffc0eb50: 7f 83 e3 78 mr r3,r28 ffc0eb54: 7f 64 db 78 mr r4,r27 ffc0eb58: 4b ff fb 8d bl ffc0e6e4 return err; } ffc0eb5c: 39 61 00 30 addi r11,r1,48 ffc0eb60: 7f c3 f3 78 mr r3,r30 ffc0eb64: 48 01 14 60 b ffc1ffc4 <_restgpr_26_x> =============================================================================== ffc05000 : long fpathconf( int fd, int name ) { ffc05000: 7c 08 02 a6 mflr r0 ffc05004: 94 21 ff f8 stwu r1,-8(r1) long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); ffc05008: 3d 20 00 00 lis r9,0 long fpathconf( int fd, int name ) { ffc0500c: 90 01 00 0c stw r0,12(r1) long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); ffc05010: 80 09 26 8c lwz r0,9868(r9) ffc05014: 7f 83 00 40 cmplw cr7,r3,r0 ffc05018: 40 9c 00 20 bge- cr7,ffc05038 iop = rtems_libio_iop(fd); ffc0501c: 3d 20 00 00 lis r9,0 ffc05020: 80 09 27 48 lwz r0,10056(r9) ffc05024: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc05028: 7c 60 1a 14 add r3,r0,r3 rtems_libio_check_is_open(iop); ffc0502c: 80 03 00 18 lwz r0,24(r3) ffc05030: 70 09 01 00 andi. r9,r0,256 ffc05034: 40 a2 00 10 bne+ ffc05044 <== ALWAYS TAKEN ffc05038: 48 00 b6 35 bl ffc1066c <__errno> ffc0503c: 38 00 00 09 li r0,9 ffc05040: 48 00 00 9c b ffc050dc rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); ffc05044: 70 09 00 02 andi. r9,r0,2 ffc05048: 41 82 00 8c beq- ffc050d4 * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { ffc0504c: 2b 84 00 0b cmplwi cr7,r4,11 /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; ffc05050: 81 23 00 2c lwz r9,44(r3) switch ( name ) { ffc05054: 41 9d 00 80 bgt- cr7,ffc050d4 ffc05058: 3d 60 ff c1 lis r11,-63 ffc0505c: 39 6b 7e dc addi r11,r11,32476 ffc05060: 54 84 10 3a rlwinm r4,r4,2,0,29 ffc05064: 7c 0b 20 2e lwzx r0,r11,r4 ffc05068: 7d 60 5a 14 add r11,r0,r11 ffc0506c: 7d 69 03 a6 mtctr r11 ffc05070: 4e 80 04 20 bctr case _PC_LINK_MAX: return_value = the_limits->link_max; ffc05074: 80 69 00 38 lwz r3,56(r9) break; ffc05078: 48 00 00 6c b ffc050e4 case _PC_MAX_CANON: return_value = the_limits->max_canon; ffc0507c: 80 69 00 3c lwz r3,60(r9) break; ffc05080: 48 00 00 64 b ffc050e4 case _PC_MAX_INPUT: return_value = the_limits->max_input; ffc05084: 80 69 00 40 lwz r3,64(r9) break; ffc05088: 48 00 00 5c b ffc050e4 case _PC_NAME_MAX: return_value = the_limits->name_max; ffc0508c: 80 69 00 44 lwz r3,68(r9) break; ffc05090: 48 00 00 54 b ffc050e4 case _PC_PATH_MAX: return_value = the_limits->path_max; ffc05094: 80 69 00 48 lwz r3,72(r9) break; ffc05098: 48 00 00 4c b ffc050e4 case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; ffc0509c: 80 69 00 4c lwz r3,76(r9) break; ffc050a0: 48 00 00 44 b ffc050e4 case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; ffc050a4: 80 69 00 54 lwz r3,84(r9) break; ffc050a8: 48 00 00 3c b ffc050e4 case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; ffc050ac: 80 69 00 58 lwz r3,88(r9) break; ffc050b0: 48 00 00 34 b ffc050e4 case _PC_VDISABLE: return_value = the_limits->posix_vdisable; ffc050b4: 80 69 00 64 lwz r3,100(r9) break; ffc050b8: 48 00 00 2c b ffc050e4 case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; ffc050bc: 80 69 00 50 lwz r3,80(r9) break; ffc050c0: 48 00 00 24 b ffc050e4 case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; ffc050c4: 80 69 00 5c lwz r3,92(r9) break; ffc050c8: 48 00 00 1c b ffc050e4 case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; ffc050cc: 80 69 00 60 lwz r3,96(r9) break; ffc050d0: 48 00 00 14 b ffc050e4 default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc050d4: 48 00 b5 99 bl ffc1066c <__errno> ffc050d8: 38 00 00 16 li r0,22 ffc050dc: 90 03 00 00 stw r0,0(r3) ffc050e0: 38 60 ff ff li r3,-1 break; } return return_value; } ffc050e4: 80 01 00 0c lwz r0,12(r1) ffc050e8: 38 21 00 08 addi r1,r1,8 ffc050ec: 7c 08 03 a6 mtlr r0 ffc050f0: 4e 80 00 20 blr =============================================================================== ffc04174 : #include void free( void *ptr ) { ffc04174: 94 21 ff f0 stwu r1,-16(r1) ffc04178: 7c 08 02 a6 mflr r0 MSBUMP(free_calls, 1); ffc0417c: 3d 20 00 00 lis r9,0 #include void free( void *ptr ) { ffc04180: 90 01 00 14 stw r0,20(r1) MSBUMP(free_calls, 1); ffc04184: 39 29 2a 88 addi r9,r9,10888 #include void free( void *ptr ) { ffc04188: bf c1 00 08 stmw r30,8(r1) MSBUMP(free_calls, 1); if ( !ptr ) ffc0418c: 7c 7f 1b 79 mr. r31,r3 void free( void *ptr ) { MSBUMP(free_calls, 1); ffc04190: 81 69 00 0c lwz r11,12(r9) ffc04194: 38 0b 00 01 addi r0,r11,1 ffc04198: 90 09 00 0c stw r0,12(r9) if ( !ptr ) ffc0419c: 41 82 00 84 beq- ffc04220 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && ffc041a0: 3d 20 00 00 lis r9,0 ffc041a4: 80 09 27 a8 lwz r0,10152(r9) ffc041a8: 2f 80 00 03 cmpwi cr7,r0,3 ffc041ac: 40 be 00 1c bne+ cr7,ffc041c8 <== NEVER TAKEN !malloc_is_system_state_OK() ) { ffc041b0: 48 00 01 bd bl ffc0436c return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && ffc041b4: 2f 83 00 00 cmpwi cr7,r3,0 ffc041b8: 40 be 00 10 bne+ cr7,ffc041c8 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); ffc041bc: 7f e3 fb 78 mr r3,r31 ffc041c0: 48 00 02 31 bl ffc043f0 return; ffc041c4: 48 00 00 5c b ffc04220 } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) ffc041c8: 3d 20 00 00 lis r9,0 ffc041cc: 81 29 27 08 lwz r9,9992(r9) ffc041d0: 2f 89 00 00 cmpwi cr7,r9,0 ffc041d4: 41 9e 00 14 beq- cr7,ffc041e8 (*rtems_malloc_statistics_helpers->at_free)(ptr); ffc041d8: 80 09 00 08 lwz r0,8(r9) ffc041dc: 7f e3 fb 78 mr r3,r31 ffc041e0: 7c 09 03 a6 mtctr r0 ffc041e4: 4e 80 04 21 bctrl if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { ffc041e8: 3f c0 00 00 lis r30,0 ffc041ec: 80 7e 26 a4 lwz r3,9892(r30) ffc041f0: 7f e4 fb 78 mr r4,r31 ffc041f4: 48 00 53 a1 bl ffc09594 <_Protected_heap_Free> ffc041f8: 2f 83 00 00 cmpwi cr7,r3,0 ffc041fc: 40 be 00 24 bne+ cr7,ffc04220 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, ffc04200: 81 3e 26 a4 lwz r9,9892(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", ffc04204: 3c 60 ff c1 lis r3,-63 ffc04208: 38 63 5e 27 addi r3,r3,24103 ffc0420c: 80 a9 00 18 lwz r5,24(r9) ffc04210: 7f e4 fb 78 mr r4,r31 ffc04214: 80 c9 00 1c lwz r6,28(r9) ffc04218: 4c c6 31 82 crclr 4*cr1+eq ffc0421c: 48 00 0d e1 bl ffc04ffc RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } ffc04220: 39 61 00 10 addi r11,r1,16 ffc04224: 48 00 ff c8 b ffc141ec <_restgpr_30_x> =============================================================================== ffc05650 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { ffc05650: 7c 08 02 a6 mflr r0 ffc05654: 7c 2b 0b 78 mr r11,r1 ffc05658: 94 21 ff f0 stwu r1,-16(r1) rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env ffc0565c: 3d 20 00 00 lis r9,0 * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { ffc05660: 90 01 00 14 stw r0,20(r1) rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env ffc05664: 38 09 2a 98 addi r0,r9,10904 ffc05668: 7f 83 00 00 cmpw cr7,r3,r0 * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { ffc0566c: 48 00 ef b9 bl ffc14624 <_savegpr_31> ffc05670: 7c 7f 1b 78 mr r31,r3 rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env ffc05674: 41 9e 00 1c beq- cr7,ffc05690 <== NEVER TAKEN #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); ffc05678: 38 63 00 04 addi r3,r3,4 ffc0567c: 4b ff ed 91 bl ffc0440c rtems_filesystem_freenode( &env->root_directory); ffc05680: 38 7f 00 18 addi r3,r31,24 ffc05684: 4b ff ed 89 bl ffc0440c free(env); ffc05688: 7f e3 fb 78 mr r3,r31 ffc0568c: 4b ff ed ad bl ffc04438 } } ffc05690: 39 61 00 10 addi r11,r1,16 ffc05694: 48 00 ef dc b ffc14670 <_restgpr_31_x> =============================================================================== ffc163a0 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc163a0: 94 21 ff c8 stwu r1,-56(r1) ffc163a4: 7c 08 02 a6 mflr r0 rtems_filesystem_location_info_t loc; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); ffc163a8: 3d 20 00 00 lis r9,0 int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc163ac: 90 01 00 3c stw r0,60(r1) rtems_filesystem_location_info_t loc; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); ffc163b0: 80 09 27 0c lwz r0,9996(r9) int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc163b4: bf c1 00 30 stmw r30,48(r1) ffc163b8: 7c bf 2b 78 mr r31,r5 rtems_filesystem_location_info_t loc; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); ffc163bc: 7f 83 00 40 cmplw cr7,r3,r0 ffc163c0: 3b c0 00 00 li r30,0 ffc163c4: 40 9c 00 14 bge- cr7,ffc163d8 <== NEVER TAKEN ffc163c8: 3d 20 00 00 lis r9,0 ffc163cc: 83 c9 27 d4 lwz r30,10196(r9) ffc163d0: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc163d4: 7f de 1a 14 add r30,r30,r3 /* * Make sure we are working on a directory */ loc = iop->pathinfo; ffc163d8: 39 7e 00 1c addi r11,r30,28 ffc163dc: 38 61 00 08 addi r3,r1,8 ffc163e0: 7c ab a4 aa lswi r5,r11,20 ffc163e4: 7c a3 a5 aa stswi r5,r3,20 if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) ffc163e8: 81 21 00 14 lwz r9,20(r1) ffc163ec: 80 09 00 10 lwz r0,16(r9) ffc163f0: 90 81 00 28 stw r4,40(r1) ffc163f4: 7c 09 03 a6 mtctr r0 ffc163f8: 4e 80 04 21 bctrl ffc163fc: 80 81 00 28 lwz r4,40(r1) ffc16400: 2f 83 00 01 cmpwi cr7,r3,1 ffc16404: 41 be 00 18 beq+ cr7,ffc1641c rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc16408: 4b ff 9d e5 bl ffc101ec <__errno> ffc1640c: 38 00 00 14 li r0,20 ffc16410: 90 03 00 00 stw r0,0(r3) ffc16414: 38 60 ff ff li r3,-1 ffc16418: 48 00 00 1c b ffc16434 /* * 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 ); ffc1641c: 81 3e 00 24 lwz r9,36(r30) ffc16420: 7f c3 f3 78 mr r3,r30 ffc16424: 7f e5 fb 78 mr r5,r31 ffc16428: 80 09 00 08 lwz r0,8(r9) ffc1642c: 7c 09 03 a6 mtctr r0 ffc16430: 4e 80 04 21 bctrl } ffc16434: 39 61 00 38 addi r11,r1,56 ffc16438: 4b ff f8 98 b ffc15cd0 <_restgpr_30_x> =============================================================================== ffc04228 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { ffc04228: 94 21 ff e0 stwu r1,-32(r1) ffc0422c: 7c 08 02 a6 mflr r0 ffc04230: bf c1 00 18 stmw r30,24(r1) /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) ffc04234: 7c 7f 1b 79 mr. r31,r3 */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { ffc04238: 90 01 00 24 stw r0,36(r1) /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) ffc0423c: 40 a2 00 18 bne+ ffc04254 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); ffc04240: 48 00 af d1 bl ffc0f210 <__errno> <== NOT EXECUTED ffc04244: 38 00 00 0e li r0,14 <== NOT EXECUTED ffc04248: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0424c: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc04250: 48 00 00 3c b ffc0428c <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc04254: 7f c0 00 a6 mfmsr r30 ffc04258: 7c 10 42 a6 mfsprg r0,0 ffc0425c: 7f c0 00 78 andc r0,r30,r0 ffc04260: 7c 00 01 24 mtmsr r0 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); ffc04264: 38 61 00 08 addi r3,r1,8 ffc04268: 48 00 45 71 bl ffc087d8 <_TOD_Get> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0426c: 7f c0 01 24 mtmsr r30 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; ffc04270: 80 01 00 08 lwz r0,8(r1) * Timezone information ignored by the OS proper. Per email * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; ffc04274: 38 60 00 00 li r3,0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; ffc04278: 81 21 00 0c lwz r9,12(r1) time->tv_sec = now.tv_sec; ffc0427c: 90 1f 00 00 stw r0,0(r31) _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; ffc04280: 38 00 03 e8 li r0,1000 ffc04284: 7c 09 03 d6 divw r0,r9,r0 time->tv_sec = now.tv_sec; time->tv_usec = useconds; ffc04288: 90 1f 00 04 stw r0,4(r31) } ffc0428c: 39 61 00 20 addi r11,r1,32 ffc04290: 48 00 ff 5c b ffc141ec <_restgpr_30_x> =============================================================================== ffc0e8c8 : IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) ffc0e8c8: 81 23 00 1c lwz r9,28(r3) return -1; /* It wasn't a directory --> return error */ ffc0e8cc: 38 00 ff ff li r0,-1 IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) ffc0e8d0: 81 29 00 4c lwz r9,76(r9) ffc0e8d4: 2f 89 00 01 cmpwi cr7,r9,1 ffc0e8d8: 40 be 00 18 bne+ cr7,ffc0e8f0 <== NEVER TAKEN return -1; /* It wasn't a directory --> return error */ iop->offset = 0; ffc0e8dc: 39 20 00 00 li r9,0 ffc0e8e0: 39 40 00 00 li r10,0 ffc0e8e4: 91 23 00 10 stw r9,16(r3) return 0; ffc0e8e8: 38 00 00 00 li r0,0 the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; ffc0e8ec: 91 43 00 14 stw r10,20(r3) return 0; } ffc0e8f0: 7c 03 03 78 mr r3,r0 ffc0e8f4: 4e 80 00 20 blr =============================================================================== ffc0eb10 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { ffc0eb10: 7c 08 02 a6 mflr r0 ffc0eb14: 7c 2b 0b 78 mr r11,r1 ffc0eb18: 94 21 ff f0 stwu r1,-16(r1) ffc0eb1c: 90 01 00 14 stw r0,20(r1) ffc0eb20: 48 00 56 85 bl ffc141a4 <_savegpr_31> IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; ffc0eb24: 83 e4 00 00 lwz r31,0(r4) /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) ffc0eb28: 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 ); ffc0eb2c: 38 1f 00 54 addi r0,r31,84 ffc0eb30: 7f 89 00 00 cmpw cr7,r9,r0 ffc0eb34: 41 be 00 10 beq+ cr7,ffc0eb44 rtems_set_errno_and_return_minus_one( ENOTEMPTY ); ffc0eb38: 48 00 06 d9 bl ffc0f210 <__errno> ffc0eb3c: 38 00 00 5a li r0,90 ffc0eb40: 48 00 00 1c b ffc0eb5c /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) ffc0eb44: 81 24 00 10 lwz r9,16(r4) ffc0eb48: 80 09 00 1c lwz r0,28(r9) ffc0eb4c: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0eb50: 40 be 00 18 bne+ cr7,ffc0eb68 rtems_set_errno_and_return_minus_one( EBUSY ); ffc0eb54: 48 00 06 bd bl ffc0f210 <__errno> ffc0eb58: 38 00 00 10 li r0,16 ffc0eb5c: 90 03 00 00 stw r0,0(r3) ffc0eb60: 38 60 ff ff li r3,-1 ffc0eb64: 48 00 00 24 b ffc0eb88 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) ffc0eb68: 80 1f 00 5c lwz r0,92(r31) ffc0eb6c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0eb70: 40 be ff e4 bne- cr7,ffc0eb54 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); IMFS_create_orphan( the_jnode ); ffc0eb74: 7f e3 fb 78 mr r3,r31 ffc0eb78: 4b ff d5 2d bl ffc0c0a4 IMFS_check_node_remove( the_jnode ); ffc0eb7c: 7f e3 fb 78 mr r3,r31 ffc0eb80: 4b ff d5 7d bl ffc0c0fc return 0; ffc0eb84: 38 60 00 00 li r3,0 } ffc0eb88: 39 61 00 10 addi r11,r1,16 ffc0eb8c: 48 00 56 64 b ffc141f0 <_restgpr_31_x> =============================================================================== ffc04e28 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc04e28: 7c 08 02 a6 mflr r0 ffc04e2c: 7c 2b 0b 78 mr r11,r1 ffc04e30: 94 21 ff f0 stwu r1,-16(r1) FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc04e34: 3d 20 00 00 lis r9,0 /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc04e38: 90 01 00 14 stw r0,20(r1) ffc04e3c: 48 01 11 0d bl ffc15f48 <_savegpr_31> FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc04e40: 88 09 28 18 lbz r0,10264(r9) ffc04e44: 2f 80 00 00 cmpwi cr7,r0,0 ffc04e48: 40 be 00 bc bne+ cr7,ffc04f04 return; etc_passwd_initted = 1; mkdir("/etc", 0777); ffc04e4c: 3c 60 ff c1 lis r3,-63 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; ffc04e50: 38 00 00 01 li r0,1 mkdir("/etc", 0777); ffc04e54: 38 80 01 ff li r4,511 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; ffc04e58: 98 09 28 18 stb r0,10264(r9) mkdir("/etc", 0777); ffc04e5c: 38 63 7c f3 addi r3,r3,31987 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc04e60: 3f e0 ff c1 lis r31,-63 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); ffc04e64: 48 00 09 d5 bl ffc05838 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc04e68: 3b ff 7c f8 addi r31,r31,31992 ffc04e6c: 3c 80 ff c1 lis r4,-63 ffc04e70: 7f e3 fb 78 mr r3,r31 ffc04e74: 38 84 75 1c addi r4,r4,29980 ffc04e78: 48 00 c1 a5 bl ffc1101c ffc04e7c: 2f 83 00 00 cmpwi cr7,r3,0 ffc04e80: 40 be 00 30 bne+ cr7,ffc04eb0 fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { ffc04e84: 3c 80 ff c1 lis r4,-63 ffc04e88: 7f e3 fb 78 mr r3,r31 ffc04e8c: 38 84 7d 04 addi r4,r4,32004 ffc04e90: 48 00 c1 8d bl ffc1101c ffc04e94: 7c 7f 1b 79 mr. r31,r3 ffc04e98: 41 82 00 1c beq- ffc04eb4 <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" ffc04e9c: 3c 60 ff c1 lis r3,-63 ffc04ea0: 38 63 7d 06 addi r3,r3,32006 ffc04ea4: 7f e4 fb 78 mr r4,r31 ffc04ea8: 48 00 c2 39 bl ffc110e0 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); ffc04eac: 7f e3 fb 78 mr r3,r31 ffc04eb0: 48 00 b7 ad bl ffc1065c } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { ffc04eb4: 3f e0 ff c1 lis r31,-63 ffc04eb8: 3b ff 7d 6d addi r31,r31,32109 ffc04ebc: 3c 80 ff c1 lis r4,-63 ffc04ec0: 7f e3 fb 78 mr r3,r31 ffc04ec4: 38 84 75 1c addi r4,r4,29980 ffc04ec8: 48 00 c1 55 bl ffc1101c ffc04ecc: 2f 83 00 00 cmpwi cr7,r3,0 ffc04ed0: 40 be 00 30 bne+ cr7,ffc04f00 fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { ffc04ed4: 3c 80 ff c1 lis r4,-63 ffc04ed8: 7f e3 fb 78 mr r3,r31 ffc04edc: 38 84 7d 04 addi r4,r4,32004 ffc04ee0: 48 00 c1 3d bl ffc1101c ffc04ee4: 7c 7f 1b 79 mr. r31,r3 ffc04ee8: 41 82 00 1c beq- ffc04f04 <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" ffc04eec: 3c 60 ff c1 lis r3,-63 ffc04ef0: 38 63 7d 78 addi r3,r3,32120 ffc04ef4: 7f e4 fb 78 mr r4,r31 ffc04ef8: 48 00 c1 e9 bl ffc110e0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); ffc04efc: 7f e3 fb 78 mr r3,r31 ffc04f00: 48 00 b7 5d bl ffc1065c } } ffc04f04: 39 61 00 10 addi r11,r1,16 ffc04f08: 4b ff b9 c0 b ffc008c8 <_restgpr_31_x> =============================================================================== ffc060e4 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { ffc060e4: 94 21 ff f0 stwu r1,-16(r1) ffc060e8: 7c 08 02 a6 mflr r0 ffc060ec: 90 01 00 14 stw r0,20(r1) if (tty->termios.c_iflag & ISTRIP) ffc060f0: 80 04 00 30 lwz r0,48(r4) /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { ffc060f4: bf c1 00 08 stmw r30,8(r1) ffc060f8: 7c 7e 1b 78 mr r30,r3 if (tty->termios.c_iflag & ISTRIP) ffc060fc: 70 09 00 20 andi. r9,r0,32 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { ffc06100: 7c 9f 23 78 mr r31,r4 if (tty->termios.c_iflag & ISTRIP) ffc06104: 41 82 00 08 beq- ffc0610c <== ALWAYS TAKEN c &= 0x7f; ffc06108: 54 7e 06 7e clrlwi r30,r3,25 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) ffc0610c: 70 09 02 00 andi. r9,r0,512 ffc06110: 41 82 00 28 beq- ffc06138 c = tolower (c); ffc06114: 3d 20 00 00 lis r9,0 ffc06118: 81 29 26 ec lwz r9,9964(r9) ffc0611c: 7d 29 f2 14 add r9,r9,r30 ffc06120: 89 29 00 01 lbz r9,1(r9) ffc06124: 55 29 07 be clrlwi r9,r9,30 ffc06128: 2f 89 00 01 cmpwi cr7,r9,1 ffc0612c: 40 be 00 08 bne+ cr7,ffc06134 ffc06130: 3b de 00 20 addi r30,r30,32 ffc06134: 57 de 06 3e clrlwi r30,r30,24 if (c == '\r') { ffc06138: 2f 9e 00 0d cmpwi cr7,r30,13 ffc0613c: 40 be 00 20 bne+ cr7,ffc0615c if (tty->termios.c_iflag & IGNCR) ffc06140: 70 09 00 80 andi. r9,r0,128 return 0; ffc06144: 38 60 00 00 li r3,0 if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) ffc06148: 40 82 01 44 bne- ffc0628c <== NEVER TAKEN return 0; if (tty->termios.c_iflag & ICRNL) ffc0614c: 70 09 01 00 andi. r9,r0,256 ffc06150: 41 82 00 2c beq- ffc0617c <== NEVER TAKEN c = '\n'; ffc06154: 3b c0 00 0a li r30,10 ffc06158: 48 00 00 24 b ffc0617c } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { ffc0615c: 2f 9e 00 0a cmpwi cr7,r30,10 ffc06160: 40 be 00 14 bne+ cr7,ffc06174 ffc06164: 70 09 00 40 andi. r9,r0,64 ffc06168: 41 82 00 14 beq- ffc0617c <== ALWAYS TAKEN c = '\r'; ffc0616c: 3b c0 00 0d li r30,13 <== NOT EXECUTED ffc06170: 48 00 00 0c b ffc0617c <== NOT EXECUTED } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { ffc06174: 2f 9e 00 00 cmpwi cr7,r30,0 ffc06178: 41 be 00 c8 beq+ cr7,ffc06240 <== NEVER TAKEN ffc0617c: 80 1f 00 3c lwz r0,60(r31) ffc06180: 70 09 00 02 andi. r9,r0,2 ffc06184: 41 82 00 bc beq- ffc06240 if (c == tty->termios.c_cc[VERASE]) { ffc06188: 89 3f 00 43 lbz r9,67(r31) erase (tty, 0); ffc0618c: 7f e3 fb 78 mr r3,r31 ffc06190: 38 80 00 00 li r4,0 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { ffc06194: 7f 89 f0 00 cmpw cr7,r9,r30 ffc06198: 41 9e 00 18 beq- cr7,ffc061b0 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { ffc0619c: 89 3f 00 44 lbz r9,68(r31) ffc061a0: 7f 89 f0 00 cmpw cr7,r9,r30 ffc061a4: 40 be 00 14 bne+ cr7,ffc061b8 erase (tty, 1); ffc061a8: 7f e3 fb 78 mr r3,r31 ffc061ac: 38 80 00 01 li r4,1 ffc061b0: 4b ff fd 29 bl ffc05ed8 ffc061b4: 48 00 00 d4 b ffc06288 return 0; } else if (c == tty->termios.c_cc[VEOF]) { ffc061b8: 89 3f 00 45 lbz r9,69(r31) return 1; ffc061bc: 38 60 00 01 li r3,1 } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { ffc061c0: 7f 89 f0 00 cmpw cr7,r9,r30 ffc061c4: 41 9e 00 c8 beq- cr7,ffc0628c <== NEVER TAKEN return 1; } else if (c == '\n') { ffc061c8: 2f 9e 00 0a cmpwi cr7,r30,10 ffc061cc: 40 be 00 2c bne+ cr7,ffc061f8 if (tty->termios.c_lflag & (ECHO | ECHONL)) ffc061d0: 70 09 00 48 andi. r9,r0,72 ffc061d4: 41 a2 00 10 beq+ ffc061e4 <== NEVER TAKEN echo (c, tty); ffc061d8: 38 60 00 0a li r3,10 ffc061dc: 7f e4 fb 78 mr r4,r31 ffc061e0: 4b ff fc 6d bl ffc05e4c tty->cbuf[tty->ccount++] = c; ffc061e4: 81 3f 00 20 lwz r9,32(r31) ffc061e8: 38 00 00 0a li r0,10 ffc061ec: 81 7f 00 1c lwz r11,28(r31) ffc061f0: 7c 0b 49 ae stbx r0,r11,r9 ffc061f4: 48 00 00 3c b ffc06230 return 1; } else if ((c == tty->termios.c_cc[VEOL]) || ffc061f8: 89 3f 00 4c lbz r9,76(r31) ffc061fc: 7f 89 f0 00 cmpw cr7,r9,r30 ffc06200: 41 9e 00 10 beq- cr7,ffc06210 <== NEVER TAKEN ffc06204: 89 3f 00 51 lbz r9,81(r31) ffc06208: 7f 89 f0 00 cmpw cr7,r9,r30 ffc0620c: 40 be 00 34 bne+ cr7,ffc06240 <== ALWAYS TAKEN (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) ffc06210: 70 09 00 08 andi. r9,r0,8 <== NOT EXECUTED ffc06214: 41 a2 00 10 beq+ ffc06224 <== NOT EXECUTED echo (c, tty); ffc06218: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc0621c: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc06220: 4b ff fc 2d bl ffc05e4c <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; ffc06224: 81 3f 00 20 lwz r9,32(r31) <== NOT EXECUTED ffc06228: 81 7f 00 1c lwz r11,28(r31) <== NOT EXECUTED ffc0622c: 7f cb 49 ae stbx r30,r11,r9 <== NOT EXECUTED ffc06230: 39 29 00 01 addi r9,r9,1 ffc06234: 91 3f 00 20 stw r9,32(r31) return 1; ffc06238: 38 60 00 01 li r3,1 ffc0623c: 48 00 00 50 b ffc0628c } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { ffc06240: 3d 20 00 00 lis r9,0 ffc06244: 81 29 21 80 lwz r9,8576(r9) if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; ffc06248: 38 60 00 00 li r3,0 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { ffc0624c: 38 09 ff ff addi r0,r9,-1 ffc06250: 81 3f 00 20 lwz r9,32(r31) ffc06254: 7f 89 00 00 cmpw cr7,r9,r0 ffc06258: 40 9c 00 34 bge- cr7,ffc0628c <== NEVER TAKEN if (tty->termios.c_lflag & ECHO) ffc0625c: 80 1f 00 3c lwz r0,60(r31) ffc06260: 70 09 00 08 andi. r9,r0,8 ffc06264: 41 a2 00 10 beq+ ffc06274 <== NEVER TAKEN echo (c, tty); ffc06268: 7f c3 f3 78 mr r3,r30 ffc0626c: 7f e4 fb 78 mr r4,r31 ffc06270: 4b ff fb dd bl ffc05e4c tty->cbuf[tty->ccount++] = c; ffc06274: 81 3f 00 20 lwz r9,32(r31) ffc06278: 81 7f 00 1c lwz r11,28(r31) ffc0627c: 7f cb 49 ae stbx r30,r11,r9 ffc06280: 39 29 00 01 addi r9,r9,1 ffc06284: 91 3f 00 20 stw r9,32(r31) } return 0; ffc06288: 38 60 00 00 li r3,0 } ffc0628c: 39 61 00 10 addi r11,r1,16 ffc06290: 48 00 df 5c b ffc141ec <_restgpr_30_x> =============================================================================== ffc24534 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } ffc24534: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc24538: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc147c0 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { ffc147c0: 94 21 ff f0 stwu r1,-16(r1) ffc147c4: 7c 08 02 a6 mflr r0 /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) ffc147c8: 3d 20 00 00 lis r9,0 extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { ffc147cc: 90 01 00 14 stw r0,20(r1) /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) ffc147d0: 80 09 27 a8 lwz r0,10152(r9) extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { ffc147d4: bf c1 00 08 stmw r30,8(r1) /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) ffc147d8: 2f 80 00 03 cmpwi cr7,r0,3 ffc147dc: 40 be 00 50 bne+ cr7,ffc1482c <== NEVER TAKEN /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { ffc147e0: 3d 20 00 00 lis r9,0 ffc147e4: 3f c0 00 00 lis r30,0 ffc147e8: 83 e9 26 f4 lwz r31,9972(r9) ffc147ec: 80 1e 26 f0 lwz r0,9968(r30) ffc147f0: 7f 80 f8 00 cmpw cr7,r0,r31 ffc147f4: 41 9e 00 10 beq- cr7,ffc14804 _wrapup_reent(_global_impure_ptr); ffc147f8: 7f e3 fb 78 mr r3,r31 ffc147fc: 48 00 07 d5 bl ffc14fd0 <_wrapup_reent> /* Don't reclaim this one, just in case we do printfs * on the way out to ROM. */ _reclaim_reent(&libc_global_reent); #endif _REENT = _global_impure_ptr; ffc14800: 93 fe 26 f0 stw r31,9968(r30) * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); ffc14804: 3f e0 00 00 lis r31,0 ffc14808: 81 3f 26 f0 lwz r9,9968(r31) ffc1480c: 80 69 00 04 lwz r3,4(r9) ffc14810: 4b ff ab a1 bl ffc0f3b0 fclose (stdout); ffc14814: 81 3f 26 f0 lwz r9,9968(r31) ffc14818: 80 69 00 08 lwz r3,8(r9) ffc1481c: 4b ff ab 95 bl ffc0f3b0 fclose (stderr); ffc14820: 81 3f 26 f0 lwz r9,9968(r31) ffc14824: 80 69 00 0c lwz r3,12(r9) ffc14828: 4b ff ab 89 bl ffc0f3b0 } ffc1482c: 39 61 00 10 addi r11,r1,16 ffc14830: 4b ff f9 bc b ffc141ec <_restgpr_30_x> =============================================================================== ffc1469c : off_t lseek( int fd, off_t offset, int whence ) { ffc1469c: 94 21 ff e8 stwu r1,-24(r1) ffc146a0: 7c 08 02 a6 mflr r0 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); ffc146a4: 3d 20 00 00 lis r9,0 off_t lseek( int fd, off_t offset, int whence ) { ffc146a8: 90 01 00 1c stw r0,28(r1) rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); ffc146ac: 80 09 26 8c lwz r0,9868(r9) off_t lseek( int fd, off_t offset, int whence ) { ffc146b0: bf a1 00 0c stmw r29,12(r1) rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); ffc146b4: 7f 83 00 40 cmplw cr7,r3,r0 ffc146b8: 40 9c 00 20 bge- cr7,ffc146d8 iop = rtems_libio_iop( fd ); ffc146bc: 3d 20 00 00 lis r9,0 ffc146c0: 83 a9 27 48 lwz r29,10056(r9) ffc146c4: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc146c8: 7f bd 1a 14 add r29,r29,r3 rtems_libio_check_is_open(iop); ffc146cc: 80 1d 00 18 lwz r0,24(r29) ffc146d0: 70 09 01 00 andi. r9,r0,256 ffc146d4: 40 a2 00 10 bne+ ffc146e4 ffc146d8: 4b ff ab 39 bl ffc0f210 <__errno> ffc146dc: 38 00 00 09 li r0,9 ffc146e0: 48 00 00 60 b ffc14740 /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { ffc146e4: 2f 87 00 01 cmpwi cr7,r7,1 /* * Now process the lseek(). */ old_offset = iop->offset; ffc146e8: 83 dd 00 10 lwz r30,16(r29) ffc146ec: 83 fd 00 14 lwz r31,20(r29) switch ( whence ) { ffc146f0: 41 9e 00 20 beq- cr7,ffc14710 ffc146f4: 2f 87 00 02 cmpwi cr7,r7,2 ffc146f8: 41 9e 00 24 beq- cr7,ffc1471c ffc146fc: 2f 87 00 00 cmpwi cr7,r7,0 ffc14700: 40 9e 00 38 bne- cr7,ffc14738 case SEEK_SET: iop->offset = offset; ffc14704: 90 bd 00 10 stw r5,16(r29) ffc14708: 90 dd 00 14 stw r6,20(r29) break; ffc1470c: 48 00 00 44 b ffc14750 case SEEK_CUR: iop->offset += offset; ffc14710: 7d 46 f8 14 addc r10,r6,r31 ffc14714: 7d 25 f1 14 adde r9,r5,r30 ffc14718: 48 00 00 14 b ffc1472c break; case SEEK_END: iop->offset = iop->size + offset; ffc1471c: 81 3d 00 08 lwz r9,8(r29) ffc14720: 81 5d 00 0c lwz r10,12(r29) ffc14724: 7d 4a 30 14 addc r10,r10,r6 ffc14728: 7d 29 29 14 adde r9,r9,r5 ffc1472c: 91 3d 00 10 stw r9,16(r29) ffc14730: 91 5d 00 14 stw r10,20(r29) break; ffc14734: 48 00 00 1c b ffc14750 default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc14738: 4b ff aa d9 bl ffc0f210 <__errno> ffc1473c: 38 00 00 16 li r0,22 ffc14740: 90 03 00 00 stw r0,0(r3) ffc14744: 39 20 ff ff li r9,-1 ffc14748: 39 40 ff ff li r10,-1 ffc1474c: 48 00 00 38 b ffc14784 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); ffc14750: 81 3d 00 24 lwz r9,36(r29) ffc14754: 7f a3 eb 78 mr r3,r29 ffc14758: 80 09 00 14 lwz r0,20(r9) ffc1475c: 7c 09 03 a6 mtctr r0 ffc14760: 4e 80 04 21 bctrl ffc14764: 7c 69 1b 78 mr r9,r3 if ( status == (off_t) -1 ) ffc14768: 2f 89 ff ff cmpwi cr7,r9,-1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); ffc1476c: 7c 8a 23 78 mr r10,r4 if ( status == (off_t) -1 ) ffc14770: 40 be 00 14 bne+ cr7,ffc14784 ffc14774: 2f 84 ff ff cmpwi cr7,r4,-1 ffc14778: 40 be 00 0c bne+ cr7,ffc14784 <== NEVER TAKEN iop->offset = old_offset; ffc1477c: 93 dd 00 10 stw r30,16(r29) ffc14780: 93 fd 00 14 stw r31,20(r29) /* * So if the operation failed, we have to restore iop->offset. */ return status; } ffc14784: 39 61 00 18 addi r11,r1,24 ffc14788: 7d 23 4b 78 mr r3,r9 ffc1478c: 7d 44 53 78 mr r4,r10 ffc14790: 4b ff fa 58 b ffc141e8 <_restgpr_29_x> =============================================================================== ffc04510 : #include "malloc_p.h" void *malloc( size_t size ) { ffc04510: 94 21 ff f0 stwu r1,-16(r1) ffc04514: 7c 08 02 a6 mflr r0 void *return_this; MSBUMP(malloc_calls, 1); ffc04518: 3d 20 00 00 lis r9,0 #include "malloc_p.h" void *malloc( size_t size ) { ffc0451c: 90 01 00 14 stw r0,20(r1) void *return_this; MSBUMP(malloc_calls, 1); ffc04520: 39 29 2a 88 addi r9,r9,10888 ffc04524: 81 69 00 04 lwz r11,4(r9) #include "malloc_p.h" void *malloc( size_t size ) { ffc04528: bf c1 00 08 stmw r30,8(r1) ffc0452c: 7c 7f 1b 78 mr r31,r3 void *return_this; MSBUMP(malloc_calls, 1); ffc04530: 38 0b 00 01 addi r0,r11,1 ffc04534: 90 09 00 04 stw r0,4(r9) /* * Validate the parameters */ if ( !size ) return (void *) 0; ffc04538: 3b c0 00 00 li r30,0 MSBUMP(malloc_calls, 1); /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); ffc0453c: 4b ff fe 79 bl ffc043b4 /* * Validate the parameters */ if ( !size ) ffc04540: 2f 9f 00 00 cmpwi cr7,r31,0 ffc04544: 41 9e 00 bc beq- cr7,ffc04600 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc04548: 3d 20 00 00 lis r9,0 ffc0454c: 80 09 27 a8 lwz r0,10152(r9) ffc04550: 2f 80 00 03 cmpwi cr7,r0,3 ffc04554: 40 be 00 10 bne+ cr7,ffc04564 !malloc_is_system_state_OK() ) ffc04558: 4b ff fe 15 bl ffc0436c return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc0455c: 2f 83 00 00 cmpwi cr7,r3,0 ffc04560: 41 9e 00 a0 beq- cr7,ffc04600 <== NEVER TAKEN RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); ffc04564: 3d 20 00 00 lis r9,0 ffc04568: 80 69 26 a4 lwz r3,9892(r9) ffc0456c: 7f e4 fb 78 mr r4,r31 ffc04570: 38 a0 00 00 li r5,0 ffc04574: 38 c0 00 00 li r6,0 ffc04578: 48 00 4f c5 bl ffc0953c <_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 ) { ffc0457c: 7c 7e 1b 79 mr. r30,r3 ffc04580: 40 a2 00 40 bne+ ffc045c0 if (rtems_malloc_sbrk_helpers) ffc04584: 3d 20 00 00 lis r9,0 ffc04588: 81 29 27 0c lwz r9,9996(r9) ffc0458c: 2f 89 00 00 cmpwi cr7,r9,0 ffc04590: 41 9e 00 1c beq- cr7,ffc045ac return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); ffc04594: 80 09 00 04 lwz r0,4(r9) ffc04598: 7f e3 fb 78 mr r3,r31 ffc0459c: 7c 09 03 a6 mtctr r0 ffc045a0: 4e 80 04 21 bctrl if ( !return_this ) { ffc045a4: 7c 7e 1b 79 mr. r30,r3 ffc045a8: 40 a2 00 18 bne+ ffc045c0 <== NEVER TAKEN errno = ENOMEM; ffc045ac: 48 00 ac 65 bl ffc0f210 <__errno> ffc045b0: 38 00 00 0c li r0,12 ffc045b4: 90 03 00 00 stw r0,0(r3) return (void *) 0; ffc045b8: 3b c0 00 00 li r30,0 ffc045bc: 48 00 00 44 b ffc04600 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) ffc045c0: 3d 20 00 00 lis r9,0 ffc045c4: 80 09 27 10 lwz r0,10000(r9) ffc045c8: 2f 80 00 00 cmpwi cr7,r0,0 ffc045cc: 41 9e 00 14 beq- cr7,ffc045e0 (*rtems_malloc_dirty_helper)( return_this, size ); ffc045d0: 7f c3 f3 78 mr r3,r30 ffc045d4: 7c 09 03 a6 mtctr r0 ffc045d8: 7f e4 fb 78 mr r4,r31 ffc045dc: 4e 80 04 21 bctrl /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) ffc045e0: 3d 20 00 00 lis r9,0 ffc045e4: 81 29 27 08 lwz r9,9992(r9) ffc045e8: 2f 89 00 00 cmpwi cr7,r9,0 ffc045ec: 41 9e 00 14 beq- cr7,ffc04600 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); ffc045f0: 80 09 00 04 lwz r0,4(r9) ffc045f4: 7f c3 f3 78 mr r3,r30 ffc045f8: 7c 09 03 a6 mtctr r0 ffc045fc: 4e 80 04 21 bctrl return return_this; } ffc04600: 39 61 00 10 addi r11,r1,16 ffc04604: 7f c3 f3 78 mr r3,r30 ffc04608: 48 00 fb e4 b ffc141ec <_restgpr_30_x> =============================================================================== ffc04984 : } void *malloc_sbrk_extend_and_allocate( size_t size ) { ffc04984: 94 21 ff e8 stwu r1,-24(r1) ffc04988: 7c 08 02 a6 mflr r0 * Round to the "requested sbrk amount" so hopefully we won't have * to grow again for a while. This effectively does sbrk() calls * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; ffc0498c: 3d 20 00 00 lis r9,0 } void *malloc_sbrk_extend_and_allocate( size_t size ) { ffc04990: 90 01 00 1c stw r0,28(r1) * Round to the "requested sbrk amount" so hopefully we won't have * to grow again for a while. This effectively does sbrk() calls * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; ffc04994: 80 09 27 7c lwz r0,10108(r9) } void *malloc_sbrk_extend_and_allocate( size_t size ) { ffc04998: bf 81 00 08 stmw r28,8(r1) ffc0499c: 7c 7d 1b 78 mr r29,r3 * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) ffc049a0: 2f 80 00 00 cmpwi cr7,r0,0 return (void *) 0; ffc049a4: 3b c0 00 00 li r30,0 * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) ffc049a8: 41 be 00 7c beq+ cr7,ffc04a24 <== NEVER TAKEN return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); ffc049ac: 7f e3 02 14 add r31,r3,r0 ffc049b0: 7f ff 03 96 divwu r31,r31,r0 ffc049b4: 7f ff 01 d6 mullw r31,r31,r0 starting_address = (void *) sbrk(the_size); ffc049b8: 7f e3 fb 78 mr r3,r31 ffc049bc: 4b ff ba cd bl ffc00488 if ( starting_address == (void*) -1 ) ffc049c0: 2f 83 ff ff cmpwi cr7,r3,-1 if ( sbrk_amount == 0 ) return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); starting_address = (void *) sbrk(the_size); ffc049c4: 7c 64 1b 78 mr r4,r3 if ( starting_address == (void*) -1 ) ffc049c8: 41 9e 00 5c beq- cr7,ffc04a24 return (void *) 0; if ( !_Protected_heap_Extend( ffc049cc: 3f 80 00 00 lis r28,0 ffc049d0: 80 7c 26 a4 lwz r3,9892(r28) ffc049d4: 7f e5 fb 78 mr r5,r31 ffc049d8: 48 00 50 41 bl ffc09a18 <_Protected_heap_Extend> ffc049dc: 2f 83 00 00 cmpwi cr7,r3,0 ffc049e0: 40 be 00 1c bne+ cr7,ffc049fc RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); ffc049e4: 7c 7f 00 d0 neg r3,r31 ffc049e8: 4b ff ba a1 bl ffc00488 errno = ENOMEM; ffc049ec: 48 00 af f9 bl ffc0f9e4 <__errno> ffc049f0: 38 00 00 0c li r0,12 ffc049f4: 90 03 00 00 stw r0,0(r3) return (void *) 0; ffc049f8: 48 00 00 2c b ffc04a24 } MSBUMP(space_available, the_size); ffc049fc: 3d 20 00 00 lis r9,0 ffc04a00: 80 7c 26 a4 lwz r3,9892(r28) ffc04a04: 80 09 2c 08 lwz r0,11272(r9) ffc04a08: 7f a4 eb 78 mr r4,r29 ffc04a0c: 38 a0 00 00 li r5,0 ffc04a10: 7f ff 02 14 add r31,r31,r0 ffc04a14: 38 c0 00 00 li r6,0 ffc04a18: 93 e9 2c 08 stw r31,11272(r9) ffc04a1c: 48 00 4f a5 bl ffc099c0 <_Protected_heap_Allocate_aligned_with_boundary> ffc04a20: 7c 7e 1b 78 mr r30,r3 return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } ffc04a24: 39 61 00 18 addi r11,r1,24 ffc04a28: 7f c3 f3 78 mr r3,r30 ffc04a2c: 4b ff bb 8c b ffc005b8 <_restgpr_28_x> =============================================================================== ffc0e4bc : */ int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { ffc0e4bc: 7c 08 02 a6 mflr r0 ffc0e4c0: 7c 2b 0b 78 mr r11,r1 ffc0e4c4: 94 21 ff e0 stwu r1,-32(r1) ffc0e4c8: 90 01 00 24 stw r0,36(r1) ffc0e4cc: 48 00 5c d9 bl ffc141a4 <_savegpr_31> IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; ffc0e4d0: 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 ) ffc0e4d4: 80 1f 00 50 lwz r0,80(r31) ffc0e4d8: 7f 80 28 00 cmpw cr7,r0,r5 ffc0e4dc: 41 9c 00 14 blt- cr7,ffc0e4f0 <== NEVER TAKEN ffc0e4e0: 40 be 00 1c bne+ cr7,ffc0e4fc <== NEVER TAKEN ffc0e4e4: 80 1f 00 54 lwz r0,84(r31) ffc0e4e8: 7f 80 30 40 cmplw cr7,r0,r6 ffc0e4ec: 40 bc 00 10 bge+ cr7,ffc0e4fc return IMFS_memfile_extend( the_jnode, length ); ffc0e4f0: 7f e3 fb 78 mr r3,r31 ffc0e4f4: 4b ff fb f1 bl ffc0e0e4 ffc0e4f8: 48 00 00 2c b ffc0e524 /* * 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; ffc0e4fc: 90 bf 00 50 stw r5,80(r31) iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); ffc0e500: 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; ffc0e504: 90 df 00 54 stw r6,84(r31) iop->size = the_jnode->info.file.size; ffc0e508: 90 a3 00 08 stw r5,8(r3) ffc0e50c: 90 c3 00 0c stw r6,12(r3) IMFS_update_atime( the_jnode ); ffc0e510: 38 61 00 08 addi r3,r1,8 ffc0e514: 4b ff 5d 15 bl ffc04228 ffc0e518: 80 01 00 08 lwz r0,8(r1) return 0; ffc0e51c: 38 60 00 00 li r3,0 * future use and just set the length. */ the_jnode->info.file.size = length; iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); ffc0e520: 90 1f 00 40 stw r0,64(r31) return 0; } ffc0e524: 39 61 00 20 addi r11,r1,32 ffc0e528: 48 00 5c c8 b ffc141f0 <_restgpr_31_x> =============================================================================== ffc0e52c : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { ffc0e52c: 94 21 ff f0 stwu r1,-16(r1) ffc0e530: 7c 08 02 a6 mflr r0 ffc0e534: 90 01 00 14 stw r0,20(r1) ffc0e538: bf c1 00 08 stmw r30,8(r1) ffc0e53c: 7c 7f 1b 78 mr r31,r3 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; ffc0e540: 83 c3 00 1c lwz r30,28(r3) if (the_jnode->type == IMFS_LINEAR_FILE) { ffc0e544: 80 1e 00 4c lwz r0,76(r30) ffc0e548: 2f 80 00 06 cmpwi cr7,r0,6 ffc0e54c: 40 9e 00 34 bne- cr7,ffc0e580 if (iop->offset > the_jnode->info.linearfile.size) ffc0e550: 81 3e 00 50 lwz r9,80(r30) ffc0e554: 81 63 00 10 lwz r11,16(r3) ffc0e558: 80 1e 00 54 lwz r0,84(r30) ffc0e55c: 7f 8b 48 00 cmpw cr7,r11,r9 ffc0e560: 41 9d 00 14 bgt- cr7,ffc0e574 <== NEVER TAKEN ffc0e564: 40 9e 00 5c bne- cr7,ffc0e5c0 <== NEVER TAKEN ffc0e568: 81 63 00 14 lwz r11,20(r3) ffc0e56c: 7f 8b 00 40 cmplw cr7,r11,r0 ffc0e570: 40 9d 00 50 ble- cr7,ffc0e5c0 <== ALWAYS TAKEN iop->offset = the_jnode->info.linearfile.size; ffc0e574: 91 3f 00 10 stw r9,16(r31) <== NOT EXECUTED ffc0e578: 90 1f 00 14 stw r0,20(r31) <== NOT EXECUTED ffc0e57c: 48 00 00 44 b ffc0e5c0 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) ffc0e580: 80 bf 00 10 lwz r5,16(r31) ffc0e584: 7f c3 f3 78 mr r3,r30 ffc0e588: 80 df 00 14 lwz r6,20(r31) ffc0e58c: 4b ff fb 59 bl ffc0e0e4 ffc0e590: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e594: 41 be 00 1c beq+ cr7,ffc0e5b0 rtems_set_errno_and_return_minus_one( ENOSPC ); ffc0e598: 48 00 0c 79 bl ffc0f210 <__errno> ffc0e59c: 38 00 00 1c li r0,28 ffc0e5a0: 90 03 00 00 stw r0,0(r3) ffc0e5a4: 39 20 ff ff li r9,-1 ffc0e5a8: 39 40 ff ff li r10,-1 ffc0e5ac: 48 00 00 1c b ffc0e5c8 iop->size = the_jnode->info.file.size; ffc0e5b0: 81 3e 00 50 lwz r9,80(r30) ffc0e5b4: 81 5e 00 54 lwz r10,84(r30) ffc0e5b8: 91 3f 00 08 stw r9,8(r31) ffc0e5bc: 91 5f 00 0c stw r10,12(r31) } return iop->offset; ffc0e5c0: 81 3f 00 10 lwz r9,16(r31) ffc0e5c4: 81 5f 00 14 lwz r10,20(r31) } ffc0e5c8: 39 61 00 10 addi r11,r1,16 ffc0e5cc: 7d 23 4b 78 mr r3,r9 ffc0e5d0: 7d 44 53 78 mr r4,r10 ffc0e5d4: 48 00 5c 18 b ffc141ec <_restgpr_30_x> =============================================================================== ffc0e3fc : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc0e3fc: 94 21 ff f0 stwu r1,-16(r1) ffc0e400: 7c 08 02 a6 mflr r0 ffc0e404: 90 01 00 14 stw r0,20(r1) the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) ffc0e408: 80 03 00 18 lwz r0,24(r3) rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc0e40c: bf c1 00 08 stmw r30,8(r1) ffc0e410: 7c 7e 1b 78 mr r30,r3 the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) ffc0e414: 70 09 02 04 andi. r9,r0,516 uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; ffc0e418: 83 e3 00 1c lwz r31,28(r3) /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) ffc0e41c: 41 82 00 64 beq- ffc0e480 && (the_jnode->type == IMFS_LINEAR_FILE)) { ffc0e420: 80 1f 00 4c lwz r0,76(r31) ffc0e424: 2f 80 00 06 cmpwi cr7,r0,6 ffc0e428: 40 be 00 58 bne+ cr7,ffc0e480 <== ALWAYS TAKEN uint32_t count = the_jnode->info.linearfile.size; ffc0e42c: 81 1f 00 54 lwz r8,84(r31) <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; ffc0e430: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc0e434: 90 1f 00 4c stw r0,76(r31) <== NOT EXECUTED the_jnode->info.file.size = 0; ffc0e438: 39 20 00 00 li r9,0 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) ffc0e43c: 2f 88 00 00 cmpwi cr7,r8,0 <== NOT EXECUTED uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; ffc0e440: 38 00 00 00 li r0,0 <== NOT EXECUTED * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; ffc0e444: 80 ff 00 58 lwz r7,88(r31) <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; ffc0e448: 39 40 00 00 li r10,0 <== NOT EXECUTED ffc0e44c: 91 3f 00 50 stw r9,80(r31) <== NOT EXECUTED ffc0e450: 91 5f 00 54 stw r10,84(r31) <== NOT EXECUTED the_jnode->info.file.indirect = 0; ffc0e454: 90 1f 00 58 stw r0,88(r31) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; ffc0e458: 90 1f 00 5c stw r0,92(r31) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; ffc0e45c: 90 1f 00 60 stw r0,96(r31) <== NOT EXECUTED if ((count != 0) ffc0e460: 41 be 00 20 beq+ cr7,ffc0e480 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) ffc0e464: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0e468: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc0e46c: 38 c0 00 00 li r6,0 <== NOT EXECUTED ffc0e470: 4b ff fd 95 bl ffc0e204 <== NOT EXECUTED return -1; ffc0e474: 38 00 ff ff li r0,-1 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) ffc0e478: 2f 83 ff ff cmpwi cr7,r3,-1 <== NOT EXECUTED ffc0e47c: 41 9e 00 34 beq- cr7,ffc0e4b0 <== NOT EXECUTED return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) ffc0e480: 80 1e 00 18 lwz r0,24(r30) ffc0e484: 70 09 02 00 andi. r9,r0,512 ffc0e488: 41 82 00 14 beq- ffc0e49c iop->offset = the_jnode->info.file.size; ffc0e48c: 81 3f 00 50 lwz r9,80(r31) ffc0e490: 81 5f 00 54 lwz r10,84(r31) ffc0e494: 91 3e 00 10 stw r9,16(r30) ffc0e498: 91 5e 00 14 stw r10,20(r30) iop->size = the_jnode->info.file.size; ffc0e49c: 81 3f 00 50 lwz r9,80(r31) return 0; ffc0e4a0: 38 00 00 00 li r0,0 return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; ffc0e4a4: 81 5f 00 54 lwz r10,84(r31) ffc0e4a8: 91 3e 00 08 stw r9,8(r30) ffc0e4ac: 91 5e 00 0c stw r10,12(r30) return 0; } ffc0e4b0: 39 61 00 10 addi r11,r1,16 ffc0e4b4: 7c 03 03 78 mr r3,r0 ffc0e4b8: 48 00 5d 34 b ffc141ec <_restgpr_30_x> =============================================================================== ffc047c4 : /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && ffc047c4: 2b 86 00 01 cmplwi cr7,r6,1 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { ffc047c8: 94 21 ff a0 stwu r1,-96(r1) ffc047cc: 7c 08 02 a6 mflr r0 ffc047d0: be 41 00 28 stmw r18,40(r1) ffc047d4: 7c 7c 1b 78 mr r28,r3 ffc047d8: 7c 9f 23 78 mr r31,r4 ffc047dc: 90 01 00 64 stw r0,100(r1) ffc047e0: 7c b9 2b 78 mr r25,r5 ffc047e4: 7c d8 33 78 mr r24,r6 ffc047e8: 7c fa 3b 78 mr r26,r7 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && ffc047ec: 41 9d 00 14 bgt- cr7,ffc04800 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); ffc047f0: 7c a3 2b 78 mr r3,r5 ffc047f4: 48 00 80 35 bl ffc0c828 if ( !mount_h ) ffc047f8: 7c 7b 1b 79 mr. r27,r3 ffc047fc: 40 a2 00 10 bne+ ffc0480c rtems_set_errno_and_return_minus_one( EINVAL ); ffc04800: 48 00 aa 11 bl ffc0f210 <__errno> ffc04804: 38 00 00 16 li r0,22 ffc04808: 48 00 00 ec b ffc048f4 { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; bool has_target = target != NULL; ffc0480c: 7f fd 00 34 cntlzw r29,r31 ffc04810: 57 bd d9 7e rlwinm r29,r29,27,5,31 ffc04814: 6b bd 00 01 xori r29,r29,1 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; ffc04818: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0481c: 7f f6 fb 78 mr r22,r31 ffc04820: 40 be 00 0c bne+ cr7,ffc0482c ffc04824: 3e c0 ff c1 lis r22,-63 ffc04828: 3a d6 5e 20 addi r22,r22,24096 size_t filesystemtype_size = strlen( filesystemtype ) + 1; ffc0482c: 7f 23 cb 78 mr r3,r25 ffc04830: 48 00 bc 69 bl ffc10498 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; ffc04834: 2f 9c 00 00 cmpwi cr7,r28,0 const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; ffc04838: 3a a3 00 01 addi r21,r3,1 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; ffc0483c: 3a e0 00 00 li r23,0 ffc04840: 41 9e 00 10 beq- cr7,ffc04850 ffc04844: 7f 83 e3 78 mr r3,r28 ffc04848: 48 00 bc 51 bl ffc10498 ffc0484c: 3a e3 00 01 addi r23,r3,1 size_t target_size = strlen( target ) + 1; ffc04850: 7e c3 b3 78 mr r3,r22 ffc04854: 48 00 bc 45 bl ffc10498 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; ffc04858: 38 95 00 74 addi r4,r21,116 { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; ffc0485c: 3a 43 00 01 addi r18,r3,1 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; ffc04860: 7c 84 ba 14 add r4,r4,r23 { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; ffc04864: 7c 73 1b 78 mr r19,r3 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); ffc04868: 7c 84 92 14 add r4,r4,r18 ffc0486c: 38 60 00 01 li r3,1 ffc04870: 4b ff f6 fd bl ffc03f6c if ( mt_entry != NULL ) { ffc04874: 7c 7e 1b 79 mr. r30,r3 ffc04878: 41 82 00 74 beq- ffc048ec <== NEVER TAKEN char *str = (char *) mt_entry + sizeof( *mt_entry ); ffc0487c: 3a 9e 00 74 addi r20,r30,116 memcpy( str, filesystemtype, filesystemtype_size ); ffc04880: 7f 24 cb 78 mr r4,r25 ffc04884: 7e a5 ab 78 mr r5,r21 ffc04888: 7e 83 a3 78 mr r3,r20 ffc0488c: 48 00 b5 e5 bl ffc0fe70 mt_entry->type = str; str += filesystemtype_size; ffc04890: 7f 34 aa 14 add r25,r20,r21 if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; ffc04894: 92 9e 00 6c stw r20,108(r30) str += filesystemtype_size; memcpy( str, source_or_null, source_size ); ffc04898: 7e e5 bb 78 mr r5,r23 ffc0489c: 7f 84 e3 78 mr r4,r28 ffc048a0: 7f 23 cb 78 mr r3,r25 ffc048a4: 48 00 b5 cd bl ffc0fe70 mt_entry->dev = str; str += source_size; ffc048a8: 7e f9 ba 14 add r23,r25,r23 memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; ffc048ac: 93 3e 00 70 stw r25,112(r30) str += source_size; memcpy( str, target, target_size ); ffc048b0: 7e c4 b3 78 mr r4,r22 ffc048b4: 7e 45 93 78 mr r5,r18 ffc048b8: 7e e3 bb 78 mr r3,r23 ffc048bc: 48 00 b5 b5 bl ffc0fe70 mt_entry->target = str; ffc048c0: 92 fe 00 68 stw r23,104(r30) if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; ffc048c4: 3c 80 ff c1 lis r4,-63 &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; ffc048c8: 93 de 00 2c stw r30,44(r30) mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; ffc048cc: 38 7e 00 38 addi r3,r30,56 ffc048d0: 38 84 5e 60 addi r4,r4,24160 ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; ffc048d4: 93 1e 00 30 stw r24,48(r30) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; ffc048d8: 38 a0 00 30 li r5,48 ffc048dc: 48 00 b5 95 bl ffc0fe70 /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { ffc048e0: 2f 9d 00 00 cmpwi cr7,r29,0 ffc048e4: 41 be 00 d0 beq+ cr7,ffc049b4 ffc048e8: 48 00 00 18 b ffc04900 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); ffc048ec: 48 00 a9 25 bl ffc0f210 <__errno> <== NOT EXECUTED ffc048f0: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc048f4: 90 03 00 00 stw r0,0(r3) ffc048f8: 3b e0 ff ff li r31,-1 ffc048fc: 48 00 01 7c b ffc04a78 * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( ffc04900: 7f e3 fb 78 mr r3,r31 ffc04904: 3b e1 00 08 addi r31,r1,8 ffc04908: 7e 64 9b 78 mr r4,r19 ffc0490c: 38 a0 00 07 li r5,7 ffc04910: 7f e6 fb 78 mr r6,r31 ffc04914: 38 e0 00 01 li r7,1 ffc04918: 4b ff f7 3d bl ffc04054 ffc0491c: 2f 83 ff ff cmpwi cr7,r3,-1 ffc04920: 41 9e 01 30 beq- cr7,ffc04a50 <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { ffc04924: 81 21 00 14 lwz r9,20(r1) ffc04928: 7f e3 fb 78 mr r3,r31 ffc0492c: 80 09 00 10 lwz r0,16(r9) ffc04930: 7c 09 03 a6 mtctr r0 ffc04934: 4e 80 04 21 bctrl ffc04938: 2f 83 00 01 cmpwi cr7,r3,1 ffc0493c: 41 be 00 10 beq+ cr7,ffc0494c errno = ENOTDIR; ffc04940: 48 00 a8 d1 bl ffc0f210 <__errno> ffc04944: 38 00 00 14 li r0,20 ffc04948: 48 00 00 24 b ffc0496c /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { ffc0494c: 3c 60 ff c0 lis r3,-64 ffc04950: 80 81 00 08 lwz r4,8(r1) ffc04954: 38 63 46 ec addi r3,r3,18156 ffc04958: 4b ff fe 01 bl ffc04758 ffc0495c: 2f 83 00 00 cmpwi cr7,r3,0 ffc04960: 41 be 00 14 beq+ cr7,ffc04974 errno = EBUSY; ffc04964: 48 00 a8 ad bl ffc0f210 <__errno> ffc04968: 38 00 00 10 li r0,16 ffc0496c: 90 03 00 00 stw r0,0(r3) ffc04970: 48 00 00 e8 b ffc04a58 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; ffc04974: 80 01 00 08 lwz r0,8(r1) /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( loc.ops->mount_h( mt_entry ) ) { ffc04978: 7f c3 f3 78 mr r3,r30 * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; ffc0497c: 81 21 00 14 lwz r9,20(r1) if ( has_target ) { if ( rtems_filesystem_evaluate_path( target, target_length, RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) goto cleanup_and_bail; loc_to_free = &loc; ffc04980: 7f fc fb 78 mr r28,r31 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; ffc04984: 90 1e 00 08 stw r0,8(r30) mt_entry->mt_point_node.handlers = loc.handlers; ffc04988: 80 01 00 10 lwz r0,16(r1) mt_entry->mt_point_node.ops = loc.ops; ffc0498c: 91 3e 00 14 stw r9,20(r30) * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; ffc04990: 90 1e 00 10 stw r0,16(r30) mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; ffc04994: 80 01 00 18 lwz r0,24(r1) ffc04998: 90 1e 00 18 stw r0,24(r30) /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( loc.ops->mount_h( mt_entry ) ) { ffc0499c: 80 09 00 20 lwz r0,32(r9) ffc049a0: 7c 09 03 a6 mtctr r0 ffc049a4: 4e 80 04 21 bctrl ffc049a8: 2f 83 00 00 cmpwi cr7,r3,0 ffc049ac: 41 be 00 34 beq+ cr7,ffc049e0 <== ALWAYS TAKEN ffc049b0: 48 00 00 a8 b ffc04a58 <== NOT EXECUTED stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } ffc049b4: 3d 20 00 00 lis r9,0 ffc049b8: 39 69 21 6c addi r11,r9,8556 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { ffc049bc: 81 29 21 6c lwz r9,8556(r9) */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail( const Chain_Control *the_chain ) { return &the_chain->Tail.Node; ffc049c0: 38 0b 00 04 addi r0,r11,4 ffc049c4: 7f 89 00 00 cmpw cr7,r9,r0 ) { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; ffc049c8: 3b 80 00 00 li r28,0 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { ffc049cc: 41 be 00 14 beq+ cr7,ffc049e0 <== ALWAYS TAKEN errno = EINVAL; ffc049d0: 48 00 a8 41 bl ffc0f210 <__errno> <== NOT EXECUTED ffc049d4: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc049d8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED goto cleanup_and_bail; ffc049dc: 48 00 00 80 b ffc04a5c <== NOT EXECUTED * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { ffc049e0: 7f c3 f3 78 mr r3,r30 ffc049e4: 7f 69 03 a6 mtctr r27 ffc049e8: 7f 44 d3 78 mr r4,r26 ffc049ec: 4e 80 04 21 bctrl ffc049f0: 2f 83 00 00 cmpwi cr7,r3,0 ffc049f4: 41 be 00 1c beq+ cr7,ffc04a10 /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); ffc049f8: 81 21 00 14 lwz r9,20(r1) ffc049fc: 7f c3 f3 78 mr r3,r30 ffc04a00: 80 09 00 28 lwz r0,40(r9) ffc04a04: 7c 09 03 a6 mtctr r0 ffc04a08: 4e 80 04 21 bctrl goto cleanup_and_bail; ffc04a0c: 48 00 00 50 b ffc04a5c } /* * Add the mount table entry to the mount table chain */ rtems_libio_lock(); ffc04a10: 4b ff fc f1 bl ffc04700 ffc04a14: 3c 60 00 00 lis r3,0 ffc04a18: 38 63 21 6c addi r3,r3,8556 ffc04a1c: 7f c4 f3 78 mr r4,r30 ffc04a20: 48 00 38 e9 bl ffc08308 <_Chain_Append> rtems_libio_unlock(); if ( !has_target ) rtems_filesystem_root = mt_entry->mt_fs_root; return 0; ffc04a24: 3b e0 00 00 li r31,0 /* * Add the mount table entry to the mount table chain */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); ffc04a28: 4b ff fd 09 bl ffc04730 if ( !has_target ) ffc04a2c: 2f 9d 00 00 cmpwi cr7,r29,0 ffc04a30: 40 9e 00 48 bne- cr7,ffc04a78 rtems_filesystem_root = mt_entry->mt_fs_root; ffc04a34: 3d 20 00 00 lis r9,0 ffc04a38: 81 69 26 e4 lwz r11,9956(r9) ffc04a3c: 38 7e 00 1c addi r3,r30,28 ffc04a40: 39 6b 00 18 addi r11,r11,24 ffc04a44: 7c a3 a4 aa lswi r5,r3,20 ffc04a48: 7c ab a5 aa stswi r5,r11,20 ffc04a4c: 48 00 00 2c b ffc04a78 ) { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; ffc04a50: 3b 80 00 00 li r28,0 <== NOT EXECUTED ffc04a54: 48 00 00 08 b ffc04a5c <== NOT EXECUTED if ( has_target ) { if ( rtems_filesystem_evaluate_path( target, target_length, RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) goto cleanup_and_bail; loc_to_free = &loc; ffc04a58: 7f fc fb 78 mr r28,r31 return 0; cleanup_and_bail: free( mt_entry ); ffc04a5c: 7f c3 f3 78 mr r3,r30 ffc04a60: 4b ff f7 15 bl ffc04174 if ( loc_to_free ) ffc04a64: 2f 9c 00 00 cmpwi cr7,r28,0 rtems_filesystem_freenode( loc_to_free ); return -1; ffc04a68: 3b e0 ff ff li r31,-1 cleanup_and_bail: free( mt_entry ); if ( loc_to_free ) ffc04a6c: 41 be 00 0c beq+ cr7,ffc04a78 <== NEVER TAKEN rtems_filesystem_freenode( loc_to_free ); ffc04a70: 7f 83 e3 78 mr r3,r28 ffc04a74: 4b ff f6 d5 bl ffc04148 return -1; } ffc04a78: 39 61 00 60 addi r11,r1,96 ffc04a7c: 7f e3 fb 78 mr r3,r31 ffc04a80: 48 00 f7 3c b ffc141bc <_restgpr_18_x> =============================================================================== ffc04cbc : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { ffc04cbc: 94 21 ff e0 stwu r1,-32(r1) ffc04cc0: 7c 08 02 a6 mflr r0 ffc04cc4: bf c1 00 18 stmw r30,24(r1) int rv = -1; if (target != NULL) { ffc04cc8: 7c 9e 23 79 mr. r30,r4 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { ffc04ccc: 7c 7f 1b 78 mr r31,r3 ffc04cd0: 90 01 00 24 stw r0,36(r1) int rv = -1; if (target != NULL) { ffc04cd4: 41 82 00 40 beq- ffc04d14 rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); ffc04cd8: 7f c3 f3 78 mr r3,r30 ffc04cdc: 90 a1 00 08 stw r5,8(r1) ffc04ce0: 38 80 01 ff li r4,511 ffc04ce4: 90 c1 00 0c stw r6,12(r1) ffc04ce8: 90 e1 00 10 stw r7,16(r1) ffc04cec: 48 00 09 d5 bl ffc056c0 if (rv == 0) { ffc04cf0: 2c 03 00 00 cmpwi r3,0 ffc04cf4: 80 a1 00 08 lwz r5,8(r1) ffc04cf8: 80 c1 00 0c lwz r6,12(r1) ffc04cfc: 80 e1 00 10 lwz r7,16(r1) ffc04d00: 40 a2 00 24 bne+ ffc04d24 <== NEVER TAKEN rv = mount( ffc04d04: 7f e3 fb 78 mr r3,r31 ffc04d08: 7f c4 f3 78 mr r4,r30 ffc04d0c: 48 00 00 f9 bl ffc04e04 ffc04d10: 48 00 00 14 b ffc04d24 options, data ); } } else { errno = EINVAL; ffc04d14: 48 00 a9 2d bl ffc0f640 <__errno> ffc04d18: 38 00 00 16 li r0,22 ffc04d1c: 90 03 00 00 stw r0,0(r3) const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; ffc04d20: 38 60 ff ff li r3,-1 } else { errno = EINVAL; } return rv; } ffc04d24: 39 61 00 20 addi r11,r1,32 ffc04d28: 48 00 f8 0c b ffc14534 <_restgpr_30_x> =============================================================================== ffc04ca0 : /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ffc04ca0: 7f 83 20 00 cmpw cr7,r3,r4 void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { ffc04ca4: 94 21 ff e8 stwu r1,-24(r1) ffc04ca8: 7c 08 02 a6 mflr r0 ffc04cac: bf a1 00 0c stmw r29,12(r1) ffc04cb0: 7c 7d 1b 78 mr r29,r3 ffc04cb4: 7c 9e 23 78 mr r30,r4 ffc04cb8: 90 01 00 1c stw r0,28(r1) /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ffc04cbc: 40 be 00 10 bne+ cr7,ffc04ccc ptr = _REENT; ffc04cc0: 3d 20 00 00 lis r9,0 ffc04cc4: 83 e9 26 f0 lwz r31,9968(r9) ffc04cc8: 48 00 00 08 b ffc04cd0 } else { ptr = deleted_task->libc_reent; ffc04ccc: 83 e4 01 28 lwz r31,296(r4) } if (ptr && ptr != _global_impure_ptr) { ffc04cd0: 2f 9f 00 00 cmpwi cr7,r31,0 ffc04cd4: 41 9e 00 2c beq- cr7,ffc04d00 <== NEVER TAKEN ffc04cd8: 3d 20 00 00 lis r9,0 ffc04cdc: 80 09 26 f4 lwz r0,9972(r9) ffc04ce0: 7f 9f 00 00 cmpw cr7,r31,r0 ffc04ce4: 41 9e 00 1c beq- cr7,ffc04d00 _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); ffc04ce8: 3c 80 ff c0 lis r4,-64 ffc04cec: 7f e3 fb 78 mr r3,r31 ffc04cf0: 38 84 4a 88 addi r4,r4,19080 ffc04cf4: 48 00 af 79 bl ffc0fc6c <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); ffc04cf8: 7f e3 fb 78 mr r3,r31 ffc04cfc: 48 00 66 21 bl ffc0b31c <_Workspace_Free> /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { ffc04d00: 7f 9d f0 00 cmpw cr7,r29,r30 #else _Workspace_Free(ptr); #endif } deleted_task->libc_reent = NULL; ffc04d04: 38 00 00 00 li r0,0 ffc04d08: 90 1e 01 28 stw r0,296(r30) /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { ffc04d0c: 40 be 00 0c bne+ cr7,ffc04d18 _REENT = 0; ffc04d10: 3d 20 00 00 lis r9,0 ffc04d14: 90 09 26 f0 stw r0,9968(r9) } } ffc04d18: 39 61 00 18 addi r11,r1,24 ffc04d1c: 48 00 f4 cc b ffc141e8 <_restgpr_29_x> =============================================================================== ffc04a88 : */ int newlib_free_buffers( FILE *fp ) { ffc04a88: 7c 2b 0b 78 mr r11,r1 ffc04a8c: 7c 08 02 a6 mflr r0 ffc04a90: 94 21 ff f0 stwu r1,-16(r1) ffc04a94: 48 00 f7 11 bl ffc141a4 <_savegpr_31> ffc04a98: 90 01 00 14 stw r0,20(r1) ffc04a9c: 7c 7f 1b 78 mr r31,r3 switch ( fileno(fp) ) { ffc04aa0: 48 00 ac 55 bl ffc0f6f4 ffc04aa4: 2b 83 00 02 cmplwi cr7,r3,2 ffc04aa8: 41 9d 00 34 bgt- cr7,ffc04adc <== NEVER TAKEN case 0: case 1: case 2: if (fp->_flags & __SMBF) { ffc04aac: a0 1f 00 0c lhz r0,12(r31) ffc04ab0: 70 09 00 80 andi. r9,r0,128 ffc04ab4: 41 a2 00 30 beq+ ffc04ae4 <== ALWAYS TAKEN free( fp->_bf._base ); ffc04ab8: 80 7f 00 10 lwz r3,16(r31) ffc04abc: 4b ff f6 b9 bl ffc04174 <== NOT EXECUTED fp->_flags &= ~__SMBF; ffc04ac0: a0 1f 00 0c lhz r0,12(r31) <== NOT EXECUTED ffc04ac4: 54 00 06 6e rlwinm r0,r0,0,25,23 <== NOT EXECUTED ffc04ac8: b0 1f 00 0c sth r0,12(r31) <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; ffc04acc: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc04ad0: 90 1f 00 00 stw r0,0(r31) <== NOT EXECUTED ffc04ad4: 90 1f 00 10 stw r0,16(r31) <== NOT EXECUTED ffc04ad8: 48 00 00 0c b ffc04ae4 <== NOT EXECUTED } break; default: fclose(fp); ffc04adc: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc04ae0: 48 00 a8 d1 bl ffc0f3b0 <== NOT EXECUTED } return 0; } ffc04ae4: 39 61 00 10 addi r11,r1,16 ffc04ae8: 38 60 00 00 li r3,0 ffc04aec: 48 00 f7 04 b ffc141f0 <_restgpr_31_x> =============================================================================== ffc04db0 : int open( const char *pathname, int flags, ... ) { ffc04db0: 94 21 ff b0 stwu r1,-80(r1) ffc04db4: 7c 08 02 a6 mflr r0 ffc04db8: 90 01 00 54 stw r0,84(r1) /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; ffc04dbc: 38 04 00 01 addi r0,r4,1 if ( ( status & _FREAD ) == _FREAD ) ffc04dc0: 70 09 00 01 andi. r9,r0,1 int open( const char *pathname, int flags, ... ) { ffc04dc4: bf 21 00 34 stmw r25,52(r1) ffc04dc8: 7c 7d 1b 78 mr r29,r3 ffc04dcc: 7c 9e 23 78 mr r30,r4 ffc04dd0: 90 a1 00 28 stw r5,40(r1) int eval_flags; /* * Set the Evaluation flags */ eval_flags = 0; ffc04dd4: 3b 80 00 00 li r28,0 status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) ffc04dd8: 41 82 00 08 beq- ffc04de0 eval_flags |= RTEMS_LIBIO_PERMS_READ; ffc04ddc: 3b 80 00 04 li r28,4 if ( ( status & _FWRITE ) == _FWRITE ) ffc04de0: 70 09 00 02 andi. r9,r0,2 ffc04de4: 41 82 00 08 beq- ffc04dec eval_flags |= RTEMS_LIBIO_PERMS_WRITE; ffc04de8: 63 9c 00 02 ori r28,r28,2 va_start(ap, flags); ffc04dec: 38 01 00 58 addi r0,r1,88 ffc04df0: 90 01 00 0c stw r0,12(r1) ffc04df4: 39 21 00 20 addi r9,r1,32 mode = va_arg( ap, int ); ffc04df8: 38 00 00 03 li r0,3 if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); ffc04dfc: 91 21 00 10 stw r9,16(r1) mode = va_arg( ap, int ); ffc04e00: 98 01 00 08 stb r0,8(r1) ffc04e04: 83 69 00 08 lwz r27,8(r9) * code does not require changes here since network file * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); ffc04e08: 48 00 76 d9 bl ffc0c4e0 if ( iop == 0 ) { ffc04e0c: 7c 7f 1b 79 mr. r31,r3 ffc04e10: 41 82 01 74 beq- ffc04f84 } /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( ffc04e14: 7f a3 eb 78 mr r3,r29 ffc04e18: 48 00 b6 81 bl ffc10498 ffc04e1c: 3b 41 00 14 addi r26,r1,20 ffc04e20: 7c 64 1b 78 mr r4,r3 ffc04e24: 7f 85 e3 78 mr r5,r28 ffc04e28: 7f a3 eb 78 mr r3,r29 ffc04e2c: 7f 46 d3 78 mr r6,r26 ffc04e30: 38 e0 00 01 li r7,1 ffc04e34: 4b ff f2 21 bl ffc04054 pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { ffc04e38: 2f 83 ff ff cmpwi cr7,r3,-1 ffc04e3c: 40 be 00 80 bne+ cr7,ffc04ebc if ( errno != ENOENT ) { ffc04e40: 48 00 a3 d1 bl ffc0f210 <__errno> ffc04e44: 80 03 00 00 lwz r0,0(r3) ffc04e48: 2f 80 00 02 cmpwi cr7,r0,2 ffc04e4c: 41 9e 00 14 beq- cr7,ffc04e60 rc = errno; ffc04e50: 48 00 a3 c1 bl ffc0f210 <__errno> int mode; int rc; rtems_libio_t *iop = 0; int status; rtems_filesystem_location_info_t loc; rtems_filesystem_location_info_t *loc_to_free = NULL; ffc04e54: 3b 80 00 00 li r28,0 status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { rc = errno; ffc04e58: 83 23 00 00 lwz r25,0(r3) goto done; ffc04e5c: 48 00 01 3c b ffc04f98 } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { ffc04e60: 73 c0 02 00 andi. r0,r30,512 int mode; int rc; rtems_libio_t *iop = 0; int status; rtems_filesystem_location_info_t loc; rtems_filesystem_location_info_t *loc_to_free = NULL; ffc04e64: 3b 80 00 00 li r28,0 goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { rc = ENOENT; ffc04e68: 3b 20 00 02 li r25,2 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { ffc04e6c: 41 a2 01 34 beq+ ffc04fa0 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); ffc04e70: 7f a3 eb 78 mr r3,r29 ffc04e74: 63 64 80 00 ori r4,r27,32768 ffc04e78: 38 a0 00 00 li r5,0 ffc04e7c: 38 c0 00 00 li r6,0 ffc04e80: 4b ff f7 b9 bl ffc04638 if ( rc ) { ffc04e84: 2f 83 00 00 cmpwi cr7,r3,0 ffc04e88: 40 9e 00 8c bne- cr7,ffc04f14 <== NEVER TAKEN /* * After we do the mknod(), we have to evaluate the path to get the * "loc" structure needed to actually have the file itself open. * So we created it, and then we need to have "look it up." */ status = rtems_filesystem_evaluate_path( ffc04e8c: 7f a3 eb 78 mr r3,r29 ffc04e90: 48 00 b6 09 bl ffc10498 ffc04e94: 38 a0 00 00 li r5,0 ffc04e98: 7c 64 1b 78 mr r4,r3 ffc04e9c: 7f 46 d3 78 mr r6,r26 ffc04ea0: 7f a3 eb 78 mr r3,r29 ffc04ea4: 38 e0 00 01 li r7,1 ffc04ea8: 4b ff f1 ad bl ffc04054 pathname, strlen( pathname ), 0x0, &loc, true ); if ( status != 0 ) { /* The file did not exist */ rc = EACCES; ffc04eac: 3b 20 00 0d li r25,13 * "loc" structure needed to actually have the file itself open. * So we created it, and then we need to have "look it up." */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); if ( status != 0 ) { /* The file did not exist */ ffc04eb0: 2f 83 00 00 cmpwi cr7,r3,0 ffc04eb4: 40 9e 00 ec bne- cr7,ffc04fa0 <== NEVER TAKEN ffc04eb8: 48 00 00 10 b ffc04ec8 rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { ffc04ebc: 73 c0 0a 00 andi. r0,r30,2560 ffc04ec0: 2f 80 0a 00 cmpwi cr7,r0,2560 ffc04ec4: 41 9e 00 c8 beq- cr7,ffc04f8c /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->flags |= rtems_libio_fcntl_flags( flags ); ffc04ec8: 83 9f 00 18 lwz r28,24(r31) ffc04ecc: 7f c3 f3 78 mr r3,r30 ffc04ed0: 48 00 75 81 bl ffc0c450 iop->pathinfo = loc; ffc04ed4: 39 7f 00 1c addi r11,r31,28 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->flags |= rtems_libio_fcntl_flags( flags ); ffc04ed8: 7c 63 e3 78 or r3,r3,r28 iop->pathinfo = loc; ffc04edc: 3b 81 00 14 addi r28,r1,20 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->flags |= rtems_libio_fcntl_flags( flags ); ffc04ee0: 90 7f 00 18 stw r3,24(r31) iop->pathinfo = loc; rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); ffc04ee4: 7f a4 eb 78 mr r4,r29 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; ffc04ee8: 7c bc a4 aa lswi r5,r28,20 ffc04eec: 7c ab a5 aa stswi r5,r11,20 rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); ffc04ef0: 7f e3 fb 78 mr r3,r31 ffc04ef4: 7f c5 f3 78 mr r5,r30 ffc04ef8: 81 3f 00 24 lwz r9,36(r31) ffc04efc: 7f 66 db 78 mr r6,r27 ffc04f00: 80 09 00 00 lwz r0,0(r9) ffc04f04: 7c 09 03 a6 mtctr r0 ffc04f08: 4e 80 04 21 bctrl if ( rc ) { ffc04f0c: 2f 83 00 00 cmpwi cr7,r3,0 ffc04f10: 41 be 00 10 beq+ cr7,ffc04f20 rc = errno; ffc04f14: 48 00 a2 fd bl ffc0f210 <__errno> ffc04f18: 83 23 00 00 lwz r25,0(r3) goto done; ffc04f1c: 48 00 00 7c b ffc04f98 } /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { ffc04f20: 73 c0 04 00 andi. r0,r30,1024 ffc04f24: 41 a2 00 ac beq+ ffc04fd0 rc = ftruncate( iop - rtems_libio_iops, 0 ); ffc04f28: 3d 20 00 00 lis r9,0 ffc04f2c: 80 69 27 48 lwz r3,10056(r9) ffc04f30: 38 a0 00 00 li r5,0 ffc04f34: 38 c0 00 00 li r6,0 ffc04f38: 7c 63 f8 50 subf r3,r3,r31 ffc04f3c: 7c 63 36 70 srawi r3,r3,6 ffc04f40: 48 00 73 f1 bl ffc0c330 if ( rc ) { ffc04f44: 7c 79 1b 79 mr. r25,r3 ffc04f48: 41 a2 00 88 beq+ ffc04fd0 if(errno) rc = errno; ffc04f4c: 48 00 a2 c5 bl ffc0f210 <__errno> ffc04f50: 80 03 00 00 lwz r0,0(r3) ffc04f54: 2f 80 00 00 cmpwi cr7,r0,0 ffc04f58: 41 be 00 0c beq+ cr7,ffc04f64 <== NEVER TAKEN ffc04f5c: 48 00 a2 b5 bl ffc0f210 <__errno> ffc04f60: 83 23 00 00 lwz r25,0(r3) close( iop - rtems_libio_iops ); ffc04f64: 3d 20 00 00 lis r9,0 ffc04f68: 80 09 27 48 lwz r0,10056(r9) /* those are released by close(): */ iop = 0; loc_to_free = NULL; ffc04f6c: 3b 80 00 00 li r28,0 */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; close( iop - rtems_libio_iops ); ffc04f70: 7f e0 f8 50 subf r31,r0,r31 ffc04f74: 7f e3 36 70 srawi r3,r31,6 ffc04f78: 48 00 73 2d bl ffc0c2a4 /* those are released by close(): */ iop = 0; ffc04f7c: 3b e0 00 00 li r31,0 ffc04f80: 48 00 00 18 b ffc04f98 */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { rc = ENFILE; ffc04f84: 3b 20 00 17 li r25,23 ffc04f88: 48 00 00 38 b ffc04fc0 } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { /* We were trying to create a file that already exists */ rc = EEXIST; loc_to_free = &loc; ffc04f8c: 7f 5c d3 78 mr r28,r26 goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { /* We were trying to create a file that already exists */ rc = EEXIST; ffc04f90: 3b 20 00 11 li r25,17 ffc04f94: 48 00 00 0c b ffc04fa0 * Single exit and clean up path. */ done: va_end(ap); if ( rc ) { ffc04f98: 2f 99 00 00 cmpwi cr7,r25,0 ffc04f9c: 41 be 00 34 beq+ cr7,ffc04fd0 <== NEVER TAKEN if ( iop ) ffc04fa0: 2f 9f 00 00 cmpwi cr7,r31,0 ffc04fa4: 41 9e 00 0c beq- cr7,ffc04fb0 rtems_libio_free( iop ); ffc04fa8: 7f e3 fb 78 mr r3,r31 ffc04fac: 48 00 75 cd bl ffc0c578 if ( loc_to_free ) ffc04fb0: 2f 9c 00 00 cmpwi cr7,r28,0 ffc04fb4: 41 9e 00 0c beq- cr7,ffc04fc0 rtems_filesystem_freenode( loc_to_free ); ffc04fb8: 7f 83 e3 78 mr r3,r28 ffc04fbc: 4b ff f1 8d bl ffc04148 rtems_set_errno_and_return_minus_one( rc ); ffc04fc0: 48 00 a2 51 bl ffc0f210 <__errno> ffc04fc4: 93 23 00 00 stw r25,0(r3) ffc04fc8: 38 60 ff ff li r3,-1 ffc04fcc: 48 00 00 14 b ffc04fe0 } return iop - rtems_libio_iops; ffc04fd0: 3d 20 00 00 lis r9,0 ffc04fd4: 80 69 27 48 lwz r3,10056(r9) ffc04fd8: 7f e3 f8 50 subf r31,r3,r31 ffc04fdc: 7f e3 36 70 srawi r3,r31,6 } ffc04fe0: 39 61 00 50 addi r11,r1,80 ffc04fe4: 48 00 f1 f4 b ffc141d8 <_restgpr_25_x> =============================================================================== ffc05ce0 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { ffc05ce0: 7c 08 02 a6 mflr r0 ffc05ce4: 7c 2b 0b 78 mr r11,r1 ffc05ce8: 94 21 ff e8 stwu r1,-24(r1) ffc05cec: 90 01 00 1c stw r0,28(r1) ffc05cf0: 48 00 e4 b5 bl ffc141a4 <_savegpr_31> ffc05cf4: 7c 9f 23 78 mr r31,r4 ffc05cf8: 98 61 00 08 stb r3,8(r1) int i; if (tty->termios.c_oflag & OPOST) { ffc05cfc: 80 04 00 34 lwz r0,52(r4) ffc05d00: 70 09 00 01 andi. r9,r0,1 ffc05d04: 41 82 01 30 beq- ffc05e34 <== NEVER TAKEN switch (c) { ffc05d08: 2f 83 00 09 cmpwi cr7,r3,9 ffc05d0c: 41 9e 00 90 beq- cr7,ffc05d9c ffc05d10: 2b 83 00 09 cmplwi cr7,r3,9 ffc05d14: 41 9d 00 10 bgt- cr7,ffc05d24 <== ALWAYS TAKEN ffc05d18: 2f 83 00 08 cmpwi cr7,r3,8 <== NOT EXECUTED ffc05d1c: 40 be 00 c4 bne+ cr7,ffc05de0 <== NOT EXECUTED ffc05d20: 48 00 00 a8 b ffc05dc8 <== NOT EXECUTED ffc05d24: 2f 83 00 0a cmpwi cr7,r3,10 ffc05d28: 41 9e 00 10 beq- cr7,ffc05d38 ffc05d2c: 2f 83 00 0d cmpwi cr7,r3,13 ffc05d30: 40 be 00 b0 bne+ cr7,ffc05de0 <== ALWAYS TAKEN ffc05d34: 48 00 00 34 b ffc05d68 <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) ffc05d38: 70 09 00 20 andi. r9,r0,32 ffc05d3c: 41 82 00 0c beq- ffc05d48 <== ALWAYS TAKEN tty->column = 0; ffc05d40: 39 20 00 00 li r9,0 <== NOT EXECUTED ffc05d44: 91 24 00 28 stw r9,40(r4) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { ffc05d48: 70 09 00 04 andi. r9,r0,4 ffc05d4c: 41 a2 00 e8 beq+ ffc05e34 <== NEVER TAKEN rtems_termios_puts ("\r", 1, tty); ffc05d50: 3c 60 ff c1 lis r3,-63 ffc05d54: 38 63 5e 92 addi r3,r3,24210 ffc05d58: 38 80 00 01 li r4,1 ffc05d5c: 7f e5 fb 78 mr r5,r31 ffc05d60: 4b ff fe 59 bl ffc05bb8 ffc05d64: 48 00 00 30 b ffc05d94 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) ffc05d68: 70 09 00 10 andi. r9,r0,16 <== NOT EXECUTED ffc05d6c: 41 82 00 10 beq- ffc05d7c <== NOT EXECUTED ffc05d70: 81 24 00 28 lwz r9,40(r4) <== NOT EXECUTED ffc05d74: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc05d78: 41 9e 00 cc beq- cr7,ffc05e44 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { ffc05d7c: 70 09 00 08 andi. r9,r0,8 <== NOT EXECUTED ffc05d80: 41 82 00 58 beq- ffc05dd8 <== NOT EXECUTED c = '\n'; ffc05d84: 39 20 00 0a li r9,10 <== NOT EXECUTED ffc05d88: 99 21 00 08 stb r9,8(r1) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) ffc05d8c: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED ffc05d90: 41 82 00 a4 beq- ffc05e34 <== NOT EXECUTED tty->column = 0; ffc05d94: 38 00 00 00 li r0,0 ffc05d98: 48 00 00 98 b ffc05e30 tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { ffc05d9c: 54 00 04 e8 rlwinm r0,r0,0,19,20 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); ffc05da0: 81 24 00 28 lwz r9,40(r4) if ((tty->termios.c_oflag & TABDLY) == XTABS) { ffc05da4: 2f 80 18 00 cmpwi cr7,r0,6144 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); ffc05da8: 55 24 07 7e clrlwi r4,r9,29 ffc05dac: 20 84 00 08 subfic r4,r4,8 ffc05db0: 7c 04 4a 14 add r0,r4,r9 if ((tty->termios.c_oflag & TABDLY) == XTABS) { ffc05db4: 40 be 00 7c bne+ cr7,ffc05e30 <== NEVER TAKEN tty->column += i; rtems_termios_puts ( " ", i, tty); ffc05db8: 3c 60 ff c1 lis r3,-63 break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; ffc05dbc: 90 1f 00 28 stw r0,40(r31) rtems_termios_puts ( " ", i, tty); ffc05dc0: 38 63 5b 36 addi r3,r3,23350 ffc05dc4: 48 00 00 78 b ffc05e3c } tty->column += i; break; case '\b': if (tty->column > 0) ffc05dc8: 81 24 00 28 lwz r9,40(r4) <== NOT EXECUTED ffc05dcc: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc05dd0: 40 9d 00 64 ble- cr7,ffc05e34 <== NOT EXECUTED tty->column--; ffc05dd4: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED ffc05dd8: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED ffc05ddc: 48 00 00 58 b ffc05e34 <== NOT EXECUTED break; default: if (tty->termios.c_oflag & OLCUC) ffc05de0: 70 09 00 02 andi. r9,r0,2 ffc05de4: 41 82 00 28 beq- ffc05e0c <== ALWAYS TAKEN c = toupper(c); ffc05de8: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc05dec: 81 29 26 ec lwz r9,9964(r9) <== NOT EXECUTED ffc05df0: 7d 29 1a 14 add r9,r9,r3 <== NOT EXECUTED ffc05df4: 88 09 00 01 lbz r0,1(r9) <== NOT EXECUTED ffc05df8: 54 00 07 be clrlwi r0,r0,30 <== NOT EXECUTED ffc05dfc: 2f 80 00 02 cmpwi cr7,r0,2 <== NOT EXECUTED ffc05e00: 40 be 00 08 bne+ cr7,ffc05e08 <== NOT EXECUTED ffc05e04: 38 63 ff e0 addi r3,r3,-32 <== NOT EXECUTED ffc05e08: 98 61 00 08 stb r3,8(r1) <== NOT EXECUTED if (!iscntrl(c)) ffc05e0c: 3d 20 00 00 lis r9,0 ffc05e10: 88 01 00 08 lbz r0,8(r1) ffc05e14: 81 29 26 ec lwz r9,9964(r9) ffc05e18: 7d 29 02 14 add r9,r9,r0 ffc05e1c: 88 09 00 01 lbz r0,1(r9) ffc05e20: 70 09 00 20 andi. r9,r0,32 ffc05e24: 40 82 00 10 bne- ffc05e34 <== NEVER TAKEN tty->column++; ffc05e28: 81 3f 00 28 lwz r9,40(r31) ffc05e2c: 38 09 00 01 addi r0,r9,1 ffc05e30: 90 1f 00 28 stw r0,40(r31) break; } } rtems_termios_puts (&c, 1, tty); ffc05e34: 38 61 00 08 addi r3,r1,8 ffc05e38: 38 80 00 01 li r4,1 ffc05e3c: 7f e5 fb 78 mr r5,r31 ffc05e40: 4b ff fd 79 bl ffc05bb8 } ffc05e44: 39 61 00 18 addi r11,r1,24 ffc05e48: 48 00 e3 a8 b ffc141f0 <_restgpr_31_x> =============================================================================== ffc0d720 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc0d720: 94 21 ff d8 stwu r1,-40(r1) ffc0d724: 7c 08 02 a6 mflr r0 rtems_libio_t *iop; int err = 0; if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) ffc0d728: 38 80 01 ff li r4,511 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc0d72c: bf 81 00 18 stmw r28,24(r1) ffc0d730: 7c 7d 1b 78 mr r29,r3 rtems_libio_t *iop; int err = 0; if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) ffc0d734: 3c 60 ff c2 lis r3,-62 ffc0d738: 38 63 e6 40 addi r3,r3,-6592 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc0d73c: 90 01 00 2c stw r0,44(r1) rtems_libio_t *iop; int err = 0; if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) ffc0d740: 48 00 17 f5 bl ffc0ef34 return -1; ffc0d744: 3b c0 ff ff li r30,-1 ) { rtems_libio_t *iop; int err = 0; if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) ffc0d748: 2f 83 00 00 cmpwi cr7,r3,0 ffc0d74c: 40 be 01 04 bne+ cr7,ffc0d850 <== NEVER TAKEN return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); ffc0d750: 3d 20 ff c2 lis r9,-62 ffc0d754: 3b e1 00 08 addi r31,r1,8 ffc0d758: 39 29 e6 45 addi r9,r9,-6587 ffc0d75c: 7c a9 54 aa lswi r5,r9,10 ffc0d760: 7c bf 55 aa stswi r5,r31,10 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc0d764: 3d 20 00 00 lis r9,0 ffc0d768: 3c 80 ff c2 lis r4,-62 ffc0d76c: a0 a9 29 40 lhz r5,10560(r9) ffc0d770: 38 84 e6 50 addi r4,r4,-6576 ffc0d774: 38 61 00 12 addi r3,r1,18 ffc0d778: 38 05 00 01 addi r0,r5,1 ffc0d77c: b0 09 29 40 sth r0,10560(r9) ffc0d780: 4c c6 31 82 crclr 4*cr1+eq ffc0d784: 48 00 42 55 bl ffc119d8 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { ffc0d788: 7f e3 fb 78 mr r3,r31 ffc0d78c: 38 80 01 80 li r4,384 ffc0d790: 48 00 14 a1 bl ffc0ec30 ffc0d794: 2f 83 00 00 cmpwi cr7,r3,0 ffc0d798: 41 be 00 0c beq+ cr7,ffc0d7a4 if (errno != EEXIST){ ffc0d79c: 48 00 33 35 bl ffc10ad0 <__errno> ffc0d7a0: 48 00 00 b0 b ffc0d850 return -1; /* sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); */ } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); ffc0d7a4: 7f e3 fb 78 mr r3,r31 ffc0d7a8: 38 80 40 00 li r4,16384 ffc0d7ac: 4c c6 31 82 crclr 4*cr1+eq ffc0d7b0: 4b ff 8b 95 bl ffc06344 if (filsdes[0] < 0) { ffc0d7b4: 2f 83 00 00 cmpwi cr7,r3,0 return -1; /* sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); */ } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); ffc0d7b8: 90 7d 00 00 stw r3,0(r29) if (filsdes[0] < 0) { ffc0d7bc: 40 bc 00 14 bge+ cr7,ffc0d7d0 err = errno; ffc0d7c0: 48 00 33 11 bl ffc10ad0 <__errno> ffc0d7c4: 83 83 00 00 lwz r28,0(r3) /* Delete file at errors, or else if pipe is successfully created the file node will be deleted after it is closed by all. */ unlink(fifopath); ffc0d7c8: 7f e3 fb 78 mr r3,r31 ffc0d7cc: 48 00 00 68 b ffc0d834 } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); ffc0d7d0: 3d 20 00 00 lis r9,0 ffc0d7d4: 80 09 26 ac lwz r0,9900(r9) ffc0d7d8: 39 20 00 00 li r9,0 ffc0d7dc: 7f 83 00 40 cmplw cr7,r3,r0 ffc0d7e0: 40 9c 00 14 bge- cr7,ffc0d7f4 <== NEVER TAKEN ffc0d7e4: 3d 20 00 00 lis r9,0 ffc0d7e8: 81 29 27 68 lwz r9,10088(r9) ffc0d7ec: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc0d7f0: 7d 29 1a 14 add r9,r9,r3 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; ffc0d7f4: 80 09 00 18 lwz r0,24(r9) filsdes[1] = open(fifopath, O_WRONLY); ffc0d7f8: 38 61 00 08 addi r3,r1,8 ffc0d7fc: 38 80 00 01 li r4,1 unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; ffc0d800: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc0d804: 90 09 00 18 stw r0,24(r9) int pipe_create( int filsdes[2] ) { rtems_libio_t *iop; int err = 0; ffc0d808: 3b 80 00 00 li r28,0 else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); ffc0d80c: 4c c6 31 82 crclr 4*cr1+eq ffc0d810: 4b ff 8b 35 bl ffc06344 if (filsdes[1] < 0) { ffc0d814: 2f 83 00 00 cmpwi cr7,r3,0 else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); ffc0d818: 90 7d 00 04 stw r3,4(r29) if (filsdes[1] < 0) { ffc0d81c: 40 bc 00 14 bge+ cr7,ffc0d830 err = errno; ffc0d820: 48 00 32 b1 bl ffc10ad0 <__errno> ffc0d824: 83 83 00 00 lwz r28,0(r3) close(filsdes[0]); ffc0d828: 80 7d 00 00 lwz r3,0(r29) ffc0d82c: 4b ff 79 a1 bl ffc051cc } unlink(fifopath); ffc0d830: 38 61 00 08 addi r3,r1,8 ffc0d834: 4b ff ab b1 bl ffc083e4 } if(err != 0) ffc0d838: 2f 9c 00 00 cmpwi cr7,r28,0 rtems_set_errno_and_return_minus_one(err); return 0; ffc0d83c: 3b c0 00 00 li r30,0 err = errno; close(filsdes[0]); } unlink(fifopath); } if(err != 0) ffc0d840: 41 be 00 10 beq+ cr7,ffc0d850 rtems_set_errno_and_return_minus_one(err); ffc0d844: 48 00 32 8d bl ffc10ad0 <__errno> ffc0d848: 3b c0 ff ff li r30,-1 ffc0d84c: 93 83 00 00 stw r28,0(r3) return 0; } ffc0d850: 39 61 00 28 addi r11,r1,40 ffc0d854: 7f c3 f3 78 mr r3,r30 ffc0d858: 48 00 ed a8 b ffc1c600 <_restgpr_28_x> =============================================================================== ffc0eeec : uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { ffc0eeec: 6c 89 40 04 xoris r9,r4,16388 pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { ffc0eef0: 94 21 ff f0 stwu r1,-16(r1) if (cmd == FIONREAD) { ffc0eef4: 2f 89 66 7f cmpwi cr7,r9,26239 pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { ffc0eef8: 7c 08 02 a6 mflr r0 ffc0eefc: bf c1 00 08 stmw r30,8(r1) ffc0ef00: 7c 7f 1b 78 mr r31,r3 ffc0ef04: 7c be 2b 78 mr r30,r5 ffc0ef08: 90 01 00 14 stw r0,20(r1) *(unsigned int *)buffer = pipe->Length; PIPE_UNLOCK(pipe); return 0; } return -EINVAL; ffc0ef0c: 38 00 ff ea li r0,-22 uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { ffc0ef10: 40 9e 00 40 bne- cr7,ffc0ef50 if (buffer == NULL) ffc0ef14: 2f 85 00 00 cmpwi cr7,r5,0 return -EFAULT; ffc0ef18: 38 00 ff f2 li r0,-14 void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) ffc0ef1c: 41 be 00 34 beq+ cr7,ffc0ef50 return -EFAULT; if (! PIPE_LOCK(pipe)) ffc0ef20: 80 63 00 28 lwz r3,40(r3) ffc0ef24: 38 80 00 00 li r4,0 ffc0ef28: 38 a0 00 00 li r5,0 ffc0ef2c: 4b ff ab ed bl ffc09b18 return -EINTR; ffc0ef30: 38 00 ff fc li r0,-4 { if (cmd == FIONREAD) { if (buffer == NULL) return -EFAULT; if (! PIPE_LOCK(pipe)) ffc0ef34: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ef38: 40 be 00 18 bne+ cr7,ffc0ef50 <== NEVER TAKEN return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; ffc0ef3c: 80 1f 00 0c lwz r0,12(r31) PIPE_UNLOCK(pipe); ffc0ef40: 80 7f 00 28 lwz r3,40(r31) if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; ffc0ef44: 90 1e 00 00 stw r0,0(r30) PIPE_UNLOCK(pipe); ffc0ef48: 4b ff ac f9 bl ffc09c40 return 0; ffc0ef4c: 38 00 00 00 li r0,0 } return -EINVAL; } ffc0ef50: 39 61 00 10 addi r11,r1,16 ffc0ef54: 7c 03 03 78 mr r3,r0 ffc0ef58: 48 01 10 7c b ffc1ffd4 <_restgpr_30_x> =============================================================================== ffc0eb68 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc0eb68: 94 21 ff c8 stwu r1,-56(r1) ffc0eb6c: 7c 08 02 a6 mflr r0 ffc0eb70: 90 01 00 3c stw r0,60(r1) ffc0eb74: bf 01 00 18 stmw r24,24(r1) ffc0eb78: 7c 7f 1b 78 mr r31,r3 ffc0eb7c: 7c 9e 23 78 mr r30,r4 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc0eb80: 80 63 00 28 lwz r3,40(r3) pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc0eb84: 7c bd 2b 78 mr r29,r5 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc0eb88: 38 80 00 00 li r4,0 ffc0eb8c: 38 a0 00 00 li r5,0 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc0eb90: 7c d8 33 78 mr r24,r6 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc0eb94: 4b ff af 85 bl ffc09b18 ffc0eb98: 2f 83 00 00 cmpwi cr7,r3,0 return -EINTR; ffc0eb9c: 3b 60 ff fc li r27,-4 rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc0eba0: 3b 80 00 00 li r28,0 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); ffc0eba4: 3b 21 00 08 addi r25,r1,8 rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc0eba8: 41 be 01 30 beq+ cr7,ffc0ecd8 <== ALWAYS TAKEN ffc0ebac: 48 00 01 5c b ffc0ed08 <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) ffc0ebb0: 80 1f 00 14 lwz r0,20(r31) ffc0ebb4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ebb8: 41 9e 01 28 beq- cr7,ffc0ece0 goto out_locked; if (LIBIO_NODELAY(iop)) { ffc0ebbc: 80 18 00 18 lwz r0,24(r24) ffc0ebc0: 70 09 00 01 andi. r9,r0,1 ffc0ebc4: 40 82 01 24 bne- ffc0ece8 ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; ffc0ebc8: 81 3f 00 18 lwz r9,24(r31) PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; ffc0ebcc: 3b 60 ff fc li r27,-4 goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); ffc0ebd0: 80 7f 00 28 lwz r3,40(r31) ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; ffc0ebd4: 38 09 00 01 addi r0,r9,1 ffc0ebd8: 90 1f 00 18 stw r0,24(r31) PIPE_UNLOCK(pipe); ffc0ebdc: 4b ff b0 65 bl ffc09c40 if (! PIPE_READWAIT(pipe)) ffc0ebe0: 80 7f 00 2c lwz r3,44(r31) ffc0ebe4: 38 80 00 00 li r4,0 ffc0ebe8: 48 00 0f dd bl ffc0fbc4 ffc0ebec: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ebf0: 40 9e 00 08 bne- cr7,ffc0ebf8 <== NEVER TAKEN ffc0ebf4: 3b 60 00 00 li r27,0 ret = -EINTR; if (! PIPE_LOCK(pipe)) { ffc0ebf8: 80 7f 00 28 lwz r3,40(r31) ffc0ebfc: 38 80 00 00 li r4,0 ffc0ec00: 38 a0 00 00 li r5,0 ffc0ec04: 4b ff af 15 bl ffc09b18 ffc0ec08: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ec0c: 40 9e 00 ec bne- cr7,ffc0ecf8 <== NEVER TAKEN /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) ffc0ec10: 2f 9b 00 00 cmpwi cr7,r27,0 if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; ffc0ec14: 81 3f 00 18 lwz r9,24(r31) ffc0ec18: 38 09 ff ff addi r0,r9,-1 ffc0ec1c: 90 1f 00 18 stw r0,24(r31) if (ret != 0) ffc0ec20: 40 9e 00 cc bne- cr7,ffc0ecec <== NEVER TAKEN if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { ffc0ec24: 83 7f 00 0c lwz r27,12(r31) ffc0ec28: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0ec2c: 41 9e ff 84 beq+ cr7,ffc0ebb0 if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); ffc0ec30: 7c 1c e8 50 subf r0,r28,r29 ffc0ec34: 7f 9b 00 40 cmplw cr7,r27,r0 ffc0ec38: 40 9d 00 08 ble- cr7,ffc0ec40 ffc0ec3c: 7c 1b 03 78 mr r27,r0 chunk1 = pipe->Size - pipe->Start; ffc0ec40: 80 1f 00 08 lwz r0,8(r31) ffc0ec44: 7c 7e e2 14 add r3,r30,r28 ffc0ec48: 83 5f 00 04 lwz r26,4(r31) ffc0ec4c: 80 9f 00 00 lwz r4,0(r31) ffc0ec50: 7f 40 d0 50 subf r26,r0,r26 if (chunk > chunk1) { ffc0ec54: 7f 9b d0 00 cmpw cr7,r27,r26 ffc0ec58: 40 9d 00 24 ble- cr7,ffc0ec7c memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); ffc0ec5c: 7c 84 02 14 add r4,r4,r0 ffc0ec60: 7f 45 d3 78 mr r5,r26 ffc0ec64: 48 00 3c 0d bl ffc12870 memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); ffc0ec68: 7c 7c d2 14 add r3,r28,r26 ffc0ec6c: 7c 7e 1a 14 add r3,r30,r3 ffc0ec70: 80 9f 00 00 lwz r4,0(r31) ffc0ec74: 7c ba d8 50 subf r5,r26,r27 ffc0ec78: 48 00 00 0c b ffc0ec84 } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); ffc0ec7c: 7c 84 02 14 add r4,r4,r0 ffc0ec80: 7f 65 db 78 mr r5,r27 ffc0ec84: 48 00 3b ed bl ffc12870 pipe->Start += chunk; ffc0ec88: 80 1f 00 08 lwz r0,8(r31) pipe->Start %= pipe->Size; ffc0ec8c: 81 3f 00 04 lwz r9,4(r31) memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; ffc0ec90: 7c 1b 02 14 add r0,r27,r0 pipe->Start %= pipe->Size; ffc0ec94: 7d 60 4b 96 divwu r11,r0,r9 ffc0ec98: 7d 2b 49 d6 mullw r9,r11,r9 ffc0ec9c: 7c 09 00 50 subf r0,r9,r0 ffc0eca0: 90 1f 00 08 stw r0,8(r31) pipe->Length -= chunk; ffc0eca4: 80 1f 00 0c lwz r0,12(r31) ffc0eca8: 7c 1b 00 50 subf r0,r27,r0 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) ffc0ecac: 2f 80 00 00 cmpwi cr7,r0,0 else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; pipe->Length -= chunk; ffc0ecb0: 90 1f 00 0c stw r0,12(r31) /* For buffering optimization */ if (PIPE_EMPTY(pipe)) ffc0ecb4: 40 9e 00 08 bne- cr7,ffc0ecbc pipe->Start = 0; ffc0ecb8: 90 1f 00 08 stw r0,8(r31) if (pipe->waitingWriters > 0) ffc0ecbc: 80 1f 00 1c lwz r0,28(r31) ffc0ecc0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ecc4: 41 be 00 10 beq+ cr7,ffc0ecd4 PIPE_WAKEUPWRITERS(pipe); ffc0ecc8: 80 7f 00 30 lwz r3,48(r31) ffc0eccc: 7f 24 cb 78 mr r4,r25 ffc0ecd0: 48 00 0e 89 bl ffc0fb58 read += chunk; ffc0ecd4: 7f 9c da 14 add r28,r28,r27 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { ffc0ecd8: 7f 9c e8 40 cmplw cr7,r28,r29 ffc0ecdc: 41 9c ff 48 blt+ cr7,ffc0ec24 while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) ffc0ece0: 3b 60 00 00 li r27,0 ffc0ece4: 48 00 00 08 b ffc0ecec goto out_locked; if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; ffc0ece8: 3b 60 ff f5 li r27,-11 PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); ffc0ecec: 80 7f 00 28 lwz r3,40(r31) ffc0ecf0: 4b ff af 51 bl ffc09c40 ffc0ecf4: 48 00 00 08 b ffc0ecfc PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; ffc0ecf8: 3b 60 ff fc li r27,-4 <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) ffc0ecfc: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0ed00: 40 9d 00 08 ble- cr7,ffc0ed08 ffc0ed04: 7f 9b e3 78 mr r27,r28 return read; return ret; } ffc0ed08: 39 61 00 38 addi r11,r1,56 ffc0ed0c: 7f 63 db 78 mr r3,r27 ffc0ed10: 48 01 12 ac b ffc1ffbc <_restgpr_24_x> =============================================================================== ffc0e6e4 : */ void pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc0e6e4: 94 21 ff d8 stwu r1,-40(r1) ffc0e6e8: 7c 08 02 a6 mflr r0 ffc0e6ec: 90 01 00 2c stw r0,44(r1) /* WARN pipe not released! */ if (!PIPE_LOCK(pipe)) rtems_fatal_error_occurred(0xdeadbeef); #endif mode = LIBIO_ACCMODE(iop); ffc0e6f0: 80 04 00 18 lwz r0,24(r4) */ void pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc0e6f4: bf 81 00 18 stmw r28,24(r1) ffc0e6f8: 7c 7e 1b 78 mr r30,r3 if (!PIPE_LOCK(pipe)) rtems_fatal_error_occurred(0xdeadbeef); #endif mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) ffc0e6fc: 70 09 00 02 andi. r9,r0,2 void pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { pipe_control_t *pipe = *pipep; ffc0e700: 83 e3 00 00 lwz r31,0(r3) /* WARN pipe not released! */ if (!PIPE_LOCK(pipe)) rtems_fatal_error_occurred(0xdeadbeef); #endif mode = LIBIO_ACCMODE(iop); ffc0e704: 54 1d 07 7c rlwinm r29,r0,0,29,30 if (mode & LIBIO_FLAGS_READ) ffc0e708: 41 82 00 10 beq- ffc0e718 pipe->Readers --; ffc0e70c: 81 3f 00 10 lwz r9,16(r31) ffc0e710: 38 09 ff ff addi r0,r9,-1 ffc0e714: 90 1f 00 10 stw r0,16(r31) if (mode & LIBIO_FLAGS_WRITE) ffc0e718: 73 a0 00 04 andi. r0,r29,4 ffc0e71c: 41 82 00 10 beq- ffc0e72c pipe->Writers --; ffc0e720: 81 3f 00 14 lwz r9,20(r31) ffc0e724: 38 09 ff ff addi r0,r9,-1 ffc0e728: 90 1f 00 14 stw r0,20(r31) PIPE_UNLOCK(pipe); ffc0e72c: 80 7f 00 28 lwz r3,40(r31) ffc0e730: 4b ff b5 11 bl ffc09c40 if (pipe->Readers == 0 && pipe->Writers == 0) { ffc0e734: 80 1f 00 10 lwz r0,16(r31) ffc0e738: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e73c: 40 9e 00 30 bne- cr7,ffc0e76c ffc0e740: 83 9f 00 14 lwz r28,20(r31) ffc0e744: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0e748: 40 be 00 14 bne+ cr7,ffc0e75c #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); ffc0e74c: 7f e3 fb 78 mr r3,r31 ffc0e750: 4b ff ff 4d bl ffc0e69c *pipep = NULL; ffc0e754: 93 9e 00 00 stw r28,0(r30) ffc0e758: 48 00 00 34 b ffc0e78c } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) ffc0e75c: 2f 9d 00 04 cmpwi cr7,r29,4 ffc0e760: 41 be 00 0c beq+ cr7,ffc0e76c <== NEVER TAKEN /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); ffc0e764: 80 7f 00 30 lwz r3,48(r31) ffc0e768: 48 00 00 1c b ffc0e784 else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) ffc0e76c: 80 1f 00 14 lwz r0,20(r31) ffc0e770: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e774: 40 9e 00 18 bne- cr7,ffc0e78c <== NEVER TAKEN ffc0e778: 2f 9d 00 02 cmpwi cr7,r29,2 ffc0e77c: 41 9e 00 10 beq- cr7,ffc0e78c <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); ffc0e780: 80 7f 00 2c lwz r3,44(r31) ffc0e784: 38 81 00 08 addi r4,r1,8 ffc0e788: 48 00 13 d1 bl ffc0fb58 pipe_unlock(); ffc0e78c: 4b ff fe e9 bl ffc0e674 iop->flags &= ~LIBIO_FLAGS_OPEN; if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return; #endif } ffc0e790: 39 61 00 28 addi r11,r1,40 ffc0e794: 48 01 18 38 b ffc1ffcc <_restgpr_28_x> =============================================================================== ffc0ed14 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { ffc0ed14: 94 21 ff c0 stwu r1,-64(r1) ffc0ed18: 7c 08 02 a6 mflr r0 ffc0ed1c: be e1 00 1c stmw r23,28(r1) int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) ffc0ed20: 7c bb 2b 79 mr. r27,r5 pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { ffc0ed24: 7c 7f 1b 78 mr r31,r3 ffc0ed28: 90 01 00 44 stw r0,68(r1) ffc0ed2c: 7c 9e 23 78 mr r30,r4 ffc0ed30: 7c d7 33 78 mr r23,r6 int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) return 0; ffc0ed34: 3b 80 00 00 li r28,0 ) { int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) ffc0ed38: 41 a2 01 a8 beq+ ffc0eee0 <== NEVER TAKEN return 0; if (! PIPE_LOCK(pipe)) ffc0ed3c: 80 63 00 28 lwz r3,40(r3) ffc0ed40: 38 80 00 00 li r4,0 ffc0ed44: 38 a0 00 00 li r5,0 ffc0ed48: 4b ff ad d1 bl ffc09b18 return -EINTR; ffc0ed4c: 3b 80 ff fc li r28,-4 /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) ffc0ed50: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ed54: 40 9e 01 8c bne- cr7,ffc0eee0 <== NEVER TAKEN return -EINTR; if (pipe->Readers == 0) { ffc0ed58: 80 1f 00 10 lwz r0,16(r31) ffc0ed5c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ed60: 41 9e 01 4c beq- cr7,ffc0eeac ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; ffc0ed64: 80 1f 00 04 lwz r0,4(r31) ffc0ed68: 3b 20 00 01 li r25,1 ffc0ed6c: 7f 9b 00 40 cmplw cr7,r27,r0 ffc0ed70: 41 9d 00 08 bgt- cr7,ffc0ed78 <== NEVER TAKEN ffc0ed74: 7f 79 db 78 mr r25,r27 /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; ffc0ed78: 3b a0 00 00 li r29,0 else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); ffc0ed7c: 3b 01 00 08 addi r24,r1,8 ffc0ed80: 48 00 01 1c b ffc0ee9c /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { ffc0ed84: 80 17 00 18 lwz r0,24(r23) ffc0ed88: 70 09 00 01 andi. r9,r0,1 ffc0ed8c: 40 82 01 2c bne- ffc0eeb8 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; ffc0ed90: 81 3f 00 1c lwz r9,28(r31) PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; ffc0ed94: 3b 80 ff fc li r28,-4 goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); ffc0ed98: 80 7f 00 28 lwz r3,40(r31) ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; ffc0ed9c: 38 09 00 01 addi r0,r9,1 ffc0eda0: 90 1f 00 1c stw r0,28(r31) PIPE_UNLOCK(pipe); ffc0eda4: 4b ff ae 9d bl ffc09c40 if (! PIPE_WRITEWAIT(pipe)) ffc0eda8: 80 7f 00 30 lwz r3,48(r31) ffc0edac: 38 80 00 00 li r4,0 ffc0edb0: 48 00 0e 15 bl ffc0fbc4 ffc0edb4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0edb8: 40 9e 00 08 bne- cr7,ffc0edc0 <== NEVER TAKEN ffc0edbc: 3b 80 00 00 li r28,0 ret = -EINTR; if (! PIPE_LOCK(pipe)) { ffc0edc0: 80 7f 00 28 lwz r3,40(r31) ffc0edc4: 38 80 00 00 li r4,0 ffc0edc8: 38 a0 00 00 li r5,0 ffc0edcc: 4b ff ad 4d bl ffc09b18 ffc0edd0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0edd4: 40 9e 00 fc bne- cr7,ffc0eed0 <== NEVER TAKEN /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; if (ret != 0) ffc0edd8: 2f 9c 00 00 cmpwi cr7,r28,0 if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; ffc0eddc: 81 3f 00 1c lwz r9,28(r31) ffc0ede0: 38 09 ff ff addi r0,r9,-1 ffc0ede4: 90 1f 00 1c stw r0,28(r31) if (ret != 0) ffc0ede8: 40 9e 00 dc bne- cr7,ffc0eec4 <== NEVER TAKEN goto out_locked; if (pipe->Readers == 0) { ffc0edec: 80 1f 00 10 lwz r0,16(r31) ffc0edf0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0edf4: 41 9e 00 cc beq- cr7,ffc0eec0 <== NEVER TAKEN /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { ffc0edf8: 83 5f 00 04 lwz r26,4(r31) ffc0edfc: 80 1f 00 0c lwz r0,12(r31) ffc0ee00: 7f 80 d0 50 subf r28,r0,r26 ffc0ee04: 7f 9c c8 40 cmplw cr7,r28,r25 ffc0ee08: 41 9c ff 7c blt+ cr7,ffc0ed84 ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); ffc0ee0c: 7d 3d d8 50 subf r9,r29,r27 ffc0ee10: 7f 9c 48 40 cmplw cr7,r28,r9 ffc0ee14: 40 9d 00 08 ble- cr7,ffc0ee1c ffc0ee18: 7d 3c 4b 78 mr r28,r9 chunk1 = pipe->Size - PIPE_WSTART(pipe); ffc0ee1c: 81 3f 00 08 lwz r9,8(r31) ffc0ee20: 7c 9e ea 14 add r4,r30,r29 ffc0ee24: 80 7f 00 00 lwz r3,0(r31) ffc0ee28: 7d 20 4a 14 add r9,r0,r9 ffc0ee2c: 7c 09 d3 96 divwu r0,r9,r26 ffc0ee30: 7c 00 d1 d6 mullw r0,r0,r26 ffc0ee34: 7c 00 48 50 subf r0,r0,r9 ffc0ee38: 7f 40 d0 50 subf r26,r0,r26 if (chunk > chunk1) { ffc0ee3c: 7f 9c d0 00 cmpw cr7,r28,r26 ffc0ee40: 40 9d 00 24 ble- cr7,ffc0ee64 memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); ffc0ee44: 7f 45 d3 78 mr r5,r26 ffc0ee48: 7c 63 02 14 add r3,r3,r0 ffc0ee4c: 48 00 3a 25 bl ffc12870 memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); ffc0ee50: 7c 9a ea 14 add r4,r26,r29 ffc0ee54: 80 7f 00 00 lwz r3,0(r31) ffc0ee58: 7c 9e 22 14 add r4,r30,r4 ffc0ee5c: 7c ba e0 50 subf r5,r26,r28 ffc0ee60: 48 00 00 0c b ffc0ee6c } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); ffc0ee64: 7c 63 02 14 add r3,r3,r0 ffc0ee68: 7f 85 e3 78 mr r5,r28 ffc0ee6c: 48 00 3a 05 bl ffc12870 pipe->Length += chunk; ffc0ee70: 80 1f 00 0c lwz r0,12(r31) ffc0ee74: 7c 00 e2 14 add r0,r0,r28 ffc0ee78: 90 1f 00 0c stw r0,12(r31) if (pipe->waitingReaders > 0) ffc0ee7c: 80 1f 00 18 lwz r0,24(r31) ffc0ee80: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ee84: 41 be 00 10 beq+ cr7,ffc0ee94 PIPE_WAKEUPREADERS(pipe); ffc0ee88: 80 7f 00 2c lwz r3,44(r31) ffc0ee8c: 7f 04 c3 78 mr r4,r24 ffc0ee90: 48 00 0c c9 bl ffc0fb58 written += chunk; ffc0ee94: 7f bd e2 14 add r29,r29,r28 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; ffc0ee98: 3b 20 00 01 li r25,1 } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { ffc0ee9c: 7f 9d d8 40 cmplw cr7,r29,r27 ffc0eea0: 41 9c ff 58 blt+ cr7,ffc0edf8 ffc0eea4: 3b 80 00 00 li r28,0 ffc0eea8: 48 00 00 1c b ffc0eec4 if (! PIPE_LOCK(pipe)) return -EINTR; if (pipe->Readers == 0) { ret = -EPIPE; ffc0eeac: 3b 80 ff e0 li r28,-32 const void *buffer, size_t count, rtems_libio_t *iop ) { int chunk, chunk1, written = 0, ret = 0; ffc0eeb0: 3b a0 00 00 li r29,0 ffc0eeb4: 48 00 00 10 b ffc0eec4 chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; ffc0eeb8: 3b 80 ff f5 li r28,-11 ffc0eebc: 48 00 00 08 b ffc0eec4 pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ret = -EPIPE; ffc0eec0: 3b 80 ff e0 li r28,-32 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); ffc0eec4: 80 7f 00 28 lwz r3,40(r31) ffc0eec8: 4b ff ad 79 bl ffc09c40 ffc0eecc: 48 00 00 08 b ffc0eed4 PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; ffc0eed0: 3b 80 ff fc li r28,-4 <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) ffc0eed4: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0eed8: 40 9d 00 08 ble- cr7,ffc0eee0 ffc0eedc: 7f bc eb 78 mr r28,r29 return written; return ret; } ffc0eee0: 39 61 00 40 addi r11,r1,64 ffc0eee4: 7f 83 e3 78 mr r3,r28 ffc0eee8: 48 01 10 d0 b ffc1ffb8 <_restgpr_23_x> =============================================================================== ffc086e4 : int posix_memalign( void **pointer, size_t alignment, size_t size ) { ffc086e4: 94 21 ff f8 stwu r1,-8(r1) ffc086e8: 7c 08 02 a6 mflr r0 /* * Update call statistics */ MSBUMP(memalign_calls, 1); ffc086ec: 3d 60 00 00 lis r11,0 int posix_memalign( void **pointer, size_t alignment, size_t size ) { ffc086f0: 90 01 00 0c stw r0,12(r1) /* * Update call statistics */ MSBUMP(memalign_calls, 1); ffc086f4: 39 6b 33 b0 addi r11,r11,13232 ffc086f8: 81 4b 00 08 lwz r10,8(r11) ffc086fc: 38 0a 00 01 addi r0,r10,1 ffc08700: 90 0b 00 08 stw r0,8(r11) if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) ffc08704: 39 64 ff ff addi r11,r4,-1 ffc08708: 7d 6a 20 39 and. r10,r11,r4 return EINVAL; ffc0870c: 38 00 00 16 li r0,22 /* * Update call statistics */ MSBUMP(memalign_calls, 1); if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) ffc08710: 40 82 00 14 bne- ffc08724 <== NEVER TAKEN ffc08714: 2b 84 00 03 cmplwi cr7,r4,3 ffc08718: 40 bd 00 0c ble+ cr7,ffc08724 /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); ffc0871c: 48 00 02 e9 bl ffc08a04 ffc08720: 7c 60 1b 78 mr r0,r3 } ffc08724: 7c 03 03 78 mr r3,r0 ffc08728: 80 01 00 0c lwz r0,12(r1) ffc0872c: 38 21 00 08 addi r1,r1,8 ffc08730: 7c 08 03 a6 mtlr r0 ffc08734: 4e 80 00 20 blr =============================================================================== ffc04ffc : * printk * * Kernel printf function requiring minimal infrastrure. */ void printk(const char *fmt, ...) { ffc04ffc: 94 21 ff 88 stwu r1,-120(r1) ffc05000: 7c 08 02 a6 mflr r0 ffc05004: 90 81 00 1c stw r4,28(r1) ffc05008: 90 01 00 7c stw r0,124(r1) ffc0500c: 90 a1 00 20 stw r5,32(r1) ffc05010: 90 c1 00 24 stw r6,36(r1) ffc05014: 90 e1 00 28 stw r7,40(r1) ffc05018: 91 01 00 2c stw r8,44(r1) ffc0501c: 91 21 00 30 stw r9,48(r1) ffc05020: 91 41 00 34 stw r10,52(r1) ffc05024: 40 86 00 24 bne- cr1,ffc05048 <== ALWAYS TAKEN ffc05028: d8 21 00 38 stfd f1,56(r1) <== NOT EXECUTED ffc0502c: d8 41 00 40 stfd f2,64(r1) <== NOT EXECUTED ffc05030: d8 61 00 48 stfd f3,72(r1) <== NOT EXECUTED ffc05034: d8 81 00 50 stfd f4,80(r1) <== NOT EXECUTED ffc05038: d8 a1 00 58 stfd f5,88(r1) <== NOT EXECUTED ffc0503c: d8 c1 00 60 stfd f6,96(r1) <== NOT EXECUTED ffc05040: d8 e1 00 68 stfd f7,104(r1) <== NOT EXECUTED ffc05044: d9 01 00 70 stfd f8,112(r1) <== NOT EXECUTED va_list ap; /* points to each unnamed argument in turn */ va_start(ap, fmt); /* make ap point to 1st unnamed arg */ ffc05048: 38 00 00 01 li r0,1 ffc0504c: 98 01 00 08 stb r0,8(r1) ffc05050: 38 00 00 00 li r0,0 vprintk(fmt, ap); ffc05054: 38 81 00 08 addi r4,r1,8 */ void printk(const char *fmt, ...) { va_list ap; /* points to each unnamed argument in turn */ va_start(ap, fmt); /* make ap point to 1st unnamed arg */ ffc05058: 98 01 00 09 stb r0,9(r1) ffc0505c: 38 01 00 80 addi r0,r1,128 ffc05060: 90 01 00 0c stw r0,12(r1) ffc05064: 38 01 00 18 addi r0,r1,24 ffc05068: 90 01 00 10 stw r0,16(r1) vprintk(fmt, ap); ffc0506c: 48 00 1d 55 bl ffc06dc0 va_end(ap); /* clean up when done */ } ffc05070: 80 01 00 7c lwz r0,124(r1) ffc05074: 38 21 00 78 addi r1,r1,120 ffc05078: 7c 08 03 a6 mtlr r0 ffc0507c: 4e 80 00 20 blr =============================================================================== ffc06778 : int printk_plugin( void *ignored __attribute__((unused)), const char *format, ... ) { ffc06778: 94 21 ff 90 stwu r1,-112(r1) ffc0677c: 7c 08 02 a6 mflr r0 ffc06780: 90 a1 00 18 stw r5,24(r1) ffc06784: 90 01 00 74 stw r0,116(r1) ffc06788: 90 c1 00 1c stw r6,28(r1) ffc0678c: 90 e1 00 20 stw r7,32(r1) ffc06790: 91 01 00 24 stw r8,36(r1) ffc06794: 91 21 00 28 stw r9,40(r1) ffc06798: 91 41 00 2c stw r10,44(r1) ffc0679c: 40 86 00 24 bne- cr1,ffc067c0 <== ALWAYS TAKEN ffc067a0: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc067a4: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc067a8: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc067ac: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc067b0: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc067b4: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc067b8: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc067bc: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list arg_pointer; va_start (arg_pointer, format); ffc067c0: 38 00 00 02 li r0,2 ffc067c4: 98 01 00 08 stb r0,8(r1) ffc067c8: 38 00 00 00 li r0,0 vprintk( format, arg_pointer ); ffc067cc: 7c 83 23 78 mr r3,r4 ... ) { va_list arg_pointer; va_start (arg_pointer, format); ffc067d0: 98 01 00 09 stb r0,9(r1) ffc067d4: 38 01 00 78 addi r0,r1,120 vprintk( format, arg_pointer ); ffc067d8: 38 81 00 08 addi r4,r1,8 ... ) { va_list arg_pointer; va_start (arg_pointer, format); ffc067dc: 90 01 00 0c stw r0,12(r1) ffc067e0: 38 01 00 10 addi r0,r1,16 ffc067e4: 90 01 00 10 stw r0,16(r1) vprintk( format, arg_pointer ); ffc067e8: 48 00 1d 59 bl ffc08540 va_end(arg_pointer); /* clean up when done */ return 0; } ffc067ec: 38 60 00 00 li r3,0 ffc067f0: 80 01 00 74 lwz r0,116(r1) ffc067f4: 38 21 00 70 addi r1,r1,112 ffc067f8: 7c 08 03 a6 mtlr r0 ffc067fc: 4e 80 00 20 blr =============================================================================== ffc14854 : ssize_t read( int fd, void *buffer, size_t count ) { ffc14854: 7c 08 02 a6 mflr r0 ffc14858: 7c 2b 0b 78 mr r11,r1 ffc1485c: 94 21 ff f0 stwu r1,-16(r1) ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc14860: 3d 40 00 00 lis r10,0 ssize_t read( int fd, void *buffer, size_t count ) { ffc14864: 90 01 00 14 stw r0,20(r1) ffc14868: 4b ff f9 3d bl ffc141a4 <_savegpr_31> ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc1486c: 80 0a 26 8c lwz r0,9868(r10) ffc14870: 7f 83 00 40 cmplw cr7,r3,r0 ffc14874: 40 9c 00 20 bge- cr7,ffc14894 <== NEVER TAKEN iop = rtems_libio_iop( fd ); ffc14878: 3d 40 00 00 lis r10,0 ffc1487c: 83 ea 27 48 lwz r31,10056(r10) ffc14880: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc14884: 7f ff 1a 14 add r31,r31,r3 rtems_libio_check_is_open( iop ); ffc14888: 80 1f 00 18 lwz r0,24(r31) ffc1488c: 70 0a 01 00 andi. r10,r0,256 ffc14890: 40 a2 00 10 bne+ ffc148a0 ffc14894: 4b ff a9 7d bl ffc0f210 <__errno> ffc14898: 38 00 00 09 li r0,9 ffc1489c: 48 00 00 28 b ffc148c4 rtems_libio_check_buffer( buffer ); ffc148a0: 2f 84 00 00 cmpwi cr7,r4,0 ffc148a4: 41 9e 00 18 beq- cr7,ffc148bc <== NEVER TAKEN rtems_libio_check_count( count ); ffc148a8: 2f 85 00 00 cmpwi cr7,r5,0 ffc148ac: 38 60 00 00 li r3,0 ffc148b0: 41 9e 00 5c beq- cr7,ffc1490c rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); ffc148b4: 70 09 00 02 andi. r9,r0,2 ffc148b8: 40 a2 00 18 bne+ ffc148d0 ffc148bc: 4b ff a9 55 bl ffc0f210 <__errno> ffc148c0: 38 00 00 16 li r0,22 ffc148c4: 90 03 00 00 stw r0,0(r3) ffc148c8: 38 60 ff ff li r3,-1 ffc148cc: 48 00 00 40 b ffc1490c /* * Now process the read(). */ rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count ); ffc148d0: 81 3f 00 24 lwz r9,36(r31) ffc148d4: 7f e3 fb 78 mr r3,r31 ffc148d8: 80 09 00 08 lwz r0,8(r9) ffc148dc: 7c 09 03 a6 mtctr r0 ffc148e0: 4e 80 04 21 bctrl if ( rc > 0 ) ffc148e4: 2c 03 00 00 cmpwi r3,0 ffc148e8: 40 81 00 24 ble- ffc1490c iop->offset += rc; ffc148ec: 81 7f 00 10 lwz r11,16(r31) ffc148f0: 7c 6a 1b 78 mr r10,r3 ffc148f4: 81 9f 00 14 lwz r12,20(r31) ffc148f8: 7c 69 fe 70 srawi r9,r3,31 ffc148fc: 7d 4a 60 14 addc r10,r10,r12 ffc14900: 7d 29 59 14 adde r9,r9,r11 ffc14904: 91 3f 00 10 stw r9,16(r31) ffc14908: 91 5f 00 14 stw r10,20(r31) return rc; } ffc1490c: 39 61 00 10 addi r11,r1,16 ffc14910: 4b ff f8 e0 b ffc141f0 <_restgpr_31_x> =============================================================================== ffc07954 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { ffc07954: 94 21 ff c8 stwu r1,-56(r1) ffc07958: 7c 08 02 a6 mflr r0 ffc0795c: bf 81 00 28 stmw r28,40(r1) rtems_filesystem_location_info_t loc; int result; if (!buf) ffc07960: 7c 9d 23 79 mr. r29,r4 ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { ffc07964: 7c 7f 1b 78 mr r31,r3 ffc07968: 90 01 00 3c stw r0,60(r1) ffc0796c: 7c be 2b 78 mr r30,r5 rtems_filesystem_location_info_t loc; int result; if (!buf) ffc07970: 40 a2 00 18 bne+ ffc07988 rtems_set_errno_and_return_minus_one( EFAULT ); ffc07974: 48 00 ac 11 bl ffc12584 <__errno> ffc07978: 38 00 00 0e li r0,14 ffc0797c: 90 03 00 00 stw r0,0(r3) ffc07980: 3b 80 ff ff li r28,-1 ffc07984: 48 00 00 8c b ffc07a10 result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), ffc07988: 48 00 cc 21 bl ffc145a8 ffc0798c: 38 a0 00 00 li r5,0 ffc07990: 7c 64 1b 78 mr r4,r3 ffc07994: 7f e3 fb 78 mr r3,r31 ffc07998: 3b e1 00 08 addi r31,r1,8 ffc0799c: 7f e6 fb 78 mr r6,r31 ffc079a0: 38 e0 00 00 li r7,0 ffc079a4: 4b ff ec f9 bl ffc0669c 0, &loc, false ); if ( result != 0 ) return -1; ffc079a8: 3b 80 ff ff li r28,-1 if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0, &loc, false ); if ( result != 0 ) ffc079ac: 2f 83 00 00 cmpwi cr7,r3,0 ffc079b0: 40 be 00 60 bne+ cr7,ffc07a10 <== NEVER TAKEN return -1; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ ffc079b4: 81 21 00 14 lwz r9,20(r1) ffc079b8: 7f e3 fb 78 mr r3,r31 ffc079bc: 80 09 00 10 lwz r0,16(r9) ffc079c0: 7c 09 03 a6 mtctr r0 ffc079c4: 4e 80 04 21 bctrl ffc079c8: 2f 83 00 04 cmpwi cr7,r3,4 ffc079cc: 41 be 00 1c beq+ cr7,ffc079e8 rtems_filesystem_freenode( &loc ); ffc079d0: 7f e3 fb 78 mr r3,r31 ffc079d4: 4b ff ed bd bl ffc06790 rtems_set_errno_and_return_minus_one( EINVAL ); ffc079d8: 48 00 ab ad bl ffc12584 <__errno> ffc079dc: 38 00 00 16 li r0,22 ffc079e0: 90 03 00 00 stw r0,0(r3) ffc079e4: 48 00 00 2c b ffc07a10 } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); ffc079e8: 81 21 00 14 lwz r9,20(r1) ffc079ec: 7f e3 fb 78 mr r3,r31 ffc079f0: 7f a4 eb 78 mr r4,r29 ffc079f4: 80 09 00 3c lwz r0,60(r9) ffc079f8: 7f c5 f3 78 mr r5,r30 ffc079fc: 7c 09 03 a6 mtctr r0 ffc07a00: 4e 80 04 21 bctrl ffc07a04: 7c 7c 1b 78 mr r28,r3 rtems_filesystem_freenode( &loc ); ffc07a08: 7f e3 fb 78 mr r3,r31 ffc07a0c: 4b ff ed 85 bl ffc06790 return result; } ffc07a10: 39 61 00 38 addi r11,r1,56 ffc07a14: 7f 83 e3 78 mr r3,r28 ffc07a18: 4b ff ac 44 b ffc0265c <_restgpr_28_x> =============================================================================== ffc063c4 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { ffc063c4: 94 21 ff d8 stwu r1,-40(r1) ffc063c8: 7c 08 02 a6 mflr r0 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); ffc063cc: 3d 20 00 00 lis r9,0 ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { ffc063d0: 90 01 00 2c stw r0,44(r1) int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); ffc063d4: 80 09 26 8c lwz r0,9868(r9) ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { ffc063d8: bf 21 00 0c stmw r25,12(r1) ffc063dc: 7c ba 2b 78 mr r26,r5 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); ffc063e0: 7f 83 00 40 cmplw cr7,r3,r0 ffc063e4: 40 9c 00 20 bge- cr7,ffc06404 iop = rtems_libio_iop( fd ); ffc063e8: 3d 20 00 00 lis r9,0 ffc063ec: 83 69 27 48 lwz r27,10056(r9) ffc063f0: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc063f4: 7f 7b 1a 14 add r27,r27,r3 rtems_libio_check_is_open( iop ); ffc063f8: 80 1b 00 18 lwz r0,24(r27) ffc063fc: 70 09 01 00 andi. r9,r0,256 ffc06400: 40 a2 00 10 bne+ ffc06410 ffc06404: 48 00 a0 99 bl ffc1049c <__errno> ffc06408: 38 00 00 09 li r0,9 ffc0640c: 48 00 00 64 b ffc06470 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); ffc06410: 70 09 00 02 andi. r9,r0,2 ffc06414: 41 82 00 54 beq- ffc06468 <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) ffc06418: 2f 84 00 00 cmpwi cr7,r4,0 ffc0641c: 41 9e 00 4c beq- cr7,ffc06468 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) ffc06420: 2f 85 00 00 cmpwi cr7,r5,0 ffc06424: 40 9d 00 44 ble- cr7,ffc06468 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) ffc06428: 2f 85 04 00 cmpwi cr7,r5,1024 ffc0642c: 41 9d 00 3c bgt- cr7,ffc06468 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ffc06430: 7c 9c 23 78 mr r28,r4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) ffc06434: 7c a9 03 a6 mtctr r5 ffc06438: 7c 89 23 78 mr r9,r4 ffc0643c: 38 00 00 01 li r0,1 ffc06440: 39 60 00 00 li r11,0 ffc06444: 48 00 00 08 b ffc0644c if ( iov[v].iov_base == 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; ffc06448: 7d 0b 43 78 mr r11,r8 /* * iov[v].iov_len cannot be less than 0 because size_t is unsigned. * So we only check for zero. */ if ( iov[v].iov_base == 0 ) ffc0644c: 81 49 00 00 lwz r10,0(r9) ffc06450: 2f 8a 00 00 cmpwi cr7,r10,0 ffc06454: 41 9e 00 14 beq- cr7,ffc06468 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; ffc06458: 81 49 00 04 lwz r10,4(r9) ffc0645c: 7d 0b 52 14 add r8,r11,r10 if ( total < old ) ffc06460: 7f 88 58 00 cmpw cr7,r8,r11 ffc06464: 40 bc 00 14 bge+ cr7,ffc06478 rtems_set_errno_and_return_minus_one( EINVAL ); ffc06468: 48 00 a0 35 bl ffc1049c <__errno> ffc0646c: 38 00 00 16 li r0,22 ffc06470: 90 03 00 00 stw r0,0(r3) ffc06474: 48 00 00 94 b ffc06508 if ( iov[v].iov_len ) all_zeros = false; ffc06478: 31 4a ff ff addic r10,r10,-1 ffc0647c: 7d 4a 51 10 subfe r10,r10,r10 ffc06480: 7c 00 50 38 and r0,r0,r10 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc06484: 39 29 00 08 addi r9,r9,8 ffc06488: 42 00 ff c0 bdnz+ ffc06448 /* * A readv with all zeros logically has no effect. Even though * OpenGroup didn't address this case as they did with writev(), * we will handle it the same way for symmetry. */ if ( all_zeros == true ) { ffc0648c: 2f 80 00 00 cmpwi cr7,r0,0 return 0; ffc06490: 3b a0 00 00 li r29,0 /* * A readv with all zeros logically has no effect. Even though * OpenGroup didn't address this case as they did with writev(), * we will handle it the same way for symmetry. */ if ( all_zeros == true ) { ffc06494: 40 9e 00 78 bne- cr7,ffc0650c ffc06498: 3b 20 00 00 li r25,0 /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { bytes = (*iop->pathinfo.handlers->read_h)( ffc0649c: 81 3b 00 24 lwz r9,36(r27) ffc064a0: 7f 63 db 78 mr r3,r27 ffc064a4: 80 9c 00 00 lwz r4,0(r28) ffc064a8: 80 09 00 08 lwz r0,8(r9) ffc064ac: 80 bc 00 04 lwz r5,4(r28) ffc064b0: 7c 09 03 a6 mtctr r0 ffc064b4: 4e 80 04 21 bctrl iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) ffc064b8: 2c 03 00 00 cmpwi r3,0 ffc064bc: 41 80 00 4c blt- ffc06508 <== NEVER TAKEN return -1; if ( bytes > 0 ) { ffc064c0: 41 82 00 28 beq- ffc064e8 <== NEVER TAKEN iop->offset += bytes; ffc064c4: 81 3b 00 10 lwz r9,16(r27) ffc064c8: 7c 7f 1b 78 mr r31,r3 ffc064cc: 81 5b 00 14 lwz r10,20(r27) ffc064d0: 7c 7e fe 70 srawi r30,r3,31 total += bytes; ffc064d4: 7f bd 1a 14 add r29,r29,r3 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; ffc064d8: 7d 4a f8 14 addc r10,r10,r31 ffc064dc: 7d 29 f1 14 adde r9,r9,r30 ffc064e0: 91 3b 00 10 stw r9,16(r27) ffc064e4: 91 5b 00 14 stw r10,20(r27) total += bytes; } if (bytes != iov[ v ].iov_len) ffc064e8: 80 1c 00 04 lwz r0,4(r28) ffc064ec: 7f 83 00 00 cmpw cr7,r3,r0 ffc064f0: 40 9e 00 1c bne- cr7,ffc0650c <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc064f4: 3b 39 00 01 addi r25,r25,1 ffc064f8: 7f 99 d0 00 cmpw cr7,r25,r26 ffc064fc: 3b 9c 00 08 addi r28,r28,8 ffc06500: 41 9c ff 9c blt+ cr7,ffc0649c ffc06504: 48 00 00 08 b ffc0650c iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) return -1; ffc06508: 3b a0 ff ff li r29,-1 if (bytes != iov[ v ].iov_len) break; } return total; } ffc0650c: 39 61 00 28 addi r11,r1,40 ffc06510: 7f a3 eb 78 mr r3,r29 ffc06514: 4b ff a6 cc b ffc00be0 <_restgpr_25_x> =============================================================================== ffc149b8 : void *realloc( void *ptr, size_t size ) { ffc149b8: 94 21 ff d8 stwu r1,-40(r1) ffc149bc: 7c 08 02 a6 mflr r0 uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); ffc149c0: 3d 20 00 00 lis r9,0 void *realloc( void *ptr, size_t size ) { ffc149c4: 90 01 00 2c stw r0,44(r1) uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); ffc149c8: 39 29 2a 88 addi r9,r9,10888 ffc149cc: 81 69 00 10 lwz r11,16(r9) void *realloc( void *ptr, size_t size ) { ffc149d0: bf a1 00 1c stmw r29,28(r1) ffc149d4: 7c 7f 1b 78 mr r31,r3 uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); ffc149d8: 38 0b 00 01 addi r0,r11,1 ffc149dc: 90 09 00 10 stw r0,16(r9) /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { ffc149e0: 3d 20 00 00 lis r9,0 void *realloc( void *ptr, size_t size ) { ffc149e4: 7c 9e 23 78 mr r30,r4 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { ffc149e8: 80 09 27 a8 lwz r0,10152(r9) ffc149ec: 2f 80 00 03 cmpwi cr7,r0,3 ffc149f0: 40 be 00 24 bne+ cr7,ffc14a14 <== NEVER TAKEN if (_Thread_Dispatch_disable_level > 0) ffc149f4: 3d 20 00 00 lis r9,0 ffc149f8: 80 09 27 64 lwz r0,10084(r9) ffc149fc: 2f 80 00 00 cmpwi cr7,r0,0 ffc14a00: 40 be 00 d8 bne+ cr7,ffc14ad8 <== NEVER TAKEN return (void *) 0; if (_ISR_Nest_level > 0) ffc14a04: 3d 20 00 00 lis r9,0 ffc14a08: 80 09 2d 80 lwz r0,11648(r9) ffc14a0c: 2f 80 00 00 cmpwi cr7,r0,0 ffc14a10: 40 9e 00 c8 bne- cr7,ffc14ad8 <== NEVER TAKEN } /* * Continue with realloc(). */ if ( !ptr ) ffc14a14: 2f 9f 00 00 cmpwi cr7,r31,0 ffc14a18: 40 be 00 14 bne+ cr7,ffc14a2c return malloc( size ); ffc14a1c: 7f c3 f3 78 mr r3,r30 ffc14a20: 4b fe fa f1 bl ffc04510 ffc14a24: 7c 7f 1b 78 mr r31,r3 ffc14a28: 48 00 00 b4 b ffc14adc if ( !size ) { ffc14a2c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc14a30: 40 be 00 10 bne+ cr7,ffc14a40 <== ALWAYS TAKEN free( ptr ); ffc14a34: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc14a38: 4b fe f7 3d bl ffc04174 <== NOT EXECUTED ffc14a3c: 48 00 00 9c b ffc14ad8 <== NOT EXECUTED return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { ffc14a40: 3f a0 00 00 lis r29,0 ffc14a44: 80 7d 26 a4 lwz r3,9892(r29) ffc14a48: 7f e4 fb 78 mr r4,r31 ffc14a4c: 38 a1 00 08 addi r5,r1,8 ffc14a50: 48 00 01 59 bl ffc14ba8 <_Protected_heap_Get_block_size> ffc14a54: 2f 83 00 00 cmpwi cr7,r3,0 ffc14a58: 40 be 00 14 bne+ cr7,ffc14a6c errno = EINVAL; ffc14a5c: 4b ff a7 b5 bl ffc0f210 <__errno> ffc14a60: 38 00 00 16 li r0,22 ffc14a64: 90 03 00 00 stw r0,0(r3) ffc14a68: 48 00 00 70 b ffc14ad8 } /* * Now resize it. */ if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) { ffc14a6c: 80 7d 26 a4 lwz r3,9892(r29) ffc14a70: 7f e4 fb 78 mr r4,r31 ffc14a74: 7f c5 f3 78 mr r5,r30 ffc14a78: 48 00 01 81 bl ffc14bf8 <_Protected_heap_Resize_block> ffc14a7c: 2f 83 00 00 cmpwi cr7,r3,0 ffc14a80: 40 be 00 5c bne+ cr7,ffc14adc * There used to be a free on this error case but it is wrong to * free the memory per OpenGroup Single UNIX Specification V2 * and the C Standard. */ new_area = malloc( size ); ffc14a84: 7f c3 f3 78 mr r3,r30 ffc14a88: 4b fe fa 89 bl ffc04510 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ ffc14a8c: 3d 20 00 00 lis r9,0 if ( !new_area ) { ffc14a90: 7c 7d 1b 79 mr. r29,r3 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ ffc14a94: 39 29 2a 88 addi r9,r9,10888 ffc14a98: 81 69 00 04 lwz r11,4(r9) ffc14a9c: 38 0b ff ff addi r0,r11,-1 ffc14aa0: 90 09 00 04 stw r0,4(r9) if ( !new_area ) { ffc14aa4: 41 82 00 34 beq- ffc14ad8 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); ffc14aa8: 80 01 00 08 lwz r0,8(r1) ffc14aac: 7f c5 f3 78 mr r5,r30 ffc14ab0: 7f 9e 00 40 cmplw cr7,r30,r0 ffc14ab4: 40 9d 00 08 ble- cr7,ffc14abc <== NEVER TAKEN ffc14ab8: 7c 05 03 78 mr r5,r0 ffc14abc: 7f e4 fb 78 mr r4,r31 ffc14ac0: 7f a3 eb 78 mr r3,r29 ffc14ac4: 4b ff b3 ad bl ffc0fe70 free( ptr ); ffc14ac8: 7f e3 fb 78 mr r3,r31 ffc14acc: 4b fe f6 a9 bl ffc04174 return new_area; ffc14ad0: 7f bf eb 78 mr r31,r29 ffc14ad4: 48 00 00 08 b ffc14adc new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; ffc14ad8: 3b e0 00 00 li r31,0 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } ffc14adc: 39 61 00 28 addi r11,r1,40 ffc14ae0: 7f e3 fb 78 mr r3,r31 ffc14ae4: 4b ff f7 04 b ffc141e8 <_restgpr_29_x> =============================================================================== ffc0556c : #include int rmdir( const char *pathname ) { ffc0556c: 94 21 ff a8 stwu r1,-88(r1) ffc05570: 7d 80 00 26 mfcr r12 ffc05574: 7c 08 02 a6 mflr r0 ffc05578: bf 41 00 40 stmw r26,64(r1) ffc0557c: 7c 7c 1b 78 mr r28,r3 ffc05580: 90 01 00 5c stw r0,92(r1) ffc05584: 91 81 00 3c stw r12,60(r1) /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); ffc05588: 4b ff f0 15 bl ffc0459c if ( parentpathlen == 0 ) ffc0558c: 7c 7b 1b 79 mr. r27,r3 ffc05590: 38 c1 00 0c addi r6,r1,12 ffc05594: 40 82 00 1c bne- ffc055b0 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); ffc05598: 7f 83 e3 78 mr r3,r28 ffc0559c: 38 81 00 08 addi r4,r1,8 ffc055a0: 7c c5 33 78 mr r5,r6 ffc055a4: 48 00 01 21 bl ffc056c4 const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false; ffc055a8: 3b a0 00 00 li r29,0 ffc055ac: 48 00 00 28 b ffc055d4 parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, ffc055b0: 7f 83 e3 78 mr r3,r28 ffc055b4: 7f 64 db 78 mr r4,r27 ffc055b8: 38 a0 00 02 li r5,2 ffc055bc: 38 e0 00 00 li r7,0 ffc055c0: 4b ff ef 81 bl ffc04540 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) return -1; ffc055c4: 3b 40 ff ff li r26,-1 else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) ffc055c8: 2f 83 00 00 cmpwi cr7,r3,0 ffc055cc: 40 9e 00 e4 bne- cr7,ffc056b0 <== NEVER TAKEN return -1; free_parentloc = true; ffc055d0: 3b a0 00 01 li r29,1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc055d4: 3b e1 00 20 addi r31,r1,32 ffc055d8: 3b c1 00 0c addi r30,r1,12 ffc055dc: 7c be a4 aa lswi r5,r30,20 ffc055e0: 7c bf a5 aa stswi r5,r31,20 name = pathname + parentpathlen; ffc055e4: 7f 9c da 14 add r28,r28,r27 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc055e8: 7f 83 e3 78 mr r3,r28 ffc055ec: 48 00 b8 51 bl ffc10e3c ffc055f0: 7c 64 1b 78 mr r4,r3 ffc055f4: 7f 83 e3 78 mr r3,r28 ffc055f8: 4b ff ef ed bl ffc045e4 ffc055fc: 7f 9c 1a 14 add r28,r28,r3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc05600: 7f 83 e3 78 mr r3,r28 ffc05604: 48 00 b8 39 bl ffc10e3c ffc05608: 38 a0 00 00 li r5,0 ffc0560c: 7c 64 1b 78 mr r4,r3 ffc05610: 7f e6 fb 78 mr r6,r31 ffc05614: 7f 83 e3 78 mr r3,r28 ffc05618: 38 e0 00 00 li r7,0 ffc0561c: 4b ff ee a1 bl ffc044bc 0, &loc, false ); if ( result != 0 ) { ffc05620: 2f 83 00 00 cmpwi cr7,r3,0 ffc05624: 41 be 00 14 beq+ cr7,ffc05638 if ( free_parentloc ) ffc05628: 2f 9d 00 00 cmpwi cr7,r29,0 rtems_filesystem_freenode( &parentloc ); return -1; ffc0562c: 3b 40 ff ff li r26,-1 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) ffc05630: 41 be 00 80 beq+ cr7,ffc056b0 ffc05634: 48 00 00 74 b ffc056a8 } /* * Verify you can remove this node as a directory. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { ffc05638: 81 21 00 2c lwz r9,44(r1) ffc0563c: 7f e3 fb 78 mr r3,r31 ffc05640: 2e 1d 00 00 cmpwi cr4,r29,0 ffc05644: 80 09 00 10 lwz r0,16(r9) ffc05648: 7c 09 03 a6 mtctr r0 ffc0564c: 4e 80 04 21 bctrl ffc05650: 2f 83 00 01 cmpwi cr7,r3,1 ffc05654: 41 be 00 2c beq+ cr7,ffc05680 rtems_filesystem_freenode( &loc ); ffc05658: 7f e3 fb 78 mr r3,r31 ffc0565c: 4b ff ef d9 bl ffc04634 if ( free_parentloc ) ffc05660: 41 b2 00 0c beq+ cr4,ffc0566c <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); ffc05664: 7f c3 f3 78 mr r3,r30 ffc05668: 4b ff ef cd bl ffc04634 rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc0566c: 48 00 a6 31 bl ffc0fc9c <__errno> ffc05670: 38 00 00 14 li r0,20 ffc05674: 90 03 00 00 stw r0,0(r3) ffc05678: 3b 40 ff ff li r26,-1 ffc0567c: 48 00 00 34 b ffc056b0 /* * Use the filesystems rmnod to remove the node. */ result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); ffc05680: 81 21 00 28 lwz r9,40(r1) ffc05684: 7f c3 f3 78 mr r3,r30 ffc05688: 7f e4 fb 78 mr r4,r31 ffc0568c: 80 09 00 34 lwz r0,52(r9) ffc05690: 7c 09 03 a6 mtctr r0 ffc05694: 4e 80 04 21 bctrl ffc05698: 7c 7a 1b 78 mr r26,r3 rtems_filesystem_freenode( &loc ); ffc0569c: 7f e3 fb 78 mr r3,r31 ffc056a0: 4b ff ef 95 bl ffc04634 if ( free_parentloc ) ffc056a4: 41 b2 00 0c beq+ cr4,ffc056b0 rtems_filesystem_freenode( &parentloc ); ffc056a8: 7f c3 f3 78 mr r3,r30 ffc056ac: 4b ff ef 89 bl ffc04634 return result; } ffc056b0: 81 81 00 3c lwz r12,60(r1) ffc056b4: 39 61 00 58 addi r11,r1,88 ffc056b8: 7f 43 d3 78 mr r3,r26 ffc056bc: 7d 80 81 20 mtcrf 8,r12 ffc056c0: 48 00 f6 18 b ffc14cd8 <_restgpr_26_x> =============================================================================== ffc08634 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { ffc08634: 94 21 ff f0 stwu r1,-16(r1) ffc08638: 7c 08 02 a6 mflr r0 ffc0863c: bf c1 00 08 stmw r30,8(r1) ffc08640: 7c bf 2b 78 mr r31,r5 ffc08644: 7c de 33 78 mr r30,r6 ffc08648: 90 01 00 14 stw r0,20(r1) RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Append_with_empty_check( chain, node ); ffc0864c: 48 00 05 e9 bl ffc08c34 <_Chain_Append_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { ffc08650: 2f 83 00 00 cmpwi cr7,r3,0 rtems_chain_node *node, rtems_id task, rtems_event_set events ) { rtems_status_code sc = RTEMS_SUCCESSFUL; ffc08654: 38 00 00 00 li r0,0 bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { ffc08658: 41 be 00 14 beq+ cr7,ffc0866c <== NEVER TAKEN sc = rtems_event_send( task, events ); ffc0865c: 7f e3 fb 78 mr r3,r31 ffc08660: 7f c4 f3 78 mr r4,r30 ffc08664: 4b ff f4 dd bl ffc07b40 ffc08668: 7c 60 1b 78 mr r0,r3 } return sc; } ffc0866c: 39 61 00 10 addi r11,r1,16 ffc08670: 7c 03 03 78 mr r3,r0 ffc08674: 48 00 c4 bc b ffc14b30 <_restgpr_30_x> =============================================================================== ffc086c0 : rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { ffc086c0: 94 21 ff d0 stwu r1,-48(r1) ffc086c4: 7c 08 02 a6 mflr r0 ffc086c8: bf 41 00 18 stmw r26,24(r1) ffc086cc: 7c 7a 1b 78 mr r26,r3 ffc086d0: 7c 9b 23 78 mr r27,r4 ffc086d4: 90 01 00 34 stw r0,52(r1) ffc086d8: 7c bc 2b 78 mr r28,r5 ffc086dc: 7c df 33 78 mr r31,r6 while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ) { rtems_event_set out; sc = rtems_event_receive( ffc086e0: 3b a1 00 08 addi r29,r1,8 ffc086e4: 48 00 00 20 b ffc08704 ffc086e8: 7f 63 db 78 mr r3,r27 ffc086ec: 38 80 00 00 li r4,0 ffc086f0: 7f 85 e3 78 mr r5,r28 ffc086f4: 7f a6 eb 78 mr r6,r29 ffc086f8: 4b ff f2 b1 bl ffc079a8 ) { rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( ffc086fc: 2c 03 00 00 cmpwi r3,0 ffc08700: 40 82 00 18 bne- ffc08718 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); ffc08704: 7f 43 d3 78 mr r3,r26 ffc08708: 48 00 06 1d bl ffc08d24 <_Chain_Get> sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ffc0870c: 7c 7e 1b 79 mr. r30,r3 ffc08710: 41 82 ff d8 beq+ ffc086e8 ffc08714: 38 60 00 00 li r3,0 } *node_ptr = node; return sc; } ffc08718: 39 61 00 30 addi r11,r1,48 timeout, &out ); } *node_ptr = node; ffc0871c: 93 df 00 00 stw r30,0(r31) return sc; } ffc08720: 48 00 c4 00 b ffc14b20 <_restgpr_26_x> =============================================================================== ffc08724 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { ffc08724: 94 21 ff f0 stwu r1,-16(r1) ffc08728: 7c 08 02 a6 mflr r0 ffc0872c: bf c1 00 08 stmw r30,8(r1) ffc08730: 7c bf 2b 78 mr r31,r5 ffc08734: 7c de 33 78 mr r30,r6 ffc08738: 90 01 00 14 stw r0,20(r1) RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Prepend_with_empty_check( chain, node ); ffc0873c: 48 00 06 55 bl ffc08d90 <_Chain_Prepend_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { ffc08740: 2f 83 00 00 cmpwi cr7,r3,0 rtems_chain_node *node, rtems_id task, rtems_event_set events ) { rtems_status_code sc = RTEMS_SUCCESSFUL; ffc08744: 38 00 00 00 li r0,0 bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { ffc08748: 41 be 00 14 beq+ cr7,ffc0875c <== NEVER TAKEN sc = rtems_event_send( task, events ); ffc0874c: 7f e3 fb 78 mr r3,r31 ffc08750: 7f c4 f3 78 mr r4,r30 ffc08754: 4b ff f3 ed bl ffc07b40 ffc08758: 7c 60 1b 78 mr r0,r3 } return sc; } ffc0875c: 39 61 00 10 addi r11,r1,16 ffc08760: 7c 03 03 78 mr r3,r0 ffc08764: 48 00 c3 cc b ffc14b30 <_restgpr_30_x> =============================================================================== ffc04850 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc04850: 94 21 ff 68 stwu r1,-152(r1) ffc04854: 7c 08 02 a6 mflr r0 ffc04858: 90 01 00 9c stw r0,156(r1) Timestamp_Control uptime, total, ran, last_context_switch; #else uint32_t total_units = 0; #endif if ( !print ) ffc0485c: 7c 80 23 79 mr. r0,r4 void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc04860: bd c1 00 50 stmw r14,80(r1) ffc04864: 7c 7f 1b 78 mr r31,r3 Timestamp_Control uptime, total, ran, last_context_switch; #else uint32_t total_units = 0; #endif if ( !print ) ffc04868: 90 01 00 48 stw r0,72(r1) ffc0486c: 41 82 01 c4 beq- ffc04a30 <== NEVER TAKEN * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ last_context_switch = _Thread_Time_of_last_context_switch; ffc04870: 3d 20 00 00 lis r9,0 ffc04874: 39 29 28 40 addi r9,r9,10304 ffc04878: 81 49 00 04 lwz r10,4(r9) _TOD_Get_uptime( &uptime ); ffc0487c: 3b 01 00 10 addi r24,r1,16 * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ last_context_switch = _Thread_Time_of_last_context_switch; ffc04880: 81 29 00 00 lwz r9,0(r9) _TOD_Get_uptime( &uptime ); ffc04884: 7f 03 c3 78 mr r3,r24 * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ last_context_switch = _Thread_Time_of_last_context_switch; ffc04888: 91 41 00 2c stw r10,44(r1) _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); ffc0488c: 3a 41 00 18 addi r18,r1,24 } } } #endif (*print)( ffc04890: 3f c0 00 01 lis r30,1 * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ last_context_switch = _Thread_Time_of_last_context_switch; ffc04894: 91 21 00 28 stw r9,40(r1) _TOD_Get_uptime( &uptime ); ffc04898: 48 00 5d 11 bl ffc0a5a8 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); ffc0489c: 3c 60 00 00 lis r3,0 ffc048a0: 38 63 28 5c addi r3,r3,10332 ffc048a4: 7f 04 c3 78 mr r4,r24 ffc048a8: 7e 45 93 78 mr r5,r18 ffc048ac: 48 00 84 89 bl ffc0cd34 <_Timespec_Subtract> } } } #endif (*print)( ffc048b0: 80 01 00 48 lwz r0,72(r1) ffc048b4: 3c 80 ff c2 lis r4,-62 ffc048b8: 7f e3 fb 78 mr r3,r31 ffc048bc: 7c 09 03 a6 mtctr r0 ffc048c0: 38 84 e0 8b addi r4,r4,-8053 ffc048c4: 3b de a9 a0 addi r30,r30,-22112 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( ffc048c8: 3e 00 ff c2 lis r16,-62 /* * Print the information */ (*print)( context, ffc048cc: 3e a0 ff c2 lis r21,-62 } } } #endif (*print)( ffc048d0: 4c c6 31 82 crclr 4*cr1+eq ffc048d4: 4e 80 04 21 bctrl /*PAGE * * rtems_cpu_usage_report */ void rtems_cpu_usage_report_with_plugin( ffc048d8: 39 fe 00 0c addi r15,r30,12 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); ffc048dc: 3b 21 00 38 addi r25,r1,56 (*print)( ffc048e0: 3a 10 e1 fd addi r16,r16,-7683 /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { ffc048e4: 3e 20 00 01 lis r17,1 Timestamp_Control used; _Timestamp_Subtract( &last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); ffc048e8: 3b 41 00 20 addi r26,r1,32 ffc048ec: 3a 61 00 0c addi r19,r1,12 ffc048f0: 3a 81 00 08 addi r20,r1,8 /* * Print the information */ (*print)( context, ffc048f4: 3a b5 e2 10 addi r21,r21,-7664 ffc048f8: 3a c0 03 e8 li r22,1000 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( &last_context_switch, &uptime, &used ); ffc048fc: 3a e1 00 28 addi r23,r1,40 ffc04900: 3b 61 00 30 addi r27,r1,48 "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) ffc04904: 85 3e 00 04 lwzu r9,4(r30) ffc04908: 2f 89 00 00 cmpwi cr7,r9,0 ffc0490c: 41 9e 00 f0 beq- cr7,ffc049fc continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; ffc04910: 83 89 00 04 lwz r28,4(r9) if ( information ) { ffc04914: 3b a0 00 01 li r29,1 ffc04918: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0491c: 40 be 00 d4 bne+ cr7,ffc049f0 <== ALWAYS TAKEN ffc04920: 48 00 00 dc b ffc049fc <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; ffc04924: 81 3c 00 1c lwz r9,28(r28) ffc04928: 57 a0 10 3a rlwinm r0,r29,2,0,29 ffc0492c: 7d c9 00 2e lwzx r14,r9,r0 if ( !the_thread ) ffc04930: 2f 8e 00 00 cmpwi cr7,r14,0 ffc04934: 41 9e 00 b8 beq- cr7,ffc049ec <== NEVER TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); ffc04938: 80 6e 00 08 lwz r3,8(r14) ffc0493c: 38 80 00 0d li r4,13 ffc04940: 7f 25 cb 78 mr r5,r25 ffc04944: 48 00 46 91 bl ffc08fd4 (*print)( ffc04948: 80 01 00 48 lwz r0,72(r1) ffc0494c: 7f e3 fb 78 mr r3,r31 ffc04950: 80 ae 00 08 lwz r5,8(r14) ffc04954: 7c 09 03 a6 mtctr r0 ffc04958: 7e 04 83 78 mr r4,r16 ffc0495c: 7f 26 cb 78 mr r6,r25 ffc04960: 4c c6 31 82 crclr 4*cr1+eq ffc04964: 4e 80 04 21 bctrl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; ffc04968: 81 2e 00 84 lwz r9,132(r14) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { ffc0496c: 80 0e 00 08 lwz r0,8(r14) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; ffc04970: 91 21 00 20 stw r9,32(r1) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { ffc04974: 39 31 ab d8 addi r9,r17,-21544 ffc04978: 81 29 00 0c lwz r9,12(r9) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; ffc0497c: 81 4e 00 88 lwz r10,136(r14) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { ffc04980: 81 29 00 08 lwz r9,8(r9) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; ffc04984: 91 41 00 24 stw r10,36(r1) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { ffc04988: 7f 89 00 00 cmpw cr7,r9,r0 ffc0498c: 40 be 00 20 bne+ cr7,ffc049ac Timestamp_Control used; _Timestamp_Subtract( &last_context_switch, &uptime, &used ); ffc04990: 7e e3 bb 78 mr r3,r23 ffc04994: 7f 04 c3 78 mr r4,r24 ffc04998: 7f 65 db 78 mr r5,r27 ffc0499c: 48 00 83 99 bl ffc0cd34 <_Timespec_Subtract> _Timestamp_Add_to( &ran, &used ); ffc049a0: 7f 43 d3 78 mr r3,r26 ffc049a4: 7f 64 db 78 mr r4,r27 ffc049a8: 48 00 82 6d bl ffc0cc14 <_Timespec_Add_to> }; _Timestamp_Divide( &ran, &total, &ival, &fval ); ffc049ac: 7f 43 d3 78 mr r3,r26 ffc049b0: 7e 44 93 78 mr r4,r18 ffc049b4: 7e 85 a3 78 mr r5,r20 ffc049b8: 7e 66 9b 78 mr r6,r19 ffc049bc: 48 00 82 b5 bl ffc0cc70 <_Timespec_Divide> /* * Print the information */ (*print)( context, ffc049c0: 80 c1 00 24 lwz r6,36(r1) ffc049c4: 80 01 00 48 lwz r0,72(r1) ffc049c8: 7f e3 fb 78 mr r3,r31 ffc049cc: 7e a4 ab 78 mr r4,r21 ffc049d0: 80 a1 00 20 lwz r5,32(r1) ffc049d4: 7c c6 b3 96 divwu r6,r6,r22 ffc049d8: 80 e1 00 08 lwz r7,8(r1) ffc049dc: 81 01 00 0c lwz r8,12(r1) ffc049e0: 7c 09 03 a6 mtctr r0 ffc049e4: 4c c6 31 82 crclr 4*cr1+eq ffc049e8: 4e 80 04 21 bctrl continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { ffc049ec: 3b bd 00 01 addi r29,r29,1 ffc049f0: a0 1c 00 10 lhz r0,16(r28) ffc049f4: 7f 9d 00 40 cmplw cr7,r29,r0 ffc049f8: 40 9d ff 2c ble+ cr7,ffc04924 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { ffc049fc: 7f 9e 78 00 cmpw cr7,r30,r15 ffc04a00: 40 9e ff 04 bne+ cr7,ffc04904 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( ffc04a04: 80 c1 00 1c lwz r6,28(r1) ffc04a08: 38 00 03 e8 li r0,1000 ffc04a0c: 3c 80 ff c2 lis r4,-62 ffc04a10: 80 a1 00 18 lwz r5,24(r1) ffc04a14: 7c c6 03 96 divwu r6,r6,r0 ffc04a18: 80 01 00 48 lwz r0,72(r1) ffc04a1c: 7c 09 03 a6 mtctr r0 ffc04a20: 7f e3 fb 78 mr r3,r31 ffc04a24: 38 84 e2 28 addi r4,r4,-7640 ffc04a28: 4c c6 31 82 crclr 4*cr1+eq ffc04a2c: 4e 80 04 21 bctrl "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } ffc04a30: 39 61 00 98 addi r11,r1,152 ffc04a34: 4b ff c8 d8 b ffc0130c <_restgpr_14_x> =============================================================================== ffc0f1bc : [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { if (sc == RTEMS_SUCCESSFUL) { ffc0f1bc: 2c 03 00 00 cmpwi r3,0 [RTEMS_IO_ERROR] = EIO, [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { ffc0f1c0: 7c 08 02 a6 mflr r0 ffc0f1c4: 7c 2b 0b 78 mr r11,r1 ffc0f1c8: 94 21 ff f0 stwu r1,-16(r1) ffc0f1cc: 90 01 00 14 stw r0,20(r1) ffc0f1d0: 48 00 4f d5 bl ffc141a4 <_savegpr_31> if (sc == RTEMS_SUCCESSFUL) { return 0; ffc0f1d4: 38 00 00 00 li r0,0 [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { if (sc == RTEMS_SUCCESSFUL) { ffc0f1d8: 41 a2 00 2c beq+ ffc0f204 return 0; } else { int eno = EINVAL; if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { ffc0f1dc: 2b 83 00 1c cmplwi cr7,r3,28 int rtems_deviceio_errno(rtems_status_code sc) { if (sc == RTEMS_SUCCESSFUL) { return 0; } else { int eno = EINVAL; ffc0f1e0: 3b e0 00 16 li r31,22 if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { ffc0f1e4: 41 9d 00 14 bgt- cr7,ffc0f1f8 <== NEVER TAKEN eno = status_code_to_errno [sc]; ffc0f1e8: 3d 20 ff c1 lis r9,-63 ffc0f1ec: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc0f1f0: 39 29 61 74 addi r9,r9,24948 ffc0f1f4: 7f e9 18 2e lwzx r31,r9,r3 } errno = eno; ffc0f1f8: 48 00 00 19 bl ffc0f210 <__errno> return -1; ffc0f1fc: 38 00 ff ff li r0,-1 if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { eno = status_code_to_errno [sc]; } errno = eno; ffc0f200: 93 e3 00 00 stw r31,0(r3) return -1; } } ffc0f204: 39 61 00 10 addi r11,r1,16 ffc0f208: 7c 03 03 78 mr r3,r0 ffc0f20c: 48 00 4f e4 b ffc141f0 <_restgpr_31_x> =============================================================================== ffc09254 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { ffc09254: 7c 2b 0b 78 mr r11,r1 ffc09258: 7c 08 02 a6 mflr r0 ffc0925c: 94 21 ff 88 stwu r1,-120(r1) ffc09260: 4b ff 8c ed bl ffc01f4c <_savegpr_31> ffc09264: 90 01 00 7c stw r0,124(r1) ffc09268: 7c 7f 1b 78 mr r31,r3 ffc0926c: 90 a1 00 18 stw r5,24(r1) ffc09270: 90 c1 00 1c stw r6,28(r1) ffc09274: 90 e1 00 20 stw r7,32(r1) ffc09278: 91 01 00 24 stw r8,36(r1) ffc0927c: 91 21 00 28 stw r9,40(r1) ffc09280: 91 41 00 2c stw r10,44(r1) ffc09284: 40 86 00 24 bne- cr1,ffc092a8 <== ALWAYS TAKEN ffc09288: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc0928c: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc09290: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc09294: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc09298: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc0929c: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc092a0: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc092a4: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); ffc092a8: 38 00 00 02 li r0,2 ffc092ac: 98 01 00 08 stb r0,8(r1) ffc092b0: 38 00 00 00 li r0,0 chars_written = rtems_verror(error_flag, printf_format, arglist); ffc092b4: 7f e3 fb 78 mr r3,r31 ) { va_list arglist; int chars_written; va_start(arglist, printf_format); ffc092b8: 98 01 00 09 stb r0,9(r1) ffc092bc: 38 01 00 80 addi r0,r1,128 chars_written = rtems_verror(error_flag, printf_format, arglist); ffc092c0: 38 a1 00 08 addi r5,r1,8 ) { va_list arglist; int chars_written; va_start(arglist, printf_format); ffc092c4: 90 01 00 0c stw r0,12(r1) ffc092c8: 38 01 00 10 addi r0,r1,16 ffc092cc: 90 01 00 10 stw r0,16(r1) chars_written = rtems_verror(error_flag, printf_format, arglist); ffc092d0: 4b ff fe 09 bl ffc090d8 va_end(arglist); if (error_flag & RTEMS_ERROR_PANIC) { ffc092d4: 77 e0 20 00 andis. r0,r31,8192 ffc092d8: 41 a2 00 24 beq+ ffc092fc rtems_error(0, "fatal error, exiting"); ffc092dc: 3c 80 ff c2 lis r4,-62 ffc092e0: 38 84 60 1f addi r4,r4,24607 ffc092e4: 38 60 00 00 li r3,0 ffc092e8: 4c c6 31 82 crclr 4*cr1+eq ffc092ec: 4b ff ff 69 bl ffc09254 _exit(errno); ffc092f0: 48 00 bd 3d bl ffc1502c <__errno> ffc092f4: 80 63 00 00 lwz r3,0(r3) ffc092f8: 48 00 0b f1 bl ffc09ee8 <_exit> } if (error_flag & RTEMS_ERROR_ABORT) { ffc092fc: 77 e0 10 00 andis. r0,r31,4096 ffc09300: 41 a2 00 1c beq+ ffc0931c rtems_error(0, "fatal error, aborting"); ffc09304: 3c 80 ff c2 lis r4,-62 ffc09308: 38 84 60 34 addi r4,r4,24628 ffc0930c: 38 60 00 00 li r3,0 ffc09310: 4c c6 31 82 crclr 4*cr1+eq ffc09314: 4b ff ff 41 bl ffc09254 abort(); ffc09318: 48 00 bc f9 bl ffc15010 } return chars_written; } ffc0931c: 39 61 00 78 addi r11,r1,120 ffc09320: 4b ff 8c 78 b ffc01f98 <_restgpr_31_x> =============================================================================== ffc0c828 : find_arg fa = { .type = type, .mount_h = NULL }; if ( type != NULL ) { ffc0c828: 2f 83 00 00 cmpwi cr7,r3,0 rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler( const char *type ) { ffc0c82c: 94 21 ff e8 stwu r1,-24(r1) ffc0c830: 7c 08 02 a6 mflr r0 find_arg fa = { ffc0c834: 90 61 00 08 stw r3,8(r1) rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler( const char *type ) { ffc0c838: 90 01 00 1c stw r0,28(r1) find_arg fa = { ffc0c83c: 38 00 00 00 li r0,0 ffc0c840: 90 01 00 0c stw r0,12(r1) .type = type, .mount_h = NULL }; if ( type != NULL ) { ffc0c844: 41 9e 00 14 beq- cr7,ffc0c858 <== NEVER TAKEN rtems_filesystem_iterate( find_handler, &fa ); ffc0c848: 3c 60 ff c1 lis r3,-63 ffc0c84c: 38 63 c6 d4 addi r3,r3,-14636 ffc0c850: 38 81 00 08 addi r4,r1,8 ffc0c854: 4b ff ff 21 bl ffc0c774 } return fa.mount_h; } ffc0c858: 80 01 00 1c lwz r0,28(r1) ffc0c85c: 80 61 00 0c lwz r3,12(r1) ffc0c860: 38 21 00 18 addi r1,r1,24 ffc0c864: 7c 08 03 a6 mtlr r0 ffc0c868: 4e 80 00 20 blr =============================================================================== ffc03e6c : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { ffc03e6c: 94 21 ff c8 stwu r1,-56(r1) ffc03e70: 7c 08 02 a6 mflr r0 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); ffc03e74: 3c 60 ab cd lis r3,-21555 * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { ffc03e78: bf a1 00 2c stmw r29,44(r1) /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; ffc03e7c: 3f c0 00 00 lis r30,0 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); ffc03e80: 60 63 00 01 ori r3,r3,1 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; ffc03e84: 81 3e 26 e4 lwz r9,9956(r30) * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { ffc03e88: 90 01 00 3c stw r0,60(r1) /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; ffc03e8c: 38 00 00 12 li r0,18 ffc03e90: 90 09 00 2c stw r0,44(r9) /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) ffc03e94: 3d 20 00 00 lis r9,0 ffc03e98: 80 09 26 98 lwz r0,9880(r9) ffc03e9c: 2f 80 00 00 cmpwi cr7,r0,0 ffc03ea0: 41 9e 00 34 beq- cr7,ffc03ed4 <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; ffc03ea4: 3d 20 00 00 lis r9,0 ffc03ea8: 81 29 26 94 lwz r9,9876(r9) status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); ffc03eac: 38 e0 00 00 li r7,0 ffc03eb0: 80 69 00 08 lwz r3,8(r9) ffc03eb4: 80 89 00 0c lwz r4,12(r9) ffc03eb8: 80 a9 00 00 lwz r5,0(r9) ffc03ebc: 80 c9 00 04 lwz r6,4(r9) ffc03ec0: 48 00 09 05 bl ffc047c4 if ( status == -1 ) ffc03ec4: 2f 83 ff ff cmpwi cr7,r3,-1 ffc03ec8: 40 be 00 10 bne+ cr7,ffc03ed8 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); ffc03ecc: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED ffc03ed0: 60 63 00 02 ori r3,r3,2 <== NOT EXECUTED ffc03ed4: 48 00 40 c1 bl ffc07f94 <== NOT EXECUTED rtems_filesystem_link_counts = 0; ffc03ed8: 81 3e 26 e4 lwz r9,9956(r30) ffc03edc: 38 00 00 00 li r0,0 * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc03ee0: 3f a0 ff c1 lis r29,-63 status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; ffc03ee4: b0 09 00 30 sth r0,48(r9) * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc03ee8: 3b e1 00 08 addi r31,r1,8 ffc03eec: 3b bd 5e 20 addi r29,r29,24096 ffc03ef0: 38 a0 00 00 li r5,0 ffc03ef4: 7f e6 fb 78 mr r6,r31 ffc03ef8: 38 e0 00 00 li r7,0 ffc03efc: 38 80 00 01 li r4,1 ffc03f00: 7f a3 eb 78 mr r3,r29 ffc03f04: 48 00 01 51 bl ffc04054 rtems_filesystem_root = loc; ffc03f08: 81 7e 26 e4 lwz r11,9956(r30) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc03f0c: 38 80 00 01 li r4,1 * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; ffc03f10: 39 6b 00 18 addi r11,r11,24 ffc03f14: 7c bf a4 aa lswi r5,r31,20 ffc03f18: 7c ab a5 aa stswi r5,r11,20 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc03f1c: 7f a3 eb 78 mr r3,r29 ffc03f20: 38 a0 00 00 li r5,0 ffc03f24: 7f e6 fb 78 mr r6,r31 ffc03f28: 38 e0 00 00 li r7,0 ffc03f2c: 48 00 01 29 bl ffc04054 rtems_filesystem_current = loc; ffc03f30: 81 7e 26 e4 lwz r11,9956(r30) * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); ffc03f34: 3c 60 ff c1 lis r3,-63 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; ffc03f38: 39 6b 00 04 addi r11,r11,4 ffc03f3c: 7c bf a4 aa lswi r5,r31,20 ffc03f40: 7c ab a5 aa stswi r5,r11,20 * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); ffc03f44: 38 63 5e 22 addi r3,r3,24098 ffc03f48: 38 80 01 ff li r4,511 ffc03f4c: 48 00 06 c1 bl ffc0460c if ( status != 0 ) ffc03f50: 2f 83 00 00 cmpwi cr7,r3,0 ffc03f54: 41 be 00 10 beq+ cr7,ffc03f64 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0003 ); ffc03f58: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED ffc03f5c: 60 63 00 03 ori r3,r3,3 <== NOT EXECUTED ffc03f60: 4b ff ff 74 b ffc03ed4 <== NOT EXECUTED * it will be mounted onto is created. Moreover, if it is going to * use a device, then it is REALLY unfair to attempt this * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ } ffc03f64: 39 61 00 38 addi r11,r1,56 ffc03f68: 48 01 02 80 b ffc141e8 <_restgpr_29_x> =============================================================================== ffc0c774 : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { ffc0c774: 94 21 ff e0 stwu r1,-32(r1) ffc0c778: 7c 08 02 a6 mflr r0 ffc0c77c: bf 81 00 10 stmw r28,16(r1) const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; ffc0c780: 3f e0 ff c1 lis r31,-63 bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { ffc0c784: 7c 9e 23 78 mr r30,r4 ffc0c788: 90 61 00 08 stw r3,8(r1) const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; ffc0c78c: 3b ff 53 34 addi r31,r31,21300 rtems_chain_node *node = NULL; bool stop = false; ffc0c790: 38 60 00 00 li r3,0 bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { ffc0c794: 90 01 00 24 stw r0,36(r1) const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { ffc0c798: 48 00 00 1c b ffc0c7b4 stop = (*routine)( table_entry, routine_arg ); ffc0c79c: 80 01 00 08 lwz r0,8(r1) ffc0c7a0: 7f e3 fb 78 mr r3,r31 ffc0c7a4: 7f c4 f3 78 mr r4,r30 ffc0c7a8: 7c 09 03 a6 mtctr r0 ++table_entry; ffc0c7ac: 3b ff 00 08 addi r31,r31,8 const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { stop = (*routine)( table_entry, routine_arg ); ffc0c7b0: 4e 80 04 21 bctrl { const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { ffc0c7b4: 80 1f 00 00 lwz r0,0(r31) ffc0c7b8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c7bc: 2f 00 00 00 cmpwi cr6,r0,0 ffc0c7c0: 41 9a 00 0c beq- cr6,ffc0c7cc ffc0c7c4: 41 9e ff d8 beq+ cr7,ffc0c79c ffc0c7c8: 48 00 00 58 b ffc0c820 ffc0c7cc: 7c 7c 1b 78 mr r28,r3 stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { ffc0c7d0: 40 9e 00 50 bne- cr7,ffc0c820 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } ffc0c7d4: 3f a0 00 00 lis r29,0 stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { rtems_libio_lock(); ffc0c7d8: 4b ff ff 45 bl ffc0c71c } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } ffc0c7dc: 83 fd 21 88 lwz r31,8584(r29) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return &the_chain->Tail.Node; ffc0c7e0: 3b bd 21 88 addi r29,r29,8584 ffc0c7e4: 3b bd 00 04 addi r29,r29,4 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( ffc0c7e8: 48 00 00 20 b ffc0c808 !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; node = rtems_chain_next( node ) ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); ffc0c7ec: 80 01 00 08 lwz r0,8(r1) ffc0c7f0: 38 7f 00 08 addi r3,r31,8 ffc0c7f4: 7f c4 f3 78 mr r4,r30 ffc0c7f8: 7c 09 03 a6 mtctr r0 ffc0c7fc: 4e 80 04 21 bctrl } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } ffc0c800: 83 ff 00 00 lwz r31,0(r31) !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; node = rtems_chain_next( node ) ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); ffc0c804: 7c 7c 1b 78 mr r28,r3 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( ffc0c808: 7f 9f e8 00 cmpw cr7,r31,r29 ffc0c80c: 41 9e 00 0c beq- cr7,ffc0c818 node = rtems_chain_first( &filesystem_chain ); !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; ffc0c810: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0c814: 41 9e ff d8 beq+ cr7,ffc0c7ec <== ALWAYS TAKEN ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); } rtems_libio_unlock(); ffc0c818: 4b ff ff 35 bl ffc0c74c ffc0c81c: 7f 83 e3 78 mr r3,r28 } return stop; } ffc0c820: 39 61 00 20 addi r11,r1,32 ffc0c824: 48 00 79 c0 b ffc141e4 <_restgpr_28_x> =============================================================================== ffc04758 : bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { ffc04758: 94 21 ff e0 stwu r1,-32(r1) ffc0475c: 7c 08 02 a6 mflr r0 ffc04760: bf 81 00 10 stmw r28,16(r1) stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } ffc04764: 3f c0 00 00 lis r30,0 bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { ffc04768: 7c 7c 1b 78 mr r28,r3 ffc0476c: 90 01 00 24 stw r0,36(r1) ffc04770: 7c 9d 23 78 mr r29,r4 rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); ffc04774: 4b ff ff 8d bl ffc04700 rtems_per_filesystem_mount_routine routine, void *routine_arg ) { rtems_chain_node *node = NULL; bool stop = false; ffc04778: 38 60 00 00 li r3,0 stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } ffc0477c: 83 fe 21 6c lwz r31,8556(r30) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return &the_chain->Tail.Node; ffc04780: 3b de 21 6c addi r30,r30,8556 ffc04784: 3b de 00 04 addi r30,r30,4 { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( ffc04788: 48 00 00 18 b ffc047a0 node = rtems_chain_next( node ) ) { const rtems_filesystem_mount_table_entry_t *mt_entry = (rtems_filesystem_mount_table_entry_t *) node; stop = (*routine)( mt_entry, routine_arg ); ffc0478c: 7f e3 fb 78 mr r3,r31 ffc04790: 7f 89 03 a6 mtctr r28 ffc04794: 7f a4 eb 78 mr r4,r29 ffc04798: 4e 80 04 21 bctrl } rtems_libio_unlock(); return stop; } ffc0479c: 83 ff 00 00 lwz r31,0(r31) { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( ffc047a0: 7f 9f f0 00 cmpw cr7,r31,r30 ffc047a4: 41 9e 00 0c beq- cr7,ffc047b0 node = rtems_chain_first( &mount_chain ); !rtems_chain_is_tail( &mount_chain, node ) && !stop; ffc047a8: 2f 83 00 00 cmpwi cr7,r3,0 ffc047ac: 41 9e ff e0 beq+ cr7,ffc0478c <== ALWAYS TAKEN const rtems_filesystem_mount_table_entry_t *mt_entry = (rtems_filesystem_mount_table_entry_t *) node; stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); ffc047b0: 90 61 00 08 stw r3,8(r1) ffc047b4: 4b ff ff 7d bl ffc04730 return stop; } ffc047b8: 39 61 00 20 addi r11,r1,32 ffc047bc: 80 61 00 08 lwz r3,8(r1) ffc047c0: 48 00 fa 24 b ffc141e4 <_restgpr_28_x> =============================================================================== ffc040f8 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { ffc040f8: 94 21 ff e8 stwu r1,-24(r1) ffc040fc: 7c 08 02 a6 mflr r0 ffc04100: bf a1 00 0c stmw r29,12(r1) ffc04104: 7c 7f 1b 78 mr r31,r3 ffc04108: 7c 9d 23 78 mr r29,r4 ffc0410c: 90 01 00 1c stw r0,28(r1) /* * Eat any separators at start of the path. */ int stripped = 0; ffc04110: 3b c0 00 00 li r30,0 while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) ffc04114: 48 00 00 08 b ffc0411c { pathname++; pathnamelen--; stripped++; ffc04118: 3b de 00 01 addi r30,r30,1 { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) ffc0411c: 7c 7f f0 ae lbzx r3,r31,r30 ffc04120: 2f 83 00 00 cmpwi cr7,r3,0 ffc04124: 41 9e 00 18 beq- cr7,ffc0413c <== NEVER TAKEN ffc04128: 7f 9d f0 00 cmpw cr7,r29,r30 ffc0412c: 41 9e 00 10 beq- cr7,ffc0413c <== NEVER TAKEN ffc04130: 48 00 0f b5 bl ffc050e4 ffc04134: 2f 83 00 00 cmpwi cr7,r3,0 ffc04138: 40 9e ff e0 bne+ cr7,ffc04118 pathname++; pathnamelen--; stripped++; } return stripped; } ffc0413c: 39 61 00 18 addi r11,r1,24 ffc04140: 7f c3 f3 78 mr r3,r30 ffc04144: 48 01 00 a4 b ffc141e8 <_restgpr_29_x> =============================================================================== ffc04db4 : int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *)) { ffc04db4: 94 21 ff e8 stwu r1,-24(r1) ffc04db8: 7c 08 02 a6 mflr r0 ffc04dbc: bf a1 00 0c stmw r29,12(r1) ffc04dc0: 7c 7d 1b 78 mr r29,r3 * pointer to the buffer that will hold the value of the key itself. * We have to to this, because the others functions on this interface * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); ffc04dc4: 38 60 00 08 li r3,8 } return 0; } int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *)) { ffc04dc8: 7c 9e 23 78 mr r30,r4 ffc04dcc: 90 01 00 1c stw r0,28(r1) * pointer to the buffer that will hold the value of the key itself. * We have to to this, because the others functions on this interface * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); ffc04dd0: 48 00 05 25 bl ffc052f4 *key = new_key; new_key->val = NULL; ffc04dd4: 38 00 00 00 li r0,0 * We have to to this, because the others functions on this interface * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); *key = new_key; ffc04dd8: 90 7d 00 00 stw r3,0(r29) * pointer to the buffer that will hold the value of the key itself. * We have to to this, because the others functions on this interface * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); ffc04ddc: 7c 7f 1b 78 mr r31,r3 "gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ); ffc04de0: 7f e4 fb 78 mr r4,r31 * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); *key = new_key; new_key->val = NULL; ffc04de4: 90 03 00 00 stw r0,0(r3) "gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ); ffc04de8: 7f c5 f3 78 mr r5,r30 */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); *key = new_key; new_key->val = NULL; new_key->dtor = dtor; ffc04dec: 93 c3 00 04 stw r30,4(r3) "gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ); ffc04df0: 38 60 00 00 li r3,0 ffc04df4: 48 00 3f 41 bl ffc08d34 if ( status == RTEMS_SUCCESSFUL ) return 0; ffc04df8: 38 00 00 00 li r0,0 ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ); if ( status == RTEMS_SUCCESSFUL ) ffc04dfc: 2f 83 00 00 cmpwi cr7,r3,0 ffc04e00: 41 be 00 10 beq+ cr7,ffc04e10 <== ALWAYS TAKEN return 0; free( new_key ); ffc04e04: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc04e08: 4b ff fe 09 bl ffc04c10 <== NOT EXECUTED return -1; ffc04e0c: 38 00 ff ff li r0,-1 <== NOT EXECUTED } ffc04e10: 39 61 00 18 addi r11,r1,24 ffc04e14: 7c 03 03 78 mr r3,r0 ffc04e18: 4b ff be d4 b ffc00cec <_restgpr_29_x> =============================================================================== ffc04e2c : int rtems_gxx_key_delete (__gthread_key_t key) { ffc04e2c: 7c 2b 0b 78 mr r11,r1 ffc04e30: 94 21 ff f0 stwu r1,-16(r1) ffc04e34: 7c 08 02 a6 mflr r0 ffc04e38: 48 01 02 49 bl ffc15080 <_savegpr_31> ffc04e3c: 7c 7f 1b 78 mr r31,r3 #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: delete key=%x\n", key ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_delete( RTEMS_SELF, (void **)key ); ffc04e40: 7f e4 fb 78 mr r4,r31 key->val = 0; return 0; } int rtems_gxx_key_delete (__gthread_key_t key) { ffc04e44: 90 01 00 14 stw r0,20(r1) #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: delete key=%x\n", key ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_delete( RTEMS_SELF, (void **)key ); ffc04e48: 38 60 00 00 li r3,0 ffc04e4c: 48 00 3f 9d bl ffc08de8 if ( status == RTEMS_SUCCESSFUL ) { ffc04e50: 2f 83 00 00 cmpwi cr7,r3,0 ffc04e54: 40 9e 00 14 bne- cr7,ffc04e68 <== NEVER TAKEN /* Hmm - hopefully all tasks using this key have gone away... */ if ( key ) free( *(void **)key ); ffc04e58: 2f 9f 00 00 cmpwi cr7,r31,0 ffc04e5c: 41 9e 00 0c beq- cr7,ffc04e68 <== NEVER TAKEN ffc04e60: 80 7f 00 00 lwz r3,0(r31) ffc04e64: 4b ff fd ad bl ffc04c10 return 0; } key = NULL; return 0; } ffc04e68: 39 61 00 10 addi r11,r1,16 ffc04e6c: 38 60 00 00 li r3,0 ffc04e70: 4b ff be 84 b ffc00cf4 <_restgpr_31_x> =============================================================================== ffc04f88 : int rtems_gxx_mutex_lock (__gthread_mutex_t *mutex) { ffc04f88: 7c 08 02 a6 mflr r0 ffc04f8c: 94 21 ff f8 stwu r1,-8(r1) #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: lock mutex=%X\n", *mutex ); #endif status = rtems_semaphore_obtain( ffc04f90: 38 80 00 00 li r4,0 printk( "gxx_wrappers: mutex init complete =%X\n", *mutex ); #endif } int rtems_gxx_mutex_lock (__gthread_mutex_t *mutex) { ffc04f94: 90 01 00 0c stw r0,12(r1) #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: lock mutex=%X\n", *mutex ); #endif status = rtems_semaphore_obtain( ffc04f98: 38 a0 00 00 li r5,0 ffc04f9c: 80 63 00 00 lwz r3,0(r3) ffc04fa0: 48 00 36 5d bl ffc085fc RTEMS_WAIT, RTEMS_NO_TIMEOUT ); if ( status == RTEMS_SUCCESSFUL ) return 0; return -1; ffc04fa4: 38 00 ff ff li r0,-1 status = rtems_semaphore_obtain( *(rtems_id *)mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); if ( status == RTEMS_SUCCESSFUL ) ffc04fa8: 2f 83 00 00 cmpwi cr7,r3,0 ffc04fac: 40 9e 00 08 bne- cr7,ffc04fb4 <== NEVER TAKEN return 0; ffc04fb0: 38 00 00 00 li r0,0 return -1; } ffc04fb4: 7c 03 03 78 mr r3,r0 ffc04fb8: 80 01 00 0c lwz r0,12(r1) ffc04fbc: 38 21 00 08 addi r1,r1,8 ffc04fc0: 7c 08 03 a6 mtlr r0 ffc04fc4: 4e 80 00 20 blr =============================================================================== ffc05000 : int rtems_gxx_mutex_trylock (__gthread_mutex_t *mutex) { ffc05000: 7c 08 02 a6 mflr r0 ffc05004: 94 21 ff f8 stwu r1,-8(r1) #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: trylock mutex=%X\n", *mutex ); #endif status = rtems_semaphore_obtain (*(rtems_id *)mutex, RTEMS_NO_WAIT, 0); ffc05008: 38 80 00 01 li r4,1 return 0; return -1; } int rtems_gxx_mutex_trylock (__gthread_mutex_t *mutex) { ffc0500c: 90 01 00 0c stw r0,12(r1) #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: trylock mutex=%X\n", *mutex ); #endif status = rtems_semaphore_obtain (*(rtems_id *)mutex, RTEMS_NO_WAIT, 0); ffc05010: 38 a0 00 00 li r5,0 ffc05014: 80 63 00 00 lwz r3,0(r3) ffc05018: 48 00 35 e5 bl ffc085fc if ( status == RTEMS_SUCCESSFUL ) return 0; return -1; ffc0501c: 38 00 ff ff li r0,-1 #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: trylock mutex=%X\n", *mutex ); #endif status = rtems_semaphore_obtain (*(rtems_id *)mutex, RTEMS_NO_WAIT, 0); if ( status == RTEMS_SUCCESSFUL ) ffc05020: 2f 83 00 00 cmpwi cr7,r3,0 ffc05024: 40 9e 00 08 bne- cr7,ffc0502c <== NEVER TAKEN return 0; ffc05028: 38 00 00 00 li r0,0 return -1; } ffc0502c: 7c 03 03 78 mr r3,r0 ffc05030: 80 01 00 0c lwz r0,12(r1) ffc05034: 38 21 00 08 addi r1,r1,8 ffc05038: 7c 08 03 a6 mtlr r0 ffc0503c: 4e 80 00 20 blr =============================================================================== ffc05040 : int rtems_gxx_mutex_unlock (__gthread_mutex_t *mutex) { ffc05040: 7c 08 02 a6 mflr r0 ffc05044: 94 21 ff f8 stwu r1,-8(r1) ffc05048: 90 01 00 0c stw r0,12(r1) #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: unlock mutex=%X\n", *mutex ); #endif status = rtems_semaphore_release( *(rtems_id *)mutex ); ffc0504c: 80 63 00 00 lwz r3,0(r3) ffc05050: 48 00 36 d5 bl ffc08724 if ( status == RTEMS_SUCCESSFUL ) return 0; return -1; ffc05054: 38 00 ff ff li r0,-1 #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: unlock mutex=%X\n", *mutex ); #endif status = rtems_semaphore_release( *(rtems_id *)mutex ); if ( status == RTEMS_SUCCESSFUL ) ffc05058: 2f 83 00 00 cmpwi cr7,r3,0 ffc0505c: 40 9e 00 08 bne- cr7,ffc05064 <== NEVER TAKEN return 0; ffc05060: 38 00 00 00 li r0,0 return -1; } ffc05064: 7c 03 03 78 mr r3,r0 ffc05068: 80 01 00 0c lwz r0,12(r1) ffc0506c: 38 21 00 08 addi r1,r1,8 ffc05070: 7c 08 03 a6 mtlr r0 ffc05074: 4e 80 00 20 blr =============================================================================== ffc04d40 : /* uncomment this if you need to debug this interface */ /*#define DEBUG_GXX_WRAPPERS 1*/ int rtems_gxx_once(__gthread_once_t *once, void (*func) (void)) { ffc04d40: 94 21 ff d8 stwu r1,-40(r1) ffc04d44: 7c 08 02 a6 mflr r0 ffc04d48: 90 01 00 2c stw r0,44(r1) #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: once=%x, func=%x\n", *once, func ); #endif if ( *(volatile __gthread_once_t *)once == 0 ) { ffc04d4c: 80 03 00 00 lwz r0,0(r3) /* uncomment this if you need to debug this interface */ /*#define DEBUG_GXX_WRAPPERS 1*/ int rtems_gxx_once(__gthread_once_t *once, void (*func) (void)) { ffc04d50: bf a1 00 1c stmw r29,28(r1) ffc04d54: 7c 7f 1b 78 mr r31,r3 #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: once=%x, func=%x\n", *once, func ); #endif if ( *(volatile __gthread_once_t *)once == 0 ) { ffc04d58: 2f 80 00 00 cmpwi cr7,r0,0 /* uncomment this if you need to debug this interface */ /*#define DEBUG_GXX_WRAPPERS 1*/ int rtems_gxx_once(__gthread_once_t *once, void (*func) (void)) { ffc04d5c: 7c 9d 23 78 mr r29,r4 #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: once=%x, func=%x\n", *once, func ); #endif if ( *(volatile __gthread_once_t *)once == 0 ) { ffc04d60: 40 be 00 48 bne+ cr7,ffc04da8 rtems_mode saveMode; __gthread_once_t o; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); ffc04d64: 38 60 01 00 li r3,256 ffc04d68: 38 80 01 00 li r4,256 ffc04d6c: 38 a1 00 08 addi r5,r1,8 ffc04d70: 48 00 3d 3d bl ffc08aac if ( (o = *(volatile __gthread_once_t *)once) == 0 ) { ffc04d74: 83 df 00 00 lwz r30,0(r31) ffc04d78: 2f 9e 00 00 cmpwi cr7,r30,0 ffc04d7c: 40 9e 00 0c bne- cr7,ffc04d88 <== NEVER TAKEN *(volatile __gthread_once_t *)once = 1; ffc04d80: 38 00 00 01 li r0,1 ffc04d84: 90 1f 00 00 stw r0,0(r31) } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); ffc04d88: 7c 25 0b 78 mr r5,r1 ffc04d8c: 84 65 00 08 lwzu r3,8(r5) ffc04d90: 38 80 01 00 li r4,256 ffc04d94: 48 00 3d 19 bl ffc08aac if ( o == 0 ) ffc04d98: 2f 9e 00 00 cmpwi cr7,r30,0 ffc04d9c: 40 be 00 0c bne+ cr7,ffc04da8 <== NEVER TAKEN (*func)(); ffc04da0: 7f a9 03 a6 mtctr r29 ffc04da4: 4e 80 04 21 bctrl } return 0; } ffc04da8: 39 61 00 28 addi r11,r1,40 ffc04dac: 38 60 00 00 li r3,0 ffc04db0: 4b ff bf 3c b ffc00cec <_restgpr_29_x> =============================================================================== ffc04ef0 : int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr) { ffc04ef0: 94 21 ff f0 stwu r1,-16(r1) ffc04ef4: 7c 08 02 a6 mflr r0 ffc04ef8: 90 01 00 14 stw r0,20(r1) ffc04efc: bf c1 00 08 stmw r30,8(r1) ffc04f00: 7c 7f 1b 78 mr r31,r3 ffc04f04: 7c 9e 23 78 mr r30,r4 rtems_task_self() ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor ); ffc04f08: 80 bf 00 04 lwz r5,4(r31) ffc04f0c: 38 60 00 00 li r3,0 ffc04f10: 7f e4 fb 78 mr r4,r31 ffc04f14: 48 00 3e 21 bl ffc08d34 if ( status == RTEMS_SUCCESSFUL ) { /* now let's set the proper value */ key->val = (void *)ptr; return 0; } return -1; ffc04f18: 38 00 ff ff li r0,-1 ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor ); if ( status == RTEMS_SUCCESSFUL ) { ffc04f1c: 2f 83 00 00 cmpwi cr7,r3,0 ffc04f20: 40 9e 00 0c bne- cr7,ffc04f2c <== NEVER TAKEN /* now let's set the proper value */ key->val = (void *)ptr; ffc04f24: 93 df 00 00 stw r30,0(r31) return 0; ffc04f28: 38 00 00 00 li r0,0 } return -1; } ffc04f2c: 39 61 00 10 addi r11,r1,16 ffc04f30: 7c 03 03 78 mr r3,r0 ffc04f34: 4b ff bd bc b ffc00cf0 <_restgpr_30_x> =============================================================================== ffc0899c : void *rtems_heap_allocate_aligned_with_boundary( size_t size, uintptr_t alignment, uintptr_t boundary ) { ffc0899c: 94 21 ff e8 stwu r1,-24(r1) ffc089a0: 7c 08 02 a6 mflr r0 if ( ffc089a4: 3d 20 00 00 lis r9,0 void *rtems_heap_allocate_aligned_with_boundary( size_t size, uintptr_t alignment, uintptr_t boundary ) { ffc089a8: 90 01 00 1c stw r0,28(r1) if ( ffc089ac: 80 09 28 48 lwz r0,10312(r9) void *rtems_heap_allocate_aligned_with_boundary( size_t size, uintptr_t alignment, uintptr_t boundary ) { ffc089b0: bf a1 00 0c stmw r29,12(r1) ffc089b4: 7c 7d 1b 78 mr r29,r3 if ( ffc089b8: 2f 80 00 03 cmpwi cr7,r0,3 void *rtems_heap_allocate_aligned_with_boundary( size_t size, uintptr_t alignment, uintptr_t boundary ) { ffc089bc: 7c 9e 23 78 mr r30,r4 ffc089c0: 7c bf 2b 78 mr r31,r5 if ( ffc089c4: 40 be 00 14 bne+ cr7,ffc089d8 <== NEVER TAKEN _System_state_Is_up( _System_state_Get() ) && !malloc_is_system_state_OK() ffc089c8: 4b ff ed 09 bl ffc076d0 ) { return NULL; ffc089cc: 38 00 00 00 li r0,0 uintptr_t boundary ) { if ( _System_state_Is_up( _System_state_Get() ) && !malloc_is_system_state_OK() ffc089d0: 2f 83 00 00 cmpwi cr7,r3,0 ffc089d4: 41 9e 00 24 beq- cr7,ffc089f8 ) { return NULL; } malloc_deferred_frees_process(); ffc089d8: 4b ff ed 41 bl ffc07718 /* FIXME: Statistics, boundary checks */ return _Protected_heap_Allocate_aligned_with_boundary( ffc089dc: 3d 20 00 00 lis r9,0 ffc089e0: 80 69 27 24 lwz r3,10020(r9) ffc089e4: 7f a4 eb 78 mr r4,r29 ffc089e8: 7f c5 f3 78 mr r5,r30 ffc089ec: 7f e6 fb 78 mr r6,r31 ffc089f0: 48 00 53 85 bl ffc0dd74 <_Protected_heap_Allocate_aligned_with_boundary> ffc089f4: 7c 60 1b 78 mr r0,r3 RTEMS_Malloc_Heap, size, alignment, boundary ); } ffc089f8: 39 61 00 18 addi r11,r1,24 ffc089fc: 7c 03 03 78 mr r3,r0 ffc08a00: 4b ff a8 a0 b ffc032a0 <_restgpr_29_x> =============================================================================== ffc03d6c : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { ffc03d6c: 94 21 ff c0 stwu r1,-64(r1) ffc03d70: 7c 08 02 a6 mflr r0 ffc03d74: bf 61 00 2c stmw r27,44(r1) ffc03d78: 7c 7d 1b 78 mr r29,r3 ffc03d7c: 7c 9f 23 78 mr r31,r4 ffc03d80: 90 01 00 44 stw r0,68(r1) IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( ffc03d84: 3b c1 00 08 addi r30,r1,8 ffc03d88: 48 00 c7 11 bl ffc10498 ffc03d8c: 38 a0 00 00 li r5,0 ffc03d90: 7c 64 1b 78 mr r4,r3 ffc03d94: 7f c6 f3 78 mr r6,r30 ffc03d98: 38 e0 00 01 li r7,1 ffc03d9c: 7f a3 eb 78 mr r3,r29 ffc03da0: 48 00 02 b5 bl ffc04054 name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; node_type = (*loc.ops->node_type_h)( &loc ); ffc03da4: 81 21 00 14 lwz r9,20(r1) IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( ffc03da8: 7c 7b 1b 78 mr r27,r3 name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; ffc03dac: 83 81 00 08 lwz r28,8(r1) node_type = (*loc.ops->node_type_h)( &loc ); ffc03db0: 80 09 00 10 lwz r0,16(r9) ffc03db4: 7f c3 f3 78 mr r3,r30 ffc03db8: 7c 09 03 a6 mtctr r0 ffc03dbc: 4e 80 04 21 bctrl if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { ffc03dc0: 2f 9b 00 00 cmpwi cr7,r27,0 ffc03dc4: 40 9e 00 0c bne- cr7,ffc03dd0 <== NEVER TAKEN ffc03dc8: 2f 83 00 02 cmpwi cr7,r3,2 ffc03dcc: 41 9e 00 14 beq- cr7,ffc03de0 rtems_filesystem_freenode( &loc ); ffc03dd0: 38 61 00 08 addi r3,r1,8 ffc03dd4: 48 00 03 75 bl ffc04148 return RTEMS_UNSATISFIED; ffc03dd8: 38 60 00 0d li r3,13 ffc03ddc: 48 00 00 30 b ffc03e0c } device_info->device_name = (char *) name; ffc03de0: 93 bf 00 00 stw r29,0(r31) device_info->device_name_length = strlen( name ); ffc03de4: 7f a3 eb 78 mr r3,r29 ffc03de8: 48 00 c6 b1 bl ffc10498 ffc03dec: 90 7f 00 04 stw r3,4(r31) device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); ffc03df0: 7f c3 f3 78 mr r3,r30 return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; ffc03df4: 80 1c 00 50 lwz r0,80(r28) ffc03df8: 90 1f 00 08 stw r0,8(r31) device_info->minor = the_jnode->info.device.minor; ffc03dfc: 80 1c 00 54 lwz r0,84(r28) ffc03e00: 90 1f 00 0c stw r0,12(r31) rtems_filesystem_freenode( &loc ); ffc03e04: 48 00 03 45 bl ffc04148 return RTEMS_SUCCESSFUL; ffc03e08: 38 60 00 00 li r3,0 } ffc03e0c: 39 61 00 40 addi r11,r1,64 ffc03e10: 48 01 03 d0 b ffc141e0 <_restgpr_27_x> =============================================================================== ffc09214 : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { ffc09214: 7c 08 02 a6 mflr r0 ffc09218: 7c 2b 0b 78 mr r11,r1 ffc0921c: 94 21 ff f0 stwu r1,-16(r1) rtems_device_major_number major_limit = _IO_Number_of_drivers; ffc09220: 3d 20 00 00 lis r9,0 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { ffc09224: 90 01 00 14 stw r0,20(r1) ffc09228: 48 00 f0 55 bl ffc1827c <_savegpr_31> ffc0922c: 7c 7f 1b 78 mr r31,r3 rtems_device_major_number major_limit = _IO_Number_of_drivers; ffc09230: 80 09 27 d0 lwz r0,10192(r9) if ( rtems_interrupt_is_in_progress() ) ffc09234: 3d 20 00 00 lis r9,0 ffc09238: 81 29 2e 40 lwz r9,11840(r9) return RTEMS_CALLED_FROM_ISR; ffc0923c: 38 60 00 12 li r3,18 rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc09240: 2f 89 00 00 cmpwi cr7,r9,0 ffc09244: 40 9e 01 14 bne- cr7,ffc09358 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) ffc09248: 2f 85 00 00 cmpwi cr7,r5,0 return RTEMS_INVALID_ADDRESS; ffc0924c: 38 60 00 09 li r3,9 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) ffc09250: 41 9e 01 08 beq- cr7,ffc09358 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) ffc09254: 2f 84 00 00 cmpwi cr7,r4,0 if ( registered_major == NULL ) return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; ffc09258: 90 05 00 00 stw r0,0(r5) if ( driver_table == NULL ) ffc0925c: 41 9e 00 fc beq- cr7,ffc09358 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc09260: 81 24 00 00 lwz r9,0(r4) ffc09264: 2f 89 00 00 cmpwi cr7,r9,0 ffc09268: 40 be 00 f8 bne+ cr7,ffc09360 ffc0926c: 81 24 00 04 lwz r9,4(r4) ffc09270: 2f 89 00 00 cmpwi cr7,r9,0 ffc09274: 40 be 00 ec bne+ cr7,ffc09360 ffc09278: 48 00 00 e0 b ffc09358 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0927c: 3d 20 00 00 lis r9,0 ffc09280: 81 69 27 80 lwz r11,10112(r9) ffc09284: 38 0b 00 01 addi r0,r11,1 ffc09288: 90 09 27 80 stw r0,10112(r9) if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { ffc0928c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc09290: 3d 20 00 00 lis r9,0 ffc09294: 40 9e 00 58 bne- cr7,ffc092ec static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; ffc09298: 3d 60 00 00 lis r11,0 ffc0929c: 81 29 27 d4 lwz r9,10196(r9) ffc092a0: 81 6b 27 d0 lwz r11,10192(r11) ffc092a4: 2f 8b 00 00 cmpwi cr7,r11,0 ffc092a8: 38 0b 00 01 addi r0,r11,1 ffc092ac: 40 be 00 28 bne+ cr7,ffc092d4 <== ALWAYS TAKEN ffc092b0: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc092b4: 48 00 00 20 b ffc092d4 <== NOT EXECUTED static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc092b8: 81 49 00 00 lwz r10,0(r9) ffc092bc: 2f 8a 00 00 cmpwi cr7,r10,0 ffc092c0: 40 be 00 b0 bne+ cr7,ffc09370 ffc092c4: 81 49 00 04 lwz r10,4(r9) ffc092c8: 2f 8a 00 00 cmpwi cr7,r10,0 ffc092cc: 40 be 00 a4 bne+ cr7,ffc09370 ffc092d0: 48 00 00 0c b ffc092dc rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { ffc092d4: 34 00 ff ff addic. r0,r0,-1 ffc092d8: 40 82 ff e0 bne+ ffc092b8 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) ffc092dc: 7f 9f 58 00 cmpw cr7,r31,r11 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; ffc092e0: 93 e5 00 00 stw r31,0(r5) if ( m != n ) ffc092e4: 40 be 00 48 bne+ cr7,ffc0932c ffc092e8: 48 00 00 94 b ffc0937c _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; ffc092ec: 1c 1f 00 18 mulli r0,r31,24 ffc092f0: 81 29 27 d4 lwz r9,10196(r9) ffc092f4: 7d 69 02 14 add r11,r9,r0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc092f8: 7d 29 00 2e lwzx r9,r9,r0 ffc092fc: 38 00 00 00 li r0,0 ffc09300: 2f 89 00 00 cmpwi cr7,r9,0 ffc09304: 40 be 00 10 bne+ cr7,ffc09314 return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; } rtems_status_code rtems_io_register_driver( ffc09308: 80 0b 00 04 lwz r0,4(r11) ffc0930c: 7c 00 00 34 cntlzw r0,r0 ffc09310: 54 00 d9 7e rlwinm r0,r0,27,5,31 } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { ffc09314: 2f 80 00 00 cmpwi cr7,r0,0 ffc09318: 40 9e 00 10 bne- cr7,ffc09328 _Thread_Enable_dispatch(); ffc0931c: 48 00 1f 91 bl ffc0b2ac <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; ffc09320: 38 60 00 0c li r3,12 ffc09324: 48 00 00 34 b ffc09358 } *registered_major = major; ffc09328: 93 e5 00 00 stw r31,0(r5) } _IO_Driver_address_table [major] = *driver_table; ffc0932c: 3d 20 00 00 lis r9,0 ffc09330: 81 69 27 d4 lwz r11,10196(r9) ffc09334: 1c 1f 00 18 mulli r0,r31,24 ffc09338: 7d 6b 02 14 add r11,r11,r0 ffc0933c: 7c a4 c4 aa lswi r5,r4,24 ffc09340: 7c ab c5 aa stswi r5,r11,24 _Thread_Enable_dispatch(); ffc09344: 48 00 1f 69 bl ffc0b2ac <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); ffc09348: 7f e3 fb 78 mr r3,r31 ffc0934c: 38 80 00 00 li r4,0 ffc09350: 38 a0 00 00 li r5,0 ffc09354: 48 00 7d a5 bl ffc110f8 } ffc09358: 39 61 00 10 addi r11,r1,16 ffc0935c: 48 00 ef 6c b ffc182c8 <_restgpr_31_x> return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) ffc09360: 7f 9f 00 40 cmplw cr7,r31,r0 return RTEMS_INVALID_NUMBER; ffc09364: 38 60 00 0a li r3,10 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) ffc09368: 41 9c ff 14 blt+ cr7,ffc0927c ffc0936c: 4b ff ff ec b ffc09358 rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { ffc09370: 3b ff 00 01 addi r31,r31,1 ffc09374: 39 29 00 18 addi r9,r9,24 ffc09378: 4b ff ff 5c b ffc092d4 if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); ffc0937c: 48 00 1f 31 bl ffc0b2ac <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; ffc09380: 38 60 00 05 li r3,5 if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); return sc; ffc09384: 4b ff ff d4 b ffc09358 =============================================================================== ffc0aba8 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { ffc0aba8: 94 21 ff e0 stwu r1,-32(r1) ffc0abac: 7c 08 02 a6 mflr r0 ffc0abb0: bf 61 00 0c stmw r27,12(r1) uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) ffc0abb4: 7c 7b 1b 79 mr. r27,r3 #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { ffc0abb8: 90 01 00 24 stw r0,36(r1) uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) ffc0abbc: 41 82 00 64 beq- ffc0ac20 <== NEVER TAKEN ffc0abc0: 3f e0 00 01 lis r31,1 ffc0abc4: 3b ff a9 a0 addi r31,r31,-22112 #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) ffc0abc8: 3b 9f 00 0c addi r28,r31,12 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) ffc0abcc: 85 3f 00 04 lwzu r9,4(r31) ffc0abd0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0abd4: 41 9e 00 44 beq- cr7,ffc0ac18 continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; ffc0abd8: 83 a9 00 04 lwz r29,4(r9) if ( !information ) ffc0abdc: 3b c0 00 01 li r30,1 ffc0abe0: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0abe4: 40 be 00 28 bne+ cr7,ffc0ac0c ffc0abe8: 48 00 00 30 b ffc0ac18 continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; ffc0abec: 81 3d 00 1c lwz r9,28(r29) ffc0abf0: 57 c0 10 3a rlwinm r0,r30,2,0,29 ffc0abf4: 7c 69 00 2e lwzx r3,r9,r0 if ( !the_thread ) ffc0abf8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0abfc: 41 9e 00 0c beq- cr7,ffc0ac08 continue; (*routine)(the_thread); ffc0ac00: 7f 69 03 a6 mtctr r27 ffc0ac04: 4e 80 04 21 bctrl information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0ac08: 3b de 00 01 addi r30,r30,1 ffc0ac0c: a0 1d 00 10 lhz r0,16(r29) ffc0ac10: 7f 9e 00 40 cmplw cr7,r30,r0 ffc0ac14: 40 9d ff d8 ble+ cr7,ffc0abec Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { ffc0ac18: 7f 9f e0 00 cmpw cr7,r31,r28 ffc0ac1c: 40 9e ff b0 bne+ cr7,ffc0abcc (*routine)(the_thread); } } } ffc0ac20: 39 61 00 20 addi r11,r1,32 ffc0ac24: 4b ff 67 1c b ffc01340 <_restgpr_27_x> =============================================================================== ffc0c578 : */ void rtems_libio_free( rtems_libio_t *iop ) { ffc0c578: 7c 2b 0b 78 mr r11,r1 ffc0c57c: 94 21 ff f0 stwu r1,-16(r1) ffc0c580: 7c 08 02 a6 mflr r0 ffc0c584: 48 00 7c 21 bl ffc141a4 <_savegpr_31> ffc0c588: 7c 7f 1b 78 mr r31,r3 ffc0c58c: 90 01 00 14 stw r0,20(r1) rtems_libio_lock(); ffc0c590: 4b ff fe 69 bl ffc0c3f8 if (iop->sem) ffc0c594: 80 7f 00 30 lwz r3,48(r31) ffc0c598: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c59c: 41 be 00 08 beq+ cr7,ffc0c5a4 <== NEVER TAKEN rtems_semaphore_delete(iop->sem); ffc0c5a0: 4b ff b1 c1 bl ffc07760 iop->flags &= ~LIBIO_FLAGS_OPEN; ffc0c5a4: 80 1f 00 18 lwz r0,24(r31) iop->data1 = rtems_libio_iop_freelist; ffc0c5a8: 3d 20 00 00 lis r9,0 rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; ffc0c5ac: 54 00 06 2c rlwinm r0,r0,0,24,22 ffc0c5b0: 90 1f 00 18 stw r0,24(r31) iop->data1 = rtems_libio_iop_freelist; ffc0c5b4: 80 09 27 4c lwz r0,10060(r9) rtems_libio_iop_freelist = iop; ffc0c5b8: 93 e9 27 4c stw r31,10060(r9) if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; ffc0c5bc: 90 1f 00 38 stw r0,56(r31) rtems_libio_iop_freelist = iop; rtems_libio_unlock(); } ffc0c5c0: 80 01 00 14 lwz r0,20(r1) ffc0c5c4: 83 e1 00 0c lwz r31,12(r1) ffc0c5c8: 38 21 00 10 addi r1,r1,16 ffc0c5cc: 7c 08 03 a6 mtlr r0 iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; rtems_libio_unlock(); ffc0c5d0: 4b ff fe 58 b ffc0c428 =============================================================================== ffc042a4 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { ffc042a4: 7c 2b 0b 78 mr r11,r1 ffc042a8: 94 21 ff f0 stwu r1,-16(r1) rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) ffc042ac: 3d 20 00 00 lis r9,0 * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { ffc042b0: 7c 08 02 a6 mflr r0 ffc042b4: 48 00 fe f1 bl ffc141a4 <_savegpr_31> rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) ffc042b8: 83 e9 26 8c lwz r31,9868(r9) * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { ffc042bc: 90 01 00 14 stw r0,20(r1) rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) ffc042c0: 2f 9f 00 00 cmpwi cr7,r31,0 ffc042c4: 41 9e 00 5c beq- cr7,ffc04320 <== NEVER TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, ffc042c8: 7f e3 fb 78 mr r3,r31 ffc042cc: 38 80 00 40 li r4,64 ffc042d0: 4b ff fc 9d bl ffc03f6c ffc042d4: 3d 20 00 00 lis r9,0 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) ffc042d8: 2f 83 00 00 cmpwi cr7,r3,0 uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, ffc042dc: 90 69 27 48 stw r3,10056(r9) sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) ffc042e0: 40 be 00 0c bne+ cr7,ffc042ec rtems_fatal_error_occurred(RTEMS_NO_MEMORY); ffc042e4: 38 60 00 1a li r3,26 ffc042e8: 48 00 00 60 b ffc04348 iop = rtems_libio_iop_freelist = rtems_libio_iops; ffc042ec: 3d 20 00 00 lis r9,0 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) ffc042f0: 7f e9 03 a6 mtctr r31 rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; ffc042f4: 90 69 27 4c stw r3,10060(r9) ffc042f8: 7c 69 1b 78 mr r9,r3 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) ffc042fc: 48 00 00 08 b ffc04304 iop->data1 = iop + 1; ffc04300: 91 29 ff f8 stw r9,-8(r9) sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) ffc04304: 39 29 00 40 addi r9,r9,64 ffc04308: 42 00 ff f8 bdnz+ ffc04300 * rtems_libio_init * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) ffc0430c: 57 ff 30 32 rlwinm r31,r31,6,0,25 rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) iop->data1 = iop + 1; iop->data1 = NULL; ffc04310: 3b ff ff c0 addi r31,r31,-64 ffc04314: 7c 63 fa 14 add r3,r3,r31 ffc04318: 38 00 00 00 li r0,0 ffc0431c: 90 03 00 38 stw r0,56(r3) /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( ffc04320: 3c 60 4c 42 lis r3,19522 ffc04324: 3c e0 00 00 lis r7,0 ffc04328: 60 63 49 4f ori r3,r3,18767 ffc0432c: 38 80 00 01 li r4,1 ffc04330: 38 a0 00 54 li r5,84 ffc04334: 38 c0 00 00 li r6,0 ffc04338: 38 e7 27 50 addi r7,r7,10064 ffc0433c: 48 00 32 5d bl ffc07598 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) ffc04340: 2f 83 00 00 cmpwi cr7,r3,0 ffc04344: 41 be 00 08 beq+ cr7,ffc0434c <== ALWAYS TAKEN rtems_fatal_error_occurred( rc ); ffc04348: 48 00 3c 4d bl ffc07f94 /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) ffc0434c: 3d 20 00 00 lis r9,0 ffc04350: 80 09 26 88 lwz r0,9864(r9) ffc04354: 2f 80 00 00 cmpwi cr7,r0,0 ffc04358: 41 9e 00 0c beq- cr7,ffc04364 <== NEVER TAKEN (* rtems_fs_init_helper)(); ffc0435c: 7c 09 03 a6 mtctr r0 ffc04360: 4e 80 04 21 bctrl } ffc04364: 39 61 00 10 addi r11,r1,16 ffc04368: 48 00 fe 88 b ffc141f0 <_restgpr_31_x> =============================================================================== ffc0c654 : */ int rtems_libio_is_file_open( void *node_access ) { ffc0c654: 7c 2b 0b 78 mr r11,r1 ffc0c658: 7c 08 02 a6 mflr r0 ffc0c65c: 94 21 ff f0 stwu r1,-16(r1) ffc0c660: 48 00 7b 45 bl ffc141a4 <_savegpr_31> ffc0c664: 90 01 00 14 stw r0,20(r1) ffc0c668: 7c 7f 1b 78 mr r31,r3 rtems_libio_t *iop; int result=0; uint32_t i; rtems_libio_lock(); ffc0c66c: 4b ff fd 8d bl ffc0c3f8 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc0c670: 3d 60 00 00 lis r11,0 ffc0c674: 81 6b 26 8c lwz r11,9868(r11) ffc0c678: 3d 20 00 00 lis r9,0 ffc0c67c: 81 29 27 48 lwz r9,10056(r9) ffc0c680: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0c684: 38 0b 00 01 addi r0,r11,1 ffc0c688: 40 be 00 28 bne+ cr7,ffc0c6b0 <== ALWAYS TAKEN ffc0c68c: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0c690: 48 00 00 20 b ffc0c6b0 <== NOT EXECUTED if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { ffc0c694: 81 69 00 18 lwz r11,24(r9) ffc0c698: 71 6a 01 00 andi. r10,r11,256 ffc0c69c: 41 82 00 10 beq- ffc0c6ac /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { ffc0c6a0: 81 69 00 1c lwz r11,28(r9) ffc0c6a4: 7f 8b f8 00 cmpw cr7,r11,r31 ffc0c6a8: 41 9e 00 18 beq- cr7,ffc0c6c0 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc0c6ac: 39 29 00 40 addi r9,r9,64 ffc0c6b0: 34 00 ff ff addic. r0,r0,-1 ffc0c6b4: 40 82 ff e0 bne+ ffc0c694 int rtems_libio_is_file_open( void *node_access ) { rtems_libio_t *iop; int result=0; ffc0c6b8: 3b e0 00 00 li r31,0 ffc0c6bc: 48 00 00 08 b ffc0c6c4 * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { result = 1; ffc0c6c0: 3b e0 00 01 li r31,1 break; } } } rtems_libio_unlock(); ffc0c6c4: 4b ff fd 65 bl ffc0c428 return result; } ffc0c6c8: 39 61 00 10 addi r11,r1,16 ffc0c6cc: 7f e3 fb 78 mr r3,r31 ffc0c6d0: 48 00 7b 20 b ffc141f0 <_restgpr_31_x> =============================================================================== ffc0c5d4 : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { ffc0c5d4: 7c 2b 0b 78 mr r11,r1 ffc0c5d8: 7c 08 02 a6 mflr r0 ffc0c5dc: 94 21 ff f0 stwu r1,-16(r1) ffc0c5e0: 48 00 7b c5 bl ffc141a4 <_savegpr_31> ffc0c5e4: 90 01 00 14 stw r0,20(r1) ffc0c5e8: 7c 7f 1b 78 mr r31,r3 rtems_libio_t *iop; int result = 0; uint32_t i; rtems_libio_lock(); ffc0c5ec: 4b ff fe 0d bl ffc0c3f8 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc0c5f0: 3d 60 00 00 lis r11,0 ffc0c5f4: 81 6b 26 8c lwz r11,9868(r11) ffc0c5f8: 3d 20 00 00 lis r9,0 ffc0c5fc: 81 29 27 48 lwz r9,10056(r9) ffc0c600: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0c604: 38 0b 00 01 addi r0,r11,1 ffc0c608: 40 be 00 28 bne+ cr7,ffc0c630 <== ALWAYS TAKEN ffc0c60c: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0c610: 48 00 00 20 b ffc0c630 <== NOT EXECUTED if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { ffc0c614: 81 69 00 18 lwz r11,24(r9) ffc0c618: 71 6a 01 00 andi. r10,r11,256 ffc0c61c: 41 82 00 10 beq- ffc0c62c /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { ffc0c620: 81 69 00 2c lwz r11,44(r9) ffc0c624: 7f 8b f8 00 cmpw cr7,r11,r31 ffc0c628: 41 9e 00 18 beq- cr7,ffc0c640 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc0c62c: 39 29 00 40 addi r9,r9,64 ffc0c630: 34 00 ff ff addic. r0,r0,-1 ffc0c634: 40 82 ff e0 bne+ ffc0c614 int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { rtems_libio_t *iop; int result = 0; ffc0c638: 3b e0 00 00 li r31,0 ffc0c63c: 48 00 00 08 b ffc0c644 * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { result = 1; ffc0c640: 3b e0 00 01 li r31,1 break; } } } rtems_libio_unlock(); ffc0c644: 4b ff fd e5 bl ffc0c428 return result; } ffc0c648: 39 61 00 10 addi r11,r1,16 ffc0c64c: 7f e3 fb 78 mr r3,r31 ffc0c650: 48 00 7b a0 b ffc141f0 <_restgpr_31_x> =============================================================================== ffc05698 : rtems_status_code rtems_libio_set_private_env(void) { ffc05698: 94 21 ff b8 stwu r1,-72(r1) ffc0569c: 7c 08 02 a6 mflr r0 ffc056a0: bf a1 00 3c stmw r29,60(r1) rtems_filesystem_location_info_t root_loc; rtems_filesystem_location_info_t current_loc; rtems_user_env_t *new_env = NULL; int rv = 0; rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0); ffc056a4: 3f e0 ff c1 lis r31,-63 ffc056a8: 3b ff 63 64 addi r31,r31,25444 free(env); } } rtems_status_code rtems_libio_set_private_env(void) { ffc056ac: 90 01 00 4c stw r0,76(r1) rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_id task_id = rtems_task_self(); ffc056b0: 48 00 2d fd bl ffc084ac ffc056b4: 7c 7e 1b 78 mr r30,r3 rtems_filesystem_location_info_t root_loc; rtems_filesystem_location_info_t current_loc; rtems_user_env_t *new_env = NULL; int rv = 0; rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0); ffc056b8: 38 80 00 01 li r4,1 ffc056bc: 7f e3 fb 78 mr r3,r31 ffc056c0: 38 a0 00 00 li r5,0 ffc056c4: 38 c1 00 08 addi r6,r1,8 ffc056c8: 38 e0 00 00 li r7,0 ffc056cc: 4b ff ec 4d bl ffc04318 error_1: rtems_filesystem_freenode(&root_loc); error_0: return RTEMS_NO_MEMORY; ffc056d0: 38 00 00 1a li r0,26 rtems_filesystem_location_info_t current_loc; rtems_user_env_t *new_env = NULL; int rv = 0; rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0); if (rv != 0) ffc056d4: 2f 83 00 00 cmpwi cr7,r3,0 ffc056d8: 40 be 00 e0 bne+ cr7,ffc057b8 <== NEVER TAKEN goto error_0; rv = rtems_filesystem_evaluate_path("/", 1, 0, ¤t_loc, 0); ffc056dc: 7f e3 fb 78 mr r3,r31 ffc056e0: 38 80 00 01 li r4,1 ffc056e4: 38 a0 00 00 li r5,0 ffc056e8: 38 c1 00 1c addi r6,r1,28 ffc056ec: 38 e0 00 00 li r7,0 ffc056f0: 4b ff ec 29 bl ffc04318 if (rv != 0) ffc056f4: 2f 83 00 00 cmpwi cr7,r3,0 ffc056f8: 40 9e 00 b4 bne- cr7,ffc057ac <== NEVER TAKEN * Bharath: I'm not sure if the check can be reduced to * if( rtems_current_user_env->task_id != task_id ) { */ if ( rtems_current_user_env == &rtems_global_user_env ffc056fc: 3d 20 00 00 lis r9,0 ffc05700: 81 29 26 bc lwz r9,9916(r9) /* * Bharath: I'm not sure if the check can be reduced to * if( rtems_current_user_env->task_id != task_id ) { */ if ( ffc05704: 3d 60 00 00 lis r11,0 ffc05708: 38 0b 2a 98 addi r0,r11,10904 ffc0570c: 7f 89 00 00 cmpw cr7,r9,r0 ffc05710: 41 9e 00 10 beq- cr7,ffc05720 rtems_current_user_env == &rtems_global_user_env || rtems_current_user_env->task_id != task_id ffc05714: 80 09 00 00 lwz r0,0(r9) ffc05718: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0571c: 41 9e 00 38 beq- cr7,ffc05754 ) { new_env = malloc(sizeof(rtems_user_env_t)); ffc05720: 38 60 00 48 li r3,72 ffc05724: 4b ff f3 bd bl ffc04ae0 if (new_env == NULL) ffc05728: 7c 7f 1b 79 mr. r31,r3 ffc0572c: 41 82 00 78 beq- ffc057a4 #ifdef HAVE_USERENV_REFCNT new_env->refcnt = 1; #endif sc = rtems_task_variable_add( ffc05730: 3f a0 00 00 lis r29,0 ffc05734: 3c a0 ff c0 lis r5,-64 ffc05738: 38 60 00 00 li r3,0 ffc0573c: 38 9d 26 bc addi r4,r29,9916 ffc05740: 38 a5 56 50 addi r5,r5,22096 ffc05744: 48 00 2e 4d bl ffc08590 RTEMS_SELF, (void*)&rtems_current_user_env, (void(*)(void *))free_user_env ); if (sc != RTEMS_SUCCESSFUL) ffc05748: 2f 83 00 00 cmpwi cr7,r3,0 ffc0574c: 40 9e 00 50 bne- cr7,ffc0579c goto error_3; rtems_current_user_env = new_env; ffc05750: 93 fd 26 bc stw r31,9916(r29) } /* Inherit the global values */ *rtems_current_user_env = rtems_global_user_env; ffc05754: 3d 20 00 00 lis r9,0 ffc05758: 83 e9 26 bc lwz r31,9916(r9) ffc0575c: 3c 80 00 00 lis r4,0 ffc05760: 38 a0 00 48 li r5,72 ffc05764: 7f e3 fb 78 mr r3,r31 ffc05768: 38 84 2a 98 addi r4,r4,10904 ffc0576c: 48 00 ac 6d bl ffc103d8 * Clone the pathlocs. In contrast to most other code we must _not_ free the * original locs because what we are trying to do here is forking off clones. * The reason is a pathloc can be allocated by the file system and needs to * be freed when deleting the environment. */ rtems_filesystem_root = root_loc; ffc05770: 39 7f 00 18 addi r11,r31,24 ffc05774: 38 81 00 08 addi r4,r1,8 } /* Inherit the global values */ *rtems_current_user_env = rtems_global_user_env; rtems_current_user_env->task_id = task_id; ffc05778: 93 df 00 00 stw r30,0(r31) * original locs because what we are trying to do here is forking off clones. * The reason is a pathloc can be allocated by the file system and needs to * be freed when deleting the environment. */ rtems_filesystem_root = root_loc; rtems_filesystem_current = current_loc; ffc0577c: 3b ff 00 04 addi r31,r31,4 * Clone the pathlocs. In contrast to most other code we must _not_ free the * original locs because what we are trying to do here is forking off clones. * The reason is a pathloc can be allocated by the file system and needs to * be freed when deleting the environment. */ rtems_filesystem_root = root_loc; ffc05780: 7c a4 a4 aa lswi r5,r4,20 ffc05784: 7c ab a5 aa stswi r5,r11,20 rtems_filesystem_current = current_loc; ffc05788: 39 61 00 1c addi r11,r1,28 return RTEMS_SUCCESSFUL; ffc0578c: 38 00 00 00 li r0,0 * original locs because what we are trying to do here is forking off clones. * The reason is a pathloc can be allocated by the file system and needs to * be freed when deleting the environment. */ rtems_filesystem_root = root_loc; rtems_filesystem_current = current_loc; ffc05790: 7c ab a4 aa lswi r5,r11,20 ffc05794: 7c bf a5 aa stswi r5,r31,20 return RTEMS_SUCCESSFUL; ffc05798: 48 00 00 20 b ffc057b8 error_3: free(new_env); ffc0579c: 7f e3 fb 78 mr r3,r31 ffc057a0: 4b ff ec 99 bl ffc04438 error_2: rtems_filesystem_freenode(¤t_loc); ffc057a4: 38 61 00 1c addi r3,r1,28 ffc057a8: 4b ff ec 65 bl ffc0440c error_1: rtems_filesystem_freenode(&root_loc); ffc057ac: 38 61 00 08 addi r3,r1,8 ffc057b0: 4b ff ec 5d bl ffc0440c error_0: return RTEMS_NO_MEMORY; ffc057b4: 38 00 00 1a li r0,26 } ffc057b8: 39 61 00 48 addi r11,r1,72 ffc057bc: 7c 03 03 78 mr r3,r0 ffc057c0: 48 00 ee a8 b ffc14668 <_restgpr_29_x> =============================================================================== ffc057c4 : * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { ffc057c4: 94 21 ff d8 stwu r1,-40(r1) ffc057c8: 7c 08 02 a6 mflr r0 ffc057cc: bf 81 00 18 stmw r28,24(r1) ffc057d0: 7c 7c 1b 78 mr r28,r3 * If this was an attempt to share the task with self, * if somebody wanted to do it... Lets tell them, its shared */ if( task_id == current_task_id ) return RTEMS_SUCCESSFUL; ffc057d4: 3b a0 00 00 li r29,0 * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { ffc057d8: 90 01 00 2c stw r0,44(r1) rtems_id current_task_id; /* * get current task id */ current_task_id = rtems_task_self(); ffc057dc: 48 00 2c d1 bl ffc084ac /* * If this was an attempt to share the task with self, * if somebody wanted to do it... Lets tell them, its shared */ if( task_id == current_task_id ) ffc057e0: 7f 9c 18 00 cmpw cr7,r28,r3 rtems_id current_task_id; /* * get current task id */ current_task_id = rtems_task_self(); ffc057e4: 7c 7f 1b 78 mr r31,r3 /* * If this was an attempt to share the task with self, * if somebody wanted to do it... Lets tell them, its shared */ if( task_id == current_task_id ) ffc057e8: 41 9e 00 40 beq- cr7,ffc05828 <== NEVER TAKEN return RTEMS_SUCCESSFUL; /* * Try to get the requested user environment */ sc = rtems_task_variable_get( ffc057ec: 3f c0 00 00 lis r30,0 ffc057f0: 7f 83 e3 78 mr r3,r28 ffc057f4: 38 9e 26 bc addi r4,r30,9916 ffc057f8: 38 a1 00 08 addi r5,r1,8 ffc057fc: 48 00 2e 49 bl ffc08644 (void*)&shared_user_env ); /* * If it was not successful, return the error code */ if (sc != RTEMS_SUCCESSFUL) ffc05800: 7c 7d 1b 79 mr. r29,r3 ffc05804: 40 82 00 24 bne- ffc05828 * If we have a current environment in place, we need to * free it, since we will be sharing the variable with the * shared_user_env */ if (rtems_current_user_env->task_id==current_task_id) { ffc05808: 80 7e 26 bc lwz r3,9916(r30) ffc0580c: 80 03 00 00 lwz r0,0(r3) ffc05810: 7f 80 f8 00 cmpw cr7,r0,r31 ffc05814: 40 be 00 08 bne+ cr7,ffc0581c rtems_user_env_t *tmp = rtems_current_user_env; free_user_env( tmp ); ffc05818: 4b ff fe 39 bl ffc05650 } /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; ffc0581c: 80 01 00 08 lwz r0,8(r1) ffc05820: 3d 20 00 00 lis r9,0 ffc05824: 90 09 26 bc stw r0,9916(r9) #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; } ffc05828: 39 61 00 28 addi r11,r1,40 ffc0582c: 7f a3 eb 78 mr r3,r29 ffc05830: 48 00 ee 34 b ffc14664 <_restgpr_28_x> =============================================================================== ffc0c494 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { ffc0c494: 54 69 07 7c rlwinm r9,r3,0,29,30 ffc0c498: 2f 89 00 06 cmpwi cr7,r9,6 fcntl_flags |= O_RDWR; ffc0c49c: 38 00 00 02 li r0,2 uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { ffc0c4a0: 41 9e 00 14 beq- cr7,ffc0c4b4 <== NEVER TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { ffc0c4a4: 70 69 00 02 andi. r9,r3,2 fcntl_flags |= O_RDONLY; ffc0c4a8: 38 00 00 00 li r0,0 { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { ffc0c4ac: 40 82 00 08 bne- ffc0c4b4 <== ALWAYS TAKEN ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; ffc0c4b0: 54 60 f7 fe rlwinm r0,r3,30,31,31 <== NOT EXECUTED fcntl_flags |= O_RDONLY; } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { fcntl_flags |= O_WRONLY; } if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) { ffc0c4b4: 70 69 00 01 andi. r9,r3,1 ffc0c4b8: 41 82 00 08 beq- ffc0c4c0 fcntl_flags |= O_NONBLOCK; ffc0c4bc: 60 00 40 00 ori r0,r0,16384 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { ffc0c4c0: 70 69 02 00 andi. r9,r3,512 ffc0c4c4: 41 82 00 08 beq- ffc0c4cc fcntl_flags |= O_APPEND; ffc0c4c8: 60 00 00 08 ori r0,r0,8 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { ffc0c4cc: 70 69 04 00 andi. r9,r3,1024 ffc0c4d0: 41 82 00 08 beq- ffc0c4d8 fcntl_flags |= O_CREAT; ffc0c4d4: 60 00 02 00 ori r0,r0,512 } return fcntl_flags; } ffc0c4d8: 7c 03 03 78 mr r3,r0 ffc0c4dc: 4e 80 00 20 blr =============================================================================== ffc07b18 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { ffc07b18: 94 21 ff e8 stwu r1,-24(r1) uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { ffc07b1c: 3d 20 00 00 lis r9,0 * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { ffc07b20: 7c 08 02 a6 mflr r0 ffc07b24: 7c 64 1b 78 mr r4,r3 uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { ffc07b28: 80 69 27 24 lwz r3,10020(r9) ffc07b2c: 38 a1 00 08 addi r5,r1,8 * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { ffc07b30: 90 01 00 1c stw r0,28(r1) uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { ffc07b34: 48 00 63 35 bl ffc0de68 <_Protected_heap_Get_block_size> ffc07b38: 2f 83 00 00 cmpwi cr7,r3,0 ffc07b3c: 41 9e 00 2c beq- cr7,ffc07b68 <== NEVER TAKEN MSBUMP(lifetime_freed, size); ffc07b40: 3d 00 00 00 lis r8,0 ffc07b44: 81 41 00 08 lwz r10,8(r1) ffc07b48: 39 08 33 b0 addi r8,r8,13232 ffc07b4c: 81 68 00 28 lwz r11,40(r8) ffc07b50: 39 20 00 00 li r9,0 ffc07b54: 81 88 00 2c lwz r12,44(r8) ffc07b58: 7d 4a 60 14 addc r10,r10,r12 ffc07b5c: 7d 29 59 14 adde r9,r9,r11 ffc07b60: 91 28 00 28 stw r9,40(r8) ffc07b64: 91 48 00 2c stw r10,44(r8) } } ffc07b68: 80 01 00 1c lwz r0,28(r1) ffc07b6c: 38 21 00 18 addi r1,r1,24 ffc07b70: 7c 08 03 a6 mtlr r0 ffc07b74: 4e 80 00 20 blr =============================================================================== ffc07b78 : { uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) ffc07b78: 7c 64 1b 79 mr. r4,r3 } static void rtems_malloc_statistics_at_malloc( void *pointer ) { ffc07b7c: 94 21 ff e8 stwu r1,-24(r1) ffc07b80: 7c 08 02 a6 mflr r0 ffc07b84: 90 01 00 1c stw r0,28(r1) uintptr_t actual_size = 0; ffc07b88: 38 00 00 00 li r0,0 ffc07b8c: 90 01 00 08 stw r0,8(r1) uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) ffc07b90: 41 82 00 54 beq- ffc07be4 <== NEVER TAKEN return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); ffc07b94: 3d 20 00 00 lis r9,0 ffc07b98: 80 69 27 24 lwz r3,10020(r9) ffc07b9c: 38 a1 00 08 addi r5,r1,8 ffc07ba0: 48 00 62 c9 bl ffc0de68 <_Protected_heap_Get_block_size> MSBUMP(lifetime_allocated, actual_size); ffc07ba4: 3d 00 00 00 lis r8,0 ffc07ba8: 39 08 33 b0 addi r8,r8,13232 ffc07bac: 81 41 00 08 lwz r10,8(r1) ffc07bb0: 81 68 00 20 lwz r11,32(r8) ffc07bb4: 39 20 00 00 li r9,0 ffc07bb8: 81 88 00 24 lwz r12,36(r8) current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); ffc07bbc: 80 08 00 2c lwz r0,44(r8) if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); ffc07bc0: 7d 4a 60 14 addc r10,r10,r12 ffc07bc4: 7d 29 59 14 adde r9,r9,r11 ffc07bc8: 91 28 00 20 stw r9,32(r8) current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); ffc07bcc: 7c 00 50 50 subf r0,r0,r10 if (current_depth > s->max_depth) ffc07bd0: 81 28 00 18 lwz r9,24(r8) if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); ffc07bd4: 91 48 00 24 stw r10,36(r8) current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) ffc07bd8: 7f 80 48 40 cmplw cr7,r0,r9 ffc07bdc: 40 9d 00 08 ble- cr7,ffc07be4 s->max_depth = current_depth; ffc07be0: 90 08 00 18 stw r0,24(r8) } ffc07be4: 80 01 00 1c lwz r0,28(r1) ffc07be8: 38 21 00 18 addi r1,r1,24 ffc07bec: 7c 08 03 a6 mtlr r0 ffc07bf0: 4e 80 00 20 blr =============================================================================== ffc1084c : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { ffc1084c: 94 21 ff e8 stwu r1,-24(r1) ffc10850: 7c 08 02 a6 mflr r0 ffc10854: bf 81 00 08 stmw r28,8(r1) void *return_this; /* * Parameter error checks */ if ( !pointer ) ffc10858: 7c 7f 1b 79 mr. r31,r3 int rtems_memalign( void **pointer, size_t alignment, size_t size ) { ffc1085c: 7c 9e 23 78 mr r30,r4 ffc10860: 90 01 00 1c stw r0,28(r1) ffc10864: 7c bc 2b 78 mr r28,r5 /* * Parameter error checks */ if ( !pointer ) return EINVAL; ffc10868: 3b a0 00 16 li r29,22 void *return_this; /* * Parameter error checks */ if ( !pointer ) ffc1086c: 41 82 00 78 beq- ffc108e4 return EINVAL; *pointer = NULL; ffc10870: 38 00 00 00 li r0,0 /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc10874: 3d 20 00 00 lis r9,0 * Parameter error checks */ if ( !pointer ) return EINVAL; *pointer = NULL; ffc10878: 90 1f 00 00 stw r0,0(r31) /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc1087c: 80 09 27 c4 lwz r0,10180(r9) ffc10880: 2f 80 00 03 cmpwi cr7,r0,3 ffc10884: 40 be 00 10 bne+ cr7,ffc10894 <== NEVER TAKEN !malloc_is_system_state_OK() ) ffc10888: 4b ff 4a 49 bl ffc052d0 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc1088c: 2f 83 00 00 cmpwi cr7,r3,0 ffc10890: 41 9e 00 54 beq- cr7,ffc108e4 <== NEVER TAKEN return EINVAL; /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); ffc10894: 4b ff 4a 85 bl ffc05318 Heap_Control *heap, uintptr_t size, uintptr_t alignment ) { return ffc10898: 3d 20 00 00 lis r9,0 ffc1089c: 80 69 26 c4 lwz r3,9924(r9) ffc108a0: 7f c5 f3 78 mr r5,r30 ffc108a4: 7f 84 e3 78 mr r4,r28 ffc108a8: 38 c0 00 00 li r6,0 ffc108ac: 4b ff 9f 75 bl ffc0a820 <_Protected_heap_Allocate_aligned_with_boundary> RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) return ENOMEM; ffc108b0: 3b a0 00 0c li r29,12 return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) ffc108b4: 7c 7e 1b 79 mr. r30,r3 ffc108b8: 41 82 00 2c beq- ffc108e4 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) ffc108bc: 3d 20 00 00 lis r9,0 ffc108c0: 81 29 27 28 lwz r9,10024(r9) ffc108c4: 2f 89 00 00 cmpwi cr7,r9,0 ffc108c8: 41 9e 00 14 beq- cr7,ffc108dc (*rtems_malloc_statistics_helpers->at_malloc)(pointer); ffc108cc: 80 09 00 04 lwz r0,4(r9) ffc108d0: 7f e3 fb 78 mr r3,r31 ffc108d4: 7c 09 03 a6 mtctr r0 ffc108d8: 4e 80 04 21 bctrl *pointer = return_this; ffc108dc: 93 df 00 00 stw r30,0(r31) return 0; ffc108e0: 3b a0 00 00 li r29,0 } ffc108e4: 39 61 00 18 addi r11,r1,24 ffc108e8: 7f a3 eb 78 mr r3,r29 ffc108ec: 48 00 79 d0 b ffc182bc <_restgpr_28_x> =============================================================================== ffc0ef34 : return (retval); } int rtems_mkdir(const char *path, mode_t mode) { ffc0ef34: 94 21 ff 88 stwu r1,-120(r1) ffc0ef38: 7c 08 02 a6 mflr r0 ffc0ef3c: bf 01 00 58 stmw r24,88(r1) ffc0ef40: 7c 98 23 78 mr r24,r4 ffc0ef44: 90 01 00 7c stw r0,124(r1) int success = 0; char *dup_path = strdup(path); ffc0ef48: 48 00 2e 19 bl ffc11d60 if (dup_path != NULL) { ffc0ef4c: 7c 7e 1b 79 mr. r30,r3 success = build(dup_path, mode); free(dup_path); } return success != 0 ? 0 : -1; ffc0ef50: 38 00 ff ff li r0,-1 rtems_mkdir(const char *path, mode_t mode) { int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { ffc0ef54: 41 82 01 64 beq- ffc0f0b8 <== NEVER TAKEN char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ffc0ef58: 88 1e 00 00 lbz r0,0(r30) (void)umask(oumask); return (retval); } int rtems_mkdir(const char *path, mode_t mode) ffc0ef5c: 3b 80 00 00 li r28,0 for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') last = 1; else if (p[0] != '/') continue; *p = '\0'; ffc0ef60: 3b 20 00 00 li r25,0 p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; ffc0ef64: 68 1d 00 2f xori r29,r0,47 ffc0ef68: 23 bd 00 00 subfic r29,r29,0 ffc0ef6c: 7f be 01 94 addze r29,r30 (void)umask(oumask); return (retval); } int rtems_mkdir(const char *path, mode_t mode) ffc0ef70: 3b bd ff ff addi r29,r29,-1 ffc0ef74: 38 00 00 01 li r0,1 retval = 0; break; } } if (!last) *p = '/'; ffc0ef78: 3b 40 00 2f li r26,47 } if (last) (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { if (errno == EEXIST || errno == EISDIR) { if (stat(path, &sb) < 0) { ffc0ef7c: 3b 61 00 08 addi r27,r1,8 oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') ffc0ef80: 8d 7d 00 01 lbzu r11,1(r29) last = 1; ffc0ef84: 39 20 00 01 li r9,1 oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') ffc0ef88: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0ef8c: 41 9e 00 10 beq- cr7,ffc0ef9c last = 1; else if (p[0] != '/') ffc0ef90: 2f 8b 00 2f cmpwi cr7,r11,47 ffc0ef94: 40 9e ff ec bne+ cr7,ffc0ef80 ffc0ef98: 39 20 00 00 li r9,0 continue; *p = '\0'; if (!last && p[1] == '\0') ffc0ef9c: 2f 89 00 00 cmpwi cr7,r9,0 for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') last = 1; else if (p[0] != '/') continue; *p = '\0'; ffc0efa0: 9b 3d 00 00 stb r25,0(r29) if (!last && p[1] == '\0') ffc0efa4: 3b e0 00 01 li r31,1 ffc0efa8: 40 9e 00 10 bne- cr7,ffc0efb8 ffc0efac: 8b fd 00 01 lbz r31,1(r29) ffc0efb0: 7f ff 00 34 cntlzw r31,r31 ffc0efb4: 57 ff d9 7e rlwinm r31,r31,27,5,31 last = 1; if (first) { ffc0efb8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0efbc: 41 be 00 18 beq+ cr7,ffc0efd4 * mkdir [-m mode] dir * * We change the user's umask and then restore it, * instead of doing chmod's. */ oumask = umask(0); ffc0efc0: 38 60 00 00 li r3,0 ffc0efc4: 48 00 01 b9 bl ffc0f17c ffc0efc8: 7c 7c 1b 78 mr r28,r3 numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); ffc0efcc: 54 63 06 ae rlwinm r3,r3,0,26,23 ffc0efd0: 48 00 01 ad bl ffc0f17c first = 0; } if (last) ffc0efd4: 2f 9f 00 00 cmpwi cr7,r31,0 (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { ffc0efd8: 38 80 01 ff li r4,511 oumask = umask(0); numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) ffc0efdc: 41 be 00 10 beq+ cr7,ffc0efec (void)umask(oumask); ffc0efe0: 7f 83 e3 78 mr r3,r28 ffc0efe4: 48 00 01 99 bl ffc0f17c if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { ffc0efe8: 7f 04 c3 78 mr r4,r24 ffc0efec: 7f c3 f3 78 mr r3,r30 ffc0eff0: 4b ff 6b b1 bl ffc05ba0 ffc0eff4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0eff8: 40 bc 00 80 bge+ cr7,ffc0f078 if (errno == EEXIST || errno == EISDIR) { ffc0effc: 48 00 1a d5 bl ffc10ad0 <__errno> ffc0f000: 80 03 00 00 lwz r0,0(r3) ffc0f004: 2f 80 00 11 cmpwi cr7,r0,17 ffc0f008: 41 9e 00 14 beq- cr7,ffc0f01c ffc0f00c: 48 00 1a c5 bl ffc10ad0 <__errno> ffc0f010: 80 03 00 00 lwz r0,0(r3) ffc0f014: 2f 80 00 15 cmpwi cr7,r0,21 ffc0f018: 40 9e 00 74 bne- cr7,ffc0f08c <== ALWAYS TAKEN if (stat(path, &sb) < 0) { ffc0f01c: 7f c3 f3 78 mr r3,r30 ffc0f020: 7f 64 db 78 mr r4,r27 ffc0f024: 48 00 00 b1 bl ffc0f0d4 ffc0f028: 2f 83 00 00 cmpwi cr7,r3,0 ffc0f02c: 41 9c 00 60 blt- cr7,ffc0f08c <== NEVER TAKEN retval = 0; break; } else if (!S_ISDIR(sb.st_mode)) { ffc0f030: 80 01 00 14 lwz r0,20(r1) ffc0f034: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0f038: 54 00 04 26 rlwinm r0,r0,0,16,19 ffc0f03c: 2f 00 40 00 cmpwi cr6,r0,16384 ffc0f040: 41 ba 00 30 beq+ cr6,ffc0f070 if (last) ffc0f044: 41 9e 00 18 beq- cr7,ffc0f05c errno = EEXIST; ffc0f048: 48 00 1a 89 bl ffc10ad0 <__errno> ffc0f04c: 38 00 00 11 li r0,17 ffc0f050: 90 03 00 00 stw r0,0(r3) else errno = ENOTDIR; retval = 0; ffc0f054: 3b a0 00 00 li r29,0 ffc0f058: 48 00 00 48 b ffc0f0a0 break; } else if (!S_ISDIR(sb.st_mode)) { if (last) errno = EEXIST; else errno = ENOTDIR; ffc0f05c: 48 00 1a 75 bl ffc10ad0 <__errno> ffc0f060: 38 00 00 14 li r0,20 ffc0f064: 90 03 00 00 stw r0,0(r3) retval = 0; ffc0f068: 3b a0 00 00 li r29,0 ffc0f06c: 48 00 00 2c b ffc0f098 break; } if (last) ffc0f070: 40 9e 00 54 bne- cr7,ffc0f0c4 ffc0f074: 48 00 00 0c b ffc0f080 } else { retval = 0; break; } } if (!last) ffc0f078: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0f07c: 40 9e 00 50 bne- cr7,ffc0f0cc *p = '/'; ffc0f080: 9b 5d 00 00 stb r26,0(r29) ffc0f084: 38 00 00 00 li r0,0 ffc0f088: 4b ff fe f8 b ffc0ef80 } if (!first && !last) ffc0f08c: 2f 9f 00 00 cmpwi cr7,r31,0 if (last) (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { if (errno == EEXIST || errno == EISDIR) { if (stat(path, &sb) < 0) { retval = 0; ffc0f090: 3b a0 00 00 li r29,0 } } if (!last) *p = '/'; } if (!first && !last) ffc0f094: 40 be 00 0c bne+ cr7,ffc0f0a0 <== ALWAYS TAKEN (void)umask(oumask); ffc0f098: 7f 83 e3 78 mr r3,r28 ffc0f09c: 48 00 00 e1 bl ffc0f17c int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); ffc0f0a0: 7f c3 f3 78 mr r3,r30 ffc0f0a4: 4b ff 63 59 bl ffc053fc } return success != 0 ? 0 : -1; ffc0f0a8: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0f0ac: 38 00 00 00 li r0,0 ffc0f0b0: 40 be 00 08 bne+ cr7,ffc0f0b8 ffc0f0b4: 38 00 ff ff li r0,-1 } ffc0f0b8: 39 61 00 78 addi r11,r1,120 ffc0f0bc: 7c 03 03 78 mr r3,r0 ffc0f0c0: 48 00 d5 30 b ffc1c5f0 <_restgpr_24_x> errno = ENOTDIR; retval = 0; break; } if (last) retval = 2; ffc0f0c4: 3b a0 00 02 li r29,2 ffc0f0c8: 4b ff ff d8 b ffc0f0a0 } else { retval = 0; break; } } if (!last) ffc0f0cc: 3b a0 00 01 li r29,1 ffc0f0d0: 4b ff ff d0 b ffc0f0a0 =============================================================================== ffc09324 : void rtems_panic( const char *printf_format, ... ) { ffc09324: 94 21 ff 88 stwu r1,-120(r1) ffc09328: 7c 08 02 a6 mflr r0 ffc0932c: 90 81 00 1c stw r4,28(r1) ffc09330: 90 01 00 7c stw r0,124(r1) ffc09334: 90 a1 00 20 stw r5,32(r1) ffc09338: 90 c1 00 24 stw r6,36(r1) ffc0933c: 90 e1 00 28 stw r7,40(r1) ffc09340: 91 01 00 2c stw r8,44(r1) ffc09344: 91 21 00 30 stw r9,48(r1) ffc09348: 91 41 00 34 stw r10,52(r1) ffc0934c: 40 86 00 24 bne- cr1,ffc09370 <== ALWAYS TAKEN ffc09350: d8 21 00 38 stfd f1,56(r1) <== NOT EXECUTED ffc09354: d8 41 00 40 stfd f2,64(r1) <== NOT EXECUTED ffc09358: d8 61 00 48 stfd f3,72(r1) <== NOT EXECUTED ffc0935c: d8 81 00 50 stfd f4,80(r1) <== NOT EXECUTED ffc09360: d8 a1 00 58 stfd f5,88(r1) <== NOT EXECUTED ffc09364: d8 c1 00 60 stfd f6,96(r1) <== NOT EXECUTED ffc09368: d8 e1 00 68 stfd f7,104(r1) <== NOT EXECUTED ffc0936c: d9 01 00 70 stfd f8,112(r1) <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); ffc09370: 38 00 00 01 li r0,1 ffc09374: 98 01 00 08 stb r0,8(r1) ffc09378: 38 00 00 00 li r0,0 void rtems_panic( const char *printf_format, ... ) { ffc0937c: 7c 64 1b 78 mr r4,r3 va_list arglist; va_start(arglist, printf_format); ffc09380: 98 01 00 09 stb r0,9(r1) ffc09384: 38 01 00 80 addi r0,r1,128 (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); ffc09388: 38 a1 00 08 addi r5,r1,8 ... ) { va_list arglist; va_start(arglist, printf_format); ffc0938c: 90 01 00 0c stw r0,12(r1) (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); ffc09390: 3c 60 20 00 lis r3,8192 ... ) { va_list arglist; va_start(arglist, printf_format); ffc09394: 38 01 00 18 addi r0,r1,24 ffc09398: 90 01 00 10 stw r0,16(r1) (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); ffc0939c: 4b ff fd 3d bl ffc090d8 va_end(arglist); rtems_error(0, "fatal error, exiting"); ffc093a0: 3c 80 ff c2 lis r4,-62 ffc093a4: 38 84 60 1f addi r4,r4,24607 ffc093a8: 38 60 00 00 li r3,0 ffc093ac: 4c c6 31 82 crclr 4*cr1+eq ffc093b0: 4b ff fe a5 bl ffc09254 _exit(errno); ffc093b4: 48 00 bc 79 bl ffc1502c <__errno> ffc093b8: 80 63 00 00 lwz r3,0(r3) ffc093bc: 48 00 0b 2d bl ffc09ee8 <_exit> =============================================================================== ffc164d8 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { ffc164d8: 94 21 ff d0 stwu r1,-48(r1) ffc164dc: 7c 08 02 a6 mflr r0 ffc164e0: bf 21 00 14 stmw r25,20(r1) register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) ffc164e4: 7c 7b 1b 79 mr. r27,r3 uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { ffc164e8: 7c bf 2b 78 mr r31,r5 ffc164ec: 90 01 00 34 stw r0,52(r1) ffc164f0: 7c fa 3b 78 mr r26,r7 ffc164f4: 7d 1d 43 78 mr r29,r8 register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; ffc164f8: 38 00 00 03 li r0,3 rtems_id *id ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) ffc164fc: 41 82 00 cc beq- ffc165c8 return RTEMS_INVALID_NAME; if ( !starting_address ) ffc16500: 2f 84 00 00 cmpwi cr7,r4,0 return RTEMS_INVALID_ADDRESS; ffc16504: 38 00 00 09 li r0,9 register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !starting_address ) ffc16508: 41 9e 00 c0 beq- cr7,ffc165c8 return RTEMS_INVALID_ADDRESS; if ( !id ) ffc1650c: 2f 88 00 00 cmpwi cr7,r8,0 ffc16510: 41 9e 00 b8 beq- cr7,ffc165c8 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || ffc16514: 2f 85 00 00 cmpwi cr7,r5,0 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; ffc16518: 38 00 00 08 li r0,8 return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || ffc1651c: 41 9e 00 ac beq- cr7,ffc165c8 ffc16520: 2f 86 00 00 cmpwi cr7,r6,0 ffc16524: 41 9e 00 a4 beq- cr7,ffc165c8 ffc16528: 7f 85 30 40 cmplw cr7,r5,r6 ffc1652c: 41 9c 00 9c blt- cr7,ffc165c8 ffc16530: 70 c9 00 07 andi. r9,r6,7 ffc16534: 40 82 00 94 bne- ffc165c8 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) ffc16538: 70 99 00 07 andi. r25,r4,7 return RTEMS_INVALID_ADDRESS; ffc1653c: 38 00 00 09 li r0,9 if ( length == 0 || buffer_size == 0 || length < buffer_size || !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) ffc16540: 40 a2 00 88 bne+ ffc165c8 ffc16544: 3d 20 00 00 lis r9,0 ffc16548: 81 69 28 5c lwz r11,10332(r9) ffc1654c: 38 0b 00 01 addi r0,r11,1 ffc16550: 90 09 28 5c stw r0,10332(r9) * This function allocates a partition control block from * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); ffc16554: 3f 80 00 00 lis r28,0 ffc16558: 90 81 00 08 stw r4,8(r1) ffc1655c: 3b 9c 6e 80 addi r28,r28,28288 ffc16560: 7f 83 e3 78 mr r3,r28 ffc16564: 90 c1 00 0c stw r6,12(r1) ffc16568: 48 00 4d 8d bl ffc1b2f4 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { ffc1656c: 7c 7e 1b 79 mr. r30,r3 ffc16570: 80 81 00 08 lwz r4,8(r1) ffc16574: 80 c1 00 0c lwz r6,12(r1) ffc16578: 40 a2 00 10 bne+ ffc16588 _Thread_Enable_dispatch(); ffc1657c: 48 00 5f 91 bl ffc1c50c <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; ffc16580: 38 00 00 05 li r0,5 ffc16584: 48 00 00 44 b ffc165c8 the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, ffc16588: 7c bf 33 96 divwu r5,r31,r6 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; ffc1658c: 90 9e 00 10 stw r4,16(r30) the_partition->length = length; the_partition->buffer_size = buffer_size; ffc16590: 90 de 00 18 stw r6,24(r30) return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; ffc16594: 93 fe 00 14 stw r31,20(r30) the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; ffc16598: 93 5e 00 1c stw r26,28(r30) the_partition->number_of_used_blocks = 0; ffc1659c: 93 3e 00 20 stw r25,32(r30) _Chain_Initialize( &the_partition->Memory, starting_address, ffc165a0: 38 7e 00 24 addi r3,r30,36 ffc165a4: 48 00 35 21 bl ffc19ac4 <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), ffc165a8: 80 1e 00 08 lwz r0,8(r30) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc165ac: 81 7c 00 1c lwz r11,28(r28) ffc165b0: 54 09 13 ba rlwinm r9,r0,2,14,29 ffc165b4: 7f cb 49 2e stwx r30,r11,r9 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc165b8: 93 7e 00 0c stw r27,12(r30) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; ffc165bc: 90 1d 00 00 stw r0,0(r29) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); ffc165c0: 48 00 5f 4d bl ffc1c50c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc165c4: 38 00 00 00 li r0,0 } ffc165c8: 39 61 00 30 addi r11,r1,48 ffc165cc: 7c 03 03 78 mr r3,r0 ffc165d0: 4b ff 7c d4 b ffc0e2a4 <_restgpr_25_x> =============================================================================== ffc16720 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { ffc16720: 94 21 ff e0 stwu r1,-32(r1) ffc16724: 7c 08 02 a6 mflr r0 ffc16728: 90 01 00 24 stw r0,36(r1) ffc1672c: 7c 60 1b 78 mr r0,r3 Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); ffc16730: 3c 60 00 00 lis r3,0 ffc16734: bf c1 00 18 stmw r30,24(r1) ffc16738: 38 63 6e 80 addi r3,r3,28288 ffc1673c: 7c 9f 23 78 mr r31,r4 ffc16740: 38 a1 00 08 addi r5,r1,8 ffc16744: 7c 04 03 78 mr r4,r0 ffc16748: 48 00 51 09 bl ffc1b850 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { ffc1674c: 80 01 00 08 lwz r0,8(r1) ffc16750: 7c 7e 1b 78 mr r30,r3 ffc16754: 2f 80 00 00 cmpwi cr7,r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc16758: 38 60 00 04 li r3,4 { register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { ffc1675c: 40 9e 00 58 bne- cr7,ffc167b4 ) { void *starting; void *ending; starting = the_partition->starting_address; ffc16760: 80 1e 00 10 lwz r0,16(r30) ending = _Addresses_Add_offset( starting, the_partition->length ); ffc16764: 81 3e 00 14 lwz r9,20(r30) const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); ffc16768: 7f 9f 00 40 cmplw cr7,r31,r0 ffc1676c: 41 9c 00 50 blt- cr7,ffc167bc RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); ffc16770: 7d 20 4a 14 add r9,r0,r9 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); ffc16774: 7f 9f 48 40 cmplw cr7,r31,r9 ffc16778: 41 9d 00 44 bgt- cr7,ffc167bc <== NEVER TAKEN offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); ffc1677c: 81 3e 00 18 lwz r9,24(r30) RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); ffc16780: 7c 00 f8 50 subf r0,r0,r31 ffc16784: 7d 60 4b 96 divwu r11,r0,r9 ffc16788: 7d 2b 49 d6 mullw r9,r11,r9 starting = the_partition->starting_address; ending = _Addresses_Add_offset( starting, the_partition->length ); return ( _Addresses_Is_in_range( the_buffer, starting, ending ) && ffc1678c: 7f 80 48 00 cmpw cr7,r0,r9 ffc16790: 40 9e 00 2c bne- cr7,ffc167bc RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); ffc16794: 38 7e 00 24 addi r3,r30,36 ffc16798: 7f e4 fb 78 mr r4,r31 ffc1679c: 48 00 32 91 bl ffc19a2c <_Chain_Append> case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; ffc167a0: 81 3e 00 20 lwz r9,32(r30) ffc167a4: 38 09 ff ff addi r0,r9,-1 ffc167a8: 90 1e 00 20 stw r0,32(r30) _Thread_Enable_dispatch(); ffc167ac: 48 00 5d 61 bl ffc1c50c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc167b0: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc167b4: 39 61 00 20 addi r11,r1,32 ffc167b8: 4b ff 7b 00 b ffc0e2b8 <_restgpr_30_x> _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc167bc: 48 00 5d 51 bl ffc1c50c <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; ffc167c0: 38 60 00 09 li r3,9 ffc167c4: 4b ff ff f0 b ffc167b4 =============================================================================== ffc08c24 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { ffc08c24: 94 21 ff d8 stwu r1,-40(r1) ffc08c28: 7c 08 02 a6 mflr r0 ffc08c2c: bf 81 00 18 stmw r28,24(r1) ffc08c30: 7c 7e 1b 78 mr r30,r3 Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); ffc08c34: 3c 60 00 00 lis r3,0 ffc08c38: 7c 9f 23 78 mr r31,r4 ffc08c3c: 90 01 00 2c stw r0,44(r1) ffc08c40: 38 63 2b e0 addi r3,r3,11232 ffc08c44: 7f c4 f3 78 mr r4,r30 ffc08c48: 38 a1 00 08 addi r5,r1,8 ffc08c4c: 48 00 25 9d bl ffc0b1e8 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { ffc08c50: 80 01 00 08 lwz r0,8(r1) ffc08c54: 7c 7d 1b 78 mr r29,r3 ffc08c58: 2f 80 00 00 cmpwi cr7,r0,0 ffc08c5c: 40 9e 01 70 bne- cr7,ffc08dcc case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { ffc08c60: 3d 60 00 00 lis r11,0 ffc08c64: 81 23 00 40 lwz r9,64(r3) ffc08c68: 80 0b 2e a4 lwz r0,11940(r11) ffc08c6c: 7f 89 00 00 cmpw cr7,r9,r0 ffc08c70: 41 9e 00 10 beq- cr7,ffc08c80 _Thread_Enable_dispatch(); ffc08c74: 48 00 32 31 bl ffc0bea4 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; ffc08c78: 3b c0 00 17 li r30,23 ffc08c7c: 48 00 01 54 b ffc08dd0 } if ( length == RTEMS_PERIOD_STATUS ) { ffc08c80: 2f 9f 00 00 cmpwi cr7,r31,0 ffc08c84: 40 9e 00 2c bne- cr7,ffc08cb0 switch ( the_period->state ) { ffc08c88: 80 03 00 38 lwz r0,56(r3) ffc08c8c: 3b c0 00 00 li r30,0 ffc08c90: 2b 80 00 04 cmplwi cr7,r0,4 ffc08c94: 41 9d 00 14 bgt- cr7,ffc08ca8 <== NEVER TAKEN ffc08c98: 3d 20 ff c2 lis r9,-62 ffc08c9c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc08ca0: 39 29 de 64 addi r9,r9,-8604 ffc08ca4: 7f c9 00 2e lwzx r30,r9,r0 case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); ffc08ca8: 48 00 31 fd bl ffc0bea4 <_Thread_Enable_dispatch> return( return_value ); ffc08cac: 48 00 01 24 b ffc08dd0 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc08cb0: 7f 80 00 a6 mfmsr r28 ffc08cb4: 7c 10 42 a6 mfsprg r0,0 ffc08cb8: 7f 80 00 78 andc r0,r28,r0 ffc08cbc: 7c 00 01 24 mtmsr r0 } _ISR_Disable( level ); if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { ffc08cc0: 80 03 00 38 lwz r0,56(r3) ffc08cc4: 2f 80 00 00 cmpwi cr7,r0,0 ffc08cc8: 40 be 00 4c bne+ cr7,ffc08d14 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc08ccc: 7f 80 01 24 mtmsr r28 _ISR_Enable( level ); /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); ffc08cd0: 4b ff fd cd bl ffc08a9c <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; ffc08cd4: 38 00 00 02 li r0,2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc08cd8: 3d 20 ff c1 lis r9,-63 ffc08cdc: 90 1d 00 38 stw r0,56(r29) ffc08ce0: 39 29 90 d8 addi r9,r9,-28456 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc08ce4: 38 00 00 00 li r0,0 the_watchdog->routine = routine; ffc08ce8: 91 3d 00 2c stw r9,44(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc08cec: 3c 60 00 00 lis r3,0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc08cf0: 90 1d 00 18 stw r0,24(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc08cf4: 38 63 2d c8 addi r3,r3,11720 ffc08cf8: 38 9d 00 10 addi r4,r29,16 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc08cfc: 93 dd 00 30 stw r30,48(r29) the_watchdog->user_data = user_data; ffc08d00: 90 1d 00 34 stw r0,52(r29) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; ffc08d04: 93 fd 00 3c stw r31,60(r29) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc08d08: 93 fd 00 1c stw r31,28(r29) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc08d0c: 48 00 43 41 bl ffc0d04c <_Watchdog_Insert> ffc08d10: 48 00 00 70 b ffc08d80 _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { ffc08d14: 2f 80 00 02 cmpwi cr7,r0,2 ffc08d18: 40 be 00 74 bne+ cr7,ffc08d8c /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); ffc08d1c: 4b ff fe 01 bl ffc08b1c <_Rate_monotonic_Update_statistics> /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; ffc08d20: 38 00 00 01 li r0,1 ffc08d24: 90 1d 00 38 stw r0,56(r29) the_period->next_length = length; ffc08d28: 93 fd 00 3c stw r31,60(r29) ffc08d2c: 7f 80 01 24 mtmsr r28 _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; ffc08d30: 3d 20 00 00 lis r9,0 ffc08d34: 80 1d 00 08 lwz r0,8(r29) ffc08d38: 80 69 2e a4 lwz r3,11940(r9) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc08d3c: 38 80 40 00 li r4,16384 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; ffc08d40: 90 03 00 20 stw r0,32(r3) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc08d44: 48 00 3a c1 bl ffc0c804 <_Thread_Set_state> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc08d48: 7d 20 00 a6 mfmsr r9 ffc08d4c: 7c 10 42 a6 mfsprg r0,0 ffc08d50: 7d 20 00 78 andc r0,r9,r0 ffc08d54: 7c 00 01 24 mtmsr r0 * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; ffc08d58: 39 60 00 02 li r11,2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; ffc08d5c: 80 1d 00 38 lwz r0,56(r29) the_period->state = RATE_MONOTONIC_ACTIVE; ffc08d60: 91 7d 00 38 stw r11,56(r29) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc08d64: 7d 20 01 24 mtmsr r9 /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) ffc08d68: 2f 80 00 03 cmpwi cr7,r0,3 ffc08d6c: 40 be 00 14 bne+ cr7,ffc08d80 <== ALWAYS TAKEN _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc08d70: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc08d74: 80 69 2e a4 lwz r3,11940(r9) <== NOT EXECUTED ffc08d78: 38 80 40 00 li r4,16384 <== NOT EXECUTED ffc08d7c: 48 00 2d 4d bl ffc0bac8 <_Thread_Clear_state> <== NOT EXECUTED _Thread_Enable_dispatch(); ffc08d80: 48 00 31 25 bl ffc0bea4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc08d84: 3b c0 00 00 li r30,0 ffc08d88: 48 00 00 48 b ffc08dd0 } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { ffc08d8c: 2f 80 00 04 cmpwi cr7,r0,4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc08d90: 3b c0 00 04 li r30,4 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { ffc08d94: 40 be 00 3c bne+ cr7,ffc08dd0 <== NEVER TAKEN /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); ffc08d98: 4b ff fd 85 bl ffc08b1c <_Rate_monotonic_Update_statistics> ffc08d9c: 7f 80 01 24 mtmsr r28 _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; ffc08da0: 38 00 00 02 li r0,2 the_period->next_length = length; ffc08da4: 93 fd 00 3c stw r31,60(r29) ffc08da8: 3c 60 00 00 lis r3,0 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; ffc08dac: 90 1d 00 38 stw r0,56(r29) ffc08db0: 38 63 2d c8 addi r3,r3,11720 ffc08db4: 38 9d 00 10 addi r4,r29,16 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc08db8: 93 fd 00 1c stw r31,28(r29) the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; ffc08dbc: 3b c0 00 06 li r30,6 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc08dc0: 48 00 42 8d bl ffc0d04c <_Watchdog_Insert> the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc08dc4: 48 00 30 e1 bl ffc0bea4 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; ffc08dc8: 48 00 00 08 b ffc08dd0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc08dcc: 3b c0 00 04 li r30,4 } ffc08dd0: 39 61 00 28 addi r11,r1,40 ffc08dd4: 7f c3 f3 78 mr r3,r30 ffc08dd8: 4b ff 83 e8 b ffc011c0 <_restgpr_28_x> =============================================================================== ffc08ddc : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc08ddc: 94 21 ff 58 stwu r1,-168(r1) ffc08de0: 7c 08 02 a6 mflr r0 ffc08de4: 90 01 00 ac stw r0,172(r1) rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) ffc08de8: 7c 80 23 79 mr. r0,r4 */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc08dec: be 41 00 70 stmw r18,112(r1) ffc08df0: 7c 7f 1b 78 mr r31,r3 rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) ffc08df4: 90 01 00 68 stw r0,104(r1) ffc08df8: 41 82 01 fc beq- ffc08ff4 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); ffc08dfc: 3c 80 ff c2 lis r4,-62 ffc08e00: 7c 09 03 a6 mtctr r0 ffc08e04: 38 84 de 78 addi r4,r4,-8584 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; ffc08e08: 3e 60 00 00 lis r19,0 rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc08e0c: 3e c0 ff c2 lis r22,-62 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, ffc08e10: 3f 00 ff c2 lis r24,-62 char name[5]; if ( !print ) return; (*print)( context, "Period information by period\n" ); ffc08e14: 4c c6 31 82 crclr 4*cr1+eq ffc08e18: 4e 80 04 21 bctrl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); ffc08e1c: 80 01 00 68 lwz r0,104(r1) ffc08e20: 3c 80 ff c2 lis r4,-62 ffc08e24: 7c 09 03 a6 mtctr r0 ffc08e28: 38 84 de 96 addi r4,r4,-8554 ffc08e2c: 7f e3 fb 78 mr r3,r31 struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, ffc08e30: 3f 40 ff c2 lis r26,-62 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc08e34: 3e 40 ff c2 lis r18,-62 * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); ffc08e38: 3a 81 00 30 addi r20,r1,48 if ( !print ) return; (*print)( context, "Period information by period\n" ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); ffc08e3c: 4c c6 31 82 crclr 4*cr1+eq ffc08e40: 4e 80 04 21 bctrl (*print)( context, "--- Wall times are in seconds ---\n" ); ffc08e44: 80 01 00 68 lwz r0,104(r1) ffc08e48: 3c 80 ff c2 lis r4,-62 ffc08e4c: 7c 09 03 a6 mtctr r0 ffc08e50: 38 84 de b8 addi r4,r4,-8520 ffc08e54: 7f e3 fb 78 mr r3,r31 #if defined(RTEMS_DEBUG) status = rtems_rate_monotonic_get_status( id, &the_status ); if ( status != RTEMS_SUCCESSFUL ) continue; #else (void) rtems_rate_monotonic_get_status( id, &the_status ); ffc08e58: 3a a1 00 18 addi r21,r1,24 #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); ffc08e5c: 3b 61 00 08 addi r27,r1,8 /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc08e60: 3a d6 df 72 addi r22,r22,-8334 return; (*print)( context, "Period information by period\n" ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); (*print)( context, "--- Wall times are in seconds ---\n" ); ffc08e64: 4c c6 31 82 crclr 4*cr1+eq ffc08e68: 4e 80 04 21 bctrl Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " ffc08e6c: 80 01 00 68 lwz r0,104(r1) ffc08e70: 3c 80 ff c2 lis r4,-62 ffc08e74: 7c 09 03 a6 mtctr r0 ffc08e78: 38 84 de db addi r4,r4,-8485 ffc08e7c: 7f e3 fb 78 mr r3,r31 { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; ffc08e80: 3a e1 00 48 addi r23,r1,72 _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); ffc08e84: 3b 81 00 10 addi r28,r1,16 (*print)( context, ffc08e88: 3b 18 df 89 addi r24,r24,-8311 Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " ffc08e8c: 4c c6 31 82 crclr 4*cr1+eq ffc08e90: 4e 80 04 21 bctrl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " ffc08e94: 80 01 00 68 lwz r0,104(r1) ffc08e98: 3c 80 ff c2 lis r4,-62 ffc08e9c: 7f e3 fb 78 mr r3,r31 ffc08ea0: 7c 09 03 a6 mtctr r0 ffc08ea4: 38 84 df 26 addi r4,r4,-8410 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, ffc08ea8: 3b c0 03 e8 li r30,1000 { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; ffc08eac: 3b 21 00 60 addi r25,r1,96 _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, ffc08eb0: 3b 5a df a8 addi r26,r26,-8280 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " ffc08eb4: 4c c6 31 82 crclr 4*cr1+eq ffc08eb8: 4e 80 04 21 bctrl /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; ffc08ebc: 39 33 2b e0 addi r9,r19,11232 ffc08ec0: 83 a9 00 08 lwz r29,8(r9) /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc08ec4: 3a 52 de 16 addi r18,r18,-8682 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; ffc08ec8: 48 00 01 1c b ffc08fe4 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); ffc08ecc: 7f a3 eb 78 mr r3,r29 ffc08ed0: 7e 84 a3 78 mr r4,r20 ffc08ed4: 48 00 5e 11 bl ffc0ece4 if ( status != RTEMS_SUCCESSFUL ) ffc08ed8: 2f 83 00 00 cmpwi cr7,r3,0 ffc08edc: 40 be 01 04 bne+ cr7,ffc08fe0 #if defined(RTEMS_DEBUG) status = rtems_rate_monotonic_get_status( id, &the_status ); if ( status != RTEMS_SUCCESSFUL ) continue; #else (void) rtems_rate_monotonic_get_status( id, &the_status ); ffc08ee0: 7e a4 ab 78 mr r4,r21 ffc08ee4: 7f a3 eb 78 mr r3,r29 ffc08ee8: 48 00 5e c9 bl ffc0edb0 #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); ffc08eec: 80 61 00 18 lwz r3,24(r1) ffc08ef0: 38 80 00 05 li r4,5 ffc08ef4: 7f 65 db 78 mr r5,r27 ffc08ef8: 48 00 02 a1 bl ffc09198 /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc08efc: 80 01 00 68 lwz r0,104(r1) ffc08f00: 7e c4 b3 78 mr r4,r22 ffc08f04: 80 e1 00 30 lwz r7,48(r1) ffc08f08: 7f e3 fb 78 mr r3,r31 ffc08f0c: 81 01 00 34 lwz r8,52(r1) ffc08f10: 7f a5 eb 78 mr r5,r29 ffc08f14: 7c 09 03 a6 mtctr r0 ffc08f18: 7f 66 db 78 mr r6,r27 ffc08f1c: 4c c6 31 82 crclr 4*cr1+eq ffc08f20: 4e 80 04 21 bctrl ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc08f24: 80 81 00 30 lwz r4,48(r1) ffc08f28: 2f 84 00 00 cmpwi cr7,r4,0 ffc08f2c: 40 9e 00 20 bne- cr7,ffc08f4c (*print)( context, "\n" ); ffc08f30: 80 01 00 68 lwz r0,104(r1) ffc08f34: 7f e3 fb 78 mr r3,r31 ffc08f38: 7e 44 93 78 mr r4,r18 ffc08f3c: 7c 09 03 a6 mtctr r0 ffc08f40: 4c c6 31 82 crclr 4*cr1+eq ffc08f44: 4e 80 04 21 bctrl continue; ffc08f48: 48 00 00 98 b ffc08fe0 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); ffc08f4c: 7e e3 bb 78 mr r3,r23 ffc08f50: 7f 85 e3 78 mr r5,r28 ffc08f54: 48 00 3c 71 bl ffc0cbc4 <_Timespec_Divide_by_integer> (*print)( context, ffc08f58: 80 01 00 68 lwz r0,104(r1) ffc08f5c: 80 c1 00 3c lwz r6,60(r1) ffc08f60: 7f 04 c3 78 mr r4,r24 ffc08f64: 81 01 00 44 lwz r8,68(r1) ffc08f68: 7c 09 03 a6 mtctr r0 ffc08f6c: 81 41 00 14 lwz r10,20(r1) ffc08f70: 7c c6 f3 d6 divw r6,r6,r30 ffc08f74: 80 e1 00 40 lwz r7,64(r1) ffc08f78: 81 21 00 10 lwz r9,16(r1) ffc08f7c: 80 a1 00 38 lwz r5,56(r1) ffc08f80: 7d 08 f3 d6 divw r8,r8,r30 ffc08f84: 7d 4a f3 d6 divw r10,r10,r30 ffc08f88: 7f e3 fb 78 mr r3,r31 ffc08f8c: 4c c6 31 82 crclr 4*cr1+eq ffc08f90: 4e 80 04 21 bctrl struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); ffc08f94: 80 81 00 30 lwz r4,48(r1) ffc08f98: 7f 23 cb 78 mr r3,r25 ffc08f9c: 7f 85 e3 78 mr r5,r28 ffc08fa0: 48 00 3c 25 bl ffc0cbc4 <_Timespec_Divide_by_integer> (*print)( context, ffc08fa4: 80 c1 00 54 lwz r6,84(r1) ffc08fa8: 81 01 00 5c lwz r8,92(r1) ffc08fac: 7f e3 fb 78 mr r3,r31 ffc08fb0: 81 41 00 14 lwz r10,20(r1) ffc08fb4: 7f 44 d3 78 mr r4,r26 ffc08fb8: 80 01 00 68 lwz r0,104(r1) ffc08fbc: 7c c6 f3 d6 divw r6,r6,r30 ffc08fc0: 80 a1 00 50 lwz r5,80(r1) ffc08fc4: 80 e1 00 58 lwz r7,88(r1) ffc08fc8: 7c 09 03 a6 mtctr r0 ffc08fcc: 81 21 00 10 lwz r9,16(r1) ffc08fd0: 7d 08 f3 d6 divw r8,r8,r30 ffc08fd4: 7d 4a f3 d6 divw r10,r10,r30 ffc08fd8: 4c c6 31 82 crclr 4*cr1+eq ffc08fdc: 4e 80 04 21 bctrl * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { ffc08fe0: 3b bd 00 01 addi r29,r29,1 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; ffc08fe4: 39 33 2b e0 addi r9,r19,11232 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; ffc08fe8: 80 09 00 0c lwz r0,12(r9) ffc08fec: 7f 9d 00 40 cmplw cr7,r29,r0 ffc08ff0: 40 9d fe dc ble+ cr7,ffc08ecc the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } ffc08ff4: 39 61 00 a8 addi r11,r1,168 ffc08ff8: 4b ff 81 a0 b ffc01198 <_restgpr_18_x> =============================================================================== ffc17c08 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { ffc17c08: 7c 2b 0b 78 mr r11,r1 ffc17c0c: 94 21 ff e0 stwu r1,-32(r1) ffc17c10: 7c 08 02 a6 mflr r0 ffc17c14: 48 01 91 f9 bl ffc30e0c <_savegpr_31> register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) ffc17c18: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { ffc17c1c: 90 01 00 24 stw r0,36(r1) Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; ffc17c20: 38 00 00 0a li r0,10 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) ffc17c24: 41 82 00 bc beq- ffc17ce0 return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); ffc17c28: 38 81 00 08 addi r4,r1,8 ffc17c2c: 48 00 49 01 bl ffc1c52c <_Thread_Get> switch ( location ) { ffc17c30: 80 01 00 08 lwz r0,8(r1) ffc17c34: 2f 80 00 00 cmpwi cr7,r0,0 ffc17c38: 40 9e 00 a4 bne- cr7,ffc17cdc case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; ffc17c3c: 81 23 01 2c lwz r9,300(r3) asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { ffc17c40: 80 09 00 0c lwz r0,12(r9) ffc17c44: 2f 80 00 00 cmpwi cr7,r0,0 ffc17c48: 41 9e 00 88 beq- cr7,ffc17cd0 if ( asr->is_enabled ) { ffc17c4c: 88 09 00 08 lbz r0,8(r9) ffc17c50: 2f 80 00 00 cmpwi cr7,r0,0 ffc17c54: 41 9e 00 50 beq- cr7,ffc17ca4 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc17c58: 7c 00 00 a6 mfmsr r0 ffc17c5c: 7d 70 42 a6 mfsprg r11,0 ffc17c60: 7c 0b 58 78 andc r11,r0,r11 ffc17c64: 7d 60 01 24 mtmsr r11 ) { ISR_Level _level; _ISR_Disable( _level ); *signal_set |= signals; ffc17c68: 81 69 00 14 lwz r11,20(r9) ffc17c6c: 7d 7f fb 78 or r31,r11,r31 ffc17c70: 93 e9 00 14 stw r31,20(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc17c74: 7c 00 01 24 mtmsr r0 _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) ffc17c78: 3d 20 00 00 lis r9,0 ffc17c7c: 39 29 71 b8 addi r9,r9,29112 ffc17c80: 80 09 00 08 lwz r0,8(r9) ffc17c84: 2f 80 00 00 cmpwi cr7,r0,0 ffc17c88: 41 9e 00 3c beq- cr7,ffc17cc4 ffc17c8c: 80 09 00 0c lwz r0,12(r9) ffc17c90: 7f 83 00 00 cmpw cr7,r3,r0 ffc17c94: 40 be 00 30 bne+ cr7,ffc17cc4 <== NEVER TAKEN _Thread_Dispatch_necessary = true; ffc17c98: 38 00 00 01 li r0,1 ffc17c9c: 98 09 00 18 stb r0,24(r9) ffc17ca0: 48 00 00 24 b ffc17cc4 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc17ca4: 7c 00 00 a6 mfmsr r0 ffc17ca8: 7d 70 42 a6 mfsprg r11,0 ffc17cac: 7c 0b 58 78 andc r11,r0,r11 ffc17cb0: 7d 60 01 24 mtmsr r11 ffc17cb4: 81 69 00 18 lwz r11,24(r9) ffc17cb8: 7d 7f fb 78 or r31,r11,r31 ffc17cbc: 93 e9 00 18 stw r31,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc17cc0: 7c 00 01 24 mtmsr r0 } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); ffc17cc4: 48 00 48 49 bl ffc1c50c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc17cc8: 38 00 00 00 li r0,0 ffc17ccc: 48 00 00 14 b ffc17ce0 } _Thread_Enable_dispatch(); ffc17cd0: 48 00 48 3d bl ffc1c50c <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; ffc17cd4: 38 00 00 0b li r0,11 ffc17cd8: 48 00 00 08 b ffc17ce0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc17cdc: 38 00 00 04 li r0,4 } ffc17ce0: 39 61 00 20 addi r11,r1,32 ffc17ce4: 7c 03 03 78 mr r3,r0 ffc17ce8: 4b ff 65 d4 b ffc0e2bc <_restgpr_31_x> =============================================================================== ffc0360c : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { ffc0360c: 7c 08 02 a6 mflr r0 ffc03610: 94 21 ff f8 stwu r1,-8(r1) ffc03614: 90 01 00 0c stw r0,12(r1) Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ ffc03618: 80 03 00 08 lwz r0,8(r3) ffc0361c: 2f 80 00 00 cmpwi cr7,r0,0 ffc03620: 41 9e 00 1c beq- cr7,ffc0363c <== NEVER TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; ffc03624: 80 63 00 b8 lwz r3,184(r3) ffc03628: 3c 80 00 00 lis r4,0 ffc0362c: 38 84 2a 84 addi r4,r4,10884 ffc03630: 38 63 00 08 addi r3,r3,8 ffc03634: 38 a0 00 80 li r5,128 ffc03638: 48 00 c9 81 bl ffc0ffb8 } ffc0363c: 80 01 00 0c lwz r0,12(r1) ffc03640: 38 21 00 08 addi r1,r1,8 ffc03644: 7c 08 03 a6 mtlr r0 ffc03648: 4e 80 00 20 blr =============================================================================== ffc035cc : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { ffc035cc: 7c 2b 0b 78 mr r11,r1 ffc035d0: 94 21 ff f0 stwu r1,-16(r1) ffc035d4: 7c 08 02 a6 mflr r0 ffc035d8: 48 01 0c 2d bl ffc14204 <_savegpr_31> ffc035dc: 7c 9f 23 78 mr r31,r4 ffc035e0: 90 01 00 14 stw r0,20(r1) Stack_check_Initialize(); ffc035e4: 4b ff ff 99 bl ffc0357c if (the_thread) ffc035e8: 2f 9f 00 00 cmpwi cr7,r31,0 ffc035ec: 41 9e 00 14 beq- cr7,ffc03600 <== NEVER TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); ffc035f0: 80 7f 00 b8 lwz r3,184(r31) ffc035f4: 38 80 00 a5 li r4,165 ffc035f8: 80 bf 00 b4 lwz r5,180(r31) ffc035fc: 48 00 ca 9d bl ffc10098 return true; } ffc03600: 39 61 00 10 addi r11,r1,16 ffc03604: 38 60 00 01 li r3,1 ffc03608: 48 01 0c 48 b ffc14250 <_restgpr_31_x> =============================================================================== ffc03798 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { ffc03798: 94 21 ff f0 stwu r1,-16(r1) ffc0379c: 7c 08 02 a6 mflr r0 Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; ffc037a0: 3d 20 00 00 lis r9,0 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { ffc037a4: 90 01 00 14 stw r0,20(r1) Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; ffc037a8: 81 29 2e 24 lwz r9,11812(r9) /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { ffc037ac: bf c1 00 08 stmw r30,8(r1) ffc037b0: 7c 3f 0b 78 mr r31,r1 { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { return false; ffc037b4: 3b c0 00 00 li r30,0 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { ffc037b8: 80 69 00 b8 lwz r3,184(r9) ffc037bc: 7f 9f 18 40 cmplw cr7,r31,r3 ffc037c0: 41 9c 00 18 blt- cr7,ffc037d8 <== NEVER TAKEN return false; } if ( sp > (the_stack->area + the_stack->size) ) { ffc037c4: 83 c9 00 b4 lwz r30,180(r9) ffc037c8: 7f c3 f2 14 add r30,r3,r30 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) ffc037cc: 7f df f0 10 subfc r30,r31,r30 ffc037d0: 3b c0 00 00 li r30,0 ffc037d4: 7f de f1 14 adde r30,r30,r30 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { ffc037d8: 3d 20 00 00 lis r9,0 ffc037dc: 80 09 28 18 lwz r0,10264(r9) */ bool rtems_stack_checker_is_blown( void ) { Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; bool sp_ok; bool pattern_ok = true; ffc037e0: 38 80 00 01 li r4,1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { ffc037e4: 2f 80 00 00 cmpwi cr7,r0,0 ffc037e8: 41 9e 00 20 beq- cr7,ffc03808 <== NEVER TAKEN pattern_ok = (!memcmp( ffc037ec: 3c 80 00 00 lis r4,0 ffc037f0: 38 84 2a 84 addi r4,r4,10884 ffc037f4: 38 63 00 08 addi r3,r3,8 ffc037f8: 38 a0 00 80 li r5,128 ffc037fc: 48 00 c7 25 bl ffc0ff20 ffc03800: 7c 64 00 34 cntlzw r4,r3 ffc03804: 54 84 d9 7e rlwinm r4,r4,27,5,31 /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { ffc03808: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0380c: 41 9e 00 0c beq- cr7,ffc03818 <== NEVER TAKEN ffc03810: 2f 84 00 00 cmpwi cr7,r4,0 ffc03814: 40 be 00 10 bne+ cr7,ffc03824 <== ALWAYS TAKEN Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); ffc03818: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0381c: 80 69 2e 24 lwz r3,11812(r9) <== NOT EXECUTED ffc03820: 4b ff fe 2d bl ffc0364c <== NOT EXECUTED /* * The Stack Pointer and the Pattern Area are OK so return false. */ return false; } ffc03824: 39 7f 00 10 addi r11,r31,16 ffc03828: 38 60 00 00 li r3,0 ffc0382c: 48 01 0a 20 b ffc1424c <_restgpr_30_x> =============================================================================== ffc03830 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc03830: 94 21 ff e8 stwu r1,-24(r1) ffc03834: 7c 08 02 a6 mflr r0 ffc03838: bf 81 00 08 stmw r28,8(r1) if ( !print ) ffc0383c: 7c 9e 23 79 mr. r30,r4 void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc03840: 7c 7c 1b 78 mr r28,r3 ffc03844: 90 01 00 1c stw r0,28(r1) if ( !print ) ffc03848: 41 82 00 58 beq- ffc038a0 <== NEVER TAKEN return; print_context = context; ffc0384c: 3f e0 00 00 lis r31,0 print_handler = print; (*print)( context, "Stack usage by thread\n"); ffc03850: 7f c9 03 a6 mtctr r30 ) { if ( !print ) return; print_context = context; ffc03854: 3b bf 28 10 addi r29,r31,10256 print_handler = print; ffc03858: 93 df 28 10 stw r30,10256(r31) (*print)( context, "Stack usage by thread\n"); ffc0385c: 3c 80 ff c1 lis r4,-63 ffc03860: 38 84 5e aa addi r4,r4,24234 ) { if ( !print ) return; print_context = context; ffc03864: 90 7d 00 04 stw r3,4(r29) print_handler = print; (*print)( context, "Stack usage by thread\n"); ffc03868: 4c c6 31 82 crclr 4*cr1+eq ffc0386c: 4e 80 04 21 bctrl (*print)( context, ffc03870: 3c 80 ff c1 lis r4,-63 ffc03874: 38 84 5e c1 addi r4,r4,24257 ffc03878: 7f c9 03 a6 mtctr r30 ffc0387c: 7f 83 e3 78 mr r3,r28 ffc03880: 4c c6 31 82 crclr 4*cr1+eq ffc03884: 4e 80 04 21 bctrl " ID NAME LOW HIGH CURRENT AVAILABLE USED\n" ); /* iterate over all threads and dump the usage */ rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); ffc03888: 3c 60 ff c0 lis r3,-64 ffc0388c: 38 63 34 3c addi r3,r3,13372 ffc03890: 48 00 55 c5 bl ffc08e54 #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); #endif print_context = NULL; ffc03894: 38 00 00 00 li r0,0 ffc03898: 90 1d 00 04 stw r0,4(r29) print_handler = NULL; ffc0389c: 90 1f 28 10 stw r0,10256(r31) } ffc038a0: 39 61 00 18 addi r11,r1,24 ffc038a4: 48 01 09 a0 b ffc14244 <_restgpr_28_x> =============================================================================== ffc03720 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { ffc03720: 94 21 ff e8 stwu r1,-24(r1) ffc03724: 7c 08 02 a6 mflr r0 ffc03728: 90 01 00 1c stw r0,28(r1) Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = Stack_check_Get_pattern_area(the_stack); ffc0372c: 81 23 00 b8 lwz r9,184(r3) */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { ffc03730: bf a1 00 0c stmw r29,12(r1) ffc03734: 7c 3f 0b 78 mr r31,r1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { ffc03738: 7f 9f 48 40 cmplw cr7,r31,r9 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { ffc0373c: 7c 7e 1b 78 mr r30,r3 { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { return false; ffc03740: 3b a0 00 00 li r29,0 Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = Stack_check_Get_pattern_area(the_stack); ffc03744: 38 69 00 08 addi r3,r9,8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { ffc03748: 41 9c 00 18 blt- cr7,ffc03760 <== NEVER TAKEN return false; } if ( sp > (the_stack->area + the_stack->size) ) { ffc0374c: 83 be 00 b4 lwz r29,180(r30) ffc03750: 7f a9 ea 14 add r29,r9,r29 } /* * rtems_stack_checker_switch_extension */ void rtems_stack_checker_switch_extension( ffc03754: 7f bf e8 10 subfc r29,r31,r29 ffc03758: 3b a0 00 00 li r29,0 ffc0375c: 7f bd e9 14 adde r29,r29,r29 /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, ffc03760: 3c 80 00 00 lis r4,0 ffc03764: 38 84 2a 84 addi r4,r4,10884 ffc03768: 38 a0 00 80 li r5,128 ffc0376c: 48 00 c7 b5 bl ffc0ff20 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { ffc03770: 2f 9d 00 00 cmpwi cr7,r29,0 /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, ffc03774: 7c 64 00 34 cntlzw r4,r3 ffc03778: 54 84 d9 7e rlwinm r4,r4,27,5,31 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { ffc0377c: 41 9e 00 0c beq- cr7,ffc03788 <== NEVER TAKEN ffc03780: 2f 84 00 00 cmpwi cr7,r4,0 ffc03784: 40 be 00 0c bne+ cr7,ffc03790 Stack_check_report_blown_task( running, pattern_ok ); ffc03788: 7f c3 f3 78 mr r3,r30 ffc0378c: 4b ff fe c1 bl ffc0364c } } ffc03790: 39 7f 00 18 addi r11,r31,24 ffc03794: 48 01 0a b4 b ffc14248 <_restgpr_29_x> =============================================================================== ffc0dc3c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0dc3c: 94 21 ff d0 stwu r1,-48(r1) ffc0dc40: 7c 08 02 a6 mflr r0 ffc0dc44: bf a1 00 1c stmw r29,28(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0dc48: 7c 9e 23 79 mr. r30,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0dc4c: 7c 7f 1b 78 mr r31,r3 ffc0dc50: 90 01 00 34 stw r0,52(r1) ffc0dc54: 7c bd 2b 78 mr r29,r5 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc0dc58: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0dc5c: db e1 00 28 stfd f31,40(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0dc60: 41 82 00 78 beq- ffc0dcd8 return RTEMS_INVALID_ADDRESS; errno = 0; ffc0dc64: 48 00 27 99 bl ffc103fc <__errno> *n = 0; ffc0dc68: 3d 20 ff c2 lis r9,-62 ffc0dc6c: c8 09 de e8 lfd f0,-8472(r9) char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; ffc0dc70: 38 00 00 00 li r0,0 ffc0dc74: 90 03 00 00 stw r0,0(r3) *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ffc0dc78: 38 81 00 08 addi r4,r1,8 ffc0dc7c: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc0dc80: d8 1e 00 00 stfd f0,0(r30) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ffc0dc84: 48 00 54 c9 bl ffc1314c #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0dc88: 2f 9d 00 00 cmpwi cr7,r29,0 errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ffc0dc8c: ff e0 08 90 fmr f31,f1 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0dc90: 41 9e 00 0c beq- cr7,ffc0dc9c *endptr = end; ffc0dc94: 80 01 00 08 lwz r0,8(r1) ffc0dc98: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc0dc9c: 80 01 00 08 lwz r0,8(r1) return RTEMS_NOT_DEFINED; ffc0dca0: 38 60 00 0b li r3,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) ffc0dca4: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0dca8: 41 9e 00 30 beq- cr7,ffc0dcd8 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc0dcac: 3d 20 ff c2 lis r9,-62 ffc0dcb0: c8 09 03 78 lfd f0,888(r9) ffc0dcb4: ff 9f 00 00 fcmpu cr7,f31,f0 ffc0dcb8: 40 9d 00 18 ble- cr7,ffc0dcd0 ffc0dcbc: 48 00 27 41 bl ffc103fc <__errno> ffc0dcc0: 80 03 00 00 lwz r0,0(r3) return RTEMS_INVALID_NUMBER; ffc0dcc4: 38 60 00 0a li r3,10 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc0dcc8: 2f 80 00 22 cmpwi cr7,r0,34 ffc0dccc: 41 9e 00 0c beq- cr7,ffc0dcd8 <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc0dcd0: db fe 00 00 stfd f31,0(r30) #endif return RTEMS_SUCCESSFUL; ffc0dcd4: 38 60 00 00 li r3,0 } ffc0dcd8: 80 01 00 34 lwz r0,52(r1) ffc0dcdc: bb a1 00 1c lmw r29,28(r1) ffc0dce0: 7c 08 03 a6 mtlr r0 ffc0dce4: cb e1 00 28 lfd f31,40(r1) ffc0dce8: 38 21 00 30 addi r1,r1,48 ffc0dcec: 4e 80 00 20 blr =============================================================================== ffc0dcf0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0dcf0: 94 21 ff d0 stwu r1,-48(r1) ffc0dcf4: 7c 08 02 a6 mflr r0 ffc0dcf8: bf a1 00 1c stmw r29,28(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0dcfc: 7c 9e 23 79 mr. r30,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0dd00: 7c 7f 1b 78 mr r31,r3 ffc0dd04: 90 01 00 34 stw r0,52(r1) ffc0dd08: 7c bd 2b 78 mr r29,r5 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc0dd0c: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0dd10: db e1 00 28 stfd f31,40(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0dd14: 41 82 00 74 beq- ffc0dd88 return RTEMS_INVALID_ADDRESS; errno = 0; ffc0dd18: 48 00 26 e5 bl ffc103fc <__errno> ffc0dd1c: 38 00 00 00 li r0,0 ffc0dd20: 90 03 00 00 stw r0,0(r3) *n = 0; ffc0dd24: 38 00 00 00 li r0,0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ffc0dd28: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc0dd2c: 90 1e 00 00 stw r0,0(r30) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ffc0dd30: 38 81 00 08 addi r4,r1,8 ffc0dd34: 48 00 54 31 bl ffc13164 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0dd38: 2f 9d 00 00 cmpwi cr7,r29,0 errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ffc0dd3c: ff e0 08 90 fmr f31,f1 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0dd40: 41 9e 00 0c beq- cr7,ffc0dd4c *endptr = end; ffc0dd44: 80 01 00 08 lwz r0,8(r1) ffc0dd48: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc0dd4c: 80 01 00 08 lwz r0,8(r1) return RTEMS_NOT_DEFINED; ffc0dd50: 38 60 00 0b li r3,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) ffc0dd54: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0dd58: 41 9e 00 30 beq- cr7,ffc0dd88 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc0dd5c: 3d 20 ff c2 lis r9,-62 ffc0dd60: c0 09 03 80 lfs f0,896(r9) ffc0dd64: ff 9f 00 00 fcmpu cr7,f31,f0 ffc0dd68: 40 9d 00 18 ble- cr7,ffc0dd80 ffc0dd6c: 48 00 26 91 bl ffc103fc <__errno> ffc0dd70: 80 03 00 00 lwz r0,0(r3) return RTEMS_INVALID_NUMBER; ffc0dd74: 38 60 00 0a li r3,10 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc0dd78: 2f 80 00 22 cmpwi cr7,r0,34 ffc0dd7c: 41 9e 00 0c beq- cr7,ffc0dd88 <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc0dd80: d3 fe 00 00 stfs f31,0(r30) #endif return RTEMS_SUCCESSFUL; ffc0dd84: 38 60 00 00 li r3,0 } ffc0dd88: 80 01 00 34 lwz r0,52(r1) ffc0dd8c: bb a1 00 1c lmw r29,28(r1) ffc0dd90: 7c 08 03 a6 mtlr r0 ffc0dd94: cb e1 00 28 lfd f31,40(r1) ffc0dd98: 38 21 00 30 addi r1,r1,48 ffc0dd9c: 4e 80 00 20 blr =============================================================================== ffc0de40 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0de40: 94 21 ff d0 stwu r1,-48(r1) ffc0de44: 7c 08 02 a6 mflr r0 ffc0de48: bf 61 00 1c stmw r27,28(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0de4c: 7c 9d 23 79 mr. r29,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0de50: 7c 7f 1b 78 mr r31,r3 ffc0de54: 90 01 00 34 stw r0,52(r1) ffc0de58: 7c be 2b 78 mr r30,r5 ffc0de5c: 7c dc 33 78 mr r28,r6 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc0de60: 38 60 00 09 li r3,9 ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0de64: 41 82 00 a0 beq- ffc0df04 return RTEMS_INVALID_ADDRESS; errno = 0; ffc0de68: 48 00 25 95 bl ffc103fc <__errno> ffc0de6c: 38 00 00 00 li r0,0 *n = 0; ffc0de70: 39 20 00 00 li r9,0 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; ffc0de74: 90 03 00 00 stw r0,0(r3) *n = 0; ffc0de78: 39 40 00 00 li r10,0 ffc0de7c: 91 3d 00 00 stw r9,0(r29) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc0de80: 7f 85 e3 78 mr r5,r28 ffc0de84: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc0de88: 91 5d 00 04 stw r10,4(r29) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc0de8c: 38 81 00 08 addi r4,r1,8 ffc0de90: 48 00 55 6d bl ffc133fc #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0de94: 2f 9e 00 00 cmpwi cr7,r30,0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc0de98: 7c 7c 1b 78 mr r28,r3 ffc0de9c: 7c 9b 23 78 mr r27,r4 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0dea0: 41 9e 00 0c beq- cr7,ffc0deac *endptr = end; ffc0dea4: 80 01 00 08 lwz r0,8(r1) ffc0dea8: 90 1e 00 00 stw r0,0(r30) /* nothing was converted */ if ( end == s ) ffc0deac: 80 01 00 08 lwz r0,8(r1) return RTEMS_NOT_DEFINED; ffc0deb0: 38 60 00 0b li r3,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) ffc0deb4: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0deb8: 41 9e 00 4c beq- cr7,ffc0df04 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc0debc: 6f 80 80 00 xoris r0,r28,32768 ffc0dec0: 2f 80 ff ff cmpwi cr7,r0,-1 ffc0dec4: 40 9e 00 0c bne- cr7,ffc0ded0 ffc0dec8: 2f 9b ff ff cmpwi cr7,r27,-1 ffc0decc: 41 9e 00 18 beq- cr7,ffc0dee4 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) ffc0ded0: 3c 00 80 00 lis r0,-32768 ffc0ded4: 7f 9c 00 00 cmpw cr7,r28,r0 ffc0ded8: 40 be 00 20 bne+ cr7,ffc0def8 ffc0dedc: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0dee0: 40 be 00 18 bne+ cr7,ffc0def8 <== NEVER TAKEN ffc0dee4: 48 00 25 19 bl ffc103fc <__errno> ffc0dee8: 80 03 00 00 lwz r0,0(r3) return RTEMS_INVALID_NUMBER; ffc0deec: 38 60 00 0a li r3,10 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) ffc0def0: 2f 80 00 22 cmpwi cr7,r0,34 ffc0def4: 41 9e 00 10 beq- cr7,ffc0df04 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc0def8: 93 9d 00 00 stw r28,0(r29) #endif return RTEMS_SUCCESSFUL; ffc0defc: 38 60 00 00 li r3,0 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc0df00: 93 7d 00 04 stw r27,4(r29) #endif return RTEMS_SUCCESSFUL; } ffc0df04: 39 61 00 30 addi r11,r1,48 ffc0df08: 4b ff 4f c4 b ffc02ecc <_restgpr_27_x> =============================================================================== ffc0dfb8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0dfb8: 94 21 ff d8 stwu r1,-40(r1) ffc0dfbc: 7c 08 02 a6 mflr r0 ffc0dfc0: bf 81 00 18 stmw r28,24(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0dfc4: 7c 9f 23 79 mr. r31,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0dfc8: 7c 7e 1b 78 mr r30,r3 ffc0dfcc: 90 01 00 2c stw r0,44(r1) ffc0dfd0: 7c bd 2b 78 mr r29,r5 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc0dfd4: 38 00 00 09 li r0,9 ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0dfd8: 41 82 00 6c beq- ffc0e044 return RTEMS_INVALID_ADDRESS; errno = 0; ffc0dfdc: 48 00 24 21 bl ffc103fc <__errno> ffc0dfe0: 38 00 00 00 li r0,0 ffc0dfe4: 90 03 00 00 stw r0,0(r3) *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); ffc0dfe8: 38 81 00 08 addi r4,r1,8 ffc0dfec: 7f c3 f3 78 mr r3,r30 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc0dff0: 90 1f 00 00 stw r0,0(r31) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); ffc0dff4: 38 a0 00 10 li r5,16 ffc0dff8: 48 00 59 65 bl ffc1395c #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0dffc: 2f 9d 00 00 cmpwi cr7,r29,0 *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); ffc0e000: 7c 7c 1b 78 mr r28,r3 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0e004: 41 9e 00 0c beq- cr7,ffc0e010 *endptr = end; ffc0e008: 80 01 00 08 lwz r0,8(r1) ffc0e00c: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc0e010: 81 21 00 08 lwz r9,8(r1) return RTEMS_NOT_DEFINED; ffc0e014: 38 00 00 0b li r0,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) ffc0e018: 7f 89 f0 00 cmpw cr7,r9,r30 ffc0e01c: 41 9e 00 28 beq- cr7,ffc0e044 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc0e020: 2f 9c ff ff cmpwi cr7,r28,-1 ffc0e024: 40 be 00 18 bne+ cr7,ffc0e03c <== ALWAYS TAKEN ffc0e028: 48 00 23 d5 bl ffc103fc <__errno> <== NOT EXECUTED return RTEMS_INVALID_NUMBER; ffc0e02c: 38 00 00 0a li r0,10 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc0e030: 81 23 00 00 lwz r9,0(r3) <== NOT EXECUTED ffc0e034: 2f 89 00 22 cmpwi cr7,r9,34 <== NOT EXECUTED ffc0e038: 41 9e 00 0c beq- cr7,ffc0e044 <== NOT EXECUTED if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; ffc0e03c: 93 9f 00 00 stw r28,0(r31) #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; ffc0e040: 38 00 00 00 li r0,0 } ffc0e044: 39 61 00 28 addi r11,r1,40 ffc0e048: 7c 03 03 78 mr r3,r0 ffc0e04c: 4b ff 4e 84 b ffc02ed0 <_restgpr_28_x> =============================================================================== ffc0e0cc : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0e0cc: 94 21 ff d8 stwu r1,-40(r1) ffc0e0d0: 7c 08 02 a6 mflr r0 ffc0e0d4: bf 81 00 18 stmw r28,24(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0e0d8: 7c 9d 23 79 mr. r29,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0e0dc: 7c 7f 1b 78 mr r31,r3 ffc0e0e0: 90 01 00 2c stw r0,44(r1) ffc0e0e4: 7c be 2b 78 mr r30,r5 ffc0e0e8: 7c dc 33 78 mr r28,r6 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc0e0ec: 38 00 00 09 li r0,9 ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0e0f0: 41 82 00 6c beq- ffc0e15c return RTEMS_INVALID_ADDRESS; errno = 0; ffc0e0f4: 48 00 23 09 bl ffc103fc <__errno> ffc0e0f8: 38 00 00 00 li r0,0 ffc0e0fc: 90 03 00 00 stw r0,0(r3) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc0e100: 7f 85 e3 78 mr r5,r28 ffc0e104: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc0e108: 90 1d 00 00 stw r0,0(r29) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc0e10c: 38 81 00 08 addi r4,r1,8 ffc0e110: 48 00 58 4d bl ffc1395c #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0e114: 2f 9e 00 00 cmpwi cr7,r30,0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc0e118: 7c 7c 1b 78 mr r28,r3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0e11c: 41 9e 00 0c beq- cr7,ffc0e128 *endptr = end; ffc0e120: 80 01 00 08 lwz r0,8(r1) ffc0e124: 90 1e 00 00 stw r0,0(r30) /* nothing was converted */ if ( end == s ) ffc0e128: 81 21 00 08 lwz r9,8(r1) return RTEMS_NOT_DEFINED; ffc0e12c: 38 00 00 0b li r0,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) ffc0e130: 7f 89 f8 00 cmpw cr7,r9,r31 ffc0e134: 41 9e 00 28 beq- cr7,ffc0e15c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc0e138: 2f 9c ff ff cmpwi cr7,r28,-1 ffc0e13c: 40 be 00 18 bne+ cr7,ffc0e154 ffc0e140: 48 00 22 bd bl ffc103fc <__errno> return RTEMS_INVALID_NUMBER; ffc0e144: 38 00 00 0a li r0,10 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc0e148: 81 23 00 00 lwz r9,0(r3) ffc0e14c: 2f 89 00 22 cmpwi cr7,r9,34 ffc0e150: 41 9e 00 0c beq- cr7,ffc0e15c <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc0e154: 93 9d 00 00 stw r28,0(r29) #endif return RTEMS_SUCCESSFUL; ffc0e158: 38 00 00 00 li r0,0 } ffc0e15c: 39 61 00 28 addi r11,r1,40 ffc0e160: 7c 03 03 78 mr r3,r0 ffc0e164: 4b ff 4d 6c b ffc02ed0 <_restgpr_28_x> =============================================================================== ffc0e21c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0e21c: 94 21 ff d8 stwu r1,-40(r1) ffc0e220: 7c 08 02 a6 mflr r0 ffc0e224: bf 81 00 18 stmw r28,24(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0e228: 7c 9d 23 79 mr. r29,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0e22c: 7c 7f 1b 78 mr r31,r3 ffc0e230: 90 01 00 2c stw r0,44(r1) ffc0e234: 7c be 2b 78 mr r30,r5 ffc0e238: 7c dc 33 78 mr r28,r6 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc0e23c: 38 00 00 09 li r0,9 ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0e240: 41 82 00 6c beq- ffc0e2ac return RTEMS_INVALID_ADDRESS; errno = 0; ffc0e244: 48 00 21 b9 bl ffc103fc <__errno> ffc0e248: 38 00 00 00 li r0,0 ffc0e24c: 90 03 00 00 stw r0,0(r3) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc0e250: 7f 85 e3 78 mr r5,r28 ffc0e254: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc0e258: 90 1d 00 00 stw r0,0(r29) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc0e25c: 38 81 00 08 addi r4,r1,8 ffc0e260: 48 00 56 fd bl ffc1395c #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0e264: 2f 9e 00 00 cmpwi cr7,r30,0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc0e268: 7c 7c 1b 78 mr r28,r3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0e26c: 41 9e 00 0c beq- cr7,ffc0e278 *endptr = end; ffc0e270: 80 01 00 08 lwz r0,8(r1) ffc0e274: 90 1e 00 00 stw r0,0(r30) /* nothing was converted */ if ( end == s ) ffc0e278: 81 21 00 08 lwz r9,8(r1) return RTEMS_NOT_DEFINED; ffc0e27c: 38 00 00 0b li r0,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) ffc0e280: 7f 89 f8 00 cmpw cr7,r9,r31 ffc0e284: 41 9e 00 28 beq- cr7,ffc0e2ac return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc0e288: 2f 9c ff ff cmpwi cr7,r28,-1 ffc0e28c: 40 be 00 18 bne+ cr7,ffc0e2a4 ffc0e290: 48 00 21 6d bl ffc103fc <__errno> return RTEMS_INVALID_NUMBER; ffc0e294: 38 00 00 0a li r0,10 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc0e298: 81 23 00 00 lwz r9,0(r3) ffc0e29c: 2f 89 00 22 cmpwi cr7,r9,34 ffc0e2a0: 41 9e 00 0c beq- cr7,ffc0e2ac <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc0e2a4: 93 9d 00 00 stw r28,0(r29) #endif return RTEMS_SUCCESSFUL; ffc0e2a8: 38 00 00 00 li r0,0 } ffc0e2ac: 39 61 00 28 addi r11,r1,40 ffc0e2b0: 7c 03 03 78 mr r3,r0 ffc0e2b4: 4b ff 4c 1c b ffc02ed0 <_restgpr_28_x> =============================================================================== ffc0e168 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0e168: 94 21 ff d0 stwu r1,-48(r1) ffc0e16c: 7c 08 02 a6 mflr r0 ffc0e170: bf 61 00 1c stmw r27,28(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0e174: 7c 9d 23 79 mr. r29,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0e178: 7c 7f 1b 78 mr r31,r3 ffc0e17c: 90 01 00 34 stw r0,52(r1) ffc0e180: 7c be 2b 78 mr r30,r5 ffc0e184: 7c dc 33 78 mr r28,r6 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; ffc0e188: 38 60 00 09 li r3,9 ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0e18c: 41 82 00 88 beq- ffc0e214 return RTEMS_INVALID_ADDRESS; errno = 0; ffc0e190: 48 00 22 6d bl ffc103fc <__errno> ffc0e194: 38 00 00 00 li r0,0 *n = 0; ffc0e198: 39 20 00 00 li r9,0 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; ffc0e19c: 90 03 00 00 stw r0,0(r3) *n = 0; ffc0e1a0: 39 40 00 00 li r10,0 ffc0e1a4: 91 3d 00 00 stw r9,0(r29) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc0e1a8: 7f 85 e3 78 mr r5,r28 ffc0e1ac: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc0e1b0: 91 5d 00 04 stw r10,4(r29) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc0e1b4: 38 81 00 08 addi r4,r1,8 ffc0e1b8: 48 00 57 c5 bl ffc1397c #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0e1bc: 2f 9e 00 00 cmpwi cr7,r30,0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc0e1c0: 7c 7c 1b 78 mr r28,r3 ffc0e1c4: 7c 9b 23 78 mr r27,r4 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0e1c8: 41 9e 00 0c beq- cr7,ffc0e1d4 *endptr = end; ffc0e1cc: 80 01 00 08 lwz r0,8(r1) ffc0e1d0: 90 1e 00 00 stw r0,0(r30) /* nothing was converted */ if ( end == s ) ffc0e1d4: 80 01 00 08 lwz r0,8(r1) return RTEMS_NOT_DEFINED; ffc0e1d8: 38 60 00 0b li r3,11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) ffc0e1dc: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0e1e0: 41 9e 00 34 beq- cr7,ffc0e214 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc0e1e4: 2f 9c ff ff cmpwi cr7,r28,-1 ffc0e1e8: 40 be 00 20 bne+ cr7,ffc0e208 ffc0e1ec: 2f 9b ff ff cmpwi cr7,r27,-1 ffc0e1f0: 40 be 00 18 bne+ cr7,ffc0e208 <== NEVER TAKEN ffc0e1f4: 48 00 22 09 bl ffc103fc <__errno> ffc0e1f8: 80 03 00 00 lwz r0,0(r3) return RTEMS_INVALID_NUMBER; ffc0e1fc: 38 60 00 0a li r3,10 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc0e200: 2f 80 00 22 cmpwi cr7,r0,34 ffc0e204: 41 9e 00 10 beq- cr7,ffc0e214 <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc0e208: 93 9d 00 00 stw r28,0(r29) #endif return RTEMS_SUCCESSFUL; ffc0e20c: 38 60 00 00 li r3,0 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc0e210: 93 7d 00 04 stw r27,4(r29) #endif return RTEMS_SUCCESSFUL; } ffc0e214: 39 61 00 30 addi r11,r1,48 ffc0e218: 4b ff 4c b4 b ffc02ecc <_restgpr_27_x> =============================================================================== ffc03bfc : int rtems_tarfs_load( char *mountpoint, uint8_t *tar_image, size_t tar_size ) { ffc03bfc: 94 21 fe 28 stwu r1,-472(r1) ffc03c00: 7c 08 02 a6 mflr r0 ffc03c04: be 01 01 98 stmw r16,408(r1) ffc03c08: 7c 79 1b 78 mr r25,r3 ffc03c0c: 7c 98 23 78 mr r24,r4 ffc03c10: 90 01 01 dc stw r0,476(r1) ffc03c14: 7c b4 2b 78 mr r20,r5 int offset; unsigned long nblocks; IMFS_jnode_t *node; int status; status = rtems_filesystem_evaluate_path( ffc03c18: 48 01 05 81 bl ffc14198 ffc03c1c: 38 a0 00 00 li r5,0 ffc03c20: 7c 64 1b 78 mr r4,r3 ffc03c24: 38 c1 00 0c addi r6,r1,12 ffc03c28: 7f 23 cb 78 mr r3,r25 ffc03c2c: 38 e0 00 00 li r7,0 ffc03c30: 48 00 0c 5d bl ffc0488c strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) ffc03c34: 7c 7d 1b 79 mr. r29,r3 ffc03c38: 40 82 01 98 bne- ffc03dd0 return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) ffc03c3c: 80 01 00 18 lwz r0,24(r1) ffc03c40: 3d 20 ff c2 lis r9,-62 ffc03c44: 39 29 09 b0 addi r9,r9,2480 ffc03c48: 7f 80 48 00 cmpw cr7,r0,r9 ffc03c4c: 3a 40 00 00 li r18,0 ffc03c50: 41 be 00 24 beq+ cr7,ffc03c74 ffc03c54: 3d 20 ff c2 lis r9,-62 ffc03c58: 39 29 10 d8 addi r9,r9,4312 ffc03c5c: 7f 80 48 00 cmpw cr7,r0,r9 ffc03c60: 7f b2 eb 78 mr r18,r29 ffc03c64: 40 be 01 6c bne+ cr7,ffc03dd0 <== ALWAYS TAKEN ffc03c68: 48 00 00 0c b ffc03c74 <== NOT EXECUTED ffc03c6c: 7f d2 f3 78 mr r18,r30 ffc03c70: 48 00 00 24 b ffc03c94 /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) ffc03c74: 3e a0 ff c2 lis r21,-62 * - For files, create a file node with special tarfs properties. */ if (linkflag == DIRTYPE) { strcpy(full_filename, mountpoint); if (full_filename[strlen(full_filename)-1] != '/') strcat(full_filename, "/"); ffc03c78: 3e c0 ff c2 lis r22,-62 /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) ffc03c7c: 3a b5 09 f8 addi r21,r21,2552 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); ffc03c80: 3b 61 00 34 addi r27,r1,52 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; ffc03c84: 3b 81 00 20 addi r28,r1,32 if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { ffc03c88: 3b 41 00 08 addi r26,r1,8 * - For directories, just create directories as usual. IMFS * will take care of the rest. * - For files, create a file node with special tarfs properties. */ if (linkflag == DIRTYPE) { strcpy(full_filename, mountpoint); ffc03c8c: 3b e1 00 98 addi r31,r1,152 if (full_filename[strlen(full_filename)-1] != '/') strcat(full_filename, "/"); ffc03c90: 3a d6 d6 11 addi r22,r22,-10735 /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) ffc03c94: 3b d2 02 00 addi r30,r18,512 ffc03c98: 7f 9e a0 40 cmplw cr7,r30,r20 ffc03c9c: 41 9d 01 38 bgt- cr7,ffc03dd4 <== NEVER TAKEN break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; ffc03ca0: 7e 58 92 14 add r18,r24,r18 offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) ffc03ca4: 38 72 01 01 addi r3,r18,257 ffc03ca8: 7e a4 ab 78 mr r4,r21 ffc03cac: 38 a0 00 05 li r5,5 ffc03cb0: 48 01 05 8d bl ffc1423c ffc03cb4: 7c 77 1b 79 mr. r23,r3 ffc03cb8: 40 82 01 1c bne- ffc03dd4 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); ffc03cbc: 38 a0 00 63 li r5,99 ffc03cc0: 7e 44 93 78 mr r4,r18 ffc03cc4: 7f 63 db 78 mr r3,r27 ffc03cc8: 48 01 06 cd bl ffc14394 filename[MAX_NAME_FIELD_SIZE] = '\0'; ffc03ccc: 9a e1 00 97 stb r23,151(r1) linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); ffc03cd0: 38 80 00 08 li r4,8 ffc03cd4: 38 72 00 64 addi r3,r18,100 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; ffc03cd8: 8a 32 00 9c lbz r17,156(r18) file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); ffc03cdc: 48 00 82 39 bl ffc0bf14 <_rtems_octal2ulong> file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); ffc03ce0: 38 80 00 0c li r4,12 strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); ffc03ce4: 7c 73 1b 78 mr r19,r3 file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); ffc03ce8: 38 72 00 7c addi r3,r18,124 ffc03cec: 48 00 82 29 bl ffc0bf14 <_rtems_octal2ulong> hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); ffc03cf0: 38 80 00 08 li r4,8 strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); ffc03cf4: 7c 77 1b 78 mr r23,r3 hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); ffc03cf8: 38 72 00 94 addi r3,r18,148 ffc03cfc: 48 00 82 19 bl ffc0bf14 <_rtems_octal2ulong> ffc03d00: 7c 70 1b 78 mr r16,r3 if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) ffc03d04: 7e 43 93 78 mr r3,r18 ffc03d08: 48 00 82 59 bl ffc0bf60 <_rtems_tar_header_checksum> ffc03d0c: 7f 83 80 00 cmpw cr7,r3,r16 ffc03d10: 40 9e 00 c4 bne- cr7,ffc03dd4 <== NEVER TAKEN * Generate an IMFS node depending on the file type. * - For directories, just create directories as usual. IMFS * will take care of the rest. * - For files, create a file node with special tarfs properties. */ if (linkflag == DIRTYPE) { ffc03d14: 2f 91 00 35 cmpwi cr7,r17,53 ffc03d18: 40 be 00 50 bne+ cr7,ffc03d68 strcpy(full_filename, mountpoint); ffc03d1c: 7f 24 cb 78 mr r4,r25 ffc03d20: 7f e3 fb 78 mr r3,r31 ffc03d24: 48 00 ff a1 bl ffc13cc4 if (full_filename[strlen(full_filename)-1] != '/') ffc03d28: 7f e3 fb 78 mr r3,r31 ffc03d2c: 48 01 04 6d bl ffc14198 ffc03d30: 7c 7a 1a 14 add r3,r26,r3 ffc03d34: 88 03 00 8f lbz r0,143(r3) ffc03d38: 2f 80 00 2f cmpwi cr7,r0,47 ffc03d3c: 41 9e 00 10 beq- cr7,ffc03d4c <== ALWAYS TAKEN strcat(full_filename, "/"); ffc03d40: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc03d44: 7e c4 b3 78 mr r4,r22 <== NOT EXECUTED ffc03d48: 48 00 fe 41 bl ffc13b88 <== NOT EXECUTED strcat(full_filename, filename); ffc03d4c: 7f 64 db 78 mr r4,r27 ffc03d50: 7f e3 fb 78 mr r3,r31 ffc03d54: 48 00 fe 35 bl ffc13b88 mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO); ffc03d58: 7f e3 fb 78 mr r3,r31 ffc03d5c: 38 80 01 ff li r4,511 ffc03d60: 48 00 14 c1 bl ffc05220 ffc03d64: 4b ff ff 08 b ffc03c6c * IMFS_create_node was ONLY passed a NULL when we created the * root node. We added a new IMFS_create_root_node() so this * path no longer existed. The result was simpler code which * should not have this path. */ else if (linkflag == REGTYPE) { ffc03d68: 2f 91 00 30 cmpwi cr7,r17,48 ffc03d6c: 40 9e ff 00 bne+ cr7,ffc03c6c const char *name; loc = root_loc; ffc03d70: 39 61 00 0c addi r11,r1,12 ffc03d74: 7c ab a4 aa lswi r5,r11,20 ffc03d78: 7c bc a5 aa stswi r5,r28,20 if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { ffc03d7c: 7f 63 db 78 mr r3,r27 ffc03d80: 7f 84 e3 78 mr r4,r28 ffc03d84: 7f 45 d3 78 mr r5,r26 ffc03d88: 48 00 8e 49 bl ffc0cbd0 ffc03d8c: 7c 72 1b 79 mr. r18,r3 ffc03d90: 40 a2 00 30 bne+ ffc03dc0 <== NEVER TAKEN node = IMFS_create_node( &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, ffc03d94: 56 66 05 fe clrlwi r6,r19,23 else if (linkflag == REGTYPE) { const char *name; loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( ffc03d98: 80 a1 00 08 lwz r5,8(r1) ffc03d9c: 7f 83 e3 78 mr r3,r28 ffc03da0: 38 80 00 06 li r4,6 ffc03da4: 60 c6 80 00 ori r6,r6,32768 ffc03da8: 38 e0 00 00 li r7,0 ffc03dac: 48 00 87 cd bl ffc0c578 IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; node->info.linearfile.direct = &tar_image[offset]; ffc03db0: 7c 18 f2 14 add r0,r24,r30 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; ffc03db4: 92 e3 00 54 stw r23,84(r3) ffc03db8: 92 43 00 50 stw r18,80(r3) node->info.linearfile.direct = &tar_image[offset]; ffc03dbc: 90 03 00 58 stw r0,88(r3) } nblocks = (((file_size) + 511) & ~511) / 512; ffc03dc0: 3a f7 01 ff addi r23,r23,511 offset += 512 * nblocks; ffc03dc4: 56 f7 00 2c rlwinm r23,r23,0,0,22 ffc03dc8: 7f d7 f2 14 add r30,r23,r30 ffc03dcc: 4b ff fe a0 b ffc03c6c ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) return -1; ffc03dd0: 3b a0 ff ff li r29,-1 nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; } } return status; } ffc03dd4: 39 61 01 d8 addi r11,r1,472 ffc03dd8: 7f a3 eb 78 mr r3,r29 ffc03ddc: 4b ff c7 ac b ffc00588 <_restgpr_16_x> =============================================================================== ffc0ece8 : ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) ffc0ece8: 2c 05 00 00 cmpwi r5,0 rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { ffc0ecec: 7c 08 02 a6 mflr r0 ffc0ecf0: 94 21 ff f8 stwu r1,-8(r1) ffc0ecf4: 90 01 00 0c stw r0,12(r1) ffc0ecf8: 7c 60 1b 78 mr r0,r3 bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; ffc0ecfc: 38 60 00 09 li r3,9 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) ffc0ed00: 41 82 01 8c beq- ffc0ee8c return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; ffc0ed04: 3d 20 00 00 lis r9,0 ffc0ed08: 81 69 2d 84 lwz r11,11652(r9) api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc0ed0c: 81 0b 00 7c lwz r8,124(r11) executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; ffc0ed10: 89 4b 00 74 lbz r10,116(r11) if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc0ed14: 2f 88 00 00 cmpwi cr7,r8,0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc0ed18: 81 2b 01 2c lwz r9,300(r11) asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; ffc0ed1c: 7d 4a 00 34 cntlzw r10,r10 ffc0ed20: 55 4a d9 7e rlwinm r10,r10,27,5,31 ffc0ed24: 55 4a 40 2e rlwinm r10,r10,8,0,23 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc0ed28: 41 9e 00 08 beq- cr7,ffc0ed30 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; ffc0ed2c: 61 4a 02 00 ori r10,r10,512 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; ffc0ed30: 89 09 00 08 lbz r8,8(r9) ffc0ed34: 7d 08 00 34 cntlzw r8,r8 ffc0ed38: 55 08 d9 7e rlwinm r8,r8,27,5,31 ffc0ed3c: 55 08 50 2a rlwinm r8,r8,10,0,21 ffc0ed40: 7d 08 53 78 or r8,r8,r10 #ifndef ASM static inline uint32_t _CPU_ISR_Get_level( void ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc0ed44: 39 40 00 00 li r10,0 ffc0ed48: 7d 40 00 a6 mfmsr r10 if (msr & MSR_EE) return 0; ffc0ed4c: 71 47 80 00 andi. r7,r10,32768 ffc0ed50: 7c e0 00 26 mfcr r7 ffc0ed54: 54 e7 1f fe rlwinm r7,r7,3,31,31 old_mode |= _ISR_Get_level(); ffc0ed58: 7d 0a 3b 78 or r10,r8,r7 *previous_mode_set = old_mode; ffc0ed5c: 91 45 00 00 stw r10,0(r5) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc0ed60: 70 8a 01 00 andi. r10,r4,256 ffc0ed64: 41 82 00 14 beq- ffc0ed78 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; ffc0ed68: 70 07 01 00 andi. r7,r0,256 ffc0ed6c: 7d 40 00 26 mfcr r10 ffc0ed70: 55 4a 1f fe rlwinm r10,r10,3,31,31 ffc0ed74: 99 4b 00 74 stb r10,116(r11) if ( mask & RTEMS_TIMESLICE_MASK ) { ffc0ed78: 70 8a 02 00 andi. r10,r4,512 ffc0ed7c: 41 82 00 28 beq- ffc0eda4 if ( _Modes_Is_timeslice(mode_set) ) { ffc0ed80: 70 0a 02 00 andi. r10,r0,512 ffc0ed84: 41 82 00 1c beq- ffc0eda0 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; ffc0ed88: 39 40 00 01 li r10,1 ffc0ed8c: 91 4b 00 7c stw r10,124(r11) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0ed90: 3d 40 00 00 lis r10,0 ffc0ed94: 81 4a 27 60 lwz r10,10080(r10) ffc0ed98: 91 4b 00 78 stw r10,120(r11) ffc0ed9c: 48 00 00 08 b ffc0eda4 } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; ffc0eda0: 91 4b 00 7c stw r10,124(r11) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc0eda4: 70 8b 00 01 andi. r11,r4,1 ffc0eda8: 41 82 00 2c beq- ffc0edd4 } static inline void _CPU_ISR_Set_level( uint32_t level ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc0edac: 39 60 00 00 li r11,0 ffc0edb0: 7d 60 00 a6 mfmsr r11 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc0edb4: 70 07 00 01 andi. r7,r0,1 ffc0edb8: 40 82 00 10 bne- ffc0edc8 static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; asm volatile ( ffc0edbc: 7d 50 42 a6 mfsprg r10,0 msr |= ppc_interrupt_get_disable_mask(); ffc0edc0: 7d 4b 5b 78 or r11,r10,r11 ffc0edc4: 48 00 00 0c b ffc0edd0 ffc0edc8: 7d 50 42 a6 mfsprg r10,0 } else { msr &= ~ppc_interrupt_get_disable_mask(); ffc0edcc: 7d 6b 50 78 andc r11,r11,r10 } _CPU_MSR_SET(msr); ffc0edd0: 7d 60 01 24 mtmsr r11 * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { ffc0edd4: 70 8a 04 00 andi. r10,r4,1024 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; ffc0edd8: 39 60 00 00 li r11,0 if ( mask & RTEMS_ASR_MASK ) { ffc0eddc: 41 82 00 58 beq- ffc0ee34 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( ffc0ede0: 70 07 04 00 andi. r7,r0,1024 is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { ffc0ede4: 89 49 00 08 lbz r10,8(r9) * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( ffc0ede8: 7c 00 00 26 mfcr r0 ffc0edec: 54 00 1f fe rlwinm r0,r0,3,31,31 is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { ffc0edf0: 7f 8a 00 00 cmpw cr7,r10,r0 ffc0edf4: 41 9e 00 40 beq- cr7,ffc0ee34 asr->is_enabled = is_asr_enabled; ffc0edf8: 98 09 00 08 stb r0,8(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0edfc: 7c 00 00 a6 mfmsr r0 ffc0ee00: 7d 70 42 a6 mfsprg r11,0 ffc0ee04: 7c 0b 58 78 andc r11,r0,r11 ffc0ee08: 7d 60 01 24 mtmsr r11 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; ffc0ee0c: 81 69 00 18 lwz r11,24(r9) information->signals_pending = information->signals_posted; ffc0ee10: 81 49 00 14 lwz r10,20(r9) information->signals_posted = _signals; ffc0ee14: 91 69 00 14 stw r11,20(r9) rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; ffc0ee18: 91 49 00 18 stw r10,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ee1c: 7c 00 01 24 mtmsr r0 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { ffc0ee20: 80 09 00 14 lwz r0,20(r9) needs_asr_dispatching = true; ffc0ee24: 39 60 00 01 li r11,1 if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { ffc0ee28: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ee2c: 40 9e 00 08 bne- cr7,ffc0ee34 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; ffc0ee30: 39 60 00 00 li r11,0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { ffc0ee34: 3d 20 00 00 lis r9,0 ffc0ee38: 80 09 27 a8 lwz r0,10152(r9) if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; ffc0ee3c: 38 60 00 00 li r3,0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { ffc0ee40: 2f 80 00 03 cmpwi cr7,r0,3 ffc0ee44: 40 be 00 48 bne+ cr7,ffc0ee8c <== NEVER TAKEN { Thread_Control *executing; executing = _Thread_Executing; if ( are_signals_pending || ffc0ee48: 2f 8b 00 00 cmpwi cr7,r11,0 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; ffc0ee4c: 3d 40 00 00 lis r10,0 ffc0ee50: 39 4a 2d 78 addi r10,r10,11640 ffc0ee54: 81 2a 00 0c lwz r9,12(r10) if ( are_signals_pending || ffc0ee58: 40 9e 00 1c bne- cr7,ffc0ee74 ffc0ee5c: 80 0a 00 10 lwz r0,16(r10) ffc0ee60: 7f 89 00 00 cmpw cr7,r9,r0 ffc0ee64: 41 9e 00 28 beq- cr7,ffc0ee8c (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { ffc0ee68: 88 09 00 74 lbz r0,116(r9) ffc0ee6c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ee70: 41 9e 00 1c beq- cr7,ffc0ee8c <== NEVER TAKEN _Thread_Dispatch_necessary = true; ffc0ee74: 3d 20 00 00 lis r9,0 ffc0ee78: 38 00 00 01 li r0,1 ffc0ee7c: 39 29 2d 78 addi r9,r9,11640 ffc0ee80: 98 09 00 18 stb r0,24(r9) if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); ffc0ee84: 4b ff af 41 bl ffc09dc4 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; ffc0ee88: 38 60 00 00 li r3,0 } ffc0ee8c: 80 01 00 0c lwz r0,12(r1) ffc0ee90: 38 21 00 08 addi r1,r1,8 ffc0ee94: 7c 08 03 a6 mtlr r0 ffc0ee98: 4e 80 00 20 blr =============================================================================== ffc0c500 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { ffc0c500: 94 21 ff e0 stwu r1,-32(r1) ffc0c504: 7c 08 02 a6 mflr r0 ffc0c508: bf c1 00 18 stmw r30,24(r1) register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0c50c: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { ffc0c510: 7c be 2b 78 mr r30,r5 ffc0c514: 90 01 00 24 stw r0,36(r1) register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0c518: 41 82 00 18 beq- ffc0c530 RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); ffc0c51c: 3d 20 00 00 lis r9,0 ffc0c520: 89 29 26 ec lbz r9,9964(r9) !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; ffc0c524: 38 00 00 13 li r0,19 ) { register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0c528: 7f 9f 48 40 cmplw cr7,r31,r9 ffc0c52c: 41 9d 00 6c bgt- cr7,ffc0c598 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) ffc0c530: 2f 9e 00 00 cmpwi cr7,r30,0 return RTEMS_INVALID_ADDRESS; ffc0c534: 38 00 00 09 li r0,9 if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) ffc0c538: 41 9e 00 60 beq- cr7,ffc0c598 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); ffc0c53c: 38 81 00 08 addi r4,r1,8 ffc0c540: 48 00 25 25 bl ffc0ea64 <_Thread_Get> switch ( location ) { ffc0c544: 80 01 00 08 lwz r0,8(r1) ffc0c548: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c54c: 40 9e 00 48 bne- cr7,ffc0c594 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; if ( new_priority != RTEMS_CURRENT_PRIORITY ) { ffc0c550: 2f 9f 00 00 cmpwi cr7,r31,0 the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; ffc0c554: 80 03 00 14 lwz r0,20(r3) ffc0c558: 90 1e 00 00 stw r0,0(r30) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { ffc0c55c: 41 9e 00 2c beq- cr7,ffc0c588 the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || ffc0c560: 80 03 00 1c lwz r0,28(r3) case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; if ( new_priority != RTEMS_CURRENT_PRIORITY ) { the_thread->real_priority = new_priority; ffc0c564: 93 e3 00 18 stw r31,24(r3) if ( the_thread->resource_count == 0 || ffc0c568: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c56c: 41 9e 00 10 beq- cr7,ffc0c57c ffc0c570: 80 03 00 14 lwz r0,20(r3) ffc0c574: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0c578: 40 9d 00 10 ble- cr7,ffc0c588 <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); ffc0c57c: 7f e4 fb 78 mr r4,r31 ffc0c580: 38 a0 00 00 li r5,0 ffc0c584: 48 00 1f 59 bl ffc0e4dc <_Thread_Change_priority> } _Thread_Enable_dispatch(); ffc0c588: 48 00 24 bd bl ffc0ea44 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0c58c: 38 00 00 00 li r0,0 ffc0c590: 48 00 00 08 b ffc0c598 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0c594: 38 00 00 04 li r0,4 } ffc0c598: 39 61 00 20 addi r11,r1,32 ffc0c59c: 7c 03 03 78 mr r3,r0 ffc0c5a0: 4b ff 4b 80 b ffc01120 <_restgpr_30_x> =============================================================================== ffc055fc : } } rtems_status_code rtems_termios_close (void *arg) { ffc055fc: 94 21 ff f0 stwu r1,-16(r1) ffc05600: 7c 08 02 a6 mflr r0 rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain( ffc05604: 38 80 00 00 li r4,0 } } rtems_status_code rtems_termios_close (void *arg) { ffc05608: 90 01 00 14 stw r0,20(r1) rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain( ffc0560c: 38 a0 00 00 li r5,0 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc05610: 81 23 00 00 lwz r9,0(r3) } } rtems_status_code rtems_termios_close (void *arg) { ffc05614: bf c1 00 08 stmw r30,8(r1) ffc05618: 7c 7e 1b 78 mr r30,r3 rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc0561c: 83 e9 00 38 lwz r31,56(r9) rtems_status_code sc; sc = rtems_semaphore_obtain( ffc05620: 3d 20 00 00 lis r9,0 ffc05624: 80 69 27 54 lwz r3,10068(r9) ffc05628: 48 00 21 f1 bl ffc07818 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) ffc0562c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05630: 40 9e 00 a4 bne- cr7,ffc056d4 <== NEVER TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { ffc05634: 81 3f 00 08 lwz r9,8(r31) ffc05638: 38 09 ff ff addi r0,r9,-1 ffc0563c: 2f 80 00 00 cmpwi cr7,r0,0 ffc05640: 90 1f 00 08 stw r0,8(r31) ffc05644: 40 9e 01 64 bne- cr7,ffc057a8 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { ffc05648: 80 1f 00 cc lwz r0,204(r31) ffc0564c: 3d 20 00 00 lis r9,0 ffc05650: 39 29 28 18 addi r9,r9,10264 ffc05654: 54 00 28 34 rlwinm r0,r0,5,0,26 ffc05658: 7d 29 02 14 add r9,r9,r0 ffc0565c: 80 09 00 04 lwz r0,4(r9) ffc05660: 2f 80 00 00 cmpwi cr7,r0,0 ffc05664: 41 9e 00 14 beq- cr7,ffc05678 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); ffc05668: 7f e3 fb 78 mr r3,r31 ffc0566c: 7c 09 03 a6 mtctr r0 ffc05670: 4e 80 04 21 bctrl ffc05674: 48 00 00 2c b ffc056a0 } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc05678: 80 7f 00 18 lwz r3,24(r31) ffc0567c: 38 80 00 00 li r4,0 ffc05680: 38 a0 00 00 li r5,0 ffc05684: 48 00 21 95 bl ffc07818 if (sc != RTEMS_SUCCESSFUL) { ffc05688: 2f 83 00 00 cmpwi cr7,r3,0 ffc0568c: 40 9e 00 48 bne- cr7,ffc056d4 <== NEVER TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); ffc05690: 7f e3 fb 78 mr r3,r31 ffc05694: 4b ff fa dd bl ffc05170 rtems_semaphore_release (tty->osem); ffc05698: 80 7f 00 18 lwz r3,24(r31) ffc0569c: 48 00 22 a5 bl ffc07940 } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc056a0: 80 1f 00 b4 lwz r0,180(r31) ffc056a4: 2f 80 00 02 cmpwi cr7,r0,2 ffc056a8: 40 be 00 30 bne+ cr7,ffc056d8 /* * send "terminate" to I/O tasks */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT ); ffc056ac: 80 7f 00 c4 lwz r3,196(r31) ffc056b0: 38 80 00 01 li r4,1 ffc056b4: 48 00 1c a5 bl ffc07358 if (sc != RTEMS_SUCCESSFUL) ffc056b8: 2f 83 00 00 cmpwi cr7,r3,0 ffc056bc: 40 9e 00 18 bne- cr7,ffc056d4 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); ffc056c0: 80 7f 00 c8 lwz r3,200(r31) ffc056c4: 38 80 00 01 li r4,1 ffc056c8: 48 00 1c 91 bl ffc07358 if (sc != RTEMS_SUCCESSFUL) ffc056cc: 2f 83 00 00 cmpwi cr7,r3,0 ffc056d0: 41 be 00 08 beq+ cr7,ffc056d8 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); ffc056d4: 48 00 28 c1 bl ffc07f94 <== NOT EXECUTED } if (tty->device.lastClose) ffc056d8: 80 1f 00 9c lwz r0,156(r31) ffc056dc: 2f 80 00 00 cmpwi cr7,r0,0 ffc056e0: 41 9e 00 18 beq- cr7,ffc056f8 <== ALWAYS TAKEN (*tty->device.lastClose)(tty->major, tty->minor, arg); ffc056e4: 80 7f 00 0c lwz r3,12(r31) <== NOT EXECUTED ffc056e8: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED ffc056ec: 80 9f 00 10 lwz r4,16(r31) <== NOT EXECUTED ffc056f0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc056f4: 4e 80 04 21 bctrl <== NOT EXECUTED if (tty->forw == NULL) { ffc056f8: 81 7f 00 00 lwz r11,0(r31) ffc056fc: 81 3f 00 04 lwz r9,4(r31) ffc05700: 2f 8b 00 00 cmpwi cr7,r11,0 ffc05704: 40 be 00 1c bne+ cr7,ffc05720 rtems_termios_ttyTail = tty->back; if ( rtems_termios_ttyTail != NULL ) { ffc05708: 2f 89 00 00 cmpwi cr7,r9,0 rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; ffc0570c: 3d 40 00 00 lis r10,0 ffc05710: 91 2a 27 58 stw r9,10072(r10) if ( rtems_termios_ttyTail != NULL ) { ffc05714: 41 9e 00 10 beq- cr7,ffc05724 rtems_termios_ttyTail->forw = NULL; ffc05718: 91 69 00 00 stw r11,0(r9) ffc0571c: 48 00 00 08 b ffc05724 } } else { tty->forw->back = tty->back; ffc05720: 91 2b 00 04 stw r9,4(r11) } if (tty->back == NULL) { ffc05724: 81 7f 00 04 lwz r11,4(r31) ffc05728: 81 3f 00 00 lwz r9,0(r31) ffc0572c: 2f 8b 00 00 cmpwi cr7,r11,0 ffc05730: 40 be 00 1c bne+ cr7,ffc0574c rtems_termios_ttyHead = tty->forw; if ( rtems_termios_ttyHead != NULL ) { ffc05734: 2f 89 00 00 cmpwi cr7,r9,0 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; ffc05738: 3d 40 00 00 lis r10,0 ffc0573c: 91 2a 27 5c stw r9,10076(r10) if ( rtems_termios_ttyHead != NULL ) { ffc05740: 41 9e 00 10 beq- cr7,ffc05750 rtems_termios_ttyHead->back = NULL; ffc05744: 91 69 00 04 stw r11,4(r9) ffc05748: 48 00 00 08 b ffc05750 } } else { tty->back->forw = tty->forw; ffc0574c: 91 2b 00 00 stw r9,0(r11) } rtems_semaphore_delete (tty->isem); ffc05750: 80 7f 00 14 lwz r3,20(r31) ffc05754: 48 00 20 0d bl ffc07760 rtems_semaphore_delete (tty->osem); ffc05758: 80 7f 00 18 lwz r3,24(r31) ffc0575c: 48 00 20 05 bl ffc07760 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); ffc05760: 80 7f 00 8c lwz r3,140(r31) ffc05764: 48 00 1f fd bl ffc07760 if ((tty->device.pollRead == NULL) || ffc05768: 80 1f 00 a0 lwz r0,160(r31) ffc0576c: 2f 80 00 00 cmpwi cr7,r0,0 ffc05770: 41 9e 00 10 beq- cr7,ffc05780 ffc05774: 80 1f 00 b4 lwz r0,180(r31) ffc05778: 2f 80 00 02 cmpwi cr7,r0,2 ffc0577c: 40 be 00 0c bne+ cr7,ffc05788 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); ffc05780: 80 7f 00 68 lwz r3,104(r31) ffc05784: 48 00 1f dd bl ffc07760 free (tty->rawInBuf.theBuf); ffc05788: 80 7f 00 58 lwz r3,88(r31) ffc0578c: 4b ff e9 e9 bl ffc04174 free (tty->rawOutBuf.theBuf); ffc05790: 80 7f 00 7c lwz r3,124(r31) ffc05794: 4b ff e9 e1 bl ffc04174 free (tty->cbuf); ffc05798: 80 7f 00 1c lwz r3,28(r31) ffc0579c: 4b ff e9 d9 bl ffc04174 free (tty); ffc057a0: 7f e3 fb 78 mr r3,r31 ffc057a4: 4b ff e9 d1 bl ffc04174 } rtems_semaphore_release (rtems_termios_ttyMutex); ffc057a8: 3d 20 00 00 lis r9,0 ffc057ac: 80 69 27 54 lwz r3,10068(r9) ffc057b0: 48 00 21 91 bl ffc07940 return RTEMS_SUCCESSFUL; } ffc057b4: 39 61 00 10 addi r11,r1,16 ffc057b8: 38 60 00 00 li r3,0 ffc057bc: 48 00 ea 30 b ffc141ec <_restgpr_30_x> =============================================================================== ffc06d38 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { ffc06d38: 94 21 ff f8 stwu r1,-8(r1) ffc06d3c: 7c 08 02 a6 mflr r0 ffc06d40: 90 01 00 0c stw r0,12(r1) rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; ffc06d44: 80 03 00 90 lwz r0,144(r3) ffc06d48: 7c 00 22 14 add r0,r0,r4 ffc06d4c: 90 03 00 90 stw r0,144(r3) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc06d50: 80 03 00 b4 lwz r0,180(r3) ffc06d54: 2f 80 00 02 cmpwi cr7,r0,2 ffc06d58: 40 be 00 1c bne+ cr7,ffc06d74 /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); ffc06d5c: 80 63 00 c8 lwz r3,200(r3) ffc06d60: 38 80 00 02 li r4,2 ffc06d64: 48 00 05 f5 bl ffc07358 if (sc != RTEMS_SUCCESSFUL) ffc06d68: 2f 83 00 00 cmpwi cr7,r3,0 ffc06d6c: 41 be 00 40 beq+ cr7,ffc06dac <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); ffc06d70: 48 00 12 25 bl ffc07f94 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } if (tty->t_line == PPPDISC ) { ffc06d74: 80 03 00 cc lwz r0,204(r3) ffc06d78: 2f 80 00 05 cmpwi cr7,r0,5 ffc06d7c: 40 9e 00 20 bne- cr7,ffc06d9c /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { ffc06d80: 3d 20 00 00 lis r9,0 ffc06d84: 80 09 28 cc lwz r0,10444(r9) ffc06d88: 2f 80 00 00 cmpwi cr7,r0,0 ffc06d8c: 41 9e 00 20 beq- cr7,ffc06dac <== NEVER TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); ffc06d90: 7c 09 03 a6 mtctr r0 ffc06d94: 4e 80 04 21 bctrl ffc06d98: 48 00 00 14 b ffc06dac } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); } ffc06d9c: 80 01 00 0c lwz r0,12(r1) ffc06da0: 38 21 00 08 addi r1,r1,8 ffc06da4: 7c 08 03 a6 mtlr r0 rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); ffc06da8: 4b ff fd 28 b ffc06ad0 } ffc06dac: 80 01 00 0c lwz r0,12(r1) ffc06db0: 38 60 00 00 li r3,0 ffc06db4: 38 21 00 08 addi r1,r1,8 ffc06db8: 7c 08 03 a6 mtlr r0 ffc06dbc: 4e 80 00 20 blr =============================================================================== ffc06770 : * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { ffc06770: 94 21 ff d0 stwu r1,-48(r1) ffc06774: 7c 08 02 a6 mflr r0 ffc06778: 90 01 00 34 stw r0,52(r1) char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { ffc0677c: 81 23 00 cc lwz r9,204(r3) * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { ffc06780: be c1 00 08 stmw r22,8(r1) char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { ffc06784: 3f c0 00 00 lis r30,0 ffc06788: 3b de 28 18 addi r30,r30,10264 ffc0678c: 55 29 28 34 rlwinm r9,r9,5,0,26 ffc06790: 7d 3e 4a 14 add r9,r30,r9 ffc06794: 80 09 00 10 lwz r0,16(r9) * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { ffc06798: 7c 7f 1b 78 mr r31,r3 ffc0679c: 7c bc 2b 78 mr r28,r5 char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { ffc067a0: 2f 80 00 00 cmpwi cr7,r0,0 ffc067a4: 3b 24 ff ff addi r25,r4,-1 ffc067a8: 40 be 00 3c bne+ cr7,ffc067e4 * NOTE: This routine runs in the context of the * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) ffc067ac: 3b 40 00 00 li r26,0 ffc067b0: 3b c0 00 00 li r30,0 /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); ffc067b4: 3a e3 00 30 addi r23,r3,48 if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, ffc067b8: 3b 03 00 4a addi r24,r3,74 ffc067bc: 48 00 02 70 b ffc06a2c rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); ffc067c0: 81 3f 00 cc lwz r9,204(r31) ffc067c4: 7f e4 fb 78 mr r4,r31 ffc067c8: 8c 79 00 01 lbzu r3,1(r25) ffc067cc: 3b 9c ff ff addi r28,r28,-1 ffc067d0: 55 29 28 34 rlwinm r9,r9,5,0,26 ffc067d4: 7d 3e 4a 14 add r9,r30,r9 ffc067d8: 80 09 00 10 lwz r0,16(r9) ffc067dc: 7c 09 03 a6 mtctr r0 ffc067e0: 4e 80 04 21 bctrl int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { ffc067e4: 2f 9c 00 00 cmpwi cr7,r28,0 ffc067e8: 40 9e ff d8 bne+ cr7,ffc067c0 } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { ffc067ec: 80 1f 00 e4 lwz r0,228(r31) (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); tty->tty_rcvwakeup = 1; } return 0; ffc067f0: 3b c0 00 00 li r30,0 } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { ffc067f4: 2f 80 00 00 cmpwi cr7,r0,0 ffc067f8: 40 9e 02 50 bne- cr7,ffc06a48 <== NEVER TAKEN ffc067fc: 80 1f 00 dc lwz r0,220(r31) (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); tty->tty_rcvwakeup = 1; } return 0; ffc06800: 7f 9e e3 78 mr r30,r28 } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { ffc06804: 2f 80 00 00 cmpwi cr7,r0,0 ffc06808: 41 9e 02 40 beq- cr7,ffc06a48 <== NEVER TAKEN (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); ffc0680c: 7c 09 03 a6 mtctr r0 ffc06810: 38 7f 00 30 addi r3,r31,48 ffc06814: 80 9f 00 e0 lwz r4,224(r31) ffc06818: 4e 80 04 21 bctrl tty->tty_rcvwakeup = 1; ffc0681c: 38 00 00 01 li r0,1 ffc06820: 90 1f 00 e4 stw r0,228(r31) ffc06824: 48 00 02 24 b ffc06a48 while (len--) { c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { ffc06828: 80 1f 00 b8 lwz r0,184(r31) } return 0; } while (len--) { c = *buf++; ffc0682c: 8f 79 00 01 lbzu r27,1(r25) /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { ffc06830: 70 09 02 00 andi. r9,r0,512 ffc06834: 41 82 00 58 beq- ffc0688c /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { ffc06838: 89 3f 00 4a lbz r9,74(r31) ffc0683c: 88 1f 00 49 lbz r0,73(r31) ffc06840: 7f 89 d8 00 cmpw cr7,r9,r27 ffc06844: 40 be 00 30 bne+ cr7,ffc06874 if (c == tty->termios.c_cc[VSTART]) { ffc06848: 54 00 06 3e clrlwi r0,r0,24 ffc0684c: 7f 80 48 00 cmpw cr7,r0,r9 ffc06850: 40 be 00 10 bne+ cr7,ffc06860 <== ALWAYS TAKEN /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; ffc06854: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc06858: 68 00 00 10 xori r0,r0,16 <== NOT EXECUTED ffc0685c: 48 00 00 0c b ffc06868 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; ffc06860: 80 1f 00 b8 lwz r0,184(r31) ffc06864: 60 00 00 10 ori r0,r0,16 ffc06868: 90 1f 00 b8 stw r0,184(r31) * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { ffc0686c: 3b 40 00 01 li r26,1 ffc06870: 48 00 00 24 b ffc06894 /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { ffc06874: 54 00 06 3e clrlwi r0,r0,24 ffc06878: 7f 80 d8 00 cmpw cr7,r0,r27 ffc0687c: 40 be 00 10 bne+ cr7,ffc0688c <== ALWAYS TAKEN /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; ffc06880: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc06884: 54 00 07 34 rlwinm r0,r0,0,28,26 <== NOT EXECUTED ffc06888: 4b ff ff e0 b ffc06868 <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { ffc0688c: 2f 9a 00 00 cmpwi cr7,r26,0 ffc06890: 41 9e 00 5c beq- cr7,ffc068ec <== ALWAYS TAKEN /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { ffc06894: 80 1f 00 b8 lwz r0,184(r31) ffc06898: 54 00 06 b6 rlwinm r0,r0,0,26,27 ffc0689c: 2f 80 00 20 cmpwi cr7,r0,32 ffc068a0: 40 be 01 88 bne+ cr7,ffc06a28 <== ALWAYS TAKEN /* disable interrupts */ rtems_interrupt_disable(level); ffc068a4: 4b ff e8 b9 bl ffc0515c <== NOT EXECUTED ffc068a8: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; ffc068ac: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc068b0: 54 00 06 f2 rlwinm r0,r0,0,27,25 <== NOT EXECUTED ffc068b4: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { ffc068b8: 80 1f 00 94 lwz r0,148(r31) <== NOT EXECUTED ffc068bc: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc068c0: 41 be 00 24 beq+ cr7,ffc068e4 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); ffc068c4: 81 3f 00 84 lwz r9,132(r31) <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)( ffc068c8: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc068cc: 80 9f 00 7c lwz r4,124(r31) <== NOT EXECUTED ffc068d0: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED ffc068d4: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc068d8: 7c 84 4a 14 add r4,r4,r9 <== NOT EXECUTED ffc068dc: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc068e0: 4e 80 04 21 bctrl <== NOT EXECUTED ffc068e4: 7f a0 01 24 mtmsr r29 <== NOT EXECUTED ffc068e8: 48 00 01 40 b ffc06a28 <== NOT EXECUTED } /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; ffc068ec: 83 bf 00 60 lwz r29,96(r31) ffc068f0: 81 3f 00 64 lwz r9,100(r31) ffc068f4: 38 1d 00 01 addi r0,r29,1 ffc068f8: 7f a0 4b 96 divwu r29,r0,r9 ffc068fc: 7f bd 49 d6 mullw r29,r29,r9 ffc06900: 7f bd 00 50 subf r29,r29,r0 /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); ffc06904: 4b ff e8 59 bl ffc0515c ffc06908: 7c 76 1b 78 mr r22,r3 if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) ffc0690c: 80 1f 00 5c lwz r0,92(r31) ffc06910: 81 7f 00 64 lwz r11,100(r31) % tty->rawInBuf.Size) > tty->highwater) && ffc06914: 81 3f 00 64 lwz r9,100(r31) } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) ffc06918: 7c 00 58 50 subf r0,r0,r11 ffc0691c: 7c 00 ea 14 add r0,r0,r29 % tty->rawInBuf.Size) > tty->highwater) && ffc06920: 7d 60 4b 96 divwu r11,r0,r9 ffc06924: 7d 2b 49 d6 mullw r9,r11,r9 } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) ffc06928: 81 7f 00 c0 lwz r11,192(r31) % tty->rawInBuf.Size) > tty->highwater) && ffc0692c: 7c 09 00 50 subf r0,r9,r0 } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) ffc06930: 7f 80 58 40 cmplw cr7,r0,r11 ffc06934: 40 9d 00 a0 ble- cr7,ffc069d4 <== ALWAYS TAKEN % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { ffc06938: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) % tty->rawInBuf.Size) > tty->highwater) && ffc0693c: 70 09 00 01 andi. r9,r0,1 <== NOT EXECUTED ffc06940: 40 82 00 94 bne- ffc069d4 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; ffc06944: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc06948: 60 00 00 01 ori r0,r0,1 <== NOT EXECUTED ffc0694c: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) ffc06950: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc06954: 70 00 04 02 andi. r0,r0,1026 <== NOT EXECUTED ffc06958: 2f 80 04 00 cmpwi cr7,r0,1024 <== NOT EXECUTED ffc0695c: 40 be 00 44 bne+ cr7,ffc069a0 <== NOT EXECUTED == (FL_MDXOF ) ) { if ((tty->flow_ctrl & FL_OSTOP) || ffc06960: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc06964: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED ffc06968: 40 82 00 10 bne- ffc06978 <== NOT EXECUTED ffc0696c: 80 1f 00 94 lwz r0,148(r31) <== NOT EXECUTED ffc06970: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc06974: 40 9e 00 60 bne- cr7,ffc069d4 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; ffc06978: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED (*tty->device.write)(tty->minor, ffc0697c: 7f 04 c3 78 mr r4,r24 <== NOT EXECUTED ffc06980: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc06984: 38 a0 00 01 li r5,1 <== NOT EXECUTED == (FL_MDXOF ) ) { if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; ffc06988: 60 00 00 02 ori r0,r0,2 <== NOT EXECUTED ffc0698c: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED (*tty->device.write)(tty->minor, ffc06990: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED ffc06994: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06998: 4e 80 04 21 bctrl <== NOT EXECUTED ffc0699c: 48 00 00 38 b ffc069d4 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { ffc069a0: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc069a4: 70 00 01 04 andi. r0,r0,260 <== NOT EXECUTED ffc069a8: 2f 80 01 00 cmpwi cr7,r0,256 <== NOT EXECUTED ffc069ac: 40 be 00 28 bne+ cr7,ffc069d4 <== NOT EXECUTED tty->flow_ctrl |= FL_IRTSOFF; ffc069b0: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc069b4: 60 00 00 04 ori r0,r0,4 <== NOT EXECUTED ffc069b8: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { ffc069bc: 80 1f 00 ac lwz r0,172(r31) <== NOT EXECUTED ffc069c0: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc069c4: 41 9e 00 10 beq- cr7,ffc069d4 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); ffc069c8: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc069cc: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc069d0: 4e 80 04 21 bctrl <== NOT EXECUTED ffc069d4: 7e c0 01 24 mtmsr r22 } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { ffc069d8: 80 1f 00 5c lwz r0,92(r31) ffc069dc: 7f 9d 00 00 cmpw cr7,r29,r0 ffc069e0: 40 be 00 0c bne+ cr7,ffc069ec <== ALWAYS TAKEN dropped++; ffc069e4: 3b de 00 01 addi r30,r30,1 <== NOT EXECUTED ffc069e8: 48 00 00 40 b ffc06a28 <== NOT EXECUTED } else { tty->rawInBuf.theBuf[newTail] = c; ffc069ec: 81 3f 00 58 lwz r9,88(r31) ffc069f0: 7f 69 e9 ae stbx r27,r9,r29 tty->rawInBuf.Tail = newTail; /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { ffc069f4: 80 1f 00 e4 lwz r0,228(r31) if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; ffc069f8: 93 bf 00 60 stw r29,96(r31) /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { ffc069fc: 2f 80 00 00 cmpwi cr7,r0,0 ffc06a00: 40 9e 00 28 bne- cr7,ffc06a28 <== NEVER TAKEN ffc06a04: 80 1f 00 dc lwz r0,220(r31) ffc06a08: 2f 80 00 00 cmpwi cr7,r0,0 ffc06a0c: 41 9e 00 1c beq- cr7,ffc06a28 <== ALWAYS TAKEN (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); ffc06a10: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06a14: 7e e3 bb 78 mr r3,r23 <== NOT EXECUTED ffc06a18: 80 9f 00 e0 lwz r4,224(r31) <== NOT EXECUTED ffc06a1c: 4e 80 04 21 bctrl <== NOT EXECUTED tty->tty_rcvwakeup = 1; ffc06a20: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc06a24: 90 1f 00 e4 stw r0,228(r31) <== NOT EXECUTED ffc06a28: 3b 9c ff ff addi r28,r28,-1 tty->tty_rcvwakeup = 1; } return 0; } while (len--) { ffc06a2c: 2f 9c 00 00 cmpwi cr7,r28,0 ffc06a30: 40 9e fd f8 bne+ cr7,ffc06828 } } } } tty->rawInBufDropped += dropped; ffc06a34: 80 1f 00 78 lwz r0,120(r31) rtems_semaphore_release (tty->rawInBuf.Semaphore); ffc06a38: 80 7f 00 68 lwz r3,104(r31) } } } } tty->rawInBufDropped += dropped; ffc06a3c: 7c 00 f2 14 add r0,r0,r30 ffc06a40: 90 1f 00 78 stw r0,120(r31) rtems_semaphore_release (tty->rawInBuf.Semaphore); ffc06a44: 48 00 0e fd bl ffc07940 return dropped; } ffc06a48: 39 61 00 30 addi r11,r1,48 ffc06a4c: 7f c3 f3 78 mr r3,r30 ffc06a50: 48 00 d7 7c b ffc141cc <_restgpr_22_x> =============================================================================== ffc057dc : } } rtems_status_code rtems_termios_ioctl (void *arg) { ffc057dc: 94 21 ff e0 stwu r1,-32(r1) ffc057e0: 7c 08 02 a6 mflr r0 struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc057e4: 38 80 00 00 li r4,0 } } rtems_status_code rtems_termios_ioctl (void *arg) { ffc057e8: 90 01 00 24 stw r0,36(r1) rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; ffc057ec: 38 00 00 00 li r0,0 sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc057f0: 38 a0 00 00 li r5,0 rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc057f4: 81 23 00 00 lwz r9,0(r3) } } rtems_status_code rtems_termios_ioctl (void *arg) { ffc057f8: bf 61 00 0c stmw r27,12(r1) ffc057fc: 7c 7e 1b 78 mr r30,r3 rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc05800: 83 e9 00 38 lwz r31,56(r9) struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; ffc05804: 83 83 00 08 lwz r28,8(r3) rtems_status_code sc; args->ioctl_return = 0; ffc05808: 90 03 00 0c stw r0,12(r3) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc0580c: 80 7f 00 18 lwz r3,24(r31) ffc05810: 48 00 20 09 bl ffc07818 if (sc != RTEMS_SUCCESSFUL) { ffc05814: 7c 7d 1b 79 mr. r29,r3 ffc05818: 40 82 03 90 bne- ffc05ba8 <== NEVER TAKEN args->ioctl_return = sc; return sc; } switch (args->command) { ffc0581c: 80 1e 00 04 lwz r0,4(r30) ffc05820: 2f 80 00 04 cmpwi cr7,r0,4 ffc05824: 41 9e 02 bc beq- cr7,ffc05ae0 ffc05828: 2b 80 00 04 cmplwi cr7,r0,4 ffc0582c: 41 9d 00 20 bgt- cr7,ffc0584c ffc05830: 2f 80 00 02 cmpwi cr7,r0,2 ffc05834: 41 9e 00 a0 beq- cr7,ffc058d4 ffc05838: 2b 80 00 02 cmplwi cr7,r0,2 ffc0583c: 41 9d 02 84 bgt- cr7,ffc05ac0 ffc05840: 2f 80 00 01 cmpwi cr7,r0,1 ffc05844: 40 be 00 44 bne+ cr7,ffc05888 <== NEVER TAKEN ffc05848: 48 00 00 78 b ffc058c0 ffc0584c: 3d 20 40 04 lis r9,16388 ffc05850: 61 29 66 7f ori r9,r9,26239 ffc05854: 7f 80 48 00 cmpw cr7,r0,r9 ffc05858: 41 9e 03 18 beq- cr7,ffc05b70 <== NEVER TAKEN ffc0585c: 7f 80 48 40 cmplw cr7,r0,r9 ffc05860: 41 9d 00 10 bgt- cr7,ffc05870 ffc05864: 2f 80 00 05 cmpwi cr7,r0,5 ffc05868: 40 be 00 20 bne+ cr7,ffc05888 ffc0586c: 48 00 02 60 b ffc05acc ffc05870: 6c 09 40 04 xoris r9,r0,16388 ffc05874: 2f 89 74 1a cmpwi cr7,r9,29722 ffc05878: 41 9e 02 ec beq- cr7,ffc05b64 ffc0587c: 6c 09 80 04 xoris r9,r0,32772 ffc05880: 2f 89 74 1b cmpwi cr7,r9,29723 ffc05884: 41 9e 02 70 beq- cr7,ffc05af4 <== ALWAYS TAKEN default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { ffc05888: 80 1f 00 cc lwz r0,204(r31) ffc0588c: 3d 20 00 00 lis r9,0 ffc05890: 39 29 28 18 addi r9,r9,10264 ffc05894: 54 00 28 34 rlwinm r0,r0,5,0,26 ffc05898: 7d 29 02 14 add r9,r9,r0 ffc0589c: 80 09 00 18 lwz r0,24(r9) sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); } else { sc = RTEMS_INVALID_NUMBER; ffc058a0: 3b a0 00 0a li r29,10 args->ioctl_return = sc; return sc; } switch (args->command) { default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { ffc058a4: 2f 80 00 00 cmpwi cr7,r0,0 ffc058a8: 41 9e 02 f8 beq- cr7,ffc05ba0 <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); ffc058ac: 7f e3 fb 78 mr r3,r31 ffc058b0: 7c 09 03 a6 mtctr r0 ffc058b4: 7f c4 f3 78 mr r4,r30 ffc058b8: 4e 80 04 21 bctrl ffc058bc: 48 00 02 a0 b ffc05b5c sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; ffc058c0: 80 7e 00 08 lwz r3,8(r30) ffc058c4: 38 9f 00 30 addi r4,r31,48 ffc058c8: 38 a0 00 24 li r5,36 ffc058cc: 48 00 a5 a5 bl ffc0fe70 break; ffc058d0: 48 00 02 d0 b ffc05ba0 case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; ffc058d4: 80 9e 00 08 lwz r4,8(r30) ffc058d8: 38 7f 00 30 addi r3,r31,48 ffc058dc: 38 a0 00 24 li r5,36 ffc058e0: 48 00 a5 91 bl ffc0fe70 /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && ffc058e4: 80 1f 00 b8 lwz r0,184(r31) ffc058e8: 70 09 02 00 andi. r9,r0,512 ffc058ec: 41 82 00 70 beq- ffc0595c !(tty->termios.c_iflag & IXON)) { ffc058f0: 80 1f 00 30 lwz r0,48(r31) /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && ffc058f4: 70 0b 04 00 andi. r11,r0,1024 ffc058f8: 40 82 00 64 bne- ffc0595c <== ALWAYS TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); ffc058fc: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED ffc05900: 38 00 fd ef li r0,-529 <== NOT EXECUTED ffc05904: 7d 20 00 38 and r0,r9,r0 <== NOT EXECUTED ffc05908: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { ffc0590c: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc05910: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED ffc05914: 41 a2 00 48 beq+ ffc0595c <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); ffc05918: 4b ff f8 45 bl ffc0515c <== NOT EXECUTED ffc0591c: 7c 7c 1b 78 mr r28,r3 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; ffc05920: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc05924: 54 00 06 f2 rlwinm r0,r0,0,27,25 <== NOT EXECUTED ffc05928: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { ffc0592c: 80 1f 00 94 lwz r0,148(r31) <== NOT EXECUTED ffc05930: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc05934: 41 be 00 24 beq+ cr7,ffc05958 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); ffc05938: 81 3f 00 84 lwz r9,132(r31) <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)( ffc0593c: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc05940: 80 9f 00 7c lwz r4,124(r31) <== NOT EXECUTED ffc05944: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED ffc05948: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc0594c: 7c 84 4a 14 add r4,r4,r9 <== NOT EXECUTED ffc05950: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc05954: 4e 80 04 21 bctrl <== NOT EXECUTED ffc05958: 7f 80 01 24 mtmsr r28 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) { ffc0595c: 80 1f 00 b8 lwz r0,184(r31) ffc05960: 70 09 04 00 andi. r9,r0,1024 ffc05964: 41 82 00 28 beq- ffc0598c ffc05968: 80 1f 00 30 lwz r0,48(r31) ffc0596c: 70 0b 10 00 andi. r11,r0,4096 ffc05970: 40 82 00 1c bne- ffc0598c <== ALWAYS TAKEN /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); ffc05974: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc05978: 54 00 05 a8 rlwinm r0,r0,0,22,20 <== NOT EXECUTED ffc0597c: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); ffc05980: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc05984: 54 00 07 fa rlwinm r0,r0,0,31,29 <== NOT EXECUTED ffc05988: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) { ffc0598c: 80 1f 00 b8 lwz r0,184(r31) ffc05990: 70 09 01 00 andi. r9,r0,256 ffc05994: 41 82 00 4c beq- ffc059e0 ffc05998: 80 1f 00 38 lwz r0,56(r31) ffc0599c: 2f 80 00 00 cmpwi cr7,r0,0 ffc059a0: 41 9c 00 40 blt- cr7,ffc059e0 <== ALWAYS TAKEN /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); ffc059a4: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc059a8: 54 00 06 2c rlwinm r0,r0,0,24,22 <== NOT EXECUTED ffc059ac: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) { ffc059b0: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc059b4: 70 0b 00 04 andi. r11,r0,4 <== NOT EXECUTED ffc059b8: 41 82 00 1c beq- ffc059d4 <== NOT EXECUTED ffc059bc: 80 1f 00 b0 lwz r0,176(r31) <== NOT EXECUTED ffc059c0: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc059c4: 41 9e 00 10 beq- cr7,ffc059d4 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); ffc059c8: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc059cc: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc059d0: 4e 80 04 21 bctrl <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); ffc059d4: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc059d8: 54 00 07 b8 rlwinm r0,r0,0,30,28 <== NOT EXECUTED ffc059dc: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { ffc059e0: 80 1f 00 38 lwz r0,56(r31) ffc059e4: 2f 80 00 00 cmpwi cr7,r0,0 ffc059e8: 40 bc 00 10 bge+ cr7,ffc059f8 tty->flow_ctrl |= FL_MDRTS; ffc059ec: 80 1f 00 b8 lwz r0,184(r31) ffc059f0: 60 00 01 00 ori r0,r0,256 ffc059f4: 90 1f 00 b8 stw r0,184(r31) } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { ffc059f8: 80 1f 00 30 lwz r0,48(r31) ffc059fc: 70 09 10 00 andi. r9,r0,4096 ffc05a00: 41 82 00 10 beq- ffc05a10 tty->flow_ctrl |= FL_MDXOF; ffc05a04: 81 3f 00 b8 lwz r9,184(r31) ffc05a08: 61 29 04 00 ori r9,r9,1024 ffc05a0c: 91 3f 00 b8 stw r9,184(r31) } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { ffc05a10: 70 0b 04 00 andi. r11,r0,1024 ffc05a14: 41 82 00 10 beq- ffc05a24 tty->flow_ctrl |= FL_MDXON; ffc05a18: 80 1f 00 b8 lwz r0,184(r31) ffc05a1c: 60 00 02 00 ori r0,r0,512 ffc05a20: 90 1f 00 b8 stw r0,184(r31) tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { ffc05a24: 83 9f 00 3c lwz r28,60(r31) ffc05a28: 73 9c 00 02 andi. r28,r28,2 ffc05a2c: 41 82 00 0c beq- ffc05a38 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; ffc05a30: 38 00 00 00 li r0,0 ffc05a34: 48 00 00 54 b ffc05a88 tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * ffc05a38: 8b 7f 00 46 lbz r27,70(r31) rtems_clock_get_ticks_per_second() / 10; ffc05a3c: 48 00 16 e9 bl ffc07124 ffc05a40: 38 00 00 0a li r0,10 ffc05a44: 89 3f 00 47 lbz r9,71(r31) if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * ffc05a48: 7f 63 d9 d6 mullw r27,r3,r27 rtems_clock_get_ticks_per_second() / 10; ffc05a4c: 7f 7b 03 96 divwu r27,r27,r0 if (tty->termios.c_cc[VTIME]) { ffc05a50: 88 1f 00 46 lbz r0,70(r31) ffc05a54: 2f 80 00 00 cmpwi cr7,r0,0 if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * ffc05a58: 93 7f 00 54 stw r27,84(r31) rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { ffc05a5c: 41 9e 00 24 beq- cr7,ffc05a80 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) ffc05a60: 71 20 00 ff andi. r0,r9,255 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; ffc05a64: 93 9f 00 6c stw r28,108(r31) tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; ffc05a68: 93 7f 00 70 stw r27,112(r31) if (tty->termios.c_cc[VMIN]) ffc05a6c: 41 82 00 0c beq- ffc05a78 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; ffc05a70: 93 9f 00 74 stw r28,116(r31) ffc05a74: 48 00 00 2c b ffc05aa0 else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; ffc05a78: 93 7f 00 74 stw r27,116(r31) ffc05a7c: 48 00 00 24 b ffc05aa0 } else { if (tty->termios.c_cc[VMIN]) { ffc05a80: 71 2b 00 ff andi. r11,r9,255 ffc05a84: 41 82 00 14 beq- ffc05a98 <== ALWAYS TAKEN tty->rawInBufSemaphoreOptions = RTEMS_WAIT; ffc05a88: 90 1f 00 6c stw r0,108(r31) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; ffc05a8c: 90 1f 00 70 stw r0,112(r31) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; ffc05a90: 90 1f 00 74 stw r0,116(r31) ffc05a94: 48 00 00 0c b ffc05aa0 } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; ffc05a98: 38 00 00 01 li r0,1 ffc05a9c: 90 1f 00 6c stw r0,108(r31) } } } if (tty->device.setAttributes) ffc05aa0: 80 1f 00 a8 lwz r0,168(r31) ffc05aa4: 2f 80 00 00 cmpwi cr7,r0,0 ffc05aa8: 41 9e 00 f8 beq- cr7,ffc05ba0 <== NEVER TAKEN (*tty->device.setAttributes)(tty->minor, &tty->termios); ffc05aac: 80 7f 00 10 lwz r3,16(r31) ffc05ab0: 38 9f 00 30 addi r4,r31,48 ffc05ab4: 7c 09 03 a6 mtctr r0 ffc05ab8: 4e 80 04 21 bctrl ffc05abc: 48 00 00 e4 b ffc05ba0 break; case RTEMS_IO_TCDRAIN: drainOutput (tty); ffc05ac0: 7f e3 fb 78 mr r3,r31 ffc05ac4: 4b ff f6 ad bl ffc05170 break; ffc05ac8: 48 00 00 d8 b ffc05ba0 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; ffc05acc: 81 3c 00 00 lwz r9,0(r28) ffc05ad0: 81 5c 00 04 lwz r10,4(r28) ffc05ad4: 91 3f 00 d4 stw r9,212(r31) ffc05ad8: 91 5f 00 d8 stw r10,216(r31) break; ffc05adc: 48 00 00 c4 b ffc05ba0 case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; ffc05ae0: 81 3c 00 00 lwz r9,0(r28) ffc05ae4: 81 5c 00 04 lwz r10,4(r28) ffc05ae8: 91 3f 00 dc stw r9,220(r31) ffc05aec: 91 5f 00 e0 stw r10,224(r31) break; ffc05af0: 48 00 00 b0 b ffc05ba0 #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { ffc05af4: 80 1f 00 cc lwz r0,204(r31) ffc05af8: 3d 20 00 00 lis r9,0 ffc05afc: 39 29 28 18 addi r9,r9,10264 ffc05b00: 54 00 28 34 rlwinm r0,r0,5,0,26 ffc05b04: 7d 29 02 14 add r9,r9,r0 ffc05b08: 80 09 00 04 lwz r0,4(r9) ffc05b0c: 2f 80 00 00 cmpwi cr7,r0,0 ffc05b10: 41 9e 00 14 beq- cr7,ffc05b24 sc = rtems_termios_linesw[tty->t_line].l_close(tty); ffc05b14: 7f e3 fb 78 mr r3,r31 ffc05b18: 7c 09 03 a6 mtctr r0 ffc05b1c: 4e 80 04 21 bctrl ffc05b20: 7c 7d 1b 78 mr r29,r3 } tty->t_line=*(int*)(args->buffer); ffc05b24: 81 3e 00 08 lwz r9,8(r30) ffc05b28: 80 09 00 00 lwz r0,0(r9) tty->t_sc = NULL; /* ensure that no more valid data */ ffc05b2c: 39 20 00 00 li r9,0 ffc05b30: 91 3f 00 d0 stw r9,208(r31) /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { ffc05b34: 3d 20 00 00 lis r9,0 ffc05b38: 39 29 28 18 addi r9,r9,10264 * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); ffc05b3c: 90 1f 00 cc stw r0,204(r31) tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { ffc05b40: 54 00 28 34 rlwinm r0,r0,5,0,26 ffc05b44: 7c 09 00 2e lwzx r0,r9,r0 ffc05b48: 2f 80 00 00 cmpwi cr7,r0,0 ffc05b4c: 41 9e 00 54 beq- cr7,ffc05ba0 <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_open(tty); ffc05b50: 7f e3 fb 78 mr r3,r31 ffc05b54: 7c 09 03 a6 mtctr r0 ffc05b58: 4e 80 04 21 bctrl ffc05b5c: 7c 7d 1b 78 mr r29,r3 ffc05b60: 48 00 00 40 b ffc05ba0 } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; ffc05b64: 81 3e 00 08 lwz r9,8(r30) ffc05b68: 80 1f 00 cc lwz r0,204(r31) ffc05b6c: 48 00 00 30 b ffc05b9c break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; ffc05b70: 81 3f 00 60 lwz r9,96(r31) <== NOT EXECUTED ffc05b74: 80 1f 00 5c lwz r0,92(r31) <== NOT EXECUTED if ( rawnc < 0 ) ffc05b78: 7c 00 48 51 subf. r0,r0,r9 <== NOT EXECUTED ffc05b7c: 40 a0 00 0c bge+ ffc05b88 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; ffc05b80: 81 3f 00 64 lwz r9,100(r31) <== NOT EXECUTED ffc05b84: 7c 00 4a 14 add r0,r0,r9 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; ffc05b88: 81 5f 00 20 lwz r10,32(r31) <== NOT EXECUTED ffc05b8c: 81 7f 00 24 lwz r11,36(r31) <== NOT EXECUTED ffc05b90: 81 3e 00 08 lwz r9,8(r30) <== NOT EXECUTED ffc05b94: 7d 6b 50 50 subf r11,r11,r10 <== NOT EXECUTED ffc05b98: 7c 0b 02 14 add r0,r11,r0 <== NOT EXECUTED ffc05b9c: 90 09 00 00 stw r0,0(r9) } break; } rtems_semaphore_release (tty->osem); ffc05ba0: 80 7f 00 18 lwz r3,24(r31) ffc05ba4: 48 00 1d 9d bl ffc07940 args->ioctl_return = sc; return sc; } ffc05ba8: 39 61 00 20 addi r11,r1,32 } break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; ffc05bac: 93 be 00 0c stw r29,12(r30) return sc; } ffc05bb0: 7f a3 eb 78 mr r3,r29 ffc05bb4: 48 00 e6 2c b ffc141e0 <_restgpr_27_x> =============================================================================== ffc051e0 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc051e0: 94 21 ff c8 stwu r1,-56(r1) struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( ffc051e4: 3d 20 00 00 lis r9,0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc051e8: 7c 08 02 a6 mflr r0 ffc051ec: be a1 00 0c stmw r21,12(r1) ffc051f0: 7c 7b 1b 78 mr r27,r3 ffc051f4: 7c 9a 23 78 mr r26,r4 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( ffc051f8: 80 69 27 54 lwz r3,10068(r9) rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc051fc: 7c b9 2b 78 mr r25,r5 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( ffc05200: 38 80 00 00 li r4,0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc05204: 90 01 00 3c stw r0,60(r1) struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( ffc05208: 38 a0 00 00 li r5,0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc0520c: 7c d8 33 78 mr r24,r6 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( ffc05210: 48 00 26 09 bl ffc07818 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) ffc05214: 7c 7d 1b 79 mr. r29,r3 ffc05218: 40 82 03 b8 bne- ffc055d0 <== NEVER TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { ffc0521c: 3d 20 00 00 lis r9,0 ffc05220: 83 89 27 5c lwz r28,10076(r9) ffc05224: 7f 9e e3 78 mr r30,r28 ffc05228: 48 00 00 20 b ffc05248 if ((tty->major == major) && (tty->minor == minor)) ffc0522c: 80 1e 00 0c lwz r0,12(r30) ffc05230: 7f 80 d8 00 cmpw cr7,r0,r27 ffc05234: 40 be 00 10 bne+ cr7,ffc05244 ffc05238: 80 1e 00 10 lwz r0,16(r30) ffc0523c: 7f 80 d0 00 cmpw cr7,r0,r26 ffc05240: 41 9e 03 00 beq- cr7,ffc05540 <== ALWAYS TAKEN sc = rtems_semaphore_obtain( rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { ffc05244: 83 de 00 00 lwz r30,0(r30) ffc05248: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0524c: 40 9e ff e0 bne+ cr7,ffc0522c ffc05250: 48 00 03 8c b ffc055dc return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; ffc05254: 3d 20 00 00 lis r9,0 ffc05258: 80 09 21 78 lwz r0,8568(r9) ffc0525c: 3a a9 21 78 addi r21,r9,8568 ffc05260: 90 1e 00 64 stw r0,100(r30) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); ffc05264: 80 7e 00 64 lwz r3,100(r30) ffc05268: 4b ff f2 a9 bl ffc04510 if (tty->rawInBuf.theBuf == NULL) { ffc0526c: 2f 83 00 00 cmpwi cr7,r3,0 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); ffc05270: 90 7e 00 58 stw r3,88(r30) ffc05274: 7c 77 1b 78 mr r23,r3 if (tty->rawInBuf.theBuf == NULL) { ffc05278: 40 be 00 20 bne+ cr7,ffc05298 free(tty); ffc0527c: 7f c3 f3 78 mr r3,r30 ffc05280: 4b ff ee f5 bl ffc04174 rtems_semaphore_release (rtems_termios_ttyMutex); ffc05284: 3d 20 00 00 lis r9,0 ffc05288: 80 69 27 54 lwz r3,10068(r9) return RTEMS_NO_MEMORY; ffc0528c: 3b a0 00 1a li r29,26 */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); ffc05290: 48 00 26 b1 bl ffc07940 return RTEMS_NO_MEMORY; ffc05294: 48 00 03 3c b ffc055d0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; ffc05298: 80 15 00 04 lwz r0,4(r21) ffc0529c: 90 1e 00 88 stw r0,136(r30) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); ffc052a0: 80 7e 00 88 lwz r3,136(r30) ffc052a4: 4b ff f2 6d bl ffc04510 if (tty->rawOutBuf.theBuf == NULL) { ffc052a8: 2f 83 00 00 cmpwi cr7,r3,0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); ffc052ac: 90 7e 00 7c stw r3,124(r30) ffc052b0: 7c 76 1b 78 mr r22,r3 if (tty->rawOutBuf.theBuf == NULL) { ffc052b4: 41 9e 00 20 beq- cr7,ffc052d4 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); ffc052b8: 80 75 00 08 lwz r3,8(r21) ffc052bc: 4b ff f2 55 bl ffc04510 if (tty->cbuf == NULL) { ffc052c0: 2f 83 00 00 cmpwi cr7,r3,0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); ffc052c4: 90 7e 00 1c stw r3,28(r30) if (tty->cbuf == NULL) { ffc052c8: 40 be 00 18 bne+ cr7,ffc052e0 <== ALWAYS TAKEN free((void *)(tty->rawOutBuf.theBuf)); ffc052cc: 7e c3 b3 78 mr r3,r22 <== NOT EXECUTED ffc052d0: 4b ff ee a5 bl ffc04174 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); ffc052d4: 7e e3 bb 78 mr r3,r23 ffc052d8: 4b ff ee 9d bl ffc04174 ffc052dc: 4b ff ff a0 b ffc0527c /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) ffc052e0: 2f 9c 00 00 cmpwi cr7,r28,0 tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; ffc052e4: 93 9e 00 00 stw r28,0(r30) return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; ffc052e8: 38 00 00 00 li r0,0 ffc052ec: 90 1e 00 d4 stw r0,212(r30) tty->tty_snd.sw_arg = NULL; ffc052f0: 90 1e 00 d8 stw r0,216(r30) tty->tty_rcv.sw_pfn = NULL; ffc052f4: 90 1e 00 dc stw r0,220(r30) tty->tty_rcv.sw_arg = NULL; ffc052f8: 90 1e 00 e0 stw r0,224(r30) tty->tty_rcvwakeup = 0; ffc052fc: 90 1e 00 e4 stw r0,228(r30) /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; ffc05300: 90 1e 00 04 stw r0,4(r30) if (rtems_termios_ttyHead != NULL) ffc05304: 41 9e 00 08 beq- cr7,ffc0530c rtems_termios_ttyHead->back = tty; ffc05308: 93 dc 00 04 stw r30,4(r28) rtems_termios_ttyHead = tty; ffc0530c: 3d 20 00 00 lis r9,0 ffc05310: 93 e9 27 5c stw r31,10076(r9) if (rtems_termios_ttyTail == NULL) ffc05314: 3d 20 00 00 lis r9,0 ffc05318: 80 09 27 58 lwz r0,10072(r9) ffc0531c: 2f 80 00 00 cmpwi cr7,r0,0 ffc05320: 40 be 00 08 bne+ cr7,ffc05328 rtems_termios_ttyTail = tty; ffc05324: 93 e9 27 58 stw r31,10072(r9) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'i', c), ffc05328: 3f 80 00 00 lis r28,0 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; ffc0532c: 93 5f 00 10 stw r26,16(r31) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'i', c), ffc05330: 3b 9c 21 78 addi r28,r28,8568 ffc05334: 88 7c 00 0c lbz r3,12(r28) tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( ffc05338: 38 80 00 01 li r4,1 rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; tty->major = major; ffc0533c: 93 7f 00 0c stw r27,12(r31) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( ffc05340: 38 a0 00 54 li r5,84 ffc05344: 64 63 54 52 oris r3,r3,21586 ffc05348: 60 63 69 00 ori r3,r3,26880 ffc0534c: 38 c0 00 00 li r6,0 ffc05350: 38 ff 00 14 addi r7,r31,20 ffc05354: 48 00 22 45 bl ffc07598 rtems_build_name ('T', 'R', 'i', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) ffc05358: 2f 83 00 00 cmpwi cr7,r3,0 ffc0535c: 40 9e 02 64 bne- cr7,ffc055c0 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'o', c), ffc05360: 88 7c 00 0c lbz r3,12(r28) RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( ffc05364: 38 80 00 01 li r4,1 ffc05368: 38 a0 00 54 li r5,84 ffc0536c: 64 63 54 52 oris r3,r3,21586 ffc05370: 60 63 6f 00 ori r3,r3,28416 ffc05374: 38 c0 00 00 li r6,0 ffc05378: 38 ff 00 18 addi r7,r31,24 ffc0537c: 48 00 22 1d bl ffc07598 rtems_build_name ('T', 'R', 'o', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) ffc05380: 2f 83 00 00 cmpwi cr7,r3,0 ffc05384: 40 9e 02 3c bne- cr7,ffc055c0 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'x', c), ffc05388: 88 7c 00 0c lbz r3,12(r28) RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( ffc0538c: 38 80 00 00 li r4,0 ffc05390: 38 a0 00 20 li r5,32 ffc05394: 64 63 54 52 oris r3,r3,21586 ffc05398: 60 63 78 00 ori r3,r3,30720 ffc0539c: 38 c0 00 00 li r6,0 ffc053a0: 38 ff 00 8c addi r7,r31,140 ffc053a4: 48 00 21 f5 bl ffc07598 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) ffc053a8: 7c 60 1b 79 mr. r0,r3 ffc053ac: 40 82 02 14 bne- ffc055c0 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; ffc053b0: 38 9f 00 98 addi r4,r31,152 RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; ffc053b4: 90 1f 00 94 stw r0,148(r31) /* * Set callbacks */ tty->device = *callbacks; ffc053b8: 7c b8 04 aa lswi r5,r24,32 ffc053bc: 7c a4 05 aa stswi r5,r4,32 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc053c0: 80 1f 00 b4 lwz r0,180(r31) ffc053c4: 2f 80 00 02 cmpwi cr7,r0,2 ffc053c8: 40 be 00 5c bne+ cr7,ffc05424 sc = rtems_task_create ( rtems_build_name ('T', 'x', 'T', c), ffc053cc: 88 7c 00 0c lbz r3,12(r28) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( ffc053d0: 38 80 00 0a li r4,10 ffc053d4: 38 a0 04 00 li r5,1024 ffc053d8: 64 63 54 78 oris r3,r3,21624 ffc053dc: 60 63 54 00 ori r3,r3,21504 ffc053e0: 38 c0 05 00 li r6,1280 ffc053e4: 38 e0 00 00 li r7,0 ffc053e8: 39 1f 00 c8 addi r8,r31,200 ffc053ec: 48 00 26 15 bl ffc07a00 TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) ffc053f0: 2f 83 00 00 cmpwi cr7,r3,0 ffc053f4: 40 9e 01 cc bne- cr7,ffc055c0 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_task_create ( rtems_build_name ('R', 'x', 'T', c), ffc053f8: 88 7c 00 0c lbz r3,12(r28) RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_task_create ( ffc053fc: 38 80 00 09 li r4,9 ffc05400: 38 a0 04 00 li r5,1024 ffc05404: 64 63 52 78 oris r3,r3,21112 ffc05408: 60 63 54 00 ori r3,r3,21504 ffc0540c: 38 c0 05 00 li r6,1280 ffc05410: 38 e0 00 00 li r7,0 ffc05414: 39 1f 00 c4 addi r8,r31,196 ffc05418: 48 00 25 e9 bl ffc07a00 TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) ffc0541c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05420: 40 9e 01 a0 bne- cr7,ffc055c0 <== NEVER TAKEN rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || ffc05424: 80 1f 00 a0 lwz r0,160(r31) ffc05428: 2f 80 00 00 cmpwi cr7,r0,0 ffc0542c: 41 9e 00 10 beq- cr7,ffc0543c ffc05430: 80 1f 00 b4 lwz r0,180(r31) ffc05434: 2f 80 00 02 cmpwi cr7,r0,2 ffc05438: 40 be 00 30 bne+ cr7,ffc05468 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'r', c), ffc0543c: 3d 20 00 00 lis r9,0 ffc05440: 88 69 21 84 lbz r3,8580(r9) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( ffc05444: 38 80 00 00 li r4,0 ffc05448: 38 a0 00 24 li r5,36 ffc0544c: 64 63 54 52 oris r3,r3,21586 ffc05450: 60 63 72 00 ori r3,r3,29184 ffc05454: 38 c0 00 00 li r6,0 ffc05458: 38 ff 00 68 addi r7,r31,104 ffc0545c: 48 00 21 3d bl ffc07598 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) ffc05460: 2f 83 00 00 cmpwi cr7,r3,0 ffc05464: 40 9e 01 5c bne- cr7,ffc055c0 <== NEVER TAKEN } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; ffc05468: 38 00 25 02 li r0,9474 ffc0546c: 90 1f 00 30 stw r0,48(r31) tty->termios.c_oflag = OPOST | ONLCR | XTABS; ffc05470: 38 00 18 05 li r0,6149 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') ffc05474: 3d 20 00 00 lis r9,0 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; ffc05478: 90 1f 00 34 stw r0,52(r31) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; ffc0547c: 38 00 08 bd li r0,2237 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') ffc05480: 39 29 21 78 addi r9,r9,8568 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; ffc05484: 90 1f 00 38 stw r0,56(r31) tty->termios.c_lflag = ffc05488: 38 00 00 00 li r0,0 ffc0548c: 60 00 82 3b ori r0,r0,33339 ffc05490: 90 1f 00 3c stw r0,60(r31) ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; ffc05494: 38 00 00 03 li r0,3 ffc05498: 98 1f 00 41 stb r0,65(r31) tty->termios.c_cc[VQUIT] = '\034'; ffc0549c: 38 00 00 1c li r0,28 ffc054a0: 98 1f 00 42 stb r0,66(r31) tty->termios.c_cc[VERASE] = '\177'; ffc054a4: 38 00 00 7f li r0,127 ffc054a8: 98 1f 00 43 stb r0,67(r31) tty->termios.c_cc[VKILL] = '\025'; ffc054ac: 38 00 00 15 li r0,21 ffc054b0: 98 1f 00 44 stb r0,68(r31) tty->termios.c_cc[VEOF] = '\004'; ffc054b4: 38 00 00 04 li r0,4 ffc054b8: 98 1f 00 45 stb r0,69(r31) tty->termios.c_cc[VEOL] = '\000'; ffc054bc: 38 00 00 00 li r0,0 ffc054c0: 98 1f 00 4c stb r0,76(r31) tty->termios.c_cc[VEOL2] = '\000'; ffc054c4: 98 1f 00 51 stb r0,81(r31) tty->termios.c_cc[VSTART] = '\021'; ffc054c8: 38 00 00 11 li r0,17 ffc054cc: 98 1f 00 49 stb r0,73(r31) tty->termios.c_cc[VSTOP] = '\023'; ffc054d0: 38 00 00 13 li r0,19 ffc054d4: 98 1f 00 4a stb r0,74(r31) tty->termios.c_cc[VSUSP] = '\032'; ffc054d8: 38 00 00 1a li r0,26 ffc054dc: 98 1f 00 4b stb r0,75(r31) tty->termios.c_cc[VREPRINT] = '\022'; ffc054e0: 38 00 00 12 li r0,18 ffc054e4: 98 1f 00 4d stb r0,77(r31) tty->termios.c_cc[VDISCARD] = '\017'; ffc054e8: 38 00 00 0f li r0,15 ffc054ec: 98 1f 00 4e stb r0,78(r31) tty->termios.c_cc[VWERASE] = '\027'; ffc054f0: 38 00 00 17 li r0,23 ffc054f4: 98 1f 00 4f stb r0,79(r31) tty->termios.c_cc[VLNEXT] = '\026'; ffc054f8: 38 00 00 16 li r0,22 ffc054fc: 98 1f 00 50 stb r0,80(r31) /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; ffc05500: 38 00 00 00 li r0,0 ffc05504: 90 1f 00 b8 stw r0,184(r31) /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; ffc05508: 80 1f 00 64 lwz r0,100(r31) tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') ffc0550c: 89 69 00 0c lbz r11,12(r9) /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; ffc05510: 54 00 f8 7e rlwinm r0,r0,31,1,31 ffc05514: 90 1f 00 bc stw r0,188(r31) tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') ffc05518: 2f 8b 00 7a cmpwi cr7,r11,122 tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; ffc0551c: 80 1f 00 64 lwz r0,100(r31) ffc05520: 1c 00 00 03 mulli r0,r0,3 ffc05524: 54 00 f0 be rlwinm r0,r0,30,2,31 ffc05528: 90 1f 00 c0 stw r0,192(r31) /* * Bump name characer */ if (c++ == 'z') ffc0552c: 38 0b 00 01 addi r0,r11,1 ffc05530: 98 09 00 0c stb r0,12(r9) ffc05534: 40 be 00 0c bne+ cr7,ffc05540 c = 'a'; ffc05538: 38 00 00 61 li r0,97 ffc0553c: 98 09 00 0c stb r0,12(r9) } args->iop->data1 = tty; ffc05540: 81 39 00 00 lwz r9,0(r25) ffc05544: 93 c9 00 38 stw r30,56(r9) if (!tty->refcount++) { ffc05548: 81 3e 00 08 lwz r9,8(r30) ffc0554c: 2f 89 00 00 cmpwi cr7,r9,0 ffc05550: 38 09 00 01 addi r0,r9,1 ffc05554: 90 1e 00 08 stw r0,8(r30) ffc05558: 40 9e 00 6c bne- cr7,ffc055c4 if (tty->device.firstOpen) ffc0555c: 80 1e 00 98 lwz r0,152(r30) ffc05560: 2f 80 00 00 cmpwi cr7,r0,0 ffc05564: 41 9e 00 18 beq- cr7,ffc0557c <== ALWAYS TAKEN (*tty->device.firstOpen)(major, minor, arg); ffc05568: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc0556c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc05570: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED ffc05574: 7f 25 cb 78 mr r5,r25 <== NOT EXECUTED ffc05578: 4e 80 04 21 bctrl <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc0557c: 80 1e 00 b4 lwz r0,180(r30) ffc05580: 2f 80 00 02 cmpwi cr7,r0,2 ffc05584: 40 be 00 40 bne+ cr7,ffc055c4 sc = rtems_task_start( ffc05588: 80 7e 00 c4 lwz r3,196(r30) ffc0558c: 3c 80 ff c0 lis r4,-64 ffc05590: 38 84 6a 54 addi r4,r4,27220 ffc05594: 7f c5 f3 78 mr r5,r30 ffc05598: 48 00 27 31 bl ffc07cc8 tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) ffc0559c: 2f 83 00 00 cmpwi cr7,r3,0 ffc055a0: 40 9e 00 20 bne- cr7,ffc055c0 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_task_start( ffc055a4: 80 7e 00 c8 lwz r3,200(r30) ffc055a8: 3c 80 ff c0 lis r4,-64 ffc055ac: 38 84 6c b8 addi r4,r4,27832 ffc055b0: 7f c5 f3 78 mr r5,r30 ffc055b4: 48 00 27 15 bl ffc07cc8 tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) ffc055b8: 2f 83 00 00 cmpwi cr7,r3,0 ffc055bc: 41 be 00 08 beq+ cr7,ffc055c4 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); ffc055c0: 48 00 29 d5 bl ffc07f94 } } rtems_semaphore_release (rtems_termios_ttyMutex); ffc055c4: 3d 20 00 00 lis r9,0 ffc055c8: 80 69 27 54 lwz r3,10068(r9) ffc055cc: 48 00 23 75 bl ffc07940 return RTEMS_SUCCESSFUL; } ffc055d0: 39 61 00 38 addi r11,r1,56 ffc055d4: 7f a3 eb 78 mr r3,r29 ffc055d8: 48 00 eb f0 b ffc141c8 <_restgpr_21_x> static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); ffc055dc: 38 60 00 01 li r3,1 ffc055e0: 38 80 00 e8 li r4,232 ffc055e4: 4b ff e9 89 bl ffc03f6c if (tty == NULL) { ffc055e8: 2f 83 00 00 cmpwi cr7,r3,0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); ffc055ec: 7c 7e 1b 78 mr r30,r3 ffc055f0: 7c 7f 1b 78 mr r31,r3 if (tty == NULL) { ffc055f4: 40 9e fc 60 bne+ cr7,ffc05254 ffc055f8: 4b ff fc 8c b ffc05284 =============================================================================== ffc05bb8 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { ffc05bb8: 94 21 ff d8 stwu r1,-40(r1) ffc05bbc: 7c 08 02 a6 mflr r0 ffc05bc0: 90 01 00 2c stw r0,44(r1) const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { ffc05bc4: 80 05 00 b4 lwz r0,180(r5) * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { ffc05bc8: bf 21 00 0c stmw r25,12(r1) ffc05bcc: 7c 7b 1b 78 mr r27,r3 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { ffc05bd0: 2f 80 00 00 cmpwi cr7,r0,0 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { ffc05bd4: 7c 9d 23 78 mr r29,r4 ffc05bd8: 7c bf 2b 78 mr r31,r5 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { ffc05bdc: 40 be 00 20 bne+ cr7,ffc05bfc (*tty->device.write)(tty->minor, (void *)buf, len); ffc05be0: 80 05 00 a4 lwz r0,164(r5) ffc05be4: 7f 64 db 78 mr r4,r27 ffc05be8: 80 65 00 10 lwz r3,16(r5) ffc05bec: 7f a5 eb 78 mr r5,r29 ffc05bf0: 7c 09 03 a6 mtctr r0 ffc05bf4: 4e 80 04 21 bctrl return; ffc05bf8: 48 00 00 e0 b ffc05cd8 } newHead = tty->rawOutBuf.Head; ffc05bfc: 83 c5 00 80 lwz r30,128(r5) /* * Send characters to device-specific code */ void rtems_termios_puts ( ffc05c00: 3b 63 ff ff addi r27,r3,-1 * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; ffc05c04: 3b 20 00 02 li r25,2 (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; ffc05c08: 3b 40 00 01 li r26,1 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { ffc05c0c: 48 00 00 c4 b ffc05cd0 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; ffc05c10: 80 1f 00 88 lwz r0,136(r31) ffc05c14: 3b de 00 01 addi r30,r30,1 ffc05c18: 7d 3e 03 96 divwu r9,r30,r0 ffc05c1c: 7c 09 01 d6 mullw r0,r9,r0 ffc05c20: 7f c0 f0 50 subf r30,r0,r30 rtems_interrupt_disable (level); ffc05c24: 4b ff f5 39 bl ffc0515c ffc05c28: 7c 7c 1b 78 mr r28,r3 while (newHead == tty->rawOutBuf.Tail) { ffc05c2c: 48 00 00 30 b ffc05c5c tty->rawOutBufState = rob_wait; ffc05c30: 93 3f 00 94 stw r25,148(r31) ffc05c34: 7f 80 01 24 mtmsr r28 rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( ffc05c38: 80 7f 00 8c lwz r3,140(r31) ffc05c3c: 38 80 00 00 li r4,0 ffc05c40: 38 a0 00 00 li r5,0 ffc05c44: 48 00 1b d5 bl ffc07818 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) ffc05c48: 2f 83 00 00 cmpwi cr7,r3,0 ffc05c4c: 41 be 00 08 beq+ cr7,ffc05c54 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); ffc05c50: 48 00 23 45 bl ffc07f94 <== NOT EXECUTED rtems_interrupt_disable (level); ffc05c54: 4b ff f5 09 bl ffc0515c ffc05c58: 7c 7c 1b 78 mr r28,r3 * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { ffc05c5c: 80 1f 00 84 lwz r0,132(r31) ffc05c60: 7f 9e 00 00 cmpw cr7,r30,r0 ffc05c64: 41 9e ff cc beq+ cr7,ffc05c30 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; ffc05c68: 80 1f 00 80 lwz r0,128(r31) ffc05c6c: 8d 7b 00 01 lbzu r11,1(r27) ffc05c70: 81 3f 00 7c lwz r9,124(r31) ffc05c74: 7d 69 01 ae stbx r11,r9,r0 tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { ffc05c78: 80 1f 00 94 lwz r0,148(r31) if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; ffc05c7c: 93 df 00 80 stw r30,128(r31) if (tty->rawOutBufState == rob_idle) { ffc05c80: 2f 80 00 00 cmpwi cr7,r0,0 ffc05c84: 40 9e 00 44 bne- cr7,ffc05cc8 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { ffc05c88: 80 1f 00 b8 lwz r0,184(r31) ffc05c8c: 70 09 00 10 andi. r9,r0,16 ffc05c90: 40 a2 00 28 bne+ ffc05cb8 <== NEVER TAKEN (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); ffc05c94: 81 3f 00 84 lwz r9,132(r31) tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, ffc05c98: 38 a0 00 01 li r5,1 ffc05c9c: 80 9f 00 7c lwz r4,124(r31) ffc05ca0: 80 1f 00 a4 lwz r0,164(r31) ffc05ca4: 80 7f 00 10 lwz r3,16(r31) ffc05ca8: 7c 84 4a 14 add r4,r4,r9 ffc05cac: 7c 09 03 a6 mtctr r0 ffc05cb0: 4e 80 04 21 bctrl ffc05cb4: 48 00 00 10 b ffc05cc4 (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; ffc05cb8: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc05cbc: 60 00 00 20 ori r0,r0,32 <== NOT EXECUTED ffc05cc0: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; ffc05cc4: 93 5f 00 94 stw r26,148(r31) ffc05cc8: 7f 80 01 24 mtmsr r28 } rtems_interrupt_enable (level); len--; ffc05ccc: 3b bd ff ff addi r29,r29,-1 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { ffc05cd0: 2f 9d 00 00 cmpwi cr7,r29,0 ffc05cd4: 40 9e ff 3c bne+ cr7,ffc05c10 tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } ffc05cd8: 39 61 00 28 addi r11,r1,40 ffc05cdc: 48 00 e4 fc b ffc141d8 <_restgpr_25_x> =============================================================================== ffc063cc : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc063cc: 94 21 ff d0 stwu r1,-48(r1) ffc063d0: 7c 08 02 a6 mflr r0 struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc063d4: 38 80 00 00 li r4,0 return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc063d8: 90 01 00 34 stw r0,52(r1) struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc063dc: 38 a0 00 00 li r5,0 rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc063e0: 81 23 00 00 lwz r9,0(r3) return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc063e4: be e1 00 0c stmw r23,12(r1) ffc063e8: 7c 7e 1b 78 mr r30,r3 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc063ec: 83 e9 00 38 lwz r31,56(r9) uint32_t count = args->count; ffc063f0: 83 63 00 14 lwz r27,20(r3) char *buffer = args->buffer; ffc063f4: 83 23 00 10 lwz r25,16(r3) rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc063f8: 80 7f 00 14 lwz r3,20(r31) ffc063fc: 48 00 14 1d bl ffc07818 if (sc != RTEMS_SUCCESSFUL) ffc06400: 7c 7c 1b 79 mr. r28,r3 ffc06404: 40 82 03 38 bne- ffc0673c <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { ffc06408: 80 1f 00 cc lwz r0,204(r31) ffc0640c: 3d 20 00 00 lis r9,0 ffc06410: 39 29 28 18 addi r9,r9,10264 ffc06414: 54 00 28 34 rlwinm r0,r0,5,0,26 ffc06418: 7d 29 02 14 add r9,r9,r0 ffc0641c: 80 09 00 08 lwz r0,8(r9) ffc06420: 2f 80 00 00 cmpwi cr7,r0,0 ffc06424: 41 9e 00 1c beq- cr7,ffc06440 sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); ffc06428: 7f e3 fb 78 mr r3,r31 ffc0642c: 7c 09 03 a6 mtctr r0 ffc06430: 7f c4 f3 78 mr r4,r30 ffc06434: 4e 80 04 21 bctrl ffc06438: 7c 7c 1b 78 mr r28,r3 ffc0643c: 48 00 02 f0 b ffc0672c tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { ffc06440: 81 3f 00 24 lwz r9,36(r31) ffc06444: 80 1f 00 20 lwz r0,32(r31) ffc06448: 7f 89 00 00 cmpw cr7,r9,r0 ffc0644c: 40 be 02 98 bne+ cr7,ffc066e4 <== NEVER TAKEN tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; ffc06450: 80 1f 00 28 lwz r0,40(r31) rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; ffc06454: 93 9f 00 20 stw r28,32(r31) tty->read_start_column = tty->column; ffc06458: 90 1f 00 2c stw r0,44(r31) if (tty->device.pollRead != NULL && ffc0645c: 80 1f 00 a0 lwz r0,160(r31) rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; ffc06460: 93 9f 00 24 stw r28,36(r31) tty->read_start_column = tty->column; if (tty->device.pollRead != NULL && ffc06464: 2f 80 00 00 cmpwi cr7,r0,0 ffc06468: 41 9e 00 fc beq- cr7,ffc06564 ffc0646c: 80 1f 00 b4 lwz r0,180(r31) ffc06470: 2f 80 00 00 cmpwi cr7,r0,0 ffc06474: 40 be 00 f0 bne+ cr7,ffc06564 static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { ffc06478: 80 1f 00 3c lwz r0,60(r31) ffc0647c: 70 09 00 02 andi. r9,r0,2 ffc06480: 41 82 00 40 beq- ffc064c0 for (;;) { n = (*tty->device.pollRead)(tty->minor); ffc06484: 80 1f 00 a0 lwz r0,160(r31) ffc06488: 80 7f 00 10 lwz r3,16(r31) ffc0648c: 7c 09 03 a6 mtctr r0 ffc06490: 4e 80 04 21 bctrl if (n < 0) { ffc06494: 2c 03 00 00 cmpwi r3,0 ffc06498: 40 a0 00 10 bge+ ffc064a8 rtems_task_wake_after (1); ffc0649c: 38 60 00 01 li r3,1 ffc064a0: 48 00 18 fd bl ffc07d9c ffc064a4: 4b ff ff e0 b ffc06484 } else { if (siproc (n, tty)) ffc064a8: 54 63 06 3e clrlwi r3,r3,24 ffc064ac: 7f e4 fb 78 mr r4,r31 ffc064b0: 4b ff fd e5 bl ffc06294 ffc064b4: 2f 83 00 00 cmpwi cr7,r3,0 ffc064b8: 41 9e ff cc beq+ cr7,ffc06484 ffc064bc: 48 00 02 28 b ffc066e4 } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); ffc064c0: 48 00 0c 7d bl ffc0713c ffc064c4: 7c 7d 1b 78 mr r29,r3 for (;;) { n = (*tty->device.pollRead)(tty->minor); ffc064c8: 80 1f 00 a0 lwz r0,160(r31) ffc064cc: 80 7f 00 10 lwz r3,16(r31) ffc064d0: 7c 09 03 a6 mtctr r0 ffc064d4: 4e 80 04 21 bctrl if (n < 0) { ffc064d8: 2c 03 00 00 cmpwi r3,0 ffc064dc: 40 80 00 54 bge- ffc06530 if (tty->termios.c_cc[VMIN]) { ffc064e0: 88 1f 00 47 lbz r0,71(r31) ffc064e4: 2f 80 00 00 cmpwi cr7,r0,0 ffc064e8: 88 1f 00 46 lbz r0,70(r31) ffc064ec: 41 9e 00 1c beq- cr7,ffc06508 <== NEVER TAKEN if (tty->termios.c_cc[VTIME] && tty->ccount) { ffc064f0: 70 09 00 ff andi. r9,r0,255 ffc064f4: 41 82 00 30 beq- ffc06524 <== NEVER TAKEN ffc064f8: 80 1f 00 20 lwz r0,32(r31) ffc064fc: 2f 80 00 00 cmpwi cr7,r0,0 ffc06500: 41 be 00 24 beq+ cr7,ffc06524 ffc06504: 48 00 00 0c b ffc06510 if ((now - then) > tty->vtimeTicks) { break; } } } else { if (!tty->termios.c_cc[VTIME]) ffc06508: 70 09 00 ff andi. r9,r0,255 <== NOT EXECUTED ffc0650c: 41 82 01 d8 beq- ffc066e4 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); ffc06510: 48 00 0c 2d bl ffc0713c if ((now - then) > tty->vtimeTicks) { ffc06514: 80 1f 00 54 lwz r0,84(r31) ffc06518: 7c 7d 18 50 subf r3,r29,r3 ffc0651c: 7f 83 00 40 cmplw cr7,r3,r0 ffc06520: 41 9d 01 c4 bgt- cr7,ffc066e4 break; } } rtems_task_wake_after (1); ffc06524: 38 60 00 01 li r3,1 ffc06528: 48 00 18 75 bl ffc07d9c ffc0652c: 4b ff ff 9c b ffc064c8 } else { siproc (n, tty); ffc06530: 54 63 06 3e clrlwi r3,r3,24 ffc06534: 7f e4 fb 78 mr r4,r31 ffc06538: 4b ff fd 5d bl ffc06294 if (tty->ccount >= tty->termios.c_cc[VMIN]) ffc0653c: 88 1f 00 47 lbz r0,71(r31) ffc06540: 81 3f 00 20 lwz r9,32(r31) ffc06544: 7f 89 00 00 cmpw cr7,r9,r0 ffc06548: 40 9c 01 9c bge- cr7,ffc066e4 <== NEVER TAKEN break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) ffc0654c: 2f 80 00 00 cmpwi cr7,r0,0 ffc06550: 41 be ff 78 beq- cr7,ffc064c8 <== NEVER TAKEN ffc06554: 88 1f 00 46 lbz r0,70(r31) ffc06558: 2f 80 00 00 cmpwi cr7,r0,0 ffc0655c: 41 9e ff 6c beq+ cr7,ffc064c8 <== NEVER TAKEN ffc06560: 4b ff ff 60 b ffc064c0 * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; ffc06564: 83 5f 00 74 lwz r26,116(r31) rtems_status_code sc; int wait = (int)1; ffc06568: 3b a0 00 01 li r29,1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { ffc0656c: 3e e0 00 00 lis r23,0 if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)( ffc06570: 3b 1f 00 49 addi r24,r31,73 ffc06574: 48 00 01 28 b ffc0669c while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; ffc06578: 81 3f 00 5c lwz r9,92(r31) ffc0657c: 81 7f 00 64 lwz r11,100(r31) ffc06580: 39 29 00 01 addi r9,r9,1 ffc06584: 7c 09 5b 96 divwu r0,r9,r11 ffc06588: 7c 00 59 d6 mullw r0,r0,r11 ffc0658c: 7c 00 48 50 subf r0,r0,r9 c = tty->rawInBuf.theBuf[newHead]; ffc06590: 81 3f 00 58 lwz r9,88(r31) ffc06594: 7f 49 00 ae lbzx r26,r9,r0 tty->rawInBuf.Head = newHead; ffc06598: 90 1f 00 5c stw r0,92(r31) if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) ffc0659c: 81 7f 00 60 lwz r11,96(r31) ffc065a0: 81 5f 00 64 lwz r10,100(r31) % tty->rawInBuf.Size) ffc065a4: 81 3f 00 64 lwz r9,100(r31) unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; c = tty->rawInBuf.theBuf[newHead]; tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) ffc065a8: 7d 6a 5a 14 add r11,r10,r11 ffc065ac: 7c 00 58 50 subf r0,r0,r11 % tty->rawInBuf.Size) ffc065b0: 7d 60 4b 96 divwu r11,r0,r9 ffc065b4: 7d 2b 49 d6 mullw r9,r11,r9 unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; c = tty->rawInBuf.theBuf[newHead]; tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) ffc065b8: 81 7f 00 bc lwz r11,188(r31) % tty->rawInBuf.Size) ffc065bc: 7c 09 00 50 subf r0,r9,r0 unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; c = tty->rawInBuf.theBuf[newHead]; tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) ffc065c0: 7f 80 58 40 cmplw cr7,r0,r11 ffc065c4: 40 9c 00 84 bge- cr7,ffc06648 <== NEVER TAKEN % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; ffc065c8: 80 1f 00 b8 lwz r0,184(r31) ffc065cc: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc065d0: 90 1f 00 b8 stw r0,184(r31) /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) ffc065d4: 80 1f 00 b8 lwz r0,184(r31) ffc065d8: 70 00 02 02 andi. r0,r0,514 ffc065dc: 2f 80 02 02 cmpwi cr7,r0,514 ffc065e0: 40 be 00 38 bne+ cr7,ffc06618 <== ALWAYS TAKEN == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) ffc065e4: 80 1f 00 94 lwz r0,148(r31) <== NOT EXECUTED ffc065e8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc065ec: 41 9e 00 10 beq- cr7,ffc065fc <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { ffc065f0: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc065f4: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED ffc065f8: 41 82 00 20 beq- ffc06618 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)( ffc065fc: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED ffc06600: 7f 04 c3 78 mr r4,r24 <== NOT EXECUTED ffc06604: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc06608: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc0660c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06610: 4e 80 04 21 bctrl <== NOT EXECUTED ffc06614: 48 00 00 34 b ffc06648 <== NOT EXECUTED tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { ffc06618: 80 1f 00 b8 lwz r0,184(r31) ffc0661c: 70 09 01 00 andi. r9,r0,256 ffc06620: 41 82 00 28 beq- ffc06648 <== ALWAYS TAKEN tty->flow_ctrl &= ~FL_IRTSOFF; ffc06624: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc06628: 54 00 07 b8 rlwinm r0,r0,0,30,28 <== NOT EXECUTED ffc0662c: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { ffc06630: 80 1f 00 b0 lwz r0,176(r31) <== NOT EXECUTED ffc06634: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc06638: 41 9e 00 10 beq- cr7,ffc06648 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); ffc0663c: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc06640: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06644: 4e 80 04 21 bctrl <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { ffc06648: 80 1f 00 3c lwz r0,60(r31) ffc0664c: 70 09 00 02 andi. r9,r0,2 ffc06650: 41 82 00 20 beq- ffc06670 <== NEVER TAKEN if (siproc (c, tty)) ffc06654: 7f 43 d3 78 mr r3,r26 ffc06658: 7f e4 fb 78 mr r4,r31 ffc0665c: 4b ff fc 39 bl ffc06294 wait = 0; ffc06660: 30 63 ff ff addic r3,r3,-1 ffc06664: 7c 63 19 10 subfe r3,r3,r3 ffc06668: 7f bd 18 38 and r29,r29,r3 ffc0666c: 48 00 00 2c b ffc06698 } else { siproc (c, tty); ffc06670: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED ffc06674: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc06678: 4b ff fc 1d bl ffc06294 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) ffc0667c: 88 1f 00 47 lbz r0,71(r31) <== NOT EXECUTED ffc06680: 81 3f 00 20 lwz r9,32(r31) <== NOT EXECUTED wait = 0; ffc06684: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc06688: 7c 00 00 26 mfcr r0 <== NOT EXECUTED ffc0668c: 54 00 ef fe rlwinm r0,r0,29,31,31 <== NOT EXECUTED ffc06690: 7c 00 00 d0 neg r0,r0 <== NOT EXECUTED ffc06694: 7f bd 00 38 and r29,r29,r0 <== NOT EXECUTED } timeout = tty->rawInBufSemaphoreTimeout; ffc06698: 83 5f 00 70 lwz r26,112(r31) while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc0669c: 81 3f 00 5c lwz r9,92(r31) ffc066a0: 80 1f 00 60 lwz r0,96(r31) ffc066a4: 7f 89 00 00 cmpw cr7,r9,r0 ffc066a8: 41 9e 00 1c beq- cr7,ffc066c4 (tty->ccount < (CBUFSIZE-1))) { ffc066ac: 39 37 21 78 addi r9,r23,8568 ffc066b0: 81 29 00 08 lwz r9,8(r9) ffc066b4: 38 09 ff ff addi r0,r9,-1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc066b8: 81 3f 00 20 lwz r9,32(r31) ffc066bc: 7f 89 00 00 cmpw cr7,r9,r0 ffc066c0: 41 9c fe b8 blt+ cr7,ffc06578 <== ALWAYS TAKEN } /* * Wait for characters */ if ( wait ) { ffc066c4: 2f 9d 00 00 cmpwi cr7,r29,0 ffc066c8: 41 be 00 1c beq+ cr7,ffc066e4 sc = rtems_semaphore_obtain( ffc066cc: 80 7f 00 68 lwz r3,104(r31) ffc066d0: 7f 45 d3 78 mr r5,r26 ffc066d4: 80 9f 00 6c lwz r4,108(r31) ffc066d8: 48 00 11 41 bl ffc07818 tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) ffc066dc: 2f 83 00 00 cmpwi cr7,r3,0 ffc066e0: 41 9e ff bc beq+ cr7,ffc0669c <== ALWAYS TAKEN } return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) ffc066e4: 38 1b 00 01 addi r0,r27,1 ffc066e8: 3b 39 ff ff addi r25,r25,-1 ffc066ec: 7c 09 03 a6 mtctr r0 ffc066f0: 48 00 00 1c b ffc0670c if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; ffc066f4: 81 7f 00 1c lwz r11,28(r31) count--; ffc066f8: 3b 7b ff ff addi r27,r27,-1 if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; ffc066fc: 7c 0b 48 ae lbzx r0,r11,r9 ffc06700: 39 29 00 01 addi r9,r9,1 ffc06704: 9c 19 00 01 stbu r0,1(r25) ffc06708: 91 3f 00 24 stw r9,36(r31) sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { ffc0670c: 42 40 00 14 bdz- ffc06720 ffc06710: 81 3f 00 24 lwz r9,36(r31) ffc06714: 80 1f 00 20 lwz r0,32(r31) ffc06718: 7f 89 00 00 cmpw cr7,r9,r0 ffc0671c: 41 9c ff d8 blt+ cr7,ffc066f4 *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; ffc06720: 80 1e 00 14 lwz r0,20(r30) ffc06724: 7f 7b 00 50 subf r27,r27,r0 ffc06728: 93 7e 00 1c stw r27,28(r30) tty->tty_rcvwakeup = 0; ffc0672c: 38 00 00 00 li r0,0 rtems_semaphore_release (tty->isem); ffc06730: 80 7f 00 14 lwz r3,20(r31) while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; ffc06734: 90 1f 00 e4 stw r0,228(r31) rtems_semaphore_release (tty->isem); ffc06738: 48 00 12 09 bl ffc07940 return sc; } ffc0673c: 39 61 00 30 addi r11,r1,48 ffc06740: 7f 83 e3 78 mr r3,r28 ffc06744: 48 00 da 8c b ffc141d0 <_restgpr_23_x> =============================================================================== ffc06ad0 : * in task-driven mode, this function is called in Tx task context * in interrupt-driven mode, this function is called in TxIRQ context */ int rtems_termios_refill_transmitter (struct rtems_termios_tty *tty) { ffc06ad0: 94 21 ff e8 stwu r1,-24(r1) ffc06ad4: 7c 08 02 a6 mflr r0 ffc06ad8: 90 01 00 1c stw r0,28(r1) int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) ffc06adc: 80 03 00 b8 lwz r0,184(r3) * in task-driven mode, this function is called in Tx task context * in interrupt-driven mode, this function is called in TxIRQ context */ int rtems_termios_refill_transmitter (struct rtems_termios_tty *tty) { ffc06ae0: bf a1 00 0c stmw r29,12(r1) ffc06ae4: 7c 7f 1b 78 mr r31,r3 int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) ffc06ae8: 70 00 04 03 andi. r0,r0,1027 ffc06aec: 2f 80 04 01 cmpwi cr7,r0,1025 ffc06af0: 40 be 00 3c bne+ cr7,ffc06b2c <== ALWAYS TAKEN == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); ffc06af4: 80 03 00 a4 lwz r0,164(r3) <== NOT EXECUTED ffc06af8: 38 9f 00 4a addi r4,r31,74 <== NOT EXECUTED ffc06afc: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc06b00: 80 63 00 10 lwz r3,16(r3) <== NOT EXECUTED ffc06b04: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06b08: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_interrupt_disable(level); ffc06b0c: 4b ff e6 51 bl ffc0515c <== NOT EXECUTED tty->t_dqlen--; ffc06b10: 81 3f 00 90 lwz r9,144(r31) <== NOT EXECUTED ffc06b14: 38 09 ff ff addi r0,r9,-1 <== NOT EXECUTED ffc06b18: 90 1f 00 90 stw r0,144(r31) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; ffc06b1c: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc06b20: 60 00 00 02 ori r0,r0,2 <== NOT EXECUTED ffc06b24: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED rtems_interrupt_enable(level); ffc06b28: 48 00 00 48 b ffc06b70 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) { ffc06b2c: 80 03 00 b8 lwz r0,184(r3) ffc06b30: 54 00 07 be clrlwi r0,r0,30 ffc06b34: 2f 80 00 02 cmpwi cr7,r0,2 ffc06b38: 40 be 00 44 bne+ cr7,ffc06b7c <== ALWAYS TAKEN * FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); ffc06b3c: 80 03 00 a4 lwz r0,164(r3) <== NOT EXECUTED ffc06b40: 38 9f 00 49 addi r4,r31,73 <== NOT EXECUTED ffc06b44: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc06b48: 80 63 00 10 lwz r3,16(r3) <== NOT EXECUTED ffc06b4c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06b50: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_interrupt_disable(level); ffc06b54: 4b ff e6 09 bl ffc0515c <== NOT EXECUTED tty->t_dqlen--; ffc06b58: 81 3f 00 90 lwz r9,144(r31) <== NOT EXECUTED ffc06b5c: 38 09 ff ff addi r0,r9,-1 <== NOT EXECUTED ffc06b60: 90 1f 00 90 stw r0,144(r31) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; ffc06b64: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc06b68: 54 00 07 fa rlwinm r0,r0,0,31,29 <== NOT EXECUTED ffc06b6c: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED ffc06b70: 7c 60 01 24 mtmsr r3 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; ffc06b74: 3b c0 00 01 li r30,1 <== NOT EXECUTED ffc06b78: 48 00 01 34 b ffc06cac <== NOT EXECUTED } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { ffc06b7c: 81 23 00 80 lwz r9,128(r3) ffc06b80: 80 03 00 84 lwz r0,132(r3) ffc06b84: 7f 89 00 00 cmpw cr7,r9,r0 ffc06b88: 40 9e 00 20 bne- cr7,ffc06ba8 /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { ffc06b8c: 80 03 00 94 lwz r0,148(r3) /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; ffc06b90: 3b c0 00 00 li r30,0 } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { ffc06b94: 2f 80 00 02 cmpwi cr7,r0,2 ffc06b98: 40 be 01 14 bne+ cr7,ffc06cac <== ALWAYS TAKEN /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); ffc06b9c: 80 63 00 8c lwz r3,140(r3) <== NOT EXECUTED ffc06ba0: 48 00 0d a1 bl ffc07940 <== NOT EXECUTED ffc06ba4: 48 00 01 08 b ffc06cac <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); ffc06ba8: 4b ff e5 b5 bl ffc0515c len = tty->t_dqlen; tty->t_dqlen = 0; ffc06bac: 38 00 00 00 li r0,0 } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; ffc06bb0: 83 bf 00 90 lwz r29,144(r31) tty->t_dqlen = 0; ffc06bb4: 90 1f 00 90 stw r0,144(r31) ffc06bb8: 7c 60 01 24 mtmsr r3 rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; ffc06bbc: 80 1f 00 84 lwz r0,132(r31) ffc06bc0: 81 3f 00 88 lwz r9,136(r31) ffc06bc4: 7c 1d 02 14 add r0,r29,r0 ffc06bc8: 7f a0 4b 96 divwu r29,r0,r9 ffc06bcc: 7f bd 49 d6 mullw r29,r29,r9 ffc06bd0: 7f bd 00 50 subf r29,r29,r0 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { ffc06bd4: 80 1f 00 94 lwz r0,148(r31) len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; tty->rawOutBuf.Tail = newTail; ffc06bd8: 93 bf 00 84 stw r29,132(r31) if (tty->rawOutBufState == rob_wait) { ffc06bdc: 2f 80 00 02 cmpwi cr7,r0,2 ffc06be0: 40 be 00 0c bne+ cr7,ffc06bec /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); ffc06be4: 80 7f 00 8c lwz r3,140(r31) ffc06be8: 48 00 0d 59 bl ffc07940 } if (newTail == tty->rawOutBuf.Head) { ffc06bec: 80 1f 00 80 lwz r0,128(r31) ffc06bf0: 7f 9d 00 00 cmpw cr7,r29,r0 ffc06bf4: 40 be 00 30 bne+ cr7,ffc06c24 /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; ffc06bf8: 38 00 00 00 li r0,0 ffc06bfc: 90 1f 00 94 stw r0,148(r31) nToSend = 0; ffc06c00: 3b c0 00 00 li r30,0 /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { ffc06c04: 80 1f 00 d4 lwz r0,212(r31) ffc06c08: 2f 80 00 00 cmpwi cr7,r0,0 ffc06c0c: 41 9e 00 9c beq- cr7,ffc06ca8 <== ALWAYS TAKEN (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); ffc06c10: 38 7f 00 30 addi r3,r31,48 <== NOT EXECUTED ffc06c14: 80 9f 00 d8 lwz r4,216(r31) <== NOT EXECUTED ffc06c18: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06c1c: 4e 80 04 21 bctrl <== NOT EXECUTED ffc06c20: 48 00 00 88 b ffc06ca8 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) ffc06c24: 80 1f 00 b8 lwz r0,184(r31) ffc06c28: 70 00 02 10 andi. r0,r0,528 ffc06c2c: 2f 80 02 10 cmpwi cr7,r0,528 ffc06c30: 40 be 00 28 bne+ cr7,ffc06c58 <== ALWAYS TAKEN == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); ffc06c34: 4b ff e5 29 bl ffc0515c <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; ffc06c38: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc06c3c: 60 00 00 20 ori r0,r0,32 <== NOT EXECUTED ffc06c40: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ ffc06c44: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc06c48: 90 1f 00 94 stw r0,148(r31) <== NOT EXECUTED ffc06c4c: 7c 60 01 24 mtmsr r3 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 0; ffc06c50: 3b c0 00 00 li r30,0 <== NOT EXECUTED ffc06c54: 48 00 00 54 b ffc06ca8 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) ffc06c58: 80 1f 00 80 lwz r0,128(r31) ffc06c5c: 7f 9d 00 40 cmplw cr7,r29,r0 ffc06c60: 40 9d 00 0c ble- cr7,ffc06c6c nToSend = tty->rawOutBuf.Size - newTail; ffc06c64: 83 df 00 88 lwz r30,136(r31) ffc06c68: 48 00 00 08 b ffc06c70 else nToSend = tty->rawOutBuf.Head - newTail; ffc06c6c: 83 df 00 80 lwz r30,128(r31) /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { ffc06c70: 80 1f 00 b8 lwz r0,184(r31) * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; ffc06c74: 7f dd f0 50 subf r30,r29,r30 /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { ffc06c78: 70 09 06 00 andi. r9,r0,1536 ffc06c7c: 41 82 00 08 beq- ffc06c84 nToSend = 1; ffc06c80: 3b c0 00 01 li r30,1 } tty->rawOutBufState = rob_busy; /*apm*/ ffc06c84: 38 00 00 01 li r0,1 (*tty->device.write)( ffc06c88: 80 9f 00 7c lwz r4,124(r31) /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ ffc06c8c: 90 1f 00 94 stw r0,148(r31) (*tty->device.write)( ffc06c90: 7f c5 f3 78 mr r5,r30 ffc06c94: 7c 84 ea 14 add r4,r4,r29 ffc06c98: 80 1f 00 a4 lwz r0,164(r31) ffc06c9c: 80 7f 00 10 lwz r3,16(r31) ffc06ca0: 7c 09 03 a6 mtctr r0 ffc06ca4: 4e 80 04 21 bctrl tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ ffc06ca8: 93 bf 00 84 stw r29,132(r31) } return nToSend; } ffc06cac: 39 61 00 18 addi r11,r1,24 ffc06cb0: 7f c3 f3 78 mr r3,r30 ffc06cb4: 48 00 d5 34 b ffc141e8 <_restgpr_29_x> =============================================================================== ffc06a54 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { ffc06a54: 94 21 ff d8 stwu r1,-40(r1) ffc06a58: 7c 08 02 a6 mflr r0 ffc06a5c: 90 01 00 2c stw r0,44(r1) ffc06a60: bf a1 00 1c stmw r29,28(r1) ffc06a64: 7c 7f 1b 78 mr r31,r3 while (1) { /* * wait for rtems event */ rtems_event_receive( ffc06a68: 3b a1 00 0c addi r29,r1,12 if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); ffc06a6c: 3b c1 00 08 addi r30,r1,8 while (1) { /* * wait for rtems event */ rtems_event_receive( ffc06a70: 38 60 00 03 li r3,3 ffc06a74: 38 80 00 02 li r4,2 ffc06a78: 38 a0 00 00 li r5,0 ffc06a7c: 7f a6 eb 78 mr r6,r29 ffc06a80: 48 00 07 41 bl ffc071c0 (TERMIOS_RX_PROC_EVENT | TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event ); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { ffc06a84: 80 01 00 0c lwz r0,12(r1) ffc06a88: 70 09 00 01 andi. r9,r0,1 ffc06a8c: 41 a2 00 14 beq+ ffc06aa0 <== ALWAYS TAKEN tty->rxTaskId = 0; ffc06a90: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc06a94: 90 1f 00 c4 stw r0,196(r31) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); ffc06a98: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc06a9c: 48 00 10 a1 bl ffc07b3c <== NOT EXECUTED } /* * do something */ c = tty->device.pollRead(tty->minor); ffc06aa0: 80 1f 00 a0 lwz r0,160(r31) ffc06aa4: 80 7f 00 10 lwz r3,16(r31) ffc06aa8: 7c 09 03 a6 mtctr r0 ffc06aac: 4e 80 04 21 bctrl if (c != EOF) { ffc06ab0: 2f 83 ff ff cmpwi cr7,r3,-1 ffc06ab4: 41 9e ff bc beq+ cr7,ffc06a70 /* * pollRead did call enqueue on its own */ c_buf = c; ffc06ab8: 98 61 00 08 stb r3,8(r1) rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); ffc06abc: 7f c4 f3 78 mr r4,r30 ffc06ac0: 7f e3 fb 78 mr r3,r31 ffc06ac4: 38 a0 00 01 li r5,1 ffc06ac8: 4b ff fc a9 bl ffc06770 ffc06acc: 4b ff ff a4 b ffc06a70 =============================================================================== ffc06cb8 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { ffc06cb8: 94 21 ff d8 stwu r1,-40(r1) ffc06cbc: 7c 08 02 a6 mflr r0 ffc06cc0: bf a1 00 1c stmw r29,28(r1) } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { ffc06cc4: 3f c0 00 00 lis r30,0 /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { ffc06cc8: 7c 7f 1b 78 mr r31,r3 ffc06ccc: 90 01 00 2c stw r0,44(r1) while (1) { /* * wait for rtems event */ rtems_event_receive( ffc06cd0: 3b a1 00 08 addi r29,r1,8 } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { ffc06cd4: 3b de 28 18 addi r30,r30,10264 while (1) { /* * wait for rtems event */ rtems_event_receive( ffc06cd8: 38 60 00 03 li r3,3 ffc06cdc: 38 80 00 02 li r4,2 ffc06ce0: 38 a0 00 00 li r5,0 ffc06ce4: 7f a6 eb 78 mr r6,r29 ffc06ce8: 48 00 04 d9 bl ffc071c0 (TERMIOS_TX_START_EVENT | TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event ); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { ffc06cec: 80 01 00 08 lwz r0,8(r1) ffc06cf0: 70 09 00 01 andi. r9,r0,1 ffc06cf4: 41 a2 00 14 beq+ ffc06d08 <== ALWAYS TAKEN tty->txTaskId = 0; ffc06cf8: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc06cfc: 90 1f 00 c8 stw r0,200(r31) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); ffc06d00: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc06d04: 48 00 0e 39 bl ffc07b3c <== NOT EXECUTED } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { ffc06d08: 81 3f 00 cc lwz r9,204(r31) ffc06d0c: 55 29 28 34 rlwinm r9,r9,5,0,26 ffc06d10: 7d 3e 4a 14 add r9,r30,r9 ffc06d14: 80 09 00 14 lwz r0,20(r9) ffc06d18: 2f 80 00 00 cmpwi cr7,r0,0 ffc06d1c: 41 9e 00 10 beq- cr7,ffc06d2c <== ALWAYS TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); ffc06d20: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc06d24: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06d28: 4e 80 04 21 bctrl <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); ffc06d2c: 7f e3 fb 78 mr r3,r31 ffc06d30: 4b ff fd a1 bl ffc06ad0 } ffc06d34: 4b ff ff a4 b ffc06cd8 =============================================================================== ffc06300 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc06300: 94 21 ff e0 stwu r1,-32(r1) ffc06304: 7c 08 02 a6 mflr r0 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc06308: 38 80 00 00 li r4,0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc0630c: 90 01 00 24 stw r0,36(r1) rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc06310: 38 a0 00 00 li r5,0 rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc06314: 81 23 00 00 lwz r9,0(r3) rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc06318: bf 61 00 0c stmw r27,12(r1) ffc0631c: 7c 7e 1b 78 mr r30,r3 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc06320: 83 e9 00 38 lwz r31,56(r9) rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc06324: 80 7f 00 18 lwz r3,24(r31) ffc06328: 48 00 14 f1 bl ffc07818 if (sc != RTEMS_SUCCESSFUL) ffc0632c: 7c 7d 1b 79 mr. r29,r3 ffc06330: 40 82 00 90 bne- ffc063c0 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { ffc06334: 80 1f 00 cc lwz r0,204(r31) ffc06338: 3d 20 00 00 lis r9,0 ffc0633c: 39 29 28 18 addi r9,r9,10264 ffc06340: 54 00 28 34 rlwinm r0,r0,5,0,26 ffc06344: 7d 29 02 14 add r9,r9,r0 ffc06348: 80 09 00 0c lwz r0,12(r9) ffc0634c: 2f 80 00 00 cmpwi cr7,r0,0 ffc06350: 41 9e 00 1c beq- cr7,ffc0636c sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); ffc06354: 7f e3 fb 78 mr r3,r31 ffc06358: 7c 09 03 a6 mtctr r0 ffc0635c: 7f c4 f3 78 mr r4,r30 ffc06360: 4e 80 04 21 bctrl ffc06364: 7c 7d 1b 78 mr r29,r3 ffc06368: 48 00 00 50 b ffc063b8 rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { ffc0636c: 80 1f 00 34 lwz r0,52(r31) ffc06370: 80 9e 00 14 lwz r4,20(r30) ffc06374: 70 09 00 01 andi. r9,r0,1 ffc06378: 80 7e 00 10 lwz r3,16(r30) ffc0637c: 41 82 00 2c beq- ffc063a8 <== NEVER TAKEN uint32_t count = args->count; ffc06380: 7c 9c 23 78 mr r28,r4 } rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) ffc06384: 3b 63 ff ff addi r27,r3,-1 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) ffc06388: 48 00 00 14 b ffc0639c oproc (*buffer++, tty); ffc0638c: 8c 7b 00 01 lbzu r3,1(r27) ffc06390: 7f e4 fb 78 mr r4,r31 ffc06394: 3b 9c ff ff addi r28,r28,-1 ffc06398: 4b ff f9 49 bl ffc05ce0 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) ffc0639c: 2f 9c 00 00 cmpwi cr7,r28,0 ffc063a0: 40 9e ff ec bne+ cr7,ffc0638c ffc063a4: 48 00 00 0c b ffc063b0 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); ffc063a8: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED ffc063ac: 4b ff f8 0d bl ffc05bb8 <== NOT EXECUTED args->bytes_moved = args->count; ffc063b0: 80 1e 00 14 lwz r0,20(r30) ffc063b4: 90 1e 00 1c stw r0,28(r30) } rtems_semaphore_release (tty->osem); ffc063b8: 80 7f 00 18 lwz r3,24(r31) ffc063bc: 48 00 15 85 bl ffc07940 return sc; } ffc063c0: 39 61 00 20 addi r11,r1,32 ffc063c4: 7f a3 eb 78 mr r3,r29 ffc063c8: 48 00 de 18 b ffc141e0 <_restgpr_27_x> =============================================================================== ffc186e4 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { ffc186e4: 94 21 ff e8 stwu r1,-24(r1) ffc186e8: 7c 08 02 a6 mflr r0 ffc186ec: 7c 64 1b 78 mr r4,r3 Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); ffc186f0: 3c 60 00 00 lis r3,0 ffc186f4: 90 01 00 1c stw r0,28(r1) ffc186f8: 38 63 72 60 addi r3,r3,29280 ffc186fc: 38 a1 00 08 addi r5,r1,8 ffc18700: 48 00 31 51 bl ffc1b850 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc18704: 80 01 00 08 lwz r0,8(r1) ffc18708: 2f 80 00 00 cmpwi cr7,r0,0 ffc1870c: 40 9e 00 24 bne- cr7,ffc18730 case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) ffc18710: 80 03 00 38 lwz r0,56(r3) ffc18714: 2f 80 00 04 cmpwi cr7,r0,4 ffc18718: 41 9e 00 0c beq- cr7,ffc18724 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); ffc1871c: 38 63 00 10 addi r3,r3,16 ffc18720: 48 00 53 31 bl ffc1da50 <_Watchdog_Remove> _Thread_Enable_dispatch(); ffc18724: 48 00 3d e9 bl ffc1c50c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc18728: 38 60 00 00 li r3,0 ffc1872c: 48 00 00 08 b ffc18734 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc18730: 38 60 00 04 li r3,4 } ffc18734: 80 01 00 1c lwz r0,28(r1) ffc18738: 38 21 00 18 addi r1,r1,24 ffc1873c: 7c 08 03 a6 mtlr r0 ffc18740: 4e 80 00 20 blr =============================================================================== ffc18c64 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc18c64: 94 21 ff c8 stwu r1,-56(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; ffc18c68: 3d 20 00 00 lis r9,0 rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc18c6c: 7c 08 02 a6 mflr r0 ffc18c70: bf 01 00 18 stmw r24,24(r1) ffc18c74: 7c 7f 1b 78 mr r31,r3 ffc18c78: 7c 9c 23 78 mr r28,r4 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; ffc18c7c: 83 a9 28 b4 lwz r29,10420(r9) rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc18c80: 7c be 2b 78 mr r30,r5 ffc18c84: 90 01 00 3c stw r0,60(r1) ffc18c88: 7c da 33 78 mr r26,r6 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc18c8c: 2f 9d 00 00 cmpwi cr7,r29,0 return RTEMS_INCORRECT_STATE; ffc18c90: 3b 20 00 0e li r25,14 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc18c94: 41 9e 00 c8 beq- cr7,ffc18d5c return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) ffc18c98: 3d 20 00 00 lis r9,0 ffc18c9c: 88 09 28 60 lbz r0,10336(r9) return RTEMS_NOT_DEFINED; ffc18ca0: 3b 20 00 0b li r25,11 Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) ffc18ca4: 2f 80 00 00 cmpwi cr7,r0,0 ffc18ca8: 41 9e 00 b4 beq- cr7,ffc18d5c <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) ffc18cac: 2f 85 00 00 cmpwi cr7,r5,0 return RTEMS_INVALID_ADDRESS; ffc18cb0: 3b 20 00 09 li r25,9 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) ffc18cb4: 41 9e 00 a8 beq- cr7,ffc18d5c return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) ffc18cb8: 7c 83 23 78 mr r3,r4 ffc18cbc: 4b ff cc 5d bl ffc15918 <_TOD_Validate> return RTEMS_INVALID_CLOCK; ffc18cc0: 3b 20 00 14 li r25,20 return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) ffc18cc4: 2f 83 00 00 cmpwi cr7,r3,0 ffc18cc8: 41 9e 00 94 beq- cr7,ffc18d5c return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc18ccc: 7f 83 e3 78 mr r3,r28 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc18cd0: 3f 60 00 00 lis r27,0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc18cd4: 4b ff cb b9 bl ffc1588c <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) ffc18cd8: 80 1b 28 74 lwz r0,10356(r27) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc18cdc: 7c 7c 1b 78 mr r28,r3 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc18ce0: 7f 83 00 40 cmplw cr7,r3,r0 ffc18ce4: 40 9d 00 78 ble- cr7,ffc18d5c ffc18ce8: 3c 60 00 00 lis r3,0 ffc18cec: 38 63 72 60 addi r3,r3,29280 ffc18cf0: 7f e4 fb 78 mr r4,r31 ffc18cf4: 38 a1 00 08 addi r5,r1,8 ffc18cf8: 48 00 2b 59 bl ffc1b850 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc18cfc: 83 01 00 08 lwz r24,8(r1) ffc18d00: 7c 79 1b 78 mr r25,r3 ffc18d04: 2f 98 00 00 cmpwi cr7,r24,0 ffc18d08: 40 9e 00 50 bne- cr7,ffc18d58 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); ffc18d0c: 38 63 00 10 addi r3,r3,16 ffc18d10: 48 00 4d 41 bl ffc1da50 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; ffc18d14: 38 00 00 03 li r0,3 ffc18d18: 90 19 00 38 stw r0,56(r25) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); ffc18d1c: 7f 24 cb 78 mr r4,r25 ffc18d20: 7f a3 eb 78 mr r3,r29 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); ffc18d24: 80 1b 28 74 lwz r0,10356(r27) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc18d28: 93 19 00 18 stw r24,24(r25) ffc18d2c: 7f 80 e0 50 subf r28,r0,r28 (*timer_server->schedule_operation)( timer_server, the_timer ); ffc18d30: 80 1d 00 04 lwz r0,4(r29) the_watchdog->routine = routine; ffc18d34: 93 d9 00 2c stw r30,44(r25) ffc18d38: 7c 09 03 a6 mtctr r0 the_watchdog->id = id; ffc18d3c: 93 f9 00 30 stw r31,48(r25) the_watchdog->user_data = user_data; ffc18d40: 93 59 00 34 stw r26,52(r25) case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); ffc18d44: 93 99 00 1c stw r28,28(r25) (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc18d48: 3b 20 00 00 li r25,0 (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); ffc18d4c: 4e 80 04 21 bctrl _Thread_Enable_dispatch(); ffc18d50: 48 00 37 bd bl ffc1c50c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc18d54: 48 00 00 08 b ffc18d5c #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc18d58: 3b 20 00 04 li r25,4 } ffc18d5c: 39 61 00 38 addi r11,r1,56 ffc18d60: 7f 23 cb 78 mr r3,r25 ffc18d64: 4b ff 55 3c b ffc0e2a0 <_restgpr_24_x> =============================================================================== ffc090d8 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { ffc090d8: 94 21 ff e0 stwu r1,-32(r1) ffc090dc: 7c 08 02 a6 mflr r0 ffc090e0: 90 01 00 24 stw r0,36(r1) int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { ffc090e4: 74 60 20 00 andis. r0,r3,8192 static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { ffc090e8: bf 41 00 08 stmw r26,8(r1) ffc090ec: 7c 7d 1b 78 mr r29,r3 ffc090f0: 7c 9a 23 78 mr r26,r4 ffc090f4: 7c bb 2b 78 mr r27,r5 int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { ffc090f8: 41 82 00 40 beq- ffc09138 if (rtems_panic_in_progress++) ffc090fc: 3d 60 00 00 lis r11,0 ffc09100: 81 2b 27 c8 lwz r9,10184(r11) ffc09104: 2f 89 00 00 cmpwi cr7,r9,0 ffc09108: 38 09 00 01 addi r0,r9,1 ffc0910c: 90 0b 27 c8 stw r0,10184(r11) ffc09110: 41 9e 00 14 beq- cr7,ffc09124 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc09114: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc09118: 81 69 27 e8 lwz r11,10216(r9) <== NOT EXECUTED ffc0911c: 38 0b 00 01 addi r0,r11,1 <== NOT EXECUTED ffc09120: 90 09 27 e8 stw r0,10216(r9) <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) ffc09124: 3d 20 00 00 lis r9,0 ffc09128: 80 09 27 c8 lwz r0,10184(r9) return 0; ffc0912c: 3b e0 00 00 li r31,0 if (error_flag & RTEMS_ERROR_PANIC) { if (rtems_panic_in_progress++) _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) ffc09130: 2f 80 00 02 cmpwi cr7,r0,2 ffc09134: 41 9d 01 14 bgt- cr7,ffc09248 <== NEVER TAKEN return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ ffc09138: 3d 20 00 00 lis r9,0 ffc0913c: 81 29 27 70 lwz r9,10096(r9) status = error_flag & ~RTEMS_ERROR_MASK; ffc09140: 57 bc 01 00 rlwinm r28,r29,0,4,0 rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { int local_errno = 0; ffc09144: 3b c0 00 00 li r30,0 /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ ffc09148: 80 69 00 08 lwz r3,8(r9) ffc0914c: 48 00 c3 75 bl ffc154c0 status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ ffc09150: 77 a0 40 00 andis. r0,r29,16384 ffc09154: 41 a2 00 0c beq+ ffc09160 local_errno = errno; ffc09158: 48 00 be d5 bl ffc1502c <__errno> ffc0915c: 83 c3 00 00 lwz r30,0(r3) #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); ffc09160: 3f a0 00 00 lis r29,0 ffc09164: 81 3d 27 70 lwz r9,10096(r29) ffc09168: 7f 44 d3 78 mr r4,r26 ffc0916c: 7f 65 db 78 mr r5,r27 ffc09170: 80 69 00 0c lwz r3,12(r9) ffc09174: 48 01 34 e5 bl ffc1c658 if (status) ffc09178: 2f 9c 00 00 cmpwi cr7,r28,0 #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); ffc0917c: 7c 7f 1b 78 mr r31,r3 if (status) ffc09180: 41 be 00 30 beq+ cr7,ffc091b0 chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); ffc09184: 81 3d 27 70 lwz r9,10096(r29) ffc09188: 7f 83 e3 78 mr r3,r28 ffc0918c: 83 a9 00 0c lwz r29,12(r9) ffc09190: 4b ff ff 1d bl ffc090ac ffc09194: 3c 80 ff c2 lis r4,-62 ffc09198: 7c 65 1b 78 mr r5,r3 ffc0919c: 38 84 5f f0 addi r4,r4,24560 ffc091a0: 7f a3 eb 78 mr r3,r29 ffc091a4: 4c c6 31 82 crclr 4*cr1+eq ffc091a8: 48 00 c8 4d bl ffc159f4 #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += ffc091ac: 7f ff 1a 14 add r31,r31,r3 fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { ffc091b0: 2f 9e 00 00 cmpwi cr7,r30,0 ffc091b4: 41 9e 00 68 beq- cr7,ffc0921c if ((local_errno > 0) && *strerror(local_errno)) ffc091b8: 40 9d 00 40 ble- cr7,ffc091f8 ffc091bc: 7f c3 f3 78 mr r3,r30 ffc091c0: 48 00 d7 31 bl ffc168f0 ffc091c4: 88 03 00 00 lbz r0,0(r3) ffc091c8: 2f 80 00 00 cmpwi cr7,r0,0 ffc091cc: 41 be 00 2c beq+ cr7,ffc091f8 <== NEVER TAKEN chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); ffc091d0: 3d 20 00 00 lis r9,0 ffc091d4: 81 29 27 70 lwz r9,10096(r9) ffc091d8: 7f c3 f3 78 mr r3,r30 ffc091dc: 83 a9 00 0c lwz r29,12(r9) ffc091e0: 48 00 d7 11 bl ffc168f0 ffc091e4: 3c 80 ff c2 lis r4,-62 ffc091e8: 7c 65 1b 78 mr r5,r3 ffc091ec: 38 84 5f fe addi r4,r4,24574 ffc091f0: 7f a3 eb 78 mr r3,r29 ffc091f4: 48 00 00 1c b ffc09210 else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); ffc091f8: 3d 20 00 00 lis r9,0 ffc091fc: 81 29 27 70 lwz r9,10096(r9) ffc09200: 3c 80 ff c2 lis r4,-62 ffc09204: 38 84 60 0b addi r4,r4,24587 ffc09208: 80 69 00 0c lwz r3,12(r9) ffc0920c: 7f c5 f3 78 mr r5,r30 ffc09210: 4c c6 31 82 crclr 4*cr1+eq ffc09214: 48 00 c7 e1 bl ffc159f4 ffc09218: 7f ff 1a 14 add r31,r31,r3 } chars_written += fprintf(stderr, "\n"); ffc0921c: 3f c0 00 00 lis r30,0 ffc09220: 81 3e 27 70 lwz r9,10096(r30) ffc09224: 3c 80 ff c2 lis r4,-62 ffc09228: 38 84 63 32 addi r4,r4,25394 ffc0922c: 80 69 00 0c lwz r3,12(r9) ffc09230: 4c c6 31 82 crclr 4*cr1+eq ffc09234: 48 00 c7 c1 bl ffc159f4 (void) fflush(stderr); ffc09238: 81 3e 27 70 lwz r9,10096(r30) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); ffc0923c: 7f e3 fa 14 add r31,r3,r31 (void) fflush(stderr); ffc09240: 80 69 00 0c lwz r3,12(r9) ffc09244: 48 00 c2 7d bl ffc154c0 return chars_written; } ffc09248: 39 61 00 20 addi r11,r1,32 ffc0924c: 7f e3 fb 78 mr r3,r31 ffc09250: 4b ff 8d 34 b ffc01f84 <_restgpr_26_x> =============================================================================== ffc049b4 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc049b4: 94 21 ff d8 stwu r1,-40(r1) ffc049b8: 7c 08 02 a6 mflr r0 ffc049bc: bf 01 00 08 stmw r24,8(r1) int c; unsigned int i = 0; unsigned int limit = INT_MAX; ffc049c0: 3f 80 7f ff lis r28,32767 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc049c4: 7c 7e 1b 78 mr r30,r3 ffc049c8: 90 01 00 2c stw r0,44(r1) ffc049cc: 7c 9b 23 78 mr r27,r4 int c; unsigned int i = 0; unsigned int limit = INT_MAX; int sign = 0; ffc049d0: 3b a0 00 00 li r29,0 static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; unsigned int limit = INT_MAX; ffc049d4: 63 9c ff ff ori r28,r28,65535 */ static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; ffc049d8: 3b e0 00 00 li r31,0 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); ffc049dc: 3f 00 00 00 lis r24,0 limit++; continue; } sign = 1; } if (!isdigit(c)) ffc049e0: 3f 20 00 00 lis r25,0 return 0; d = c - '0'; if ((i > (limit / 10)) ffc049e4: 3b 40 00 0a li r26,10 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); ffc049e8: 81 3e 00 04 lwz r9,4(r30) ffc049ec: 38 09 ff ff addi r0,r9,-1 ffc049f0: 2f 80 00 00 cmpwi cr7,r0,0 ffc049f4: 90 1e 00 04 stw r0,4(r30) ffc049f8: 40 bc 00 14 bge+ cr7,ffc04a0c <== ALWAYS TAKEN ffc049fc: 80 78 26 f0 lwz r3,9968(r24) <== NOT EXECUTED ffc04a00: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc04a04: 48 00 dd 25 bl ffc12728 <__srget_r> <== NOT EXECUTED ffc04a08: 48 00 00 14 b ffc04a1c <== NOT EXECUTED ffc04a0c: 81 3e 00 00 lwz r9,0(r30) ffc04a10: 88 69 00 00 lbz r3,0(r9) ffc04a14: 39 29 00 01 addi r9,r9,1 ffc04a18: 91 3e 00 00 stw r9,0(r30) if (c == ':') ffc04a1c: 2f 03 00 3a cmpwi cr6,r3,58 ffc04a20: 2f 9d 00 00 cmpwi cr7,r29,0 ffc04a24: 41 9a 00 68 beq- cr6,ffc04a8c break; if (sign == 0) { ffc04a28: 40 9e 00 1c bne- cr7,ffc04a44 if (c == '-') { ffc04a2c: 2f 83 00 2d cmpwi cr7,r3,45 sign = -1; limit++; continue; } sign = 1; ffc04a30: 3b a0 00 01 li r29,1 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { ffc04a34: 40 be 00 10 bne+ cr7,ffc04a44 sign = -1; limit++; ffc04a38: 3b 9c 00 01 addi r28,r28,1 c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; ffc04a3c: 3b a0 ff ff li r29,-1 limit++; continue; ffc04a40: 4b ff ff a8 b ffc049e8 } sign = 1; } if (!isdigit(c)) ffc04a44: 81 39 26 ec lwz r9,9964(r25) ffc04a48: 7d 29 1a 14 add r9,r9,r3 ffc04a4c: 88 09 00 01 lbz r0,1(r9) ffc04a50: 70 09 00 04 andi. r9,r0,4 ffc04a54: 41 82 00 4c beq- ffc04aa0 return 0; d = c - '0'; if ((i > (limit / 10)) ffc04a58: 7c 1c d3 96 divwu r0,r28,r26 ffc04a5c: 7f 9f 00 40 cmplw cr7,r31,r0 ffc04a60: 41 9d 00 40 bgt- cr7,ffc04aa0 || ((i == (limit / 10)) && (d > (limit % 10)))) ffc04a64: 7f 9f 00 00 cmpw cr7,r31,r0 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; ffc04a68: 38 63 ff d0 addi r3,r3,-48 if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) ffc04a6c: 40 be 00 14 bne+ cr7,ffc04a80 ffc04a70: 1c 1f 00 0a mulli r0,r31,10 ffc04a74: 7c 00 e0 50 subf r0,r0,r28 ffc04a78: 7f 83 00 40 cmplw cr7,r3,r0 ffc04a7c: 41 9d 00 24 bgt- cr7,ffc04aa0 <== ALWAYS TAKEN return 0; i = i * 10 + d; ffc04a80: 1f ff 00 0a mulli r31,r31,10 ffc04a84: 7f e3 fa 14 add r31,r3,r31 ffc04a88: 4b ff ff 60 b ffc049e8 } if (sign == 0) ffc04a8c: 41 9e 00 14 beq- cr7,ffc04aa0 <== NEVER TAKEN return 0; *val = i * sign; ffc04a90: 7f fd f9 d6 mullw r31,r29,r31 return 1; ffc04a94: 38 60 00 01 li r3,1 return 0; i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; ffc04a98: 93 fb 00 00 stw r31,0(r27) return 1; ffc04a9c: 48 00 00 08 b ffc04aa4 || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) return 0; ffc04aa0: 38 60 00 00 li r3,0 *val = i * sign; return 1; } ffc04aa4: 39 61 00 28 addi r11,r1,40 ffc04aa8: 4b ff be 04 b ffc008ac <_restgpr_24_x> =============================================================================== ffc04bac : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc04bac: 94 21 ff c8 stwu r1,-56(r1) ffc04bb0: 7c 08 02 a6 mflr r0 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc04bb4: 38 e0 00 00 li r7,0 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc04bb8: bf 61 00 24 stmw r27,36(r1) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc04bbc: 3b 81 00 18 addi r28,r1,24 ffc04bc0: 3b a1 00 1c addi r29,r1,28 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc04bc4: 90 a1 00 18 stw r5,24(r1) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc04bc8: 7f 85 e3 78 mr r5,r28 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc04bcc: 7c 7b 1b 78 mr r27,r3 ffc04bd0: 90 c1 00 1c stw r6,28(r1) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc04bd4: 7f a6 eb 78 mr r6,r29 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc04bd8: 7c 9f 23 78 mr r31,r4 ffc04bdc: 90 01 00 3c stw r0,60(r1) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc04be0: 4b ff fe cd bl ffc04aac ffc04be4: 2f 83 00 00 cmpwi cr7,r3,0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; ffc04be8: 3b c0 00 00 li r30,0 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc04bec: 41 be 01 04 beq+ cr7,ffc04cf0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) ffc04bf0: 7f 63 db 78 mr r3,r27 ffc04bf4: 38 9f 00 04 addi r4,r31,4 ffc04bf8: 7f 85 e3 78 mr r5,r28 ffc04bfc: 7f a6 eb 78 mr r6,r29 ffc04c00: 38 e0 00 00 li r7,0 ffc04c04: 4b ff fe a9 bl ffc04aac ffc04c08: 2f 83 00 00 cmpwi cr7,r3,0 ffc04c0c: 41 be 00 e4 beq+ cr7,ffc04cf0 <== NEVER TAKEN || !scanInt(fp, &grgid) ffc04c10: 7f 63 db 78 mr r3,r27 ffc04c14: 38 81 00 08 addi r4,r1,8 ffc04c18: 4b ff fd 9d bl ffc049b4 ffc04c1c: 2f 83 00 00 cmpwi cr7,r3,0 ffc04c20: 41 be 00 d0 beq+ cr7,ffc04cf0 <== NEVER TAKEN || !scanString(fp, &grmem, &buffer, &bufsize, 1)) ffc04c24: 7f 63 db 78 mr r3,r27 ffc04c28: 38 81 00 0c addi r4,r1,12 ffc04c2c: 7f 85 e3 78 mr r5,r28 ffc04c30: 7f a6 eb 78 mr r6,r29 ffc04c34: 38 e0 00 01 li r7,1 ffc04c38: 4b ff fe 75 bl ffc04aac ffc04c3c: 2f 83 00 00 cmpwi cr7,r3,0 ffc04c40: 41 9e 00 b0 beq- cr7,ffc04cf0 <== NEVER TAKEN return 0; grp->gr_gid = grgid; ffc04c44: 80 01 00 08 lwz r0,8(r1) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc04c48: 81 61 00 0c lwz r11,12(r1) if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; ffc04c4c: b0 1f 00 08 sth r0,8(r31) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc04c50: 38 00 00 01 li r0,1 } /* * Extract a single group record from the database */ static int scangr( ffc04c54: 39 2b ff ff addi r9,r11,-1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc04c58: 48 00 00 14 b ffc04c6c if(*cp == ',') memcount++; ffc04c5c: 69 48 00 2c xori r8,r10,44 ffc04c60: 21 08 00 00 subfic r8,r8,0 ffc04c64: 7d 00 01 94 addze r8,r0 ffc04c68: 7d 00 43 78 mr r0,r8 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc04c6c: 8d 49 00 01 lbzu r10,1(r9) ffc04c70: 2f 8a 00 00 cmpwi cr7,r10,0 ffc04c74: 40 9e ff e8 bne+ cr7,ffc04c5c } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) ffc04c78: 54 09 10 3a rlwinm r9,r0,2,0,29 ffc04c7c: 38 09 00 13 addi r0,r9,19 ffc04c80: 81 21 00 1c lwz r9,28(r1) return 0; ffc04c84: 3b c0 00 00 li r30,0 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) ffc04c88: 7f 89 00 40 cmplw cr7,r9,r0 ffc04c8c: 41 9c 00 64 blt- cr7,ffc04cf0 <== NEVER TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); ffc04c90: 81 21 00 18 lwz r9,24(r1) ffc04c94: 39 29 00 0f addi r9,r9,15 ffc04c98: 55 29 00 36 rlwinm r9,r9,0,0,27 ffc04c9c: 91 3f 00 0c stw r9,12(r31) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; ffc04ca0: 91 69 00 00 stw r11,0(r9) for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc04ca4: 39 20 00 01 li r9,1 } /* * Extract a single group record from the database */ static int scangr( ffc04ca8: 81 61 00 0c lwz r11,12(r1) ffc04cac: 39 6b ff ff addi r11,r11,-1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc04cb0: 48 00 00 24 b ffc04cd4 if(*cp == ',') { ffc04cb4: 2f 80 00 2c cmpwi cr7,r0,44 ffc04cb8: 40 be 00 1c bne+ cr7,ffc04cd4 *cp = '\0'; ffc04cbc: 99 4b 00 00 stb r10,0(r11) grp->gr_mem[memcount++] = cp + 1; ffc04cc0: 55 20 10 3a rlwinm r0,r9,2,0,29 } /* * Extract a single group record from the database */ static int scangr( ffc04cc4: 38 eb 00 01 addi r7,r11,1 */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; ffc04cc8: 81 1f 00 0c lwz r8,12(r31) ffc04ccc: 39 29 00 01 addi r9,r9,1 ffc04cd0: 7c e8 01 2e stwx r7,r8,r0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc04cd4: 8c 0b 00 01 lbzu r0,1(r11) ffc04cd8: 2f 80 00 00 cmpwi cr7,r0,0 ffc04cdc: 40 9e ff d8 bne+ cr7,ffc04cb4 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; ffc04ce0: 81 7f 00 0c lwz r11,12(r31) ffc04ce4: 55 29 10 3a rlwinm r9,r9,2,0,29 return 1; ffc04ce8: 3b c0 00 01 li r30,1 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; ffc04cec: 7c 0b 49 2e stwx r0,r11,r9 return 1; } ffc04cf0: 39 61 00 38 addi r11,r1,56 ffc04cf4: 7f c3 f3 78 mr r3,r30 ffc04cf8: 4b ff bb c0 b ffc008b8 <_restgpr_27_x> =============================================================================== ffc04cfc : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc04cfc: 94 21 ff c8 stwu r1,-56(r1) ffc04d00: 7c 08 02 a6 mflr r0 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc04d04: 38 e0 00 00 li r7,0 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc04d08: bf 61 00 24 stmw r27,36(r1) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc04d0c: 3b 81 00 18 addi r28,r1,24 ffc04d10: 3b a1 00 1c addi r29,r1,28 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc04d14: 90 a1 00 18 stw r5,24(r1) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc04d18: 7f 85 e3 78 mr r5,r28 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc04d1c: 7c 7e 1b 78 mr r30,r3 ffc04d20: 90 c1 00 1c stw r6,28(r1) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc04d24: 7f a6 eb 78 mr r6,r29 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc04d28: 7c 9f 23 78 mr r31,r4 ffc04d2c: 90 01 00 3c stw r0,60(r1) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc04d30: 4b ff fd 7d bl ffc04aac ffc04d34: 2f 83 00 00 cmpwi cr7,r3,0 || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; ffc04d38: 3b 60 00 00 li r27,0 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc04d3c: 41 be 00 e0 beq+ cr7,ffc04e1c || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) ffc04d40: 7f c3 f3 78 mr r3,r30 ffc04d44: 38 9f 00 04 addi r4,r31,4 ffc04d48: 7f 85 e3 78 mr r5,r28 ffc04d4c: 7f a6 eb 78 mr r6,r29 ffc04d50: 38 e0 00 00 li r7,0 ffc04d54: 4b ff fd 59 bl ffc04aac ffc04d58: 2f 83 00 00 cmpwi cr7,r3,0 ffc04d5c: 41 be 00 c0 beq+ cr7,ffc04e1c <== NEVER TAKEN || !scanInt(fp, &pwuid) ffc04d60: 7f c3 f3 78 mr r3,r30 ffc04d64: 38 81 00 08 addi r4,r1,8 ffc04d68: 4b ff fc 4d bl ffc049b4 ffc04d6c: 2f 83 00 00 cmpwi cr7,r3,0 ffc04d70: 41 be 00 ac beq+ cr7,ffc04e1c || !scanInt(fp, &pwgid) ffc04d74: 7f c3 f3 78 mr r3,r30 ffc04d78: 38 81 00 0c addi r4,r1,12 ffc04d7c: 4b ff fc 39 bl ffc049b4 ffc04d80: 2f 83 00 00 cmpwi cr7,r3,0 ffc04d84: 41 be 00 98 beq+ cr7,ffc04e1c || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) ffc04d88: 7f c3 f3 78 mr r3,r30 ffc04d8c: 38 9f 00 0c addi r4,r31,12 ffc04d90: 7f 85 e3 78 mr r5,r28 ffc04d94: 7f a6 eb 78 mr r6,r29 ffc04d98: 38 e0 00 00 li r7,0 ffc04d9c: 4b ff fd 11 bl ffc04aac ffc04da0: 2f 83 00 00 cmpwi cr7,r3,0 ffc04da4: 41 be 00 78 beq+ cr7,ffc04e1c <== NEVER TAKEN || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) ffc04da8: 7f c3 f3 78 mr r3,r30 ffc04dac: 38 9f 00 10 addi r4,r31,16 ffc04db0: 7f 85 e3 78 mr r5,r28 ffc04db4: 7f a6 eb 78 mr r6,r29 ffc04db8: 38 e0 00 00 li r7,0 ffc04dbc: 4b ff fc f1 bl ffc04aac ffc04dc0: 2f 83 00 00 cmpwi cr7,r3,0 ffc04dc4: 41 be 00 58 beq+ cr7,ffc04e1c <== NEVER TAKEN || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) ffc04dc8: 7f c3 f3 78 mr r3,r30 ffc04dcc: 38 9f 00 14 addi r4,r31,20 ffc04dd0: 7f 85 e3 78 mr r5,r28 ffc04dd4: 7f a6 eb 78 mr r6,r29 ffc04dd8: 38 e0 00 00 li r7,0 ffc04ddc: 4b ff fc d1 bl ffc04aac ffc04de0: 2f 83 00 00 cmpwi cr7,r3,0 ffc04de4: 41 be 00 38 beq+ cr7,ffc04e1c <== NEVER TAKEN || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) ffc04de8: 7f c3 f3 78 mr r3,r30 ffc04dec: 38 9f 00 18 addi r4,r31,24 ffc04df0: 7f 85 e3 78 mr r5,r28 ffc04df4: 7f a6 eb 78 mr r6,r29 ffc04df8: 38 e0 00 01 li r7,1 ffc04dfc: 4b ff fc b1 bl ffc04aac ffc04e00: 2f 83 00 00 cmpwi cr7,r3,0 ffc04e04: 41 9e 00 18 beq- cr7,ffc04e1c return 0; pwd->pw_uid = pwuid; ffc04e08: 80 01 00 08 lwz r0,8(r1) pwd->pw_gid = pwgid; return 1; ffc04e0c: 3b 60 00 01 li r27,1 || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; ffc04e10: b0 1f 00 08 sth r0,8(r31) pwd->pw_gid = pwgid; ffc04e14: 80 01 00 0c lwz r0,12(r1) ffc04e18: b0 1f 00 0a sth r0,10(r31) return 1; } ffc04e1c: 39 61 00 38 addi r11,r1,56 ffc04e20: 7f 63 db 78 mr r3,r27 ffc04e24: 4b ff ba 94 b ffc008b8 <_restgpr_27_x> =============================================================================== ffc06294 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { ffc06294: 94 21 ff f0 stwu r1,-16(r1) ffc06298: 7c 08 02 a6 mflr r0 ffc0629c: 90 01 00 14 stw r0,20(r1) int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { ffc062a0: 80 04 00 3c lwz r0,60(r4) /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { ffc062a4: bf c1 00 08 stmw r30,8(r1) ffc062a8: 7c 7e 1b 78 mr r30,r3 int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { ffc062ac: 70 09 0e 78 andi. r9,r0,3704 /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { ffc062b0: 7c 9f 23 78 mr r31,r4 int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { ffc062b4: 41 a2 00 38 beq+ ffc062ec <== NEVER TAKEN rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc062b8: 80 64 00 18 lwz r3,24(r4) ffc062bc: 38 a0 00 00 li r5,0 ffc062c0: 38 80 00 00 li r4,0 ffc062c4: 48 00 15 55 bl ffc07818 i = iproc (c, tty); ffc062c8: 7f c3 f3 78 mr r3,r30 ffc062cc: 7f e4 fb 78 mr r4,r31 ffc062d0: 4b ff fe 15 bl ffc060e4 ffc062d4: 7c 7e 1b 78 mr r30,r3 rtems_semaphore_release (tty->osem); ffc062d8: 80 7f 00 18 lwz r3,24(r31) ffc062dc: 48 00 16 65 bl ffc07940 } else { i = iproc (c, tty); } return i; } ffc062e0: 39 61 00 10 addi r11,r1,16 ffc062e4: 7f c3 f3 78 mr r3,r30 ffc062e8: 48 00 df 04 b ffc141ec <_restgpr_30_x> ffc062ec: 80 01 00 14 lwz r0,20(r1) ffc062f0: bb c1 00 08 lmw r30,8(r1) <== NOT EXECUTED ffc062f4: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc062f8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); ffc062fc: 4b ff fd e8 b ffc060e4 <== NOT EXECUTED =============================================================================== ffc07c1c : #include int statvfs (const char *path, struct statvfs *sb) { ffc07c1c: 94 21 ff c8 stwu r1,-56(r1) ffc07c20: 7c 08 02 a6 mflr r0 ffc07c24: bf a1 00 2c stmw r29,44(r1) ffc07c28: 7c 7f 1b 78 mr r31,r3 ffc07c2c: 7c 9e 23 78 mr r30,r4 ffc07c30: 90 01 00 3c stw r0,60(r1) * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) ffc07c34: 48 00 c9 75 bl ffc145a8 ffc07c38: 7c 64 1b 78 mr r4,r3 ffc07c3c: 7f e3 fb 78 mr r3,r31 ffc07c40: 3b e1 00 08 addi r31,r1,8 ffc07c44: 38 a0 00 00 li r5,0 ffc07c48: 7f e6 fb 78 mr r6,r31 ffc07c4c: 38 e0 00 01 li r7,1 ffc07c50: 4b ff ea 4d bl ffc0669c return -1; ffc07c54: 3b a0 ff ff li r29,-1 * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) ffc07c58: 2f 83 00 00 cmpwi cr7,r3,0 ffc07c5c: 40 be 00 3c bne+ cr7,ffc07c98 <== NEVER TAKEN return -1; mt_entry = loc.mt_entry; ffc07c60: 83 a1 00 18 lwz r29,24(r1) fs_mount_root = &mt_entry->mt_fs_root; memset (sb, 0, sizeof (struct statvfs)); ffc07c64: 38 80 00 00 li r4,0 ffc07c68: 38 a0 00 38 li r5,56 ffc07c6c: 7f c3 f3 78 mr r3,r30 ffc07c70: 48 00 b6 c9 bl ffc13338 result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); ffc07c74: 81 3d 00 28 lwz r9,40(r29) ffc07c78: 38 7d 00 1c addi r3,r29,28 ffc07c7c: 80 09 00 44 lwz r0,68(r9) ffc07c80: 7f c4 f3 78 mr r4,r30 ffc07c84: 7c 09 03 a6 mtctr r0 ffc07c88: 4e 80 04 21 bctrl ffc07c8c: 7c 7d 1b 78 mr r29,r3 rtems_filesystem_freenode( &loc ); ffc07c90: 7f e3 fb 78 mr r3,r31 ffc07c94: 4b ff ea fd bl ffc06790 return result; } ffc07c98: 39 61 00 38 addi r11,r1,56 ffc07c9c: 7f a3 eb 78 mr r3,r29 ffc07ca0: 4b ff a9 c0 b ffc02660 <_restgpr_29_x> =============================================================================== ffc066ac : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { ffc066ac: 94 21 ff f0 stwu r1,-16(r1) ffc066b0: 7c 08 02 a6 mflr r0 ffc066b4: 90 01 00 14 stw r0,20(r1) /* * The sync_wrapper() function will operate on the current thread's * reent structure so we will temporarily use that. */ this_reent = t->libc_reent; ffc066b8: 80 03 01 28 lwz r0,296(r3) fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { ffc066bc: bf c1 00 08 stmw r30,8(r1) /* * The sync_wrapper() function will operate on the current thread's * reent structure so we will temporarily use that. */ this_reent = t->libc_reent; if ( this_reent ) { ffc066c0: 2f 80 00 00 cmpwi cr7,r0,0 ffc066c4: 41 9e 00 30 beq- cr7,ffc066f4 <== NEVER TAKEN current_reent = _Thread_Executing->libc_reent; ffc066c8: 3f e0 00 00 lis r31,0 ffc066cc: 3b ff 2d 78 addi r31,r31,11640 ffc066d0: 81 3f 00 0c lwz r9,12(r31) _Thread_Executing->libc_reent = this_reent; _fwalk (t->libc_reent, sync_wrapper); ffc066d4: 3c 80 ff c0 lis r4,-64 ffc066d8: 38 84 66 fc addi r4,r4,26364 * The sync_wrapper() function will operate on the current thread's * reent structure so we will temporarily use that. */ this_reent = t->libc_reent; if ( this_reent ) { current_reent = _Thread_Executing->libc_reent; ffc066dc: 83 c9 01 28 lwz r30,296(r9) _Thread_Executing->libc_reent = this_reent; ffc066e0: 90 09 01 28 stw r0,296(r9) _fwalk (t->libc_reent, sync_wrapper); ffc066e4: 80 63 01 28 lwz r3,296(r3) ffc066e8: 48 00 b2 4d bl ffc11934 <_fwalk> _Thread_Executing->libc_reent = current_reent; ffc066ec: 81 3f 00 0c lwz r9,12(r31) ffc066f0: 93 c9 01 28 stw r30,296(r9) } } ffc066f4: 39 61 00 10 addi r11,r1,16 ffc066f8: 4b ff a6 2c b ffc00d24 <_restgpr_30_x> =============================================================================== ffc07204 : int fd, int opt, struct termios *tp ) { switch (opt) { ffc07204: 2c 04 00 00 cmpwi r4,0 int tcsetattr( int fd, int opt, struct termios *tp ) { ffc07208: 94 21 ff f0 stwu r1,-16(r1) ffc0720c: 7c 08 02 a6 mflr r0 ffc07210: bf c1 00 08 stmw r30,8(r1) ffc07214: 7c 7e 1b 78 mr r30,r3 ffc07218: 7c bf 2b 78 mr r31,r5 ffc0721c: 90 01 00 14 stw r0,20(r1) switch (opt) { ffc07220: 41 82 00 3c beq- ffc0725c ffc07224: 2f 84 00 01 cmpwi cr7,r4,1 ffc07228: 41 9e 00 18 beq- cr7,ffc07240 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc0722c: 48 00 a3 c9 bl ffc115f4 <__errno> ffc07230: 38 00 00 86 li r0,134 ffc07234: 90 03 00 00 stw r0,0(r3) ffc07238: 38 00 ff ff li r0,-1 ffc0723c: 48 00 00 38 b ffc07274 case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) ffc07240: 38 80 00 03 li r4,3 ffc07244: 38 a0 00 00 li r5,0 ffc07248: 4c c6 31 82 crclr 4*cr1+eq ffc0724c: 48 00 78 65 bl ffc0eab0 return -1; ffc07250: 38 00 ff ff li r0,-1 switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) ffc07254: 2f 83 00 00 cmpwi cr7,r3,0 ffc07258: 41 9c 00 1c blt- cr7,ffc07274 <== NEVER TAKEN return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); ffc0725c: 7f c3 f3 78 mr r3,r30 ffc07260: 38 80 00 02 li r4,2 ffc07264: 7f e5 fb 78 mr r5,r31 ffc07268: 4c c6 31 82 crclr 4*cr1+eq ffc0726c: 48 00 78 45 bl ffc0eab0 ffc07270: 7c 60 1b 78 mr r0,r3 } } ffc07274: 39 61 00 10 addi r11,r1,16 ffc07278: 7c 03 03 78 mr r3,r0 ffc0727c: 4b ff a8 a4 b ffc01b20 <_restgpr_30_x> =============================================================================== ffc07e54 : #include int unlink( const char *path ) { ffc07e54: 94 21 ff a8 stwu r1,-88(r1) ffc07e58: 7d 80 00 26 mfcr r12 ffc07e5c: 7c 08 02 a6 mflr r0 ffc07e60: bf 41 00 40 stmw r26,64(r1) ffc07e64: 7c 7c 1b 78 mr r28,r3 ffc07e68: 90 01 00 5c stw r0,92(r1) ffc07e6c: 91 81 00 3c stw r12,60(r1) /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); ffc07e70: 4b ff d1 a5 bl ffc05014 if ( parentpathlen == 0 ) ffc07e74: 7c 7b 1b 79 mr. r27,r3 ffc07e78: 38 c1 00 0c addi r6,r1,12 ffc07e7c: 40 82 00 1c bne- ffc07e98 rtems_filesystem_get_start_loc( path, &i, &parentloc ); ffc07e80: 7f 83 e3 78 mr r3,r28 ffc07e84: 38 81 00 08 addi r4,r1,8 ffc07e88: 7c c5 33 78 mr r5,r6 ffc07e8c: 4b ff e2 89 bl ffc06114 const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false; ffc07e90: 3b a0 00 00 li r29,0 ffc07e94: 48 00 00 28 b ffc07ebc parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, ffc07e98: 7f 83 e3 78 mr r3,r28 ffc07e9c: 7f 64 db 78 mr r4,r27 ffc07ea0: 38 a0 00 02 li r5,2 ffc07ea4: 38 e0 00 00 li r7,0 ffc07ea8: 4b ff d1 11 bl ffc04fb8 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) return -1; ffc07eac: 3b 40 ff ff li r26,-1 else { result = rtems_filesystem_evaluate_path( path, parentpathlen, RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) ffc07eb0: 2f 83 00 00 cmpwi cr7,r3,0 ffc07eb4: 40 9e 00 e4 bne- cr7,ffc07f98 <== NEVER TAKEN return -1; free_parentloc = true; ffc07eb8: 3b a0 00 01 li r29,1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc07ebc: 3b e1 00 20 addi r31,r1,32 ffc07ec0: 3b c1 00 0c addi r30,r1,12 ffc07ec4: 7c be a4 aa lswi r5,r30,20 ffc07ec8: 7c bf a5 aa stswi r5,r31,20 name = path + parentpathlen; ffc07ecc: 7f 9c da 14 add r28,r28,r27 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc07ed0: 7f 83 e3 78 mr r3,r28 ffc07ed4: 48 00 c6 9d bl ffc14570 ffc07ed8: 7c 64 1b 78 mr r4,r3 ffc07edc: 7f 83 e3 78 mr r3,r28 ffc07ee0: 4b ff d1 7d bl ffc0505c ffc07ee4: 7f 9c 1a 14 add r28,r28,r3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc07ee8: 7f 83 e3 78 mr r3,r28 ffc07eec: 48 00 c6 85 bl ffc14570 ffc07ef0: 38 a0 00 00 li r5,0 ffc07ef4: 7c 64 1b 78 mr r4,r3 ffc07ef8: 7f e6 fb 78 mr r6,r31 ffc07efc: 7f 83 e3 78 mr r3,r28 ffc07f00: 38 e0 00 00 li r7,0 ffc07f04: 4b ff d0 31 bl ffc04f34 0, &loc, false ); if ( result != 0 ) { ffc07f08: 2f 83 00 00 cmpwi cr7,r3,0 ffc07f0c: 41 be 00 14 beq+ cr7,ffc07f20 if ( free_parentloc ) ffc07f10: 2f 9d 00 00 cmpwi cr7,r29,0 rtems_filesystem_freenode( &parentloc ); return -1; ffc07f14: 3b 40 ff ff li r26,-1 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) ffc07f18: 41 be 00 80 beq+ cr7,ffc07f98 <== NEVER TAKEN ffc07f1c: 48 00 00 74 b ffc07f90 rtems_filesystem_freenode( &parentloc ); return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { ffc07f20: 81 21 00 2c lwz r9,44(r1) ffc07f24: 7f e3 fb 78 mr r3,r31 ffc07f28: 2e 1d 00 00 cmpwi cr4,r29,0 ffc07f2c: 80 09 00 10 lwz r0,16(r9) ffc07f30: 7c 09 03 a6 mtctr r0 ffc07f34: 4e 80 04 21 bctrl ffc07f38: 2f 83 00 01 cmpwi cr7,r3,1 ffc07f3c: 40 be 00 2c bne+ cr7,ffc07f68 rtems_filesystem_freenode( &loc ); ffc07f40: 7f e3 fb 78 mr r3,r31 ffc07f44: 4b ff d1 69 bl ffc050ac if ( free_parentloc ) ffc07f48: 41 b2 00 0c beq+ cr4,ffc07f54 rtems_filesystem_freenode( &parentloc ); ffc07f4c: 7f c3 f3 78 mr r3,r30 ffc07f50: 4b ff d1 5d bl ffc050ac rtems_set_errno_and_return_minus_one( EISDIR ); ffc07f54: 48 00 b4 7d bl ffc133d0 <__errno> ffc07f58: 38 00 00 15 li r0,21 ffc07f5c: 90 03 00 00 stw r0,0(r3) ffc07f60: 3b 40 ff ff li r26,-1 ffc07f64: 48 00 00 34 b ffc07f98 } result = (*loc.ops->unlink_h)( &parentloc, &loc ); ffc07f68: 81 21 00 2c lwz r9,44(r1) ffc07f6c: 7f c3 f3 78 mr r3,r30 ffc07f70: 7f e4 fb 78 mr r4,r31 ffc07f74: 80 09 00 0c lwz r0,12(r9) ffc07f78: 7c 09 03 a6 mtctr r0 ffc07f7c: 4e 80 04 21 bctrl ffc07f80: 7c 7a 1b 78 mr r26,r3 rtems_filesystem_freenode( &loc ); ffc07f84: 7f e3 fb 78 mr r3,r31 ffc07f88: 4b ff d1 25 bl ffc050ac if ( free_parentloc ) ffc07f8c: 41 b2 00 0c beq+ cr4,ffc07f98 rtems_filesystem_freenode( &parentloc ); ffc07f90: 7f c3 f3 78 mr r3,r30 ffc07f94: 4b ff d1 19 bl ffc050ac return result; } ffc07f98: 81 81 00 3c lwz r12,60(r1) ffc07f9c: 39 61 00 58 addi r11,r1,88 ffc07fa0: 7f 43 d3 78 mr r3,r26 ffc07fa4: 7d 80 81 20 mtcrf 8,r12 ffc07fa8: 48 01 03 0c b ffc182b4 <_restgpr_26_x> =============================================================================== ffc08158 : */ int unmount( const char *path ) { ffc08158: 94 21 ff d0 stwu r1,-48(r1) ffc0815c: 7c 08 02 a6 mflr r0 ffc08160: bf c1 00 28 stmw r30,40(r1) ffc08164: 7c 7f 1b 78 mr r31,r3 ffc08168: 90 01 00 34 stw r0,52(r1) * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) ffc0816c: 48 00 97 2d bl ffc11898 ffc08170: 7c 64 1b 78 mr r4,r3 ffc08174: 7f e3 fb 78 mr r3,r31 ffc08178: 3b e1 00 08 addi r31,r1,8 ffc0817c: 38 a0 00 00 li r5,0 ffc08180: 7f e6 fb 78 mr r6,r31 ffc08184: 38 e0 00 01 li r7,1 ffc08188: 4b ff cd 41 bl ffc04ec8 ffc0818c: 2f 83 00 00 cmpwi cr7,r3,0 ffc08190: 40 9e 01 1c bne- cr7,ffc082ac return -1; mt_entry = loc.mt_entry; ffc08194: 83 c1 00 18 lwz r30,24(r1) /* * Verify this is the root node for the file system to be unmounted. */ if ( fs_root_loc->node_access != loc.node_access ){ ffc08198: 80 01 00 08 lwz r0,8(r1) ffc0819c: 81 3e 00 1c lwz r9,28(r30) ffc081a0: 7f 89 00 00 cmpw cr7,r9,r0 ffc081a4: 41 be 00 18 beq+ cr7,ffc081bc rtems_filesystem_freenode( &loc ); ffc081a8: 7f e3 fb 78 mr r3,r31 ffc081ac: 4b ff ce 11 bl ffc04fbc rtems_set_errno_and_return_minus_one( EACCES ); ffc081b0: 48 00 80 3d bl ffc101ec <__errno> ffc081b4: 38 00 00 0d li r0,13 ffc081b8: 48 00 00 50 b ffc08208 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); ffc081bc: 7f e3 fb 78 mr r3,r31 ffc081c0: 4b ff cd fd bl ffc04fbc * that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry ) ffc081c4: 3d 20 00 00 lis r9,0 ffc081c8: 81 29 27 5c lwz r9,10076(r9) ffc081cc: 80 09 00 14 lwz r0,20(r9) ffc081d0: 7f 80 f0 00 cmpw cr7,r0,r30 ffc081d4: 41 9e 00 2c beq- cr7,ffc08200 /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, ffc081d8: 3c 60 ff c1 lis r3,-63 ffc081dc: 80 9e 00 2c lwz r4,44(r30) ffc081e0: 38 63 81 44 addi r3,r3,-32444 ffc081e4: 4b ff d7 c5 bl ffc059a8 ffc081e8: 2f 83 00 00 cmpwi cr7,r3,0 ffc081ec: 40 9e 00 14 bne- cr7,ffc08200 * Run the file descriptor table to determine if there are any file * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) ffc081f0: 7f c3 f3 78 mr r3,r30 ffc081f4: 4b ff d1 c9 bl ffc053bc ffc081f8: 2f 83 00 01 cmpwi cr7,r3,1 ffc081fc: 40 be 00 14 bne+ cr7,ffc08210 rtems_set_errno_and_return_minus_one( EBUSY ); ffc08200: 48 00 7f ed bl ffc101ec <__errno> ffc08204: 38 00 00 10 li r0,16 ffc08208: 90 03 00 00 stw r0,0(r3) ffc0820c: 48 00 00 a0 b ffc082ac * Allow the file system being unmounted on to do its cleanup. * If it fails it will set the errno to the approprate value * and the fileystem will not be modified. */ if (( fs_mount_loc->ops->unmount_h )( mt_entry ) != 0 ) ffc08210: 81 3e 00 14 lwz r9,20(r30) ffc08214: 7f c3 f3 78 mr r3,r30 return -1; ffc08218: 3b e0 ff ff li r31,-1 * Allow the file system being unmounted on to do its cleanup. * If it fails it will set the errno to the approprate value * and the fileystem will not be modified. */ if (( fs_mount_loc->ops->unmount_h )( mt_entry ) != 0 ) ffc0821c: 80 09 00 28 lwz r0,40(r9) ffc08220: 7c 09 03 a6 mtctr r0 ffc08224: 4e 80 04 21 bctrl ffc08228: 2f 83 00 00 cmpwi cr7,r3,0 ffc0822c: 40 be 00 84 bne+ cr7,ffc082b0 <== NEVER TAKEN * NOTE: Fatal error is called in a case which should never happen * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ ffc08230: 81 3e 00 28 lwz r9,40(r30) ffc08234: 7f c3 f3 78 mr r3,r30 ffc08238: 80 09 00 2c lwz r0,44(r9) ffc0823c: 7c 09 03 a6 mtctr r0 ffc08240: 4e 80 04 21 bctrl ffc08244: 2f 83 00 00 cmpwi cr7,r3,0 ffc08248: 41 be 00 28 beq+ cr7,ffc08270 <== ALWAYS TAKEN if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) ffc0824c: 81 3e 00 14 lwz r9,20(r30) ffc08250: 7f c3 f3 78 mr r3,r30 ffc08254: 80 09 00 20 lwz r0,32(r9) ffc08258: 7c 09 03 a6 mtctr r0 ffc0825c: 4e 80 04 21 bctrl ffc08260: 2f 83 00 00 cmpwi cr7,r3,0 ffc08264: 41 be 00 4c beq+ cr7,ffc082b0 rtems_fatal_error_occurred( 0 ); ffc08268: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc0826c: 48 00 11 ad bl ffc09418 <== NOT EXECUTED rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); ffc08270: 3f e0 00 00 lis r31,0 ffc08274: 80 7f 27 dc lwz r3,10204(r31) ffc08278: 38 80 00 00 li r4,0 ffc0827c: 38 a0 00 00 li r5,0 ffc08280: 48 00 0a 1d bl ffc08c9c */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc08284: 7f c3 f3 78 mr r3,r30 ffc08288: 48 00 15 35 bl ffc097bc <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc0828c: 80 7f 27 dc lwz r3,10204(r31) */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; ffc08290: 3b e0 00 00 li r31,0 ffc08294: 48 00 0b 31 bl ffc08dc4 /* * Free the memory node that was allocated in mount * Free the memory associated with the extracted mount table entry. */ rtems_filesystem_freenode( fs_mount_loc ); ffc08298: 38 7e 00 08 addi r3,r30,8 ffc0829c: 4b ff cd 21 bl ffc04fbc free( mt_entry ); ffc082a0: 7f c3 f3 78 mr r3,r30 ffc082a4: 4b ff cd 45 bl ffc04fe8 return 0; ffc082a8: 48 00 00 08 b ffc082b0 * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; ffc082ac: 3b e0 ff ff li r31,-1 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } ffc082b0: 39 61 00 30 addi r11,r1,48 ffc082b4: 7f e3 fb 78 mr r3,r31 ffc082b8: 48 00 da 18 b ffc15cd0 <_restgpr_30_x> =============================================================================== ffc06dc0 : */ void vprintk( const char *fmt, va_list ap ) { ffc06dc0: 94 21 ff a8 stwu r1,-88(r1) ffc06dc4: 7c 08 02 a6 mflr r0 ffc06dc8: be 81 00 28 stmw r20,40(r1) ffc06dcc: 7c 7f 1b 78 mr r31,r3 ffc06dd0: 7c 9e 23 78 mr r30,r4 ffc06dd4: 90 01 00 5c stw r0,92(r1) unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); ffc06dd8: 3f 60 00 00 lis r27,0 * console is not yet initialized or in ISR's. * * Arguments: * as in printf: fmt - format string, ... - unnamed arguments. */ void vprintk( ffc06ddc: 3a 81 00 08 addi r20,r1,8 for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); ffc06de0: 3e a0 ff c1 lis r21,-63 char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { str = ""; ffc06de4: 3e c0 ff c1 lis r22,-63 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { ffc06de8: 48 00 03 28 b ffc07110 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { ffc06dec: 2f 83 00 25 cmpwi cr7,r3,37 ffc06df0: 40 9e 01 f4 bne- cr7,ffc06fe4 BSP_output_char(*fmt); continue; } fmt++; if (*fmt == '0' ) { ffc06df4: 8c 1f 00 01 lbzu r0,1(r31) unsigned base = 0; unsigned width = 0; bool lflag = false; bool minus = false; bool sign = false; char lead = ' '; ffc06df8: 3a e0 00 20 li r23,32 if (*fmt != '%') { BSP_output_char(*fmt); continue; } fmt++; if (*fmt == '0' ) { ffc06dfc: 2f 80 00 30 cmpwi cr7,r0,48 ffc06e00: 40 be 00 0c bne+ cr7,ffc06e0c lead = '0'; fmt++; ffc06e04: 3b ff 00 01 addi r31,r31,1 BSP_output_char(*fmt); continue; } fmt++; if (*fmt == '0' ) { lead = '0'; ffc06e08: 3a e0 00 30 li r23,48 fmt++; } if (*fmt == '-' ) { ffc06e0c: 88 1f 00 00 lbz r0,0(r31) { for (; *fmt != '\0'; fmt++) { unsigned base = 0; unsigned width = 0; bool lflag = false; bool minus = false; ffc06e10: 3b 00 00 00 li r24,0 fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } if (*fmt == '-' ) { ffc06e14: 2f 80 00 2d cmpwi cr7,r0,45 ffc06e18: 40 be 00 0c bne+ cr7,ffc06e24 minus = true; fmt++; ffc06e1c: 3b ff 00 01 addi r31,r31,1 if (*fmt == '0' ) { lead = '0'; fmt++; } if (*fmt == '-' ) { minus = true; ffc06e20: 3b 00 00 01 li r24,1 { for (; *fmt != '\0'; fmt++) { unsigned base = 0; unsigned width = 0; bool lflag = false; bool minus = false; ffc06e24: 3b 80 00 00 li r28,0 ffc06e28: 48 00 00 10 b ffc06e38 if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; ffc06e2c: 1f 9c 00 0a mulli r28,r28,10 width += ((unsigned) *fmt - '0'); fmt++; ffc06e30: 3b ff 00 01 addi r31,r31,1 minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += ((unsigned) *fmt - '0'); ffc06e34: 7f 80 e2 14 add r28,r0,r28 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { ffc06e38: 88 7f 00 00 lbz r3,0(r31) ffc06e3c: 38 03 ff d0 addi r0,r3,-48 ffc06e40: 54 09 06 3e clrlwi r9,r0,24 ffc06e44: 2b 89 00 09 cmplwi cr7,r9,9 ffc06e48: 40 9d ff e4 ble+ cr7,ffc06e2c width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { ffc06e4c: 2f 83 00 6c cmpwi cr7,r3,108 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { ffc06e50: 7f 99 e3 78 mr r25,r28 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { ffc06e54: 40 be 00 08 bne+ cr7,ffc06e5c lflag = true; c = *++fmt; ffc06e58: 8c 7f 00 01 lbzu r3,1(r31) } if ( c == 'c' ) { ffc06e5c: 2f 83 00 63 cmpwi cr7,r3,99 ffc06e60: 40 be 00 40 bne+ cr7,ffc06ea0 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); ffc06e64: 89 7e 00 00 lbz r11,0(r30) ffc06e68: 2b 8b 00 08 cmplwi cr7,r11,8 ffc06e6c: 40 9c 00 1c bge- cr7,ffc06e88 <== NEVER TAKEN ffc06e70: 81 3e 00 08 lwz r9,8(r30) ffc06e74: 55 60 10 3a rlwinm r0,r11,2,0,29 ffc06e78: 39 6b 00 01 addi r11,r11,1 ffc06e7c: 7d 29 02 14 add r9,r9,r0 ffc06e80: 99 7e 00 00 stb r11,0(r30) ffc06e84: 48 00 00 10 b ffc06e94 ffc06e88: 81 3e 00 04 lwz r9,4(r30) <== NOT EXECUTED ffc06e8c: 38 09 00 04 addi r0,r9,4 <== NOT EXECUTED ffc06e90: 90 1e 00 04 stw r0,4(r30) <== NOT EXECUTED BSP_output_char(chr); ffc06e94: 80 1b 26 dc lwz r0,9948(r27) ffc06e98: 88 69 00 03 lbz r3,3(r9) ffc06e9c: 48 00 01 4c b ffc06fe8 continue; } if ( c == 's' ) { ffc06ea0: 2f 83 00 73 cmpwi cr7,r3,115 ffc06ea4: 40 be 00 e8 bne+ cr7,ffc06f8c unsigned i, len; char *s, *str; str = va_arg(ap, char *); ffc06ea8: 89 7e 00 00 lbz r11,0(r30) ffc06eac: 2b 8b 00 08 cmplwi cr7,r11,8 ffc06eb0: 40 9c 00 1c bge- cr7,ffc06ecc <== NEVER TAKEN ffc06eb4: 81 3e 00 08 lwz r9,8(r30) ffc06eb8: 55 60 10 3a rlwinm r0,r11,2,0,29 ffc06ebc: 39 6b 00 01 addi r11,r11,1 ffc06ec0: 7d 29 02 14 add r9,r9,r0 ffc06ec4: 99 7e 00 00 stb r11,0(r30) ffc06ec8: 48 00 00 10 b ffc06ed8 ffc06ecc: 81 3e 00 04 lwz r9,4(r30) <== NOT EXECUTED ffc06ed0: 38 09 00 04 addi r0,r9,4 <== NOT EXECUTED ffc06ed4: 90 1e 00 04 stw r0,4(r30) <== NOT EXECUTED ffc06ed8: 83 49 00 00 lwz r26,0(r9) if ( str == NULL ) { ffc06edc: 2f 9a 00 00 cmpwi cr7,r26,0 ffc06ee0: 40 be 00 08 bne+ cr7,ffc06ee8 str = ""; ffc06ee4: 3b 56 5e 97 addi r26,r22,24215 } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) ffc06ee8: 3b a0 00 00 li r29,0 ffc06eec: 48 00 00 08 b ffc06ef4 ffc06ef0: 3b bd 00 01 addi r29,r29,1 ffc06ef4: 7c 1a e8 ae lbzx r0,r26,r29 ffc06ef8: 2f 80 00 00 cmpwi cr7,r0,0 ffc06efc: 40 9e ff f4 bne+ cr7,ffc06ef0 ; /* leading spaces */ if ( !minus ) ffc06f00: 2f 98 00 00 cmpwi cr7,r24,0 ffc06f04: 7f b9 eb 78 mr r25,r29 ffc06f08: 41 9e 00 1c beq- cr7,ffc06f24 ffc06f0c: 48 00 00 20 b ffc06f2c for ( i=len ; i BSP_output_char(' '); /* no width option */ if (width == 0) { ffc06f2c: 2f 9c 00 00 cmpwi cr7,r28,0 ffc06f30: 40 9e 00 10 bne- cr7,ffc06f40 width = len; } /* output the string */ for ( i=0 ; i ffc06f3c: 7f bc eb 78 mr r28,r29 * console is not yet initialized or in ISR's. * * Arguments: * as in printf: fmt - format string, ... - unnamed arguments. */ void vprintk( ffc06f40: 3b 5a ff ff addi r26,r26,-1 ffc06f44: 48 00 00 10 b ffc06f54 width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); /* trailing spaces */ if ( minus ) ffc06f60: 2f 98 00 00 cmpwi cr7,r24,0 ffc06f64: 41 9e 01 a8 beq- cr7,ffc0710c ffc06f68: 48 00 00 18 b ffc06f80 for ( i=len ; i ffc06f88: 48 00 01 84 b ffc0710c continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { ffc06f8c: 2f 83 00 6f cmpwi cr7,r3,111 ffc06f90: 41 9e 00 64 beq- cr7,ffc06ff4 <== NEVER TAKEN ffc06f94: 2f 83 00 4f cmpwi cr7,r3,79 ffc06f98: 41 9e 00 5c beq- cr7,ffc06ff4 base = 8; sign = false; } else if ( c == 'i' || c == 'I' || ffc06f9c: 2f 83 00 69 cmpwi cr7,r3,105 ffc06fa0: 41 9e 00 60 beq- cr7,ffc07000 ffc06fa4: 2f 83 00 49 cmpwi cr7,r3,73 ffc06fa8: 41 9e 00 58 beq- cr7,ffc07000 ffc06fac: 2f 83 00 64 cmpwi cr7,r3,100 ffc06fb0: 41 9e 00 50 beq- cr7,ffc07000 c == 'd' || c == 'D' ) { ffc06fb4: 2f 83 00 44 cmpwi cr7,r3,68 ffc06fb8: 41 9e 00 48 beq- cr7,ffc07000 base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { ffc06fbc: 2f 83 00 75 cmpwi cr7,r3,117 ffc06fc0: 41 9e 00 48 beq- cr7,ffc07008 ffc06fc4: 2f 83 00 55 cmpwi cr7,r3,85 ffc06fc8: 41 9e 00 40 beq- cr7,ffc07008 base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { ffc06fcc: 2f 83 00 78 cmpwi cr7,r3,120 ffc06fd0: 41 9e 00 44 beq- cr7,ffc07014 ffc06fd4: 2f 83 00 58 cmpwi cr7,r3,88 ffc06fd8: 41 9e 00 3c beq- cr7,ffc07014 base = 16; sign = false; } else if ( c == 'p' ) { ffc06fdc: 2f 83 00 70 cmpwi cr7,r3,112 ffc06fe0: 41 9e 00 34 beq- cr7,ffc07014 base = 16; sign = false; lflag = true; } else { BSP_output_char(c); ffc06fe4: 80 1b 26 dc lwz r0,9948(r27) ffc06fe8: 7c 09 03 a6 mtctr r0 ffc06fec: 4e 80 04 21 bctrl continue; ffc06ff0: 48 00 01 1c b ffc0710c continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { base = 8; sign = false; ffc06ff4: 38 00 00 00 li r0,0 ffc06ff8: 3b a0 00 08 li r29,8 ffc06ffc: 48 00 00 20 b ffc0701c } else if ( c == 'i' || c == 'I' || c == 'd' || c == 'D' ) { base = 10; sign = true; ffc07000: 38 00 00 01 li r0,1 ffc07004: 48 00 00 08 b ffc0700c } else if ( c == 'u' || c == 'U' ) { base = 10; sign = false; ffc07008: 38 00 00 00 li r0,0 ffc0700c: 3b a0 00 0a li r29,10 ffc07010: 48 00 00 0c b ffc0701c } else if ( c == 'x' || c == 'X' ) { base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; ffc07014: 38 00 00 00 li r0,0 ffc07018: 3b a0 00 10 li r29,16 BSP_output_char(c); continue; } printNum( lflag ? va_arg(ap, long) : (long) va_arg(ap, int), ffc0701c: 89 7e 00 00 lbz r11,0(r30) ffc07020: 2b 8b 00 08 cmplwi cr7,r11,8 ffc07024: 40 9c 00 1c bge- cr7,ffc07040 ffc07028: 81 5e 00 08 lwz r10,8(r30) ffc0702c: 55 69 10 3a rlwinm r9,r11,2,0,29 ffc07030: 39 6b 00 01 addi r11,r11,1 ffc07034: 7d 2a 4a 14 add r9,r10,r9 ffc07038: 99 7e 00 00 stb r11,0(r30) } else { BSP_output_char(c); continue; } printNum( ffc0703c: 48 00 00 10 b ffc0704c lflag ? va_arg(ap, long) : (long) va_arg(ap, int), ffc07040: 81 3e 00 04 lwz r9,4(r30) ffc07044: 39 69 00 04 addi r11,r9,4 ffc07048: 91 7e 00 04 stw r11,4(r30) unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { ffc0704c: 2f 80 00 00 cmpwi cr7,r0,0 } else { BSP_output_char(c); continue; } printNum( ffc07050: 83 49 00 00 lwz r26,0(r9) unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { ffc07054: 41 9e 00 30 beq- cr7,ffc07084 ffc07058: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0705c: 40 bc 00 28 bge+ cr7,ffc07084 BSP_output_char('-'); ffc07060: 80 1b 26 dc lwz r0,9948(r27) ffc07064: 38 60 00 2d li r3,45 unsigned_num = (unsigned long) -num; ffc07068: 7f 5a 00 d0 neg r26,r26 unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); ffc0706c: 7c 09 03 a6 mtctr r0 ffc07070: 4e 80 04 21 bctrl unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; ffc07074: 2f 9c 00 00 cmpwi cr7,r28,0 ffc07078: 41 9e 00 10 beq- cr7,ffc07088 ffc0707c: 3b 3c ff ff addi r25,r28,-1 ffc07080: 48 00 00 08 b ffc07088 } else { unsigned_num = (unsigned long) num; ffc07084: 7f 99 e3 78 mr r25,r28 } count = 0; ffc07088: 3b 80 00 00 li r28,0 ffc0708c: 48 00 00 14 b ffc070a0 while ((n = unsigned_num / base) > 0) { toPrint[count++] = (char) (unsigned_num - (n * base)); ffc07090: 7d 60 e9 d6 mullw r11,r0,r29 ffc07094: 7f 4b d0 50 subf r26,r11,r26 ffc07098: 9b 49 00 08 stb r26,8(r9) ffc0709c: 7c 1a 03 78 mr r26,r0 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { ffc070a0: 7c 1a eb 96 divwu r0,r26,r29 ffc070a4: 2f 80 00 00 cmpwi cr7,r0,0 ffc070a8: 7d 21 e2 14 add r9,r1,r28 ffc070ac: 3b 9c 00 01 addi r28,r28,1 ffc070b0: 40 9e ff e0 bne+ cr7,ffc07090 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; ffc070b4: 9b 49 00 08 stb r26,8(r9) for (n=maxwidth ; n > count; n-- ) ffc070b8: 7f 3d cb 78 mr r29,r25 ffc070bc: 48 00 00 18 b ffc070d4 BSP_output_char(lead); ffc070c0: 80 1b 26 dc lwz r0,9948(r27) ffc070c4: 7e e3 bb 78 mr r3,r23 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) ffc070c8: 3b bd ff ff addi r29,r29,-1 BSP_output_char(lead); ffc070cc: 7c 09 03 a6 mtctr r0 ffc070d0: 4e 80 04 21 bctrl toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) ffc070d4: 7f 9d e0 40 cmplw cr7,r29,r28 ffc070d8: 41 9d ff e8 bgt+ cr7,ffc070c0 * console is not yet initialized or in ISR's. * * Arguments: * as in printf: fmt - format string, ... - unnamed arguments. */ void vprintk( ffc070dc: 7f 54 e2 14 add r26,r20,r28 ffc070e0: 3b a0 00 00 li r29,0 ffc070e4: 48 00 00 20 b ffc07104 for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); ffc070e8: 8d 3a ff ff lbzu r9,-1(r26) ffc070ec: 39 75 5e 98 addi r11,r21,24216 ffc070f0: 80 1b 26 dc lwz r0,9948(r27) toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { ffc070f4: 3b bd 00 01 addi r29,r29,1 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); ffc070f8: 7c 6b 48 ae lbzx r3,r11,r9 ffc070fc: 7c 09 03 a6 mtctr r0 ffc07100: 4e 80 04 21 bctrl toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { ffc07104: 7f 9d e0 40 cmplw cr7,r29,r28 ffc07108: 41 9c ff e0 blt+ cr7,ffc070e8 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { ffc0710c: 3b ff 00 01 addi r31,r31,1 ffc07110: 88 7f 00 00 lbz r3,0(r31) ffc07114: 2f 83 00 00 cmpwi cr7,r3,0 ffc07118: 40 9e fc d4 bne+ cr7,ffc06dec sign, width, lead ); } } ffc0711c: 39 61 00 58 addi r11,r1,88 ffc07120: 48 00 d0 a4 b ffc141c4 <_restgpr_20_x> =============================================================================== ffc14ae8 : ssize_t write( int fd, const void *buffer, size_t count ) { ffc14ae8: 7c 08 02 a6 mflr r0 ffc14aec: 7c 2b 0b 78 mr r11,r1 ffc14af0: 94 21 ff f0 stwu r1,-16(r1) ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc14af4: 3d 40 00 00 lis r10,0 ssize_t write( int fd, const void *buffer, size_t count ) { ffc14af8: 90 01 00 14 stw r0,20(r1) ffc14afc: 4b ff f6 a9 bl ffc141a4 <_savegpr_31> ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc14b00: 80 0a 26 8c lwz r0,9868(r10) ffc14b04: 7f 83 00 40 cmplw cr7,r3,r0 ffc14b08: 40 9c 00 20 bge- cr7,ffc14b28 iop = rtems_libio_iop( fd ); ffc14b0c: 3d 40 00 00 lis r10,0 ffc14b10: 83 ea 27 48 lwz r31,10056(r10) ffc14b14: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc14b18: 7f ff 1a 14 add r31,r31,r3 rtems_libio_check_is_open( iop ); ffc14b1c: 80 1f 00 18 lwz r0,24(r31) ffc14b20: 70 0a 01 00 andi. r10,r0,256 ffc14b24: 40 a2 00 10 bne+ ffc14b34 ffc14b28: 4b ff a6 e9 bl ffc0f210 <__errno> ffc14b2c: 38 00 00 09 li r0,9 ffc14b30: 48 00 00 28 b ffc14b58 rtems_libio_check_buffer( buffer ); ffc14b34: 2f 84 00 00 cmpwi cr7,r4,0 ffc14b38: 41 9e 00 18 beq- cr7,ffc14b50 <== NEVER TAKEN rtems_libio_check_count( count ); ffc14b3c: 2f 85 00 00 cmpwi cr7,r5,0 ffc14b40: 38 60 00 00 li r3,0 ffc14b44: 41 9e 00 5c beq- cr7,ffc14ba0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); ffc14b48: 70 09 00 04 andi. r9,r0,4 ffc14b4c: 40 a2 00 18 bne+ ffc14b64 ffc14b50: 4b ff a6 c1 bl ffc0f210 <__errno> ffc14b54: 38 00 00 16 li r0,22 ffc14b58: 90 03 00 00 stw r0,0(r3) ffc14b5c: 38 60 ff ff li r3,-1 ffc14b60: 48 00 00 40 b ffc14ba0 /* * Now process the write() request. */ rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count ); ffc14b64: 81 3f 00 24 lwz r9,36(r31) ffc14b68: 7f e3 fb 78 mr r3,r31 ffc14b6c: 80 09 00 0c lwz r0,12(r9) ffc14b70: 7c 09 03 a6 mtctr r0 ffc14b74: 4e 80 04 21 bctrl if ( rc > 0 ) ffc14b78: 2c 03 00 00 cmpwi r3,0 ffc14b7c: 40 81 00 24 ble- ffc14ba0 iop->offset += rc; ffc14b80: 81 7f 00 10 lwz r11,16(r31) ffc14b84: 7c 6a 1b 78 mr r10,r3 ffc14b88: 81 9f 00 14 lwz r12,20(r31) ffc14b8c: 7c 69 fe 70 srawi r9,r3,31 ffc14b90: 7d 4a 60 14 addc r10,r10,r12 ffc14b94: 7d 29 59 14 adde r9,r9,r11 ffc14b98: 91 3f 00 10 stw r9,16(r31) ffc14b9c: 91 5f 00 14 stw r10,20(r31) return rc; } ffc14ba0: 39 61 00 10 addi r11,r1,16 ffc14ba4: 4b ff f6 4c b ffc141f0 <_restgpr_31_x> =============================================================================== ffc0867c : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { ffc0867c: 94 21 ff d8 stwu r1,-40(r1) ffc08680: 7c 08 02 a6 mflr r0 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); ffc08684: 3d 20 00 00 lis r9,0 ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { ffc08688: 90 01 00 2c stw r0,44(r1) int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); ffc0868c: 80 09 26 8c lwz r0,9868(r9) ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { ffc08690: bf 21 00 0c stmw r25,12(r1) ffc08694: 7c ba 2b 78 mr r26,r5 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); ffc08698: 7f 83 00 40 cmplw cr7,r3,r0 ffc0869c: 40 9c 00 20 bge- cr7,ffc086bc iop = rtems_libio_iop( fd ); ffc086a0: 3d 20 00 00 lis r9,0 ffc086a4: 83 69 27 48 lwz r27,10056(r9) ffc086a8: 54 63 30 32 rlwinm r3,r3,6,0,25 ffc086ac: 7f 7b 1a 14 add r27,r27,r3 rtems_libio_check_is_open( iop ); ffc086b0: 80 1b 00 18 lwz r0,24(r27) ffc086b4: 70 09 01 00 andi. r9,r0,256 ffc086b8: 40 a2 00 10 bne+ ffc086c8 ffc086bc: 48 00 7d e1 bl ffc1049c <__errno> ffc086c0: 38 00 00 09 li r0,9 ffc086c4: 48 00 00 78 b ffc0873c rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); ffc086c8: 70 09 00 04 andi. r9,r0,4 ffc086cc: 41 82 00 68 beq- ffc08734 <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) ffc086d0: 2f 84 00 00 cmpwi cr7,r4,0 ffc086d4: 41 9e 00 60 beq- cr7,ffc08734 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) ffc086d8: 2f 85 00 00 cmpwi cr7,r5,0 ffc086dc: 40 9d 00 58 ble- cr7,ffc08734 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) ffc086e0: 2f 85 04 00 cmpwi cr7,r5,1024 ffc086e4: 41 9d 00 50 bgt- cr7,ffc08734 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ffc086e8: 7c 9c 23 78 mr r28,r4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) ffc086ec: 7c a9 03 a6 mtctr r5 ffc086f0: 7c 89 23 78 mr r9,r4 ffc086f4: 38 00 00 01 li r0,1 ffc086f8: 39 60 00 00 li r11,0 ffc086fc: 48 00 00 08 b ffc08704 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { ffc08700: 7d 4b 53 78 mr r11,r10 /* * iov[v].iov_len cannot be less than 0 because size_t is unsigned. * So we only check for zero. */ if ( iov[v].iov_base == 0 ) ffc08704: 81 49 00 00 lwz r10,0(r9) ffc08708: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0870c: 41 9e 00 28 beq- cr7,ffc08734 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) ffc08710: 81 49 00 04 lwz r10,4(r9) all_zeros = false; ffc08714: 31 0a ff ff addic r8,r10,-1 ffc08718: 7d 08 41 10 subfe r8,r8,r8 /* check for wrap */ old = total; total += iov[v].iov_len; ffc0871c: 7d 4b 52 14 add r10,r11,r10 if ( total < old || total > SSIZE_MAX ) ffc08720: 7f 8a 58 00 cmpw cr7,r10,r11 */ if ( iov[v].iov_base == 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) all_zeros = false; ffc08724: 7c 00 40 38 and r0,r0,r8 /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) ffc08728: 41 9c 00 0c blt- cr7,ffc08734 ffc0872c: 2f 8a 7f ff cmpwi cr7,r10,32767 ffc08730: 40 bd 00 14 ble+ cr7,ffc08744 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ffc08734: 48 00 7d 69 bl ffc1049c <__errno> ffc08738: 38 00 00 16 li r0,22 ffc0873c: 90 03 00 00 stw r0,0(r3) ffc08740: 48 00 00 90 b ffc087d0 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { ffc08744: 39 29 00 08 addi r9,r9,8 ffc08748: 42 00 ff b8 bdnz+ ffc08700 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { ffc0874c: 2f 80 00 00 cmpwi cr7,r0,0 return 0; ffc08750: 3b a0 00 00 li r29,0 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { ffc08754: 40 9e 00 80 bne- cr7,ffc087d4 ffc08758: 3b 20 00 00 li r25,0 /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) ffc0875c: 80 bc 00 04 lwz r5,4(r28) ffc08760: 2f 85 00 00 cmpwi cr7,r5,0 ffc08764: 41 be 00 58 beq+ cr7,ffc087bc <== NEVER TAKEN continue; bytes = (*iop->pathinfo.handlers->write_h)( ffc08768: 81 3b 00 24 lwz r9,36(r27) ffc0876c: 7f 63 db 78 mr r3,r27 ffc08770: 80 9c 00 00 lwz r4,0(r28) ffc08774: 80 09 00 0c lwz r0,12(r9) ffc08778: 7c 09 03 a6 mtctr r0 ffc0877c: 4e 80 04 21 bctrl iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) ffc08780: 2c 03 00 00 cmpwi r3,0 ffc08784: 41 80 00 4c blt- ffc087d0 <== NEVER TAKEN return -1; if ( bytes > 0 ) { ffc08788: 41 82 00 28 beq- ffc087b0 <== NEVER TAKEN iop->offset += bytes; ffc0878c: 81 3b 00 10 lwz r9,16(r27) ffc08790: 7c 7f 1b 78 mr r31,r3 ffc08794: 81 5b 00 14 lwz r10,20(r27) ffc08798: 7c 7e fe 70 srawi r30,r3,31 total += bytes; ffc0879c: 7f bd 1a 14 add r29,r29,r3 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; ffc087a0: 7d 4a f8 14 addc r10,r10,r31 ffc087a4: 7d 29 f1 14 adde r9,r9,r30 ffc087a8: 91 3b 00 10 stw r9,16(r27) ffc087ac: 91 5b 00 14 stw r10,20(r27) total += bytes; } if (bytes != iov[ v ].iov_len) ffc087b0: 80 1c 00 04 lwz r0,4(r28) ffc087b4: 7f 83 00 00 cmpw cr7,r3,r0 ffc087b8: 40 9e 00 1c bne- cr7,ffc087d4 <== NEVER TAKEN } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc087bc: 3b 39 00 01 addi r25,r25,1 ffc087c0: 7f 99 d0 00 cmpw cr7,r25,r26 ffc087c4: 3b 9c 00 08 addi r28,r28,8 ffc087c8: 41 9c ff 94 blt+ cr7,ffc0875c ffc087cc: 48 00 00 08 b ffc087d4 iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) return -1; ffc087d0: 3b a0 ff ff li r29,-1 if (bytes != iov[ v ].iov_len) break; } return total; } ffc087d4: 39 61 00 28 addi r11,r1,40 ffc087d8: 7f a3 eb 78 mr r3,r29 ffc087dc: 4b ff 84 04 b ffc00be0 <_restgpr_25_x>