=============================================================================== ffc0cd6c : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { ffc0cd6c: 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; ffc0cd70: 81 23 00 10 lwz r9,16(r3) switch( node->type ) { ffc0cd74: 80 0b 00 4c lwz r0,76(r11) ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; ffc0cd78: 81 69 00 34 lwz r11,52(r9) switch( node->type ) { ffc0cd7c: 2b 80 00 07 cmplwi cr7,r0,7 ffc0cd80: 41 9d 00 28 bgt- cr7,ffc0cda8 <== NEVER TAKEN ffc0cd84: 3d 20 ff c2 lis r9,-62 ffc0cd88: 39 29 f7 a8 addi r9,r9,-2136 ffc0cd8c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0cd90: 7c 09 00 2e lwzx r0,r9,r0 ffc0cd94: 7d 20 4a 14 add r9,r0,r9 ffc0cd98: 7d 29 03 a6 mtctr r9 ffc0cd9c: 4e 80 04 20 bctr case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; ffc0cda0: 80 0b 00 0c lwz r0,12(r11) ffc0cda4: 90 03 00 08 stw r0,8(r3) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } ffc0cda8: 38 60 00 00 li r3,0 ffc0cdac: 4e 80 00 20 blr break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; ffc0cdb0: 80 0b 00 08 lwz r0,8(r11) ffc0cdb4: 90 03 00 08 stw r0,8(r3) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } ffc0cdb8: 38 60 00 00 li r3,0 ffc0cdbc: 4e 80 00 20 blr case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; ffc0cdc0: 3d 20 ff c2 lis r9,-62 ffc0cdc4: 38 09 f8 b8 addi r0,r9,-1864 ffc0cdc8: 90 03 00 08 stw r0,8(r3) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } ffc0cdcc: 38 60 00 00 li r3,0 ffc0cdd0: 4e 80 00 20 blr break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; ffc0cdd4: 3d 20 ff c2 lis r9,-62 ffc0cdd8: 38 09 f7 c8 addi r0,r9,-2104 ffc0cddc: 90 03 00 08 stw r0,8(r3) break; } return 0; } ffc0cde0: 38 60 00 00 li r3,0 ffc0cde4: 4e 80 00 20 blr switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; ffc0cde8: 3d 20 ff c2 lis r9,-62 ffc0cdec: 38 09 f8 80 addi r0,r9,-1920 ffc0cdf0: 90 03 00 08 stw r0,8(r3) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } ffc0cdf4: 38 60 00 00 li r3,0 ffc0cdf8: 4e 80 00 20 blr =============================================================================== ffc111f8 : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { ffc111f8: 94 21 ff d8 stwu r1,-40(r1) ffc111fc: 7c 08 02 a6 mflr r0 ffc11200: 93 81 00 18 stw r28,24(r1) ffc11204: 7c 9c 23 78 mr r28,r4 struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); ffc11208: 38 80 00 68 li r4,104 IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { ffc1120c: 93 a1 00 1c stw r29,28(r1) ffc11210: 7c 7d 1b 78 mr r29,r3 struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); ffc11214: 38 60 00 01 li r3,1 IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { ffc11218: 93 c1 00 20 stw r30,32(r1) ffc1121c: 7c be 2b 78 mr r30,r5 ffc11220: 93 e1 00 24 stw r31,36(r1) ffc11224: 90 01 00 2c stw r0,44(r1) struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); ffc11228: 4b ff ce b1 bl ffc0e0d8 if ( !node ) ffc1122c: 7c 7f 1b 79 mr. r31,r3 ffc11230: 41 82 00 50 beq- ffc11280 <== NEVER TAKEN return NULL; /* * Fill in the basic information */ node->st_nlink = 1; ffc11234: 38 00 00 01 li r0,1 node->type = type; ffc11238: 93 bf 00 4c stw r29,76(r31) strncpy( node->name, name, IMFS_NAME_MAX ); ffc1123c: 7f 84 e3 78 mr r4,r28 return NULL; /* * Fill in the basic information */ node->st_nlink = 1; ffc11240: b0 1f 00 34 sth r0,52(r31) node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); ffc11244: 38 a0 00 20 li r5,32 ffc11248: 38 7f 00 0c addi r3,r31,12 ffc1124c: 48 00 33 c1 bl ffc1460c /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; ffc11250: 93 df 00 30 stw r30,48(r31) #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); ffc11254: 4b ff d1 05 bl ffc0e358 ffc11258: b0 7f 00 3c sth r3,60(r31) node->st_gid = getegid(); ffc1125c: 4b ff d0 ed bl ffc0e348 #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); ffc11260: 38 80 00 00 li r4,0 * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); ffc11264: b0 7f 00 3e sth r3,62(r31) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); ffc11268: 38 61 00 08 addi r3,r1,8 ffc1126c: 4b ff d0 fd bl ffc0e368 node->stat_atime = (time_t) tv.tv_sec; ffc11270: 80 01 00 08 lwz r0,8(r1) node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; ffc11274: 90 1f 00 48 stw r0,72(r31) /* * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; ffc11278: 90 1f 00 40 stw r0,64(r31) node->stat_mtime = (time_t) tv.tv_sec; ffc1127c: 90 1f 00 44 stw r0,68(r31) node->stat_ctime = (time_t) tv.tv_sec; return node; } ffc11280: 80 01 00 2c lwz r0,44(r1) ffc11284: 7f e3 fb 78 mr r3,r31 ffc11288: 83 81 00 18 lwz r28,24(r1) ffc1128c: 7c 08 03 a6 mtlr r0 ffc11290: 83 a1 00 1c lwz r29,28(r1) ffc11294: 83 c1 00 20 lwz r30,32(r1) ffc11298: 83 e1 00 24 lwz r31,36(r1) ffc1129c: 38 21 00 28 addi r1,r1,40 ffc112a0: 4e 80 00 20 blr =============================================================================== ffc130ec : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { ffc130ec: 94 21 ff d8 stwu r1,-40(r1) ffc130f0: 7c 08 02 a6 mflr r0 ffc130f4: 90 01 00 2c stw r0,44(r1) ffc130f8: 93 e1 00 24 stw r31,36(r1) IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; ffc130fc: 83 e3 00 00 lwz r31,0(r3) int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { ffc13100: 93 a1 00 1c stw r29,28(r1) ffc13104: 7c bd 2b 78 mr r29,r5 ffc13108: 93 c1 00 20 stw r30,32(r1) ffc1310c: 7c 9e 23 78 mr r30,r4 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); ffc13110: 48 00 17 1d bl ffc1482c if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) ffc13114: a0 1f 00 3c lhz r0,60(r31) ffc13118: 7f 80 18 00 cmpw cr7,r0,r3 ffc1311c: 41 9e 00 0c beq- cr7,ffc13128 <== ALWAYS TAKEN ffc13120: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc13124: 40 9e 00 40 bne- cr7,ffc13164 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; ffc13128: b3 df 00 3c sth r30,60(r31) jnode->st_gid = group; IMFS_update_ctime( jnode ); ffc1312c: 38 61 00 08 addi r3,r1,8 ffc13130: 38 80 00 00 li r4,0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; jnode->st_gid = group; ffc13134: b3 bf 00 3e sth r29,62(r31) IMFS_update_ctime( jnode ); ffc13138: 4b ff 30 bd bl ffc061f4 ffc1313c: 80 01 00 08 lwz r0,8(r1) ffc13140: 38 60 00 00 li r3,0 ffc13144: 90 1f 00 48 stw r0,72(r31) return 0; } ffc13148: 80 01 00 2c lwz r0,44(r1) ffc1314c: 83 a1 00 1c lwz r29,28(r1) ffc13150: 7c 08 03 a6 mtlr r0 ffc13154: 83 c1 00 20 lwz r30,32(r1) ffc13158: 83 e1 00 24 lwz r31,36(r1) ffc1315c: 38 21 00 28 addi r1,r1,40 ffc13160: 4e 80 00 20 blr #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); ffc13164: 48 00 6d fd bl ffc19f60 <__errno> <== NOT EXECUTED ffc13168: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc1316c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc13170: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc13174: 4b ff ff d4 b ffc13148 <== NOT EXECUTED =============================================================================== ffc112f4 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ffc112f4: 94 21 ff e0 stwu r1,-32(r1) ffc112f8: 7c 08 02 a6 mflr r0 ffc112fc: 93 c1 00 18 stw r30,24(r1) IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) ffc11300: 7c 7e 1b 79 mr. r30,r3 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ffc11304: 93 a1 00 14 stw r29,20(r1) IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) ffc11308: 3b a0 00 00 li r29,0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ffc1130c: 93 e1 00 1c stw r31,28(r1) ffc11310: 7c 9f 23 78 mr r31,r4 ffc11314: 90 01 00 24 stw r0,36(r1) IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) ffc11318: 40 82 00 24 bne- ffc1133c <== ALWAYS TAKEN node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } ffc1131c: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED ffc11320: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc11324: 83 c1 00 18 lwz r30,24(r1) <== NOT EXECUTED ffc11328: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc1132c: 83 a1 00 14 lwz r29,20(r1) <== NOT EXECUTED ffc11330: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc11334: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc11338: 4e 80 00 20 blr <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); ffc1133c: 3d 20 00 00 lis r9,0 ffc11340: 90 e1 00 08 stw r7,8(r1) ffc11344: 7c a4 2b 78 mr r4,r5 ffc11348: 81 29 26 dc lwz r9,9948(r9) ffc1134c: 7f e3 fb 78 mr r3,r31 ffc11350: 80 a9 00 2c lwz r5,44(r9) ffc11354: 7c c5 28 78 andc r5,r6,r5 ffc11358: 4b ff fe a1 bl ffc111f8 if ( !node ) ffc1135c: 80 e1 00 08 lwz r7,8(r1) ffc11360: 7c 7d 1b 79 mr. r29,r3 ffc11364: 41 a2 ff b8 beq- ffc1131c <== NEVER TAKEN return NULL; /* * Set the type specific information */ switch (type) { ffc11368: 2b 9f 00 07 cmplwi cr7,r31,7 ffc1136c: 40 9d 00 24 ble- cr7,ffc11390 <== ALWAYS TAKEN case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0); ffc11370: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc11374: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc11378: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc1137c: 38 63 fc 10 addi r3,r3,-1008 <== NOT EXECUTED ffc11380: 38 a5 fb fc addi r5,r5,-1028 <== NOT EXECUTED ffc11384: 38 c6 fc 5c addi r6,r6,-932 <== NOT EXECUTED ffc11388: 38 80 00 5c li r4,92 <== NOT EXECUTED ffc1138c: 4b ff 2d 81 bl ffc0410c <__assert_func> <== NOT EXECUTED return NULL; /* * Set the type specific information */ switch (type) { ffc11390: 3d 20 ff c2 lis r9,-62 ffc11394: 39 29 fb dc addi r9,r9,-1060 ffc11398: 57 ff 10 3a rlwinm r31,r31,2,0,29 ffc1139c: 7c 09 f8 2e lwzx r0,r9,r31 ffc113a0: 7d 20 4a 14 add r9,r0,r9 ffc113a4: 7d 29 03 a6 mtctr r9 ffc113a8: 4e 80 04 20 bctr case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; break; case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; ffc113ac: 80 07 00 00 lwz r0,0(r7) ffc113b0: 90 1d 00 50 stw r0,80(r29) /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; ffc113b4: 81 3e 00 10 lwz r9,16(r30) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); ffc113b8: 7f a4 eb 78 mr r4,r29 } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; ffc113bc: 80 7e 00 00 lwz r3,0(r30) fs_info = parent_loc->mt_entry->fs_info; ffc113c0: 81 29 00 34 lwz r9,52(r9) node->Parent = parent; ffc113c4: 90 7d 00 08 stw r3,8(r29) ffc113c8: 38 63 00 50 addi r3,r3,80 node->st_ino = ++fs_info->ino_count; ffc113cc: 81 69 00 04 lwz r11,4(r9) ffc113d0: 38 0b 00 01 addi r0,r11,1 ffc113d4: 90 09 00 04 stw r0,4(r9) ffc113d8: 90 1d 00 38 stw r0,56(r29) ffc113dc: 4b ff 81 15 bl ffc094f0 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } ffc113e0: 80 01 00 24 lwz r0,36(r1) ffc113e4: 7f a3 eb 78 mr r3,r29 ffc113e8: 83 c1 00 18 lwz r30,24(r1) ffc113ec: 7c 08 03 a6 mtlr r0 ffc113f0: 83 a1 00 14 lwz r29,20(r1) ffc113f4: 83 e1 00 1c lwz r31,28(r1) ffc113f8: 38 21 00 20 addi r1,r1,32 ffc113fc: 4e 80 00 20 blr node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; ffc11400: 39 20 00 00 li r9,0 <== NOT EXECUTED ffc11404: 39 40 00 00 li r10,0 <== NOT EXECUTED ffc11408: 91 3d 00 50 stw r9,80(r29) <== NOT EXECUTED node->info.linearfile.direct = 0; ffc1140c: 38 00 00 00 li r0,0 <== NOT EXECUTED node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; ffc11410: 91 5d 00 54 stw r10,84(r29) <== NOT EXECUTED node->info.linearfile.direct = 0; ffc11414: 90 1d 00 58 stw r0,88(r29) <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; ffc11418: 38 00 00 00 li r0,0 case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; ffc1141c: 39 20 00 00 li r9,0 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; ffc11420: 90 1d 00 60 stw r0,96(r29) case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; ffc11424: 39 40 00 00 li r10,0 ffc11428: 91 3d 00 50 stw r9,80(r29) ffc1142c: 91 5d 00 54 stw r10,84(r29) node->info.file.indirect = 0; ffc11430: 90 1d 00 58 stw r0,88(r29) node->info.file.doubly_indirect = 0; ffc11434: 90 1d 00 5c stw r0,92(r29) node->info.file.triply_indirect = 0; break; ffc11438: 4b ff ff 7c b ffc113b4 case IMFS_FIFO: node->info.fifo.pipe = NULL; ffc1143c: 38 00 00 00 li r0,0 ffc11440: 90 1d 00 50 stw r0,80(r29) break; ffc11444: 4b ff ff 70 b ffc113b4 node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; ffc11448: 81 27 00 04 lwz r9,4(r7) case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; ffc1144c: 80 07 00 00 lwz r0,0(r7) node->info.device.minor = info->device.minor; ffc11450: 91 3d 00 54 stw r9,84(r29) case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; ffc11454: 90 1d 00 50 stw r0,80(r29) node->info.device.minor = info->device.minor; break; ffc11458: 4b ff ff 5c b ffc113b4 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc1145c: 39 3d 00 54 addi r9,r29,84 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc11460: 38 1d 00 50 addi r0,r29,80 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc11464: 91 3d 00 50 stw r9,80(r29) the_chain->permanent_null = NULL; ffc11468: 39 20 00 00 li r9,0 ffc1146c: 91 3d 00 54 stw r9,84(r29) the_chain->last = _Chain_Head(the_chain); ffc11470: 90 1d 00 58 stw r0,88(r29) ffc11474: 4b ff ff 40 b ffc113b4 =============================================================================== ffc112a4 : IMFS_jnode_t *IMFS_create_root_node(void) { ffc112a4: 94 21 ff f8 stwu r1,-8(r1) ffc112a8: 7c 08 02 a6 mflr r0 IMFS_jnode_t *node; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( IMFS_DIRECTORY, "", (S_IFDIR | 0755) ); ffc112ac: 3c 80 ff c2 lis r4,-62 ffc112b0: 38 84 ec 74 addi r4,r4,-5004 return node; } IMFS_jnode_t *IMFS_create_root_node(void) { ffc112b4: 90 01 00 0c stw r0,12(r1) IMFS_jnode_t *node; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( IMFS_DIRECTORY, "", (S_IFDIR | 0755) ); ffc112b8: 38 60 00 01 li r3,1 ffc112bc: 38 a0 41 ed li r5,16877 ffc112c0: 4b ff ff 39 bl ffc111f8 if ( !node ) ffc112c4: 2c 03 00 00 cmpwi r3,0 ffc112c8: 41 82 00 1c beq- ffc112e4 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc112cc: 39 23 00 54 addi r9,r3,84 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc112d0: 38 03 00 50 addi r0,r3,80 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc112d4: 91 23 00 50 stw r9,80(r3) the_chain->permanent_null = NULL; ffc112d8: 39 20 00 00 li r9,0 ffc112dc: 91 23 00 54 stw r9,84(r3) the_chain->last = _Chain_Head(the_chain); ffc112e0: 90 03 00 58 stw r0,88(r3) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } ffc112e4: 80 01 00 0c lwz r0,12(r1) ffc112e8: 38 21 00 08 addi r1,r1,8 ffc112ec: 7c 08 03 a6 mtlr r0 ffc112f0: 4e 80 00 20 blr =============================================================================== ffc073b8 : rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); ffc073b8: 2c 03 00 00 cmpwi r3,0 void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { ffc073bc: 94 21 ff d8 stwu r1,-40(r1) ffc073c0: 7c 08 02 a6 mflr r0 ffc073c4: 93 c1 00 20 stw r30,32(r1) ffc073c8: 7c 9e 23 78 mr r30,r4 ffc073cc: 90 01 00 2c stw r0,44(r1) ffc073d0: 93 21 00 0c stw r25,12(r1) ffc073d4: 93 41 00 10 stw r26,16(r1) ffc073d8: 93 61 00 14 stw r27,20(r1) ffc073dc: 93 81 00 18 stw r28,24(r1) ffc073e0: 93 a1 00 1c stw r29,28(r1) ffc073e4: 93 e1 00 24 stw r31,36(r1) rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); ffc073e8: 41 82 00 c0 beq- ffc074a8 <== NEVER TAKEN assert( level >= 0 ); ffc073ec: 2f 84 00 00 cmpwi cr7,r4,0 ffc073f0: 41 9c 00 f8 blt- cr7,ffc074e8 <== NEVER TAKEN assert( the_directory->type == IMFS_DIRECTORY ); ffc073f4: 80 03 00 4c lwz r0,76(r3) ffc073f8: 2f 80 00 01 cmpwi cr7,r0,1 ffc073fc: 40 9e 00 cc bne- cr7,ffc074c8 <== NEVER TAKEN the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; ffc07400: 83 63 00 50 lwz r27,80(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc07404: 3b 43 00 54 addi r26,r3,84 ffc07408: 7f 9b d0 00 cmpw cr7,r27,r26 ffc0740c: 41 9e 00 60 beq- cr7,ffc0746c ffc07410: 3f 80 ff c3 lis r28,-61 ffc07414: 3f a0 00 00 lis r29,0 ffc07418: 3b 9c bc 5c addi r28,r28,-17316 ffc0741c: 3b bd 27 4c addi r29,r29,10060 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); ffc07420: 3b 24 00 01 addi r25,r4,1 for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; ffc07424: 3b e0 00 00 li r31,0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); ffc07428: 81 3d 00 00 lwz r9,0(r29) !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) ffc0742c: 3b ff 00 01 addi r31,r31,1 fprintf(stdout, "...." ); ffc07430: 7f 83 e3 78 mr r3,r28 ffc07434: 80 c9 00 08 lwz r6,8(r9) ffc07438: 38 80 00 01 li r4,1 ffc0743c: 38 a0 00 04 li r5,4 ffc07440: 48 01 46 79 bl ffc1bab8 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) ffc07444: 7f 9e f8 00 cmpw cr7,r30,r31 ffc07448: 40 9c ff e0 bge+ cr7,ffc07428 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); ffc0744c: 7f 63 db 78 mr r3,r27 ffc07450: 4b ff fd 09 bl ffc07158 if ( the_jnode->type == IMFS_DIRECTORY ) ffc07454: 80 1b 00 4c lwz r0,76(r27) ffc07458: 2f 80 00 01 cmpwi cr7,r0,1 ffc0745c: 41 9e 00 3c beq- cr7,ffc07498 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { ffc07460: 83 7b 00 00 lwz r27,0(r27) assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; ffc07464: 7f 9b d0 00 cmpw cr7,r27,r26 ffc07468: 40 9e ff bc bne+ cr7,ffc07424 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } ffc0746c: 80 01 00 2c lwz r0,44(r1) ffc07470: 83 21 00 0c lwz r25,12(r1) ffc07474: 7c 08 03 a6 mtlr r0 ffc07478: 83 41 00 10 lwz r26,16(r1) ffc0747c: 83 61 00 14 lwz r27,20(r1) ffc07480: 83 81 00 18 lwz r28,24(r1) ffc07484: 83 a1 00 1c lwz r29,28(r1) ffc07488: 83 c1 00 20 lwz r30,32(r1) ffc0748c: 83 e1 00 24 lwz r31,36(r1) ffc07490: 38 21 00 28 addi r1,r1,40 ffc07494: 4e 80 00 20 blr for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); ffc07498: 7f 63 db 78 mr r3,r27 ffc0749c: 7f 24 cb 78 mr r4,r25 ffc074a0: 4b ff ff 19 bl ffc073b8 ffc074a4: 4b ff ff bc b ffc07460 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); ffc074a8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc074ac: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED ffc074b0: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED ffc074b4: 38 63 bb 54 addi r3,r3,-17580 <== NOT EXECUTED ffc074b8: 38 a5 bb 40 addi r5,r5,-17600 <== NOT EXECUTED ffc074bc: 38 c6 bc 18 addi r6,r6,-17384 <== NOT EXECUTED ffc074c0: 38 80 00 84 li r4,132 <== NOT EXECUTED ffc074c4: 48 00 0a b1 bl ffc07f74 <__assert_func> <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); ffc074c8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc074cc: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED ffc074d0: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED ffc074d4: 38 63 bb 54 addi r3,r3,-17580 <== NOT EXECUTED ffc074d8: 38 a5 bb 40 addi r5,r5,-17600 <== NOT EXECUTED ffc074dc: 38 c6 bc 34 addi r6,r6,-17356 <== NOT EXECUTED ffc074e0: 38 80 00 88 li r4,136 <== NOT EXECUTED ffc074e4: 48 00 0a 91 bl ffc07f74 <__assert_func> <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); ffc074e8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc074ec: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED ffc074f0: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED ffc074f4: 38 63 bb 54 addi r3,r3,-17580 <== NOT EXECUTED ffc074f8: 38 a5 bb 40 addi r5,r5,-17600 <== NOT EXECUTED ffc074fc: 38 c6 bc 28 addi r6,r6,-17368 <== NOT EXECUTED ffc07500: 38 80 00 86 li r4,134 <== NOT EXECUTED ffc07504: 48 00 0a 71 bl ffc07f74 <__assert_func> <== NOT EXECUTED =============================================================================== ffc0d01c : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc0d01c: 94 21 ff 90 stwu r1,-112(r1) ffc0d020: 7c 08 02 a6 mflr r0 ffc0d024: 90 01 00 74 stw r0,116(r1) ffc0d028: 93 01 00 50 stw r24,80(r1) case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0d02c: 3f 00 00 00 lis r24,0 ffc0d030: 3b 18 26 dc addi r24,r24,9948 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc0d034: 93 a1 00 64 stw r29,100(r1) ffc0d038: 92 c1 00 48 stw r22,72(r1) /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; ffc0d03c: 83 a6 00 00 lwz r29,0(r6) const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc0d040: 92 e1 00 4c stw r23,76(r1) ffc0d044: 7c b7 2b 78 mr r23,r5 ffc0d048: 93 21 00 54 stw r25,84(r1) ffc0d04c: 3b 21 00 08 addi r25,r1,8 ffc0d050: 93 41 00 58 stw r26,88(r1) ffc0d054: 7c 7a 1b 78 mr r26,r3 ffc0d058: 93 61 00 5c stw r27,92(r1) ffc0d05c: 3b 61 00 20 addi r27,r1,32 ffc0d060: 93 81 00 60 stw r28,96(r1) ffc0d064: 7c dc 33 78 mr r28,r6 ffc0d068: 93 c1 00 68 stw r30,104(r1) /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; ffc0d06c: 3b c0 00 00 li r30,0 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc0d070: 93 e1 00 6c stw r31,108(r1) ffc0d074: 7c 9f 23 78 mr r31,r4 * 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 ); ffc0d078: 7c 7a f2 14 add r3,r26,r30 ffc0d07c: 7f e4 fb 78 mr r4,r31 ffc0d080: 7f 65 db 78 mr r5,r27 ffc0d084: 7f 26 cb 78 mr r6,r25 ffc0d088: 48 00 0b 0d bl ffc0db94 pathnamelen -= len; i += len; if ( !pathloc->node_access ) ffc0d08c: 81 3c 00 00 lwz r9,0(r28) * 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 ); ffc0d090: 7c 76 1b 78 mr r22,r3 pathnamelen -= len; ffc0d094: 80 01 00 08 lwz r0,8(r1) i += len; if ( !pathloc->node_access ) ffc0d098: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d09c: 41 9e 01 e0 beq- cr7,ffc0d27c <== 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 ) ffc0d0a0: 2f 83 00 00 cmpwi cr7,r3,0 while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; i += len; ffc0d0a4: 7f de 02 14 add r30,r30,r0 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; ffc0d0a8: 7f e0 f8 50 subf r31,r0,r31 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) ffc0d0ac: 40 9e 00 44 bne- cr7,ffc0d0f0 * 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 ) { ffc0d0b0: 80 09 00 4c lwz r0,76(r9) ffc0d0b4: 2f 80 00 01 cmpwi cr7,r0,1 ffc0d0b8: 41 9e 01 50 beq- cr7,ffc0d208 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); ffc0d0bc: 7f 83 e3 78 mr r3,r28 ffc0d0c0: 4b ff fc ad bl ffc0cd6c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) ffc0d0c4: 7e e4 bb 78 mr r4,r23 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); ffc0d0c8: 7c 76 1b 78 mr r22,r3 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) ffc0d0cc: 7f 83 e3 78 mr r3,r28 ffc0d0d0: 4b ff fd 2d bl ffc0cdfc ffc0d0d4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0d0d8: 40 be 00 d8 bne+ cr7,ffc0d1b0 rtems_set_errno_and_return_minus_one( EACCES ); ffc0d0dc: 48 00 61 99 bl ffc13274 <__errno> ffc0d0e0: 38 00 00 0d li r0,13 ffc0d0e4: 90 03 00 00 stw r0,0(r3) ffc0d0e8: 3a c0 ff ff li r22,-1 ffc0d0ec: 48 00 00 c4 b ffc0d1b0 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) ffc0d0f0: 80 1d 00 4c lwz r0,76(r29) ffc0d0f4: 2f 80 00 01 cmpwi cr7,r0,1 ffc0d0f8: 41 9e 00 f4 beq- cr7,ffc0d1ec if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { ffc0d0fc: 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; ffc0d100: 7d 3d 4b 78 mr r29,r9 switch( type ) { ffc0d104: 41 9e 00 1c beq- cr7,ffc0d120 ffc0d108: 2f 96 00 04 cmpwi cr7,r22,4 ffc0d10c: 41 9e 00 94 beq- cr7,ffc0d1a0 ffc0d110: 2f 16 00 02 cmpwi cr6,r22,2 ffc0d114: 41 9a 00 50 beq- cr6,ffc0d164 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { ffc0d118: 40 9e ff 60 bne+ cr7,ffc0d078 <== ALWAYS TAKEN ffc0d11c: 4b ff ff 94 b ffc0d0b0 <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { ffc0d120: 80 09 00 4c lwz r0,76(r9) ffc0d124: 2f 80 00 03 cmpwi cr7,r0,3 ffc0d128: 41 9e 01 68 beq- cr7,ffc0d290 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { ffc0d12c: 2f 80 00 04 cmpwi cr7,r0,4 ffc0d130: 41 9e 01 94 beq- cr7,ffc0d2c4 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) ffc0d134: 2f 80 00 01 cmpwi cr7,r0,1 ffc0d138: 40 9e 01 78 bne- cr7,ffc0d2b0 /* * 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 ) { ffc0d13c: 81 1d 00 5c lwz r8,92(r29) ffc0d140: 2f 88 00 00 cmpwi cr7,r8,0 ffc0d144: 40 9e 00 d0 bne- cr7,ffc0d214 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); ffc0d148: 7f a3 eb 78 mr r3,r29 ffc0d14c: 7f 64 db 78 mr r4,r27 ffc0d150: 48 00 09 45 bl ffc0da94 if ( !node ) ffc0d154: 7c 7d 1b 79 mr. r29,r3 ffc0d158: 41 82 01 24 beq- ffc0d27c /* * Set the node access to the point we have found. */ pathloc->node_access = node; ffc0d15c: 93 bc 00 00 stw r29,0(r28) break; ffc0d160: 4b ff ff 18 b ffc0d078 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0d164: 81 78 00 00 lwz r11,0(r24) ffc0d168: 80 0b 00 18 lwz r0,24(r11) ffc0d16c: 7f 80 48 00 cmpw cr7,r0,r9 ffc0d170: 41 be ff 08 beq- cr7,ffc0d078 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { ffc0d174: 81 1c 00 10 lwz r8,16(r28) /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == ffc0d178: 80 08 00 1c lwz r0,28(r8) ffc0d17c: 7f 80 48 00 cmpw cr7,r0,r9 ffc0d180: 41 9e 01 68 beq- cr7,ffc0d2e8 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) ffc0d184: 83 a9 00 08 lwz r29,8(r9) ffc0d188: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0d18c: 40 9e ff d0 bne+ cr7,ffc0d15c rtems_set_errno_and_return_minus_one( ENOENT ); ffc0d190: 48 00 60 e5 bl ffc13274 <__errno> ffc0d194: 92 c3 00 00 stw r22,0(r3) ffc0d198: 3a c0 ff ff li r22,-1 ffc0d19c: 48 00 00 14 b ffc0d1b0 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); ffc0d1a0: 48 00 60 d5 bl ffc13274 <__errno> ffc0d1a4: 38 00 00 5b li r0,91 ffc0d1a8: 90 03 00 00 stw r0,0(r3) ffc0d1ac: 3a c0 ff ff li r22,-1 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0d1b0: 80 01 00 74 lwz r0,116(r1) ffc0d1b4: 7e c3 b3 78 mr r3,r22 ffc0d1b8: 82 e1 00 4c lwz r23,76(r1) ffc0d1bc: 7c 08 03 a6 mtlr r0 ffc0d1c0: 82 c1 00 48 lwz r22,72(r1) ffc0d1c4: 83 01 00 50 lwz r24,80(r1) ffc0d1c8: 83 21 00 54 lwz r25,84(r1) ffc0d1cc: 83 41 00 58 lwz r26,88(r1) ffc0d1d0: 83 61 00 5c lwz r27,92(r1) ffc0d1d4: 83 81 00 60 lwz r28,96(r1) ffc0d1d8: 83 a1 00 64 lwz r29,100(r1) ffc0d1dc: 83 c1 00 68 lwz r30,104(r1) ffc0d1e0: 83 e1 00 6c lwz r31,108(r1) ffc0d1e4: 38 21 00 70 addi r1,r1,112 ffc0d1e8: 4e 80 00 20 blr /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) ffc0d1ec: 7f 83 e3 78 mr r3,r28 ffc0d1f0: 38 80 00 01 li r4,1 ffc0d1f4: 4b ff fc 09 bl ffc0cdfc ffc0d1f8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0d1fc: 41 be fe e0 beq- cr7,ffc0d0dc ffc0d200: 81 3c 00 00 lwz r9,0(r28) ffc0d204: 4b ff fe f8 b ffc0d0fc * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { ffc0d208: 81 09 00 5c lwz r8,92(r9) ffc0d20c: 2f 88 00 00 cmpwi cr7,r8,0 ffc0d210: 41 be fe ac beq- cr7,ffc0d0bc newloc = node->info.directory.mt_fs->mt_fs_root; ffc0d214: 81 28 00 28 lwz r9,40(r8) *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0d218: 7e e5 bb 78 mr r5,r23 * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; ffc0d21c: 80 e8 00 1c lwz r7,28(r8) *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0d220: 7f 86 e3 78 mr r6,r28 * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; ffc0d224: 81 48 00 20 lwz r10,32(r8) ffc0d228: 81 68 00 24 lwz r11,36(r8) ffc0d22c: 90 e1 00 0c stw r7,12(r1) ffc0d230: 91 41 00 10 stw r10,16(r1) ffc0d234: 91 61 00 14 stw r11,20(r1) ffc0d238: 91 21 00 18 stw r9,24(r1) *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0d23c: 80 81 00 08 lwz r4,8(r1) * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; ffc0d240: 80 08 00 2c lwz r0,44(r8) *pathloc = newloc; ffc0d244: 90 1c 00 10 stw r0,16(r28) return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0d248: 7c 64 f0 50 subf r3,r4,r30 ffc0d24c: 7c 7a 1a 14 add r3,r26,r3 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; ffc0d250: 90 fc 00 00 stw r7,0(r28) return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0d254: 7c 9f 22 14 add r4,r31,r4 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; ffc0d258: 91 5c 00 04 stw r10,4(r28) ffc0d25c: 91 7c 00 08 stw r11,8(r28) * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; ffc0d260: 90 01 00 1c stw r0,28(r1) *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0d264: 80 09 00 00 lwz r0,0(r9) */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; ffc0d268: 91 3c 00 0c stw r9,12(r28) return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc0d26c: 7c 09 03 a6 mtctr r0 ffc0d270: 4e 80 04 21 bctrl ffc0d274: 7c 76 1b 78 mr r22,r3 ffc0d278: 4b ff ff 38 b ffc0d1b0 * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); ffc0d27c: 48 00 5f f9 bl ffc13274 <__errno> ffc0d280: 38 00 00 02 li r0,2 ffc0d284: 90 03 00 00 stw r0,0(r3) ffc0d288: 3a c0 ff ff li r22,-1 ffc0d28c: 4b ff ff 24 b ffc0d1b0 * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); ffc0d290: 7f 83 e3 78 mr r3,r28 ffc0d294: 38 80 00 00 li r4,0 ffc0d298: 4b ff fb e5 bl ffc0ce7c node = pathloc->node_access; ffc0d29c: 83 bc 00 00 lwz r29,0(r28) if ( !node ) ffc0d2a0: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0d2a4: 41 9e 00 0c beq- cr7,ffc0d2b0 <== NEVER TAKEN } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; ffc0d2a8: 80 1d 00 4c lwz r0,76(r29) ffc0d2ac: 4b ff fe 88 b ffc0d134 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc0d2b0: 48 00 5f c5 bl ffc13274 <__errno> ffc0d2b4: 38 00 00 14 li r0,20 ffc0d2b8: 90 03 00 00 stw r0,0(r3) ffc0d2bc: 3a c0 ff ff li r22,-1 ffc0d2c0: 4b ff fe f0 b ffc0d1b0 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); ffc0d2c4: 7f 83 e3 78 mr r3,r28 ffc0d2c8: 38 80 00 00 li r4,0 ffc0d2cc: 4b ff fc 2d bl ffc0cef8 node = pathloc->node_access; ffc0d2d0: 83 bc 00 00 lwz r29,0(r28) if ( result == -1 ) ffc0d2d4: 2f 83 ff ff cmpwi cr7,r3,-1 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); ffc0d2d8: 7c 76 1b 78 mr r22,r3 node = pathloc->node_access; if ( result == -1 ) ffc0d2dc: 41 be fe d4 beq- cr7,ffc0d1b0 <== NEVER TAKEN } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; ffc0d2e0: 80 1d 00 4c lwz r0,76(r29) ffc0d2e4: 4b ff fe 50 b ffc0d134 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; ffc0d2e8: 81 28 00 14 lwz r9,20(r8) *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), ffc0d2ec: 7e e5 bb 78 mr r5,r23 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; ffc0d2f0: 80 e8 00 08 lwz r7,8(r8) *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), ffc0d2f4: 7f 86 e3 78 mr r6,r28 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; ffc0d2f8: 81 48 00 0c lwz r10,12(r8) ffc0d2fc: 81 68 00 10 lwz r11,16(r8) ffc0d300: 90 e1 00 0c stw r7,12(r1) ffc0d304: 91 41 00 10 stw r10,16(r1) ffc0d308: 91 61 00 14 stw r11,20(r1) ffc0d30c: 91 21 00 18 stw r9,24(r1) *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), ffc0d310: 80 81 00 08 lwz r4,8(r1) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; ffc0d314: 80 08 00 18 lwz r0,24(r8) ffc0d318: 4b ff ff 2c b ffc0d244 =============================================================================== ffc0d440 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { ffc0d440: 94 21 ff 88 stwu r1,-120(r1) ffc0d444: 7c 08 02 a6 mflr r0 ffc0d448: 7d 80 00 26 mfcr r12 ffc0d44c: 90 01 00 7c stw r0,124(r1) ffc0d450: 92 e1 00 54 stw r23,84(r1) ffc0d454: 7c b7 2b 78 mr r23,r5 ffc0d458: 93 01 00 58 stw r24,88(r1) case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0d45c: 3f 00 00 00 lis r24,0 ffc0d460: 3b 18 26 dc addi r24,r24,9948 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { ffc0d464: 93 21 00 5c stw r25,92(r1) ffc0d468: 3b 21 00 08 addi r25,r1,8 ffc0d46c: 93 41 00 60 stw r26,96(r1) ffc0d470: 7c 7a 1b 78 mr r26,r3 ffc0d474: 93 61 00 64 stw r27,100(r1) ffc0d478: 3b 61 00 20 addi r27,r1,32 ffc0d47c: 93 81 00 68 stw r28,104(r1) node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); ffc0d480: 3b 80 00 00 li r28,0 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { ffc0d484: 93 a1 00 6c stw r29,108(r1) ffc0d488: 7c 9d 23 78 mr r29,r4 ffc0d48c: 93 c1 00 70 stw r30,112(r1) ffc0d490: 93 e1 00 74 stw r31,116(r1) ffc0d494: 92 a1 00 4c stw r21,76(r1) ffc0d498: 92 c1 00 50 stw r22,80(r1) ffc0d49c: 91 81 00 48 stw r12,72(r1) /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; ffc0d4a0: 83 c4 00 00 lwz r30,0(r4) /* * Get the path length. */ pathlen = strlen( path ); ffc0d4a4: 48 00 70 cd bl ffc14570 ffc0d4a8: 7c 7f 1b 78 mr r31,r3 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); ffc0d4ac: 7f e4 fb 78 mr r4,r31 ffc0d4b0: 7c 7a e2 14 add r3,r26,r28 ffc0d4b4: 7f 65 db 78 mr r5,r27 ffc0d4b8: 7f 26 cb 78 mr r6,r25 ffc0d4bc: 48 00 06 d9 bl ffc0db94 pathlen -= len; i += len; if ( !pathloc->node_access ) ffc0d4c0: 81 3d 00 00 lwz r9,0(r29) */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; ffc0d4c4: 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 ); ffc0d4c8: 7c 76 1b 78 mr r22,r3 pathlen -= len; i += len; if ( !pathloc->node_access ) ffc0d4cc: 2f 89 00 00 cmpwi cr7,r9,0 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; ffc0d4d0: 7f f5 f8 50 subf r31,r21,r31 i += len; if ( !pathloc->node_access ) ffc0d4d4: 41 9e 01 70 beq- cr7,ffc0d644 <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) ffc0d4d8: 2e 03 00 00 cmpwi cr4,r3,0 ffc0d4dc: 40 92 00 5c bne- cr4,ffc0d538 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); ffc0d4e0: 48 00 5d 95 bl ffc13274 <__errno> ffc0d4e4: 38 00 00 11 li r0,17 ffc0d4e8: 90 03 00 00 stw r0,0(r3) ffc0d4ec: 3b c0 ff ff li r30,-1 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0d4f0: 80 01 00 7c lwz r0,124(r1) ffc0d4f4: 7f c3 f3 78 mr r3,r30 ffc0d4f8: 81 81 00 48 lwz r12,72(r1) ffc0d4fc: 7c 08 03 a6 mtlr r0 ffc0d500: 82 a1 00 4c lwz r21,76(r1) ffc0d504: 82 c1 00 50 lwz r22,80(r1) ffc0d508: 7d 80 81 20 mtcrf 8,r12 ffc0d50c: 82 e1 00 54 lwz r23,84(r1) ffc0d510: 83 01 00 58 lwz r24,88(r1) ffc0d514: 83 21 00 5c lwz r25,92(r1) ffc0d518: 83 41 00 60 lwz r26,96(r1) ffc0d51c: 83 61 00 64 lwz r27,100(r1) ffc0d520: 83 81 00 68 lwz r28,104(r1) ffc0d524: 83 a1 00 6c lwz r29,108(r1) ffc0d528: 83 c1 00 70 lwz r30,112(r1) ffc0d52c: 83 e1 00 74 lwz r31,116(r1) ffc0d530: 38 21 00 78 addi r1,r1,120 ffc0d534: 4e 80 00 20 blr /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) ffc0d538: 80 1e 00 4c lwz r0,76(r30) ffc0d53c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0d540: 41 9e 01 68 beq- cr7,ffc0d6a8 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { ffc0d544: 2f 96 00 02 cmpwi cr7,r22,2 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; ffc0d548: 7f 9c aa 14 add r28,r28,r21 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; ffc0d54c: 7d 3e 4b 78 mr r30,r9 switch( type ) { ffc0d550: 41 9e 00 88 beq- cr7,ffc0d5d8 ffc0d554: 2b 96 00 02 cmplwi cr7,r22,2 ffc0d558: 40 9d 00 28 ble- cr7,ffc0d580 ffc0d55c: 2f 96 00 03 cmpwi cr7,r22,3 ffc0d560: 41 9e 00 28 beq- cr7,ffc0d588 ffc0d564: 2f 96 00 04 cmpwi cr7,r22,4 ffc0d568: 40 9e ff 44 bne+ cr7,ffc0d4ac <== NEVER TAKEN case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); ffc0d56c: 48 00 5d 09 bl ffc13274 <__errno> ffc0d570: 38 00 00 5b li r0,91 ffc0d574: 90 03 00 00 stw r0,0(r3) ffc0d578: 3b c0 ff ff li r30,-1 ffc0d57c: 4b ff ff 74 b ffc0d4f0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { ffc0d580: 41 b2 ff 60 beq- cr4,ffc0d4e0 <== NEVER TAKEN ffc0d584: 4b ff ff 28 b ffc0d4ac pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { ffc0d588: 80 09 00 4c lwz r0,76(r9) ffc0d58c: 2f 80 00 03 cmpwi cr7,r0,3 ffc0d590: 41 9e 01 ac beq- cr7,ffc0d73c result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { ffc0d594: 2f 80 00 04 cmpwi cr7,r0,4 ffc0d598: 41 9e 01 a4 beq- cr7,ffc0d73c if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) ffc0d59c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0d5a0: 41 9e 01 24 beq- cr7,ffc0d6c4 <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) ffc0d5a4: 80 1e 00 4c lwz r0,76(r30) ffc0d5a8: 2f 80 00 01 cmpwi cr7,r0,1 ffc0d5ac: 40 9e 01 18 bne- cr7,ffc0d6c4 /* * 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 ) { ffc0d5b0: 81 1e 00 5c lwz r8,92(r30) ffc0d5b4: 2f 88 00 00 cmpwi cr7,r8,0 ffc0d5b8: 40 9e 01 20 bne- cr7,ffc0d6d8 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); ffc0d5bc: 7f c3 f3 78 mr r3,r30 ffc0d5c0: 7f 64 db 78 mr r4,r27 ffc0d5c4: 48 00 04 d1 bl ffc0da94 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) ffc0d5c8: 7c 7e 1b 79 mr. r30,r3 ffc0d5cc: 41 82 00 48 beq- ffc0d614 done = true; else pathloc->node_access = node; ffc0d5d0: 93 dd 00 00 stw r30,0(r29) ffc0d5d4: 4b ff fe d8 b ffc0d4ac case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc0d5d8: 81 78 00 00 lwz r11,0(r24) ffc0d5dc: 80 0b 00 18 lwz r0,24(r11) ffc0d5e0: 7f 80 48 00 cmpw cr7,r0,r9 ffc0d5e4: 41 be fe c8 beq- cr7,ffc0d4ac /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ ffc0d5e8: 81 1d 00 10 lwz r8,16(r29) ffc0d5ec: 80 08 00 1c lwz r0,28(r8) ffc0d5f0: 7f 80 48 00 cmpw cr7,r0,r9 ffc0d5f4: 41 9e 01 68 beq- cr7,ffc0d75c *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) ffc0d5f8: 83 c9 00 08 lwz r30,8(r9) ffc0d5fc: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0d600: 40 9e ff d0 bne+ cr7,ffc0d5d0 rtems_set_errno_and_return_minus_one( ENOENT ); ffc0d604: 48 00 5c 71 bl ffc13274 <__errno> ffc0d608: 3b c0 ff ff li r30,-1 ffc0d60c: 92 c3 00 00 stw r22,0(r3) ffc0d610: 4b ff fe e0 b ffc0d4f0 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; ffc0d614: 80 01 00 08 lwz r0,8(r1) ffc0d618: 7c 00 e0 50 subf r0,r0,r28 ffc0d61c: 7c 1a 02 14 add r0,r26,r0 ffc0d620: 90 17 00 00 stw r0,0(r23) /* * 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++) { ffc0d624: 7c 1a e0 ae lbzx r0,r26,r28 ffc0d628: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d62c: 41 9e 00 38 beq- cr7,ffc0d664 ffc0d630: 7f 9a e2 14 add r28,r26,r28 if ( !IMFS_is_separator( path[ i ] ) ) ffc0d634: 2f 80 00 2f cmpwi cr7,r0,47 ffc0d638: 2f 00 00 5c cmpwi cr6,r0,92 ffc0d63c: 41 9e 00 1c beq- cr7,ffc0d658 ffc0d640: 41 9a 00 18 beq- cr6,ffc0d658 rtems_set_errno_and_return_minus_one( ENOENT ); ffc0d644: 48 00 5c 31 bl ffc13274 <__errno> ffc0d648: 38 00 00 02 li r0,2 ffc0d64c: 90 03 00 00 stw r0,0(r3) ffc0d650: 3b c0 ff ff li r30,-1 ffc0d654: 4b ff fe 9c b ffc0d4f0 /* * 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++) { ffc0d658: 8c 1c 00 01 lbzu r0,1(r28) ffc0d65c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d660: 40 9e ff d4 bne+ cr7,ffc0d634 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); ffc0d664: 7f a3 eb 78 mr r3,r29 ffc0d668: 4b ff f7 05 bl ffc0cd6c /* * The returned node must be a directory */ node = pathloc->node_access; ffc0d66c: 81 3d 00 00 lwz r9,0(r29) /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); ffc0d670: 7c 7e 1b 78 mr r30,r3 /* * The returned node must be a directory */ node = pathloc->node_access; ffc0d674: 80 09 00 4c lwz r0,76(r9) ffc0d678: 2f 80 00 01 cmpwi cr7,r0,1 ffc0d67c: 40 9e 00 48 bne- cr7,ffc0d6c4 <== NEVER TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) ffc0d680: 7f a3 eb 78 mr r3,r29 ffc0d684: 38 80 00 03 li r4,3 ffc0d688: 4b ff f7 75 bl ffc0cdfc ffc0d68c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0d690: 40 9e fe 60 bne+ cr7,ffc0d4f0 rtems_set_errno_and_return_minus_one( EACCES ); ffc0d694: 48 00 5b e1 bl ffc13274 <__errno> ffc0d698: 38 00 00 0d li r0,13 ffc0d69c: 90 03 00 00 stw r0,0(r3) ffc0d6a0: 3b c0 ff ff li r30,-1 ffc0d6a4: 4b ff fe 4c b ffc0d4f0 * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) ffc0d6a8: 7f a3 eb 78 mr r3,r29 ffc0d6ac: 38 80 00 01 li r4,1 ffc0d6b0: 4b ff f7 4d bl ffc0cdfc ffc0d6b4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0d6b8: 41 be ff dc beq- cr7,ffc0d694 ffc0d6bc: 81 3d 00 00 lwz r9,0(r29) ffc0d6c0: 4b ff fe 84 b ffc0d544 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc0d6c4: 48 00 5b b1 bl ffc13274 <__errno> ffc0d6c8: 38 00 00 14 li r0,20 ffc0d6cc: 90 03 00 00 stw r0,0(r3) ffc0d6d0: 3b c0 ff ff li r30,-1 ffc0d6d4: 4b ff fe 1c b ffc0d4f0 * 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; ffc0d6d8: 81 28 00 28 lwz r9,40(r8) *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0d6dc: 7f a4 eb 78 mr r4,r29 * 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; ffc0d6e0: 80 e8 00 1c lwz r7,28(r8) *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0d6e4: 7e e5 bb 78 mr r5,r23 * 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; ffc0d6e8: 81 48 00 20 lwz r10,32(r8) ffc0d6ec: 81 68 00 24 lwz r11,36(r8) ffc0d6f0: 90 e1 00 0c stw r7,12(r1) ffc0d6f4: 91 41 00 10 stw r10,16(r1) ffc0d6f8: 91 61 00 14 stw r11,20(r1) ffc0d6fc: 91 21 00 18 stw r9,24(r1) ffc0d700: 80 08 00 2c lwz r0,44(r8) *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0d704: 80 61 00 08 lwz r3,8(r1) * 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; ffc0d708: 90 1d 00 10 stw r0,16(r29) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0d70c: 7c 63 e0 50 subf r3,r3,r28 * 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; ffc0d710: 90 fd 00 00 stw r7,0(r29) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0d714: 7c 7a 1a 14 add r3,r26,r3 * 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; ffc0d718: 91 5d 00 04 stw r10,4(r29) ffc0d71c: 91 7d 00 08 stw r11,8(r29) * 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; ffc0d720: 90 01 00 1c stw r0,28(r1) *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0d724: 80 09 00 04 lwz r0,4(r9) * 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; ffc0d728: 91 3d 00 0c stw r9,12(r29) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0d72c: 7c 09 03 a6 mtctr r0 ffc0d730: 4e 80 04 21 bctrl ffc0d734: 7c 7e 1b 78 mr r30,r3 ffc0d738: 4b ff fd b8 b ffc0d4f0 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); ffc0d73c: 7f a3 eb 78 mr r3,r29 ffc0d740: 38 80 00 00 li r4,0 ffc0d744: 4b ff fb d9 bl ffc0d31c if ( result == -1 ) ffc0d748: 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 ); ffc0d74c: 7c 7e 1b 78 mr r30,r3 if ( result == -1 ) ffc0d750: 41 be fd a0 beq- cr7,ffc0d4f0 <== NEVER TAKEN ffc0d754: 83 dd 00 00 lwz r30,0(r29) ffc0d758: 4b ff fe 44 b ffc0d59c if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; ffc0d75c: 81 28 00 14 lwz r9,20(r8) *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0d760: 7f a4 eb 78 mr r4,r29 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; ffc0d764: 80 e8 00 08 lwz r7,8(r8) *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc0d768: 7e e5 bb 78 mr r5,r23 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; ffc0d76c: 81 48 00 0c lwz r10,12(r8) ffc0d770: 81 68 00 10 lwz r11,16(r8) ffc0d774: 90 e1 00 0c stw r7,12(r1) ffc0d778: 91 41 00 10 stw r10,16(r1) ffc0d77c: 91 61 00 14 stw r11,20(r1) ffc0d780: 91 21 00 18 stw r9,24(r1) ffc0d784: 80 08 00 18 lwz r0,24(r8) ffc0d788: 4b ff ff 7c b ffc0d704 =============================================================================== ffc0ce7c : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { ffc0ce7c: 94 21 ff e8 stwu r1,-24(r1) ffc0ce80: 7c 08 02 a6 mflr r0 ffc0ce84: 90 01 00 1c stw r0,28(r1) IMFS_jnode_t *jnode = node->node_access; ffc0ce88: 81 23 00 00 lwz r9,0(r3) int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { ffc0ce8c: 93 e1 00 14 stw r31,20(r1) ffc0ce90: 7c 7f 1b 78 mr r31,r3 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) ffc0ce94: 80 09 00 4c lwz r0,76(r9) ffc0ce98: 2f 80 00 03 cmpwi cr7,r0,3 ffc0ce9c: 40 9e 00 54 bne- cr7,ffc0cef0 <== NEVER TAKEN /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; ffc0cea0: 80 09 00 50 lwz r0,80(r9) IMFS_Set_handlers( node ); ffc0cea4: 90 81 00 08 stw r4,8(r1) /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; ffc0cea8: 90 03 00 00 stw r0,0(r3) IMFS_Set_handlers( node ); ffc0ceac: 4b ff fe c1 bl ffc0cd6c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) ffc0ceb0: 80 81 00 08 lwz r4,8(r1) ffc0ceb4: 7f e3 fb 78 mr r3,r31 ffc0ceb8: 4b ff ff 45 bl ffc0cdfc ffc0cebc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0cec0: 38 60 00 00 li r3,0 ffc0cec4: 41 9e 00 18 beq- cr7,ffc0cedc <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0cec8: 80 01 00 1c lwz r0,28(r1) ffc0cecc: 83 e1 00 14 lwz r31,20(r1) ffc0ced0: 38 21 00 18 addi r1,r1,24 ffc0ced4: 7c 08 03 a6 mtlr r0 ffc0ced8: 4e 80 00 20 blr /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); ffc0cedc: 48 00 63 99 bl ffc13274 <__errno> <== NOT EXECUTED ffc0cee0: 38 00 00 0d li r0,13 <== NOT EXECUTED ffc0cee4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0cee8: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0ceec: 4b ff ff dc b ffc0cec8 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); ffc0cef0: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED ffc0cef4: 4b ff c1 45 bl ffc09038 <== NOT EXECUTED =============================================================================== ffc0d31c : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { ffc0d31c: 94 21 ff e0 stwu r1,-32(r1) ffc0d320: 7c 08 02 a6 mflr r0 ffc0d324: 93 a1 00 14 stw r29,20(r1) ffc0d328: 3f a0 00 00 lis r29,0 ffc0d32c: 93 61 00 0c stw r27,12(r1) else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); ffc0d330: 3b 7d 26 dc addi r27,r29,9948 int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { ffc0d334: 93 81 00 10 stw r28,16(r1) ffc0d338: 7c 9c 23 78 mr r28,r4 ffc0d33c: 93 c1 00 18 stw r30,24(r1) ffc0d340: 7c 7e 1b 78 mr r30,r3 ffc0d344: 90 01 00 24 stw r0,36(r1) ffc0d348: 93 e1 00 1c stw r31,28(r1) ffc0d34c: 81 3d 26 dc lwz r9,9948(r29) ffc0d350: 48 00 00 14 b ffc0d364 */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) ffc0d354: 41 9a 00 94 beq- cr6,ffc0d3e8 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); ffc0d358: 39 6b ff fd addi r11,r11,-3 ffc0d35c: 2b 8b 00 01 cmplwi cr7,r11,1 ffc0d360: 41 9d 00 58 bgt- cr7,ffc0d3b8 <== ALWAYS TAKEN /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; ffc0d364: a1 69 00 30 lhz r11,48(r9) { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; ffc0d368: 83 fe 00 00 lwz r31,0(r30) /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; ffc0d36c: 38 0b 00 01 addi r0,r11,1 ffc0d370: 54 00 04 3e clrlwi r0,r0,16 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { ffc0d374: 2b 80 00 05 cmplwi cr7,r0,5 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; ffc0d378: b0 09 00 30 sth r0,48(r9) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { ffc0d37c: 41 9d 00 88 bgt- cr7,ffc0d404 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) ffc0d380: 81 7f 00 4c lwz r11,76(r31) ffc0d384: 2f 8b 00 03 cmpwi cr7,r11,3 result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) ffc0d388: 2f 0b 00 04 cmpwi cr6,r11,4 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) ffc0d38c: 40 9e ff c8 bne+ cr7,ffc0d354 result = IMFS_evaluate_hard_link( node, flags ); ffc0d390: 7f c3 f3 78 mr r3,r30 ffc0d394: 7f 84 e3 78 mr r4,r28 ffc0d398: 4b ff fa e5 bl ffc0ce7c else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); ffc0d39c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0d3a0: 40 9e 00 5c bne- cr7,ffc0d3fc <== NEVER TAKEN ffc0d3a4: 81 7f 00 4c lwz r11,76(r31) ffc0d3a8: 81 3b 00 00 lwz r9,0(r27) ffc0d3ac: 39 6b ff fd addi r11,r11,-3 ffc0d3b0: 2b 8b 00 01 cmplwi cr7,r11,1 ffc0d3b4: 40 9d ff b0 ble+ cr7,ffc0d364 <== ALWAYS TAKEN ffc0d3b8: 38 60 00 00 li r3,0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; ffc0d3bc: 38 00 00 00 li r0,0 return result; } ffc0d3c0: 83 61 00 0c lwz r27,12(r1) /* * Clear link counter. */ rtems_filesystem_link_counts = 0; ffc0d3c4: b0 09 00 30 sth r0,48(r9) return result; } ffc0d3c8: 80 01 00 24 lwz r0,36(r1) ffc0d3cc: 83 81 00 10 lwz r28,16(r1) ffc0d3d0: 7c 08 03 a6 mtlr r0 ffc0d3d4: 83 a1 00 14 lwz r29,20(r1) ffc0d3d8: 83 c1 00 18 lwz r30,24(r1) ffc0d3dc: 83 e1 00 1c lwz r31,28(r1) ffc0d3e0: 38 21 00 20 addi r1,r1,32 ffc0d3e4: 4e 80 00 20 blr if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); ffc0d3e8: 7f c3 f3 78 mr r3,r30 ffc0d3ec: 7f 84 e3 78 mr r4,r28 ffc0d3f0: 4b ff fb 09 bl ffc0cef8 } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); ffc0d3f4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0d3f8: 41 9e ff ac beq+ cr7,ffc0d3a4 ffc0d3fc: 81 3d 26 dc lwz r9,9948(r29) ffc0d400: 4b ff ff bc b ffc0d3bc * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; ffc0d404: 38 00 00 00 li r0,0 ffc0d408: b0 09 00 30 sth r0,48(r9) rtems_set_errno_and_return_minus_one( ELOOP ); ffc0d40c: 48 00 5e 69 bl ffc13274 <__errno> ffc0d410: 38 00 00 5c li r0,92 ffc0d414: 90 03 00 00 stw r0,0(r3) ffc0d418: 38 60 ff ff li r3,-1 */ rtems_filesystem_link_counts = 0; return result; } ffc0d41c: 80 01 00 24 lwz r0,36(r1) ffc0d420: 83 61 00 0c lwz r27,12(r1) ffc0d424: 7c 08 03 a6 mtlr r0 ffc0d428: 83 81 00 10 lwz r28,16(r1) ffc0d42c: 83 a1 00 14 lwz r29,20(r1) ffc0d430: 83 c1 00 18 lwz r30,24(r1) ffc0d434: 83 e1 00 1c lwz r31,28(r1) ffc0d438: 38 21 00 20 addi r1,r1,32 ffc0d43c: 4e 80 00 20 blr =============================================================================== ffc0cdfc : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { ffc0cdfc: 94 21 ff e8 stwu r1,-24(r1) ffc0ce00: 7c 08 02 a6 mflr r0 ffc0ce04: 90 01 00 1c stw r0,28(r1) ffc0ce08: 93 e1 00 14 stw r31,20(r1) if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; ffc0ce0c: 83 e3 00 00 lwz r31,0(r3) int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { ffc0ce10: 93 a1 00 0c stw r29,12(r1) ffc0ce14: 93 c1 00 10 stw r30,16(r1) ffc0ce18: 7c 9e 23 78 mr r30,r4 } jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); ffc0ce1c: 48 00 15 3d bl ffc0e358 ffc0ce20: 7c 7d 1b 78 mr r29,r3 st_gid = getegid(); ffc0ce24: 48 00 15 25 bl ffc0e348 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) ffc0ce28: a1 3f 00 3c lhz r9,60(r31) flags_to_test <<= 6; ffc0ce2c: 57 c0 30 32 rlwinm r0,r30,6,0,25 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) ffc0ce30: 7f 89 e8 00 cmpw cr7,r9,r29 ffc0ce34: 41 9e 00 18 beq- cr7,ffc0ce4c flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) ffc0ce38: a1 3f 00 3e lhz r9,62(r31) flags_to_test <<= 3; ffc0ce3c: 57 c0 18 38 rlwinm r0,r30,3,0,28 flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) ffc0ce40: 7f 89 18 00 cmpw cr7,r9,r3 ffc0ce44: 41 9e 00 08 beq- cr7,ffc0ce4c <== ALWAYS TAKEN ffc0ce48: 7f c0 f3 78 mr r0,r30 <== 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 ) ffc0ce4c: 80 7f 00 30 lwz r3,48(r31) return 1; return 0; } ffc0ce50: 83 a1 00 0c lwz r29,12(r1) /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) ffc0ce54: 7c 03 18 38 and r3,r0,r3 return 1; return 0; } ffc0ce58: 83 c1 00 10 lwz r30,16(r1) ffc0ce5c: 7c 03 1a 78 xor r3,r0,r3 ffc0ce60: 80 01 00 1c lwz r0,28(r1) ffc0ce64: 7c 63 00 34 cntlzw r3,r3 ffc0ce68: 83 e1 00 14 lwz r31,20(r1) ffc0ce6c: 7c 08 03 a6 mtlr r0 ffc0ce70: 54 63 d9 7e rlwinm r3,r3,27,5,31 ffc0ce74: 38 21 00 18 addi r1,r1,24 ffc0ce78: 4e 80 00 20 blr =============================================================================== ffc0cef8 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { ffc0cef8: 94 21 ff e8 stwu r1,-24(r1) ffc0cefc: 7c 08 02 a6 mflr r0 ffc0cf00: 90 01 00 1c stw r0,28(r1) IMFS_jnode_t *jnode = node->node_access; ffc0cf04: 81 23 00 00 lwz r9,0(r3) int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { ffc0cf08: 93 c1 00 10 stw r30,16(r1) ffc0cf0c: 7c 9e 23 78 mr r30,r4 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) ffc0cf10: 80 09 00 4c lwz r0,76(r9) int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { ffc0cf14: 93 e1 00 14 stw r31,20(r1) ffc0cf18: 7c 7f 1b 78 mr r31,r3 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) ffc0cf1c: 2f 80 00 04 cmpwi cr7,r0,4 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { ffc0cf20: 93 a1 00 0c stw r29,12(r1) /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) ffc0cf24: 40 9e 00 f0 bne- cr7,ffc0d014 <== NEVER TAKEN rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) ffc0cf28: 80 09 00 08 lwz r0,8(r9) ffc0cf2c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cf30: 41 9e 00 dc beq- cr7,ffc0d00c <== NEVER TAKEN /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; ffc0cf34: 90 03 00 00 stw r0,0(r3) rtems_filesystem_get_sym_start_loc( ffc0cf38: 81 69 00 50 lwz r11,80(r9) ffc0cf3c: 88 0b 00 00 lbz r0,0(r11) ffc0cf40: 2f 80 00 2f cmpwi cr7,r0,47 ffc0cf44: 41 9e 00 78 beq- cr7,ffc0cfbc ffc0cf48: 2f 80 00 5c cmpwi cr7,r0,92 ffc0cf4c: 41 9e 00 70 beq- cr7,ffc0cfbc <== NEVER TAKEN ffc0cf50: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cf54: 3b a0 00 00 li r29,0 ffc0cf58: 41 9e 00 64 beq- cr7,ffc0cfbc <== NEVER TAKEN * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), ffc0cf5c: 7f ab ea 14 add r29,r11,r29 ffc0cf60: 7f a3 eb 78 mr r3,r29 ffc0cf64: 48 00 76 0d bl ffc14570 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( ffc0cf68: 7f c5 f3 78 mr r5,r30 &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), ffc0cf6c: 7c 64 1b 78 mr r4,r3 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( ffc0cf70: 7f e6 fb 78 mr r6,r31 ffc0cf74: 7f a3 eb 78 mr r3,r29 ffc0cf78: 48 00 00 a5 bl ffc0d01c ffc0cf7c: 7c 7d 1b 78 mr r29,r3 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); ffc0cf80: 7f e3 fb 78 mr r3,r31 ffc0cf84: 4b ff fd e9 bl ffc0cd6c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) ffc0cf88: 7f e3 fb 78 mr r3,r31 ffc0cf8c: 7f c4 f3 78 mr r4,r30 ffc0cf90: 4b ff fe 6d bl ffc0cdfc ffc0cf94: 2f 83 00 00 cmpwi cr7,r3,0 ffc0cf98: 41 9e 00 60 beq- cr7,ffc0cff8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EACCES ); return result; } ffc0cf9c: 80 01 00 1c lwz r0,28(r1) ffc0cfa0: 7f a3 eb 78 mr r3,r29 ffc0cfa4: 83 c1 00 10 lwz r30,16(r1) ffc0cfa8: 7c 08 03 a6 mtlr r0 ffc0cfac: 83 a1 00 0c lwz r29,12(r1) ffc0cfb0: 83 e1 00 14 lwz r31,20(r1) ffc0cfb4: 38 21 00 18 addi r1,r1,24 ffc0cfb8: 4e 80 00 20 blr * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( ffc0cfbc: 3d 60 00 00 lis r11,0 ffc0cfc0: 81 6b 26 dc lwz r11,9948(r11) ffc0cfc4: 3b a0 00 01 li r29,1 ffc0cfc8: 80 0b 00 24 lwz r0,36(r11) ffc0cfcc: 80 eb 00 18 lwz r7,24(r11) ffc0cfd0: 81 0b 00 1c lwz r8,28(r11) ffc0cfd4: 81 4b 00 20 lwz r10,32(r11) ffc0cfd8: 90 ff 00 00 stw r7,0(r31) ffc0cfdc: 91 1f 00 04 stw r8,4(r31) ffc0cfe0: 91 5f 00 08 stw r10,8(r31) ffc0cfe4: 90 1f 00 0c stw r0,12(r31) ffc0cfe8: 80 0b 00 28 lwz r0,40(r11) ffc0cfec: 90 1f 00 10 stw r0,16(r31) ffc0cff0: 81 69 00 50 lwz r11,80(r9) ffc0cff4: 4b ff ff 68 b ffc0cf5c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); ffc0cff8: 48 00 62 7d bl ffc13274 <__errno> <== NOT EXECUTED ffc0cffc: 38 00 00 0d li r0,13 <== NOT EXECUTED ffc0d000: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0d004: 3b a0 ff ff li r29,-1 <== NOT EXECUTED ffc0d008: 4b ff ff 94 b ffc0cf9c <== NOT EXECUTED if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); ffc0d00c: 3c 60 ba d0 lis r3,-17712 <== NOT EXECUTED ffc0d010: 4b ff c0 29 bl ffc09038 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); ffc0d014: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED ffc0d018: 4b ff c0 21 bl ffc09038 <== NOT EXECUTED =============================================================================== ffc11478 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { ffc11478: 94 21 ff e0 stwu r1,-32(r1) ffc1147c: 7c 08 02 a6 mflr r0 ffc11480: 90 01 00 24 stw r0,36(r1) ffc11484: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; ffc11488: 83 e3 00 00 lwz r31,0(r3) int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { ffc1148c: 93 c1 00 18 stw r30,24(r1) ffc11490: 7c 9e 23 78 mr r30,r4 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); ffc11494: 4b ff ce c5 bl ffc0e358 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) ffc11498: a0 1f 00 3c lhz r0,60(r31) ffc1149c: 7f 80 18 00 cmpw cr7,r0,r3 ffc114a0: 41 9e 00 0c beq- cr7,ffc114ac <== ALWAYS TAKEN ffc114a4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc114a8: 40 9e 00 48 bne- cr7,ffc114f0 <== NOT EXECUTED /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); ffc114ac: 80 1f 00 30 lwz r0,48(r31) ffc114b0: 57 de 05 3e clrlwi r30,r30,20 IMFS_update_ctime( jnode ); ffc114b4: 38 61 00 08 addi r3,r1,8 /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); ffc114b8: 54 00 00 26 rlwinm r0,r0,0,0,19 ffc114bc: 7f de 03 78 or r30,r30,r0 ffc114c0: 93 df 00 30 stw r30,48(r31) IMFS_update_ctime( jnode ); ffc114c4: 38 80 00 00 li r4,0 ffc114c8: 4b ff ce a1 bl ffc0e368 ffc114cc: 80 01 00 08 lwz r0,8(r1) ffc114d0: 38 60 00 00 li r3,0 ffc114d4: 90 1f 00 48 stw r0,72(r31) return 0; } ffc114d8: 80 01 00 24 lwz r0,36(r1) ffc114dc: 83 c1 00 18 lwz r30,24(r1) ffc114e0: 7c 08 03 a6 mtlr r0 ffc114e4: 83 e1 00 1c lwz r31,28(r1) ffc114e8: 38 21 00 20 addi r1,r1,32 ffc114ec: 4e 80 00 20 blr */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); ffc114f0: 48 00 1d 85 bl ffc13274 <__errno> <== NOT EXECUTED ffc114f4: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc114f8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc114fc: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc11500: 4b ff ff d8 b ffc114d8 <== NOT EXECUTED =============================================================================== ffc0d9a0 : } int IMFS_fifo_close( rtems_libio_t *iop ) { ffc0d9a0: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED ffc0d9a4: 7c 08 02 a6 mflr r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); ffc0d9a8: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { ffc0d9ac: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED ffc0d9b0: 93 c1 00 10 stw r30,16(r1) <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; ffc0d9b4: 83 c3 00 3c lwz r30,60(r3) <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { ffc0d9b8: 93 e1 00 14 stw r31,20(r1) <== NOT EXECUTED ffc0d9bc: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); ffc0d9c0: 38 7e 00 50 addi r3,r30,80 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { ffc0d9c4: 93 a1 00 0c stw r29,12(r1) <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); ffc0d9c8: 48 00 32 51 bl ffc10c18 <== NOT EXECUTED if (! err) { ffc0d9cc: 7c 7d 1b 79 mr. r29,r3 <== NOT EXECUTED ffc0d9d0: 41 82 00 28 beq- ffc0d9f8 <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) free(jnode); } IMFS_FIFO_RETURN(err); ffc0d9d4: 41 80 00 58 blt- ffc0da2c <== NOT EXECUTED } ffc0d9d8: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc0d9dc: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc0d9e0: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc0d9e4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0d9e8: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc0d9ec: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc0d9f0: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc0d9f4: 4e 80 00 20 blr <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; ffc0d9f8: 80 1f 00 18 lwz r0,24(r31) <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) ffc0d9fc: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; ffc0da00: 54 00 06 2c rlwinm r0,r0,0,24,22 <== NOT EXECUTED ffc0da04: 90 1f 00 18 stw r0,24(r31) <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) ffc0da08: 48 00 0a 51 bl ffc0e458 <== NOT EXECUTED ffc0da0c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc0da10: 40 be ff c8 bne- cr7,ffc0d9d8 <== NOT EXECUTED ffc0da14: a0 1e 00 34 lhz r0,52(r30) <== NOT EXECUTED ffc0da18: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0da1c: 40 9e ff bc bne+ cr7,ffc0d9d8 <== NOT EXECUTED free(jnode); ffc0da20: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc0da24: 4b ff 6b d1 bl ffc045f4 <== NOT EXECUTED ffc0da28: 4b ff ff b0 b ffc0d9d8 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); ffc0da2c: 7f bd 00 d0 neg r29,r29 <== NOT EXECUTED ffc0da30: 48 00 58 45 bl ffc13274 <__errno> <== NOT EXECUTED ffc0da34: 93 a3 00 00 stw r29,0(r3) <== NOT EXECUTED ffc0da38: 3b a0 ff ff li r29,-1 <== NOT EXECUTED ffc0da3c: 4b ff ff 9c b ffc0d9d8 <== NOT EXECUTED =============================================================================== ffc0d7f4 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { ffc0d7f4: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc0d7f8: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc0d7fc: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED ffc0d800: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED int err; if (command == FIONBIO) { ffc0d804: 3c 00 80 04 lis r0,-32764 <== NOT EXECUTED ffc0d808: 60 00 66 7e ori r0,r0,26238 <== NOT EXECUTED ffc0d80c: 7f 84 00 00 cmpw cr7,r4,r0 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { ffc0d810: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED int err; if (command == FIONBIO) { ffc0d814: 41 9e 00 2c beq- cr7,ffc0d840 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); ffc0d818: 81 23 00 3c lwz r9,60(r3) <== NOT EXECUTED ffc0d81c: 80 69 00 50 lwz r3,80(r9) <== NOT EXECUTED ffc0d820: 48 00 2e 95 bl ffc106b4 <== NOT EXECUTED IMFS_FIFO_RETURN(err); ffc0d824: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc0d828: 41 80 00 78 blt- ffc0d8a0 <== NOT EXECUTED } ffc0d82c: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc0d830: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc0d834: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc0d838: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0d83c: 4e 80 00 20 blr <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) ffc0d840: 2f 85 00 00 cmpwi cr7,r5,0 <== NOT EXECUTED ffc0d844: 3b e0 00 0e li r31,14 <== NOT EXECUTED ffc0d848: 41 9e 00 5c beq- cr7,ffc0d8a4 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) ffc0d84c: 80 05 00 00 lwz r0,0(r5) <== NOT EXECUTED ffc0d850: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0d854: 41 9e 00 28 beq- cr7,ffc0d87c <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; ffc0d858: 80 03 00 18 lwz r0,24(r3) <== NOT EXECUTED ffc0d85c: 38 60 00 00 li r3,0 <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } ffc0d860: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; ffc0d864: 60 00 00 01 ori r0,r0,1 <== NOT EXECUTED ffc0d868: 90 06 00 18 stw r0,24(r6) <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } ffc0d86c: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc0d870: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc0d874: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0d878: 4e 80 00 20 blr <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; ffc0d87c: 80 03 00 18 lwz r0,24(r3) <== NOT EXECUTED ffc0d880: 38 60 00 00 li r3,0 <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } ffc0d884: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; ffc0d888: 54 00 00 3c rlwinm r0,r0,0,0,30 <== NOT EXECUTED ffc0d88c: 90 06 00 18 stw r0,24(r6) <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } ffc0d890: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc0d894: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc0d898: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0d89c: 4e 80 00 20 blr <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); ffc0d8a0: 7f e3 00 d0 neg r31,r3 <== NOT EXECUTED ffc0d8a4: 48 00 59 d1 bl ffc13274 <__errno> <== NOT EXECUTED ffc0d8a8: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED ffc0d8ac: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0d8b0: 4b ff ff 7c b ffc0d82c <== NOT EXECUTED =============================================================================== ffc0d78c : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { ffc0d78c: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc0d790: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc0d794: 7c 68 1b 78 mr r8,r3 <== NOT EXECUTED ffc0d798: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED ffc0d79c: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); ffc0d7a0: 81 23 00 3c lwz r9,60(r3) <== NOT EXECUTED ffc0d7a4: 80 69 00 50 lwz r3,80(r9) <== NOT EXECUTED ffc0d7a8: 48 00 2e 85 bl ffc1062c <== NOT EXECUTED ffc0d7ac: 7c 69 fe 70 srawi r9,r3,31 <== NOT EXECUTED IMFS_FIFO_RETURN(err); ffc0d7b0: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED rtems_libio_t *iop, rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); ffc0d7b4: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED ffc0d7b8: 7c 6a 1b 78 mr r10,r3 <== NOT EXECUTED IMFS_FIFO_RETURN(err); ffc0d7bc: 41 9c 00 20 blt- cr7,ffc0d7dc <== NOT EXECUTED } ffc0d7c0: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc0d7c4: 7d 44 53 78 mr r4,r10 <== NOT EXECUTED ffc0d7c8: 7d 23 4b 78 mr r3,r9 <== NOT EXECUTED ffc0d7cc: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc0d7d0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0d7d4: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc0d7d8: 4e 80 00 20 blr <== NOT EXECUTED rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); ffc0d7dc: 48 00 5a 99 bl ffc13274 <__errno> <== NOT EXECUTED ffc0d7e0: 7f ff 00 d0 neg r31,r31 <== NOT EXECUTED ffc0d7e4: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED ffc0d7e8: 39 20 ff ff li r9,-1 <== NOT EXECUTED ffc0d7ec: 39 40 ff ff li r10,-1 <== NOT EXECUTED ffc0d7f0: 4b ff ff d0 b ffc0d7c0 <== NOT EXECUTED =============================================================================== ffc0da40 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc0da40: 94 21 ff f0 stwu r1,-16(r1) ffc0da44: 7c 08 02 a6 mflr r0 ffc0da48: 7c 64 1b 78 mr r4,r3 ffc0da4c: 90 01 00 14 stw r0,20(r1) IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); ffc0da50: 81 23 00 3c lwz r9,60(r3) rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc0da54: 93 e1 00 0c stw r31,12(r1) IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); ffc0da58: 38 69 00 50 addi r3,r9,80 ffc0da5c: 48 00 33 65 bl ffc10dc0 IMFS_FIFO_RETURN(err); ffc0da60: 7c 7f 1b 79 mr. r31,r3 ffc0da64: 41 80 00 1c blt- ffc0da80 <== ALWAYS TAKEN } ffc0da68: 80 01 00 14 lwz r0,20(r1) ffc0da6c: 7f e3 fb 78 mr r3,r31 ffc0da70: 83 e1 00 0c lwz r31,12(r1) ffc0da74: 38 21 00 10 addi r1,r1,16 ffc0da78: 7c 08 03 a6 mtlr r0 ffc0da7c: 4e 80 00 20 blr ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); IMFS_FIFO_RETURN(err); ffc0da80: 7f ff 00 d0 neg r31,r31 ffc0da84: 48 00 57 f1 bl ffc13274 <__errno> ffc0da88: 93 e3 00 00 stw r31,0(r3) ffc0da8c: 3b e0 ff ff li r31,-1 ffc0da90: 4b ff ff d8 b ffc0da68 =============================================================================== ffc0d92c : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc0d92c: 94 21 ff e0 stwu r1,-32(r1) <== NOT EXECUTED ffc0d930: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc0d934: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED ffc0d938: 90 01 00 24 stw r0,36(r1) <== NOT EXECUTED ffc0d93c: 93 c1 00 18 stw r30,24(r1) <== NOT EXECUTED ffc0d940: 93 e1 00 1c stw r31,28(r1) <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; ffc0d944: 83 e3 00 3c lwz r31,60(r3) <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); ffc0d948: 80 7f 00 50 lwz r3,80(r31) <== NOT EXECUTED ffc0d94c: 48 00 2d f1 bl ffc1073c <== NOT EXECUTED if (err > 0) ffc0d950: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED ffc0d954: 40 81 00 34 ble- ffc0d988 <== NOT EXECUTED IMFS_update_atime(jnode); ffc0d958: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED ffc0d95c: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc0d960: 48 00 0a 09 bl ffc0e368 <== NOT EXECUTED ffc0d964: 80 01 00 08 lwz r0,8(r1) <== NOT EXECUTED ffc0d968: 90 1f 00 40 stw r0,64(r31) <== NOT EXECUTED IMFS_FIFO_RETURN(err); } ffc0d96c: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED ffc0d970: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc0d974: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc0d978: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0d97c: 83 c1 00 18 lwz r30,24(r1) <== NOT EXECUTED ffc0d980: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc0d984: 4e 80 00 20 blr <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); ffc0d988: 41 82 ff e4 beq+ ffc0d96c <== NOT EXECUTED ffc0d98c: 7f de 00 d0 neg r30,r30 <== NOT EXECUTED ffc0d990: 48 00 58 e5 bl ffc13274 <__errno> <== NOT EXECUTED ffc0d994: 93 c3 00 00 stw r30,0(r3) <== NOT EXECUTED ffc0d998: 3b c0 ff ff li r30,-1 <== NOT EXECUTED ffc0d99c: 4b ff ff d0 b ffc0d96c <== NOT EXECUTED =============================================================================== ffc0d8b4 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { ffc0d8b4: 94 21 ff e0 stwu r1,-32(r1) <== NOT EXECUTED ffc0d8b8: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc0d8bc: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED ffc0d8c0: 90 01 00 24 stw r0,36(r1) <== NOT EXECUTED ffc0d8c4: 93 c1 00 18 stw r30,24(r1) <== NOT EXECUTED ffc0d8c8: 93 e1 00 1c stw r31,28(r1) <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; ffc0d8cc: 83 e3 00 3c lwz r31,60(r3) <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); ffc0d8d0: 80 7f 00 50 lwz r3,80(r31) <== NOT EXECUTED ffc0d8d4: 48 00 30 bd bl ffc10990 <== NOT EXECUTED if (err > 0) { ffc0d8d8: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED ffc0d8dc: 40 81 00 38 ble- ffc0d914 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); ffc0d8e0: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED ffc0d8e4: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc0d8e8: 48 00 0a 81 bl ffc0e368 <== NOT EXECUTED ffc0d8ec: 80 01 00 08 lwz r0,8(r1) <== NOT EXECUTED ffc0d8f0: 90 1f 00 48 stw r0,72(r31) <== NOT EXECUTED ffc0d8f4: 90 1f 00 44 stw r0,68(r31) <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } ffc0d8f8: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED ffc0d8fc: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc0d900: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc0d904: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0d908: 83 c1 00 18 lwz r30,24(r1) <== NOT EXECUTED ffc0d90c: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc0d910: 4e 80 00 20 blr <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); ffc0d914: 41 82 ff e4 beq+ ffc0d8f8 <== NOT EXECUTED ffc0d918: 7f de 00 d0 neg r30,r30 <== NOT EXECUTED ffc0d91c: 48 00 59 59 bl ffc13274 <__errno> <== NOT EXECUTED ffc0d920: 93 c3 00 00 stw r30,0(r3) <== NOT EXECUTED ffc0d924: 3b c0 ff ff li r30,-1 <== NOT EXECUTED ffc0d928: 4b ff ff d0 b ffc0d8f8 <== NOT EXECUTED =============================================================================== ffc0da94 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0da94: 94 21 ff e8 stwu r1,-24(r1) ffc0da98: 7c 08 02 a6 mflr r0 ffc0da9c: 93 c1 00 10 stw r30,16(r1) /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); ffc0daa0: 7c 7e 1b 79 mr. r30,r3 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc0daa4: 93 e1 00 14 stw r31,20(r1) ffc0daa8: 7c 9f 23 78 mr r31,r4 ffc0daac: 90 01 00 1c stw r0,28(r1) ffc0dab0: 93 a1 00 0c stw r29,12(r1) /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); ffc0dab4: 41 82 00 c0 beq- ffc0db74 <== NEVER TAKEN if ( !name ) ffc0dab8: 2f 84 00 00 cmpwi cr7,r4,0 ffc0dabc: 41 9e 00 58 beq- cr7,ffc0db14 <== NEVER TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc0dac0: 3f a0 ff c2 lis r29,-62 ffc0dac4: 3b bd f8 00 addi r29,r29,-2048 ffc0dac8: 7c 83 23 78 mr r3,r4 ffc0dacc: 38 9d 00 18 addi r4,r29,24 ffc0dad0: 48 00 69 81 bl ffc14450 ffc0dad4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0dad8: 41 9e 00 1c beq- cr7,ffc0daf4 <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) ffc0dadc: 38 9d 00 1c addi r4,r29,28 ffc0dae0: 7f e3 fb 78 mr r3,r31 ffc0dae4: 48 00 69 6d bl ffc14450 ffc0dae8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0daec: 40 9e 00 4c bne- cr7,ffc0db38 <== ALWAYS TAKEN return directory->Parent; ffc0daf0: 83 de 00 08 lwz r30,8(r30) <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } ffc0daf4: 80 01 00 1c lwz r0,28(r1) ffc0daf8: 7f c3 f3 78 mr r3,r30 ffc0dafc: 83 a1 00 0c lwz r29,12(r1) ffc0db00: 7c 08 03 a6 mtlr r0 ffc0db04: 83 c1 00 10 lwz r30,16(r1) ffc0db08: 83 e1 00 14 lwz r31,20(r1) ffc0db0c: 38 21 00 18 addi r1,r1,24 ffc0db10: 4e 80 00 20 blr ffc0db14: 80 01 00 1c lwz r0,28(r1) if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; ffc0db18: 3b c0 00 00 li r30,0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } ffc0db1c: 7f c3 f3 78 mr r3,r30 ffc0db20: 83 a1 00 0c lwz r29,12(r1) ffc0db24: 7c 08 03 a6 mtlr r0 ffc0db28: 83 c1 00 10 lwz r30,16(r1) ffc0db2c: 83 e1 00 14 lwz r31,20(r1) ffc0db30: 38 21 00 18 addi r1,r1,24 ffc0db34: 4e 80 00 20 blr if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; ffc0db38: 83 be 00 50 lwz r29,80(r30) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0db3c: 3b de 00 54 addi r30,r30,84 ffc0db40: 7f 9d f0 00 cmpw cr7,r29,r30 ffc0db44: 40 be 00 14 bne+ cr7,ffc0db58 ffc0db48: 4b ff ff cc b ffc0db14 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { ffc0db4c: 83 bd 00 00 lwz r29,0(r29) if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; ffc0db50: 7f 9d f0 00 cmpw cr7,r29,r30 ffc0db54: 41 be ff c0 beq- cr7,ffc0db14 !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 ) ) ffc0db58: 7f e3 fb 78 mr r3,r31 ffc0db5c: 38 9d 00 0c addi r4,r29,12 ffc0db60: 48 00 68 f1 bl ffc14450 ffc0db64: 2f 83 00 00 cmpwi cr7,r3,0 ffc0db68: 40 9e ff e4 bne+ cr7,ffc0db4c ffc0db6c: 7f be eb 78 mr r30,r29 ffc0db70: 4b ff ff 84 b ffc0daf4 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); ffc0db74: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc0db78: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc0db7c: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc0db80: 38 63 f8 20 addi r3,r3,-2016 <== NOT EXECUTED ffc0db84: 38 a5 f8 00 addi r5,r5,-2048 <== NOT EXECUTED ffc0db88: 38 c6 f8 6c addi r6,r6,-1940 <== NOT EXECUTED ffc0db8c: 38 80 00 2a li r4,42 <== NOT EXECUTED ffc0db90: 4b ff 65 7d bl ffc0410c <__assert_func> <== NOT EXECUTED =============================================================================== ffc14128 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc14128: 94 21 ff c8 stwu r1,-56(r1) ffc1412c: 7c 08 02 a6 mflr r0 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; ffc14130: 39 00 00 00 li r8,0 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc14134: 90 01 00 3c stw r0,60(r1) ffc14138: 93 a1 00 2c stw r29,44(r1) * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; ffc1413c: 81 43 00 20 lwz r10,32(r3) /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; ffc14140: 83 a3 00 1c lwz r29,28(r3) loc = temp_mt_entry->mt_fs_root; ffc14144: 81 63 00 24 lwz r11,36(r3) ffc14148: 81 23 00 28 lwz r9,40(r3) ffc1414c: 80 03 00 2c lwz r0,44(r3) /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; ffc14150: 91 03 00 1c stw r8,28(r3) ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc14154: 93 c1 00 30 stw r30,48(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; ffc14158: 91 41 00 0c stw r10,12(r1) ffc1415c: 91 61 00 10 stw r11,16(r1) ffc14160: 91 21 00 14 stw r9,20(r1) ffc14164: 90 01 00 18 stw r0,24(r1) ffc14168: 93 a1 00 08 stw r29,8(r1) ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc1416c: 93 e1 00 34 stw r31,52(r1) ffc14170: 3b e1 00 08 addi r31,r1,8 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); ffc14174: 7f e3 fb 78 mr r3,r31 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; ffc14178: 93 a1 00 08 stw r29,8(r1) */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; ffc1417c: 83 dd 00 08 lwz r30,8(r29) loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); ffc14180: 4b ff f2 79 bl ffc133f8 if ( jnode->type != IMFS_DIRECTORY ) { ffc14184: 80 1d 00 4c lwz r0,76(r29) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc14188: 39 3d 00 54 addi r9,r29,84 ffc1418c: 2f 80 00 01 cmpwi cr7,r0,1 ffc14190: 40 9e 00 60 bne- cr7,ffc141f0 ffc14194: 80 1d 00 50 lwz r0,80(r29) ffc14198: 7f 80 48 00 cmpw cr7,r0,r9 ffc1419c: 41 9e 00 54 beq- cr7,ffc141f0 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { ffc141a0: 2f 9d 00 00 cmpwi cr7,r29,0 ffc141a4: 41 9e 00 2c beq- cr7,ffc141d0 if ( jnode->type == IMFS_DIRECTORY ) { ffc141a8: 80 1d 00 4c lwz r0,76(r29) ffc141ac: 2f 80 00 01 cmpwi cr7,r0,1 ffc141b0: 40 9e ff c4 bne+ cr7,ffc14174 <== NEVER TAKEN ffc141b4: 80 1d 00 50 lwz r0,80(r29) ffc141b8: 39 3d 00 54 addi r9,r29,84 ffc141bc: 7f 80 48 00 cmpw cr7,r0,r9 ffc141c0: 41 be ff b4 beq- cr7,ffc14174 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); ffc141c4: 2f 80 00 00 cmpwi cr7,r0,0 ffc141c8: 7c 1d 03 78 mr r29,r0 ffc141cc: 40 9e ff a8 bne+ cr7,ffc14174 <== ALWAYS TAKEN ffc141d0: 38 60 00 00 li r3,0 return 0; } ffc141d4: 80 01 00 3c lwz r0,60(r1) ffc141d8: 83 a1 00 2c lwz r29,44(r1) ffc141dc: 7c 08 03 a6 mtlr r0 ffc141e0: 83 c1 00 30 lwz r30,48(r1) ffc141e4: 83 e1 00 34 lwz r31,52(r1) ffc141e8: 38 21 00 38 addi r1,r1,56 ffc141ec: 4e 80 00 20 blr result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); ffc141f0: 38 60 00 00 li r3,0 ffc141f4: 7f e4 fb 78 mr r4,r31 ffc141f8: 4b ff 16 6d bl ffc05864 if (result != 0) ffc141fc: 2f 83 00 00 cmpwi cr7,r3,0 ffc14200: 40 9e 00 0c bne- cr7,ffc1420c <== NEVER TAKEN ffc14204: 7f dd f3 78 mr r29,r30 ffc14208: 4b ff ff 98 b ffc141a0 if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); ffc1420c: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc14210: 4b ff ff c4 b ffc141d4 <== NOT EXECUTED =============================================================================== ffc0db94 : const char *path, int pathlen, char *token, int *token_len ) { ffc0db94: 94 21 ff f0 stwu r1,-16(r1) ffc0db98: 7c 08 02 a6 mflr r0 ffc0db9c: 2f 84 00 00 cmpwi cr7,r4,0 ffc0dba0: 90 01 00 14 stw r0,20(r1) register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; ffc0dba4: 88 03 00 00 lbz r0,0(r3) while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { ffc0dba8: 2f 00 00 2f cmpwi cr6,r0,47 ffc0dbac: 41 9a 00 e4 beq- cr6,ffc0dc90 ffc0dbb0: 2f 00 00 5c cmpwi cr6,r0,92 ffc0dbb4: 41 9a 00 dc beq- cr6,ffc0dc90 ffc0dbb8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0dbbc: 41 9e 00 f8 beq- cr7,ffc0dcb4 ffc0dbc0: 2f 84 00 00 cmpwi cr7,r4,0 ffc0dbc4: 40 9d 00 cc ble- cr7,ffc0dc90 <== NEVER TAKEN token[i] = c; ffc0dbc8: 98 05 00 00 stb r0,0(r5) ffc0dbcc: 38 00 00 20 li r0,32 ffc0dbd0: 7c 09 03 a6 mtctr r0 ffc0dbd4: 39 20 00 00 li r9,0 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; ffc0dbd8: 39 29 00 01 addi r9,r9,1 ffc0dbdc: 7c 03 48 ae lbzx r0,r3,r9 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { ffc0dbe0: 7c 04 48 00 cmpw r4,r9 ffc0dbe4: 2f 80 00 2f cmpwi cr7,r0,47 ffc0dbe8: 2f 00 00 5c cmpwi cr6,r0,92 ffc0dbec: 2c 80 00 00 cmpwi cr1,r0,0 ffc0dbf0: 41 9e 00 2c beq- cr7,ffc0dc1c ffc0dbf4: 41 9a 00 28 beq- cr6,ffc0dc1c ffc0dbf8: 41 86 00 24 beq- cr1,ffc0dc1c ffc0dbfc: 40 81 00 20 ble- ffc0dc1c token[i] = c; ffc0dc00: 7c 05 49 ae stbx r0,r5,r9 if ( i == IMFS_NAME_MAX ) ffc0dc04: 42 00 ff d4 bdnz+ ffc0dbd8 ffc0dc08: 38 60 00 04 li r3,4 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } ffc0dc0c: 80 01 00 14 lwz r0,20(r1) ffc0dc10: 38 21 00 10 addi r1,r1,16 ffc0dc14: 7c 08 03 a6 mtlr r0 ffc0dc18: 4e 80 00 20 blr i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { ffc0dc1c: 7d 65 4a 14 add r11,r5,r9 ffc0dc20: 88 0b ff ff lbz r0,-1(r11) ffc0dc24: 2f 80 00 00 cmpwi cr7,r0,0 ffc0dc28: 41 9e 00 0c beq- cr7,ffc0dc34 <== NEVER TAKEN token[i] = '\0'; ffc0dc2c: 38 00 00 00 li r0,0 ffc0dc30: 7c 05 49 ae stbx r0,r5,r9 /* * Set token_len to the number of characters copied. */ *token_len = i; ffc0dc34: 91 26 00 00 stw r9,0(r6) * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) ffc0dc38: 3c 80 ff c2 lis r4,-62 ffc0dc3c: 7c a3 2b 78 mr r3,r5 ffc0dc40: 38 84 f8 7c addi r4,r4,-1924 ffc0dc44: 90 a1 00 08 stw r5,8(r1) ffc0dc48: 48 00 68 09 bl ffc14450 ffc0dc4c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0dc50: 80 a1 00 08 lwz r5,8(r1) ffc0dc54: 38 60 00 02 li r3,2 ffc0dc58: 41 be ff b4 beq- cr7,ffc0dc0c type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) ffc0dc5c: 3c 80 ff c2 lis r4,-62 ffc0dc60: 7c a3 2b 78 mr r3,r5 ffc0dc64: 38 84 f8 78 addi r4,r4,-1928 ffc0dc68: 48 00 67 e9 bl ffc14450 ffc0dc6c: 7c 60 fe 70 srawi r0,r3,31 ffc0dc70: 7c 03 1a 78 xor r3,r0,r3 ffc0dc74: 7c 63 00 50 subf r3,r3,r0 type = IMFS_CURRENT_DIR; } return type; } ffc0dc78: 80 01 00 14 lwz r0,20(r1) */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) ffc0dc7c: 54 63 17 bc rlwinm r3,r3,2,30,30 type = IMFS_CURRENT_DIR; } return type; } ffc0dc80: 7c 08 03 a6 mtlr r0 */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) ffc0dc84: 38 63 00 01 addi r3,r3,1 type = IMFS_CURRENT_DIR; } return type; } ffc0dc88: 38 21 00 10 addi r1,r1,16 ffc0dc8c: 4e 80 00 20 blr /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; ffc0dc90: 98 05 00 00 stb r0,0(r5) if ( (token[i] != '\0') && pathlen ) { ffc0dc94: 41 9e 00 24 beq- cr7,ffc0dcb8 type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { token[i] = '\0'; ffc0dc98: 38 00 00 01 li r0,1 /* * Set token_len to the number of characters copied. */ *token_len = i; ffc0dc9c: 90 06 00 00 stw r0,0(r6) type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { token[i] = '\0'; ffc0dca0: 38 60 00 01 li r3,1 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } ffc0dca4: 80 01 00 14 lwz r0,20(r1) ffc0dca8: 38 21 00 10 addi r1,r1,16 ffc0dcac: 7c 08 03 a6 mtlr r0 ffc0dcb0: 4e 80 00 20 blr /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; ffc0dcb4: 98 05 00 00 stb r0,0(r5) ffc0dcb8: 38 00 00 00 li r0,0 ffc0dcbc: 38 60 00 00 li r3,0 /* * Set token_len to the number of characters copied. */ *token_len = i; ffc0dcc0: 90 06 00 00 stw r0,0(r6) ffc0dcc4: 4b ff ff e0 b ffc0dca4 =============================================================================== ffc0dcc8 : rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { ffc0dcc8: 94 21 ff e8 stwu r1,-24(r1) ffc0dccc: 7c 08 02 a6 mflr r0 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, ffc0dcd0: 3d 20 00 00 lis r9,0 rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { ffc0dcd4: 90 01 00 1c stw r0,28(r1) IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, ffc0dcd8: 80 09 26 90 lwz r0,9872(r9) rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { ffc0dcdc: 93 81 00 08 stw r28,8(r1) ffc0dce0: 7c 9c 23 78 mr r28,r4 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { ffc0dce4: 2f 80 00 10 cmpwi cr7,r0,16 rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { ffc0dce8: 93 a1 00 0c stw r29,12(r1) ffc0dcec: 7c dd 33 78 mr r29,r6 ffc0dcf0: 93 c1 00 10 stw r30,16(r1) ffc0dcf4: 7c be 2b 78 mr r30,r5 ffc0dcf8: 93 e1 00 14 stw r31,20(r1) ffc0dcfc: 7c 7f 1b 78 mr r31,r3 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { ffc0dd00: 41 9e 00 24 beq- cr7,ffc0dd24 <== NEVER TAKEN ffc0dd04: 39 60 00 05 li r11,5 ffc0dd08: 7d 69 03 a6 mtctr r11 ffc0dd0c: 39 20 00 20 li r9,32 ffc0dd10: 7f 80 48 00 cmpw cr7,r0,r9 ffc0dd14: 55 29 08 3c rlwinm r9,r9,1,0,30 ffc0dd18: 41 9e 00 0c beq- cr7,ffc0dd24 ffc0dd1c: 42 00 ff f4 bdnz+ ffc0dd10 ffc0dd20: 38 00 00 80 li r0,128 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) ffc0dd24: 3d 20 00 00 lis r9,0 ffc0dd28: 90 09 27 e0 stw r0,10208(r9) /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); ffc0dd2c: 48 00 35 79 bl ffc112a4 temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; ffc0dd30: 3c 80 ff c2 lis r4,-62 /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); ffc0dd34: 90 7f 00 1c stw r3,28(r31) temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; ffc0dd38: 38 84 fb ac addi r4,r4,-1108 ffc0dd3c: 38 a0 00 30 li r5,48 * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; ffc0dd40: 93 9f 00 28 stw r28,40(r31) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; ffc0dd44: 38 7f 00 38 addi r3,r31,56 * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; ffc0dd48: 93 bf 00 24 stw r29,36(r31) temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; ffc0dd4c: 48 00 61 11 bl ffc13e5c /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); ffc0dd50: 38 60 00 01 li r3,1 ffc0dd54: 38 80 00 10 li r4,16 ffc0dd58: 48 00 03 81 bl ffc0e0d8 if ( !fs_info ) { ffc0dd5c: 2c 03 00 00 cmpwi r3,0 ffc0dd60: 41 82 00 5c beq- ffc0ddbc <== NEVER TAKEN /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; ffc0dd64: 3d 20 00 00 lis r9,0 fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; ffc0dd68: 81 1f 00 1c lwz r8,28(r31) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; ffc0dd6c: 81 69 29 90 lwz r11,10640(r9) fs_info->ino_count = 1; ffc0dd70: 38 00 00 01 li r0,1 ffc0dd74: 90 03 00 04 stw r0,4(r3) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; ffc0dd78: 39 4b 00 01 addi r10,r11,1 ffc0dd7c: 91 63 00 00 stw r11,0(r3) fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; ffc0dd80: 93 a3 00 0c stw r29,12(r3) * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; ffc0dd84: 93 c3 00 08 stw r30,8(r3) fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; ffc0dd88: 90 7f 00 34 stw r3,52(r31) fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; ffc0dd8c: 90 08 00 38 stw r0,56(r8) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; ffc0dd90: 91 49 29 90 stw r10,10640(r9) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); ffc0dd94: 48 00 28 a1 bl ffc10634 ffc0dd98: 38 60 00 00 li r3,0 return 0; } ffc0dd9c: 80 01 00 1c lwz r0,28(r1) ffc0dda0: 83 81 00 08 lwz r28,8(r1) ffc0dda4: 7c 08 03 a6 mtlr r0 ffc0dda8: 83 a1 00 0c lwz r29,12(r1) ffc0ddac: 83 c1 00 10 lwz r30,16(r1) ffc0ddb0: 83 e1 00 14 lwz r31,20(r1) ffc0ddb4: 38 21 00 18 addi r1,r1,24 ffc0ddb8: 4e 80 00 20 blr /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); ffc0ddbc: 80 7f 00 1c lwz r3,28(r31) <== NOT EXECUTED ffc0ddc0: 4b ff 68 35 bl ffc045f4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); ffc0ddc4: 48 00 54 b1 bl ffc13274 <__errno> <== NOT EXECUTED ffc0ddc8: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc0ddcc: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0ddd0: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0ddd4: 4b ff ff c8 b ffc0dd9c <== NOT EXECUTED =============================================================================== ffc0543c : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { ffc0543c: 94 21 ff 98 stwu r1,-104(r1) ffc05440: 7c 08 02 a6 mflr r0 ffc05444: 90 01 00 6c stw r0,108(r1) int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; ffc05448: 81 23 00 00 lwz r9,0(r3) int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { ffc0544c: 93 a1 00 5c stw r29,92(r1) ffc05450: 7c bd 2b 78 mr r29,r5 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; ffc05454: 91 21 00 18 stw r9,24(r1) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) ffc05458: a0 09 00 34 lhz r0,52(r9) int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { ffc0545c: 93 c1 00 60 stw r30,96(r1) ffc05460: 7c 9e 23 78 mr r30,r4 /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) ffc05464: 2b 80 00 07 cmplwi cr7,r0,7 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { ffc05468: 93 e1 00 64 stw r31,100(r1) /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) ffc0546c: 41 9d 00 90 bgt- cr7,ffc054fc rtems_set_errno_and_return_minus_one( EMLINK ); /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); ffc05470: 7c a3 2b 78 mr r3,r5 ffc05474: 48 01 5d ad bl ffc1b220 ffc05478: 3b e1 00 30 addi r31,r1,48 ffc0547c: 7c 64 1b 78 mr r4,r3 ffc05480: 7f e5 fb 78 mr r5,r31 ffc05484: 38 c1 00 08 addi r6,r1,8 ffc05488: 7f a3 eb 78 mr r3,r29 ffc0548c: 48 00 ee 89 bl ffc14314 * 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. */ new_node = IMFS_create_node( ffc05490: 38 c0 00 00 li r6,0 ffc05494: 7f c3 f3 78 mr r3,r30 ffc05498: 7f e5 fb 78 mr r5,r31 ffc0549c: 60 c6 a1 ff ori r6,r6,41471 ffc054a0: 38 80 00 03 li r4,3 ffc054a4: 38 e1 00 18 addi r7,r1,24 ffc054a8: 48 00 dd cd bl ffc13274 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) ffc054ac: 2f 83 00 00 cmpwi cr7,r3,0 ffc054b0: 41 9e 00 60 beq- cr7,ffc05510 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; ffc054b4: 81 21 00 18 lwz r9,24(r1) IMFS_update_ctime( info.hard_link.link_node ); ffc054b8: 38 61 00 0c addi r3,r1,12 ffc054bc: 38 80 00 00 li r4,0 rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; ffc054c0: a1 69 00 34 lhz r11,52(r9) ffc054c4: 38 0b 00 01 addi r0,r11,1 ffc054c8: b0 09 00 34 sth r0,52(r9) IMFS_update_ctime( info.hard_link.link_node ); ffc054cc: 48 00 0d 29 bl ffc061f4 ffc054d0: 80 01 00 0c lwz r0,12(r1) ffc054d4: 81 21 00 18 lwz r9,24(r1) ffc054d8: 38 60 00 00 li r3,0 ffc054dc: 90 09 00 48 stw r0,72(r9) return 0; } ffc054e0: 80 01 00 6c lwz r0,108(r1) ffc054e4: 83 a1 00 5c lwz r29,92(r1) ffc054e8: 7c 08 03 a6 mtlr r0 ffc054ec: 83 c1 00 60 lwz r30,96(r1) ffc054f0: 83 e1 00 64 lwz r31,100(r1) ffc054f4: 38 21 00 68 addi r1,r1,104 ffc054f8: 4e 80 00 20 blr /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) rtems_set_errno_and_return_minus_one( EMLINK ); ffc054fc: 48 01 4a 65 bl ffc19f60 <__errno> ffc05500: 38 00 00 1f li r0,31 ffc05504: 90 03 00 00 stw r0,0(r3) ffc05508: 38 60 ff ff li r3,-1 ffc0550c: 4b ff ff d4 b ffc054e0 ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); ffc05510: 48 01 4a 51 bl ffc19f60 <__errno> <== NOT EXECUTED ffc05514: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc05518: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0551c: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc05520: 4b ff ff c0 b ffc054e0 <== NOT EXECUTED =============================================================================== ffc17828 : ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); ffc17828: 7c 69 1b 79 mr. r9,r3 MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { ffc1782c: 94 21 ff f0 stwu r1,-16(r1) ffc17830: 7c 08 02 a6 mflr r0 ffc17834: 93 e1 00 0c stw r31,12(r1) ffc17838: 90 01 00 14 stw r0,20(r1) block_p memory; block_p *block_entry_ptr; assert( the_jnode ); ffc1783c: 41 82 00 5c beq- ffc17898 <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); ffc17840: 80 09 00 4c lwz r0,76(r9) ffc17844: 2f 80 00 05 cmpwi cr7,r0,5 ffc17848: 40 9e 00 74 bne- cr7,ffc178bc <== NEVER TAKEN if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); ffc1784c: 38 a0 00 01 li r5,1 ffc17850: 4b ff f8 e1 bl ffc17130 if ( *block_entry_ptr ) ffc17854: 80 03 00 00 lwz r0,0(r3) assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); ffc17858: 7c 7f 1b 78 mr r31,r3 if ( *block_entry_ptr ) ffc1785c: 38 60 00 00 li r3,0 ffc17860: 2f 80 00 00 cmpwi cr7,r0,0 ffc17864: 41 9e 00 18 beq- cr7,ffc1787c if ( !memory ) return 1; *block_entry_ptr = memory; return 0; } ffc17868: 80 01 00 14 lwz r0,20(r1) ffc1786c: 83 e1 00 0c lwz r31,12(r1) ffc17870: 38 21 00 10 addi r1,r1,16 ffc17874: 7c 08 03 a6 mtlr r0 ffc17878: 4e 80 00 20 blr #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); ffc1787c: 4b ff f8 71 bl ffc170ec if ( !memory ) ffc17880: 7c 60 1b 79 mr. r0,r3 ffc17884: 38 60 00 01 li r3,1 ffc17888: 41 a2 ff e0 beq- ffc17868 <== NEVER TAKEN return 1; *block_entry_ptr = memory; ffc1788c: 90 1f 00 00 stw r0,0(r31) ffc17890: 38 60 00 00 li r3,0 return 0; ffc17894: 4b ff ff d4 b ffc17868 ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); ffc17898: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc1789c: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc178a0: 38 a5 6f 4c addi r5,r5,28492 <== NOT EXECUTED ffc178a4: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc178a8: 38 63 70 10 addi r3,r3,28688 <== NOT EXECUTED ffc178ac: 38 a5 00 70 addi r5,r5,112 <== NOT EXECUTED ffc178b0: 38 c6 70 58 addi r6,r6,28760 <== NOT EXECUTED ffc178b4: 38 80 01 69 li r4,361 <== NOT EXECUTED ffc178b8: 4b fe e3 15 bl ffc05bcc <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); ffc178bc: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc178c0: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc178c4: 38 a5 6f 4c addi r5,r5,28492 <== NOT EXECUTED ffc178c8: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc178cc: 38 63 70 10 addi r3,r3,28688 <== NOT EXECUTED ffc178d0: 38 a5 00 70 addi r5,r5,112 <== NOT EXECUTED ffc178d4: 38 c6 70 64 addi r6,r6,28772 <== NOT EXECUTED ffc178d8: 38 80 01 6d li r4,365 <== NOT EXECUTED ffc178dc: 4b fe e2 f1 bl ffc05bcc <__assert_func> <== NOT EXECUTED =============================================================================== ffc178e0 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc178e0: 94 21 ff d8 stwu r1,-40(r1) ffc178e4: 7c 08 02 a6 mflr r0 ffc178e8: 93 e1 00 24 stw r31,36(r1) /* * Perform internal consistency checks */ assert( the_jnode ); ffc178ec: 7c 7f 1b 79 mr. r31,r3 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc178f0: 93 41 00 10 stw r26,16(r1) ffc178f4: 7c da 33 78 mr r26,r6 ffc178f8: 93 81 00 18 stw r28,24(r1) ffc178fc: 7c bc 2b 78 mr r28,r5 ffc17900: 90 01 00 2c stw r0,44(r1) ffc17904: 93 01 00 08 stw r24,8(r1) ffc17908: 93 21 00 0c stw r25,12(r1) ffc1790c: 93 61 00 14 stw r27,20(r1) ffc17910: 93 a1 00 1c stw r29,28(r1) ffc17914: 93 c1 00 20 stw r30,32(r1) /* * Perform internal consistency checks */ assert( the_jnode ); ffc17918: 41 82 01 d0 beq- ffc17ae8 <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); ffc1791c: 80 1f 00 4c lwz r0,76(r31) ffc17920: 2f 80 00 05 cmpwi cr7,r0,5 ffc17924: 40 9e 01 a0 bne- cr7,ffc17ac4 <== NEVER TAKEN if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc17928: 3d 20 00 00 lis r9,0 ffc1792c: 83 a9 27 68 lwz r29,10088(r9) ffc17930: 38 00 00 00 li r0,0 ffc17934: 7f 80 28 00 cmpw cr7,r0,r5 ffc17938: 57 a9 f0 be rlwinm r9,r29,30,2,31 ffc1793c: 39 69 00 01 addi r11,r9,1 ffc17940: 7d 6b 49 d6 mullw r11,r11,r9 ffc17944: 38 0b 00 01 addi r0,r11,1 ffc17948: 7d 20 49 d6 mullw r9,r0,r9 ffc1794c: 39 29 ff ff addi r9,r9,-1 ffc17950: 7d 29 e9 d6 mullw r9,r9,r29 ffc17954: 40 9d 01 50 ble- cr7,ffc17aa4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) ffc17958: 83 7f 00 50 lwz r27,80(r31) ffc1795c: 83 3f 00 54 lwz r25,84(r31) ffc17960: 7f 9c d8 00 cmpw cr7,r28,r27 ffc17964: 40 9d 00 c4 ble- cr7,ffc17a28 <== ALWAYS TAKEN /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc17968: 7f b8 fe 70 srawi r24,r29,31 ffc1796c: 7f 05 c3 78 mr r5,r24 ffc17970: 7f a6 eb 78 mr r6,r29 ffc17974: 7f 83 e3 78 mr r3,r28 ffc17978: 7f 44 d3 78 mr r4,r26 ffc1797c: 48 00 c4 99 bl ffc23e14 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc17980: 7f 63 db 78 mr r3,r27 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc17984: 7c 9e 23 78 mr r30,r4 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc17988: 7f 05 c3 78 mr r5,r24 ffc1798c: 7f 24 cb 78 mr r4,r25 ffc17990: 7f a6 eb 78 mr r6,r29 ffc17994: 48 00 c4 81 bl ffc23e14 <__divdi3> /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ffc17998: 7f 9e 20 40 cmplw cr7,r30,r4 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc1799c: 7c 9b 23 78 mr r27,r4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ffc179a0: 41 9c 00 c8 blt- cr7,ffc17a68 <== NEVER TAKEN ffc179a4: 7c 9d 23 78 mr r29,r4 ffc179a8: 48 00 00 10 b ffc179b8 ffc179ac: 3b bd 00 01 addi r29,r29,1 ffc179b0: 7f 9e e8 40 cmplw cr7,r30,r29 ffc179b4: 41 9c 00 b4 blt- cr7,ffc17a68 if ( IMFS_memfile_addblock( the_jnode, block ) ) { ffc179b8: 7f e3 fb 78 mr r3,r31 ffc179bc: 7f a4 eb 78 mr r4,r29 ffc179c0: 4b ff fe 69 bl ffc17828 ffc179c4: 2f 83 00 00 cmpwi cr7,r3,0 ffc179c8: 41 9e ff e4 beq+ cr7,ffc179ac <== ALWAYS TAKEN ffc179cc: 48 00 00 14 b ffc179e0 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); ffc179d0: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED ffc179d4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED * 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-- ) { ffc179d8: 3b bd ff ff addi r29,r29,-1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); ffc179dc: 4b ff fa b5 bl ffc17490 <== NOT EXECUTED * 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-- ) { ffc179e0: 7f 9b e8 40 cmplw cr7,r27,r29 <== NOT EXECUTED ffc179e4: 40 9d ff ec ble+ cr7,ffc179d0 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); ffc179e8: 48 00 25 79 bl ffc19f60 <__errno> <== NOT EXECUTED ffc179ec: 38 00 00 1c li r0,28 <== NOT EXECUTED ffc179f0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc179f4: 38 60 ff ff li r3,-1 <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } ffc179f8: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc179fc: 83 01 00 08 lwz r24,8(r1) <== NOT EXECUTED ffc17a00: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc17a04: 83 21 00 0c lwz r25,12(r1) <== NOT EXECUTED ffc17a08: 83 41 00 10 lwz r26,16(r1) <== NOT EXECUTED ffc17a0c: 83 61 00 14 lwz r27,20(r1) <== NOT EXECUTED ffc17a10: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc17a14: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc17a18: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc17a1c: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc17a20: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc17a24: 4e 80 00 20 blr <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) ffc17a28: 40 9e 00 0c bne- cr7,ffc17a34 <== NEVER TAKEN ffc17a2c: 7f 9a c8 40 cmplw cr7,r26,r25 ffc17a30: 41 9d ff 38 bgt+ cr7,ffc17968 * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } ffc17a34: 80 01 00 2c lwz r0,44(r1) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) ffc17a38: 38 60 00 00 li r3,0 * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } ffc17a3c: 83 01 00 08 lwz r24,8(r1) ffc17a40: 7c 08 03 a6 mtlr r0 ffc17a44: 83 21 00 0c lwz r25,12(r1) ffc17a48: 83 41 00 10 lwz r26,16(r1) ffc17a4c: 83 61 00 14 lwz r27,20(r1) ffc17a50: 83 81 00 18 lwz r28,24(r1) ffc17a54: 83 a1 00 1c lwz r29,28(r1) ffc17a58: 83 c1 00 20 lwz r30,32(r1) ffc17a5c: 83 e1 00 24 lwz r31,36(r1) ffc17a60: 38 21 00 28 addi r1,r1,40 ffc17a64: 4e 80 00 20 blr /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; ffc17a68: 93 5f 00 54 stw r26,84(r31) ffc17a6c: 38 60 00 00 li r3,0 ffc17a70: 93 9f 00 50 stw r28,80(r31) return 0; } ffc17a74: 80 01 00 2c lwz r0,44(r1) ffc17a78: 83 01 00 08 lwz r24,8(r1) ffc17a7c: 7c 08 03 a6 mtlr r0 ffc17a80: 83 21 00 0c lwz r25,12(r1) ffc17a84: 83 41 00 10 lwz r26,16(r1) ffc17a88: 83 61 00 14 lwz r27,20(r1) ffc17a8c: 83 81 00 18 lwz r28,24(r1) ffc17a90: 83 a1 00 1c lwz r29,28(r1) ffc17a94: 83 c1 00 20 lwz r30,32(r1) ffc17a98: 83 e1 00 24 lwz r31,36(r1) ffc17a9c: 38 21 00 28 addi r1,r1,40 ffc17aa0: 4e 80 00 20 blr assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc17aa4: 40 9e 00 0c bne- cr7,ffc17ab0 <== NEVER TAKEN ffc17aa8: 7f 89 30 40 cmplw cr7,r9,r6 ffc17aac: 41 9d fe ac bgt+ cr7,ffc17958 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ffc17ab0: 48 00 24 b1 bl ffc19f60 <__errno> <== NOT EXECUTED ffc17ab4: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc17ab8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc17abc: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc17ac0: 4b ff ff 38 b ffc179f8 <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); ffc17ac4: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc17ac8: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc17acc: 38 a5 6f 4c addi r5,r5,28492 <== NOT EXECUTED ffc17ad0: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc17ad4: 38 63 70 10 addi r3,r3,28688 <== NOT EXECUTED ffc17ad8: 38 a5 00 88 addi r5,r5,136 <== NOT EXECUTED ffc17adc: 38 c6 70 64 addi r6,r6,28772 <== NOT EXECUTED ffc17ae0: 38 80 01 35 li r4,309 <== NOT EXECUTED ffc17ae4: 4b fe e0 e9 bl ffc05bcc <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); ffc17ae8: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc17aec: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc17af0: 38 a5 6f 4c addi r5,r5,28492 <== NOT EXECUTED ffc17af4: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc17af8: 38 63 70 10 addi r3,r3,28688 <== NOT EXECUTED ffc17afc: 38 a5 00 88 addi r5,r5,136 <== NOT EXECUTED ffc17b00: 38 c6 70 58 addi r6,r6,28760 <== NOT EXECUTED ffc17b04: 38 80 01 31 li r4,305 <== NOT EXECUTED ffc17b08: 4b fe e0 c5 bl ffc05bcc <__assert_func> <== NOT EXECUTED =============================================================================== ffc17130 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc17130: 94 21 ff e0 stwu r1,-32(r1) ffc17134: 7c 08 02 a6 mflr r0 ffc17138: 93 e1 00 1c stw r31,28(r1) /* * Perform internal consistency checks */ assert( the_jnode ); ffc1713c: 7c 7f 1b 79 mr. r31,r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc17140: 90 01 00 24 stw r0,36(r1) ffc17144: 93 81 00 10 stw r28,16(r1) ffc17148: 93 a1 00 14 stw r29,20(r1) ffc1714c: 93 c1 00 18 stw r30,24(r1) /* * Perform internal consistency checks */ assert( the_jnode ); ffc17150: 41 82 02 18 beq- ffc17368 <== NEVER TAKEN if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); ffc17154: 80 1f 00 4c lwz r0,76(r31) ffc17158: 2f 80 00 05 cmpwi cr7,r0,5 ffc1715c: 40 9e 02 2c bne- cr7,ffc17388 <== NEVER TAKEN /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc17160: 3d 20 00 00 lis r9,0 ffc17164: 81 29 27 68 lwz r9,10088(r9) ffc17168: 55 29 f0 be rlwinm r9,r9,30,2,31 ffc1716c: 38 09 ff ff addi r0,r9,-1 ffc17170: 7f 84 00 40 cmplw cr7,r4,r0 ffc17174: 40 9d 00 78 ble- cr7,ffc171ec <== ALWAYS TAKEN /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { ffc17178: 39 69 00 01 addi r11,r9,1 <== NOT EXECUTED ffc1717c: 7d 6b 49 d6 mullw r11,r11,r9 <== NOT EXECUTED ffc17180: 38 0b ff ff addi r0,r11,-1 <== NOT EXECUTED ffc17184: 7f 84 00 40 cmplw cr7,r4,r0 <== NOT EXECUTED ffc17188: 41 9d 00 a0 bgt- cr7,ffc17228 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; ffc1718c: 7c 89 20 50 subf r4,r9,r4 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; ffc17190: 81 7f 00 5c lwz r11,92(r31) <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ffc17194: 7f c4 4b 96 divwu r30,r4,r9 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { ffc17198: 2f 85 00 00 cmpwi cr7,r5,0 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ffc1719c: 7f be 49 d6 mullw r29,r30,r9 <== NOT EXECUTED ffc171a0: 7f bd 20 50 subf r29,r29,r4 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { ffc171a4: 41 9e 01 04 beq- cr7,ffc172a8 <== NOT EXECUTED if ( !p ) { ffc171a8: 2f 8b 00 00 cmpwi cr7,r11,0 <== NOT EXECUTED ffc171ac: 41 9e 01 84 beq- cr7,ffc17330 <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; ffc171b0: 57 de 10 3a rlwinm r30,r30,2,0,29 <== NOT EXECUTED ffc171b4: 7c 6b f0 2e lwzx r3,r11,r30 <== NOT EXECUTED ffc171b8: 7f cb f2 14 add r30,r11,r30 <== NOT EXECUTED if ( !p1 ) { ffc171bc: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc171c0: 41 9e 01 5c beq- cr7,ffc1731c <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; ffc171c4: 57 bd 10 3a rlwinm r29,r29,2,0,29 <== NOT EXECUTED ffc171c8: 7c 63 ea 14 add r3,r3,r29 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } ffc171cc: 80 01 00 24 lwz r0,36(r1) ffc171d0: 83 81 00 10 lwz r28,16(r1) ffc171d4: 7c 08 03 a6 mtlr r0 ffc171d8: 83 a1 00 14 lwz r29,20(r1) ffc171dc: 83 c1 00 18 lwz r30,24(r1) ffc171e0: 83 e1 00 1c lwz r31,28(r1) ffc171e4: 38 21 00 20 addi r1,r1,32 ffc171e8: 4e 80 00 20 blr fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { ffc171ec: 2f 85 00 00 cmpwi cr7,r5,0 if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; ffc171f0: 80 7f 00 58 lwz r3,88(r31) if ( malloc_it ) { ffc171f4: 41 9e 00 f8 beq- cr7,ffc172ec if ( !p ) { ffc171f8: 2f 83 00 00 cmpwi cr7,r3,0 ffc171fc: 41 9e 01 04 beq- cr7,ffc17300 /* * This means the requested block number is out of range. */ return 0; } ffc17200: 80 01 00 24 lwz r0,36(r1) p = memfile_alloc_block(); if ( !p ) return 0; info->indirect = p; } return &info->indirect[ my_block ]; ffc17204: 54 84 10 3a rlwinm r4,r4,2,0,29 ffc17208: 7c 63 22 14 add r3,r3,r4 /* * This means the requested block number is out of range. */ return 0; } ffc1720c: 83 81 00 10 lwz r28,16(r1) ffc17210: 7c 08 03 a6 mtlr r0 ffc17214: 83 a1 00 14 lwz r29,20(r1) ffc17218: 83 c1 00 18 lwz r30,24(r1) ffc1721c: 83 e1 00 1c lwz r31,28(r1) ffc17220: 38 21 00 20 addi r1,r1,32 ffc17224: 4e 80 00 20 blr #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { ffc17228: 39 4b 00 01 addi r10,r11,1 <== NOT EXECUTED ffc1722c: 7d 4a 49 d6 mullw r10,r10,r9 <== NOT EXECUTED ffc17230: 38 0a ff ff addi r0,r10,-1 <== NOT EXECUTED ffc17234: 7f 84 00 40 cmplw cr7,r4,r0 <== NOT EXECUTED ffc17238: 41 9d 00 90 bgt- cr7,ffc172c8 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; ffc1723c: 7d 6b 20 50 subf r11,r11,r4 <== NOT EXECUTED 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; ffc17240: 81 5f 00 60 lwz r10,96(r31) <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ffc17244: 7c 0b 4b 96 divwu r0,r11,r9 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; ffc17248: 7f c0 4b 96 divwu r30,r0,r9 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { ffc1724c: 2f 85 00 00 cmpwi cr7,r5,0 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 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; ffc17250: 7f 9e 49 d6 mullw r28,r30,r9 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ffc17254: 7d 20 49 d6 mullw r9,r0,r9 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; ffc17258: 7f 9c 00 50 subf r28,r28,r0 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ffc1725c: 7f a9 58 50 subf r29,r9,r11 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { ffc17260: 41 9e 00 e4 beq- cr7,ffc17344 <== NOT EXECUTED if ( !p ) { ffc17264: 2f 8a 00 00 cmpwi cr7,r10,0 <== NOT EXECUTED ffc17268: 41 9e 01 40 beq- cr7,ffc173a8 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; ffc1726c: 57 de 10 3a rlwinm r30,r30,2,0,29 <== NOT EXECUTED ffc17270: 7d 2a f0 2e lwzx r9,r10,r30 <== NOT EXECUTED ffc17274: 7f ca f2 14 add r30,r10,r30 <== NOT EXECUTED if ( !p1 ) { ffc17278: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc1727c: 41 9e 01 40 beq- cr7,ffc173bc <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; ffc17280: 57 9f 10 3a rlwinm r31,r28,2,0,29 <== NOT EXECUTED ffc17284: 7c 69 f8 2e lwzx r3,r9,r31 <== NOT EXECUTED ffc17288: 7f e9 fa 14 add r31,r9,r31 <== NOT EXECUTED if ( !p2 ) { ffc1728c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc17290: 40 9e ff 34 bne+ cr7,ffc171c4 <== NOT EXECUTED p2 = memfile_alloc_block(); ffc17294: 4b ff fe 59 bl ffc170ec <== NOT EXECUTED if ( !p2 ) ffc17298: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc1729c: 41 82 00 2c beq- ffc172c8 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; ffc172a0: 90 7f 00 00 stw r3,0(r31) <== NOT EXECUTED ffc172a4: 4b ff ff 20 b ffc171c4 <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) ffc172a8: 2f 8b 00 00 cmpwi cr7,r11,0 <== NOT EXECUTED ffc172ac: 41 be 00 1c beq+ cr7,ffc172c8 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; ffc172b0: 57 de 10 3a rlwinm r30,r30,2,0,29 <== NOT EXECUTED ffc172b4: 7c 0b f0 2e lwzx r0,r11,r30 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif return (block_p *)&p[ singly ]; ffc172b8: 57 a3 10 3a rlwinm r3,r29,2,0,29 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) ffc172bc: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif return (block_p *)&p[ singly ]; ffc172c0: 7c 60 1a 14 add r3,r0,r3 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) ffc172c4: 40 9e ff 08 bne+ cr7,ffc171cc <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } ffc172c8: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; ffc172cc: 38 60 00 00 li r3,0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } ffc172d0: 83 81 00 10 lwz r28,16(r1) <== NOT EXECUTED ffc172d4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc172d8: 83 a1 00 14 lwz r29,20(r1) <== NOT EXECUTED ffc172dc: 83 c1 00 18 lwz r30,24(r1) <== NOT EXECUTED ffc172e0: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc172e4: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc172e8: 4e 80 00 20 blr <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) ffc172ec: 2f 83 00 00 cmpwi cr7,r3,0 return 0; return &info->indirect[ my_block ]; ffc172f0: 54 84 10 3a rlwinm r4,r4,2,0,29 ffc172f4: 7c 63 22 14 add r3,r3,r4 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) ffc172f8: 40 9e fe d4 bne+ cr7,ffc171cc <== ALWAYS TAKEN ffc172fc: 4b ff ff cc b ffc172c8 <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); ffc17300: 90 81 00 08 stw r4,8(r1) ffc17304: 4b ff fd e9 bl ffc170ec if ( !p ) ffc17308: 2c 03 00 00 cmpwi r3,0 ffc1730c: 80 81 00 08 lwz r4,8(r1) ffc17310: 41 a2 ff b8 beq- ffc172c8 <== NEVER TAKEN return 0; info->indirect = p; ffc17314: 90 7f 00 58 stw r3,88(r31) ffc17318: 4b ff fe e8 b ffc17200 info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); ffc1731c: 4b ff fd d1 bl ffc170ec <== NOT EXECUTED if ( !p1 ) ffc17320: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc17324: 41 a2 ff a4 beq- ffc172c8 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; ffc17328: 90 7e 00 00 stw r3,0(r30) <== NOT EXECUTED ffc1732c: 4b ff fe 98 b ffc171c4 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); ffc17330: 4b ff fd bd bl ffc170ec <== NOT EXECUTED if ( !p ) ffc17334: 7c 6b 1b 79 mr. r11,r3 <== NOT EXECUTED ffc17338: 41 a2 ff 90 beq- ffc172c8 <== NOT EXECUTED return 0; info->doubly_indirect = p; ffc1733c: 91 7f 00 5c stw r11,92(r31) <== NOT EXECUTED ffc17340: 4b ff fe 70 b ffc171b0 <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) ffc17344: 2f 8a 00 00 cmpwi cr7,r10,0 <== NOT EXECUTED ffc17348: 41 9e ff 80 beq+ cr7,ffc172c8 <== NOT EXECUTED #if 0 fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; ffc1734c: 57 de 10 3a rlwinm r30,r30,2,0,29 <== NOT EXECUTED ffc17350: 7d 2a f0 2e lwzx r9,r10,r30 <== NOT EXECUTED if ( !p1 ) ffc17354: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc17358: 41 9e ff 70 beq+ cr7,ffc172c8 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; ffc1735c: 57 9c 10 3a rlwinm r28,r28,2,0,29 <== NOT EXECUTED ffc17360: 7c 69 e0 2e lwzx r3,r9,r28 <== NOT EXECUTED ffc17364: 4b ff fe 60 b ffc171c4 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); ffc17368: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc1736c: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc17370: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc17374: 38 63 70 10 addi r3,r3,28688 <== NOT EXECUTED ffc17378: 38 a5 6f 4c addi r5,r5,28492 <== NOT EXECUTED ffc1737c: 38 c6 70 58 addi r6,r6,28760 <== NOT EXECUTED ffc17380: 38 80 03 88 li r4,904 <== NOT EXECUTED ffc17384: 4b fe e8 49 bl ffc05bcc <__assert_func> <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); ffc17388: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc1738c: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc17390: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc17394: 38 63 70 10 addi r3,r3,28688 <== NOT EXECUTED ffc17398: 38 a5 6f 4c addi r5,r5,28492 <== NOT EXECUTED ffc1739c: 38 c6 70 64 addi r6,r6,28772 <== NOT EXECUTED ffc173a0: 38 80 03 8c li r4,908 <== NOT EXECUTED ffc173a4: 4b fe e8 29 bl ffc05bcc <__assert_func> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); ffc173a8: 4b ff fd 45 bl ffc170ec <== NOT EXECUTED if ( !p ) ffc173ac: 7c 6a 1b 79 mr. r10,r3 <== NOT EXECUTED ffc173b0: 41 a2 ff 18 beq- ffc172c8 <== NOT EXECUTED return 0; info->triply_indirect = p; ffc173b4: 91 5f 00 60 stw r10,96(r31) <== NOT EXECUTED ffc173b8: 4b ff fe b4 b ffc1726c <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); ffc173bc: 4b ff fd 31 bl ffc170ec <== NOT EXECUTED if ( !p1 ) ffc173c0: 7c 69 1b 79 mr. r9,r3 <== NOT EXECUTED ffc173c4: 41 a2 ff 04 beq- ffc172c8 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; ffc173c8: 91 3e 00 00 stw r9,0(r30) <== NOT EXECUTED ffc173cc: 4b ff fe b4 b ffc17280 <== NOT EXECUTED =============================================================================== ffc18100 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc18100: 94 21 ff c0 stwu r1,-64(r1) ffc18104: 7c 08 02 a6 mflr r0 ffc18108: 93 e1 00 3c stw r31,60(r1) /* * Perform internal consistency checks */ assert( the_jnode ); ffc1810c: 7c 7f 1b 79 mr. r31,r3 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc18110: 93 41 00 28 stw r26,40(r1) ffc18114: 7c ba 2b 78 mr r26,r5 ffc18118: 93 61 00 2c stw r27,44(r1) ffc1811c: 7c db 33 78 mr r27,r6 ffc18120: 93 c1 00 38 stw r30,56(r1) ffc18124: 7c fe 3b 78 mr r30,r7 ffc18128: 90 01 00 44 stw r0,68(r1) ffc1812c: 92 e1 00 1c stw r23,28(r1) ffc18130: 93 01 00 20 stw r24,32(r1) ffc18134: 93 21 00 24 stw r25,36(r1) ffc18138: 93 81 00 30 stw r28,48(r1) ffc1813c: 93 a1 00 34 stw r29,52(r1) /* * Perform internal consistency checks */ assert( the_jnode ); ffc18140: 41 82 03 0c beq- ffc1844c <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || ffc18144: 81 3f 00 4c lwz r9,76(r31) ffc18148: 38 09 ff fb addi r0,r9,-5 ffc1814c: 2b 80 00 01 cmplwi cr7,r0,1 ffc18150: 41 9d 02 d8 bgt- cr7,ffc18428 <== NEVER TAKEN /* * Error checks on arguments */ assert( dest ); ffc18154: 2f 87 00 00 cmpwi cr7,r7,0 ffc18158: 41 9e 02 88 beq- cr7,ffc183e0 <== NEVER TAKEN /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) ffc1815c: 2f 88 00 00 cmpwi cr7,r8,0 ffc18160: 41 9e 02 48 beq- cr7,ffc183a8 <== NEVER TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { ffc18164: 2f 89 00 06 cmpwi cr7,r9,6 ffc18168: 41 9e 01 94 beq- cr7,ffc182fc <== NEVER TAKEN * 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 ) ffc1816c: 80 1f 00 50 lwz r0,80(r31) ffc18170: 39 20 00 00 li r9,0 ffc18174: 83 9f 00 54 lwz r28,84(r31) ffc18178: 7f 89 00 00 cmpw cr7,r9,r0 /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; ffc1817c: 7c c0 33 78 mr r0,r6 if ( last_byte > the_jnode->info.file.size ) ffc18180: 7d 28 32 14 add r9,r8,r6 ffc18184: 40 9d 01 6c ble- cr7,ffc182f0 <== ALWAYS TAKEN my_length = the_jnode->info.file.size - start; ffc18188: 7f 80 e0 50 subf r28,r0,r28 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc1818c: 3f 20 00 00 lis r25,0 ffc18190: 83 b9 27 68 lwz r29,10088(r25) ffc18194: 7f 43 d3 78 mr r3,r26 ffc18198: 7f 64 db 78 mr r4,r27 ffc1819c: 7f b8 fe 70 srawi r24,r29,31 ffc181a0: 7f 05 c3 78 mr r5,r24 ffc181a4: 7f a6 eb 78 mr r6,r29 ffc181a8: 48 00 c0 71 bl ffc24218 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc181ac: 7f 43 d3 78 mr r3,r26 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc181b0: 7c 97 23 78 mr r23,r4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc181b4: 7f 05 c3 78 mr r5,r24 ffc181b8: 7f 64 db 78 mr r4,r27 ffc181bc: 7f a6 eb 78 mr r6,r29 ffc181c0: 48 00 bc 55 bl ffc23e14 <__divdi3> if ( start_offset ) { ffc181c4: 2f 97 00 00 cmpwi cr7,r23,0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc181c8: 7c 9a 23 78 mr r26,r4 if ( start_offset ) { ffc181cc: 7f d8 f3 78 mr r24,r30 ffc181d0: 3b 60 00 00 li r27,0 ffc181d4: 41 9e 00 4c beq- cr7,ffc18220 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 ); ffc181d8: 7f e3 fb 78 mr r3,r31 ffc181dc: 38 a0 00 00 li r5,0 ffc181e0: 4b ff ef 51 bl ffc17130 assert( block_ptr ); ffc181e4: 2c 03 00 00 cmpwi r3,0 ffc181e8: 41 82 02 88 beq- ffc18470 <== NEVER TAKEN */ 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; ffc181ec: 7f b7 e8 50 subf r29,r23,r29 ffc181f0: 7f 9c e8 40 cmplw cr7,r28,r29 ffc181f4: 7f 9b e3 78 mr r27,r28 ffc181f8: 41 9d 01 94 bgt- cr7,ffc1838c to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); ffc181fc: 80 83 00 00 lwz r4,0(r3) ffc18200: 7f 65 db 78 mr r5,r27 ffc18204: 7f c3 f3 78 mr r3,r30 ffc18208: 7c 84 ba 14 add r4,r4,r23 ffc1820c: 48 00 29 3d bl ffc1ab48 dest += to_copy; block++; my_length -= to_copy; ffc18210: 83 b9 27 68 lwz r29,10088(r25) block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); dest += to_copy; ffc18214: 7f 1e da 14 add r24,r30,r27 block++; ffc18218: 3b 5a 00 01 addi r26,r26,1 my_length -= to_copy; ffc1821c: 7f 9b e0 50 subf r28,r27,r28 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc18220: 7f 9c e8 40 cmplw cr7,r28,r29 ffc18224: 41 9c 00 4c blt- cr7,ffc18270 ffc18228: 3b 39 27 68 addi r25,r25,10088 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc1822c: 7f e3 fb 78 mr r3,r31 ffc18230: 7f 44 d3 78 mr r4,r26 ffc18234: 38 a0 00 00 li r5,0 ffc18238: 4b ff ee f9 bl ffc17130 assert( block_ptr ); ffc1823c: 2c 03 00 00 cmpwi r3,0 ffc18240: 41 82 01 7c beq- ffc183bc <== NEVER TAKEN if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); ffc18244: 80 83 00 00 lwz r4,0(r3) ffc18248: 7f a5 eb 78 mr r5,r29 ffc1824c: 7f 03 c3 78 mr r3,r24 ffc18250: 48 00 28 f9 bl ffc1ab48 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc18254: 80 19 00 00 lwz r0,0(r25) if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; ffc18258: 7f 9d e0 50 subf r28,r29,r28 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc1825c: 7f 80 e0 40 cmplw cr7,r0,r28 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; ffc18260: 7f 18 ea 14 add r24,r24,r29 block++; ffc18264: 3b 5a 00 01 addi r26,r26,1 my_length -= to_copy; copied += to_copy; ffc18268: 7f 7b ea 14 add r27,r27,r29 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc1826c: 40 9d ff c0 ble+ cr7,ffc1822c * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { ffc18270: 2f 9c 00 00 cmpwi cr7,r28,0 ffc18274: 41 9e 00 30 beq- cr7,ffc182a4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc18278: 7f 44 d3 78 mr r4,r26 ffc1827c: 7f e3 fb 78 mr r3,r31 ffc18280: 38 a0 00 00 li r5,0 ffc18284: 4b ff ee ad bl ffc17130 assert( block_ptr ); ffc18288: 2c 03 00 00 cmpwi r3,0 ffc1828c: 41 82 01 78 beq- ffc18404 <== NEVER TAKEN if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); ffc18290: 80 83 00 00 lwz r4,0(r3) ffc18294: 7f 85 e3 78 mr r5,r28 ffc18298: 7f 03 c3 78 mr r3,r24 ffc1829c: 48 00 28 ad bl ffc1ab48 copied += my_length; ffc182a0: 7f 7b e2 14 add r27,r27,r28 } IMFS_update_atime( the_jnode ); ffc182a4: 38 61 00 08 addi r3,r1,8 ffc182a8: 38 80 00 00 li r4,0 ffc182ac: 4b fe df 49 bl ffc061f4 ffc182b0: 80 01 00 08 lwz r0,8(r1) return copied; ffc182b4: 7f 63 db 78 mr r3,r27 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); ffc182b8: 90 1f 00 40 stw r0,64(r31) return copied; } ffc182bc: 80 01 00 44 lwz r0,68(r1) ffc182c0: 82 e1 00 1c lwz r23,28(r1) ffc182c4: 7c 08 03 a6 mtlr r0 ffc182c8: 83 01 00 20 lwz r24,32(r1) ffc182cc: 83 21 00 24 lwz r25,36(r1) ffc182d0: 83 41 00 28 lwz r26,40(r1) ffc182d4: 83 61 00 2c lwz r27,44(r1) ffc182d8: 83 81 00 30 lwz r28,48(r1) ffc182dc: 83 a1 00 34 lwz r29,52(r1) ffc182e0: 83 c1 00 38 lwz r30,56(r1) ffc182e4: 83 e1 00 3c lwz r31,60(r1) ffc182e8: 38 21 00 40 addi r1,r1,64 ffc182ec: 4e 80 00 20 blr * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) ffc182f0: 41 9e 00 8c beq- cr7,ffc1837c <== ALWAYS TAKEN ffc182f4: 7d 1c 43 78 mr r28,r8 <== NOT EXECUTED ffc182f8: 4b ff fe 94 b ffc1818c <== NOT EXECUTED if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) ffc182fc: 81 3f 00 50 lwz r9,80(r31) <== NOT EXECUTED ffc18300: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc18304: 81 5f 00 54 lwz r10,84(r31) <== NOT EXECUTED * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; ffc18308: 80 9f 00 58 lwz r4,88(r31) <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) ffc1830c: 7d 9b 50 10 subfc r12,r27,r10 <== NOT EXECUTED ffc18310: 7d 7a 49 10 subfe r11,r26,r9 <== NOT EXECUTED ffc18314: 7f 80 58 00 cmpw cr7,r0,r11 <== NOT EXECUTED ffc18318: 40 9d 00 7c ble- cr7,ffc18394 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; ffc1831c: 7f 9b 50 50 subf r28,r27,r10 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); ffc18320: 7c 84 da 14 add r4,r4,r27 <== NOT EXECUTED ffc18324: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED ffc18328: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc1832c: 48 00 28 1d bl ffc1ab48 <== NOT EXECUTED IMFS_update_atime( the_jnode ); ffc18330: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED ffc18334: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc18338: 4b fe de bd bl ffc061f4 <== NOT EXECUTED ffc1833c: 80 01 00 08 lwz r0,8(r1) <== NOT EXECUTED return my_length; ffc18340: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } ffc18344: 82 e1 00 1c lwz r23,28(r1) <== NOT EXECUTED 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 ); ffc18348: 90 1f 00 40 stw r0,64(r31) <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } ffc1834c: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED ffc18350: 83 01 00 20 lwz r24,32(r1) <== NOT EXECUTED ffc18354: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc18358: 83 21 00 24 lwz r25,36(r1) <== NOT EXECUTED ffc1835c: 83 41 00 28 lwz r26,40(r1) <== NOT EXECUTED ffc18360: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc18364: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc18368: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc1836c: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc18370: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc18374: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc18378: 4e 80 00 20 blr <== NOT EXECUTED * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) ffc1837c: 7f 89 e0 40 cmplw cr7,r9,r28 ffc18380: 41 bd fe 08 bgt- cr7,ffc18188 ffc18384: 7d 1c 43 78 mr r28,r8 ffc18388: 4b ff fe 04 b ffc1818c */ 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; ffc1838c: 7f bb eb 78 mr r27,r29 ffc18390: 4b ff fe 6c b ffc181fc if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) ffc18394: 40 9e 00 0c bne- cr7,ffc183a0 <== NOT EXECUTED ffc18398: 7f 88 60 40 cmplw cr7,r8,r12 <== NOT EXECUTED ffc1839c: 41 9d ff 80 bgt+ cr7,ffc1831c <== NOT EXECUTED ffc183a0: 7d 1c 43 78 mr r28,r8 <== NOT EXECUTED ffc183a4: 4b ff ff 7c b ffc18320 <== NOT EXECUTED * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc183a8: 48 00 1b b9 bl ffc19f60 <__errno> <== NOT EXECUTED ffc183ac: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc183b0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc183b4: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc183b8: 4b ff ff 04 b ffc182bc <== NOT EXECUTED */ 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 ); assert( block_ptr ); ffc183bc: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc183c0: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc183c4: 38 a5 6f 4c addi r5,r5,28492 <== NOT EXECUTED ffc183c8: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc183cc: 38 63 70 10 addi r3,r3,28688 <== NOT EXECUTED ffc183d0: 38 a5 00 b0 addi r5,r5,176 <== NOT EXECUTED ffc183d4: 38 c6 70 94 addi r6,r6,28820 <== NOT EXECUTED ffc183d8: 38 80 02 a7 li r4,679 <== NOT EXECUTED ffc183dc: 4b fe d7 f1 bl ffc05bcc <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); ffc183e0: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc183e4: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc183e8: 38 a5 6f 4c addi r5,r5,28492 <== NOT EXECUTED ffc183ec: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc183f0: 38 63 70 10 addi r3,r3,28688 <== NOT EXECUTED ffc183f4: 38 a5 00 b0 addi r5,r5,176 <== NOT EXECUTED ffc183f8: 38 c6 70 f4 addi r6,r6,28916 <== NOT EXECUTED ffc183fc: 38 80 02 5a li r4,602 <== NOT EXECUTED ffc18400: 4b fe d7 cd bl ffc05bcc <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); ffc18404: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc18408: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc1840c: 38 a5 6f 4c addi r5,r5,28492 <== NOT EXECUTED ffc18410: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc18414: 38 63 70 10 addi r3,r3,28688 <== NOT EXECUTED ffc18418: 38 a5 00 b0 addi r5,r5,176 <== NOT EXECUTED ffc1841c: 38 c6 70 94 addi r6,r6,28820 <== NOT EXECUTED ffc18420: 38 80 02 b9 li r4,697 <== NOT EXECUTED ffc18424: 4b fe d7 a9 bl ffc05bcc <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || ffc18428: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc1842c: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc18430: 38 a5 6f 4c addi r5,r5,28492 <== NOT EXECUTED ffc18434: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc18438: 38 63 70 10 addi r3,r3,28688 <== NOT EXECUTED ffc1843c: 38 a5 00 b0 addi r5,r5,176 <== NOT EXECUTED ffc18440: 38 c6 70 a8 addi r6,r6,28840 <== NOT EXECUTED ffc18444: 38 80 02 51 li r4,593 <== NOT EXECUTED ffc18448: 4b fe d7 85 bl ffc05bcc <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); ffc1844c: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc18450: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc18454: 38 a5 6f 4c addi r5,r5,28492 <== NOT EXECUTED ffc18458: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc1845c: 38 63 70 10 addi r3,r3,28688 <== NOT EXECUTED ffc18460: 38 a5 00 b0 addi r5,r5,176 <== NOT EXECUTED ffc18464: 38 c6 70 58 addi r6,r6,28760 <== NOT EXECUTED ffc18468: 38 80 02 4c li r4,588 <== NOT EXECUTED ffc1846c: 4b fe d7 61 bl ffc05bcc <__assert_func> <== NOT EXECUTED 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 ); assert( block_ptr ); ffc18470: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc18474: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc18478: 38 a5 6f 4c addi r5,r5,28492 <== NOT EXECUTED ffc1847c: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc18480: 38 63 70 10 addi r3,r3,28688 <== NOT EXECUTED ffc18484: 38 a5 00 b0 addi r5,r5,176 <== NOT EXECUTED ffc18488: 38 c6 70 94 addi r6,r6,28820 <== NOT EXECUTED ffc1848c: 38 80 02 96 li r4,662 <== NOT EXECUTED ffc18490: 4b fe d7 3d bl ffc05bcc <__assert_func> <== NOT EXECUTED =============================================================================== ffc174f4 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc174f4: 94 21 ff d8 stwu r1,-40(r1) ffc174f8: 7c 08 02 a6 mflr r0 ffc174fc: 93 41 00 10 stw r26,16(r1) /* * Perform internal consistency checks */ assert( the_jnode ); ffc17500: 7c 7a 1b 79 mr. r26,r3 */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc17504: 90 01 00 2c stw r0,44(r1) ffc17508: 93 21 00 0c stw r25,12(r1) ffc1750c: 93 61 00 14 stw r27,20(r1) ffc17510: 93 81 00 18 stw r28,24(r1) ffc17514: 93 a1 00 1c stw r29,28(r1) ffc17518: 93 c1 00 20 stw r30,32(r1) ffc1751c: 93 e1 00 24 stw r31,36(r1) /* * Perform internal consistency checks */ assert( the_jnode ); ffc17520: 41 82 01 90 beq- ffc176b0 <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); ffc17524: 80 1a 00 4c lwz r0,76(r26) ffc17528: 2f 80 00 05 cmpwi cr7,r0,5 ffc1752c: 40 9e 01 a8 bne- cr7,ffc176d4 <== NEVER TAKEN * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; ffc17530: 80 1a 00 58 lwz r0,88(r26) /* * 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; ffc17534: 3f c0 00 00 lis r30,0 ffc17538: 83 9e 27 68 lwz r28,10088(r30) * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; ffc1753c: 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; ffc17540: 57 9c f0 be rlwinm r28,r28,30,2,31 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; ffc17544: 41 9e 00 10 beq- cr7,ffc17554 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); ffc17548: 38 7a 00 58 addi r3,r26,88 ffc1754c: 7f 84 e3 78 mr r4,r28 ffc17550: 4b ff fe 81 bl ffc173d0 } if ( info->doubly_indirect ) { ffc17554: 81 3a 00 5c lwz r9,92(r26) ffc17558: 2f 89 00 00 cmpwi cr7,r9,0 ffc1755c: 41 9e 00 68 beq- cr7,ffc175c4 <== ALWAYS TAKEN for ( i=0 ; i <== NOT EXECUTED ffc1756c: 3f a0 00 00 lis r29,0 <== NOT EXECUTED ffc17570: 3b bd 27 68 addi r29,r29,10088 <== NOT EXECUTED ffc17574: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc17578: 3b e0 00 00 li r31,0 <== NOT EXECUTED ffc1757c: 48 00 00 08 b ffc17584 <== NOT EXECUTED ffc17580: 81 3a 00 5c lwz r9,92(r26) <== NOT EXECUTED if ( info->doubly_indirect[i] ) { ffc17584: 54 63 10 3a rlwinm r3,r3,2,0,29 <== NOT EXECUTED ffc17588: 7c 09 18 2e lwzx r0,r9,r3 <== NOT EXECUTED ffc1758c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc17590: 41 9e 00 10 beq- cr7,ffc175a0 <== NOT EXECUTED memfile_free_blocks_in_table( ffc17594: 7c 69 1a 14 add r3,r9,r3 <== NOT EXECUTED ffc17598: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED ffc1759c: 4b ff fe 35 bl ffc173d0 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i<== NOT EXECUTED 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 ); ffc175b8: 38 7a 00 5c addi r3,r26,92 <== NOT EXECUTED ffc175bc: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED ffc175c0: 4b ff fe 11 bl ffc173d0 <== NOT EXECUTED } if ( info->triply_indirect ) { ffc175c4: 80 7a 00 60 lwz r3,96(r26) ffc175c8: 2f 83 00 00 cmpwi cr7,r3,0 ffc175cc: 41 9e 00 b4 beq- cr7,ffc17680 <== ALWAYS TAKEN for ( i=0 ; i <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; ffc175dc: 83 c3 00 00 lwz r30,0(r3) <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ ffc175e0: 2f 9e 00 00 cmpwi cr7,r30,0 <== NOT EXECUTED ffc175e4: 41 9e 00 90 beq- cr7,ffc17674 <== NOT EXECUTED ffc175e8: 3f a0 00 00 lis r29,0 <== NOT EXECUTED ffc175ec: 3b bd 27 68 addi r29,r29,10088 <== NOT EXECUTED ffc175f0: 3b 20 00 00 li r25,0 <== NOT EXECUTED ffc175f4: 3b 60 00 00 li r27,0 <== NOT EXECUTED break; for ( j=0 ; j<== NOT EXECUTED ffc17600: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc17604: 3b e0 00 00 li r31,0 <== NOT EXECUTED if ( p[j] ) { ffc17608: 54 63 10 3a rlwinm r3,r3,2,0,29 <== NOT EXECUTED ffc1760c: 7c 1e 18 2e lwzx r0,r30,r3 <== NOT EXECUTED ffc17610: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc17614: 41 9e 00 10 beq- cr7,ffc17624 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); ffc17618: 7c 7e 1a 14 add r3,r30,r3 <== NOT EXECUTED ffc1761c: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED ffc17620: 4b ff fd b1 bl ffc173d0 <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j<== NOT EXECUTED ffc1763c: 80 7a 00 60 lwz r3,96(r26) <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( ffc17640: 7c 63 ca 14 add r3,r3,r25 <== NOT EXECUTED ffc17644: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED ffc17648: 4b ff fd 89 bl ffc173d0 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i<== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; ffc17660: 80 7a 00 60 lwz r3,96(r26) <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ ffc17664: 57 79 10 3a rlwinm r25,r27,2,0,29 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; ffc17668: 7f c3 c8 2e lwzx r30,r3,r25 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ ffc1766c: 2f 9e 00 00 cmpwi cr7,r30,0 <== NOT EXECUTED ffc17670: 40 9e ff 88 bne+ cr7,ffc175f8 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( ffc17674: 38 7a 00 60 addi r3,r26,96 <== NOT EXECUTED ffc17678: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED ffc1767c: 4b ff fd 55 bl ffc173d0 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } ffc17680: 80 01 00 2c lwz r0,44(r1) ffc17684: 38 60 00 00 li r3,0 ffc17688: 83 21 00 0c lwz r25,12(r1) ffc1768c: 7c 08 03 a6 mtlr r0 ffc17690: 83 41 00 10 lwz r26,16(r1) ffc17694: 83 61 00 14 lwz r27,20(r1) ffc17698: 83 81 00 18 lwz r28,24(r1) ffc1769c: 83 a1 00 1c lwz r29,28(r1) ffc176a0: 83 c1 00 20 lwz r30,32(r1) ffc176a4: 83 e1 00 24 lwz r31,36(r1) ffc176a8: 38 21 00 28 addi r1,r1,40 ffc176ac: 4e 80 00 20 blr /* * Perform internal consistency checks */ assert( the_jnode ); ffc176b0: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc176b4: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc176b8: 38 a5 6f 4c addi r5,r5,28492 <== NOT EXECUTED ffc176bc: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc176c0: 38 63 70 10 addi r3,r3,28688 <== NOT EXECUTED ffc176c4: 38 a5 00 5c addi r5,r5,92 <== NOT EXECUTED ffc176c8: 38 c6 70 58 addi r6,r6,28760 <== NOT EXECUTED ffc176cc: 38 80 01 ee li r4,494 <== NOT EXECUTED ffc176d0: 4b fe e4 fd bl ffc05bcc <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); ffc176d4: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc176d8: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc176dc: 38 a5 6f 4c addi r5,r5,28492 <== NOT EXECUTED ffc176e0: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc176e4: 38 63 70 10 addi r3,r3,28688 <== NOT EXECUTED ffc176e8: 38 a5 00 5c addi r5,r5,92 <== NOT EXECUTED ffc176ec: 38 c6 70 64 addi r6,r6,28772 <== NOT EXECUTED ffc176f0: 38 80 01 f2 li r4,498 <== NOT EXECUTED ffc176f4: 4b fe e4 d9 bl ffc05bcc <__assert_func> <== NOT EXECUTED =============================================================================== ffc17490 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { ffc17490: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED ffc17494: 7c 08 02 a6 mflr r0 <== NOT EXECUTED block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc17498: 38 a0 00 00 li r5,0 <== NOT EXECUTED MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { ffc1749c: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc174a0: 4b ff fc 91 bl ffc17130 <== NOT EXECUTED assert( block_ptr ); ffc174a4: 7c 69 1b 79 mr. r9,r3 <== NOT EXECUTED ffc174a8: 41 82 00 28 beq- ffc174d0 <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; *block_ptr = 0; ffc174ac: 38 00 00 00 li r0,0 <== NOT EXECUTED block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( block_ptr ) { ptr = *block_ptr; ffc174b0: 80 69 00 00 lwz r3,0(r9) <== NOT EXECUTED *block_ptr = 0; ffc174b4: 90 09 00 00 stw r0,0(r9) <== NOT EXECUTED memfile_free_block( ptr ); ffc174b8: 4b ff fc 05 bl ffc170bc <== NOT EXECUTED } return 1; } ffc174bc: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc174c0: 38 60 00 01 li r3,1 <== NOT EXECUTED ffc174c4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc174c8: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc174cc: 4e 80 00 20 blr <== NOT EXECUTED { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); ffc174d0: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc174d4: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc174d8: 38 a5 6f 4c addi r5,r5,28492 <== NOT EXECUTED ffc174dc: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc174e0: 38 63 70 10 addi r3,r3,28688 <== NOT EXECUTED ffc174e4: 38 a5 00 40 addi r5,r5,64 <== NOT EXECUTED ffc174e8: 38 c6 70 94 addi r6,r6,28820 <== NOT EXECUTED ffc174ec: 38 80 01 96 li r4,406 <== NOT EXECUTED ffc174f0: 4b fe e6 dd bl ffc05bcc <__assert_func> <== NOT EXECUTED =============================================================================== ffc17c9c : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ffc17c9c: 94 21 ff c0 stwu r1,-64(r1) ffc17ca0: 7c 08 02 a6 mflr r0 ffc17ca4: 93 e1 00 3c stw r31,60(r1) /* * Perform internal consistency checks */ assert( the_jnode ); ffc17ca8: 7c 7f 1b 79 mr. r31,r3 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ffc17cac: 93 41 00 28 stw r26,40(r1) ffc17cb0: 7d 1a 43 78 mr r26,r8 ffc17cb4: 93 81 00 30 stw r28,48(r1) ffc17cb8: 7c fc 3b 78 mr r28,r7 ffc17cbc: 93 a1 00 34 stw r29,52(r1) ffc17cc0: 7c bd 2b 78 mr r29,r5 ffc17cc4: 93 c1 00 38 stw r30,56(r1) ffc17cc8: 7c de 33 78 mr r30,r6 ffc17ccc: 90 01 00 44 stw r0,68(r1) ffc17cd0: 92 e1 00 1c stw r23,28(r1) ffc17cd4: 93 01 00 20 stw r24,32(r1) ffc17cd8: 93 21 00 24 stw r25,36(r1) ffc17cdc: 93 61 00 2c stw r27,44(r1) /* * Perform internal consistency checks */ assert( the_jnode ); ffc17ce0: 41 82 02 54 beq- ffc17f34 <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); ffc17ce4: 80 1f 00 4c lwz r0,76(r31) ffc17ce8: 2f 80 00 05 cmpwi cr7,r0,5 ffc17cec: 40 9e 02 24 bne- cr7,ffc17f10 <== NEVER TAKEN /* * Error check arguments */ assert( source ); ffc17cf0: 2f 87 00 00 cmpwi cr7,r7,0 ffc17cf4: 41 9e 02 ac beq- cr7,ffc17fa0 <== NEVER TAKEN /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) ffc17cf8: 2f 88 00 00 cmpwi cr7,r8,0 ffc17cfc: 41 9e 01 dc beq- cr7,ffc17ed8 <== NEVER TAKEN * 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 + length; if ( last_byte > the_jnode->info.file.size ) { ffc17d00: 80 1f 00 50 lwz r0,80(r31) ffc17d04: 7c c8 32 14 add r6,r8,r6 ffc17d08: 2f 80 00 00 cmpwi cr7,r0,0 ffc17d0c: 41 9c 01 78 blt- cr7,ffc17e84 <== NEVER TAKEN ffc17d10: 41 9e 01 68 beq- cr7,ffc17e78 <== ALWAYS TAKEN /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc17d14: 3f 20 00 00 lis r25,0 ffc17d18: 83 79 27 68 lwz r27,10088(r25) ffc17d1c: 7f a3 eb 78 mr r3,r29 ffc17d20: 7f c4 f3 78 mr r4,r30 ffc17d24: 7f 78 fe 70 srawi r24,r27,31 ffc17d28: 7f 05 c3 78 mr r5,r24 ffc17d2c: 7f 66 db 78 mr r6,r27 ffc17d30: 48 00 c4 e9 bl ffc24218 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc17d34: 7f a3 eb 78 mr r3,r29 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc17d38: 7c 97 23 78 mr r23,r4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc17d3c: 7f 05 c3 78 mr r5,r24 ffc17d40: 7f c4 f3 78 mr r4,r30 ffc17d44: 7f 66 db 78 mr r6,r27 ffc17d48: 48 00 c0 cd bl ffc23e14 <__divdi3> if ( start_offset ) { ffc17d4c: 2f 97 00 00 cmpwi cr7,r23,0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc17d50: 7c 9e 23 78 mr r30,r4 if ( start_offset ) { ffc17d54: 3b a0 00 00 li r29,0 ffc17d58: 40 9e 00 d8 bne- cr7,ffc17e30 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc17d5c: 7f 9a d8 40 cmplw cr7,r26,r27 ffc17d60: 41 9c 00 4c blt- cr7,ffc17dac ffc17d64: 3b 39 27 68 addi r25,r25,10088 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc17d68: 7f e3 fb 78 mr r3,r31 ffc17d6c: 7f c4 f3 78 mr r4,r30 ffc17d70: 38 a0 00 00 li r5,0 ffc17d74: 4b ff f3 bd bl ffc17130 assert( block_ptr ); ffc17d78: 2c 03 00 00 cmpwi r3,0 ffc17d7c: 41 82 01 70 beq- ffc17eec <== NEVER TAKEN if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); ffc17d80: 80 63 00 00 lwz r3,0(r3) ffc17d84: 7f 84 e3 78 mr r4,r28 ffc17d88: 7f 65 db 78 mr r5,r27 ffc17d8c: 48 00 2d bd bl ffc1ab48 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc17d90: 80 19 00 00 lwz r0,0(r25) fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; ffc17d94: 7f 5b d0 50 subf r26,r27,r26 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc17d98: 7f 80 d0 40 cmplw cr7,r0,r26 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 ); src += to_copy; ffc17d9c: 7f 9c da 14 add r28,r28,r27 block++; ffc17da0: 3b de 00 01 addi r30,r30,1 * * 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( ffc17da4: 7f bd da 14 add r29,r29,r27 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc17da8: 40 9d ff c0 ble+ cr7,ffc17d68 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { ffc17dac: 2f 9a 00 00 cmpwi cr7,r26,0 ffc17db0: 41 9e 00 30 beq- cr7,ffc17de0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc17db4: 7f c4 f3 78 mr r4,r30 ffc17db8: 7f e3 fb 78 mr r3,r31 ffc17dbc: 38 a0 00 00 li r5,0 ffc17dc0: 4b ff f3 71 bl ffc17130 assert( block_ptr ); ffc17dc4: 2c 03 00 00 cmpwi r3,0 ffc17dc8: 41 82 01 b4 beq- ffc17f7c <== NEVER TAKEN if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); ffc17dcc: 80 63 00 00 lwz r3,0(r3) ffc17dd0: 7f 84 e3 78 mr r4,r28 ffc17dd4: 7f 45 d3 78 mr r5,r26 ffc17dd8: 48 00 2d 71 bl ffc1ab48 my_length = 0; copied += to_copy; ffc17ddc: 7f bd d2 14 add r29,r29,r26 } IMFS_mtime_ctime_update( the_jnode ); ffc17de0: 38 61 00 08 addi r3,r1,8 ffc17de4: 38 80 00 00 li r4,0 ffc17de8: 4b fe e4 0d bl ffc061f4 ffc17dec: 80 01 00 08 lwz r0,8(r1) ffc17df0: 90 1f 00 48 stw r0,72(r31) ffc17df4: 90 1f 00 44 stw r0,68(r31) return copied; } ffc17df8: 80 01 00 44 lwz r0,68(r1) ffc17dfc: 7f a3 eb 78 mr r3,r29 ffc17e00: 82 e1 00 1c lwz r23,28(r1) ffc17e04: 7c 08 03 a6 mtlr r0 ffc17e08: 83 01 00 20 lwz r24,32(r1) ffc17e0c: 83 21 00 24 lwz r25,36(r1) ffc17e10: 83 41 00 28 lwz r26,40(r1) ffc17e14: 83 61 00 2c lwz r27,44(r1) ffc17e18: 83 81 00 30 lwz r28,48(r1) ffc17e1c: 83 a1 00 34 lwz r29,52(r1) ffc17e20: 83 c1 00 38 lwz r30,56(r1) ffc17e24: 83 e1 00 3c lwz r31,60(r1) ffc17e28: 38 21 00 40 addi r1,r1,64 ffc17e2c: 4e 80 00 20 blr block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc17e30: 7f e3 fb 78 mr r3,r31 ffc17e34: 38 a0 00 00 li r5,0 ffc17e38: 4b ff f2 f9 bl ffc17130 assert( block_ptr ); ffc17e3c: 2c 03 00 00 cmpwi r3,0 ffc17e40: 41 82 01 18 beq- ffc17f58 <== NEVER TAKEN */ 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; ffc17e44: 7f b7 d8 50 subf r29,r23,r27 ffc17e48: 7f 9d d0 40 cmplw cr7,r29,r26 ffc17e4c: 41 9d 00 60 bgt- cr7,ffc17eac if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); ffc17e50: 80 63 00 00 lwz r3,0(r3) ffc17e54: 7f 84 e3 78 mr r4,r28 ffc17e58: 7f a5 eb 78 mr r5,r29 ffc17e5c: 7c 63 ba 14 add r3,r3,r23 ffc17e60: 48 00 2c e9 bl ffc1ab48 src += to_copy; ffc17e64: 7f 9c ea 14 add r28,r28,r29 block++; my_length -= to_copy; copied += to_copy; ffc17e68: 83 79 27 68 lwz r27,10088(r25) #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; ffc17e6c: 3b de 00 01 addi r30,r30,1 my_length -= to_copy; ffc17e70: 7f 5d d0 50 subf r26,r29,r26 ffc17e74: 4b ff fe e8 b ffc17d5c * 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 + length; if ( last_byte > the_jnode->info.file.size ) { ffc17e78: 80 1f 00 54 lwz r0,84(r31) ffc17e7c: 7f 80 30 40 cmplw cr7,r0,r6 ffc17e80: 40 9c fe 94 bge+ cr7,ffc17d14 <== NEVER TAKEN status = IMFS_memfile_extend( the_jnode, last_byte ); ffc17e84: 7f e3 fb 78 mr r3,r31 ffc17e88: 38 a0 00 00 li r5,0 ffc17e8c: 4b ff fa 55 bl ffc178e0 if ( status ) ffc17e90: 2f 83 00 00 cmpwi cr7,r3,0 ffc17e94: 41 9e fe 80 beq+ cr7,ffc17d14 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); ffc17e98: 48 00 20 c9 bl ffc19f60 <__errno> <== NOT EXECUTED ffc17e9c: 38 00 00 1c li r0,28 <== NOT EXECUTED ffc17ea0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc17ea4: 3b a0 ff ff li r29,-1 <== NOT EXECUTED ffc17ea8: 4b ff ff 50 b ffc17df8 <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); ffc17eac: 80 63 00 00 lwz r3,0(r3) */ 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; ffc17eb0: 7f 5d d3 78 mr r29,r26 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); ffc17eb4: 7f 84 e3 78 mr r4,r28 ffc17eb8: 7c 63 ba 14 add r3,r3,r23 ffc17ebc: 7f a5 eb 78 mr r5,r29 ffc17ec0: 48 00 2c 89 bl ffc1ab48 src += to_copy; ffc17ec4: 7f 9c ea 14 add r28,r28,r29 block++; my_length -= to_copy; copied += to_copy; ffc17ec8: 83 79 27 68 lwz r27,10088(r25) #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; ffc17ecc: 3b de 00 01 addi r30,r30,1 my_length -= to_copy; ffc17ed0: 7f 5d d0 50 subf r26,r29,r26 ffc17ed4: 4b ff fe 88 b ffc17d5c * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc17ed8: 48 00 20 89 bl ffc19f60 <__errno> <== NOT EXECUTED ffc17edc: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc17ee0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc17ee4: 3b a0 ff ff li r29,-1 <== NOT EXECUTED ffc17ee8: 4b ff ff 10 b ffc17df8 <== NOT EXECUTED */ 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 ); assert( block_ptr ); ffc17eec: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc17ef0: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc17ef4: 38 a5 6f 4c addi r5,r5,28492 <== NOT EXECUTED ffc17ef8: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc17efc: 38 63 70 10 addi r3,r3,28688 <== NOT EXECUTED ffc17f00: 38 a5 00 9c addi r5,r5,156 <== NOT EXECUTED ffc17f04: 38 c6 70 94 addi r6,r6,28820 <== NOT EXECUTED ffc17f08: 38 80 03 30 li r4,816 <== NOT EXECUTED ffc17f0c: 4b fe dc c1 bl ffc05bcc <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); ffc17f10: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc17f14: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc17f18: 38 a5 6f 4c addi r5,r5,28492 <== NOT EXECUTED ffc17f1c: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc17f20: 38 63 70 10 addi r3,r3,28688 <== NOT EXECUTED ffc17f24: 38 a5 00 9c addi r5,r5,156 <== NOT EXECUTED ffc17f28: 38 c6 70 64 addi r6,r6,28772 <== NOT EXECUTED ffc17f2c: 38 80 02 e7 li r4,743 <== NOT EXECUTED ffc17f30: 4b fe dc 9d bl ffc05bcc <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); ffc17f34: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc17f38: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc17f3c: 38 a5 6f 4c addi r5,r5,28492 <== NOT EXECUTED ffc17f40: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc17f44: 38 63 70 10 addi r3,r3,28688 <== NOT EXECUTED ffc17f48: 38 a5 00 9c addi r5,r5,156 <== NOT EXECUTED ffc17f4c: 38 c6 70 58 addi r6,r6,28760 <== NOT EXECUTED ffc17f50: 38 80 02 e3 li r4,739 <== NOT EXECUTED ffc17f54: 4b fe dc 79 bl ffc05bcc <__assert_func> <== NOT EXECUTED 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 ); assert( block_ptr ); ffc17f58: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc17f5c: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc17f60: 38 a5 6f 4c addi r5,r5,28492 <== NOT EXECUTED ffc17f64: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc17f68: 38 63 70 10 addi r3,r3,28688 <== NOT EXECUTED ffc17f6c: 38 a5 00 9c addi r5,r5,156 <== NOT EXECUTED ffc17f70: 38 c6 70 94 addi r6,r6,28820 <== NOT EXECUTED ffc17f74: 38 80 03 1c li r4,796 <== NOT EXECUTED ffc17f78: 4b fe dc 55 bl ffc05bcc <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); ffc17f7c: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc17f80: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc17f84: 38 a5 6f 4c addi r5,r5,28492 <== NOT EXECUTED ffc17f88: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc17f8c: 38 63 70 10 addi r3,r3,28688 <== NOT EXECUTED ffc17f90: 38 a5 00 9c addi r5,r5,156 <== NOT EXECUTED ffc17f94: 38 c6 70 94 addi r6,r6,28820 <== NOT EXECUTED ffc17f98: 38 80 03 46 li r4,838 <== NOT EXECUTED ffc17f9c: 4b fe dc 31 bl ffc05bcc <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); ffc17fa0: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc17fa4: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc17fa8: 38 a5 6f 4c addi r5,r5,28492 <== NOT EXECUTED ffc17fac: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc17fb0: 38 63 70 10 addi r3,r3,28688 <== NOT EXECUTED ffc17fb4: 38 a5 00 9c addi r5,r5,156 <== NOT EXECUTED ffc17fb8: 38 c6 70 a0 addi r6,r6,28832 <== NOT EXECUTED ffc17fbc: 38 80 02 ef li r4,751 <== NOT EXECUTED ffc17fc0: 4b fe dc 0d bl ffc05bcc <__assert_func> <== NOT EXECUTED =============================================================================== ffc0ddd8 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc0ddd8: 94 21 ff 90 stwu r1,-112(r1) ffc0dddc: 7c 08 02 a6 mflr r0 ffc0dde0: 93 41 00 58 stw r26,88(r1) ffc0dde4: 7c 7a 1b 78 mr r26,r3 ffc0dde8: 90 01 00 74 stw r0,116(r1) ffc0ddec: 93 61 00 5c stw r27,92(r1) ffc0ddf0: 7c fb 3b 78 mr r27,r7 ffc0ddf4: 93 81 00 60 stw r28,96(r1) IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); ffc0ddf8: 3b 81 00 28 addi r28,r1,40 const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc0ddfc: 93 a1 00 64 stw r29,100(r1) ffc0de00: 7c bd 2b 78 mr r29,r5 ffc0de04: 93 c1 00 68 stw r30,104(r1) ffc0de08: 7c de 33 78 mr r30,r6 ffc0de0c: 93 e1 00 6c stw r31,108(r1) ffc0de10: 7c 9f 23 78 mr r31,r4 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); ffc0de14: 48 00 67 5d bl ffc14570 ffc0de18: 7f 85 e3 78 mr r5,r28 ffc0de1c: 7c 64 1b 78 mr r4,r3 ffc0de20: 38 c1 00 08 addi r6,r1,8 ffc0de24: 7f 43 d3 78 mr r3,r26 ffc0de28: 4b ff fd 6d bl ffc0db94 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) ffc0de2c: 57 e0 04 26 rlwinm r0,r31,0,16,19 ffc0de30: 2f 80 40 00 cmpwi cr7,r0,16384 ffc0de34: 41 9e 00 8c beq- cr7,ffc0dec0 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) ffc0de38: 39 20 00 00 li r9,0 ffc0de3c: 61 29 80 00 ori r9,r9,32768 ffc0de40: 7f 80 48 00 cmpw cr7,r0,r9 ffc0de44: 38 80 00 05 li r4,5 ffc0de48: 41 9e 00 20 beq- cr7,ffc0de68 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { ffc0de4c: 2f 80 60 00 cmpwi cr7,r0,24576 ffc0de50: 41 9e 00 60 beq- cr7,ffc0deb0 ffc0de54: 2f 80 20 00 cmpwi cr7,r0,8192 ffc0de58: 41 9e 00 58 beq- cr7,ffc0deb0 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) ffc0de5c: 2f 80 10 00 cmpwi cr7,r0,4096 ffc0de60: 38 80 00 07 li r4,7 ffc0de64: 40 9e 00 64 bne- cr7,ffc0dec8 <== NEVER TAKEN * 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. */ new_node = IMFS_create_node( ffc0de68: 7f 63 db 78 mr r3,r27 ffc0de6c: 7f 85 e3 78 mr r5,r28 ffc0de70: 7f e6 fb 78 mr r6,r31 ffc0de74: 38 e1 00 10 addi r7,r1,16 ffc0de78: 48 00 34 7d bl ffc112f4 new_name, mode, &info ); if ( !new_node ) ffc0de7c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0de80: 38 60 00 00 li r3,0 ffc0de84: 41 9e 00 58 beq- cr7,ffc0dedc <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } ffc0de88: 80 01 00 74 lwz r0,116(r1) ffc0de8c: 83 41 00 58 lwz r26,88(r1) ffc0de90: 7c 08 03 a6 mtlr r0 ffc0de94: 83 61 00 5c lwz r27,92(r1) ffc0de98: 83 81 00 60 lwz r28,96(r1) ffc0de9c: 83 a1 00 64 lwz r29,100(r1) ffc0dea0: 83 c1 00 68 lwz r30,104(r1) ffc0dea4: 83 e1 00 6c lwz r31,108(r1) ffc0dea8: 38 21 00 70 addi r1,r1,112 ffc0deac: 4e 80 00 20 blr type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); ffc0deb0: 93 a1 00 10 stw r29,16(r1) ffc0deb4: 38 80 00 02 li r4,2 ffc0deb8: 93 c1 00 14 stw r30,20(r1) */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { ffc0debc: 4b ff ff ac b ffc0de68 rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); ffc0dec0: 38 80 00 01 li r4,1 ffc0dec4: 4b ff ff a4 b ffc0de68 ffc0dec8: 48 00 53 ad bl ffc13274 <__errno> <== NOT EXECUTED ffc0decc: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc0ded0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0ded4: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0ded8: 4b ff ff b0 b ffc0de88 <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); ffc0dedc: 48 00 53 99 bl ffc13274 <__errno> <== NOT EXECUTED ffc0dee0: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc0dee4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0dee8: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0deec: 4b ff ff 9c b ffc0de88 <== NOT EXECUTED =============================================================================== ffc0563c : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { ffc0563c: 7c 08 02 a6 mflr r0 ffc05640: 94 21 ff f8 stwu r1,-8(r1) ffc05644: 90 01 00 0c stw r0,12(r1) IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; ffc05648: 81 23 00 08 lwz r9,8(r3) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) ffc0564c: 80 09 00 4c lwz r0,76(r9) ffc05650: 2f 80 00 01 cmpwi cr7,r0,1 ffc05654: 40 9e 00 1c bne- cr7,ffc05670 <== NEVER TAKEN /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; ffc05658: 90 69 00 5c stw r3,92(r9) ffc0565c: 38 60 00 00 li r3,0 return 0; } ffc05660: 80 01 00 0c lwz r0,12(r1) ffc05664: 38 21 00 08 addi r1,r1,8 ffc05668: 7c 08 03 a6 mtlr r0 ffc0566c: 4e 80 00 20 blr /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc05670: 48 01 48 f1 bl ffc19f60 <__errno> <== NOT EXECUTED ffc05674: 38 00 00 14 li r0,20 <== NOT EXECUTED ffc05678: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0567c: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc05680: 4b ff ff e0 b ffc05660 <== NOT EXECUTED =============================================================================== ffc07158 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { ffc07158: 94 21 ff f0 stwu r1,-16(r1) ffc0715c: 7c 08 02 a6 mflr r0 ffc07160: 93 e1 00 0c stw r31,12(r1) assert( the_jnode ); ffc07164: 7c 7f 1b 79 mr. r31,r3 */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { ffc07168: 90 01 00 14 stw r0,20(r1) ffc0716c: 93 c1 00 08 stw r30,8(r1) assert( the_jnode ); ffc07170: 41 82 02 28 beq- ffc07398 <== NEVER TAKEN fprintf(stdout, "%s", the_jnode->name ); ffc07174: 3f c0 00 00 lis r30,0 ffc07178: 81 3e 27 4c lwz r9,10060(r30) ffc0717c: 38 7f 00 0c addi r3,r31,12 ffc07180: 80 89 00 08 lwz r4,8(r9) ffc07184: 48 01 3b 41 bl ffc1acc4 switch( the_jnode->type ) { ffc07188: 80 bf 00 4c lwz r5,76(r31) ffc0718c: 2b 85 00 07 cmplwi cr7,r5,7 ffc07190: 40 9d 00 3c ble- cr7,ffc071cc <== ALWAYS TAKEN fprintf(stdout, " FIFO not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); ffc07194: 81 3e 27 4c lwz r9,10060(r30) <== NOT EXECUTED ffc07198: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED ffc0719c: 38 84 bc 08 addi r4,r4,-17400 <== NOT EXECUTED ffc071a0: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED ffc071a4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc071a8: 48 01 38 a1 bl ffc1aa48 <== NOT EXECUTED assert(0); ffc071ac: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc071b0: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED ffc071b4: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED ffc071b8: 38 63 bb 54 addi r3,r3,-17580 <== NOT EXECUTED ffc071bc: 38 a5 bb 2c addi r5,r5,-17620 <== NOT EXECUTED ffc071c0: 38 c6 bb f0 addi r6,r6,-17424 <== NOT EXECUTED ffc071c4: 38 80 00 6c li r4,108 <== NOT EXECUTED ffc071c8: 48 00 0d ad bl ffc07f74 <__assert_func> <== NOT EXECUTED ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { ffc071cc: 3d 20 ff c3 lis r9,-61 ffc071d0: 39 29 bb 0c addi r9,r9,-17652 ffc071d4: 54 a0 10 3a rlwinm r0,r5,2,0,29 ffc071d8: 7c 09 00 2e lwzx r0,r9,r0 ffc071dc: 7d 20 4a 14 add r9,r0,r9 ffc071e0: 7d 29 03 a6 mtctr r9 ffc071e4: 4e 80 04 20 bctr fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); ffc071e8: 81 3e 27 4c lwz r9,10060(r30) <== NOT EXECUTED ffc071ec: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc071f0: 38 80 00 01 li r4,1 <== NOT EXECUTED ffc071f4: 80 c9 00 08 lwz r6,8(r9) <== NOT EXECUTED ffc071f8: 38 a0 00 12 li r5,18 <== NOT EXECUTED ffc071fc: 38 63 bb f4 addi r3,r3,-17420 <== NOT EXECUTED ffc07200: 48 01 48 b9 bl ffc1bab8 <== NOT EXECUTED assert(0); ffc07204: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc07208: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED ffc0720c: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED ffc07210: 38 63 bb 54 addi r3,r3,-17580 <== NOT EXECUTED ffc07214: 38 a5 bb 2c addi r5,r5,-17620 <== NOT EXECUTED ffc07218: 38 c6 bb f0 addi r6,r6,-17424 <== NOT EXECUTED ffc0721c: 38 80 00 67 li r4,103 <== NOT EXECUTED ffc07220: 48 00 0d 55 bl ffc07f74 <__assert_func> <== NOT EXECUTED fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", ffc07224: 81 3e 27 4c lwz r9,10060(r30) <== NOT EXECUTED ffc07228: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED ffc0722c: 80 df 00 58 lwz r6,88(r31) <== NOT EXECUTED ffc07230: 38 84 bb c0 addi r4,r4,-17472 <== NOT EXECUTED ffc07234: 80 bf 00 54 lwz r5,84(r31) <== NOT EXECUTED ffc07238: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED ffc0723c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc07240: 48 01 38 09 bl ffc1aa48 <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); ffc07244: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc07248: 38 63 ad 88 addi r3,r3,-21112 <== NOT EXECUTED ffc0724c: 48 01 5b 2d bl ffc1cd78 <== NOT EXECUTED } ffc07250: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc07254: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc07258: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0725c: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc07260: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc07264: 4e 80 00 20 blr <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", ffc07268: 81 3e 27 4c lwz r9,10060(r30) ffc0726c: 3c 80 ff c3 lis r4,-61 ffc07270: 80 bf 00 54 lwz r5,84(r31) ffc07274: 38 84 bb d0 addi r4,r4,-17456 ffc07278: 80 69 00 08 lwz r3,8(r9) ffc0727c: 4c c6 31 82 crclr 4*cr1+eq ffc07280: 48 01 37 c9 bl ffc1aa48 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); ffc07284: 3c 60 ff c3 lis r3,-61 ffc07288: 38 63 ad 88 addi r3,r3,-21112 ffc0728c: 48 01 5a ed bl ffc1cd78 } ffc07290: 80 01 00 14 lwz r0,20(r1) ffc07294: 83 c1 00 08 lwz r30,8(r1) ffc07298: 7c 08 03 a6 mtlr r0 ffc0729c: 83 e1 00 0c lwz r31,12(r1) ffc072a0: 38 21 00 10 addi r1,r1,16 ffc072a4: 4e 80 00 20 blr fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); ffc072a8: 81 3e 27 4c lwz r9,10060(r30) <== NOT EXECUTED ffc072ac: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc072b0: 38 80 00 01 li r4,1 <== NOT EXECUTED ffc072b4: 80 c9 00 08 lwz r6,8(r9) <== NOT EXECUTED ffc072b8: 38 a0 00 13 li r5,19 <== NOT EXECUTED ffc072bc: 38 63 bb dc addi r3,r3,-17444 <== NOT EXECUTED ffc072c0: 48 01 47 f9 bl ffc1bab8 <== NOT EXECUTED assert(0); ffc072c4: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc072c8: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED ffc072cc: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED ffc072d0: 38 63 bb 54 addi r3,r3,-17580 <== NOT EXECUTED ffc072d4: 38 a5 bb 2c addi r5,r5,-17620 <== NOT EXECUTED ffc072d8: 38 c6 bb f0 addi r6,r6,-17424 <== NOT EXECUTED ffc072dc: 38 80 00 62 li r4,98 <== NOT EXECUTED ffc072e0: 48 00 0c 95 bl ffc07f74 <__assert_func> <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); ffc072e4: 81 3e 27 4c lwz r9,10060(r30) <== NOT EXECUTED ffc072e8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc072ec: 38 80 00 01 li r4,1 <== NOT EXECUTED ffc072f0: 80 c9 00 08 lwz r6,8(r9) <== NOT EXECUTED ffc072f4: 38 a0 00 13 li r5,19 <== NOT EXECUTED ffc072f8: 38 63 bb dc addi r3,r3,-17444 <== NOT EXECUTED ffc072fc: 48 01 47 bd bl ffc1bab8 <== NOT EXECUTED assert(0); ffc07300: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc07304: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED ffc07308: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED ffc0730c: 38 63 bb 54 addi r3,r3,-17580 <== NOT EXECUTED ffc07310: 38 a5 bb 2c addi r5,r5,-17620 <== NOT EXECUTED ffc07314: 38 c6 bb f0 addi r6,r6,-17424 <== NOT EXECUTED ffc07318: 38 80 00 5d li r4,93 <== NOT EXECUTED ffc0731c: 48 00 0c 59 bl ffc07f74 <__assert_func> <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", ffc07320: 81 3e 27 4c lwz r9,10060(r30) ffc07324: 3c 80 ff c3 lis r4,-61 ffc07328: 80 df 00 54 lwz r6,84(r31) ffc0732c: 38 84 bb ac addi r4,r4,-17492 ffc07330: 80 bf 00 50 lwz r5,80(r31) ffc07334: 80 69 00 08 lwz r3,8(r9) ffc07338: 4c c6 31 82 crclr 4*cr1+eq ffc0733c: 48 01 37 0d bl ffc1aa48 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); ffc07340: 3c 60 ff c3 lis r3,-61 ffc07344: 38 63 ad 88 addi r3,r3,-21112 ffc07348: 48 01 5a 31 bl ffc1cd78 } ffc0734c: 80 01 00 14 lwz r0,20(r1) ffc07350: 83 c1 00 08 lwz r30,8(r1) ffc07354: 7c 08 03 a6 mtlr r0 ffc07358: 83 e1 00 0c lwz r31,12(r1) ffc0735c: 38 21 00 10 addi r1,r1,16 ffc07360: 4e 80 00 20 blr assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); ffc07364: 81 3e 27 4c lwz r9,10060(r30) ffc07368: 38 60 00 2f li r3,47 ffc0736c: 80 89 00 08 lwz r4,8(r9) ffc07370: 48 01 37 e9 bl ffc1ab58 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); ffc07374: 3c 60 ff c3 lis r3,-61 ffc07378: 38 63 ad 88 addi r3,r3,-21112 ffc0737c: 48 01 59 fd bl ffc1cd78 } ffc07380: 80 01 00 14 lwz r0,20(r1) ffc07384: 83 c1 00 08 lwz r30,8(r1) ffc07388: 7c 08 03 a6 mtlr r0 ffc0738c: 83 e1 00 0c lwz r31,12(r1) ffc07390: 38 21 00 10 addi r1,r1,16 ffc07394: 4e 80 00 20 blr void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); ffc07398: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc0739c: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED ffc073a0: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED ffc073a4: 38 63 bb 54 addi r3,r3,-17580 <== NOT EXECUTED ffc073a8: 38 a5 bb 2c addi r5,r5,-17620 <== NOT EXECUTED ffc073ac: 38 c6 bb a0 addi r6,r6,-17504 <== NOT EXECUTED ffc073b0: 38 80 00 38 li r4,56 <== NOT EXECUTED ffc073b4: 48 00 0b c1 bl ffc07f74 <__assert_func> <== NOT EXECUTED =============================================================================== ffc05690 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { ffc05690: 7c 08 02 a6 mflr r0 ffc05694: 94 21 ff f8 stwu r1,-8(r1) ffc05698: 90 01 00 0c stw r0,12(r1) IMFS_jnode_t *node; int i; node = loc->node_access; ffc0569c: 81 23 00 00 lwz r9,0(r3) if ( node->type != IMFS_SYM_LINK ) ffc056a0: 80 09 00 4c lwz r0,76(r9) ffc056a4: 2f 80 00 04 cmpwi cr7,r0,4 ffc056a8: 40 9e 00 64 bne- cr7,ffc0570c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) ffc056ac: 2f 85 00 00 cmpwi cr7,r5,0 ffc056b0: 41 9e 00 54 beq- cr7,ffc05704 <== NEVER TAKEN ffc056b4: 81 69 00 50 lwz r11,80(r9) ffc056b8: 7c a9 03 a6 mtctr r5 int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc056bc: 38 60 00 00 li r3,0 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) ffc056c0: 88 0b 00 00 lbz r0,0(r11) int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc056c4: 39 60 00 00 li r11,0 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) ffc056c8: 2f 80 00 00 cmpwi cr7,r0,0 ffc056cc: 40 be 00 18 bne+ cr7,ffc056e4 <== ALWAYS TAKEN ffc056d0: 48 00 00 34 b ffc05704 <== NOT EXECUTED ffc056d4: 81 49 00 50 lwz r10,80(r9) ffc056d8: 7c 0a 18 ae lbzx r0,r10,r3 ffc056dc: 2f 80 00 00 cmpwi cr7,r0,0 ffc056e0: 41 9e 00 14 beq- cr7,ffc056f4 ffc056e4: 38 63 00 01 addi r3,r3,1 buf[i] = node->info.sym_link.name[i]; ffc056e8: 7c 04 59 ae stbx r0,r4,r11 node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) ffc056ec: 7c 6b 1b 78 mr r11,r3 ffc056f0: 42 00 ff e4 bdnz+ ffc056d4 buf[i] = node->info.sym_link.name[i]; return i; } ffc056f4: 80 01 00 0c lwz r0,12(r1) ffc056f8: 38 21 00 08 addi r1,r1,8 ffc056fc: 7c 08 03 a6 mtlr r0 ffc05700: 4e 80 00 20 blr node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) ffc05704: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc05708: 4b ff ff ec b ffc056f4 <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc0570c: 48 01 48 55 bl ffc19f60 <__errno> <== NOT EXECUTED ffc05710: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc05714: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc05718: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0571c: 4b ff ff d8 b ffc056f4 <== NOT EXECUTED =============================================================================== ffc05720 : 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 */ ) { ffc05720: 94 21 ff e0 stwu r1,-32(r1) ffc05724: 7c 08 02 a6 mflr r0 ffc05728: 90 01 00 24 stw r0,36(r1) ffc0572c: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; ffc05730: 83 e4 00 00 lwz r31,0(r4) strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); ffc05734: 7c c4 33 78 mr r4,r6 rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { ffc05738: 93 c1 00 18 stw r30,24(r1) ffc0573c: 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 ); ffc05740: 38 7f 00 0c addi r3,r31,12 ffc05744: 38 a0 00 20 li r5,32 ffc05748: 48 01 5b 75 bl ffc1b2bc if ( the_jnode->Parent != NULL ) ffc0574c: 80 1f 00 08 lwz r0,8(r31) ffc05750: 2f 80 00 00 cmpwi cr7,r0,0 ffc05754: 41 9e 00 0c beq- cr7,ffc05760 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc05758: 7f e3 fb 78 mr r3,r31 ffc0575c: 48 00 5f d1 bl ffc0b72c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; ffc05760: 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 ); ffc05764: 7f e4 fb 78 mr r4,r31 the_jnode->Parent = new_parent; ffc05768: 90 7f 00 08 stw r3,8(r31) ffc0576c: 38 63 00 50 addi r3,r3,80 ffc05770: 48 00 5f 8d bl ffc0b6fc <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); ffc05774: 38 61 00 08 addi r3,r1,8 ffc05778: 38 80 00 00 li r4,0 ffc0577c: 48 00 0a 79 bl ffc061f4 ffc05780: 80 01 00 08 lwz r0,8(r1) return 0; } ffc05784: 38 60 00 00 li r3,0 ffc05788: 83 c1 00 18 lwz r30,24(r1) rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); ffc0578c: 90 1f 00 48 stw r0,72(r31) return 0; } ffc05790: 80 01 00 24 lwz r0,36(r1) ffc05794: 83 e1 00 1c lwz r31,28(r1) ffc05798: 38 21 00 20 addi r1,r1,32 ffc0579c: 7c 08 03 a6 mtlr r0 ffc057a0: 4e 80 00 20 blr =============================================================================== ffc0defc : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { ffc0defc: 94 21 ff e0 stwu r1,-32(r1) ffc0df00: 7c 08 02 a6 mflr r0 ffc0df04: 90 01 00 24 stw r0,36(r1) ffc0df08: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; ffc0df0c: 83 e4 00 00 lwz r31,0(r4) int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { ffc0df10: 93 c1 00 18 stw r30,24(r1) ffc0df14: 7c 9e 23 78 mr r30,r4 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { ffc0df18: 80 1f 00 08 lwz r0,8(r31) ffc0df1c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0df20: 41 9e 00 14 beq- cr7,ffc0df34 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc0df24: 7f e3 fb 78 mr r3,r31 ffc0df28: 48 00 18 0d bl ffc0f734 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; ffc0df2c: 38 00 00 00 li r0,0 ffc0df30: 90 1f 00 08 stw r0,8(r31) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; ffc0df34: a1 3f 00 34 lhz r9,52(r31) IMFS_update_ctime( the_jnode ); ffc0df38: 38 80 00 00 li r4,0 ffc0df3c: 38 61 00 08 addi r3,r1,8 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; ffc0df40: 38 09 ff ff addi r0,r9,-1 ffc0df44: b0 1f 00 34 sth r0,52(r31) IMFS_update_ctime( the_jnode ); ffc0df48: 48 00 04 21 bl ffc0e368 ffc0df4c: 80 01 00 08 lwz r0,8(r1) /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { ffc0df50: 7f e3 fb 78 mr r3,r31 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; IMFS_update_ctime( the_jnode ); ffc0df54: 90 1f 00 48 stw r0,72(r31) /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { ffc0df58: 48 00 05 01 bl ffc0e458 ffc0df5c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0df60: 40 9e 00 3c bne- cr7,ffc0df9c <== NEVER TAKEN ffc0df64: a0 1f 00 34 lhz r0,52(r31) ffc0df68: 2f 80 00 00 cmpwi cr7,r0,0 ffc0df6c: 40 9e 00 30 bne- cr7,ffc0df9c <== NEVER TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) ffc0df70: 3d 20 00 00 lis r9,0 ffc0df74: 81 7e 00 00 lwz r11,0(r30) ffc0df78: 81 29 26 dc lwz r9,9948(r9) ffc0df7c: 81 49 00 04 lwz r10,4(r9) ffc0df80: 7f 8a 58 00 cmpw cr7,r10,r11 ffc0df84: 41 9e 00 48 beq- cr7,ffc0dfcc <== NEVER TAKEN /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { ffc0df88: 80 1f 00 4c lwz r0,76(r31) ffc0df8c: 2f 80 00 04 cmpwi cr7,r0,4 ffc0df90: 41 9e 00 28 beq- cr7,ffc0dfb8 if ( the_jnode->info.sym_link.name ) free( (void*) the_jnode->info.sym_link.name ); } free( the_jnode ); ffc0df94: 7f e3 fb 78 mr r3,r31 ffc0df98: 4b ff 66 5d bl ffc045f4 } return 0; } ffc0df9c: 80 01 00 24 lwz r0,36(r1) ffc0dfa0: 38 60 00 00 li r3,0 ffc0dfa4: 83 c1 00 18 lwz r30,24(r1) ffc0dfa8: 7c 08 03 a6 mtlr r0 ffc0dfac: 83 e1 00 1c lwz r31,28(r1) ffc0dfb0: 38 21 00 20 addi r1,r1,32 ffc0dfb4: 4e 80 00 20 blr /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name ) ffc0dfb8: 80 7f 00 50 lwz r3,80(r31) ffc0dfbc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0dfc0: 41 be ff d4 beq- cr7,ffc0df94 <== NEVER TAKEN free( (void*) the_jnode->info.sym_link.name ); ffc0dfc4: 4b ff 66 31 bl ffc045f4 ffc0dfc8: 4b ff ff cc b ffc0df94 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; ffc0dfcc: 90 09 00 04 stw r0,4(r9) <== NOT EXECUTED ffc0dfd0: 4b ff ff b8 b ffc0df88 <== NOT EXECUTED =============================================================================== ffc0dfd4 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { ffc0dfd4: 7c 08 02 a6 mflr r0 ffc0dfd8: 94 21 ff f8 stwu r1,-8(r1) ffc0dfdc: 7c 6b 1b 78 mr r11,r3 ffc0dfe0: 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; ffc0dfe4: 81 23 00 00 lwz r9,0(r3) switch ( the_jnode->type ) { ffc0dfe8: 80 09 00 4c lwz r0,76(r9) ffc0dfec: 2b 80 00 07 cmplwi cr7,r0,7 ffc0dff0: 40 9d 00 24 ble- cr7,ffc0e014 <== ALWAYS TAKEN case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc0dff4: 48 00 52 81 bl ffc13274 <__errno> <== NOT EXECUTED ffc0dff8: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc0dffc: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0e000: 38 60 ff ff li r3,-1 <== NOT EXECUTED buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } ffc0e004: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc0e008: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc0e00c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0e010: 4e 80 00 20 blr <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { ffc0e014: 3d 40 ff c2 lis r10,-62 ffc0e018: 39 4a f8 f0 addi r10,r10,-1808 ffc0e01c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0e020: 7c 0a 00 2e lwzx r0,r10,r0 ffc0e024: 7d 40 52 14 add r10,r0,r10 ffc0e028: 7d 49 03 a6 mtctr r10 ffc0e02c: 4e 80 04 20 bctr case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; ffc0e030: 38 e0 00 00 li r7,0 <== NOT EXECUTED ffc0e034: 39 00 00 00 li r8,0 <== NOT EXECUTED ffc0e038: 90 e4 00 20 stw r7,32(r4) <== NOT EXECUTED ffc0e03c: 91 04 00 24 stw r8,36(r4) <== NOT EXECUTED */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; ffc0e040: 80 09 00 30 lwz r0,48(r9) buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; ffc0e044: 38 60 00 00 li r3,0 fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; ffc0e048: a1 49 00 34 lhz r10,52(r9) */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; ffc0e04c: 90 04 00 0c stw r0,12(r4) buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; ffc0e050: 80 09 00 38 lwz r0,56(r9) fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; ffc0e054: b1 44 00 10 sth r10,16(r4) buf->st_ino = the_jnode->st_ino; ffc0e058: 90 04 00 08 stw r0,8(r4) buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; ffc0e05c: 80 09 00 40 lwz r0,64(r9) rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; ffc0e060: a1 49 00 3c lhz r10,60(r9) buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; ffc0e064: 90 04 00 28 stw r0,40(r4) rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; ffc0e068: b1 44 00 12 sth r10,18(r4) buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; ffc0e06c: 80 09 00 44 lwz r0,68(r9) * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); ffc0e070: 81 6b 00 10 lwz r11,16(r11) buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; ffc0e074: 90 04 00 30 stw r0,48(r4) buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; ffc0e078: a0 09 00 3e lhz r0,62(r9) * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); ffc0e07c: 81 6b 00 34 lwz r11,52(r11) buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; ffc0e080: b0 04 00 14 sth r0,20(r4) buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } ffc0e084: 80 01 00 0c lwz r0,12(r1) ffc0e088: 38 21 00 08 addi r1,r1,8 buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; ffc0e08c: 81 49 00 48 lwz r10,72(r9) /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = ffc0e090: 39 20 00 00 li r9,0 buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } ffc0e094: 7c 08 03 a6 mtlr r0 * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); ffc0e098: 81 6b 00 00 lwz r11,0(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 = ffc0e09c: 61 29 ff fe ori r9,r9,65534 buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; ffc0e0a0: 91 44 00 38 stw r10,56(r4) /* * 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 = ffc0e0a4: 91 24 00 00 stw r9,0(r4) ffc0e0a8: 91 64 00 04 stw r11,4(r4) buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } ffc0e0ac: 4e 80 00 20 blr switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); ffc0e0b0: 81 49 00 54 lwz r10,84(r9) rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; ffc0e0b4: 80 09 00 50 lwz r0,80(r9) ffc0e0b8: 91 44 00 1c stw r10,28(r4) ffc0e0bc: 90 04 00 18 stw r0,24(r4) break; ffc0e0c0: 4b ff ff 80 b ffc0e040 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; ffc0e0c4: 80 e9 00 50 lwz r7,80(r9) ffc0e0c8: 81 09 00 54 lwz r8,84(r9) ffc0e0cc: 90 e4 00 20 stw r7,32(r4) ffc0e0d0: 91 04 00 24 stw r8,36(r4) break; ffc0e0d4: 4b ff ff 6c b ffc0e040 =============================================================================== ffc057a4 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { ffc057a4: 94 21 ff 98 stwu r1,-104(r1) ffc057a8: 7c 08 02 a6 mflr r0 ffc057ac: 93 a1 00 5c stw r29,92(r1) ffc057b0: 7c 7d 1b 78 mr r29,r3 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); ffc057b4: 7c a3 2b 78 mr r3,r5 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { ffc057b8: 90 01 00 6c stw r0,108(r1) ffc057bc: 93 81 00 58 stw r28,88(r1) ffc057c0: 7c bc 2b 78 mr r28,r5 ffc057c4: 93 c1 00 60 stw r30,96(r1) ffc057c8: 7c 9e 23 78 mr r30,r4 ffc057cc: 93 e1 00 64 stw r31,100(r1) int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); ffc057d0: 48 01 5a 51 bl ffc1b220 ffc057d4: 3b e1 00 28 addi r31,r1,40 ffc057d8: 7c 64 1b 78 mr r4,r3 ffc057dc: 7f e5 fb 78 mr r5,r31 ffc057e0: 38 c1 00 08 addi r6,r1,8 ffc057e4: 7f 83 e3 78 mr r3,r28 ffc057e8: 48 00 eb 2d bl ffc14314 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); ffc057ec: 7f c3 f3 78 mr r3,r30 ffc057f0: 48 01 59 99 bl ffc1b188 if (info.sym_link.name == NULL) { ffc057f4: 2f 83 00 00 cmpwi cr7,r3,0 IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); /* * Duplicate link name */ info.sym_link.name = strdup(link_name); ffc057f8: 90 61 00 10 stw r3,16(r1) if (info.sym_link.name == NULL) { ffc057fc: 41 9e 00 54 beq- cr7,ffc05850 <== NEVER TAKEN * 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. */ new_node = IMFS_create_node( ffc05800: 38 c0 00 00 li r6,0 ffc05804: 7f a3 eb 78 mr r3,r29 ffc05808: 7f e5 fb 78 mr r5,r31 ffc0580c: 60 c6 a1 ff ori r6,r6,41471 ffc05810: 38 80 00 04 li r4,4 ffc05814: 38 e1 00 10 addi r7,r1,16 ffc05818: 48 00 da 5d bl ffc13274 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { ffc0581c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05820: 38 60 00 00 li r3,0 ffc05824: 41 9e 00 24 beq- cr7,ffc05848 <== NEVER TAKEN free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } ffc05828: 80 01 00 6c lwz r0,108(r1) ffc0582c: 83 81 00 58 lwz r28,88(r1) ffc05830: 7c 08 03 a6 mtlr r0 ffc05834: 83 a1 00 5c lwz r29,92(r1) ffc05838: 83 c1 00 60 lwz r30,96(r1) ffc0583c: 83 e1 00 64 lwz r31,100(r1) ffc05840: 38 21 00 68 addi r1,r1,104 ffc05844: 4e 80 00 20 blr ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name); ffc05848: 80 61 00 10 lwz r3,16(r1) <== NOT EXECUTED ffc0584c: 48 00 08 e1 bl ffc0612c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); ffc05850: 48 01 47 11 bl ffc19f60 <__errno> <== NOT EXECUTED ffc05854: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc05858: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0585c: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc05860: 4b ff ff c8 b ffc05828 <== NOT EXECUTED =============================================================================== ffc05864 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { ffc05864: 94 21 ff c8 stwu r1,-56(r1) ffc05868: 7c 08 02 a6 mflr r0 ffc0586c: 90 01 00 3c stw r0,60(r1) ffc05870: 93 c1 00 30 stw r30,48(r1) IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; ffc05874: 83 c4 00 00 lwz r30,0(r4) int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { ffc05878: 93 a1 00 2c stw r29,44(r1) ffc0587c: 7c 7d 1b 78 mr r29,r3 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { ffc05880: 80 1e 00 4c lwz r0,76(r30) int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { ffc05884: 93 e1 00 34 stw r31,52(r1) ffc05888: 7c 9f 23 78 mr r31,r4 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { ffc0588c: 2f 80 00 03 cmpwi cr7,r0,3 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { ffc05890: 93 81 00 28 stw r28,40(r1) /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { ffc05894: 41 9e 00 3c beq- cr7,ffc058d0 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); ffc05898: 81 3f 00 08 lwz r9,8(r31) ffc0589c: 7f a3 eb 78 mr r3,r29 ffc058a0: 7f e4 fb 78 mr r4,r31 ffc058a4: 80 09 00 34 lwz r0,52(r9) ffc058a8: 7c 09 03 a6 mtctr r0 ffc058ac: 4e 80 04 21 bctrl return result; } ffc058b0: 80 01 00 3c lwz r0,60(r1) ffc058b4: 83 81 00 28 lwz r28,40(r1) ffc058b8: 7c 08 03 a6 mtlr r0 ffc058bc: 83 a1 00 2c lwz r29,44(r1) ffc058c0: 83 c1 00 30 lwz r30,48(r1) ffc058c4: 83 e1 00 34 lwz r31,52(r1) ffc058c8: 38 21 00 38 addi r1,r1,56 ffc058cc: 4e 80 00 20 blr * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) ffc058d0: 80 1e 00 50 lwz r0,80(r30) ffc058d4: 2f 80 00 00 cmpwi cr7,r0,0 ffc058d8: 41 9e 00 90 beq- cr7,ffc05968 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; the_link.node_access = node->info.hard_link.link_node; ffc058dc: 7c 3c 0b 78 mr r28,r1 ffc058e0: 94 1c 00 10 stwu r0,16(r28) if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; ffc058e4: 81 64 00 08 lwz r11,8(r4) the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); ffc058e8: 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; ffc058ec: 81 24 00 0c lwz r9,12(r4) ffc058f0: 81 44 00 04 lwz r10,4(r4) ffc058f4: 80 04 00 10 lwz r0,16(r4) ffc058f8: 91 61 00 18 stw r11,24(r1) ffc058fc: 91 21 00 1c stw r9,28(r1) ffc05900: 91 41 00 14 stw r10,20(r1) ffc05904: 90 01 00 20 stw r0,32(r1) the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); ffc05908: 48 00 da f1 bl ffc133f8 /* * 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) ffc0590c: 81 3e 00 50 lwz r9,80(r30) ffc05910: a1 69 00 34 lhz r11,52(r9) ffc05914: 2f 8b 00 01 cmpwi cr7,r11,1 ffc05918: 41 9e 00 28 beq- cr7,ffc05940 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; ffc0591c: 39 6b ff ff addi r11,r11,-1 ffc05920: b1 69 00 34 sth r11,52(r9) IMFS_update_ctime( node->info.hard_link.link_node ); ffc05924: 38 61 00 08 addi r3,r1,8 ffc05928: 38 80 00 00 li r4,0 ffc0592c: 48 00 08 c9 bl ffc061f4 ffc05930: 81 3e 00 50 lwz r9,80(r30) ffc05934: 80 01 00 08 lwz r0,8(r1) ffc05938: 90 09 00 48 stw r0,72(r9) ffc0593c: 4b ff ff 5c b ffc05898 * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); ffc05940: 81 21 00 18 lwz r9,24(r1) ffc05944: 7f 84 e3 78 mr r4,r28 ffc05948: 7f a3 eb 78 mr r3,r29 ffc0594c: 80 09 00 34 lwz r0,52(r9) ffc05950: 7c 09 03 a6 mtctr r0 ffc05954: 4e 80 04 21 bctrl if ( result != 0 ) ffc05958: 2f 83 00 00 cmpwi cr7,r3,0 ffc0595c: 38 60 ff ff li r3,-1 ffc05960: 41 9e ff 38 beq+ cr7,ffc05898 ffc05964: 4b ff ff 4c b ffc058b0 */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc05968: 48 01 45 f9 bl ffc19f60 <__errno> <== NOT EXECUTED ffc0596c: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc05970: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc05974: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc05978: 4b ff ff 38 b ffc058b0 <== NOT EXECUTED =============================================================================== ffc0597c : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { ffc0597c: 7c 08 02 a6 mflr r0 ffc05980: 94 21 ff f8 stwu r1,-8(r1) ffc05984: 90 01 00 0c stw r0,12(r1) IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; ffc05988: 81 23 00 08 lwz r9,8(r3) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) ffc0598c: 80 09 00 4c lwz r0,76(r9) ffc05990: 2f 80 00 01 cmpwi cr7,r0,1 ffc05994: 40 9e 00 2c bne- cr7,ffc059c0 <== NEVER TAKEN /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) ffc05998: 80 09 00 5c lwz r0,92(r9) ffc0599c: 2f 80 00 00 cmpwi cr7,r0,0 ffc059a0: 41 9e 00 34 beq- cr7,ffc059d4 <== NEVER TAKEN /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; ffc059a4: 38 00 00 00 li r0,0 ffc059a8: 90 09 00 5c stw r0,92(r9) ffc059ac: 38 60 00 00 li r3,0 return 0; } ffc059b0: 80 01 00 0c lwz r0,12(r1) ffc059b4: 38 21 00 08 addi r1,r1,8 ffc059b8: 7c 08 03 a6 mtlr r0 ffc059bc: 4e 80 00 20 blr /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc059c0: 48 01 45 a1 bl ffc19f60 <__errno> <== NOT EXECUTED ffc059c4: 38 00 00 14 li r0,20 <== NOT EXECUTED ffc059c8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc059cc: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc059d0: 4b ff ff e0 b ffc059b0 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ ffc059d4: 48 01 45 8d bl ffc19f60 <__errno> <== NOT EXECUTED ffc059d8: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc059dc: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc059e0: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc059e4: 4b ff ff cc b ffc059b0 <== NOT EXECUTED =============================================================================== ffc04858 : #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { ffc04858: 3d 20 00 00 lis r9,0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { ffc0485c: 94 21 ff e8 stwu r1,-24(r1) ffc04860: 7c 08 02 a6 mflr r0 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { ffc04864: 81 29 27 08 lwz r9,9992(r9) void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { ffc04868: 93 a1 00 0c stw r29,12(r1) ffc0486c: 7c 9d 23 78 mr r29,r4 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { ffc04870: 2f 89 00 00 cmpwi cr7,r9,0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { ffc04874: 93 c1 00 10 stw r30,16(r1) ffc04878: 7c 7e 1b 78 mr r30,r3 ffc0487c: 93 e1 00 14 stw r31,20(r1) ffc04880: 7c bf 2b 78 mr r31,r5 ffc04884: 90 01 00 1c stw r0,28(r1) ffc04888: 93 81 00 08 stw r28,8(r1) #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { ffc0488c: 41 9e 00 10 beq- cr7,ffc0489c <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->initialize)(); ffc04890: 80 09 00 00 lwz r0,0(r9) <== NOT EXECUTED ffc04894: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc04898: 4e 80 04 21 bctrl <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); ffc0489c: 4b ff ff 2d bl ffc047c8 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { ffc048a0: 3d 20 00 00 lis r9,0 ffc048a4: 81 29 27 0c lwz r9,9996(r9) ffc048a8: 2f 89 00 00 cmpwi cr7,r9,0 ffc048ac: 41 9e 00 24 beq- cr7,ffc048d0 <== ALWAYS TAKEN void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( ffc048b0: 80 09 00 00 lwz r0,0(r9) <== NOT EXECUTED ffc048b4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc048b8: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc048bc: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; ffc048c0: 7f be ea 14 add r29,r30,r29 <== NOT EXECUTED /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( ffc048c4: 4e 80 04 21 bctrl <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; ffc048c8: 7f a3 e8 50 subf r29,r3,r29 <== NOT EXECUTED ffc048cc: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( ffc048d0: 3f 80 00 00 lis r28,0 ffc048d4: 88 1c 27 05 lbz r0,9989(r28) ffc048d8: 3f e0 00 00 lis r31,0 ffc048dc: 2f 80 00 00 cmpwi cr7,r0,0 ffc048e0: 40 9e 00 34 bne- cr7,ffc04914 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ffc048e4: 3d 20 00 00 lis r9,0 ffc048e8: 88 09 20 c8 lbz r0,8392(r9) ffc048ec: 2f 80 00 00 cmpwi cr7,r0,0 ffc048f0: 40 9e 00 5c bne- cr7,ffc0494c void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); ffc048f4: 3f e0 00 00 lis r31,0 ffc048f8: 80 7f 26 9c lwz r3,9884(r31) ffc048fc: 7f c4 f3 78 mr r4,r30 ffc04900: 7f a5 eb 78 mr r5,r29 ffc04904: 38 c0 00 08 li r6,8 ffc04908: 48 00 52 6d bl ffc09b74 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { ffc0490c: 2f 83 00 00 cmpwi cr7,r3,0 ffc04910: 41 9e 00 5c beq- cr7,ffc0496c <== NEVER TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); ffc04914: 80 7f 26 9c lwz r3,9884(r31) ffc04918: 3f e0 00 00 lis r31,0 ffc0491c: 83 df 2b 00 lwz r30,11008(r31) ffc04920: 48 00 61 09 bl ffc0aa28 <_Protected_heap_Get_size> printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } ffc04924: 80 01 00 1c lwz r0,28(r1) if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); ffc04928: 7c 63 f2 14 add r3,r3,r30 printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } ffc0492c: 83 81 00 08 lwz r28,8(r1) ffc04930: 7c 08 03 a6 mtlr r0 if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); ffc04934: 90 7f 2b 00 stw r3,11008(r31) printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } ffc04938: 83 a1 00 0c lwz r29,12(r1) ffc0493c: 83 c1 00 10 lwz r30,16(r1) ffc04940: 83 e1 00 14 lwz r31,20(r1) ffc04944: 38 21 00 18 addi r1,r1,24 ffc04948: 4e 80 00 20 blr if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); ffc0494c: 7f c3 f3 78 mr r3,r30 ffc04950: 38 80 00 00 li r4,0 ffc04954: 7f a5 eb 78 mr r5,r29 ffc04958: 48 00 f6 05 bl ffc13f5c * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { ffc0495c: 88 1c 27 05 lbz r0,9989(r28) ffc04960: 2f 80 00 00 cmpwi cr7,r0,0 ffc04964: 41 9e ff 90 beq+ cr7,ffc048f4 <== ALWAYS TAKEN ffc04968: 4b ff ff ac b ffc04914 <== NOT EXECUTED heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); ffc0496c: 38 60 00 1a li r3,26 <== NOT EXECUTED ffc04970: 48 00 46 c9 bl ffc09038 <== NOT EXECUTED =============================================================================== ffc03c38 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc03c38: 7d 80 00 26 mfcr r12 <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) ffc03c3c: 2e 03 00 00 cmpwi cr4,r3,0 <== NOT EXECUTED static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc03c40: 94 21 ff c0 stwu r1,-64(r1) <== NOT EXECUTED ffc03c44: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc03c48: 93 01 00 20 stw r24,32(r1) <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) ffc03c4c: 7c 78 1b 78 mr r24,r3 <== NOT EXECUTED static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc03c50: 90 01 00 44 stw r0,68(r1) <== NOT EXECUTED ffc03c54: 92 e1 00 1c stw r23,28(r1) <== NOT EXECUTED ffc03c58: 93 21 00 24 stw r25,36(r1) <== NOT EXECUTED ffc03c5c: 93 41 00 28 stw r26,40(r1) <== NOT EXECUTED ffc03c60: 93 61 00 2c stw r27,44(r1) <== NOT EXECUTED ffc03c64: 93 81 00 30 stw r28,48(r1) <== NOT EXECUTED ffc03c68: 93 a1 00 34 stw r29,52(r1) <== NOT EXECUTED ffc03c6c: 93 c1 00 38 stw r30,56(r1) <== NOT EXECUTED ffc03c70: 93 e1 00 3c stw r31,60(r1) <== NOT EXECUTED ffc03c74: 91 81 00 18 stw r12,24(r1) <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) ffc03c78: 41 92 00 fc beq- cr4,ffc03d74 <== NOT EXECUTED return; if ( !print_handler ) ffc03c7c: 3f a0 00 00 lis r29,0 <== NOT EXECUTED ffc03c80: 3b fd 28 84 addi r31,r29,10372 <== NOT EXECUTED ffc03c84: 83 5f 00 04 lwz r26,4(r31) <== NOT EXECUTED ffc03c88: 2f 9a 00 00 cmpwi cr7,r26,0 <== NOT EXECUTED ffc03c8c: 41 9e 00 e8 beq- cr7,ffc03d74 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { ffc03c90: 2f 83 ff ff cmpwi cr7,r3,-1 <== NOT EXECUTED ffc03c94: 41 9e 01 74 beq- cr7,ffc03e08 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; ffc03c98: 3b 63 00 cc addi r27,r3,204 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); ffc03c9c: 83 23 00 dc lwz r25,220(r3) <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); ffc03ca0: 82 fb 00 04 lwz r23,4(r27) <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); ffc03ca4: 83 9b 00 00 lwz r28,0(r27) <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); ffc03ca8: 3a f7 00 80 addi r23,r23,128 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); ffc03cac: 3b 9c ff 80 addi r28,r28,-128 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); ffc03cb0: 7e e3 bb 78 mr r3,r23 <== NOT EXECUTED ffc03cb4: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED ffc03cb8: 4b ff ff 31 bl ffc03be8 <== NOT EXECUTED if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); ffc03cbc: 7f d7 e2 14 add r30,r23,r28 <== 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 ) ffc03cc0: 7c 69 fe 70 srawi r9,r3,31 <== NOT EXECUTED ffc03cc4: 7d 20 1a 78 xor r0,r9,r3 <== NOT EXECUTED ffc03cc8: 7c 00 48 50 subf r0,r0,r9 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); ffc03ccc: 7f c3 f0 50 subf r30,r3,r30 <== 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 ) ffc03cd0: 7c 00 fe 70 srawi r0,r0,31 <== NOT EXECUTED ffc03cd4: 7f de 00 38 and r30,r30,r0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { ffc03cd8: 41 92 01 8c beq- cr4,ffc03e64 <== NOT EXECUTED (*print_handler)( ffc03cdc: 83 18 00 08 lwz r24,8(r24) <== NOT EXECUTED ffc03ce0: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED ffc03ce4: 82 ff 00 08 lwz r23,8(r31) <== NOT EXECUTED ffc03ce8: 38 80 00 05 li r4,5 <== NOT EXECUTED ffc03cec: 7f 03 c3 78 mr r3,r24 <== NOT EXECUTED ffc03cf0: 48 00 49 a1 bl ffc08690 <== NOT EXECUTED ffc03cf4: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc03cf8: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED ffc03cfc: 7f 49 03 a6 mtctr r26 <== NOT EXECUTED ffc03d00: 7e e3 bb 78 mr r3,r23 <== NOT EXECUTED ffc03d04: 38 84 f6 ac addi r4,r4,-2388 <== NOT EXECUTED ffc03d08: 7f 05 c3 78 mr r5,r24 <== NOT EXECUTED ffc03d0c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc03d10: 4e 80 04 21 bctrl <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( ffc03d14: 80 db 00 00 lwz r6,0(r27) <== NOT EXECUTED ffc03d18: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc03d1c: 80 1f 00 04 lwz r0,4(r31) <== NOT EXECUTED ffc03d20: 38 84 f6 cc addi r4,r4,-2356 <== NOT EXECUTED ffc03d24: 80 bb 00 04 lwz r5,4(r27) <== NOT EXECUTED ffc03d28: 38 c6 ff ff addi r6,r6,-1 <== NOT EXECUTED ffc03d2c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc03d30: 7f 27 cb 78 mr r7,r25 <== NOT EXECUTED ffc03d34: 7c c5 32 14 add r6,r5,r6 <== NOT EXECUTED ffc03d38: 80 7f 00 08 lwz r3,8(r31) <== NOT EXECUTED ffc03d3c: 7f 88 e3 78 mr r8,r28 <== NOT EXECUTED ffc03d40: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc03d44: 4e 80 04 21 bctrl <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { ffc03d48: 80 1d 28 84 lwz r0,10372(r29) <== NOT EXECUTED ffc03d4c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc03d50: 41 9e 00 60 beq- cr7,ffc03db0 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); ffc03d54: 80 1f 00 04 lwz r0,4(r31) <== NOT EXECUTED ffc03d58: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc03d5c: 80 7f 00 08 lwz r3,8(r31) <== NOT EXECUTED ffc03d60: 38 84 f6 fc addi r4,r4,-2308 <== NOT EXECUTED ffc03d64: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED ffc03d68: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc03d6c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc03d70: 4e 80 04 21 bctrl <== NOT EXECUTED } } ffc03d74: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED ffc03d78: 81 81 00 18 lwz r12,24(r1) <== NOT EXECUTED ffc03d7c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc03d80: 82 e1 00 1c lwz r23,28(r1) <== NOT EXECUTED ffc03d84: 83 01 00 20 lwz r24,32(r1) <== NOT EXECUTED ffc03d88: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED ffc03d8c: 83 21 00 24 lwz r25,36(r1) <== NOT EXECUTED ffc03d90: 83 41 00 28 lwz r26,40(r1) <== NOT EXECUTED ffc03d94: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc03d98: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc03d9c: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc03da0: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc03da4: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc03da8: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc03dac: 4e 80 00 20 blr <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); ffc03db0: 80 1f 00 04 lwz r0,4(r31) <== NOT EXECUTED ffc03db4: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc03db8: 80 7f 00 08 lwz r3,8(r31) <== NOT EXECUTED ffc03dbc: 38 84 f6 ec addi r4,r4,-2324 <== NOT EXECUTED ffc03dc0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc03dc4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc03dc8: 4e 80 04 21 bctrl <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } ffc03dcc: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED ffc03dd0: 81 81 00 18 lwz r12,24(r1) <== NOT EXECUTED ffc03dd4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc03dd8: 82 e1 00 1c lwz r23,28(r1) <== NOT EXECUTED ffc03ddc: 83 01 00 20 lwz r24,32(r1) <== NOT EXECUTED ffc03de0: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED ffc03de4: 83 21 00 24 lwz r25,36(r1) <== NOT EXECUTED ffc03de8: 83 41 00 28 lwz r26,40(r1) <== NOT EXECUTED ffc03dec: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc03df0: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc03df4: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc03df8: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc03dfc: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc03e00: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc03e04: 4e 80 00 20 blr <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { ffc03e08: 3f 60 00 00 lis r27,0 <== NOT EXECUTED ffc03e0c: 3b 7b 27 48 addi r27,r27,10056 <== NOT EXECUTED ffc03e10: 80 1b 00 04 lwz r0,4(r27) <== NOT EXECUTED ffc03e14: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc03e18: 41 be ff 5c beq- cr7,ffc03d74 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); ffc03e1c: 82 fb 00 04 lwz r23,4(r27) <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { ffc03e20: 3b 20 00 00 li r25,0 <== NOT EXECUTED stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); ffc03e24: 83 9b 00 00 lwz r28,0(r27) <== NOT EXECUTED ffc03e28: 2e 19 00 00 cmpwi cr4,r25,0 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); ffc03e2c: 3a f7 00 80 addi r23,r23,128 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); ffc03e30: 3b 9c ff 80 addi r28,r28,-128 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); ffc03e34: 7e e3 bb 78 mr r3,r23 <== NOT EXECUTED ffc03e38: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED ffc03e3c: 4b ff fd ad bl ffc03be8 <== NOT EXECUTED if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); ffc03e40: 7f d7 e2 14 add r30,r23,r28 <== 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 ) ffc03e44: 7c 69 fe 70 srawi r9,r3,31 <== NOT EXECUTED ffc03e48: 7d 20 1a 78 xor r0,r9,r3 <== NOT EXECUTED ffc03e4c: 7c 00 48 50 subf r0,r0,r9 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); ffc03e50: 7f c3 f0 50 subf r30,r3,r30 <== 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 ) ffc03e54: 7c 00 fe 70 srawi r0,r0,31 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { ffc03e58: 3b 00 00 00 li r24,0 <== 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 ) ffc03e5c: 7f de 00 38 and r30,r30,r0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { ffc03e60: 40 92 fe 7c bne+ cr4,ffc03cdc <== NOT EXECUTED "0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); ffc03e64: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc03e68: 80 7f 00 08 lwz r3,8(r31) <== NOT EXECUTED ffc03e6c: 38 84 f6 bc addi r4,r4,-2372 <== NOT EXECUTED ffc03e70: 7f 49 03 a6 mtctr r26 <== NOT EXECUTED ffc03e74: 38 a0 ff ff li r5,-1 <== NOT EXECUTED ffc03e78: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc03e7c: 4e 80 04 21 bctrl <== NOT EXECUTED ffc03e80: 4b ff fe 94 b ffc03d14 <== NOT EXECUTED =============================================================================== ffc03be8 : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; ffc03be8: 39 23 00 80 addi r9,r3,128 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) ffc03bec: 54 8b 00 3a rlwinm r11,r4,0,0,29 <== NOT EXECUTED ffc03bf0: 7d 69 5a 14 add r11,r9,r11 <== NOT EXECUTED ffc03bf4: 7f 89 58 40 cmplw cr7,r9,r11 <== NOT EXECUTED ffc03bf8: 40 9c 00 30 bge- cr7,ffc03c28 <== NOT EXECUTED if (*base != U32_PATTERN) ffc03bfc: 81 43 00 80 lwz r10,128(r3) <== NOT EXECUTED ffc03c00: 6d 40 5a 5a xoris r0,r10,23130 <== NOT EXECUTED ffc03c04: 2f 80 a5 a5 cmpwi cr7,r0,-23131 <== NOT EXECUTED ffc03c08: 41 9e 00 14 beq- cr7,ffc03c1c <== NOT EXECUTED ffc03c0c: 48 00 00 24 b ffc03c30 <== NOT EXECUTED ffc03c10: 80 09 00 00 lwz r0,0(r9) <== NOT EXECUTED ffc03c14: 7f 80 50 00 cmpw cr7,r0,r10 <== NOT EXECUTED ffc03c18: 40 9e 00 18 bne- cr7,ffc03c30 <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) ffc03c1c: 39 29 00 04 addi r9,r9,4 <== NOT EXECUTED ffc03c20: 7f 8b 48 40 cmplw cr7,r11,r9 <== NOT EXECUTED ffc03c24: 41 9d ff ec bgt+ cr7,ffc03c10 <== NOT EXECUTED ffc03c28: 38 60 00 00 li r3,0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } ffc03c2c: 4e 80 00 20 blr <== NOT EXECUTED */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) return (void *) base; ffc03c30: 7d 23 4b 78 mr r3,r9 <== NOT EXECUTED ffc03c34: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc03f2c : * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { ffc03f2c: 94 21 ff c8 stwu r1,-56(r1) ffc03f30: 7c 08 02 a6 mflr r0 ffc03f34: 93 a1 00 2c stw r29,44(r1) ffc03f38: 7c 7d 1b 78 mr r29,r3 Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); char name [32]; printk("BLOWN STACK!!!\n"); ffc03f3c: 3c 60 ff c2 lis r3,-62 * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { ffc03f40: 90 01 00 3c stw r0,60(r1) Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); char name [32]; printk("BLOWN STACK!!!\n"); ffc03f44: 38 63 f7 68 addi r3,r3,-2200 * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { ffc03f48: 93 c1 00 30 stw r30,48(r1) ffc03f4c: 93 e1 00 34 stw r31,52(r1) ffc03f50: 7c 9f 23 78 mr r31,r4 Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); ffc03f54: 83 dd 00 d0 lwz r30,208(r29) char name [32]; printk("BLOWN STACK!!!\n"); ffc03f58: 4c c6 31 82 crclr 4*cr1+eq ffc03f5c: 48 00 1a 45 bl ffc059a0 printk("task control block: 0x%08" PRIxPTR "\n", running); ffc03f60: 3c 60 ff c2 lis r3,-62 ffc03f64: 38 63 f7 78 addi r3,r3,-2184 ffc03f68: 7f a4 eb 78 mr r4,r29 ffc03f6c: 4c c6 31 82 crclr 4*cr1+eq ffc03f70: 48 00 1a 31 bl ffc059a0 printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); ffc03f74: 80 9d 00 08 lwz r4,8(r29) ffc03f78: 3c 60 ff c2 lis r3,-62 ffc03f7c: 38 63 f7 98 addi r3,r3,-2152 ffc03f80: 4c c6 31 82 crclr 4*cr1+eq ffc03f84: 48 00 1a 1d bl ffc059a0 printk( ffc03f88: 80 9d 00 0c lwz r4,12(r29) ffc03f8c: 3c 60 ff c2 lis r3,-62 ffc03f90: 38 63 f7 ac addi r3,r3,-2132 ffc03f94: 4c c6 31 82 crclr 4*cr1+eq ffc03f98: 48 00 1a 09 bl ffc059a0 "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( ffc03f9c: 80 7d 00 08 lwz r3,8(r29) ffc03fa0: 38 a1 00 08 addi r5,r1,8 ffc03fa4: 38 80 00 20 li r4,32 ffc03fa8: 48 00 46 e9 bl ffc08690 ffc03fac: 7c 64 1b 78 mr r4,r3 ffc03fb0: 3c 60 ff c2 lis r3,-62 ffc03fb4: 38 63 f7 c0 addi r3,r3,-2112 ffc03fb8: 4c c6 31 82 crclr 4*cr1+eq ffc03fbc: 48 00 19 e5 bl ffc059a0 "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( ffc03fc0: 80 9d 00 cc lwz r4,204(r29) ffc03fc4: 80 bd 00 d0 lwz r5,208(r29) ffc03fc8: 3c 60 ff c2 lis r3,-62 ffc03fcc: 38 63 f7 d8 addi r3,r3,-2088 ffc03fd0: 7c c5 22 14 add r6,r5,r4 ffc03fd4: 4c c6 31 82 crclr 4*cr1+eq ffc03fd8: 48 00 19 c9 bl ffc059a0 "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) { ffc03fdc: 2f 9f 00 00 cmpwi cr7,r31,0 ffc03fe0: 41 9e 00 0c beq- cr7,ffc03fec <== ALWAYS TAKEN rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); ffc03fe4: 38 60 00 81 li r3,129 ffc03fe8: 48 00 52 ed bl ffc092d4 (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( ffc03fec: 3c 60 ff c2 lis r3,-62 ffc03ff0: 38 63 f8 0c addi r3,r3,-2036 ffc03ff4: 38 de 00 88 addi r6,r30,136 ffc03ff8: 38 80 00 80 li r4,128 ffc03ffc: 38 be 00 08 addi r5,r30,8 ffc04000: 4c c6 31 82 crclr 4*cr1+eq ffc04004: 48 00 19 9d bl ffc059a0 ffc04008: 4b ff ff dc b ffc03fe4 =============================================================================== ffc0de94 : *************************************************************************/ int Untar_FromFile( const char *tar_name ) { ffc0de94: 94 21 fe f0 stwu r1,-272(r1) <== NOT EXECUTED ffc0de98: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc0de9c: 93 a1 01 04 stw r29,260(r1) <== NOT EXECUTED ffc0dea0: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED unsigned long size; unsigned char linkflag; retval = UNTAR_SUCCESSFUL; bufr = (char *)malloc(512); ffc0dea4: 38 60 02 00 li r3,512 <== NOT EXECUTED *************************************************************************/ int Untar_FromFile( const char *tar_name ) { ffc0dea8: 93 c1 01 08 stw r30,264(r1) <== NOT EXECUTED unsigned char linkflag; retval = UNTAR_SUCCESSFUL; bufr = (char *)malloc(512); if (bufr == NULL) ffc0deac: 3b c0 00 01 li r30,1 <== NOT EXECUTED *************************************************************************/ int Untar_FromFile( const char *tar_name ) { ffc0deb0: 93 e1 01 0c stw r31,268(r1) <== NOT EXECUTED ffc0deb4: 90 01 01 14 stw r0,276(r1) <== NOT EXECUTED ffc0deb8: 92 41 00 d8 stw r18,216(r1) <== NOT EXECUTED ffc0debc: 92 61 00 dc stw r19,220(r1) <== NOT EXECUTED ffc0dec0: 92 81 00 e0 stw r20,224(r1) <== NOT EXECUTED ffc0dec4: 92 a1 00 e4 stw r21,228(r1) <== NOT EXECUTED ffc0dec8: 92 c1 00 e8 stw r22,232(r1) <== NOT EXECUTED ffc0decc: 92 e1 00 ec stw r23,236(r1) <== NOT EXECUTED ffc0ded0: 93 01 00 f0 stw r24,240(r1) <== NOT EXECUTED ffc0ded4: 93 21 00 f4 stw r25,244(r1) <== NOT EXECUTED ffc0ded8: 93 41 00 f8 stw r26,248(r1) <== NOT EXECUTED ffc0dedc: 93 61 00 fc stw r27,252(r1) <== NOT EXECUTED ffc0dee0: 93 81 01 00 stw r28,256(r1) <== NOT EXECUTED unsigned long size; unsigned char linkflag; retval = UNTAR_SUCCESSFUL; bufr = (char *)malloc(512); ffc0dee4: 4b ff 7b 51 bl ffc05a34 <== NOT EXECUTED if (bufr == NULL) ffc0dee8: 7c 7f 1b 79 mr. r31,r3 <== NOT EXECUTED ffc0deec: 41 82 01 80 beq- ffc0e06c <== NOT EXECUTED { return(UNTAR_FAIL); } fd = open(tar_name, O_RDONLY); ffc0def0: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc0def4: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc0def8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc0defc: 4b ff 86 6d bl ffc06568 <== NOT EXECUTED if ((n = read(fd, bufr, 512)) != 512) { break; } if (strncmp(&bufr[257], "ustar ", 7)) ffc0df00: 3e c0 ff c2 lis r22,-62 <== NOT EXECUTED if (bufr == NULL) { return(UNTAR_FAIL); } fd = open(tar_name, O_RDONLY); ffc0df04: 7c 7c 1b 78 mr r28,r3 <== NOT EXECUTED if ((n = read(fd, bufr, 512)) != 512) { break; } if (strncmp(&bufr[257], "ustar ", 7)) ffc0df08: 3a d6 66 24 addi r22,r22,26148 <== NOT EXECUTED ffc0df0c: 3a ff 01 01 addi r23,r31,257 <== NOT EXECUTED { break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); ffc0df10: 3b 61 00 08 addi r27,r1,8 <== NOT EXECUTED ************************************************************************** * Change History: * * 12/30/1998 - Creation (JWJ) * *************************************************************************/ int Untar_FromFile( ffc0df14: 3b 1f 00 0c addi r24,r31,12 <== NOT EXECUTED ffc0df18: 3b 3f 00 08 addi r25,r31,8 <== NOT EXECUTED * We've decoded the header, now figure out what it contains and * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); ffc0df1c: 3a 81 00 6c addi r20,r1,108 <== NOT EXECUTED ffc0df20: 3a 5f 00 9d addi r18,r31,157 <== NOT EXECUTED linkname[MAX_NAME_FIELD_SIZE] = '\0'; ffc0df24: 3a 60 00 00 li r19,0 <== NOT EXECUTED while (1) { /* Read the header */ /* If the header read fails, we just consider it the end of the tarfile. */ if ((n = read(fd, bufr, 512)) != 512) ffc0df28: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc0df2c: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc0df30: 38 a0 02 00 li r5,512 <== NOT EXECUTED ffc0df34: 4b ff 89 f1 bl ffc06924 <== NOT EXECUTED ffc0df38: 2f 83 02 00 cmpwi cr7,r3,512 <== NOT EXECUTED ffc0df3c: 40 9e 01 1c bne- cr7,ffc0e058 <== NOT EXECUTED { break; } if (strncmp(&bufr[257], "ustar ", 7)) ffc0df40: 7e e3 bb 78 mr r3,r23 <== NOT EXECUTED ffc0df44: 7e c4 b3 78 mr r4,r22 <== NOT EXECUTED ffc0df48: 38 a0 00 07 li r5,7 <== NOT EXECUTED ffc0df4c: 48 00 a7 89 bl ffc186d4 <== NOT EXECUTED ffc0df50: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED ffc0df54: 40 82 01 04 bne- ffc0e058 <== NOT EXECUTED { break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); ffc0df58: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc0df5c: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc0df60: 38 a0 00 63 li r5,99 <== NOT EXECUTED ffc0df64: 48 00 a8 ad bl ffc18810 <== NOT EXECUTED ************************************************************************** * Change History: * * 12/30/1998 - Creation (JWJ) * *************************************************************************/ int Untar_FromFile( ffc0df68: 7c 1f c0 50 subf r0,r31,r24 <== NOT EXECUTED { break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); fname[MAX_NAME_FIELD_SIZE] = '\0'; ffc0df6c: 9b c1 00 6b stb r30,107(r1) <== NOT EXECUTED ************************************************************************** * Change History: * * 12/30/1998 - Creation (JWJ) * *************************************************************************/ int Untar_FromFile( ffc0df70: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); fname[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = bufr[156]; ffc0df74: 7f eb fb 78 mr r11,r31 <== NOT EXECUTED ffc0df78: 88 ff 00 9c lbz r7,156(r31) <== NOT EXECUTED ************************************************************************** * Change History: * * 12/30/1998 - Creation (JWJ) * *************************************************************************/ int Untar_FromFile( ffc0df7c: 7f e9 fb 78 mr r9,r31 <== NOT EXECUTED ffc0df80: 3b c0 00 00 li r30,0 <== NOT EXECUTED unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) ffc0df84: 89 49 00 7c lbz r10,124(r9) <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); ffc0df88: 57 c8 18 38 rlwinm r8,r30,3,0,28 <== NOT EXECUTED ffc0df8c: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) ffc0df90: 38 0a ff d0 addi r0,r10,-48 <== NOT EXECUTED ffc0df94: 54 0a 06 3e clrlwi r10,r0,24 <== NOT EXECUTED ffc0df98: 2b 8a 00 09 cmplwi cr7,r10,9 <== NOT EXECUTED ffc0df9c: 41 9d 00 08 bgt- cr7,ffc0dfa4 <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); ffc0dfa0: 7f c0 42 14 add r30,r0,r8 <== NOT EXECUTED { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) ffc0dfa4: 42 00 ff e0 bdnz+ ffc0df84 <== NOT EXECUTED ************************************************************************** * Change History: * * 12/30/1998 - Creation (JWJ) * *************************************************************************/ int Untar_FromFile( ffc0dfa8: 7c 1f c8 50 subf r0,r31,r25 <== NOT EXECUTED ffc0dfac: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0dfb0: 39 40 00 00 li r10,0 <== NOT EXECUTED unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) ffc0dfb4: 89 2b 00 94 lbz r9,148(r11) <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); ffc0dfb8: 55 48 18 38 rlwinm r8,r10,3,0,28 <== NOT EXECUTED ffc0dfbc: 39 6b 00 01 addi r11,r11,1 <== NOT EXECUTED unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) ffc0dfc0: 38 09 ff d0 addi r0,r9,-48 <== NOT EXECUTED ffc0dfc4: 54 09 06 3e clrlwi r9,r0,24 <== NOT EXECUTED ffc0dfc8: 2b 89 00 09 cmplwi cr7,r9,9 <== NOT EXECUTED ffc0dfcc: 41 9d 00 08 bgt- cr7,ffc0dfd4 <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); ffc0dfd0: 7d 40 42 14 add r10,r0,r8 <== NOT EXECUTED { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) ffc0dfd4: 42 00 ff e0 bdnz+ ffc0dfb4 <== NOT EXECUTED ffc0dfd8: 38 00 02 00 li r0,512 <== NOT EXECUTED ffc0dfdc: 39 60 00 00 li r11,0 <== NOT EXECUTED ffc0dfe0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0dfe4: 39 20 00 00 li r9,0 <== NOT EXECUTED ffc0dfe8: 48 00 00 10 b ffc0dff8 <== NOT EXECUTED sum = 0; for (i=0; i<512; i++) { if ((i >= 148) && (i < 156)) sum += 0xff & ' '; ffc0dfec: 39 6b 00 20 addi r11,r11,32 <== NOT EXECUTED ) { int i, sum; sum = 0; for (i=0; i<512; i++) ffc0dff0: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED ffc0dff4: 42 40 00 20 bdz- ffc0e014 <== NOT EXECUTED { if ((i >= 148) && (i < 156)) ffc0dff8: 38 09 ff 6c addi r0,r9,-148 <== NOT EXECUTED ffc0dffc: 2b 80 00 07 cmplwi cr7,r0,7 <== NOT EXECUTED ffc0e000: 40 bd ff ec ble- cr7,ffc0dfec <== NOT EXECUTED sum += 0xff & ' '; else sum += 0xff & bufr[i]; ffc0e004: 7c 1f 48 ae lbzx r0,r31,r9 <== NOT EXECUTED ) { int i, sum; sum = 0; for (i=0; i<512; i++) ffc0e008: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED { if ((i >= 148) && (i < 156)) sum += 0xff & ' '; else sum += 0xff & bufr[i]; ffc0e00c: 7d 6b 02 14 add r11,r11,r0 <== NOT EXECUTED ) { int i, sum; sum = 0; for (i=0; i<512; i++) ffc0e010: 42 00 ff e8 bdnz+ ffc0dff8 <== NOT EXECUTED * header, but the checksum field is substituted with blanks. ******************************************************************/ hdr_chksum = _rtems_octal2ulong(&bufr[148], 8); sum = _rtems_tar_header_checksum(bufr); if (sum != hdr_chksum) ffc0e014: 7f 8a 58 00 cmpw cr7,r10,r11 <== NOT EXECUTED ffc0e018: 40 9e 01 64 bne- cr7,ffc0e17c <== NOT EXECUTED /****************************************************************** * We've decoded the header, now figure out what it contains and * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) ffc0e01c: 2f 87 00 32 cmpwi cr7,r7,50 <== NOT EXECUTED ffc0e020: 41 9e 00 98 beq- cr7,ffc0e0b8 <== NOT EXECUTED { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); linkname[MAX_NAME_FIELD_SIZE] = '\0'; symlink(linkname,fname); } else if (linkflag == REGTYPE) ffc0e024: 2f 87 00 30 cmpwi cr7,r7,48 <== NOT EXECUTED ffc0e028: 41 9e 00 b4 beq- cr7,ffc0e0dc <== NOT EXECUTED write(out_fd, bufr, n); } close(out_fd); } } else if (linkflag == DIRTYPE) ffc0e02c: 2f 87 00 35 cmpwi cr7,r7,53 <== NOT EXECUTED ffc0e030: 40 9e fe f8 bne+ cr7,ffc0df28 <== NOT EXECUTED { mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO); ffc0e034: 38 80 01 ff li r4,511 <== NOT EXECUTED ffc0e038: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc0e03c: 4b ff 7b 3d bl ffc05b78 <== NOT EXECUTED while (1) { /* Read the header */ /* If the header read fails, we just consider it the end of the tarfile. */ if ((n = read(fd, bufr, 512)) != 512) ffc0e040: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc0e044: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc0e048: 38 a0 02 00 li r5,512 <== NOT EXECUTED ffc0e04c: 4b ff 88 d9 bl ffc06924 <== NOT EXECUTED ffc0e050: 2f 83 02 00 cmpwi cr7,r3,512 <== NOT EXECUTED ffc0e054: 41 9e fe ec beq+ cr7,ffc0df40 <== NOT EXECUTED close(out_fd); } } else if (linkflag == DIRTYPE) { mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO); ffc0e058: 3b c0 00 00 li r30,0 <== NOT EXECUTED } } free(bufr); ffc0e05c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0e060: 4b ff 70 85 bl ffc050e4 <== NOT EXECUTED close(fd); ffc0e064: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc0e068: 4b ff 69 69 bl ffc049d0 <== NOT EXECUTED return(retval); } ffc0e06c: 80 01 01 14 lwz r0,276(r1) <== NOT EXECUTED ffc0e070: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc0e074: 82 41 00 d8 lwz r18,216(r1) <== NOT EXECUTED ffc0e078: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0e07c: 82 61 00 dc lwz r19,220(r1) <== NOT EXECUTED ffc0e080: 82 81 00 e0 lwz r20,224(r1) <== NOT EXECUTED ffc0e084: 82 a1 00 e4 lwz r21,228(r1) <== NOT EXECUTED ffc0e088: 82 c1 00 e8 lwz r22,232(r1) <== NOT EXECUTED ffc0e08c: 82 e1 00 ec lwz r23,236(r1) <== NOT EXECUTED ffc0e090: 83 01 00 f0 lwz r24,240(r1) <== NOT EXECUTED ffc0e094: 83 21 00 f4 lwz r25,244(r1) <== NOT EXECUTED ffc0e098: 83 41 00 f8 lwz r26,248(r1) <== NOT EXECUTED ffc0e09c: 83 61 00 fc lwz r27,252(r1) <== NOT EXECUTED ffc0e0a0: 83 81 01 00 lwz r28,256(r1) <== NOT EXECUTED ffc0e0a4: 83 a1 01 04 lwz r29,260(r1) <== NOT EXECUTED ffc0e0a8: 83 c1 01 08 lwz r30,264(r1) <== NOT EXECUTED ffc0e0ac: 83 e1 01 0c lwz r31,268(r1) <== NOT EXECUTED ffc0e0b0: 38 21 01 10 addi r1,r1,272 <== NOT EXECUTED ffc0e0b4: 4e 80 00 20 blr <== NOT EXECUTED * We've decoded the header, now figure out what it contains and * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); ffc0e0b8: 7e 44 93 78 mr r4,r18 <== NOT EXECUTED ffc0e0bc: 7e 83 a3 78 mr r3,r20 <== NOT EXECUTED ffc0e0c0: 38 a0 00 63 li r5,99 <== NOT EXECUTED ffc0e0c4: 48 00 a7 4d bl ffc18810 <== NOT EXECUTED linkname[MAX_NAME_FIELD_SIZE] = '\0'; symlink(linkname,fname); ffc0e0c8: 7e 83 a3 78 mr r3,r20 <== NOT EXECUTED ffc0e0cc: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); linkname[MAX_NAME_FIELD_SIZE] = '\0'; ffc0e0d0: 9a 61 00 cf stb r19,207(r1) <== NOT EXECUTED symlink(linkname,fname); ffc0e0d4: 48 00 28 c1 bl ffc10994 <== NOT EXECUTED ffc0e0d8: 4b ff fe 50 b ffc0df28 <== NOT EXECUTED * Read out the data. There are nblocks of data where nblocks * is the size rounded to the nearest 512-byte boundary. *****************************************************************/ nblocks = (((size) + 511) & ~511) / 512; if ((out_fd = creat(fname, 0644)) == -1) ffc0e0dc: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc0e0e0: 38 80 01 a4 li r4,420 <== NOT EXECUTED ffc0e0e4: 48 00 7c 2d bl ffc15d10 <== NOT EXECUTED /****************************************************************** * Read out the data. There are nblocks of data where nblocks * is the size rounded to the nearest 512-byte boundary. *****************************************************************/ nblocks = (((size) + 511) & ~511) / 512; ffc0e0e8: 3b 5e 01 ff addi r26,r30,511 <== NOT EXECUTED if ((out_fd = creat(fname, 0644)) == -1) ffc0e0ec: 2f 83 ff ff cmpwi cr7,r3,-1 <== NOT EXECUTED /****************************************************************** * Read out the data. There are nblocks of data where nblocks * is the size rounded to the nearest 512-byte boundary. *****************************************************************/ nblocks = (((size) + 511) & ~511) / 512; ffc0e0f0: 57 5a ba 7e rlwinm r26,r26,23,9,31 <== NOT EXECUTED if ((out_fd = creat(fname, 0644)) == -1) ffc0e0f4: 7c 75 1b 78 mr r21,r3 <== NOT EXECUTED ffc0e0f8: 41 9e 00 58 beq- cr7,ffc0e150 <== NOT EXECUTED n = read(fd, bufr, 512); } } else { for (i=0; i <== NOT EXECUTED { n = read(fd, bufr, 512); ffc0e108: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc0e10c: 38 a0 02 00 li r5,512 <== NOT EXECUTED ffc0e110: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc0e114: 4b ff 88 11 bl ffc06924 <== NOT EXECUTED n = read(fd, bufr, 512); } } else { for (i=0; i <== NOT EXECUTED ffc0e130: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED ffc0e134: 48 00 29 fd bl ffc10b30 <== NOT EXECUTED n = read(fd, bufr, 512); } } else { for (i=0; i <== NOT EXECUTED { n = read(fd, bufr, 512); n = MIN(n, size - i*512); write(out_fd, bufr, n); } close(out_fd); ffc0e144: 7e a3 ab 78 mr r3,r21 <== NOT EXECUTED ffc0e148: 4b ff 68 89 bl ffc049d0 <== NOT EXECUTED ffc0e14c: 4b ff fd dc b ffc0df28 <== NOT EXECUTED *****************************************************************/ nblocks = (((size) + 511) & ~511) / 512; if ((out_fd = creat(fname, 0644)) == -1) { for (i=0; i <== NOT EXECUTED ffc0e158: 3b c0 00 00 li r30,0 <== NOT EXECUTED ffc0e15c: 3b de 00 01 addi r30,r30,1 <== NOT EXECUTED { n = read(fd, bufr, 512); ffc0e160: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc0e164: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc0e168: 38 a0 02 00 li r5,512 <== NOT EXECUTED ffc0e16c: 4b ff 87 b9 bl ffc06924 <== NOT EXECUTED *****************************************************************/ nblocks = (((size) + 511) & ~511) / 512; if ((out_fd = creat(fname, 0644)) == -1) { for (i=0; i <== NOT EXECUTED ffc0e178: 4b ff fd b0 b ffc0df28 <== NOT EXECUTED * header, but the checksum field is substituted with blanks. ******************************************************************/ hdr_chksum = _rtems_octal2ulong(&bufr[148], 8); sum = _rtems_tar_header_checksum(bufr); if (sum != hdr_chksum) ffc0e17c: 3b c0 00 02 li r30,2 <== NOT EXECUTED ffc0e180: 4b ff fe dc b ffc0e05c <== NOT EXECUTED =============================================================================== ffc0e184 : int Untar_FromMemory( void *tar_buf, size_t size ) { ffc0e184: 94 21 fe e8 stwu r1,-280(r1) ffc0e188: 7c 08 02 a6 mflr r0 ffc0e18c: 93 c1 01 10 stw r30,272(r1) FILE *fp; const char *tar_ptr = (const char *)tar_buf; ffc0e190: 3b c0 00 00 li r30,0 int Untar_FromMemory( void *tar_buf, size_t size ) { ffc0e194: 92 a1 00 ec stw r21,236(r1) ffc0e198: 7c 95 23 78 mr r21,r4 ffc0e19c: 93 e1 01 14 stw r31,276(r1) ptr = 0; while (1) { if (ptr + 512 > size) ffc0e1a0: 3b fe 02 00 addi r31,r30,512 ffc0e1a4: 7f 9f a8 40 cmplw cr7,r31,r21 int Untar_FromMemory( void *tar_buf, size_t size ) { ffc0e1a8: 92 01 00 d8 stw r16,216(r1) symlink(linkname, fname); } else if (linkflag == REGTYPE) { nblocks = (((file_size) + 511) & ~511) / 512; if ((fp = fopen(fname, "w")) == NULL) ffc0e1ac: 3e 00 ff c2 lis r16,-62 ffc0e1b0: 3a 10 66 2c addi r16,r16,26156 int Untar_FromMemory( void *tar_buf, size_t size ) { ffc0e1b4: 92 21 00 dc stw r17,220(r1) else if (linkflag == REGTYPE) { nblocks = (((file_size) + 511) & ~511) / 512; if ((fp = fopen(fname, "w")) == NULL) { printk("Untar: failed to create file %s\n", fname); ffc0e1b8: 3e 20 ff c2 lis r17,-62 ffc0e1bc: 3a 31 66 30 addi r17,r17,26160 int Untar_FromMemory( void *tar_buf, size_t size ) { ffc0e1c0: 92 41 00 e0 stw r18,224(r1) { len = ((sizeToGo < 512L)?(sizeToGo):(512L)); n = fwrite(&tar_ptr[ptr], 1, len, fp); if (n != len) { printk("untar: Error during write\n"); ffc0e1c4: 3e 40 ff c2 lis r18,-62 ffc0e1c8: 3a 52 66 54 addi r18,r18,26196 int Untar_FromMemory( void *tar_buf, size_t size ) { ffc0e1cc: 92 c1 00 f0 stw r22,240(r1) } /* Read the header */ bufr = &tar_ptr[ptr]; ptr += 512; if (strncmp(&bufr[257], "ustar ", 7)) ffc0e1d0: 3e c0 ff c2 lis r22,-62 ffc0e1d4: 3a d6 66 24 addi r22,r22,26148 int Untar_FromMemory( void *tar_buf, size_t size ) { ffc0e1d8: 92 61 00 e4 stw r19,228(r1) * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); linkname[MAX_NAME_FIELD_SIZE] = '\0'; ffc0e1dc: 3a 60 00 00 li r19,0 int Untar_FromMemory( void *tar_buf, size_t size ) { ffc0e1e0: 92 81 00 e8 stw r20,232(r1) * We've decoded the header, now figure out what it contains and * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); ffc0e1e4: 3a 81 00 6c addi r20,r1,108 int Untar_FromMemory( void *tar_buf, size_t size ) { ffc0e1e8: 92 e1 00 f4 stw r23,244(r1) ffc0e1ec: 7c 77 1b 78 mr r23,r3 ffc0e1f0: 93 41 01 00 stw r26,256(r1) { retval = UNTAR_SUCCESSFUL; break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); ffc0e1f4: 3b 41 00 08 addi r26,r1,8 int Untar_FromMemory( void *tar_buf, size_t size ) { ffc0e1f8: 90 01 01 1c stw r0,284(r1) ffc0e1fc: 93 01 00 f8 stw r24,248(r1) ffc0e200: 93 21 00 fc stw r25,252(r1) ffc0e204: 93 61 01 04 stw r27,260(r1) ffc0e208: 93 81 01 08 stw r28,264(r1) ffc0e20c: 93 a1 01 0c stw r29,268(r1) ptr = 0; while (1) { if (ptr + 512 > size) ffc0e210: 41 9d 01 0c bgt- cr7,ffc0e31c <== NEVER TAKEN retval = UNTAR_SUCCESSFUL; break; } /* Read the header */ bufr = &tar_ptr[ptr]; ffc0e214: 7f d7 f2 14 add r30,r23,r30 ptr += 512; if (strncmp(&bufr[257], "ustar ", 7)) ffc0e218: 38 7e 01 01 addi r3,r30,257 ffc0e21c: 7e c4 b3 78 mr r4,r22 ffc0e220: 38 a0 00 07 li r5,7 ffc0e224: 48 00 a4 b1 bl ffc186d4 ffc0e228: 7c 7d 1b 79 mr. r29,r3 ffc0e22c: 40 82 00 f0 bne- ffc0e31c { retval = UNTAR_SUCCESSFUL; break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); ffc0e230: 7f 43 d3 78 mr r3,r26 ffc0e234: 7f c4 f3 78 mr r4,r30 ffc0e238: 38 a0 00 63 li r5,99 ffc0e23c: 48 00 a5 d5 bl ffc18810 * UNTAR_INVALID_CHECKSUM for an invalid header checksum. * * UNTAR_INVALID_HEADER for an invalid header. * * * **************************************************************************/ int Untar_FromMemory( ffc0e240: 38 00 00 0c li r0,12 retval = UNTAR_SUCCESSFUL; break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); fname[MAX_NAME_FIELD_SIZE] = '\0'; ffc0e244: 9b a1 00 6b stb r29,107(r1) * UNTAR_INVALID_CHECKSUM for an invalid header checksum. * * UNTAR_INVALID_HEADER for an invalid header. * * * **************************************************************************/ int Untar_FromMemory( ffc0e248: 7c 09 03 a6 mtctr r0 } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); fname[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = bufr[156]; ffc0e24c: 7f cb f3 78 mr r11,r30 ffc0e250: 88 fe 00 9c lbz r7,156(r30) * UNTAR_INVALID_CHECKSUM for an invalid header checksum. * * UNTAR_INVALID_HEADER for an invalid header. * * * **************************************************************************/ int Untar_FromMemory( ffc0e254: 7f c9 f3 78 mr r9,r30 ffc0e258: 3b a0 00 00 li r29,0 unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) ffc0e25c: 89 49 00 7c lbz r10,124(r9) { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); ffc0e260: 57 a8 18 38 rlwinm r8,r29,3,0,28 ffc0e264: 39 29 00 01 addi r9,r9,1 unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) ffc0e268: 38 0a ff d0 addi r0,r10,-48 ffc0e26c: 54 0a 06 3e clrlwi r10,r0,24 ffc0e270: 2b 8a 00 09 cmplwi cr7,r10,9 ffc0e274: 41 9d 00 08 bgt- cr7,ffc0e27c { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); ffc0e278: 7f a0 42 14 add r29,r0,r8 { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) ffc0e27c: 42 00 ff e0 bdnz+ ffc0e25c * UNTAR_INVALID_CHECKSUM for an invalid header checksum. * * UNTAR_INVALID_HEADER for an invalid header. * * * **************************************************************************/ int Untar_FromMemory( ffc0e280: 38 00 00 08 li r0,8 ffc0e284: 7c 09 03 a6 mtctr r0 ffc0e288: 39 40 00 00 li r10,0 unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) ffc0e28c: 89 2b 00 94 lbz r9,148(r11) { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); ffc0e290: 55 48 18 38 rlwinm r8,r10,3,0,28 ffc0e294: 39 6b 00 01 addi r11,r11,1 unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) ffc0e298: 38 09 ff d0 addi r0,r9,-48 ffc0e29c: 54 09 06 3e clrlwi r9,r0,24 ffc0e2a0: 2b 89 00 09 cmplwi cr7,r9,9 ffc0e2a4: 41 9d 00 08 bgt- cr7,ffc0e2ac { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); ffc0e2a8: 7d 40 42 14 add r10,r0,r8 { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) ffc0e2ac: 42 00 ff e0 bdnz+ ffc0e28c ffc0e2b0: 38 00 02 00 li r0,512 ffc0e2b4: 39 60 00 00 li r11,0 ffc0e2b8: 7c 09 03 a6 mtctr r0 ffc0e2bc: 39 20 00 00 li r9,0 ffc0e2c0: 48 00 00 10 b ffc0e2d0 sum = 0; for (i=0; i<512; i++) { if ((i >= 148) && (i < 156)) sum += 0xff & ' '; ffc0e2c4: 39 6b 00 20 addi r11,r11,32 ) { int i, sum; sum = 0; for (i=0; i<512; i++) ffc0e2c8: 39 29 00 01 addi r9,r9,1 ffc0e2cc: 42 40 00 20 bdz- ffc0e2ec { if ((i >= 148) && (i < 156)) ffc0e2d0: 38 09 ff 6c addi r0,r9,-148 ffc0e2d4: 2b 80 00 07 cmplwi cr7,r0,7 ffc0e2d8: 40 bd ff ec ble- cr7,ffc0e2c4 sum += 0xff & ' '; else sum += 0xff & bufr[i]; ffc0e2dc: 7c 1e 48 ae lbzx r0,r30,r9 ) { int i, sum; sum = 0; for (i=0; i<512; i++) ffc0e2e0: 39 29 00 01 addi r9,r9,1 { if ((i >= 148) && (i < 156)) sum += 0xff & ' '; else sum += 0xff & bufr[i]; ffc0e2e4: 7d 6b 02 14 add r11,r11,r0 ) { int i, sum; sum = 0; for (i=0; i<512; i++) ffc0e2e8: 42 00 ff e8 bdnz+ ffc0e2d0 * header, but the checksum field is substituted with blanks. ******************************************************************/ hdr_chksum = _rtems_octal2ulong(&bufr[148], 8); sum = _rtems_tar_header_checksum(bufr); if (sum != hdr_chksum) ffc0e2ec: 7f 8a 58 00 cmpw cr7,r10,r11 ffc0e2f0: 40 9e 01 4c bne- cr7,ffc0e43c <== NEVER TAKEN /****************************************************************** * We've decoded the header, now figure out what it contains and * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) ffc0e2f4: 2f 87 00 32 cmpwi cr7,r7,50 ffc0e2f8: 41 9e 00 8c beq- cr7,ffc0e384 { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); linkname[MAX_NAME_FIELD_SIZE] = '\0'; symlink(linkname, fname); } else if (linkflag == REGTYPE) ffc0e2fc: 2f 87 00 30 cmpwi cr7,r7,48 ffc0e300: 41 9e 00 ac beq- cr7,ffc0e3ac sizeToGo -= n; } fclose(fp); } } else if (linkflag == DIRTYPE) ffc0e304: 2f 87 00 35 cmpwi cr7,r7,53 ffc0e308: 41 9e 00 68 beq- cr7,ffc0e370 <== ALWAYS TAKEN void *tar_buf, size_t size ) { FILE *fp; const char *tar_ptr = (const char *)tar_buf; ffc0e30c: 7f fe fb 78 mr r30,r31 <== NOT EXECUTED ptr = 0; while (1) { if (ptr + 512 > size) ffc0e310: 3b fe 02 00 addi r31,r30,512 ffc0e314: 7f 9f a8 40 cmplw cr7,r31,r21 ffc0e318: 40 9d fe fc ble+ cr7,ffc0e214 <== ALWAYS TAKEN fclose(fp); } } else if (linkflag == DIRTYPE) { mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO); ffc0e31c: 38 60 00 00 li r3,0 } } return(retval); } ffc0e320: 80 01 01 1c lwz r0,284(r1) ffc0e324: 82 01 00 d8 lwz r16,216(r1) ffc0e328: 7c 08 03 a6 mtlr r0 ffc0e32c: 82 21 00 dc lwz r17,220(r1) ffc0e330: 82 41 00 e0 lwz r18,224(r1) ffc0e334: 82 61 00 e4 lwz r19,228(r1) ffc0e338: 82 81 00 e8 lwz r20,232(r1) ffc0e33c: 82 a1 00 ec lwz r21,236(r1) ffc0e340: 82 c1 00 f0 lwz r22,240(r1) ffc0e344: 82 e1 00 f4 lwz r23,244(r1) ffc0e348: 83 01 00 f8 lwz r24,248(r1) ffc0e34c: 83 21 00 fc lwz r25,252(r1) ffc0e350: 83 41 01 00 lwz r26,256(r1) ffc0e354: 83 61 01 04 lwz r27,260(r1) ffc0e358: 83 81 01 08 lwz r28,264(r1) ffc0e35c: 83 a1 01 0c lwz r29,268(r1) ffc0e360: 83 c1 01 10 lwz r30,272(r1) ffc0e364: 83 e1 01 14 lwz r31,276(r1) ffc0e368: 38 21 01 18 addi r1,r1,280 ffc0e36c: 4e 80 00 20 blr fclose(fp); } } else if (linkflag == DIRTYPE) { mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO); ffc0e370: 7f 43 d3 78 mr r3,r26 ffc0e374: 38 80 01 ff li r4,511 ffc0e378: 4b ff 78 01 bl ffc05b78 void *tar_buf, size_t size ) { FILE *fp; const char *tar_ptr = (const char *)tar_buf; ffc0e37c: 7f fe fb 78 mr r30,r31 ffc0e380: 4b ff ff 90 b ffc0e310 * We've decoded the header, now figure out what it contains and * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); ffc0e384: 38 9e 00 9d addi r4,r30,157 ffc0e388: 38 a0 00 63 li r5,99 ffc0e38c: 7e 83 a3 78 mr r3,r20 ffc0e390: 48 00 a4 81 bl ffc18810 linkname[MAX_NAME_FIELD_SIZE] = '\0'; symlink(linkname, fname); ffc0e394: 7e 83 a3 78 mr r3,r20 ffc0e398: 7f 44 d3 78 mr r4,r26 * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); linkname[MAX_NAME_FIELD_SIZE] = '\0'; ffc0e39c: 9a 61 00 cf stb r19,207(r1) void *tar_buf, size_t size ) { FILE *fp; const char *tar_ptr = (const char *)tar_buf; ffc0e3a0: 7f fe fb 78 mr r30,r31 *****************************************************************/ if (linkflag == SYMTYPE) { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); linkname[MAX_NAME_FIELD_SIZE] = '\0'; symlink(linkname, fname); ffc0e3a4: 48 00 25 f1 bl ffc10994 ffc0e3a8: 4b ff ff 68 b ffc0e310 } else if (linkflag == REGTYPE) { nblocks = (((file_size) + 511) & ~511) / 512; if ((fp = fopen(fname, "w")) == NULL) ffc0e3ac: 7f 43 d3 78 mr r3,r26 ffc0e3b0: 7e 04 83 78 mr r4,r16 ffc0e3b4: 48 00 84 65 bl ffc16818 linkname[MAX_NAME_FIELD_SIZE] = '\0'; symlink(linkname, fname); } else if (linkflag == REGTYPE) { nblocks = (((file_size) + 511) & ~511) / 512; ffc0e3b8: 3b 3d 01 ff addi r25,r29,511 if ((fp = fopen(fname, "w")) == NULL) ffc0e3bc: 7c 78 1b 79 mr. r24,r3 linkname[MAX_NAME_FIELD_SIZE] = '\0'; symlink(linkname, fname); } else if (linkflag == REGTYPE) { nblocks = (((file_size) + 511) & ~511) / 512; ffc0e3c0: 57 39 ba 7e rlwinm r25,r25,23,9,31 if ((fp = fopen(fname, "w")) == NULL) ffc0e3c4: 41 82 00 80 beq- ffc0e444 <== NEVER TAKEN /*************************************************************** * Read out the data. There are nblocks of data where nblocks * is the file_size rounded to the nearest 512-byte boundary. **************************************************************/ for (i=0; i <== ALWAYS TAKEN ffc0e3d8: 48 00 00 54 b ffc0e42c <== NOT EXECUTED if (n != len) { printk("untar: Error during write\n"); break; } ptr += 512; ffc0e3dc: 3b ff 02 00 addi r31,r31,512 /*************************************************************** * Read out the data. There are nblocks of data where nblocks * is the file_size rounded to the nearest 512-byte boundary. **************************************************************/ for (i=0; i <== ALWAYS TAKEN { len = ((sizeToGo < 512L)?(sizeToGo):(512L)); ffc0e3e4: 2b 9d 02 00 cmplwi cr7,r29,512 n = fwrite(&tar_ptr[ptr], 1, len, fp); ffc0e3e8: 7f 63 db 78 mr r3,r27 ffc0e3ec: 38 80 00 01 li r4,1 ffc0e3f0: 7f 06 c3 78 mr r6,r24 /*************************************************************** * Read out the data. There are nblocks of data where nblocks * is the file_size rounded to the nearest 512-byte boundary. **************************************************************/ for (i=0; i <== ALWAYS TAKEN ffc0e404: 3b c0 02 00 li r30,512 <== NOT EXECUTED n = fwrite(&tar_ptr[ptr], 1, len, fp); ffc0e408: 7f c5 f3 78 mr r5,r30 ffc0e40c: 48 00 8d f5 bl ffc17200 { printk("untar: Error during write\n"); break; } ptr += 512; sizeToGo -= n; ffc0e410: 7f be e8 50 subf r29,r30,r29 **************************************************************/ for (i=0; i <== ALWAYS TAKEN { printk("untar: Error during write\n"); ffc0e420: 7e 43 93 78 mr r3,r18 <== NOT EXECUTED ffc0e424: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc0e428: 4b ff 84 79 bl ffc068a0 <== NOT EXECUTED break; } ptr += 512; sizeToGo -= n; } fclose(fp); ffc0e42c: 7f 03 c3 78 mr r3,r24 ffc0e430: 48 00 7a ad bl ffc15edc void *tar_buf, size_t size ) { FILE *fp; const char *tar_ptr = (const char *)tar_buf; ffc0e434: 7f fe fb 78 mr r30,r31 ffc0e438: 4b ff fe d8 b ffc0e310 * header, but the checksum field is substituted with blanks. ******************************************************************/ hdr_chksum = _rtems_octal2ulong(&bufr[148], 8); sum = _rtems_tar_header_checksum(bufr); if (sum != hdr_chksum) ffc0e43c: 38 60 00 02 li r3,2 <== NOT EXECUTED ffc0e440: 4b ff fe e0 b ffc0e320 <== NOT EXECUTED { nblocks = (((file_size) + 511) & ~511) / 512; if ((fp = fopen(fname, "w")) == NULL) { printk("Untar: failed to create file %s\n", fname); ptr += 512 * nblocks; ffc0e444: 57 39 48 2c rlwinm r25,r25,9,0,22 <== NOT EXECUTED else if (linkflag == REGTYPE) { nblocks = (((file_size) + 511) & ~511) / 512; if ((fp = fopen(fname, "w")) == NULL) { printk("Untar: failed to create file %s\n", fname); ffc0e448: 7e 23 8b 78 mr r3,r17 <== NOT EXECUTED ffc0e44c: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED ptr += 512 * nblocks; ffc0e450: 7f ff ca 14 add r31,r31,r25 <== NOT EXECUTED else if (linkflag == REGTYPE) { nblocks = (((file_size) + 511) & ~511) / 512; if ((fp = fopen(fname, "w")) == NULL) { printk("Untar: failed to create file %s\n", fname); ffc0e454: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc0e458: 4b ff 84 49 bl ffc068a0 <== NOT EXECUTED void *tar_buf, size_t size ) { FILE *fp; const char *tar_ptr = (const char *)tar_buf; ffc0e45c: 7f fe fb 78 mr r30,r31 <== NOT EXECUTED ffc0e460: 4b ff fe b0 b ffc0e310 <== NOT EXECUTED =============================================================================== ffc09298 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc09298: 94 21 ff f0 stwu r1,-16(r1) ffc0929c: 7c 08 02 a6 mflr r0 ffc092a0: 93 c1 00 08 stw r30,8(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; ffc092a4: 3f c0 00 00 lis r30,0 * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc092a8: 93 e1 00 0c stw r31,12(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; ffc092ac: 83 fe 2e 2c lwz r31,11820(r30) ffc092b0: 3b de 2e 2c addi r30,r30,11820 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc092b4: 3b de 00 04 addi r30,r30,4 * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { ffc092b8: 90 01 00 14 stw r0,20(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; ffc092bc: 7f 9f f0 00 cmpw cr7,r31,r30 ffc092c0: 41 9e 00 1c beq- cr7,ffc092dc <_API_extensions_Run_postdriver+0x44><== NEVER TAKEN * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); ffc092c4: 80 1f 00 08 lwz r0,8(r31) ffc092c8: 7c 09 03 a6 mtctr r0 ffc092cc: 4e 80 04 21 bctrl Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { ffc092d0: 83 ff 00 00 lwz r31,0(r31) void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; ffc092d4: 7f 9f f0 00 cmpw cr7,r31,r30 ffc092d8: 40 9e ff ec bne+ cr7,ffc092c4 <_API_extensions_Run_postdriver+0x2c> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } ffc092dc: 80 01 00 14 lwz r0,20(r1) ffc092e0: 83 c1 00 08 lwz r30,8(r1) ffc092e4: 7c 08 03 a6 mtlr r0 ffc092e8: 83 e1 00 0c lwz r31,12(r1) ffc092ec: 38 21 00 10 addi r1,r1,16 ffc092f0: 4e 80 00 20 blr =============================================================================== ffc092f4 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc092f4: 94 21 ff e8 stwu r1,-24(r1) ffc092f8: 7c 08 02 a6 mflr r0 ffc092fc: 93 c1 00 10 stw r30,16(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; ffc09300: 3f c0 00 00 lis r30,0 * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc09304: 93 e1 00 14 stw r31,20(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; ffc09308: 83 fe 2e 2c lwz r31,11820(r30) ffc0930c: 3b de 2e 2c addi r30,r30,11820 ffc09310: 3b de 00 04 addi r30,r30,4 * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc09314: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; ffc09318: 7f 9f f0 00 cmpw cr7,r31,r30 * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { ffc0931c: 93 a1 00 0c stw r29,12(r1) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; ffc09320: 41 9e 00 28 beq- cr7,ffc09348 <_API_extensions_Run_postswitch+0x54><== NEVER TAKEN ffc09324: 3f a0 00 00 lis r29,0 ffc09328: 3b bd 27 b0 addi r29,r29,10160 * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); ffc0932c: 80 1f 00 0c lwz r0,12(r31) ffc09330: 80 7d 00 00 lwz r3,0(r29) ffc09334: 7c 09 03 a6 mtctr r0 ffc09338: 4e 80 04 21 bctrl Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0933c: 83 ff 00 00 lwz r31,0(r31) void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; ffc09340: 7f 9f f0 00 cmpw cr7,r31,r30 ffc09344: 40 9e ff e8 bne+ cr7,ffc0932c <_API_extensions_Run_postswitch+0x38> #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } ffc09348: 80 01 00 1c lwz r0,28(r1) ffc0934c: 83 a1 00 0c lwz r29,12(r1) ffc09350: 7c 08 03 a6 mtlr r0 ffc09354: 83 c1 00 10 lwz r30,16(r1) ffc09358: 83 e1 00 14 lwz r31,20(r1) ffc0935c: 38 21 00 18 addi r1,r1,24 ffc09360: 4e 80 00 20 blr =============================================================================== ffc0c728 <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { ffc0c728: 94 21 ff d8 stwu r1,-40(r1) ffc0c72c: 7c 08 02 a6 mflr r0 ISR_Level level; Thread_Control *executing = _Thread_Executing; ffc0c730: 3d 20 00 00 lis r9,0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { ffc0c734: 90 01 00 2c stw r0,44(r1) ffc0c738: 93 c1 00 20 stw r30,32(r1) ffc0c73c: 7c 7e 1b 78 mr r30,r3 ffc0c740: 93 e1 00 24 stw r31,36(r1) ffc0c744: 93 a1 00 1c stw r29,28(r1) ISR_Level level; Thread_Control *executing = _Thread_Executing; ffc0c748: 83 e9 27 fc lwz r31,10236(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0c74c: 7f a0 00 a6 mfmsr r29 ffc0c750: 7c 10 42 a6 mfsprg r0,0 ffc0c754: 7f a0 00 78 andc r0,r29,r0 ffc0c758: 7c 00 01 24 mtmsr r0 * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { ffc0c75c: 80 03 00 44 lwz r0,68(r3) ffc0c760: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c764: 40 9e 00 40 bne- cr7,ffc0c7a4 <_CORE_RWLock_Obtain_for_reading+0x7c> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; the_rwlock->number_of_readers += 1; ffc0c768: 81 23 00 48 lwz r9,72(r3) ffc0c76c: 38 09 00 01 addi r0,r9,1 ffc0c770: 90 03 00 48 stw r0,72(r3) */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; ffc0c774: 38 00 00 01 li r0,1 ffc0c778: 90 03 00 44 stw r0,68(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0c77c: 7f a0 01 24 mtmsr r29 the_rwlock->number_of_readers += 1; _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; ffc0c780: 38 00 00 00 li r0,0 ffc0c784: 90 1f 00 34 stw r0,52(r31) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } ffc0c788: 80 01 00 2c lwz r0,44(r1) ffc0c78c: 83 a1 00 1c lwz r29,28(r1) ffc0c790: 7c 08 03 a6 mtlr r0 ffc0c794: 83 c1 00 20 lwz r30,32(r1) ffc0c798: 83 e1 00 24 lwz r31,36(r1) ffc0c79c: 38 21 00 28 addi r1,r1,40 ffc0c7a0: 4e 80 00 20 blr * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { ffc0c7a4: 2f 80 00 01 cmpwi cr7,r0,1 ffc0c7a8: 41 9e 00 84 beq- cr7,ffc0c82c <_CORE_RWLock_Obtain_for_reading+0x104> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { ffc0c7ac: 2f 85 00 00 cmpwi cr7,r5,0 ffc0c7b0: 40 9e 00 2c bne- cr7,ffc0c7dc <_CORE_RWLock_Obtain_for_reading+0xb4> ffc0c7b4: 7f a0 01 24 mtmsr r29 _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; ffc0c7b8: 38 00 00 02 li r0,2 timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } ffc0c7bc: 83 a1 00 1c lwz r29,28(r1) * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; ffc0c7c0: 90 1f 00 34 stw r0,52(r31) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } ffc0c7c4: 80 01 00 2c lwz r0,44(r1) ffc0c7c8: 83 c1 00 20 lwz r30,32(r1) ffc0c7cc: 7c 08 03 a6 mtlr r0 ffc0c7d0: 83 e1 00 24 lwz r31,36(r1) ffc0c7d4: 38 21 00 28 addi r1,r1,40 ffc0c7d8: 4e 80 00 20 blr */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; ffc0c7dc: 38 00 00 00 li r0,0 * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; executing->Wait.id = id; ffc0c7e0: 90 9f 00 20 stw r4,32(r31) ffc0c7e4: 39 20 00 01 li r9,1 executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; ffc0c7e8: 90 1f 00 34 stw r0,52(r31) ffc0c7ec: 91 3e 00 30 stw r9,48(r30) /* * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; ffc0c7f0: 93 df 00 44 stw r30,68(r31) executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; ffc0c7f4: 90 1f 00 30 stw r0,48(r31) ffc0c7f8: 7f a0 01 24 mtmsr r29 executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( ffc0c7fc: 3c a0 ff c1 lis r5,-63 ffc0c800: 7f c3 f3 78 mr r3,r30 ffc0c804: 7c c4 33 78 mr r4,r6 ffc0c808: 38 a5 ca 54 addi r5,r5,-13740 ffc0c80c: 48 00 21 ed bl ffc0e9f8 <_Thread_queue_Enqueue_with_handler> timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } ffc0c810: 80 01 00 2c lwz r0,44(r1) ffc0c814: 83 a1 00 1c lwz r29,28(r1) ffc0c818: 7c 08 03 a6 mtlr r0 ffc0c81c: 83 c1 00 20 lwz r30,32(r1) ffc0c820: 83 e1 00 24 lwz r31,36(r1) ffc0c824: 38 21 00 28 addi r1,r1,40 ffc0c828: 4e 80 00 20 blr executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; return; case CORE_RWLOCK_LOCKED_FOR_READING: { Thread_Control *waiter; waiter = _Thread_queue_First( &the_rwlock->Wait_queue ); ffc0c82c: 90 81 00 08 stw r4,8(r1) ffc0c830: 90 a1 00 0c stw r5,12(r1) ffc0c834: 90 c1 00 10 stw r6,16(r1) ffc0c838: 48 00 26 21 bl ffc0ee58 <_Thread_queue_First> if ( !waiter ) { ffc0c83c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c840: 80 81 00 08 lwz r4,8(r1) ffc0c844: 80 a1 00 0c lwz r5,12(r1) ffc0c848: 80 c1 00 10 lwz r6,16(r1) ffc0c84c: 40 9e ff 60 bne+ cr7,ffc0c7ac <_CORE_RWLock_Obtain_for_reading+0x84><== NEVER TAKEN the_rwlock->number_of_readers += 1; ffc0c850: 81 3e 00 48 lwz r9,72(r30) ffc0c854: 38 09 00 01 addi r0,r9,1 ffc0c858: 90 1e 00 48 stw r0,72(r30) ffc0c85c: 7f a0 01 24 mtmsr r29 _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; ffc0c860: 38 00 00 00 li r0,0 ffc0c864: 90 1f 00 34 stw r0,52(r31) return; ffc0c868: 4b ff ff 20 b ffc0c788 <_CORE_RWLock_Obtain_for_reading+0x60> =============================================================================== ffc0c924 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { ffc0c924: 94 21 ff f0 stwu r1,-16(r1) ffc0c928: 7c 08 02 a6 mflr r0 ISR_Level level; Thread_Control *executing = _Thread_Executing; ffc0c92c: 3d 20 00 00 lis r9,0 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { ffc0c930: 90 01 00 14 stw r0,20(r1) ffc0c934: 93 e1 00 0c stw r31,12(r1) ffc0c938: 7c 7f 1b 78 mr r31,r3 ISR_Level level; Thread_Control *executing = _Thread_Executing; ffc0c93c: 81 29 27 fc lwz r9,10236(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0c940: 7d 60 00 a6 mfmsr r11 ffc0c944: 7c 10 42 a6 mfsprg r0,0 ffc0c948: 7d 60 00 78 andc r0,r11,r0 ffc0c94c: 7c 00 01 24 mtmsr r0 * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ ffc0c950: 80 03 00 44 lwz r0,68(r3) ffc0c954: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c958: 41 9e 00 cc beq- cr7,ffc0ca24 <_CORE_RWLock_Release+0x100> _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { ffc0c95c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0c960: 41 9e 00 94 beq- cr7,ffc0c9f4 <_CORE_RWLock_Release+0xd0> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; ffc0c964: 38 00 00 00 li r0,0 ffc0c968: 90 09 00 34 stw r0,52(r9) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; ffc0c96c: 90 1f 00 44 stw r0,68(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0c970: 7d 60 01 24 mtmsr r11 _ISR_Enable( level ); next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); ffc0c974: 7f e3 fb 78 mr r3,r31 ffc0c978: 48 00 1e a1 bl ffc0e818 <_Thread_queue_Dequeue> if ( next ) { ffc0c97c: 2c 03 00 00 cmpwi r3,0 ffc0c980: 41 82 00 5c beq- ffc0c9dc <_CORE_RWLock_Release+0xb8> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { ffc0c984: 80 03 00 30 lwz r0,48(r3) ffc0c988: 2f 80 00 01 cmpwi cr7,r0,1 ffc0c98c: 41 9e 00 bc beq- cr7,ffc0ca48 <_CORE_RWLock_Release+0x124> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; ffc0c990: 81 3f 00 48 lwz r9,72(r31) ffc0c994: 38 09 00 01 addi r0,r9,1 ffc0c998: 90 1f 00 48 stw r0,72(r31) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; ffc0c99c: 38 00 00 01 li r0,1 ffc0c9a0: 90 1f 00 44 stw r0,68(r31) ffc0c9a4: 48 00 00 20 b ffc0c9c4 <_CORE_RWLock_Release+0xa0> * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) ffc0c9a8: 80 09 00 30 lwz r0,48(r9) ffc0c9ac: 2f 80 00 01 cmpwi cr7,r0,1 ffc0c9b0: 41 9e 00 2c beq- cr7,ffc0c9dc <_CORE_RWLock_Release+0xb8><== NEVER TAKEN return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; ffc0c9b4: 81 3f 00 48 lwz r9,72(r31) ffc0c9b8: 38 09 00 01 addi r0,r9,1 ffc0c9bc: 90 1f 00 48 stw r0,72(r31) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); ffc0c9c0: 48 00 22 fd bl ffc0ecbc <_Thread_queue_Extract> /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); ffc0c9c4: 7f e3 fb 78 mr r3,r31 ffc0c9c8: 48 00 24 91 bl ffc0ee58 <_Thread_queue_First> if ( !next || ffc0c9cc: 7c 69 1b 79 mr. r9,r3 next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); ffc0c9d0: 7f e3 fb 78 mr r3,r31 ffc0c9d4: 7d 24 4b 78 mr r4,r9 /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || ffc0c9d8: 40 82 ff d0 bne+ ffc0c9a8 <_CORE_RWLock_Release+0x84> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } ffc0c9dc: 80 01 00 14 lwz r0,20(r1) ffc0c9e0: 38 60 00 00 li r3,0 ffc0c9e4: 83 e1 00 0c lwz r31,12(r1) ffc0c9e8: 38 21 00 10 addi r1,r1,16 ffc0c9ec: 7c 08 03 a6 mtlr r0 ffc0c9f0: 4e 80 00 20 blr _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { the_rwlock->number_of_readers -= 1; ffc0c9f4: 81 43 00 48 lwz r10,72(r3) ffc0c9f8: 38 0a ff ff addi r0,r10,-1 if ( the_rwlock->number_of_readers != 0 ) { ffc0c9fc: 2f 80 00 00 cmpwi cr7,r0,0 _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { the_rwlock->number_of_readers -= 1; ffc0ca00: 90 03 00 48 stw r0,72(r3) if ( the_rwlock->number_of_readers != 0 ) { ffc0ca04: 41 9e ff 60 beq+ cr7,ffc0c964 <_CORE_RWLock_Release+0x40> ffc0ca08: 7d 60 01 24 mtmsr r11 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } ffc0ca0c: 80 01 00 14 lwz r0,20(r1) ffc0ca10: 38 60 00 00 li r3,0 ffc0ca14: 83 e1 00 0c lwz r31,12(r1) ffc0ca18: 38 21 00 10 addi r1,r1,16 ffc0ca1c: 7c 08 03 a6 mtlr r0 ffc0ca20: 4e 80 00 20 blr ffc0ca24: 7d 60 01 24 mtmsr r11 */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; ffc0ca28: 38 00 00 02 li r0,2 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } ffc0ca2c: 83 e1 00 0c lwz r31,12(r1) */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; ffc0ca30: 90 09 00 34 stw r0,52(r9) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } ffc0ca34: 38 60 00 00 li r3,0 ffc0ca38: 80 01 00 14 lwz r0,20(r1) ffc0ca3c: 38 21 00 10 addi r1,r1,16 ffc0ca40: 7c 08 03 a6 mtlr r0 ffc0ca44: 4e 80 00 20 blr next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); if ( next ) { if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; ffc0ca48: 38 00 00 02 li r0,2 ffc0ca4c: 90 1f 00 44 stw r0,68(r31) return CORE_RWLOCK_SUCCESSFUL; ffc0ca50: 4b ff ff 8c b ffc0c9dc <_CORE_RWLock_Release+0xb8> =============================================================================== ffc0ca54 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { ffc0ca54: 94 21 ff e8 stwu r1,-24(r1) ffc0ca58: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0ca5c: 38 81 00 08 addi r4,r1,8 void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { ffc0ca60: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0ca64: 48 00 19 2d bl ffc0e390 <_Thread_Get> switch ( location ) { ffc0ca68: 80 01 00 08 lwz r0,8(r1) ffc0ca6c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ca70: 40 9e 00 18 bne- cr7,ffc0ca88 <_CORE_RWLock_Timeout+0x34><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); ffc0ca74: 48 00 25 21 bl ffc0ef94 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0ca78: 3d 20 00 00 lis r9,0 ffc0ca7c: 81 69 27 bc lwz r11,10172(r9) ffc0ca80: 38 0b ff ff addi r0,r11,-1 ffc0ca84: 90 09 27 bc stw r0,10172(r9) _Thread_Unnest_dispatch(); break; } } ffc0ca88: 80 01 00 1c lwz r0,28(r1) ffc0ca8c: 38 21 00 18 addi r1,r1,24 ffc0ca90: 7c 08 03 a6 mtlr r0 ffc0ca94: 4e 80 00 20 blr =============================================================================== ffc1c880 <_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 ) { ffc1c880: 94 21 ff e0 stwu r1,-32(r1) ffc1c884: 7c 08 02 a6 mflr r0 ffc1c888: 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 ) { ffc1c88c: 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 ) { ffc1c890: 93 41 00 08 stw r26,8(r1) ffc1c894: 7d 1a 43 78 mr r26,r8 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { ffc1c898: 7f 80 28 40 cmplw cr7,r0,r5 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { ffc1c89c: 93 a1 00 14 stw r29,20(r1) ffc1c8a0: 7c 9d 23 78 mr r29,r4 ffc1c8a4: 93 c1 00 18 stw r30,24(r1) ffc1c8a8: 7c 7e 1b 78 mr r30,r3 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { ffc1c8ac: 38 60 00 01 li r3,1 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { ffc1c8b0: 93 e1 00 1c stw r31,28(r1) ffc1c8b4: 7c bf 2b 78 mr r31,r5 ffc1c8b8: 93 61 00 0c stw r27,12(r1) ffc1c8bc: 93 81 00 10 stw r28,16(r1) Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { ffc1c8c0: 41 9c 00 20 blt- cr7,ffc1c8e0 <_CORE_message_queue_Broadcast+0x60><== 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 ) { ffc1c8c4: 80 1e 00 48 lwz r0,72(r30) * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { ffc1c8c8: 3b 60 00 00 li r27,0 * 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 ) { ffc1c8cc: 2f 80 00 00 cmpwi cr7,r0,0 ffc1c8d0: 41 be 00 4c beq+ cr7,ffc1c91c <_CORE_message_queue_Broadcast+0x9c> *count = 0; ffc1c8d4: 38 00 00 00 li r0,0 ffc1c8d8: 90 08 00 00 stw r0,0(r8) ffc1c8dc: 38 60 00 00 li r3,0 #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } ffc1c8e0: 80 01 00 24 lwz r0,36(r1) ffc1c8e4: 83 41 00 08 lwz r26,8(r1) ffc1c8e8: 7c 08 03 a6 mtlr r0 ffc1c8ec: 83 61 00 0c lwz r27,12(r1) ffc1c8f0: 83 81 00 10 lwz r28,16(r1) ffc1c8f4: 83 a1 00 14 lwz r29,20(r1) ffc1c8f8: 83 c1 00 18 lwz r30,24(r1) ffc1c8fc: 83 e1 00 1c lwz r31,28(r1) ffc1c900: 38 21 00 20 addi r1,r1,32 ffc1c904: 4e 80 00 20 blr const void *source, void *destination, size_t size ) { memcpy(destination, source, size); ffc1c908: 80 7c 00 2c lwz r3,44(r28) */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; ffc1c90c: 3b 7b 00 01 addi r27,r27,1 ffc1c910: 48 00 b9 85 bl ffc28294 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; ffc1c914: 81 3c 00 28 lwz r9,40(r28) ffc1c918: 93 e9 00 00 stw r31,0(r9) * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { ffc1c91c: 7f c3 f3 78 mr r3,r30 ffc1c920: 48 00 31 75 bl ffc1fa94 <_Thread_queue_Dequeue> ffc1c924: 7f a4 eb 78 mr r4,r29 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = ffc1c928: 7c 7c 1b 79 mr. r28,r3 ffc1c92c: 7f e5 fb 78 mr r5,r31 ffc1c930: 40 82 ff d8 bne+ ffc1c908 <_CORE_message_queue_Broadcast+0x88> #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } ffc1c934: 80 01 00 24 lwz r0,36(r1) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; ffc1c938: 93 7a 00 00 stw r27,0(r26) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } ffc1c93c: 7c 08 03 a6 mtlr r0 ffc1c940: 83 41 00 08 lwz r26,8(r1) ffc1c944: 83 61 00 0c lwz r27,12(r1) ffc1c948: 83 81 00 10 lwz r28,16(r1) ffc1c94c: 83 a1 00 14 lwz r29,20(r1) ffc1c950: 83 c1 00 18 lwz r30,24(r1) ffc1c954: 83 e1 00 1c lwz r31,28(r1) ffc1c958: 38 21 00 20 addi r1,r1,32 ffc1c95c: 4e 80 00 20 blr =============================================================================== ffc14d14 <_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 ) { ffc14d14: 94 21 ff e0 stwu r1,-32(r1) ffc14d18: 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)) { ffc14d1c: 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 ) { ffc14d20: 90 01 00 24 stw r0,36(r1) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { ffc14d24: 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; the_message_queue->number_of_pending_messages = 0; ffc14d28: 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 ) { ffc14d2c: 93 c1 00 18 stw r30,24(r1) ffc14d30: 7c 9e 23 78 mr r30,r4 ffc14d34: 93 e1 00 1c stw r31,28(r1) ffc14d38: 7c 7f 1b 78 mr r31,r3 ffc14d3c: 93 a1 00 14 stw r29,20(r1) CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; the_message_queue->notify_argument = the_argument; ffc14d40: 90 03 00 64 stw r0,100(r3) size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; ffc14d44: 90 a3 00 44 stw r5,68(r3) the_message_queue->number_of_pending_messages = 0; ffc14d48: 90 03 00 48 stw r0,72(r3) the_message_queue->maximum_message_size = maximum_message_size; ffc14d4c: 90 c3 00 4c stw r6,76(r3) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; ffc14d50: 90 03 00 60 stw r0,96(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)) { ffc14d54: 41 82 00 34 beq- ffc14d88 <_CORE_message_queue_Initialize+0x74> allocated_message_size += sizeof(uint32_t); ffc14d58: 39 26 00 04 addi r9,r6,4 allocated_message_size &= ~(sizeof(uint32_t) - 1); ffc14d5c: 55 29 00 3a rlwinm r9,r9,0,0,29 } if (allocated_message_size < maximum_message_size) ffc14d60: 7f 86 48 40 cmplw cr7,r6,r9 ffc14d64: 40 9d 00 24 ble- cr7,ffc14d88 <_CORE_message_queue_Initialize+0x74><== ALWAYS TAKEN STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc14d68: 80 01 00 24 lwz r0,36(r1) THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; ffc14d6c: 38 60 00 00 li r3,0 } ffc14d70: 83 a1 00 14 lwz r29,20(r1) ffc14d74: 7c 08 03 a6 mtlr r0 ffc14d78: 83 c1 00 18 lwz r30,24(r1) ffc14d7c: 83 e1 00 1c lwz r31,28(r1) ffc14d80: 38 21 00 20 addi r1,r1,32 ffc14d84: 4e 80 00 20 blr /* * 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)); ffc14d88: 3b a9 00 14 addi r29,r9,20 /* * 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 * ffc14d8c: 7c 7d 29 d6 mullw r3,r29,r5 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) ffc14d90: 7f 83 48 40 cmplw cr7,r3,r9 ffc14d94: 41 9c ff d4 blt+ cr7,ffc14d68 <_CORE_message_queue_Initialize+0x54><== NEVER TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) ffc14d98: 90 a1 00 08 stw r5,8(r1) ffc14d9c: 48 00 3b d5 bl ffc18970 <_Workspace_Allocate> _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) ffc14da0: 2f 83 00 00 cmpwi cr7,r3,0 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) ffc14da4: 90 7f 00 5c stw r3,92(r31) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) ffc14da8: 80 a1 00 08 lwz r5,8(r1) ffc14dac: 41 be ff bc beq- cr7,ffc14d68 <_CORE_message_queue_Initialize+0x54> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( ffc14db0: 7c 64 1b 78 mr r4,r3 ffc14db4: 7f a6 eb 78 mr r6,r29 ffc14db8: 38 7f 00 68 addi r3,r31,104 ffc14dbc: 48 00 66 49 bl ffc1b404 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( ffc14dc0: 80 9e 00 00 lwz r4,0(r30) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc14dc4: 39 3f 00 54 addi r9,r31,84 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc14dc8: 38 1f 00 50 addi r0,r31,80 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc14dcc: 91 3f 00 50 stw r9,80(r31) ffc14dd0: 68 84 00 01 xori r4,r4,1 the_chain->permanent_null = NULL; ffc14dd4: 39 20 00 00 li r9,0 the_chain->last = _Chain_Head(the_chain); ffc14dd8: 90 1f 00 58 stw r0,88(r31) ffc14ddc: 7c 84 00 34 cntlzw r4,r4 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc14de0: 91 3f 00 54 stw r9,84(r31) ffc14de4: 7f e3 fb 78 mr r3,r31 ffc14de8: 54 84 d9 7e rlwinm r4,r4,27,5,31 ffc14dec: 38 a0 00 80 li r5,128 ffc14df0: 38 c0 00 06 li r6,6 ffc14df4: 48 00 2a a9 bl ffc1789c <_Thread_queue_Initialize> STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc14df8: 80 01 00 24 lwz r0,36(r1) allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( ffc14dfc: 38 60 00 01 li r3,1 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc14e00: 83 a1 00 14 lwz r29,20(r1) ffc14e04: 7c 08 03 a6 mtlr r0 ffc14e08: 83 c1 00 18 lwz r30,24(r1) ffc14e0c: 83 e1 00 1c lwz r31,28(r1) ffc14e10: 38 21 00 20 addi r1,r1,32 ffc14e14: 4e 80 00 20 blr =============================================================================== ffc09718 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc09718: 94 21 ff d8 stwu r1,-40(r1) ffc0971c: 7c 08 02 a6 mflr r0 ffc09720: 93 e1 00 24 stw r31,36(r1) _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc09724: 3f e0 00 00 lis r31,0 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc09728: 90 01 00 2c stw r0,44(r1) _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc0972c: 80 1f 27 70 lwz r0,10096(r31) Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc09730: 93 61 00 14 stw r27,20(r1) ffc09734: 7c db 33 78 mr r27,r6 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc09738: 2f 80 00 00 cmpwi cr7,r0,0 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc0973c: 93 81 00 18 stw r28,24(r1) ffc09740: 7c bc 2b 78 mr r28,r5 ffc09744: 93 a1 00 1c stw r29,28(r1) ffc09748: 7c 9d 23 78 mr r29,r4 ffc0974c: 93 c1 00 20 stw r30,32(r1) ffc09750: 7c 7e 1b 78 mr r30,r3 ffc09754: 90 e1 00 08 stw r7,8(r1) _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc09758: 41 9e 00 0c beq- cr7,ffc09764 <_CORE_mutex_Seize+0x4c> ffc0975c: 2f 85 00 00 cmpwi cr7,r5,0 ffc09760: 40 9e 00 5c bne- cr7,ffc097bc <_CORE_mutex_Seize+0xa4> <== ALWAYS TAKEN ffc09764: 7f c3 f3 78 mr r3,r30 ffc09768: 38 81 00 08 addi r4,r1,8 ffc0976c: 48 00 60 35 bl ffc0f7a0 <_CORE_mutex_Seize_interrupt_trylock> ffc09770: 2f 83 00 00 cmpwi cr7,r3,0 ffc09774: 41 9e 00 24 beq- cr7,ffc09798 <_CORE_mutex_Seize+0x80> ffc09778: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0977c: 40 9e 00 60 bne- cr7,ffc097dc <_CORE_mutex_Seize+0xc4> ffc09780: 80 01 00 08 lwz r0,8(r1) ffc09784: 7c 00 01 24 mtmsr r0 ffc09788: 3d 20 00 00 lis r9,0 ffc0978c: 81 29 27 b0 lwz r9,10160(r9) ffc09790: 38 00 00 01 li r0,1 ffc09794: 90 09 00 34 stw r0,52(r9) } ffc09798: 80 01 00 2c lwz r0,44(r1) ffc0979c: 83 61 00 14 lwz r27,20(r1) ffc097a0: 7c 08 03 a6 mtlr r0 ffc097a4: 83 81 00 18 lwz r28,24(r1) ffc097a8: 83 a1 00 1c lwz r29,28(r1) ffc097ac: 83 c1 00 20 lwz r30,32(r1) ffc097b0: 83 e1 00 24 lwz r31,36(r1) ffc097b4: 38 21 00 28 addi r1,r1,40 ffc097b8: 4e 80 00 20 blr bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc097bc: 3d 20 00 00 lis r9,0 ffc097c0: 80 09 27 d4 lwz r0,10196(r9) ffc097c4: 2b 80 00 01 cmplwi cr7,r0,1 ffc097c8: 40 9d ff 9c ble+ cr7,ffc09764 <_CORE_mutex_Seize+0x4c> ffc097cc: 38 60 00 00 li r3,0 ffc097d0: 38 80 00 00 li r4,0 ffc097d4: 38 a0 00 13 li r5,19 ffc097d8: 48 00 07 9d bl ffc09f74 <_Internal_error_Occurred> ffc097dc: 3d 20 00 00 lis r9,0 ffc097e0: 81 7f 27 70 lwz r11,10096(r31) ffc097e4: 81 29 27 b0 lwz r9,10160(r9) ffc097e8: 38 0b 00 01 addi r0,r11,1 ffc097ec: 93 a9 00 20 stw r29,32(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; ffc097f0: 39 60 00 01 li r11,1 ffc097f4: 91 7e 00 30 stw r11,48(r30) ffc097f8: 93 c9 00 44 stw r30,68(r9) ffc097fc: 90 1f 27 70 stw r0,10096(r31) ffc09800: 80 01 00 08 lwz r0,8(r1) ffc09804: 7c 00 01 24 mtmsr r0 ffc09808: 7f c3 f3 78 mr r3,r30 ffc0980c: 7f 64 db 78 mr r4,r27 ffc09810: 4b ff fe 45 bl ffc09654 <_CORE_mutex_Seize_interrupt_blocking> } ffc09814: 80 01 00 2c lwz r0,44(r1) ffc09818: 83 61 00 14 lwz r27,20(r1) ffc0981c: 7c 08 03 a6 mtlr r0 ffc09820: 83 81 00 18 lwz r28,24(r1) ffc09824: 83 a1 00 1c lwz r29,28(r1) ffc09828: 83 c1 00 20 lwz r30,32(r1) ffc0982c: 83 e1 00 24 lwz r31,36(r1) ffc09830: 38 21 00 28 addi r1,r1,40 ffc09834: 4e 80 00 20 blr =============================================================================== ffc09a18 <_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 ) { ffc09a18: 94 21 ff f0 stwu r1,-16(r1) ffc09a1c: 7c 08 02 a6 mflr r0 ffc09a20: 93 e1 00 0c stw r31,12(r1) ffc09a24: 7c 7f 1b 78 mr r31,r3 ffc09a28: 90 01 00 14 stw r0,20(r1) ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { ffc09a2c: 48 00 1c 1d bl ffc0b648 <_Thread_queue_Dequeue> ffc09a30: 2f 83 00 00 cmpwi cr7,r3,0 ffc09a34: 38 60 00 00 li r3,0 ffc09a38: 41 9e 00 18 beq- cr7,ffc09a50 <_CORE_semaphore_Surrender+0x38> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc09a3c: 80 01 00 14 lwz r0,20(r1) ffc09a40: 83 e1 00 0c lwz r31,12(r1) ffc09a44: 38 21 00 10 addi r1,r1,16 ffc09a48: 7c 08 03 a6 mtlr r0 ffc09a4c: 4e 80 00 20 blr static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc09a50: 7c 00 00 a6 mfmsr r0 ffc09a54: 7d 30 42 a6 mfsprg r9,0 ffc09a58: 7c 09 48 78 andc r9,r0,r9 ffc09a5c: 7d 20 01 24 mtmsr r9 (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) ffc09a60: 81 3f 00 48 lwz r9,72(r31) ffc09a64: 38 60 00 04 li r3,4 ffc09a68: 81 7f 00 40 lwz r11,64(r31) ffc09a6c: 7f 89 58 40 cmplw cr7,r9,r11 ffc09a70: 41 9c 00 1c blt- cr7,ffc09a8c <_CORE_semaphore_Surrender+0x74><== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09a74: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc09a78: 80 01 00 14 lwz r0,20(r1) ffc09a7c: 83 e1 00 0c lwz r31,12(r1) ffc09a80: 38 21 00 10 addi r1,r1,16 ffc09a84: 7c 08 03 a6 mtlr r0 ffc09a88: 4e 80 00 20 blr #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; ffc09a8c: 39 29 00 01 addi r9,r9,1 ffc09a90: 91 3f 00 48 stw r9,72(r31) ffc09a94: 38 60 00 00 li r3,0 ffc09a98: 7c 00 01 24 mtmsr r0 ffc09a9c: 4b ff ff dc b ffc09a78 <_CORE_semaphore_Surrender+0x60> =============================================================================== ffc0f75c <_Chain_Initialize>: count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { ffc0f75c: 2c 05 00 00 cmpwi r5,0 Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; ffc0f760: 38 00 00 00 li r0,0 ffc0f764: 90 03 00 04 stw r0,4(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; ffc0f768: 7c 69 1b 78 mr r9,r3 next = starting_address; while ( count-- ) { ffc0f76c: 41 82 00 24 beq- ffc0f790 <_Chain_Initialize+0x34> <== NEVER TAKEN Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; ffc0f770: 7c a9 03 a6 mtctr r5 ffc0f774: 48 00 00 08 b ffc0f77c <_Chain_Initialize+0x20> while ( count-- ) { ffc0f778: 7c 04 03 78 mr r4,r0 current->next = next; next->previous = current; ffc0f77c: 91 24 00 04 stw r9,4(r4) ffc0f780: 7c 04 32 14 add r0,r4,r6 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { current->next = next; ffc0f784: 90 89 00 00 stw r4,0(r9) next->previous = current; current = next; next = (Chain_Node *) ffc0f788: 7c 89 23 78 mr r9,r4 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { ffc0f78c: 42 00 ff ec bdnz+ ffc0f778 <_Chain_Initialize+0x1c> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); ffc0f790: 38 03 00 04 addi r0,r3,4 ffc0f794: 90 09 00 00 stw r0,0(r9) the_chain->last = current; ffc0f798: 91 23 00 08 stw r9,8(r3) } ffc0f79c: 4e 80 00 20 blr =============================================================================== ffc08018 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { ffc08018: 94 21 ff f0 stwu r1,-16(r1) ffc0801c: 7c 08 02 a6 mflr r0 rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; ffc08020: 3d 20 00 00 lis r9,0 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { ffc08024: 93 e1 00 0c stw r31,12(r1) rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; ffc08028: 83 e9 27 b0 lwz r31,10160(r9) rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { ffc0802c: 90 01 00 14 stw r0,20(r1) ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; ffc08030: 38 00 00 00 li r0,0 ffc08034: 90 1f 00 34 stw r0,52(r31) rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { ffc08038: 93 c1 00 08 stw r30,8(r1) Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc0803c: 81 7f 01 44 lwz r11,324(r31) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc08040: 7d 40 00 a6 mfmsr r10 ffc08044: 7c 10 42 a6 mfsprg r0,0 ffc08048: 7d 40 00 78 andc r0,r10,r0 ffc0804c: 7c 00 01 24 mtmsr r0 _ISR_Disable( level ); pending_events = api->pending_events; ffc08050: 80 0b 00 00 lwz r0,0(r11) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && ffc08054: 7c 69 00 39 and. r9,r3,r0 ffc08058: 41 82 00 14 beq- ffc0806c <_Event_Seize+0x54> ffc0805c: 7f 83 48 00 cmpw cr7,r3,r9 ffc08060: 41 9e 00 b0 beq- cr7,ffc08110 <_Event_Seize+0xf8> ffc08064: 70 88 00 02 andi. r8,r4,2 ffc08068: 40 82 00 a8 bne- ffc08110 <_Event_Seize+0xf8> <== ALWAYS TAKEN _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { ffc0806c: 70 80 00 01 andi. r0,r4,1 ffc08070: 40 82 00 78 bne- ffc080e8 <_Event_Seize+0xd0> */ executing->Wait.option = (uint32_t) option_set; executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out; _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc08074: 3f c0 00 00 lis r30,0 * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; ffc08078: 90 9f 00 30 stw r4,48(r31) executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out; _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc0807c: 38 00 00 01 li r0,1 * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; executing->Wait.count = (uint32_t) event_in; ffc08080: 90 7f 00 24 stw r3,36(r31) executing->Wait.return_argument = event_out; ffc08084: 90 df 00 28 stw r6,40(r31) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc08088: 90 1e 27 e8 stw r0,10216(r30) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0808c: 7d 40 01 24 mtmsr r10 _ISR_Enable( level ); if ( ticks ) { ffc08090: 2f 85 00 00 cmpwi cr7,r5,0 ffc08094: 40 9e 00 c0 bne- cr7,ffc08154 <_Event_Seize+0x13c> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); ffc08098: 7f e3 fb 78 mr r3,r31 ffc0809c: 38 80 01 00 li r4,256 ffc080a0: 48 00 3c 89 bl ffc0bd28 <_Thread_Set_state> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc080a4: 7c a0 00 a6 mfmsr r5 ffc080a8: 7c 10 42 a6 mfsprg r0,0 ffc080ac: 7c a0 00 78 andc r0,r5,r0 ffc080b0: 7c 00 01 24 mtmsr r0 _ISR_Disable( level ); sync_state = _Event_Sync_state; ffc080b4: 80 7e 27 e8 lwz r3,10216(r30) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc080b8: 38 00 00 00 li r0,0 ffc080bc: 90 1e 27 e8 stw r0,10216(r30) if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { ffc080c0: 2f 83 00 01 cmpwi cr7,r3,1 ffc080c4: 41 9e 00 74 beq- cr7,ffc08138 <_Event_Seize+0x120> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); ffc080c8: 7f e4 fb 78 mr r4,r31 ffc080cc: 48 00 29 65 bl ffc0aa30 <_Thread_blocking_operation_Cancel> } ffc080d0: 80 01 00 14 lwz r0,20(r1) ffc080d4: 83 c1 00 08 lwz r30,8(r1) ffc080d8: 7c 08 03 a6 mtlr r0 ffc080dc: 83 e1 00 0c lwz r31,12(r1) ffc080e0: 38 21 00 10 addi r1,r1,16 ffc080e4: 4e 80 00 20 blr return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc080e8: 7d 40 01 24 mtmsr r10 return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); executing->Wait.return_code = RTEMS_UNSATISFIED; ffc080ec: 38 00 00 0d li r0,13 * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } ffc080f0: 83 c1 00 08 lwz r30,8(r1) return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); executing->Wait.return_code = RTEMS_UNSATISFIED; ffc080f4: 90 1f 00 34 stw r0,52(r31) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } ffc080f8: 80 01 00 14 lwz r0,20(r1) ffc080fc: 83 e1 00 0c lwz r31,12(r1) ffc08100: 38 21 00 10 addi r1,r1,16 ffc08104: 7c 08 03 a6 mtlr r0 } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); executing->Wait.return_code = RTEMS_UNSATISFIED; *event_out = seized_events; ffc08108: 91 26 00 00 stw r9,0(r6) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } ffc0810c: 4e 80 00 20 blr pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = ffc08110: 7c 00 48 78 andc r0,r0,r9 ffc08114: 90 0b 00 00 stw r0,0(r11) ffc08118: 7d 40 01 24 mtmsr r10 * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } ffc0811c: 80 01 00 14 lwz r0,20(r1) ffc08120: 83 c1 00 08 lwz r30,8(r1) ffc08124: 7c 08 03 a6 mtlr r0 ffc08128: 83 e1 00 0c lwz r31,12(r1) if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); *event_out = seized_events; ffc0812c: 91 26 00 00 stw r9,0(r6) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } ffc08130: 38 21 00 10 addi r1,r1,16 ffc08134: 4e 80 00 20 blr ffc08138: 7c a0 01 24 mtmsr r5 ffc0813c: 80 01 00 14 lwz r0,20(r1) ffc08140: 83 c1 00 08 lwz r30,8(r1) ffc08144: 7c 08 03 a6 mtlr r0 ffc08148: 83 e1 00 0c lwz r31,12(r1) ffc0814c: 38 21 00 10 addi r1,r1,16 ffc08150: 4e 80 00 20 blr _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( ffc08154: 81 3f 00 08 lwz r9,8(r31) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc08158: 3d 60 ff c1 lis r11,-63 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0815c: 38 00 00 00 li r0,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc08160: 90 bf 00 54 stw r5,84(r31) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc08164: 39 6b 83 7c addi r11,r11,-31876 ffc08168: 91 7f 00 64 stw r11,100(r31) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0816c: 3c 60 00 00 lis r3,0 ffc08170: 38 63 2d 48 addi r3,r3,11592 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc08174: 91 3f 00 68 stw r9,104(r31) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc08178: 38 9f 00 48 addi r4,r31,72 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; ffc0817c: 90 1f 00 6c stw r0,108(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc08180: 90 1f 00 50 stw r0,80(r31) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc08184: 48 00 47 15 bl ffc0c898 <_Watchdog_Insert> ffc08188: 4b ff ff 10 b ffc08098 <_Event_Seize+0x80> =============================================================================== ffc08200 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { ffc08200: 94 21 ff f0 stwu r1,-16(r1) ffc08204: 7c 08 02 a6 mflr r0 ffc08208: 90 01 00 14 stw r0,20(r1) ffc0820c: 93 e1 00 0c stw r31,12(r1) ffc08210: 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 ]; ffc08214: 81 63 01 44 lwz r11,324(r3) option_set = (rtems_option) the_thread->Wait.option; ffc08218: 80 e3 00 30 lwz r7,48(r3) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0821c: 7d 40 00 a6 mfmsr r10 ffc08220: 7c 10 42 a6 mfsprg r0,0 ffc08224: 7d 40 00 78 andc r0,r10,r0 ffc08228: 7c 00 01 24 mtmsr r0 _ISR_Disable( level ); pending_events = api->pending_events; ffc0822c: 81 2b 00 00 lwz r9,0(r11) event_condition = (rtems_event_set) the_thread->Wait.count; ffc08230: 80 03 00 24 lwz r0,36(r3) seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { ffc08234: 7c 08 48 39 and. r8,r0,r9 ffc08238: 41 82 00 b0 beq- ffc082e8 <_Event_Surrender+0xe8> /* * 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() && ffc0823c: 3c c0 00 00 lis r6,0 ffc08240: 80 c6 27 98 lwz r6,10136(r6) ffc08244: 2f 86 00 00 cmpwi cr7,r6,0 ffc08248: 41 9e 00 14 beq- cr7,ffc0825c <_Event_Surrender+0x5c> ffc0824c: 3c c0 00 00 lis r6,0 ffc08250: 80 c6 27 b0 lwz r6,10160(r6) ffc08254: 7f 83 30 00 cmpw cr7,r3,r6 ffc08258: 41 9e 00 d0 beq- cr7,ffc08328 <_Event_Surrender+0x128> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { ffc0825c: 80 df 00 10 lwz r6,16(r31) ffc08260: 70 c5 01 00 andi. r5,r6,256 ffc08264: 41 82 00 6c beq- ffc082d0 <_Event_Surrender+0xd0> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { ffc08268: 7f 80 40 00 cmpw cr7,r0,r8 ffc0826c: 41 9e 00 0c beq- cr7,ffc08278 <_Event_Surrender+0x78> ffc08270: 70 e0 00 02 andi. r0,r7,2 ffc08274: 41 82 00 5c beq- ffc082d0 <_Event_Surrender+0xd0> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc08278: 80 ff 00 28 lwz r7,40(r31) /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); ffc0827c: 7d 29 40 78 andc r9,r9,r8 the_thread->Wait.count = 0; ffc08280: 38 00 00 00 li r0,0 /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); ffc08284: 91 2b 00 00 stw r9,0(r11) the_thread->Wait.count = 0; ffc08288: 90 1f 00 24 stw r0,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc0828c: 91 07 00 00 stw r8,0(r7) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc08290: 7c 00 00 a6 mfmsr r0 ffc08294: 7d 40 01 24 mtmsr r10 ffc08298: 7c 00 01 24 mtmsr r0 _ISR_Flash( level ); if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc0829c: 80 1f 00 50 lwz r0,80(r31) ffc082a0: 2f 80 00 02 cmpwi cr7,r0,2 ffc082a4: 41 9e 00 5c beq- cr7,ffc08300 <_Event_Surrender+0x100> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc082a8: 7d 40 01 24 mtmsr r10 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc082ac: 3c 80 10 03 lis r4,4099 ffc082b0: 7f e3 fb 78 mr r3,r31 ffc082b4: 60 84 ff f8 ori r4,r4,65528 ffc082b8: 48 00 29 d5 bl ffc0ac8c <_Thread_Clear_state> } return; } } _ISR_Enable( level ); } ffc082bc: 80 01 00 14 lwz r0,20(r1) ffc082c0: 83 e1 00 0c lwz r31,12(r1) ffc082c4: 38 21 00 10 addi r1,r1,16 ffc082c8: 7c 08 03 a6 mtlr r0 ffc082cc: 4e 80 00 20 blr ffc082d0: 7d 40 01 24 mtmsr r10 ffc082d4: 80 01 00 14 lwz r0,20(r1) ffc082d8: 83 e1 00 0c lwz r31,12(r1) ffc082dc: 38 21 00 10 addi r1,r1,16 ffc082e0: 7c 08 03 a6 mtlr r0 ffc082e4: 4e 80 00 20 blr ffc082e8: 7d 40 01 24 mtmsr r10 ffc082ec: 80 01 00 14 lwz r0,20(r1) ffc082f0: 83 e1 00 0c lwz r31,12(r1) ffc082f4: 38 21 00 10 addi r1,r1,16 ffc082f8: 7c 08 03 a6 mtlr r0 ffc082fc: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; ffc08300: 38 00 00 03 li r0,3 ffc08304: 90 1f 00 50 stw r0,80(r31) ffc08308: 7d 40 01 24 mtmsr r10 _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); ffc0830c: 38 7f 00 48 addi r3,r31,72 ffc08310: 48 00 47 51 bl ffc0ca60 <_Watchdog_Remove> ffc08314: 3c 80 10 03 lis r4,4099 ffc08318: 7f e3 fb 78 mr r3,r31 ffc0831c: 60 84 ff f8 ori r4,r4,65528 ffc08320: 48 00 29 6d bl ffc0ac8c <_Thread_Clear_state> ffc08324: 4b ff ff b0 b ffc082d4 <_Event_Surrender+0xd4> * 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) || ffc08328: 3c c0 00 00 lis r6,0 ffc0832c: 80 a6 27 e8 lwz r5,10216(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() && ffc08330: 2f 85 00 02 cmpwi cr7,r5,2 ffc08334: 41 9e 00 10 beq- cr7,ffc08344 <_Event_Surrender+0x144> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { ffc08338: 80 a6 27 e8 lwz r5,10216(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() && ffc0833c: 2f 85 00 01 cmpwi cr7,r5,1 ffc08340: 40 9e ff 1c bne+ cr7,ffc0825c <_Event_Surrender+0x5c> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { ffc08344: 7f 80 40 00 cmpw cr7,r0,r8 ffc08348: 41 9e 00 0c beq- cr7,ffc08354 <_Event_Surrender+0x154> ffc0834c: 70 e0 00 02 andi. r0,r7,2 ffc08350: 41 82 00 24 beq- ffc08374 <_Event_Surrender+0x174> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; ffc08354: 38 00 00 03 li r0,3 ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc08358: 80 ff 00 28 lwz r7,40(r31) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); ffc0835c: 7d 29 40 78 andc r9,r9,r8 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; ffc08360: 90 06 27 e8 stw r0,10216(r6) _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; ffc08364: 38 00 00 00 li r0,0 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); ffc08368: 91 2b 00 00 stw r9,0(r11) the_thread->Wait.count = 0; ffc0836c: 90 1f 00 24 stw r0,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc08370: 91 07 00 00 stw r8,0(r7) ffc08374: 7d 40 01 24 mtmsr r10 ffc08378: 4b ff ff 5c b ffc082d4 <_Event_Surrender+0xd4> =============================================================================== ffc0837c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { ffc0837c: 94 21 ff e8 stwu r1,-24(r1) ffc08380: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc08384: 38 81 00 08 addi r4,r1,8 void _Event_Timeout( Objects_Id id, void *ignored ) { ffc08388: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc0838c: 48 00 2e 35 bl ffc0b1c0 <_Thread_Get> switch ( location ) { ffc08390: 80 01 00 08 lwz r0,8(r1) ffc08394: 2f 80 00 00 cmpwi cr7,r0,0 ffc08398: 40 9e 00 50 bne- cr7,ffc083e8 <_Event_Timeout+0x6c> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0839c: 7d 20 00 a6 mfmsr r9 ffc083a0: 7d 70 42 a6 mfsprg r11,0 ffc083a4: 7d 2b 58 78 andc r11,r9,r11 ffc083a8: 7d 60 01 24 mtmsr r11 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { ffc083ac: 3d 60 00 00 lis r11,0 _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; ffc083b0: 90 03 00 24 stw r0,36(r3) if ( _Thread_Is_executing( the_thread ) ) { ffc083b4: 81 6b 27 b0 lwz r11,10160(r11) ffc083b8: 7f 83 58 00 cmpw cr7,r3,r11 ffc083bc: 41 9e 00 3c beq- cr7,ffc083f8 <_Event_Timeout+0x7c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; ffc083c0: 38 00 00 06 li r0,6 ffc083c4: 90 03 00 34 stw r0,52(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc083c8: 7d 20 01 24 mtmsr r9 ffc083cc: 3c 80 10 03 lis r4,4099 ffc083d0: 60 84 ff f8 ori r4,r4,65528 ffc083d4: 48 00 28 b9 bl ffc0ac8c <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc083d8: 3d 20 00 00 lis r9,0 ffc083dc: 81 69 27 70 lwz r11,10096(r9) ffc083e0: 38 0b ff ff addi r0,r11,-1 ffc083e4: 90 09 27 70 stw r0,10096(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc083e8: 80 01 00 1c lwz r0,28(r1) ffc083ec: 38 21 00 18 addi r1,r1,24 ffc083f0: 7c 08 03 a6 mtlr r0 ffc083f4: 4e 80 00 20 blr } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) ffc083f8: 3d 60 00 00 lis r11,0 ffc083fc: 80 0b 27 e8 lwz r0,10216(r11) ffc08400: 2f 80 00 01 cmpwi cr7,r0,1 ffc08404: 40 9e ff bc bne+ cr7,ffc083c0 <_Event_Timeout+0x44> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ffc08408: 38 00 00 02 li r0,2 ffc0840c: 90 0b 27 e8 stw r0,10216(r11) ffc08410: 4b ff ff b0 b ffc083c0 <_Event_Timeout+0x44> =============================================================================== ffc0fa68 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc0fa68: 94 21 ff e0 stwu r1,-32(r1) ffc0fa6c: 7c 08 02 a6 mflr r0 ffc0fa70: 7d 80 00 26 mfcr r12 ffc0fa74: 7c 89 23 78 mr r9,r4 ffc0fa78: 90 01 00 24 stw r0,36(r1) Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; ffc0fa7c: 38 04 00 04 addi r0,r4,4 uintptr_t const page_size = heap->page_size; uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { ffc0fa80: 7f 84 00 40 cmplw cr7,r4,r0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc0fa84: 93 a1 00 14 stw r29,20(r1) ffc0fa88: 7c 7d 1b 78 mr r29,r3 ffc0fa8c: 93 61 00 0c stw r27,12(r1) ffc0fa90: 93 81 00 10 stw r28,16(r1) ffc0fa94: 93 c1 00 18 stw r30,24(r1) ffc0fa98: 93 e1 00 1c stw r31,28(r1) ffc0fa9c: 91 81 00 08 stw r12,8(r1) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0faa0: 80 83 00 08 lwz r4,8(r3) Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; ffc0faa4: 80 e3 00 10 lwz r7,16(r3) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { ffc0faa8: 41 9d 01 7c bgt- cr7,ffc0fc24 <_Heap_Allocate_aligned_with_boundary+0x1bc> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { ffc0faac: 2e 06 00 00 cmpwi cr4,r6,0 ffc0fab0: 40 92 01 6c bne- cr4,ffc0fc1c <_Heap_Allocate_aligned_with_boundary+0x1b4> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { ffc0fab4: 7f 9d 20 00 cmpw cr7,r29,r4 ffc0fab8: 3b c0 00 00 li r30,0 ffc0fabc: 41 9e 01 98 beq- cr7,ffc0fc54 <_Heap_Allocate_aligned_with_boundary+0x1ec> * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { if ( alignment == 0 ) { ffc0fac0: 2c 05 00 00 cmpwi r5,0 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; ffc0fac4: 3b 67 00 07 addi r27,r7,7 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; ffc0fac8: 23 89 00 04 subfic r28,r9,4 ffc0facc: 48 00 00 1c b ffc0fae8 <_Heap_Allocate_aligned_with_boundary+0x80> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0fad0: 3b e4 00 08 addi r31,r4,8 boundary ); } } if ( alloc_begin != 0 ) { ffc0fad4: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0fad8: 40 9e 00 e8 bne- cr7,ffc0fbc0 <_Heap_Allocate_aligned_with_boundary+0x158><== ALWAYS TAKEN break; } block = block->next; ffc0fadc: 80 84 00 08 lwz r4,8(r4) if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { ffc0fae0: 7f 9d 20 00 cmpw cr7,r29,r4 ffc0fae4: 41 9e 01 70 beq- cr7,ffc0fc54 <_Heap_Allocate_aligned_with_boundary+0x1ec> /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { ffc0fae8: 81 64 00 04 lwz r11,4(r4) while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; ffc0faec: 3b de 00 01 addi r30,r30,1 /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { ffc0faf0: 7f 80 58 40 cmplw cr7,r0,r11 ffc0faf4: 40 bc ff e8 bge- cr7,ffc0fadc <_Heap_Allocate_aligned_with_boundary+0x74> if ( alignment == 0 ) { ffc0faf8: 41 82 ff d8 beq+ ffc0fad0 <_Heap_Allocate_aligned_with_boundary+0x68> uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; ffc0fafc: 55 6b 00 3c rlwinm r11,r11,0,0,30 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; ffc0fb00: 80 7d 00 14 lwz r3,20(r29) uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; ffc0fb04: 7d 64 5a 14 add r11,r4,r11 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; ffc0fb08: 7f fc 5a 14 add r31,r28,r11 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc0fb0c: 7f ff 2b 96 divwu r31,r31,r5 ffc0fb10: 7f ff 29 d6 mullw r31,r31,r5 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; ffc0fb14: 7d 43 d8 50 subf r10,r3,r27 ffc0fb18: 7d 6a 5a 14 add r11,r10,r11 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { ffc0fb1c: 7f 8b f8 40 cmplw cr7,r11,r31 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc0fb20: 39 84 00 08 addi r12,r4,8 ffc0fb24: 40 9c 00 0c bge- cr7,ffc0fb30 <_Heap_Allocate_aligned_with_boundary+0xc8> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc0fb28: 7d 6b 2b 96 divwu r11,r11,r5 ffc0fb2c: 7f eb 29 d6 mullw r31,r11,r5 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { ffc0fb30: 41 92 00 60 beq- cr4,ffc0fb90 <_Heap_Allocate_aligned_with_boundary+0x128> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; ffc0fb34: 7d 5f 4a 14 add r10,r31,r9 ffc0fb38: 7d 6a 33 96 divwu r11,r10,r6 ffc0fb3c: 7d 6b 31 d6 mullw r11,r11,r6 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc0fb40: 7f 9f 58 40 cmplw cr7,r31,r11 ffc0fb44: 40 9c 00 4c bge- cr7,ffc0fb90 <_Heap_Allocate_aligned_with_boundary+0x128> ffc0fb48: 7f 8a 58 40 cmplw cr7,r10,r11 ffc0fb4c: 40 9d 00 44 ble- cr7,ffc0fb90 <_Heap_Allocate_aligned_with_boundary+0x128> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; ffc0fb50: 7d 0c 4a 14 add r8,r12,r9 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { ffc0fb54: 7f 88 58 40 cmplw cr7,r8,r11 ffc0fb58: 40 bd 00 10 ble+ cr7,ffc0fb68 <_Heap_Allocate_aligned_with_boundary+0x100> ffc0fb5c: 4b ff ff 80 b ffc0fadc <_Heap_Allocate_aligned_with_boundary+0x74> /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc0fb60: 40 99 00 30 ble- cr6,ffc0fb90 <_Heap_Allocate_aligned_with_boundary+0x128> if ( boundary_line < boundary_floor ) { ffc0fb64: 41 a5 ff 78 bgt- cr1,ffc0fadc <_Heap_Allocate_aligned_with_boundary+0x74><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; ffc0fb68: 7f e9 58 50 subf r31,r9,r11 ffc0fb6c: 7f ff 2b 96 divwu r31,r31,r5 ffc0fb70: 7f ff 29 d6 mullw r31,r31,r5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; ffc0fb74: 7d 5f 4a 14 add r10,r31,r9 ffc0fb78: 7d 6a 33 96 divwu r11,r10,r6 ffc0fb7c: 7d 6b 31 d6 mullw r11,r11,r6 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc0fb80: 7f 9f 58 40 cmplw cr7,r31,r11 ffc0fb84: 7f 0a 58 40 cmplw cr6,r10,r11 if ( boundary_line < boundary_floor ) { ffc0fb88: 7c 88 58 40 cmplw cr1,r8,r11 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { ffc0fb8c: 41 9c ff d4 blt+ cr7,ffc0fb60 <_Heap_Allocate_aligned_with_boundary+0xf8> boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { ffc0fb90: 7f 8c f8 40 cmplw cr7,r12,r31 ffc0fb94: 41 bd ff 48 bgt- cr7,ffc0fadc <_Heap_Allocate_aligned_with_boundary+0x74> uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; ffc0fb98: 7d 7f 3b 96 divwu r11,r31,r7 ffc0fb9c: 7d 6b 39 d6 mullw r11,r11,r7 ffc0fba0: 21 44 ff f8 subfic r10,r4,-8 ffc0fba4: 7d 6a 5a 14 add r11,r10,r11 if ( free_size >= min_block_size || free_size == 0 ) { ffc0fba8: 7f 83 58 40 cmplw cr7,r3,r11 ffc0fbac: 40 bd ff 28 ble- cr7,ffc0fad4 <_Heap_Allocate_aligned_with_boundary+0x6c> ffc0fbb0: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0fbb4: 40 be ff 28 bne- cr7,ffc0fadc <_Heap_Allocate_aligned_with_boundary+0x74> boundary ); } } if ( alloc_begin != 0 ) { ffc0fbb8: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0fbbc: 41 9e ff 20 beq+ cr7,ffc0fadc <_Heap_Allocate_aligned_with_boundary+0x74><== NEVER TAKEN block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; ffc0fbc0: 80 1d 00 4c lwz r0,76(r29) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc0fbc4: 7d 26 4b 78 mr r6,r9 ffc0fbc8: 7f a3 eb 78 mr r3,r29 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; ffc0fbcc: 7c 00 f2 14 add r0,r0,r30 ffc0fbd0: 90 1d 00 4c stw r0,76(r29) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc0fbd4: 7f e5 fb 78 mr r5,r31 ffc0fbd8: 4b ff a2 25 bl ffc09dfc <_Heap_Block_allocate> ffc0fbdc: 7f e3 fb 78 mr r3,r31 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; ffc0fbe0: 80 1d 00 44 lwz r0,68(r29) ffc0fbe4: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0fbe8: 40 9c 00 40 bge- cr7,ffc0fc28 <_Heap_Allocate_aligned_with_boundary+0x1c0> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } ffc0fbec: 80 01 00 24 lwz r0,36(r1) ffc0fbf0: 81 81 00 08 lwz r12,8(r1) ffc0fbf4: 7c 08 03 a6 mtlr r0 ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; ffc0fbf8: 93 dd 00 44 stw r30,68(r29) } return (void *) alloc_begin; } ffc0fbfc: 7d 80 81 20 mtcrf 8,r12 ffc0fc00: 83 61 00 0c lwz r27,12(r1) ffc0fc04: 83 81 00 10 lwz r28,16(r1) ffc0fc08: 83 a1 00 14 lwz r29,20(r1) ffc0fc0c: 83 c1 00 18 lwz r30,24(r1) ffc0fc10: 83 e1 00 1c lwz r31,28(r1) ffc0fc14: 38 21 00 20 addi r1,r1,32 ffc0fc18: 4e 80 00 20 blr /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { ffc0fc1c: 7f 89 30 40 cmplw cr7,r9,r6 ffc0fc20: 40 bd 00 3c ble+ cr7,ffc0fc5c <_Heap_Allocate_aligned_with_boundary+0x1f4> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; ffc0fc24: 38 60 00 00 li r3,0 } return (void *) alloc_begin; } ffc0fc28: 80 01 00 24 lwz r0,36(r1) ffc0fc2c: 81 81 00 08 lwz r12,8(r1) ffc0fc30: 7c 08 03 a6 mtlr r0 ffc0fc34: 83 61 00 0c lwz r27,12(r1) ffc0fc38: 83 81 00 10 lwz r28,16(r1) ffc0fc3c: 7d 80 81 20 mtcrf 8,r12 ffc0fc40: 83 a1 00 14 lwz r29,20(r1) ffc0fc44: 83 c1 00 18 lwz r30,24(r1) ffc0fc48: 83 e1 00 1c lwz r31,28(r1) ffc0fc4c: 38 21 00 20 addi r1,r1,32 ffc0fc50: 4e 80 00 20 blr if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { ffc0fc54: 38 60 00 00 li r3,0 ffc0fc58: 4b ff ff 88 b ffc0fbe0 <_Heap_Allocate_aligned_with_boundary+0x178> if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { ffc0fc5c: 2f 85 00 00 cmpwi cr7,r5,0 ffc0fc60: 40 be fe 54 bne- cr7,ffc0fab4 <_Heap_Allocate_aligned_with_boundary+0x4c> ffc0fc64: 7c e5 3b 78 mr r5,r7 ffc0fc68: 4b ff fe 4c b ffc0fab4 <_Heap_Allocate_aligned_with_boundary+0x4c> =============================================================================== ffc14c44 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { ffc14c44: 7c 08 02 a6 mflr r0 ffc14c48: 94 21 ff f8 stwu r1,-8(r1) ffc14c4c: 7c 69 1b 78 mr r9,r3 ffc14c50: 90 01 00 0c stw r0,12(r1) Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; ffc14c54: 80 03 00 18 lwz r0,24(r3) uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; ffc14c58: 81 43 00 24 lwz r10,36(r3) uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; ffc14c5c: 7f 84 00 40 cmplw cr7,r4,r0 uintptr_t const heap_area_end = heap->area_end; ffc14c60: 80 03 00 1c lwz r0,28(r3) uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; ffc14c64: 40 9c 00 bc bge- cr7,ffc14d20 <_Heap_Extend+0xdc> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { ffc14c68: 7f 84 00 00 cmpw cr7,r4,r0 ffc14c6c: 38 60 00 02 li r3,2 ffc14c70: 41 9e 00 14 beq- cr7,ffc14c84 <_Heap_Extend+0x40> _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } ffc14c74: 80 01 00 0c lwz r0,12(r1) ffc14c78: 38 21 00 08 addi r1,r1,8 ffc14c7c: 7c 08 03 a6 mtlr r0 ffc14c80: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc14c84: 81 69 00 10 lwz r11,16(r9) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; ffc14c88: 7c 84 2a 14 add r4,r4,r5 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end ffc14c8c: 20 0a ff f8 subfic r0,r10,-8 * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; ffc14c90: 90 89 00 1c stw r4,28(r9) extend_size = new_heap_area_end ffc14c94: 7c 00 22 14 add r0,r0,r4 ffc14c98: 7c 00 5b 96 divwu r0,r0,r11 ffc14c9c: 7c 00 59 d6 mullw r0,r0,r11 - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; if( extend_size >= heap->min_block_size ) { ffc14ca0: 38 60 00 00 li r3,0 extend_size = new_heap_area_end - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; ffc14ca4: 90 06 00 00 stw r0,0(r6) if( extend_size >= heap->min_block_size ) { ffc14ca8: 81 69 00 14 lwz r11,20(r9) ffc14cac: 7f 8b 00 40 cmplw cr7,r11,r0 ffc14cb0: 41 9d ff c4 bgt+ cr7,ffc14c74 <_Heap_Extend+0x30> <== NEVER TAKEN uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; ffc14cb4: 80 ea 00 04 lwz r7,4(r10) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc14cb8: 7d 60 52 14 add r11,r0,r10 Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = ffc14cbc: 81 09 00 20 lwz r8,32(r9) /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); ffc14cc0: 38 8a 00 08 addi r4,r10,8 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; ffc14cc4: 54 e7 07 fe clrlwi r7,r7,31 new_last_block->size_and_flag = ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; ffc14cc8: 91 69 00 24 stw r11,36(r9) if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = ffc14ccc: 7d 0b 40 50 subf r8,r11,r8 ffc14cd0: 7c 07 3b 78 or r7,r0,r7 ffc14cd4: 61 08 00 01 ori r8,r8,1 ffc14cd8: 90 ea 00 04 stw r7,4(r10) /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); ffc14cdc: 7d 23 4b 78 mr r3,r9 if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = ffc14ce0: 91 0b 00 04 stw r8,4(r11) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ffc14ce4: 80 e9 00 2c lwz r7,44(r9) ++stats->used_blocks; ffc14ce8: 81 09 00 40 lwz r8,64(r9) --stats->frees; /* Do not count subsequent call as actual free() */ ffc14cec: 81 49 00 50 lwz r10,80(r9) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ffc14cf0: 7c 07 02 14 add r0,r7,r0 ++stats->used_blocks; ffc14cf4: 39 08 00 01 addi r8,r8,1 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ffc14cf8: 90 09 00 2c stw r0,44(r9) ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ ffc14cfc: 39 4a ff ff addi r10,r10,-1 heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ++stats->used_blocks; ffc14d00: 91 09 00 40 stw r8,64(r9) --stats->frees; /* Do not count subsequent call as actual free() */ ffc14d04: 91 49 00 50 stw r10,80(r9) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); ffc14d08: 4b ff 91 b1 bl ffc0deb8 <_Heap_Free> } return HEAP_EXTEND_SUCCESSFUL; } ffc14d0c: 80 01 00 0c lwz r0,12(r1) /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); ffc14d10: 38 60 00 00 li r3,0 } return HEAP_EXTEND_SUCCESSFUL; } ffc14d14: 7c 08 03 a6 mtlr r0 ffc14d18: 38 21 00 08 addi r1,r1,8 ffc14d1c: 4e 80 00 20 blr * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { ffc14d20: 7f 84 00 40 cmplw cr7,r4,r0 ffc14d24: 38 60 00 01 li r3,1 ffc14d28: 40 9c ff 40 bge+ cr7,ffc14c68 <_Heap_Extend+0x24> _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } ffc14d2c: 80 01 00 0c lwz r0,12(r1) ffc14d30: 38 21 00 08 addi r1,r1,8 ffc14d34: 7c 08 03 a6 mtlr r0 ffc14d38: 4e 80 00 20 blr =============================================================================== ffc0fc6c <_Heap_Free>: 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 ) ffc0fc6c: 80 03 00 10 lwz r0,16(r3) #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { ffc0fc70: 7c 69 1b 78 mr r9,r3 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; ffc0fc74: 81 63 00 20 lwz r11,32(r3) 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 ) ffc0fc78: 7d 44 03 96 divwu r10,r4,r0 ffc0fc7c: 7d 4a 01 d6 mullw r10,r10,r0 ffc0fc80: 39 4a ff f8 addi r10,r10,-8 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 ffc0fc84: 7f 8a 58 40 cmplw cr7,r10,r11 ffc0fc88: 41 9c 00 c0 blt- cr7,ffc0fd48 <_Heap_Free+0xdc> && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0fc8c: 80 03 00 24 lwz r0,36(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 ffc0fc90: 7f 8a 00 40 cmplw cr7,r10,r0 ffc0fc94: 41 9d 00 b4 bgt- cr7,ffc0fd48 <_Heap_Free+0xdc> - 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; ffc0fc98: 80 ca 00 04 lwz r6,4(r10) ffc0fc9c: 54 c7 00 3c rlwinm r7,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); ffc0fca0: 7d 0a 3a 14 add r8,r10,r7 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 ffc0fca4: 7f 8b 40 40 cmplw cr7,r11,r8 ffc0fca8: 41 9d 00 a0 bgt- cr7,ffc0fd48 <_Heap_Free+0xdc> <== NEVER TAKEN ffc0fcac: 7f 80 40 40 cmplw cr7,r0,r8 ffc0fcb0: 41 9c 00 98 blt- cr7,ffc0fd48 <_Heap_Free+0xdc> <== 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; ffc0fcb4: 80 a8 00 04 lwz r5,4(r8) if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc0fcb8: 70 a3 00 01 andi. r3,r5,1 ffc0fcbc: 41 82 00 8c beq- ffc0fd48 <_Heap_Free+0xdc> <== NEVER TAKEN _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block ffc0fcc0: 7f 80 40 00 cmpw cr7,r0,r8 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0fcc4: 54 a4 00 3c rlwinm r4,r5,0,0,30 ffc0fcc8: 38 a0 00 00 li r5,0 ffc0fccc: 41 9e 00 14 beq- cr7,ffc0fce0 <_Heap_Free+0x74> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) ffc0fcd0: 7c a8 22 14 add r5,r8,r4 ffc0fcd4: 80 a5 00 04 lwz r5,4(r5) ffc0fcd8: 54 a5 07 fe clrlwi r5,r5,31 ffc0fcdc: 68 a5 00 01 xori r5,r5,1 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 ) ) { ffc0fce0: 70 c3 00 01 andi. r3,r6,1 ffc0fce4: 40 82 00 6c bne- ffc0fd50 <_Heap_Free+0xe4> uintptr_t const prev_size = block->prev_size; ffc0fce8: 80 6a 00 00 lwz r3,0(r10) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc0fcec: 7c c3 50 50 subf r6,r3,r10 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 ffc0fcf0: 7f 8b 30 40 cmplw cr7,r11,r6 ffc0fcf4: 41 9d 00 54 bgt- cr7,ffc0fd48 <_Heap_Free+0xdc> <== NEVER TAKEN ffc0fcf8: 7f 80 30 40 cmplw cr7,r0,r6 ffc0fcfc: 41 9c 00 4c blt- cr7,ffc0fd48 <_Heap_Free+0xdc> <== NEVER TAKEN 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) ) { ffc0fd00: 80 06 00 04 lwz r0,4(r6) ffc0fd04: 70 0b 00 01 andi. r11,r0,1 ffc0fd08: 41 82 00 40 beq- ffc0fd48 <_Heap_Free+0xdc> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ ffc0fd0c: 2f 85 00 00 cmpwi cr7,r5,0 ffc0fd10: 41 9e 00 e8 beq- cr7,ffc0fdf8 <_Heap_Free+0x18c> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc0fd14: 81 89 00 38 lwz r12,56(r9) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; ffc0fd18: 7c 87 22 14 add r4,r7,r4 } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; ffc0fd1c: 81 68 00 0c lwz r11,12(r8) ffc0fd20: 7c 64 1a 14 add r3,r4,r3 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; ffc0fd24: 81 48 00 08 lwz r10,8(r8) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0fd28: 60 60 00 01 ori r0,r3,1 } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc0fd2c: 39 0c ff ff addi r8,r12,-1 ffc0fd30: 91 09 00 38 stw r8,56(r9) Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; ffc0fd34: 91 6a 00 0c stw r11,12(r10) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; ffc0fd38: 7c 66 19 2e stwx r3,r6,r3 if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0fd3c: 90 06 00 04 stw r0,4(r6) RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; ffc0fd40: 91 4b 00 08 stw r10,8(r11) ffc0fd44: 48 00 00 3c b ffc0fd80 <_Heap_Free+0x114> /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); ffc0fd48: 38 60 00 00 li r3,0 } ffc0fd4c: 4e 80 00 20 blr uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ ffc0fd50: 2f 85 00 00 cmpwi cr7,r5,0 ffc0fd54: 41 9e 00 58 beq- cr7,ffc0fdac <_Heap_Free+0x140> Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; ffc0fd58: 80 c8 00 0c lwz r6,12(r8) uintptr_t const size = block_size + next_block_size; ffc0fd5c: 7c 84 3a 14 add r4,r4,r7 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; ffc0fd60: 81 68 00 08 lwz r11,8(r8) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0fd64: 60 80 00 01 ori r0,r4,1 Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; ffc0fd68: 90 ca 00 0c stw r6,12(r10) ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; ffc0fd6c: 91 6a 00 08 stw r11,8(r10) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; ffc0fd70: 7c 8a 21 2e stwx r4,r10,r4 next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0fd74: 90 0a 00 04 stw r0,4(r10) new_block->prev = prev; next->prev = new_block; prev->next = new_block; ffc0fd78: 91 46 00 08 stw r10,8(r6) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; ffc0fd7c: 91 4b 00 0c stw r10,12(r11) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; ffc0fd80: 80 09 00 30 lwz r0,48(r9) ffc0fd84: 38 60 00 01 li r3,1 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc0fd88: 81 69 00 40 lwz r11,64(r9) ++stats->frees; ffc0fd8c: 81 49 00 50 lwz r10,80(r9) stats->free_size += block_size; ffc0fd90: 7c e0 3a 14 add r7,r0,r7 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc0fd94: 39 6b ff ff addi r11,r11,-1 ++stats->frees; stats->free_size += block_size; ffc0fd98: 90 e9 00 30 stw r7,48(r9) } } /* Statistics */ --stats->used_blocks; ++stats->frees; ffc0fd9c: 38 0a 00 01 addi r0,r10,1 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc0fda0: 91 69 00 40 stw r11,64(r9) ++stats->frees; ffc0fda4: 90 09 00 50 stw r0,80(r9) stats->free_size += block_size; return( true ); ffc0fda8: 4e 80 00 20 blr next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; ffc0fdac: 60 e0 00 01 ori r0,r7,1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; ffc0fdb0: 7c ea 39 2e stwx r7,r10,r7 next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; ffc0fdb4: 90 0a 00 04 stw r0,4(r10) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc0fdb8: 80 08 00 04 lwz r0,4(r8) ) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; ffc0fdbc: 91 2a 00 0c stw r9,12(r10) ffc0fdc0: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc0fdc4: 90 08 00 04 stw r0,4(r8) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; ffc0fdc8: 81 09 00 38 lwz r8,56(r9) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; ffc0fdcc: 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; ffc0fdd0: 38 08 00 01 addi r0,r8,1 #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; ffc0fdd4: 7f 80 58 40 cmplw cr7,r0,r11 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; ffc0fdd8: 81 69 00 08 lwz r11,8(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; ffc0fddc: 90 09 00 38 stw r0,56(r9) new_block->next = next; ffc0fde0: 91 6a 00 08 stw r11,8(r10) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; ffc0fde4: 91 4b 00 0c stw r10,12(r11) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; ffc0fde8: 91 49 00 08 stw r10,8(r9) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; ffc0fdec: 40 bd ff 94 ble- cr7,ffc0fd80 <_Heap_Free+0x114> next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; ffc0fdf0: 90 09 00 3c stw r0,60(r9) ffc0fdf4: 4b ff ff 8c b ffc0fd80 <_Heap_Free+0x114> prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; ffc0fdf8: 7c 67 1a 14 add r3,r7,r3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0fdfc: 60 60 00 01 ori r0,r3,1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; ffc0fe00: 7c 6a 39 2e stwx r3,r10,r7 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; ffc0fe04: 90 06 00 04 stw r0,4(r6) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc0fe08: 80 08 00 04 lwz r0,4(r8) ffc0fe0c: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc0fe10: 90 08 00 04 stw r0,4(r8) ffc0fe14: 4b ff ff 6c b ffc0fd80 <_Heap_Free+0x114> =============================================================================== ffc14da0 <_Heap_Get_information>: Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; ffc14da0: 80 03 00 24 lwz r0,36(r3) _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; ffc14da4: 39 60 00 00 li r11,0 void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; ffc14da8: 81 23 00 20 lwz r9,32(r3) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { ffc14dac: 39 40 00 08 li r10,8 the_info->Free.number = 0; the_info->Free.total = 0; the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; ffc14db0: 91 64 00 10 stw r11,16(r4) while ( the_block != end ) { ffc14db4: 7f 89 00 00 cmpw cr7,r9,r0 Heap_Block *const end = the_heap->last_block; _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; ffc14db8: 91 64 00 00 stw r11,0(r4) the_info->Free.total = 0; ffc14dbc: 91 64 00 08 stw r11,8(r4) the_info->Free.largest = 0; ffc14dc0: 91 64 00 04 stw r11,4(r4) the_info->Used.number = 0; ffc14dc4: 91 64 00 0c stw r11,12(r4) the_info->Used.total = 0; ffc14dc8: 91 64 00 14 stw r11,20(r4) the_info->Used.largest = 0; while ( the_block != end ) { ffc14dcc: 41 9e 00 60 beq- cr7,ffc14e2c <_Heap_Get_information+0x8c><== NEVER TAKEN ffc14dd0: 81 09 00 04 lwz r8,4(r9) uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; ffc14dd4: 38 a4 00 0c addi r5,r4,12 ffc14dd8: 55 0a 00 3c rlwinm r10,r8,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc14ddc: 7d 29 52 14 add r9,r9,r10 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc14de0: 81 09 00 04 lwz r8,4(r9) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { ffc14de4: 7f 80 48 00 cmpw cr7,r0,r9 uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) ffc14de8: 71 0b 00 01 andi. r11,r8,1 ffc14dec: 7c ab 2b 78 mr r11,r5 ffc14df0: 40 82 00 08 bne- ffc14df8 <_Heap_Get_information+0x58> ffc14df4: 7c 8b 23 78 mr r11,r4 else info = &the_info->Free; info->number++; info->total += the_size; if ( info->largest < the_size ) ffc14df8: 80 eb 00 04 lwz r7,4(r11) if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; else info = &the_info->Free; info->number++; ffc14dfc: 80 cb 00 00 lwz r6,0(r11) info->total += the_size; if ( info->largest < the_size ) ffc14e00: 7f 07 50 40 cmplw cr6,r7,r10 info = &the_info->Used; else info = &the_info->Free; info->number++; info->total += the_size; ffc14e04: 80 eb 00 08 lwz r7,8(r11) if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; else info = &the_info->Free; info->number++; ffc14e08: 38 c6 00 01 addi r6,r6,1 info->total += the_size; ffc14e0c: 7c e7 52 14 add r7,r7,r10 if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; else info = &the_info->Free; info->number++; ffc14e10: 90 cb 00 00 stw r6,0(r11) info->total += the_size; ffc14e14: 90 eb 00 08 stw r7,8(r11) if ( info->largest < the_size ) ffc14e18: 40 98 00 08 bge- cr6,ffc14e20 <_Heap_Get_information+0x80> info->largest = the_size; ffc14e1c: 91 4b 00 04 stw r10,4(r11) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { ffc14e20: 40 9e ff b8 bne+ cr7,ffc14dd8 <_Heap_Get_information+0x38> ffc14e24: 81 44 00 14 lwz r10,20(r4) ffc14e28: 39 4a 00 08 addi r10,r10,8 /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; ffc14e2c: 91 44 00 14 stw r10,20(r4) } ffc14e30: 4e 80 00 20 blr =============================================================================== ffc1e6ec <_Heap_Size_of_alloc_area>: 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 ) ffc1e6ec: 80 03 00 10 lwz r0,16(r3) 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; ffc1e6f0: 81 23 00 20 lwz r9,32(r3) 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 ) ffc1e6f4: 7d 64 03 96 divwu r11,r4,r0 ffc1e6f8: 7d 6b 01 d6 mullw r11,r11,r0 ffc1e6fc: 39 6b ff f8 addi r11,r11,-8 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 ffc1e700: 7f 8b 48 40 cmplw cr7,r11,r9 ffc1e704: 41 9c 00 4c blt- cr7,ffc1e750 <_Heap_Size_of_alloc_area+0x64><== NEVER TAKEN && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc1e708: 81 43 00 24 lwz r10,36(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 ffc1e70c: 7f 8b 50 40 cmplw cr7,r11,r10 ffc1e710: 41 9d 00 40 bgt- cr7,ffc1e750 <_Heap_Size_of_alloc_area+0x64> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc1e714: 80 0b 00 04 lwz r0,4(r11) ffc1e718: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc1e71c: 7d 6b 02 14 add r11,r11,r0 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 ffc1e720: 7f 89 58 40 cmplw cr7,r9,r11 ffc1e724: 41 9d 00 2c bgt- cr7,ffc1e750 <_Heap_Size_of_alloc_area+0x64><== NEVER TAKEN ffc1e728: 7f 8a 58 40 cmplw cr7,r10,r11 ffc1e72c: 41 9c 00 24 blt- cr7,ffc1e750 <_Heap_Size_of_alloc_area+0x64><== NEVER TAKEN } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( ffc1e730: 80 0b 00 04 lwz r0,4(r11) ffc1e734: 70 09 00 01 andi. r9,r0,1 ffc1e738: 41 82 00 18 beq- ffc1e750 <_Heap_Size_of_alloc_area+0x64><== NEVER TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; ffc1e73c: 20 84 00 04 subfic r4,r4,4 ffc1e740: 7d 64 5a 14 add r11,r4,r11 ffc1e744: 91 65 00 00 stw r11,0(r5) ffc1e748: 38 60 00 01 li r3,1 return true; ffc1e74c: 4e 80 00 20 blr ffc1e750: 38 60 00 00 li r3,0 } ffc1e754: 4e 80 00 20 blr =============================================================================== ffc0abd8 <_Heap_Walk>: uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; ffc0abd8: 2f 85 00 00 cmpwi cr7,r5,0 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { ffc0abdc: 94 21 ff 98 stwu r1,-104(r1) ffc0abe0: 7c 08 02 a6 mflr r0 ffc0abe4: 93 21 00 4c stw r25,76(r1) ffc0abe8: 90 01 00 6c stw r0,108(r1) ffc0abec: 93 41 00 50 stw r26,80(r1) ffc0abf0: 93 61 00 54 stw r27,84(r1) ffc0abf4: 93 81 00 58 stw r28,88(r1) ffc0abf8: 7c 9c 23 78 mr r28,r4 ffc0abfc: 93 c1 00 60 stw r30,96(r1) ffc0ac00: 93 e1 00 64 stw r31,100(r1) ffc0ac04: 7c 7f 1b 78 mr r31,r3 ffc0ac08: 91 c1 00 20 stw r14,32(r1) ffc0ac0c: 91 e1 00 24 stw r15,36(r1) ffc0ac10: 92 01 00 28 stw r16,40(r1) ffc0ac14: 92 21 00 2c stw r17,44(r1) ffc0ac18: 92 41 00 30 stw r18,48(r1) ffc0ac1c: 92 61 00 34 stw r19,52(r1) ffc0ac20: 92 81 00 38 stw r20,56(r1) ffc0ac24: 92 a1 00 3c stw r21,60(r1) ffc0ac28: 92 c1 00 40 stw r22,64(r1) ffc0ac2c: 92 e1 00 44 stw r23,68(r1) ffc0ac30: 93 01 00 48 stw r24,72(r1) ffc0ac34: 93 a1 00 5c stw r29,92(r1) uintptr_t const page_size = heap->page_size; ffc0ac38: 83 63 00 10 lwz r27,16(r3) uintptr_t const min_block_size = heap->min_block_size; ffc0ac3c: 83 43 00 14 lwz r26,20(r3) Heap_Block *const last_block = heap->last_block; ffc0ac40: 83 23 00 24 lwz r25,36(r3) Heap_Block *block = heap->first_block; ffc0ac44: 83 c3 00 20 lwz r30,32(r3) Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; ffc0ac48: 40 9e 00 7c bne- cr7,ffc0acc4 <_Heap_Walk+0xec> ffc0ac4c: 3d 20 ff c1 lis r9,-63 ffc0ac50: 39 29 ab d4 addi r9,r9,-21548 ffc0ac54: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0ac58: 3d 20 00 00 lis r9,0 ffc0ac5c: 80 09 27 d4 lwz r0,10196(r9) ffc0ac60: 2f 80 00 03 cmpwi cr7,r0,3 ffc0ac64: 41 9e 00 7c beq- cr7,ffc0ace0 <_Heap_Walk+0x108> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { ffc0ac68: 38 60 00 01 li r3,1 block = next_block; } return true; } ffc0ac6c: 80 01 00 6c lwz r0,108(r1) ffc0ac70: 81 c1 00 20 lwz r14,32(r1) ffc0ac74: 7c 08 03 a6 mtlr r0 ffc0ac78: 81 e1 00 24 lwz r15,36(r1) ffc0ac7c: 82 01 00 28 lwz r16,40(r1) ffc0ac80: 82 21 00 2c lwz r17,44(r1) ffc0ac84: 82 41 00 30 lwz r18,48(r1) ffc0ac88: 82 61 00 34 lwz r19,52(r1) ffc0ac8c: 82 81 00 38 lwz r20,56(r1) ffc0ac90: 82 a1 00 3c lwz r21,60(r1) ffc0ac94: 82 c1 00 40 lwz r22,64(r1) ffc0ac98: 82 e1 00 44 lwz r23,68(r1) ffc0ac9c: 83 01 00 48 lwz r24,72(r1) ffc0aca0: 83 21 00 4c lwz r25,76(r1) ffc0aca4: 83 41 00 50 lwz r26,80(r1) ffc0aca8: 83 61 00 54 lwz r27,84(r1) ffc0acac: 83 81 00 58 lwz r28,88(r1) ffc0acb0: 83 a1 00 5c lwz r29,92(r1) ffc0acb4: 83 c1 00 60 lwz r30,96(r1) ffc0acb8: 83 e1 00 64 lwz r31,100(r1) ffc0acbc: 38 21 00 68 addi r1,r1,104 ffc0acc0: 4e 80 00 20 blr uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; ffc0acc4: 3d 20 ff c1 lis r9,-63 ffc0acc8: 39 29 b1 f0 addi r9,r9,-19984 ffc0accc: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0acd0: 3d 20 00 00 lis r9,0 ffc0acd4: 80 09 27 d4 lwz r0,10196(r9) ffc0acd8: 2f 80 00 03 cmpwi cr7,r0,3 ffc0acdc: 40 9e ff 8c bne+ cr7,ffc0ac68 <_Heap_Walk+0x90> <== NEVER TAKEN 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)( ffc0ace0: 80 1f 00 0c lwz r0,12(r31) ffc0ace4: 3c a0 ff c2 lis r5,-62 ffc0ace8: 81 1f 00 18 lwz r8,24(r31) ffc0acec: 38 a5 0c 20 addi r5,r5,3104 ffc0acf0: 81 3f 00 1c lwz r9,28(r31) ffc0acf4: 7f 83 e3 78 mr r3,r28 ffc0acf8: 81 7f 00 08 lwz r11,8(r31) ffc0acfc: 38 80 00 00 li r4,0 ffc0ad00: 90 01 00 10 stw r0,16(r1) ffc0ad04: 7f 66 db 78 mr r6,r27 ffc0ad08: 7f 47 d3 78 mr r7,r26 ffc0ad0c: 80 01 00 18 lwz r0,24(r1) ffc0ad10: 7f ca f3 78 mr r10,r30 ffc0ad14: 91 61 00 0c stw r11,12(r1) ffc0ad18: 7c 09 03 a6 mtctr r0 ffc0ad1c: 93 21 00 08 stw r25,8(r1) ffc0ad20: 4c c6 31 82 crclr 4*cr1+eq ffc0ad24: 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 ) { ffc0ad28: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0ad2c: 41 9e 00 d0 beq- cr7,ffc0adfc <_Heap_Walk+0x224> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { ffc0ad30: 73 67 00 07 andi. r7,r27,7 ffc0ad34: 40 82 00 f0 bne- ffc0ae24 <_Heap_Walk+0x24c> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { ffc0ad38: 7c 1a db 96 divwu r0,r26,r27 ffc0ad3c: 7c 00 d9 d6 mullw r0,r0,r27 ffc0ad40: 7f 9a 00 00 cmpw cr7,r26,r0 ffc0ad44: 40 9e 00 f4 bne- cr7,ffc0ae38 <_Heap_Walk+0x260> ); return false; } if ( ffc0ad48: 38 1e 00 08 addi r0,r30,8 ffc0ad4c: 7d 20 db 96 divwu r9,r0,r27 ffc0ad50: 7d 29 d9 d6 mullw r9,r9,r27 ffc0ad54: 7f 80 48 00 cmpw cr7,r0,r9 ffc0ad58: 40 9e 00 f4 bne- cr7,ffc0ae4c <_Heap_Walk+0x274> 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; ffc0ad5c: 83 1e 00 04 lwz r24,4(r30) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { ffc0ad60: 73 00 00 01 andi. r0,r24,1 ffc0ad64: 41 82 00 fc beq- ffc0ae60 <_Heap_Walk+0x288> ); return false; } if ( first_block->prev_size != page_size ) { ffc0ad68: 80 de 00 00 lwz r6,0(r30) ffc0ad6c: 7f 9b 30 00 cmpw cr7,r27,r6 ffc0ad70: 40 9e 00 60 bne- cr7,ffc0add0 <_Heap_Walk+0x1f8> ); return false; } if ( _Heap_Is_free( last_block ) ) { ffc0ad74: 81 39 00 04 lwz r9,4(r25) ffc0ad78: 55 29 00 3c rlwinm r9,r9,0,0,30 ffc0ad7c: 7d 39 4a 14 add r9,r25,r9 ffc0ad80: 81 29 00 04 lwz r9,4(r9) ffc0ad84: 71 27 00 01 andi. r7,r9,1 ffc0ad88: 41 82 04 28 beq- ffc0b1b0 <_Heap_Walk+0x5d8> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0ad8c: 80 df 00 08 lwz r6,8(r31) int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; ffc0ad90: 80 bf 00 10 lwz r5,16(r31) const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { ffc0ad94: 7f 9f 30 00 cmpw cr7,r31,r6 ffc0ad98: 41 9e 01 78 beq- cr7,ffc0af10 <_Heap_Walk+0x338> 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; ffc0ad9c: 81 5f 00 20 lwz r10,32(r31) 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 ffc0ada0: 7f 8a 30 40 cmplw cr7,r10,r6 ffc0ada4: 40 9d 00 cc ble- cr7,ffc0ae70 <_Heap_Walk+0x298> <== ALWAYS TAKEN if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( ffc0ada8: 3c a0 ff c2 lis r5,-62 ffc0adac: 7f 83 e3 78 mr r3,r28 ffc0adb0: 38 a5 0d b4 addi r5,r5,3508 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( ffc0adb4: 80 01 00 18 lwz r0,24(r1) ffc0adb8: 38 80 00 01 li r4,1 ffc0adbc: 7c 09 03 a6 mtctr r0 ffc0adc0: 4c c6 31 82 crclr 4*cr1+eq ffc0adc4: 4e 80 04 21 bctrl ffc0adc8: 38 60 00 00 li r3,0 ffc0adcc: 4b ff fe a0 b ffc0ac6c <_Heap_Walk+0x94> return false; } if ( first_block->prev_size != page_size ) { (*printer)( ffc0add0: 3c a0 ff c2 lis r5,-62 ffc0add4: 7f 83 e3 78 mr r3,r28 ffc0add8: 38 a5 0d 70 addi r5,r5,3440 ffc0addc: 7f 67 db 78 mr r7,r27 return false; } if ( next_block_begin <= block_begin ) { (*printer)( ffc0ade0: 80 01 00 18 lwz r0,24(r1) ffc0ade4: 38 80 00 01 li r4,1 ffc0ade8: 7c 09 03 a6 mtctr r0 ffc0adec: 4c c6 31 82 crclr 4*cr1+eq ffc0adf0: 4e 80 04 21 bctrl ffc0adf4: 38 60 00 00 li r3,0 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; ffc0adf8: 4b ff fe 74 b ffc0ac6c <_Heap_Walk+0x94> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); ffc0adfc: 3c a0 ff c2 lis r5,-62 ffc0ae00: 7f 83 e3 78 mr r3,r28 ffc0ae04: 38 a5 0c b4 addi r5,r5,3252 return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( ffc0ae08: 80 01 00 18 lwz r0,24(r1) ffc0ae0c: 38 80 00 01 li r4,1 ffc0ae10: 7c 09 03 a6 mtctr r0 ffc0ae14: 4c c6 31 82 crclr 4*cr1+eq ffc0ae18: 4e 80 04 21 bctrl ffc0ae1c: 38 60 00 00 li r3,0 ffc0ae20: 4b ff fe 4c b ffc0ac6c <_Heap_Walk+0x94> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( ffc0ae24: 3c a0 ff c2 lis r5,-62 ffc0ae28: 7f 83 e3 78 mr r3,r28 ffc0ae2c: 38 a5 0c c8 addi r5,r5,3272 ffc0ae30: 7f 66 db 78 mr r6,r27 ffc0ae34: 4b ff ff 80 b ffc0adb4 <_Heap_Walk+0x1dc> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( ffc0ae38: 3c a0 ff c2 lis r5,-62 ffc0ae3c: 7f 83 e3 78 mr r3,r28 ffc0ae40: 38 a5 0c e8 addi r5,r5,3304 ffc0ae44: 7f 46 d3 78 mr r6,r26 ffc0ae48: 4b ff ff 6c b ffc0adb4 <_Heap_Walk+0x1dc> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( ffc0ae4c: 3c a0 ff c2 lis r5,-62 ffc0ae50: 7f 83 e3 78 mr r3,r28 ffc0ae54: 38 a5 0d 0c addi r5,r5,3340 ffc0ae58: 7f c6 f3 78 mr r6,r30 ffc0ae5c: 4b ff ff 58 b ffc0adb4 <_Heap_Walk+0x1dc> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( ffc0ae60: 3c a0 ff c2 lis r5,-62 ffc0ae64: 7f 83 e3 78 mr r3,r28 ffc0ae68: 38 a5 0d 40 addi r5,r5,3392 ffc0ae6c: 4b ff ff 9c b ffc0ae08 <_Heap_Walk+0x230> && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0ae70: 81 1f 00 24 lwz r8,36(r31) 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 ffc0ae74: 7f 88 30 40 cmplw cr7,r8,r6 ffc0ae78: 41 bc ff 30 blt- cr7,ffc0ada8 <_Heap_Walk+0x1d0> <== NEVER TAKEN ); return false; } if ( ffc0ae7c: 39 26 00 08 addi r9,r6,8 ffc0ae80: 7d 69 2b 96 divwu r11,r9,r5 ffc0ae84: 7d 6b 29 d6 mullw r11,r11,r5 ffc0ae88: 7f 89 58 00 cmpw cr7,r9,r11 ffc0ae8c: 40 9e 03 34 bne- cr7,ffc0b1c0 <_Heap_Walk+0x5e8> <== NEVER TAKEN ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0ae90: 81 26 00 04 lwz r9,4(r6) ffc0ae94: 55 29 00 3c rlwinm r9,r9,0,0,30 ffc0ae98: 7d 26 4a 14 add r9,r6,r9 ffc0ae9c: 81 29 00 04 lwz r9,4(r9) ffc0aea0: 71 27 00 01 andi. r7,r9,1 ffc0aea4: 40 82 03 3c bne- ffc0b1e0 <_Heap_Walk+0x608> <== NEVER TAKEN ); return false; } if ( free_block->prev != prev_block ) { ffc0aea8: 80 e6 00 0c lwz r7,12(r6) ffc0aeac: 7f 9f 38 00 cmpw cr7,r31,r7 ffc0aeb0: 41 be 00 48 beq+ cr7,ffc0aef8 <_Heap_Walk+0x320> <== ALWAYS TAKEN ffc0aeb4: 48 00 03 1c b ffc0b1d0 <_Heap_Walk+0x5f8> <== NOT EXECUTED ffc0aeb8: 41 b8 fe f0 blt- cr6,ffc0ada8 <_Heap_Walk+0x1d0> ); return false; } if ( ffc0aebc: 39 66 00 08 addi r11,r6,8 ffc0aec0: 41 a4 fe e8 blt- cr1,ffc0ada8 <_Heap_Walk+0x1d0> <== NEVER TAKEN ffc0aec4: 7c eb 2b 96 divwu r7,r11,r5 ffc0aec8: 7c e7 29 d6 mullw r7,r7,r5 ffc0aecc: 7f 8b 38 00 cmpw cr7,r11,r7 ffc0aed0: 40 9e 02 f0 bne- cr7,ffc0b1c0 <_Heap_Walk+0x5e8> ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0aed4: 81 66 00 04 lwz r11,4(r6) ffc0aed8: 55 6b 00 3c rlwinm r11,r11,0,0,30 ffc0aedc: 7d 6b 32 14 add r11,r11,r6 ffc0aee0: 81 6b 00 04 lwz r11,4(r11) ffc0aee4: 71 67 00 01 andi. r7,r11,1 ffc0aee8: 40 82 02 f8 bne- ffc0b1e0 <_Heap_Walk+0x608> ); return false; } if ( free_block->prev != prev_block ) { ffc0aeec: 80 e6 00 0c lwz r7,12(r6) ffc0aef0: 7f 87 48 00 cmpw cr7,r7,r9 ffc0aef4: 40 9e 02 dc bne- cr7,ffc0b1d0 <_Heap_Walk+0x5f8> (*printer)( ffc0aef8: 7c c9 33 78 mr r9,r6 return false; } prev_block = free_block; free_block = free_block->next; ffc0aefc: 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 ) { ffc0af00: 7f 9f 30 00 cmpw cr7,r31,r6 ffc0af04: 7f 06 50 40 cmplw cr6,r6,r10 ffc0af08: 7c 88 30 40 cmplw cr1,r8,r6 ffc0af0c: 40 9e ff ac bne+ cr7,ffc0aeb8 <_Heap_Walk+0x2e0> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { ffc0af10: 7f 99 f0 00 cmpw cr7,r25,r30 ffc0af14: 41 be fd 54 beq- cr7,ffc0ac68 <_Heap_Walk+0x90> <== NEVER TAKEN 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; if ( prev_used ) { (*printer)( ffc0af18: 3e 60 ff c2 lis r19,-62 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0af1c: 3e 80 ff c2 lis r20,-62 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( ffc0af20: 3e 40 ff c2 lis r18,-62 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0af24: 3d e0 ff c2 lis r15,-62 ffc0af28: 3e a0 ff c2 lis r21,-62 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( ffc0af2c: 3e 20 ff c2 lis r17,-62 "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0af30: 3d c0 ff c2 lis r14,-62 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0af34: 3e 00 ff c2 lis r16,-62 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; if ( prev_used ) { (*printer)( ffc0af38: 3a 73 0e 54 addi r19,r19,3668 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0af3c: 3a 94 0e 6c addi r20,r20,3692 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)( ffc0af40: 3a 52 0f 84 addi r18,r18,3972 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0af44: 39 ef 0f 78 addi r15,r15,3960 ffc0af48: 3a b5 0f e8 addi r21,r21,4072 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)( ffc0af4c: 3a 31 0f 6c addi r17,r17,3948 "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0af50: 39 ce 0f 60 addi r14,r14,3936 ffc0af54: 3a 10 0f 54 addi r16,r16,3924 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; if ( prev_used ) { ffc0af58: 2f 80 00 00 cmpwi cr7,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; ffc0af5c: 57 18 00 3c rlwinm r24,r24,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); ffc0af60: 7f b8 f2 14 add r29,r24,r30 ffc0af64: 41 9e 00 4c beq- cr7,ffc0afb0 <_Heap_Walk+0x3d8> (*printer)( ffc0af68: 80 01 00 18 lwz r0,24(r1) ffc0af6c: 7f 83 e3 78 mr r3,r28 ffc0af70: 38 80 00 00 li r4,0 ffc0af74: 7c 09 03 a6 mtctr r0 ffc0af78: 7e 65 9b 78 mr r5,r19 ffc0af7c: 7f c6 f3 78 mr r6,r30 ffc0af80: 7f 07 c3 78 mr r7,r24 ffc0af84: 4c c6 31 82 crclr 4*cr1+eq ffc0af88: 4e 80 04 21 bctrl 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 ffc0af8c: 80 1f 00 20 lwz r0,32(r31) ffc0af90: 7f 80 e8 40 cmplw cr7,r0,r29 ffc0af94: 40 9d 00 50 ble- cr7,ffc0afe4 <_Heap_Walk+0x40c> <== ALWAYS TAKEN block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( ffc0af98: 3c a0 ff c2 lis r5,-62 ffc0af9c: 7f 83 e3 78 mr r3,r28 ffc0afa0: 38 a5 0e 94 addi r5,r5,3732 ffc0afa4: 7f c6 f3 78 mr r6,r30 ffc0afa8: 7f a7 eb 78 mr r7,r29 ffc0afac: 4b ff fe 34 b ffc0ade0 <_Heap_Walk+0x208> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0afb0: 80 01 00 18 lwz r0,24(r1) ffc0afb4: 7f 83 e3 78 mr r3,r28 ffc0afb8: 38 80 00 00 li r4,0 ffc0afbc: 81 1e 00 00 lwz r8,0(r30) ffc0afc0: 7c 09 03 a6 mtctr r0 ffc0afc4: 7e 85 a3 78 mr r5,r20 ffc0afc8: 7f c6 f3 78 mr r6,r30 ffc0afcc: 7f 07 c3 78 mr r7,r24 ffc0afd0: 4c c6 31 82 crclr 4*cr1+eq ffc0afd4: 4e 80 04 21 bctrl ffc0afd8: 80 1f 00 20 lwz r0,32(r31) ffc0afdc: 7f 80 e8 40 cmplw cr7,r0,r29 ffc0afe0: 41 bd ff b8 bgt- cr7,ffc0af98 <_Heap_Walk+0x3c0> <== NEVER TAKEN ffc0afe4: 80 1f 00 24 lwz r0,36(r31) ffc0afe8: 7f 80 e8 40 cmplw cr7,r0,r29 ffc0afec: 41 bc ff ac blt- cr7,ffc0af98 <_Heap_Walk+0x3c0> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { ffc0aff0: 7c 18 db 96 divwu r0,r24,r27 ffc0aff4: 7c 00 d9 d6 mullw r0,r0,r27 ffc0aff8: 7f 98 00 00 cmpw cr7,r24,r0 ffc0affc: 40 9e 01 50 bne- cr7,ffc0b14c <_Heap_Walk+0x574> ); return false; } if ( block_size < min_block_size ) { ffc0b000: 7f 9a c0 40 cmplw cr7,r26,r24 ffc0b004: 41 9d 01 60 bgt- cr7,ffc0b164 <_Heap_Walk+0x58c> ); return false; } if ( next_block_begin <= block_begin ) { ffc0b008: 7f 9e e8 40 cmplw cr7,r30,r29 ffc0b00c: 40 9c 01 8c bge- cr7,ffc0b198 <_Heap_Walk+0x5c0> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc0b010: 80 1d 00 04 lwz r0,4(r29) ffc0b014: 70 07 00 01 andi. r7,r0,1 ffc0b018: 40 82 00 b0 bne- ffc0b0c8 <_Heap_Walk+0x4f0> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0b01c: 80 1f 00 08 lwz r0,8(r31) ffc0b020: 7e 08 83 78 mr r8,r16 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)( ffc0b024: 80 fe 00 0c lwz r7,12(r30) 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; ffc0b028: 82 de 00 04 lwz r22,4(r30) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0b02c: 7f 80 38 00 cmpw cr7,r0,r7 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; ffc0b030: 80 1f 00 0c lwz r0,12(r31) - 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; ffc0b034: 56 d8 00 3c rlwinm r24,r22,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc0b038: 7e fe c2 14 add r23,r30,r24 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0b03c: 41 9e 00 10 beq- cr7,ffc0b04c <_Heap_Walk+0x474> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0b040: 7f 87 f8 00 cmpw cr7,r7,r31 ffc0b044: 7e a8 ab 78 mr r8,r21 ffc0b048: 41 9e 00 fc beq- cr7,ffc0b144 <_Heap_Walk+0x56c> 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)( ffc0b04c: 81 3e 00 08 lwz r9,8(r30) ffc0b050: 7e 2a 8b 78 mr r10,r17 ffc0b054: 7f 80 48 00 cmpw cr7,r0,r9 ffc0b058: 41 9e 00 10 beq- cr7,ffc0b068 <_Heap_Walk+0x490> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0b05c: 7f 89 f8 00 cmpw cr7,r9,r31 ffc0b060: 7e aa ab 78 mr r10,r21 ffc0b064: 41 9e 00 d8 beq- cr7,ffc0b13c <_Heap_Walk+0x564> 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)( ffc0b068: 80 01 00 18 lwz r0,24(r1) ffc0b06c: 7f 83 e3 78 mr r3,r28 ffc0b070: 38 80 00 00 li r4,0 ffc0b074: 7e 45 93 78 mr r5,r18 ffc0b078: 7c 09 03 a6 mtctr r0 ffc0b07c: 7f c6 f3 78 mr r6,r30 ffc0b080: 4c c6 31 82 crclr 4*cr1+eq ffc0b084: 4e 80 04 21 bctrl block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { ffc0b088: 81 17 00 00 lwz r8,0(r23) ffc0b08c: 7f 98 40 00 cmpw cr7,r24,r8 ffc0b090: 41 9e 00 50 beq- cr7,ffc0b0e0 <_Heap_Walk+0x508> (*printer)( ffc0b094: 80 01 00 18 lwz r0,24(r1) ffc0b098: 3c a0 ff c2 lis r5,-62 ffc0b09c: 7f 83 e3 78 mr r3,r28 ffc0b0a0: 38 a5 0f b0 addi r5,r5,4016 ffc0b0a4: 7c 09 03 a6 mtctr r0 ffc0b0a8: 7f c6 f3 78 mr r6,r30 ffc0b0ac: 7f 07 c3 78 mr r7,r24 ffc0b0b0: 7e e9 bb 78 mr r9,r23 ffc0b0b4: 38 80 00 01 li r4,1 ffc0b0b8: 4c c6 31 82 crclr 4*cr1+eq ffc0b0bc: 4e 80 04 21 bctrl ffc0b0c0: 38 60 00 00 li r3,0 ffc0b0c4: 4b ff fb a8 b ffc0ac6c <_Heap_Walk+0x94> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { ffc0b0c8: 7f 99 e8 00 cmpw cr7,r25,r29 ffc0b0cc: 41 be fb 9c beq- cr7,ffc0ac68 <_Heap_Walk+0x90> 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 ) { ffc0b0d0: 83 1d 00 04 lwz r24,4(r29) ffc0b0d4: 7f be eb 78 mr r30,r29 ffc0b0d8: 57 00 07 fe clrlwi r0,r24,31 ffc0b0dc: 4b ff fe 7c b ffc0af58 <_Heap_Walk+0x380> ); return false; } if ( !prev_used ) { ffc0b0e0: 72 c7 00 01 andi. r7,r22,1 ffc0b0e4: 41 82 00 44 beq- ffc0b128 <_Heap_Walk+0x550> ffc0b0e8: 81 3f 00 08 lwz r9,8(r31) ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { ffc0b0ec: 7f 89 f8 00 cmpw cr7,r9,r31 ffc0b0f0: 41 9e 00 24 beq- cr7,ffc0b114 <_Heap_Walk+0x53c> <== NEVER TAKEN if ( free_block == block ) { ffc0b0f4: 7f 89 f0 00 cmpw cr7,r9,r30 ffc0b0f8: 40 be 00 0c bne+ cr7,ffc0b104 <_Heap_Walk+0x52c> ffc0b0fc: 4b ff ff cc b ffc0b0c8 <_Heap_Walk+0x4f0> ffc0b100: 41 ba ff c8 beq- cr6,ffc0b0c8 <_Heap_Walk+0x4f0> return true; } free_block = free_block->next; ffc0b104: 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 ) { ffc0b108: 7f 89 f8 00 cmpw cr7,r9,r31 if ( free_block == block ) { ffc0b10c: 7f 09 f0 00 cmpw cr6,r9,r30 ) { 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 ) { ffc0b110: 40 9e ff f0 bne+ cr7,ffc0b100 <_Heap_Walk+0x528> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( ffc0b114: 3c a0 ff c2 lis r5,-62 ffc0b118: 7f 83 e3 78 mr r3,r28 ffc0b11c: 38 a5 10 1c addi r5,r5,4124 ffc0b120: 7f c6 f3 78 mr r6,r30 ffc0b124: 4b ff fc 90 b ffc0adb4 <_Heap_Walk+0x1dc> return false; } if ( !prev_used ) { (*printer)( ffc0b128: 3c a0 ff c2 lis r5,-62 ffc0b12c: 7f 83 e3 78 mr r3,r28 ffc0b130: 38 a5 0f ec addi r5,r5,4076 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( ffc0b134: 7f c6 f3 78 mr r6,r30 ffc0b138: 4b ff fc 7c b ffc0adb4 <_Heap_Walk+0x1dc> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0b13c: 7d ea 7b 78 mr r10,r15 ffc0b140: 4b ff ff 28 b ffc0b068 <_Heap_Walk+0x490> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), ffc0b144: 7d c8 73 78 mr r8,r14 ffc0b148: 4b ff ff 04 b ffc0b04c <_Heap_Walk+0x474> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( ffc0b14c: 3c a0 ff c2 lis r5,-62 ffc0b150: 7f 83 e3 78 mr r3,r28 ffc0b154: 38 a5 0e c4 addi r5,r5,3780 ffc0b158: 7f c6 f3 78 mr r6,r30 ffc0b15c: 7f 07 c3 78 mr r7,r24 ffc0b160: 4b ff fc 80 b ffc0ade0 <_Heap_Walk+0x208> return false; } if ( block_size < min_block_size ) { (*printer)( ffc0b164: 80 01 00 18 lwz r0,24(r1) ffc0b168: 3c a0 ff c2 lis r5,-62 ffc0b16c: 7f 83 e3 78 mr r3,r28 ffc0b170: 38 a5 0e f4 addi r5,r5,3828 ffc0b174: 7c 09 03 a6 mtctr r0 ffc0b178: 7f c6 f3 78 mr r6,r30 ffc0b17c: 7f 07 c3 78 mr r7,r24 ffc0b180: 7f 48 d3 78 mr r8,r26 ffc0b184: 38 80 00 01 li r4,1 ffc0b188: 4c c6 31 82 crclr 4*cr1+eq ffc0b18c: 4e 80 04 21 bctrl ffc0b190: 38 60 00 00 li r3,0 block, block_size, min_block_size ); return false; ffc0b194: 4b ff fa d8 b ffc0ac6c <_Heap_Walk+0x94> } if ( next_block_begin <= block_begin ) { (*printer)( ffc0b198: 3c a0 ff c2 lis r5,-62 ffc0b19c: 7f 83 e3 78 mr r3,r28 ffc0b1a0: 38 a5 0f 20 addi r5,r5,3872 ffc0b1a4: 7f c6 f3 78 mr r6,r30 ffc0b1a8: 7f a7 eb 78 mr r7,r29 ffc0b1ac: 4b ff fc 34 b ffc0ade0 <_Heap_Walk+0x208> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( ffc0b1b0: 3c a0 ff c2 lis r5,-62 ffc0b1b4: 7f 83 e3 78 mr r3,r28 ffc0b1b8: 38 a5 0d 9c addi r5,r5,3484 ffc0b1bc: 4b ff fc 4c b ffc0ae08 <_Heap_Walk+0x230> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( ffc0b1c0: 3c a0 ff c2 lis r5,-62 ffc0b1c4: 7f 83 e3 78 mr r3,r28 ffc0b1c8: 38 a5 0d d4 addi r5,r5,3540 ffc0b1cc: 4b ff fb e8 b ffc0adb4 <_Heap_Walk+0x1dc> return false; } if ( free_block->prev != prev_block ) { (*printer)( ffc0b1d0: 3c a0 ff c2 lis r5,-62 ffc0b1d4: 7f 83 e3 78 mr r3,r28 ffc0b1d8: 38 a5 0e 20 addi r5,r5,3616 ffc0b1dc: 4b ff fc 04 b ffc0ade0 <_Heap_Walk+0x208> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( ffc0b1e0: 3c a0 ff c2 lis r5,-62 ffc0b1e4: 7f 83 e3 78 mr r3,r28 ffc0b1e8: 38 a5 0e 04 addi r5,r5,3588 ffc0b1ec: 4b ff fb c8 b ffc0adb4 <_Heap_Walk+0x1dc> =============================================================================== ffc0b1f0 <_Heap_Walk_print>: { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0b1f0: 94 21 ff 88 stwu r1,-120(r1) ffc0b1f4: 7c 08 02 a6 mflr r0 ffc0b1f8: 93 e1 00 74 stw r31,116(r1) ffc0b1fc: 90 01 00 7c stw r0,124(r1) ffc0b200: 7c 60 1b 78 mr r0,r3 ffc0b204: 90 c1 00 1c stw r6,28(r1) ffc0b208: 90 e1 00 20 stw r7,32(r1) ffc0b20c: 91 01 00 24 stw r8,36(r1) ffc0b210: 91 21 00 28 stw r9,40(r1) ffc0b214: 91 41 00 2c stw r10,44(r1) ffc0b218: 40 86 00 24 bne- cr1,ffc0b23c <_Heap_Walk_print+0x4c> <== ALWAYS TAKEN ffc0b21c: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc0b220: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc0b224: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc0b228: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc0b22c: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc0b230: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc0b234: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc0b238: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list ap; if ( error ) { ffc0b23c: 2f 84 00 00 cmpwi cr7,r4,0 { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0b240: 7c bf 2b 78 mr r31,r5 va_list ap; if ( error ) { ffc0b244: 40 9e 00 58 bne- cr7,ffc0b29c <_Heap_Walk_print+0xac> printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); ffc0b248: 3c 60 ff c2 lis r3,-62 ffc0b24c: 7c 04 03 78 mr r4,r0 ffc0b250: 38 63 10 54 addi r3,r3,4180 ffc0b254: 4c c6 31 82 crclr 4*cr1+eq ffc0b258: 4b ff ad 7d bl ffc05fd4 } va_start( ap, fmt ); ffc0b25c: 38 00 00 03 li r0,3 ffc0b260: 98 01 00 08 stb r0,8(r1) ffc0b264: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc0b268: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b26c: 98 01 00 09 stb r0,9(r1) ffc0b270: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc0b274: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b278: 90 01 00 0c stw r0,12(r1) ffc0b27c: 38 01 00 10 addi r0,r1,16 ffc0b280: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc0b284: 4b ff d0 85 bl ffc08308 va_end( ap ); } ffc0b288: 80 01 00 7c lwz r0,124(r1) ffc0b28c: 83 e1 00 74 lwz r31,116(r1) ffc0b290: 38 21 00 78 addi r1,r1,120 ffc0b294: 7c 08 03 a6 mtlr r0 ffc0b298: 4e 80 00 20 blr static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { va_list ap; if ( error ) { printk( "FAIL[%d]: ", source ); ffc0b29c: 3c 60 ff c2 lis r3,-62 ffc0b2a0: 7c 04 03 78 mr r4,r0 ffc0b2a4: 38 63 10 48 addi r3,r3,4168 ffc0b2a8: 4c c6 31 82 crclr 4*cr1+eq ffc0b2ac: 4b ff ad 29 bl ffc05fd4 } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b2b0: 38 00 00 03 li r0,3 ffc0b2b4: 98 01 00 08 stb r0,8(r1) ffc0b2b8: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc0b2bc: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b2c0: 98 01 00 09 stb r0,9(r1) ffc0b2c4: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc0b2c8: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0b2cc: 90 01 00 0c stw r0,12(r1) ffc0b2d0: 38 01 00 10 addi r0,r1,16 ffc0b2d4: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc0b2d8: 4b ff d0 31 bl ffc08308 va_end( ap ); } ffc0b2dc: 80 01 00 7c lwz r0,124(r1) ffc0b2e0: 83 e1 00 74 lwz r31,116(r1) ffc0b2e4: 38 21 00 78 addi r1,r1,120 ffc0b2e8: 7c 08 03 a6 mtlr r0 ffc0b2ec: 4e 80 00 20 blr =============================================================================== ffc09054 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc09054: 94 21 ff f0 stwu r1,-16(r1) ffc09058: 7c 08 02 a6 mflr r0 ffc0905c: 93 c1 00 08 stw r30,8(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09060: 3f c0 00 00 lis r30,0 * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc09064: 90 01 00 14 stw r0,20(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09068: 80 1e 27 ec lwz r0,10220(r30) * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { ffc0906c: 93 e1 00 0c stw r31,12(r1) rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09070: 2f 80 00 00 cmpwi cr7,r0,0 ffc09074: 41 9e 00 2c beq- cr7,ffc090a0 <_IO_Initialize_all_drivers+0x4c><== NEVER TAKEN ffc09078: 3b de 27 ec addi r30,r30,10220 ffc0907c: 3b e0 00 00 li r31,0 (void) rtems_io_initialize( major, 0, NULL ); ffc09080: 7f e3 fb 78 mr r3,r31 ffc09084: 38 80 00 00 li r4,0 ffc09088: 38 a0 00 00 li r5,0 ffc0908c: 48 00 66 4d bl ffc0f6d8 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) ffc09090: 80 1e 00 00 lwz r0,0(r30) ffc09094: 3b ff 00 01 addi r31,r31,1 ffc09098: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0909c: 41 9d ff e4 bgt+ cr7,ffc09080 <_IO_Initialize_all_drivers+0x2c> (void) rtems_io_initialize( major, 0, NULL ); } ffc090a0: 80 01 00 14 lwz r0,20(r1) ffc090a4: 83 c1 00 08 lwz r30,8(r1) ffc090a8: 7c 08 03 a6 mtlr r0 ffc090ac: 83 e1 00 0c lwz r31,12(r1) ffc090b0: 38 21 00 10 addi r1,r1,16 ffc090b4: 4e 80 00 20 blr =============================================================================== ffc090b8 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { ffc090b8: 94 21 ff e0 stwu r1,-32(r1) ffc090bc: 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; ffc090c0: 3d 20 00 00 lis r9,0 * workspace. * */ void _IO_Manager_initialization(void) { ffc090c4: 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; ffc090c8: 39 29 20 a0 addi r9,r9,8352 * workspace. * */ void _IO_Manager_initialization(void) { ffc090cc: 93 a1 00 14 stw r29,20(r1) ffc090d0: 93 c1 00 18 stw r30,24(r1) uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; drivers_in_table = Configuration.number_of_device_drivers; number_of_drivers = Configuration.maximum_drivers; ffc090d4: 83 a9 00 2c lwz r29,44(r9) rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; drivers_in_table = Configuration.number_of_device_drivers; ffc090d8: 83 c9 00 30 lwz r30,48(r9) * workspace. * */ void _IO_Manager_initialization(void) { ffc090dc: 93 e1 00 1c stw r31,28(r1) /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) ffc090e0: 7f 9e e8 40 cmplw cr7,r30,r29 * workspace. * */ void _IO_Manager_initialization(void) { ffc090e4: 93 61 00 0c stw r27,12(r1) ffc090e8: 93 81 00 10 stw r28,16(r1) uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; ffc090ec: 83 e9 00 34 lwz r31,52(r9) /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) ffc090f0: 41 9c 00 38 blt- cr7,ffc09128 <_IO_Manager_initialization+0x70> * 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; ffc090f4: 3d 20 00 00 lis r9,0 ffc090f8: 93 e9 27 f0 stw r31,10224(r9) _IO_Number_of_drivers = number_of_drivers; ffc090fc: 3d 20 00 00 lis r9,0 ffc09100: 93 c9 27 ec stw r30,10220(r9) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } ffc09104: 80 01 00 24 lwz r0,36(r1) ffc09108: 83 61 00 0c lwz r27,12(r1) ffc0910c: 7c 08 03 a6 mtlr r0 ffc09110: 83 81 00 10 lwz r28,16(r1) ffc09114: 83 a1 00 14 lwz r29,20(r1) ffc09118: 83 c1 00 18 lwz r30,24(r1) ffc0911c: 83 e1 00 1c lwz r31,28(r1) ffc09120: 38 21 00 20 addi r1,r1,32 ffc09124: 4e 80 00 20 blr * 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 ) ffc09128: 1f 7d 00 18 mulli r27,r29,24 /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) ffc0912c: 7f 63 db 78 mr r3,r27 ffc09130: 48 00 3a d9 bl ffc0cc08 <_Workspace_Allocate_or_fatal_error> ffc09134: 3f 80 00 00 lis r28,0 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; ffc09138: 3d 20 00 00 lis r9,0 /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) ffc0913c: 90 7c 27 f0 stw r3,10224(r28) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( ffc09140: 7f 65 db 78 mr r5,r27 ffc09144: 38 80 00 00 li r4,0 _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; ffc09148: 93 a9 27 ec stw r29,10220(r9) memset( ffc0914c: 48 00 ae 11 bl ffc13f5c _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc09150: 2f 9e 00 00 cmpwi cr7,r30,0 ffc09154: 41 be ff b0 beq- cr7,ffc09104 <_IO_Manager_initialization+0x4c><== NEVER TAKEN ffc09158: 7f c9 03 a6 mtctr r30 ffc0915c: 81 1c 27 f0 lwz r8,10224(r28) ffc09160: 39 40 00 00 li r10,0 _IO_Driver_address_table[index] = driver_table[index]; ffc09164: 7f e9 fb 78 mr r9,r31 ffc09168: 7c a9 50 6e lwzux r5,r9,r10 ffc0916c: 7d 68 52 14 add r11,r8,r10 ffc09170: 80 e9 00 08 lwz r7,8(r9) ffc09174: 80 09 00 0c lwz r0,12(r9) ffc09178: 80 c9 00 04 lwz r6,4(r9) ffc0917c: 7c a8 51 2e stwx r5,r8,r10 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc09180: 39 4a 00 18 addi r10,r10,24 _IO_Driver_address_table[index] = driver_table[index]; ffc09184: 90 cb 00 04 stw r6,4(r11) ffc09188: 90 eb 00 08 stw r7,8(r11) ffc0918c: 90 0b 00 0c stw r0,12(r11) ffc09190: 80 e9 00 14 lwz r7,20(r9) ffc09194: 80 09 00 10 lwz r0,16(r9) ffc09198: 90 eb 00 14 stw r7,20(r11) ffc0919c: 90 0b 00 10 stw r0,16(r11) memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc091a0: 42 00 ff c4 bdnz+ ffc09164 <_IO_Manager_initialization+0xac> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } ffc091a4: 80 01 00 24 lwz r0,36(r1) ffc091a8: 83 61 00 0c lwz r27,12(r1) ffc091ac: 7c 08 03 a6 mtlr r0 ffc091b0: 83 81 00 10 lwz r28,16(r1) ffc091b4: 83 a1 00 14 lwz r29,20(r1) ffc091b8: 83 c1 00 18 lwz r30,24(r1) ffc091bc: 83 e1 00 1c lwz r31,28(r1) ffc091c0: 38 21 00 20 addi r1,r1,32 ffc091c4: 4e 80 00 20 blr =============================================================================== ffc09f74 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc09f74: 94 21 ff f0 stwu r1,-16(r1) ffc09f78: 7c 08 02 a6 mflr r0 _Internal_errors_What_happened.the_source = the_source; ffc09f7c: 3d 60 00 00 lis r11,0 ffc09f80: 39 2b 2d 30 addi r9,r11,11568 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc09f84: 90 01 00 14 stw r0,20(r1) _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; ffc09f88: 90 a9 00 08 stw r5,8(r9) Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; ffc09f8c: 98 89 00 04 stb r4,4(r9) void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc09f90: 93 e1 00 0c stw r31,12(r1) ffc09f94: 7c bf 2b 78 mr r31,r5 _Internal_errors_What_happened.the_source = the_source; ffc09f98: 90 6b 2d 30 stw r3,11568(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 ); ffc09f9c: 48 00 26 51 bl ffc0c5ec <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; ffc09fa0: 38 00 00 05 li r0,5 ffc09fa4: 3d 20 00 00 lis r9,0 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); ffc09fa8: 7f e3 fb 78 mr r3,r31 ffc09fac: 90 09 27 d4 stw r0,10196(r9) ffc09fb0: 4b ff 9a 85 bl ffc03a34 <_BSP_Fatal_error> ffc09fb4: 48 00 00 00 b ffc09fb4 <_Internal_error_Occurred+0x40><== NOT EXECUTED =============================================================================== ffc09fd4 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc09fd4: 94 21 ff f0 stwu r1,-16(r1) ffc09fd8: 7c 08 02 a6 mflr r0 ffc09fdc: 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 ) ffc09fe0: 80 03 00 18 lwz r0,24(r3) */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc09fe4: 93 e1 00 0c stw r31,12(r1) ffc09fe8: 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 ) ffc09fec: 2f 80 00 00 cmpwi cr7,r0,0 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc09ff0: 93 c1 00 08 stw r30,8(r1) * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) ffc09ff4: 38 60 00 00 li r3,0 ffc09ff8: 40 9e 00 1c bne- cr7,ffc0a014 <_Objects_Allocate+0x40> <== ALWAYS TAKEN information->inactive--; } } return the_object; } ffc09ffc: 80 01 00 14 lwz r0,20(r1) ffc0a000: 83 c1 00 08 lwz r30,8(r1) ffc0a004: 7c 08 03 a6 mtlr r0 ffc0a008: 83 e1 00 0c lwz r31,12(r1) ffc0a00c: 38 21 00 10 addi r1,r1,16 ffc0a010: 4e 80 00 20 blr /* * 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 ); ffc0a014: 3b df 00 20 addi r30,r31,32 ffc0a018: 7f c3 f3 78 mr r3,r30 ffc0a01c: 4b ff f5 05 bl ffc09520 <_Chain_Get> if ( information->auto_extend ) { ffc0a020: 88 1f 00 12 lbz r0,18(r31) ffc0a024: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a028: 41 be ff d4 beq- cr7,ffc09ffc <_Objects_Allocate+0x28> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { ffc0a02c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a030: 41 9e 00 50 beq- cr7,ffc0a080 <_Objects_Allocate+0xac> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc0a034: a1 63 00 0a lhz r11,10(r3) ffc0a038: a0 1f 00 0a lhz r0,10(r31) _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; ffc0a03c: a1 3f 00 14 lhz r9,20(r31) } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc0a040: 7c 00 58 50 subf r0,r0,r11 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; ffc0a044: a1 7f 00 2c lhz r11,44(r31) block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; ffc0a048: 7c 00 4b 96 divwu r0,r0,r9 ffc0a04c: 81 3f 00 30 lwz r9,48(r31) information->inactive--; } } return the_object; } ffc0a050: 83 c1 00 08 lwz r30,8(r1) block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; ffc0a054: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0a058: 7d 49 00 2e lwzx r10,r9,r0 information->inactive--; ffc0a05c: 39 6b ff ff addi r11,r11,-1 ffc0a060: b1 7f 00 2c sth r11,44(r31) block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; ffc0a064: 39 4a ff ff addi r10,r10,-1 ffc0a068: 7d 49 01 2e stwx r10,r9,r0 information->inactive--; } } return the_object; } ffc0a06c: 80 01 00 14 lwz r0,20(r1) ffc0a070: 83 e1 00 0c lwz r31,12(r1) ffc0a074: 38 21 00 10 addi r1,r1,16 ffc0a078: 7c 08 03 a6 mtlr r0 ffc0a07c: 4e 80 00 20 blr * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); ffc0a080: 7f e3 fb 78 mr r3,r31 ffc0a084: 48 00 00 4d bl ffc0a0d0 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); ffc0a088: 7f c3 f3 78 mr r3,r30 ffc0a08c: 4b ff f4 95 bl ffc09520 <_Chain_Get> } if ( the_object ) { ffc0a090: 2c 03 00 00 cmpwi r3,0 ffc0a094: 41 82 ff 68 beq+ ffc09ffc <_Objects_Allocate+0x28> ffc0a098: 4b ff ff 9c b ffc0a034 <_Objects_Allocate+0x60> =============================================================================== ffc0a0d0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { ffc0a0d0: 94 21 ff b8 stwu r1,-72(r1) ffc0a0d4: 7c 08 02 a6 mflr r0 ffc0a0d8: 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 ) ffc0a0dc: 81 63 00 34 lwz r11,52(r3) */ void _Objects_Extend_information( Objects_Information *information ) { ffc0a0e0: 93 a1 00 3c stw r29,60(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 ) ffc0a0e4: 2f 8b 00 00 cmpwi cr7,r11,0 */ void _Objects_Extend_information( Objects_Information *information ) { ffc0a0e8: 93 e1 00 44 stw r31,68(r1) ffc0a0ec: 7c 7f 1b 78 mr r31,r3 ffc0a0f0: 92 a1 00 1c stw r21,28(r1) ffc0a0f4: 92 c1 00 20 stw r22,32(r1) ffc0a0f8: 92 e1 00 24 stw r23,36(r1) ffc0a0fc: 93 01 00 28 stw r24,40(r1) ffc0a100: 93 21 00 2c stw r25,44(r1) ffc0a104: 93 41 00 30 stw r26,48(r1) ffc0a108: 93 61 00 34 stw r27,52(r1) ffc0a10c: 93 81 00 38 stw r28,56(r1) ffc0a110: 93 c1 00 40 stw r30,64(r1) /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); ffc0a114: a3 a3 00 0a lhz r29,10(r3) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0a118: 41 9e 02 9c beq- cr7,ffc0a3b4 <_Objects_Extend_information+0x2e4> block_count = 0; else { block_count = information->maximum / information->allocation_size; ffc0a11c: a3 23 00 10 lhz r25,16(r3) ffc0a120: a1 23 00 14 lhz r9,20(r3) ffc0a124: 7e b9 4b 96 divwu r21,r25,r9 for ( ; block < block_count; block++ ) { ffc0a128: 2f 95 00 00 cmpwi cr7,r21,0 ffc0a12c: 41 9e 02 a0 beq- cr7,ffc0a3cc <_Objects_Extend_information+0x2fc><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) ffc0a130: 80 0b 00 00 lwz r0,0(r11) ffc0a134: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a138: 41 9e 02 94 beq- cr7,ffc0a3cc <_Objects_Extend_information+0x2fc><== NEVER TAKEN ffc0a13c: 7d 2a 4b 78 mr r10,r9 ffc0a140: 7e a9 03 a6 mtctr r21 ffc0a144: 7f be eb 78 mr r30,r29 ffc0a148: 3b 60 00 00 li r27,0 ffc0a14c: 48 00 00 10 b ffc0a15c <_Objects_Extend_information+0x8c> ffc0a150: 7c 0b 00 2e lwzx r0,r11,r0 ffc0a154: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a158: 41 9e 00 14 beq- cr7,ffc0a16c <_Objects_Extend_information+0x9c> if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { ffc0a15c: 3b 7b 00 01 addi r27,r27,1 if ( information->object_blocks[ block ] == NULL ) ffc0a160: 57 60 10 3a rlwinm r0,r27,2,0,29 break; else index_base += information->allocation_size; ffc0a164: 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++ ) { ffc0a168: 42 00 ff e8 bdnz+ ffc0a150 <_Objects_Extend_information+0x80> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; ffc0a16c: 7f 39 52 14 add r25,r25,r10 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { ffc0a170: 2b 99 ff ff cmplwi cr7,r25,65535 ffc0a174: 41 9d 01 b8 bgt- cr7,ffc0a32c <_Objects_Extend_information+0x25c><== NEVER TAKEN /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { ffc0a178: 88 1f 00 12 lbz r0,18(r31) /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; ffc0a17c: 80 7f 00 18 lwz r3,24(r31) if ( information->auto_extend ) { ffc0a180: 2f 80 00 00 cmpwi cr7,r0,0 /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; ffc0a184: 7c 6a 19 d6 mullw r3,r10,r3 if ( information->auto_extend ) { ffc0a188: 40 9e 01 e0 bne- cr7,ffc0a368 <_Objects_Extend_information+0x298> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); ffc0a18c: 48 00 2a 7d bl ffc0cc08 <_Workspace_Allocate_or_fatal_error> ffc0a190: 7c 7c 1b 78 mr r28,r3 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { ffc0a194: a0 1f 00 10 lhz r0,16(r31) ffc0a198: 7f 9e 00 40 cmplw cr7,r30,r0 ffc0a19c: 41 9c 01 08 blt- cr7,ffc0a2a4 <_Objects_Extend_information+0x1d4> */ /* * Up the block count and maximum */ block_count++; ffc0a1a0: 3b 55 00 01 addi r26,r21,1 * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); ffc0a1a4: 1c 7a 00 03 mulli r3,r26,3 ffc0a1a8: 7c 79 1a 14 add r3,r25,r3 ffc0a1ac: 7c 63 ea 14 add r3,r3,r29 ffc0a1b0: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc0a1b4: 48 00 2a 9d bl ffc0cc50 <_Workspace_Allocate> if ( !object_blocks ) { ffc0a1b8: 7c 76 1b 79 mr. r22,r3 ffc0a1bc: 41 82 02 20 beq- ffc0a3dc <_Objects_Extend_information+0x30c> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc0a1c0: a0 1f 00 10 lhz r0,16(r31) } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( ffc0a1c4: 57 5a 10 3a rlwinm r26,r26,2,0,29 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); ffc0a1c8: 7f 16 d2 14 add r24,r22,r26 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc0a1cc: 7f 9d 00 40 cmplw cr7,r29,r0 ffc0a1d0: 7f 58 d2 14 add r26,r24,r26 ffc0a1d4: 41 9c 01 a4 blt- cr7,ffc0a378 <_Objects_Extend_information+0x2a8> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0a1d8: 2f 9d 00 00 cmpwi cr7,r29,0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc0a1dc: 39 20 00 00 li r9,0 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0a1e0: 56 b7 10 3a rlwinm r23,r21,2,0,29 ffc0a1e4: 41 9e 00 20 beq- cr7,ffc0a204 <_Objects_Extend_information+0x134><== NEVER TAKEN local_table[ index ] = NULL; ffc0a1e8: 7f a9 03 a6 mtctr r29 ffc0a1ec: 38 00 00 00 li r0,0 ffc0a1f0: 55 2b 10 3a rlwinm r11,r9,2,0,29 ffc0a1f4: 7c 0b d1 2e stwx r0,r11,r26 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0a1f8: 39 29 00 01 addi r9,r9,1 ffc0a1fc: 42 00 ff f4 bdnz+ ffc0a1f0 <_Objects_Extend_information+0x120> ffc0a200: 56 b7 10 3a rlwinm r23,r21,2,0,29 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc0a204: a1 7f 00 14 lhz r11,20(r31) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc0a208: 38 00 00 00 li r0,0 inactive_per_block[block_count] = 0; ffc0a20c: 7c 18 b9 2e stwx r0,r24,r23 for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc0a210: 7d 7e 5a 14 add r11,r30,r11 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; ffc0a214: 7f 9e 58 40 cmplw cr7,r30,r11 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc0a218: 7c 16 b9 2e stwx r0,r22,r23 inactive_per_block[block_count] = 0; for ( index=index_base ; ffc0a21c: 40 9c 00 30 bge- cr7,ffc0a24c <_Objects_Extend_information+0x17c><== NEVER TAKEN ffc0a220: 38 1e 00 01 addi r0,r30,1 ffc0a224: 7f 80 58 40 cmplw cr7,r0,r11 ffc0a228: 57 c9 10 3a rlwinm r9,r30,2,0,29 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc0a22c: 7d 7e 58 50 subf r11,r30,r11 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; ffc0a230: 7d 3a 4a 14 add r9,r26,r9 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc0a234: 7d 69 03 a6 mtctr r11 ffc0a238: 38 00 00 00 li r0,0 ffc0a23c: 41 9d 01 ac bgt- cr7,ffc0a3e8 <_Objects_Extend_information+0x318><== NEVER TAKEN ffc0a240: 90 09 00 00 stw r0,0(r9) object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { ffc0a244: 39 29 00 04 addi r9,r9,4 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; ffc0a248: 42 00 ff f8 bdnz+ ffc0a240 <_Objects_Extend_information+0x170> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0a24c: 7c 00 00 a6 mfmsr r0 ffc0a250: 7d 30 42 a6 mfsprg r9,0 ffc0a254: 7c 09 48 78 andc r9,r0,r9 ffc0a258: 7d 20 01 24 mtmsr r9 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( ffc0a25c: 81 7f 00 00 lwz r11,0(r31) old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; ffc0a260: 57 39 04 3e clrlwi r25,r25,16 information->maximum_id = _Objects_Build_id( ffc0a264: a1 3f 00 04 lhz r9,4(r31) ffc0a268: 55 6b c0 0e rlwinm r11,r11,24,0,7 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; ffc0a26c: 80 7f 00 34 lwz r3,52(r31) information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( ffc0a270: 65 6b 00 01 oris r11,r11,1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; ffc0a274: 93 1f 00 30 stw r24,48(r31) information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( ffc0a278: 55 29 d8 08 rlwinm r9,r9,27,0,4 ffc0a27c: 7d 69 4b 78 or r9,r11,r9 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; ffc0a280: 93 5f 00 1c stw r26,28(r31) information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( ffc0a284: 7d 29 cb 78 or r9,r9,r25 ffc0a288: 91 3f 00 0c stw r9,12(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; ffc0a28c: b3 3f 00 10 sth r25,16(r31) _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; ffc0a290: 92 df 00 34 stw r22,52(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0a294: 7c 00 01 24 mtmsr r0 information->maximum ); _ISR_Enable( level ); if ( old_tables ) ffc0a298: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a29c: 41 9e 00 08 beq- cr7,ffc0a2a4 <_Objects_Extend_information+0x1d4> _Workspace_Free( old_tables ); ffc0a2a0: 48 00 29 e5 bl ffc0cc84 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc0a2a4: 81 3f 00 34 lwz r9,52(r31) ffc0a2a8: 57 7b 10 3a rlwinm r27,r27,2,0,29 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0a2ac: 3b a1 00 08 addi r29,r1,8 ffc0a2b0: 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; ffc0a2b4: 7f 89 d9 2e stwx r28,r9,r27 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0a2b8: 7f 84 e3 78 mr r4,r28 ffc0a2bc: 7f a3 eb 78 mr r3,r29 ffc0a2c0: 80 df 00 18 lwz r6,24(r31) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0a2c4: 3b 9f 00 20 addi r28,r31,32 information->object_blocks[ block ] = new_object_block; /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0a2c8: 48 00 54 95 bl ffc0f75c <_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 ) { ffc0a2cc: 48 00 00 2c b ffc0a2f8 <_Objects_Extend_information+0x228> the_object->id = _Objects_Build_id( ffc0a2d0: 81 7f 00 00 lwz r11,0(r31) ffc0a2d4: a0 1f 00 04 lhz r0,4(r31) ffc0a2d8: 55 6b c0 0e rlwinm r11,r11,24,0,7 ffc0a2dc: 65 6b 00 01 oris r11,r11,1 ffc0a2e0: 54 00 d8 08 rlwinm r0,r0,27,0,4 ffc0a2e4: 7d 60 03 78 or r0,r11,r0 ffc0a2e8: 7c 00 f3 78 or r0,r0,r30 ffc0a2ec: 90 09 00 08 stw r0,8(r9) index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; ffc0a2f0: 3b de 00 01 addi r30,r30,1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0a2f4: 4b ff f1 fd bl ffc094f0 <_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 ) { ffc0a2f8: 7f a3 eb 78 mr r3,r29 ffc0a2fc: 4b ff f2 25 bl ffc09520 <_Chain_Get> ffc0a300: 7c 69 1b 79 mr. r9,r3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0a304: 7f 83 e3 78 mr r3,r28 ffc0a308: 7d 24 4b 78 mr r4,r9 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { ffc0a30c: 40 82 ff c4 bne+ ffc0a2d0 <_Objects_Extend_information+0x200> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0a310: a0 1f 00 14 lhz r0,20(r31) information->inactive = ffc0a314: a1 3f 00 2c lhz r9,44(r31) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0a318: 81 7f 00 30 lwz r11,48(r31) information->inactive = ffc0a31c: 7d 20 4a 14 add r9,r0,r9 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0a320: 54 00 04 3e clrlwi r0,r0,16 information->inactive = ffc0a324: b1 3f 00 2c sth r9,44(r31) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0a328: 7c 0b d9 2e stwx r0,r11,r27 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } ffc0a32c: 80 01 00 4c lwz r0,76(r1) ffc0a330: 82 a1 00 1c lwz r21,28(r1) ffc0a334: 7c 08 03 a6 mtlr r0 ffc0a338: 82 c1 00 20 lwz r22,32(r1) ffc0a33c: 82 e1 00 24 lwz r23,36(r1) ffc0a340: 83 01 00 28 lwz r24,40(r1) ffc0a344: 83 21 00 2c lwz r25,44(r1) ffc0a348: 83 41 00 30 lwz r26,48(r1) ffc0a34c: 83 61 00 34 lwz r27,52(r1) ffc0a350: 83 81 00 38 lwz r28,56(r1) ffc0a354: 83 a1 00 3c lwz r29,60(r1) ffc0a358: 83 c1 00 40 lwz r30,64(r1) ffc0a35c: 83 e1 00 44 lwz r31,68(r1) ffc0a360: 38 21 00 48 addi r1,r1,72 ffc0a364: 4e 80 00 20 blr * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); ffc0a368: 48 00 28 e9 bl ffc0cc50 <_Workspace_Allocate> if ( !new_object_block ) ffc0a36c: 7c 7c 1b 79 mr. r28,r3 ffc0a370: 40 82 fe 24 bne+ ffc0a194 <_Objects_Extend_information+0xc4> ffc0a374: 4b ff ff b8 b ffc0a32c <_Objects_Extend_information+0x25c> * separate parts as size of each block has changed. */ memcpy( object_blocks, information->object_blocks, block_count * sizeof(void*) ); ffc0a378: 56 b7 10 3a rlwinm r23,r21,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, ffc0a37c: 80 9f 00 34 lwz r4,52(r31) ffc0a380: 7e e5 bb 78 mr r5,r23 ffc0a384: 48 00 9a d9 bl ffc13e5c information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, ffc0a388: 80 9f 00 30 lwz r4,48(r31) ffc0a38c: 7e e5 bb 78 mr r5,r23 ffc0a390: 7f 03 c3 78 mr r3,r24 ffc0a394: 48 00 9a c9 bl ffc13e5c information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc0a398: a0 bf 00 10 lhz r5,16(r31) ffc0a39c: 80 9f 00 1c lwz r4,28(r31) ffc0a3a0: 7f 43 d3 78 mr r3,r26 ffc0a3a4: 7c bd 2a 14 add r5,r29,r5 ffc0a3a8: 54 a5 10 3a rlwinm r5,r5,2,0,29 ffc0a3ac: 48 00 9a b1 bl ffc13e5c ffc0a3b0: 4b ff fe 54 b ffc0a204 <_Objects_Extend_information+0x134> minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0a3b4: a3 23 00 10 lhz r25,16(r3) ffc0a3b8: 7f be eb 78 mr r30,r29 ffc0a3bc: a1 43 00 14 lhz r10,20(r3) ffc0a3c0: 3b 60 00 00 li r27,0 ffc0a3c4: 3a a0 00 00 li r21,0 ffc0a3c8: 4b ff fd a4 b ffc0a16c <_Objects_Extend_information+0x9c> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) ffc0a3cc: 7d 2a 4b 78 mr r10,r9 <== NOT EXECUTED ffc0a3d0: 7f be eb 78 mr r30,r29 <== NOT EXECUTED ffc0a3d4: 3b 60 00 00 li r27,0 <== NOT EXECUTED ffc0a3d8: 4b ff fd 94 b ffc0a16c <_Objects_Extend_information+0x9c><== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); ffc0a3dc: 7f 83 e3 78 mr r3,r28 ffc0a3e0: 48 00 28 a5 bl ffc0cc84 <_Workspace_Free> return; ffc0a3e4: 4b ff ff 48 b ffc0a32c <_Objects_Extend_information+0x25c> ffc0a3e8: 39 60 00 01 li r11,1 <== NOT EXECUTED ffc0a3ec: 7d 69 03 a6 mtctr r11 <== NOT EXECUTED ffc0a3f0: 4b ff fe 50 b ffc0a240 <_Objects_Extend_information+0x170><== NOT EXECUTED =============================================================================== ffc0a4dc <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { ffc0a4dc: 94 21 ff f0 stwu r1,-16(r1) ffc0a4e0: 7c 08 02 a6 mflr r0 ffc0a4e4: 93 e1 00 0c stw r31,12(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc0a4e8: 7c 9f 23 79 mr. r31,r4 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { ffc0a4ec: 93 c1 00 08 stw r30,8(r1) ffc0a4f0: 7c 7e 1b 78 mr r30,r3 ffc0a4f4: 90 01 00 14 stw r0,20(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc0a4f8: 40 82 00 20 bne- ffc0a518 <_Objects_Get_information+0x3c> * 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 ) ffc0a4fc: 38 60 00 00 li r3,0 return NULL; #endif return info; } ffc0a500: 80 01 00 14 lwz r0,20(r1) ffc0a504: 83 c1 00 08 lwz r30,8(r1) ffc0a508: 7c 08 03 a6 mtlr r0 ffc0a50c: 83 e1 00 0c lwz r31,12(r1) ffc0a510: 38 21 00 10 addi r1,r1,16 ffc0a514: 4e 80 00 20 blr /* * 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 ); ffc0a518: 48 00 59 01 bl ffc0fe18 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) ffc0a51c: 2c 03 00 00 cmpwi r3,0 ffc0a520: 41 82 ff dc beq+ ffc0a4fc <_Objects_Get_information+0x20> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) ffc0a524: 7f 9f 18 40 cmplw cr7,r31,r3 ffc0a528: 41 9d ff d4 bgt+ cr7,ffc0a4fc <_Objects_Get_information+0x20> return NULL; if ( !_Objects_Information_table[ the_api ] ) ffc0a52c: 3d 20 00 00 lis r9,0 ffc0a530: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc0a534: 39 29 2c 20 addi r9,r9,11296 ffc0a538: 7d 29 f0 2e lwzx r9,r9,r30 ffc0a53c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a540: 41 9e ff bc beq+ cr7,ffc0a4fc <_Objects_Get_information+0x20><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; ffc0a544: 57 ff 10 3a rlwinm r31,r31,2,0,29 ffc0a548: 7c 69 f8 2e lwzx r3,r9,r31 if ( !info ) ffc0a54c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a550: 41 9e ff b0 beq+ cr7,ffc0a500 <_Objects_Get_information+0x24><== 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 ) ffc0a554: a0 03 00 10 lhz r0,16(r3) ffc0a558: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a55c: 40 9e ff a4 bne+ cr7,ffc0a500 <_Objects_Get_information+0x24> ffc0a560: 4b ff ff 9c b ffc0a4fc <_Objects_Get_information+0x20> =============================================================================== ffc0c848 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { ffc0c848: 94 21 ff d8 stwu r1,-40(r1) ffc0c84c: 7c 08 02 a6 mflr r0 ffc0c850: 93 c1 00 20 stw r30,32(r1) char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) ffc0c854: 7c 9e 23 79 mr. r30,r4 char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { ffc0c858: 93 e1 00 24 stw r31,36(r1) ffc0c85c: 7c bf 2b 78 mr r31,r5 ffc0c860: 90 01 00 2c stw r0,44(r1) ffc0c864: 93 81 00 18 stw r28,24(r1) ffc0c868: 93 a1 00 1c stw r29,28(r1) char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) ffc0c86c: 40 82 00 2c bne- ffc0c898 <_Objects_Get_name_as_string+0x50> } } *d = '\0'; _Thread_Enable_dispatch(); return name; ffc0c870: 3b e0 00 00 li r31,0 } return NULL; /* unreachable path */ } ffc0c874: 80 01 00 2c lwz r0,44(r1) ffc0c878: 7f e3 fb 78 mr r3,r31 ffc0c87c: 83 81 00 18 lwz r28,24(r1) ffc0c880: 7c 08 03 a6 mtlr r0 ffc0c884: 83 a1 00 1c lwz r29,28(r1) ffc0c888: 83 c1 00 20 lwz r30,32(r1) ffc0c88c: 83 e1 00 24 lwz r31,36(r1) ffc0c890: 38 21 00 28 addi r1,r1,40 ffc0c894: 4e 80 00 20 blr Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) ffc0c898: 2f 85 00 00 cmpwi cr7,r5,0 ffc0c89c: 41 9e ff d8 beq+ cr7,ffc0c874 <_Objects_Get_name_as_string+0x2c> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0c8a0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c8a4: 7c 7c 1b 78 mr r28,r3 ffc0c8a8: 40 9e 00 10 bne- cr7,ffc0c8b8 <_Objects_Get_name_as_string+0x70> ffc0c8ac: 3d 20 00 00 lis r9,0 ffc0c8b0: 81 29 28 7c lwz r9,10364(r9) ffc0c8b4: 83 89 00 08 lwz r28,8(r9) information = _Objects_Get_information_id( tmpId ); ffc0c8b8: 7f 83 e3 78 mr r3,r28 ffc0c8bc: 4b ff fe 6d bl ffc0c728 <_Objects_Get_information_id> if ( !information ) ffc0c8c0: 7c 7d 1b 79 mr. r29,r3 ffc0c8c4: 41 82 ff ac beq+ ffc0c870 <_Objects_Get_name_as_string+0x28> return NULL; the_object = _Objects_Get( information, tmpId, &location ); ffc0c8c8: 7f 84 e3 78 mr r4,r28 ffc0c8cc: 38 a1 00 08 addi r5,r1,8 ffc0c8d0: 48 00 00 cd bl ffc0c99c <_Objects_Get> switch ( location ) { ffc0c8d4: 80 01 00 08 lwz r0,8(r1) ffc0c8d8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c8dc: 40 be ff 94 bne- cr7,ffc0c870 <_Objects_Get_name_as_string+0x28> return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { ffc0c8e0: 89 3d 00 38 lbz r9,56(r29) ffc0c8e4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c8e8: 41 9e 00 80 beq- cr7,ffc0c968 <_Objects_Get_name_as_string+0x120> s = the_object->name.name_p; ffc0c8ec: 81 03 00 0c lwz r8,12(r3) lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { ffc0c8f0: 2f 88 00 00 cmpwi cr7,r8,0 ffc0c8f4: 41 9e 00 a0 beq- cr7,ffc0c994 <_Objects_Get_name_as_string+0x14c> for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0c8f8: 34 1e ff ff addic. r0,r30,-1 ffc0c8fc: 7c 09 03 a6 mtctr r0 ffc0c900: 41 82 00 94 beq- ffc0c994 <_Objects_Get_name_as_string+0x14c><== NEVER TAKEN ffc0c904: 88 08 00 00 lbz r0,0(r8) ffc0c908: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c90c: 41 9e 00 88 beq- cr7,ffc0c994 <_Objects_Get_name_as_string+0x14c> ffc0c910: 3c e0 00 00 lis r7,0 ffc0c914: 38 e7 27 88 addi r7,r7,10120 ffc0c918: 7f e9 fb 78 mr r9,r31 ffc0c91c: 39 60 00 00 li r11,0 ffc0c920: 48 00 00 10 b ffc0c930 <_Objects_Get_name_as_string+0xe8> ffc0c924: 7c 08 58 ae lbzx r0,r8,r11 ffc0c928: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c92c: 41 9e 00 2c beq- cr7,ffc0c958 <_Objects_Get_name_as_string+0x110> *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc0c930: 81 47 00 00 lwz r10,0(r7) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0c934: 39 6b 00 01 addi r11,r11,1 *d = (isprint((unsigned char)*s)) ? *s : '*'; ffc0c938: 7d 4a 02 14 add r10,r10,r0 ffc0c93c: 89 4a 00 01 lbz r10,1(r10) ffc0c940: 71 46 00 97 andi. r6,r10,151 ffc0c944: 40 82 00 08 bne- ffc0c94c <_Objects_Get_name_as_string+0x104> ffc0c948: 38 00 00 2a li r0,42 ffc0c94c: 98 09 00 00 stb r0,0(r9) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0c950: 39 29 00 01 addi r9,r9,1 ffc0c954: 42 00 ff d0 bdnz+ ffc0c924 <_Objects_Get_name_as_string+0xdc> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; ffc0c958: 38 00 00 00 li r0,0 ffc0c95c: 98 09 00 00 stb r0,0(r9) _Thread_Enable_dispatch(); ffc0c960: 48 00 0c 09 bl ffc0d568 <_Thread_Enable_dispatch> return name; ffc0c964: 4b ff ff 10 b ffc0c874 <_Objects_Get_name_as_string+0x2c> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; ffc0c968: 80 03 00 0c lwz r0,12(r3) lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; ffc0c96c: 39 01 00 0c addi r8,r1,12 ffc0c970: 99 21 00 10 stb r9,16(r1) } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; ffc0c974: 54 0a 46 3e rlwinm r10,r0,8,24,31 lname[ 1 ] = (u32_name >> 16) & 0xff; ffc0c978: 54 0b 84 3e rlwinm r11,r0,16,16,31 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; ffc0c97c: 99 41 00 0c stb r10,12(r1) lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; ffc0c980: 54 09 c2 3e rlwinm r9,r0,24,8,31 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; ffc0c984: 99 61 00 0d stb r11,13(r1) lname[ 2 ] = (u32_name >> 8) & 0xff; ffc0c988: 99 21 00 0e stb r9,14(r1) lname[ 3 ] = (u32_name >> 0) & 0xff; ffc0c98c: 98 01 00 0f stb r0,15(r1) ffc0c990: 4b ff ff 68 b ffc0c8f8 <_Objects_Get_name_as_string+0xb0> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { ffc0c994: 7f e9 fb 78 mr r9,r31 ffc0c998: 4b ff ff c0 b ffc0c958 <_Objects_Get_name_as_string+0x110> =============================================================================== ffc1e8cc <_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; ffc1e8cc: 81 23 00 08 lwz r9,8(r3) if ( information->maximum >= index ) { ffc1e8d0: a0 03 00 10 lhz r0,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; ffc1e8d4: 21 29 00 01 subfic r9,r9,1 ffc1e8d8: 7d 29 22 14 add r9,r9,r4 if ( information->maximum >= index ) { ffc1e8dc: 7f 89 00 40 cmplw cr7,r9,r0 ffc1e8e0: 41 9d 00 24 bgt- cr7,ffc1e904 <_Objects_Get_no_protection+0x38> if ( (the_object = information->local_table[ index ]) != NULL ) { ffc1e8e4: 81 63 00 1c lwz r11,28(r3) ffc1e8e8: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc1e8ec: 7c 6b 48 2e lwzx r3,r11,r9 ffc1e8f0: 2f 83 00 00 cmpwi cr7,r3,0 ffc1e8f4: 41 9e 00 10 beq- cr7,ffc1e904 <_Objects_Get_no_protection+0x38><== NEVER TAKEN *location = OBJECTS_LOCAL; ffc1e8f8: 38 00 00 00 li r0,0 ffc1e8fc: 90 05 00 00 stw r0,0(r5) return the_object; ffc1e900: 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; ffc1e904: 38 00 00 01 li r0,1 ffc1e908: 90 05 00 00 stw r0,0(r5) ffc1e90c: 38 60 00 00 li r3,0 return NULL; } ffc1e910: 4e 80 00 20 blr =============================================================================== ffc0c14c <_Objects_Id_to_name>: /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0c14c: 2c 03 00 00 cmpwi r3,0 */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc0c150: 94 21 ff e0 stwu r1,-32(r1) ffc0c154: 7c 08 02 a6 mflr r0 ffc0c158: 93 e1 00 1c stw r31,28(r1) ffc0c15c: 7c 9f 23 78 mr r31,r4 ffc0c160: 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; ffc0c164: 41 82 00 64 beq- ffc0c1c8 <_Objects_Id_to_name+0x7c> ffc0c168: 7c 64 1b 78 mr r4,r3 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); ffc0c16c: 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 ) ffc0c170: 38 09 ff ff addi r0,r9,-1 ffc0c174: 2b 80 00 03 cmplwi cr7,r0,3 ffc0c178: 41 9d 00 38 bgt- cr7,ffc0c1b0 <_Objects_Id_to_name+0x64> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) ffc0c17c: 3d 60 00 00 lis r11,0 ffc0c180: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0c184: 39 6b 2c 80 addi r11,r11,11392 ffc0c188: 7d 2b 48 2e lwzx r9,r11,r9 ffc0c18c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c190: 41 9e 00 20 beq- cr7,ffc0c1b0 <_Objects_Id_to_name+0x64> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; ffc0c194: 54 80 3e 7a rlwinm r0,r4,7,25,29 ffc0c198: 7c 69 00 2e lwzx r3,r9,r0 if ( !information ) ffc0c19c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c1a0: 41 9e 00 10 beq- cr7,ffc0c1b0 <_Objects_Id_to_name+0x64><== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) ffc0c1a4: 88 03 00 38 lbz r0,56(r3) ffc0c1a8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c1ac: 41 9e 00 2c beq- cr7,ffc0c1d8 <_Objects_Id_to_name+0x8c><== ALWAYS TAKEN return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } ffc0c1b0: 80 01 00 24 lwz r0,36(r1) if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; ffc0c1b4: 38 60 00 03 li r3,3 } ffc0c1b8: 83 e1 00 1c lwz r31,28(r1) ffc0c1bc: 38 21 00 20 addi r1,r1,32 ffc0c1c0: 7c 08 03 a6 mtlr r0 ffc0c1c4: 4e 80 00 20 blr /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0c1c8: 3d 20 00 00 lis r9,0 ffc0c1cc: 81 29 27 fc lwz r9,10236(r9) ffc0c1d0: 80 89 00 08 lwz r4,8(r9) ffc0c1d4: 4b ff ff 98 b ffc0c16c <_Objects_Id_to_name+0x20> #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 ); ffc0c1d8: 38 a1 00 08 addi r5,r1,8 ffc0c1dc: 4b ff fe d5 bl ffc0c0b0 <_Objects_Get> if ( !the_object ) ffc0c1e0: 2c 03 00 00 cmpwi r3,0 ffc0c1e4: 41 a2 ff cc beq- ffc0c1b0 <_Objects_Id_to_name+0x64> return OBJECTS_INVALID_ID; *name = the_object->name; ffc0c1e8: 80 03 00 0c lwz r0,12(r3) ffc0c1ec: 90 1f 00 00 stw r0,0(r31) _Thread_Enable_dispatch(); ffc0c1f0: 48 00 0b 4d bl ffc0cd3c <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } ffc0c1f4: 80 01 00 24 lwz r0,36(r1) the_object = _Objects_Get( information, tmpId, &ignored_location ); if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); ffc0c1f8: 38 60 00 00 li r3,0 return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } ffc0c1fc: 83 e1 00 1c lwz r31,28(r1) ffc0c200: 7c 08 03 a6 mtlr r0 ffc0c204: 38 21 00 20 addi r1,r1,32 ffc0c208: 4e 80 00 20 blr =============================================================================== ffc0b1fc <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { ffc0b1fc: 94 21 ff e8 stwu r1,-24(r1) ffc0b200: 7c 08 02 a6 mflr r0 ffc0b204: 90 01 00 1c stw r0,28(r1) ffc0b208: 93 a1 00 0c stw r29,12(r1) ffc0b20c: 7c 9d 23 78 mr r29,r4 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); ffc0b210: a0 83 00 3a lhz r4,58(r3) bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { ffc0b214: 93 c1 00 10 stw r30,16(r1) ffc0b218: 7c 7e 1b 78 mr r30,r3 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); ffc0b21c: 7c a3 2b 78 mr r3,r5 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { ffc0b220: 93 81 00 08 stw r28,8(r1) ffc0b224: 7c bc 2b 78 mr r28,r5 ffc0b228: 93 e1 00 14 stw r31,20(r1) size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); ffc0b22c: 48 00 ab cd bl ffc15df8 ffc0b230: 7c 7f 1b 78 mr r31,r3 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { ffc0b234: 88 1e 00 38 lbz r0,56(r30) ffc0b238: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b23c: 40 9e 00 80 bne- cr7,ffc0b2bc <_Objects_Set_name+0xc0> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( ffc0b240: 2b 83 00 01 cmplwi cr7,r3,1 ffc0b244: 89 3c 00 00 lbz r9,0(r28) ffc0b248: 55 29 c0 0e rlwinm r9,r9,24,0,7 ffc0b24c: 40 9d 00 60 ble- cr7,ffc0b2ac <_Objects_Set_name+0xb0> ffc0b250: 2f 83 00 02 cmpwi cr7,r3,2 ffc0b254: 88 1c 00 01 lbz r0,1(r28) ffc0b258: 54 00 80 1e rlwinm r0,r0,16,0,15 ffc0b25c: 7c 09 4b 78 or r9,r0,r9 ffc0b260: 41 9e 00 50 beq- cr7,ffc0b2b0 <_Objects_Set_name+0xb4> ffc0b264: 2f 83 00 03 cmpwi cr7,r3,3 ffc0b268: 89 7c 00 02 lbz r11,2(r28) ffc0b26c: 38 00 00 20 li r0,32 ffc0b270: 55 6b 40 2e rlwinm r11,r11,8,0,23 ffc0b274: 7d 29 5b 78 or r9,r9,r11 ffc0b278: 41 9e 00 08 beq- cr7,ffc0b280 <_Objects_Set_name+0x84> ffc0b27c: 88 1c 00 03 lbz r0,3(r28) ffc0b280: 7d 20 03 78 or r0,r9,r0 ffc0b284: 90 1d 00 0c stw r0,12(r29) ffc0b288: 38 60 00 01 li r3,1 ); } return true; } ffc0b28c: 80 01 00 1c lwz r0,28(r1) ffc0b290: 83 81 00 08 lwz r28,8(r1) ffc0b294: 7c 08 03 a6 mtlr r0 ffc0b298: 83 a1 00 0c lwz r29,12(r1) ffc0b29c: 83 c1 00 10 lwz r30,16(r1) ffc0b2a0: 83 e1 00 14 lwz r31,20(r1) ffc0b2a4: 38 21 00 18 addi r1,r1,24 ffc0b2a8: 4e 80 00 20 blr d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( ffc0b2ac: 65 29 00 20 oris r9,r9,32 ffc0b2b0: 61 29 20 00 ori r9,r9,8192 ffc0b2b4: 38 00 00 20 li r0,32 ffc0b2b8: 4b ff ff c8 b ffc0b280 <_Objects_Set_name+0x84> #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); ffc0b2bc: 38 63 00 01 addi r3,r3,1 ffc0b2c0: 48 00 24 81 bl ffc0d740 <_Workspace_Allocate> if ( !d ) ffc0b2c4: 7c 7e 1b 79 mr. r30,r3 ffc0b2c8: 38 60 00 00 li r3,0 ffc0b2cc: 41 a2 ff c0 beq- ffc0b28c <_Objects_Set_name+0x90> <== NEVER TAKEN return false; if ( the_object->name.name_p ) { ffc0b2d0: 80 7d 00 0c lwz r3,12(r29) ffc0b2d4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b2d8: 41 9e 00 10 beq- cr7,ffc0b2e8 <_Objects_Set_name+0xec> _Workspace_Free( (void *)the_object->name.name_p ); ffc0b2dc: 48 00 24 99 bl ffc0d774 <_Workspace_Free> the_object->name.name_p = NULL; ffc0b2e0: 38 00 00 00 li r0,0 ffc0b2e4: 90 1d 00 0c stw r0,12(r29) } strncpy( d, name, length ); ffc0b2e8: 7f 84 e3 78 mr r4,r28 ffc0b2ec: 7f c3 f3 78 mr r3,r30 ffc0b2f0: 7f e5 fb 78 mr r5,r31 ffc0b2f4: 48 00 aa 25 bl ffc15d18 d[length] = '\0'; ffc0b2f8: 38 00 00 00 li r0,0 ffc0b2fc: 7c 1e f9 ae stbx r0,r30,r31 the_object->name.name_p = d; ffc0b300: 38 60 00 01 li r3,1 ffc0b304: 93 dd 00 0c stw r30,12(r29) ); } return true; } ffc0b308: 80 01 00 1c lwz r0,28(r1) ffc0b30c: 83 81 00 08 lwz r28,8(r1) ffc0b310: 7c 08 03 a6 mtlr r0 ffc0b314: 83 a1 00 0c lwz r29,12(r1) ffc0b318: 83 c1 00 10 lwz r30,16(r1) ffc0b31c: 83 e1 00 14 lwz r31,20(r1) ffc0b320: 38 21 00 18 addi r1,r1,24 ffc0b324: 4e 80 00 20 blr =============================================================================== ffc0a838 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0a838: 94 21 ff e8 stwu r1,-24(r1) ffc0a83c: 7c 08 02 a6 mflr r0 ffc0a840: 90 01 00 1c stw r0,28(r1) ffc0a844: 93 c1 00 10 stw r30,16(r1) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / ffc0a848: a1 23 00 10 lhz r9,16(r3) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); ffc0a84c: a3 c3 00 0a lhz r30,10(r3) block_count = (information->maximum - index_base) / ffc0a850: a0 03 00 14 lhz r0,20(r3) ffc0a854: 7d 3e 48 50 subf r9,r30,r9 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0a858: 93 81 00 08 stw r28,8(r1) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / ffc0a85c: 7d 29 03 96 divwu r9,r9,r0 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0a860: 93 a1 00 0c stw r29,12(r1) ffc0a864: 93 e1 00 14 stw r31,20(r1) index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0a868: 2f 89 00 00 cmpwi cr7,r9,0 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0a86c: 7c 7c 1b 78 mr r28,r3 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0a870: 41 9e 00 3c beq- cr7,ffc0a8ac <_Objects_Shrink_information+0x74><== NEVER TAKEN if ( information->inactive_per_block[ block ] == ffc0a874: 81 63 00 30 lwz r11,48(r3) ffc0a878: 7d 29 03 a6 mtctr r9 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; ffc0a87c: 3b e0 00 04 li r31,4 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == ffc0a880: 81 2b 00 00 lwz r9,0(r11) ffc0a884: 7f 80 48 00 cmpw cr7,r0,r9 ffc0a888: 41 9e 00 44 beq- cr7,ffc0a8cc <_Objects_Shrink_information+0x94><== NEVER TAKEN index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0a88c: 42 40 00 20 bdz- ffc0a8ac <_Objects_Shrink_information+0x74> if ( information->inactive_per_block[ block ] == ffc0a890: 7d 2b f8 2e lwzx r9,r11,r31 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; ffc0a894: 7f de 02 14 add r30,r30,r0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == ffc0a898: 7f 80 48 00 cmpw cr7,r0,r9 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; ffc0a89c: 39 3f 00 04 addi r9,r31,4 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == ffc0a8a0: 41 9e 00 30 beq- cr7,ffc0a8d0 <_Objects_Shrink_information+0x98> ffc0a8a4: 7d 3f 4b 78 mr r31,r9 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0a8a8: 42 00 ff e8 bdnz+ ffc0a890 <_Objects_Shrink_information+0x58> return; } index_base += information->allocation_size; } } ffc0a8ac: 80 01 00 1c lwz r0,28(r1) ffc0a8b0: 83 81 00 08 lwz r28,8(r1) ffc0a8b4: 7c 08 03 a6 mtlr r0 ffc0a8b8: 83 a1 00 0c lwz r29,12(r1) ffc0a8bc: 83 c1 00 10 lwz r30,16(r1) ffc0a8c0: 83 e1 00 14 lwz r31,20(r1) ffc0a8c4: 38 21 00 18 addi r1,r1,24 ffc0a8c8: 4e 80 00 20 blr index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == ffc0a8cc: 3b e0 00 00 li r31,0 <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; ffc0a8d0: 80 7c 00 20 lwz r3,32(r28) ffc0a8d4: 48 00 00 10 b ffc0a8e4 <_Objects_Shrink_information+0xac> if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); ffc0a8d8: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0a8dc: 7f a3 eb 78 mr r3,r29 ffc0a8e0: 41 9e 00 34 beq- cr7,ffc0a914 <_Objects_Shrink_information+0xdc> * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); ffc0a8e4: 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; ffc0a8e8: 83 a3 00 00 lwz r29,0(r3) if ((index >= index_base) && ffc0a8ec: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0a8f0: 41 bc ff e8 blt- cr7,ffc0a8d8 <_Objects_Shrink_information+0xa0> (index < (index_base + information->allocation_size))) { ffc0a8f4: a1 3c 00 14 lhz r9,20(r28) ffc0a8f8: 7d 3e 4a 14 add r9,r30,r9 ffc0a8fc: 7f 80 48 40 cmplw cr7,r0,r9 ffc0a900: 40 9c ff d8 bge+ cr7,ffc0a8d8 <_Objects_Shrink_information+0xa0> _Chain_Extract( &extract_me->Node ); ffc0a904: 48 00 4e 31 bl ffc0f734 <_Chain_Extract> } } while ( the_object ); ffc0a908: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0a90c: 7f a3 eb 78 mr r3,r29 ffc0a910: 40 9e ff d4 bne+ cr7,ffc0a8e4 <_Objects_Shrink_information+0xac><== ALWAYS TAKEN /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); ffc0a914: 81 3c 00 34 lwz r9,52(r28) ffc0a918: 7c 69 f8 2e lwzx r3,r9,r31 ffc0a91c: 48 00 23 69 bl ffc0cc84 <_Workspace_Free> information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc0a920: a1 5c 00 2c lhz r10,44(r28) ffc0a924: a0 1c 00 14 lhz r0,20(r28) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; ffc0a928: 81 3c 00 34 lwz r9,52(r28) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc0a92c: 7c 00 50 50 subf r0,r0,r10 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; ffc0a930: 81 7c 00 30 lwz r11,48(r28) information->inactive -= information->allocation_size; ffc0a934: b0 1c 00 2c sth r0,44(r28) return; } index_base += information->allocation_size; } } ffc0a938: 80 01 00 1c lwz r0,28(r1) * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; ffc0a93c: 7f ab f9 2e stwx r29,r11,r31 return; } index_base += information->allocation_size; } } ffc0a940: 7c 08 03 a6 mtlr r0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; ffc0a944: 7f a9 f9 2e stwx r29,r9,r31 return; } index_base += information->allocation_size; } } ffc0a948: 83 81 00 08 lwz r28,8(r1) ffc0a94c: 83 a1 00 0c lwz r29,12(r1) ffc0a950: 83 c1 00 10 lwz r30,16(r1) ffc0a954: 83 e1 00 14 lwz r31,20(r1) ffc0a958: 38 21 00 18 addi r1,r1,24 ffc0a95c: 4e 80 00 20 blr =============================================================================== ffc09ce8 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { ffc09ce8: 94 21 ff d0 stwu r1,-48(r1) ffc09cec: 7c 08 02 a6 mflr r0 ffc09cf0: 93 c1 00 28 stw r30,40(r1) register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { ffc09cf4: 3b c1 00 08 addi r30,r1,8 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { ffc09cf8: 93 e1 00 2c stw r31,44(r1) ffc09cfc: 7c 9f 23 78 mr r31,r4 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { ffc09d00: 7f c4 f3 78 mr r4,r30 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { ffc09d04: 93 a1 00 24 stw r29,36(r1) ffc09d08: 7c 7d 1b 78 mr r29,r3 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { ffc09d0c: 7f e3 fb 78 mr r3,r31 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { ffc09d10: 93 61 00 1c stw r27,28(r1) ffc09d14: 7c db 33 78 mr r27,r6 ffc09d18: 93 81 00 20 stw r28,32(r1) ffc09d1c: 7c bc 2b 78 mr r28,r5 ffc09d20: 90 01 00 34 stw r0,52(r1) ffc09d24: 93 41 00 18 stw r26,24(r1) register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { ffc09d28: 48 00 02 a9 bl ffc09fd0 <_POSIX_Mutex_Get> ffc09d2c: 2f 83 00 00 cmpwi cr7,r3,0 ffc09d30: 41 9e 00 30 beq- cr7,ffc09d60 <_POSIX_Condition_variables_Wait_support+0x78> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc09d34: 3d 20 00 00 lis r9,0 ffc09d38: 81 69 27 c8 lwz r11,10184(r9) return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); ffc09d3c: 7f c4 f3 78 mr r4,r30 ffc09d40: 7f a3 eb 78 mr r3,r29 ffc09d44: 38 0b ff ff addi r0,r11,-1 ffc09d48: 90 09 27 c8 stw r0,10184(r9) ffc09d4c: 4b ff fc b1 bl ffc099fc <_POSIX_Condition_variables_Get> ffc09d50: 7c 7a 1b 78 mr r26,r3 switch ( location ) { ffc09d54: 80 01 00 08 lwz r0,8(r1) ffc09d58: 2f 80 00 00 cmpwi cr7,r0,0 ffc09d5c: 41 9e 00 34 beq- cr7,ffc09d90 <_POSIX_Condition_variables_Wait_support+0xa8> /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); if ( mutex_status ) ffc09d60: 3b c0 00 16 li r30,22 case OBJECTS_ERROR: break; } return EINVAL; } ffc09d64: 80 01 00 34 lwz r0,52(r1) ffc09d68: 7f c3 f3 78 mr r3,r30 ffc09d6c: 83 41 00 18 lwz r26,24(r1) ffc09d70: 7c 08 03 a6 mtlr r0 ffc09d74: 83 61 00 1c lwz r27,28(r1) ffc09d78: 83 81 00 20 lwz r28,32(r1) ffc09d7c: 83 a1 00 24 lwz r29,36(r1) ffc09d80: 83 c1 00 28 lwz r30,40(r1) ffc09d84: 83 e1 00 2c lwz r31,44(r1) ffc09d88: 38 21 00 30 addi r1,r1,48 ffc09d8c: 4e 80 00 20 blr the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { ffc09d90: 80 03 00 14 lwz r0,20(r3) ffc09d94: 2f 80 00 00 cmpwi cr7,r0,0 ffc09d98: 41 9e 00 44 beq- cr7,ffc09ddc <_POSIX_Condition_variables_Wait_support+0xf4> ffc09d9c: 81 3f 00 00 lwz r9,0(r31) ffc09da0: 7f 80 48 00 cmpw cr7,r0,r9 ffc09da4: 41 9e 00 38 beq- cr7,ffc09ddc <_POSIX_Condition_variables_Wait_support+0xf4> _Thread_Enable_dispatch(); ffc09da8: 48 00 41 ed bl ffc0df94 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return EINVAL; } ffc09dac: 80 01 00 34 lwz r0,52(r1) switch ( location ) { case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); ffc09db0: 3b c0 00 16 li r30,22 case OBJECTS_ERROR: break; } return EINVAL; } ffc09db4: 83 41 00 18 lwz r26,24(r1) ffc09db8: 7c 08 03 a6 mtlr r0 ffc09dbc: 7f c3 f3 78 mr r3,r30 ffc09dc0: 83 61 00 1c lwz r27,28(r1) ffc09dc4: 83 81 00 20 lwz r28,32(r1) ffc09dc8: 83 a1 00 24 lwz r29,36(r1) ffc09dcc: 83 c1 00 28 lwz r30,40(r1) ffc09dd0: 83 e1 00 2c lwz r31,44(r1) ffc09dd4: 38 21 00 30 addi r1,r1,48 ffc09dd8: 4e 80 00 20 blr if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); ffc09ddc: 7f e3 fb 78 mr r3,r31 ffc09de0: 48 00 04 b9 bl ffc0a298 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { ffc09de4: 2f 9b 00 00 cmpwi cr7,r27,0 ffc09de8: 41 9e 00 48 beq- cr7,ffc09e30 <_POSIX_Condition_variables_Wait_support+0x148> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); ffc09dec: 48 00 41 a9 bl ffc0df94 <_Thread_Enable_dispatch> ffc09df0: 3b c0 00 74 li r30,116 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); ffc09df4: 7f e3 fb 78 mr r3,r31 ffc09df8: 48 00 03 e9 bl ffc0a1e0 if ( mutex_status ) ffc09dfc: 2f 83 00 00 cmpwi cr7,r3,0 ffc09e00: 40 be ff 60 bne- cr7,ffc09d60 <_POSIX_Condition_variables_Wait_support+0x78> case OBJECTS_ERROR: break; } return EINVAL; } ffc09e04: 80 01 00 34 lwz r0,52(r1) ffc09e08: 7f c3 f3 78 mr r3,r30 ffc09e0c: 83 41 00 18 lwz r26,24(r1) ffc09e10: 7c 08 03 a6 mtlr r0 ffc09e14: 83 61 00 1c lwz r27,28(r1) ffc09e18: 83 81 00 20 lwz r28,32(r1) ffc09e1c: 83 a1 00 24 lwz r29,36(r1) ffc09e20: 83 c1 00 28 lwz r30,40(r1) ffc09e24: 83 e1 00 2c lwz r31,44(r1) ffc09e28: 38 21 00 30 addi r1,r1,48 ffc09e2c: 4e 80 00 20 blr if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; ffc09e30: 3f c0 00 00 lis r30,0 return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; ffc09e34: 80 1f 00 00 lwz r0,0(r31) _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; ffc09e38: 81 3e 28 08 lwz r9,10248(r30) 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; ffc09e3c: 39 40 00 01 li r10,1 return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; ffc09e40: 90 1a 00 14 stw r0,20(r26) _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; ffc09e44: 38 1a 00 18 addi r0,r26,24 _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); ffc09e48: 3c a0 ff c1 lis r5,-63 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; ffc09e4c: 93 69 00 34 stw r27,52(r9) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); ffc09e50: 7c 03 03 78 mr r3,r0 ffc09e54: 7f 84 e3 78 mr r4,r28 the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; ffc09e58: 81 7d 00 00 lwz r11,0(r29) _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); ffc09e5c: 38 a5 eb 14 addi r5,r5,-5356 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; ffc09e60: 90 09 00 44 stw r0,68(r9) _Thread_Executing->Wait.id = *cond; ffc09e64: 91 69 00 20 stw r11,32(r9) ffc09e68: 91 5a 00 48 stw r10,72(r26) _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); ffc09e6c: 48 00 47 b1 bl ffc0e61c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); ffc09e70: 48 00 41 25 bl ffc0df94 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; ffc09e74: 81 3e 28 08 lwz r9,10248(r30) ffc09e78: 83 c9 00 34 lwz r30,52(r9) if ( status && status != ETIMEDOUT ) ffc09e7c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc09e80: 41 9e ff 74 beq+ cr7,ffc09df4 <_POSIX_Condition_variables_Wait_support+0x10c> ffc09e84: 2f 9e 00 74 cmpwi cr7,r30,116 ffc09e88: 40 9e fe dc bne+ cr7,ffc09d64 <_POSIX_Condition_variables_Wait_support+0x7c><== NEVER TAKEN ffc09e8c: 4b ff ff 68 b ffc09df4 <_POSIX_Condition_variables_Wait_support+0x10c> =============================================================================== ffc0e5d8 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { ffc0e5d8: 94 21 ff d0 stwu r1,-48(r1) ffc0e5dc: 7c 08 02 a6 mflr r0 ffc0e5e0: 93 e1 00 2c stw r31,44(r1) ffc0e5e4: 7c 7f 1b 78 mr r31,r3 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( ffc0e5e8: 3c 60 00 00 lis r3,0 ffc0e5ec: 93 81 00 20 stw r28,32(r1) ffc0e5f0: 38 63 36 44 addi r3,r3,13892 ffc0e5f4: 7c 9c 23 78 mr r28,r4 ffc0e5f8: 93 c1 00 28 stw r30,40(r1) ffc0e5fc: 7f e4 fb 78 mr r4,r31 ffc0e600: 7c be 2b 78 mr r30,r5 ffc0e604: 38 a1 00 08 addi r5,r1,8 ffc0e608: 90 01 00 34 stw r0,52(r1) ffc0e60c: 93 41 00 18 stw r26,24(r1) ffc0e610: 7c fa 3b 78 mr r26,r7 ffc0e614: 93 61 00 1c stw r27,28(r1) ffc0e618: 7d 1b 43 78 mr r27,r8 ffc0e61c: 93 a1 00 24 stw r29,36(r1) ffc0e620: 7c dd 33 78 mr r29,r6 ffc0e624: 48 00 40 4d bl ffc12670 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { ffc0e628: 80 01 00 08 lwz r0,8(r1) ffc0e62c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e630: 41 9e 00 3c beq- cr7,ffc0e66c <_POSIX_Message_queue_Receive_support+0x94> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); ffc0e634: 48 00 d0 1d bl ffc1b650 <__errno> ffc0e638: 38 00 00 09 li r0,9 ffc0e63c: 90 03 00 00 stw r0,0(r3) ffc0e640: 38 60 ff ff li r3,-1 } ffc0e644: 80 01 00 34 lwz r0,52(r1) ffc0e648: 83 41 00 18 lwz r26,24(r1) ffc0e64c: 7c 08 03 a6 mtlr r0 ffc0e650: 83 61 00 1c lwz r27,28(r1) ffc0e654: 83 81 00 20 lwz r28,32(r1) ffc0e658: 83 a1 00 24 lwz r29,36(r1) ffc0e65c: 83 c1 00 28 lwz r30,40(r1) ffc0e660: 83 e1 00 2c lwz r31,44(r1) ffc0e664: 38 21 00 30 addi r1,r1,48 ffc0e668: 4e 80 00 20 blr the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { ffc0e66c: 80 03 00 14 lwz r0,20(r3) ffc0e670: 54 09 07 be clrlwi r9,r0,30 ffc0e674: 2f 89 00 01 cmpwi cr7,r9,1 ffc0e678: 41 9e 00 dc beq- cr7,ffc0e754 <_POSIX_Message_queue_Receive_support+0x17c> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; ffc0e67c: 80 63 00 10 lwz r3,16(r3) if ( msg_len < the_mq->Message_queue.maximum_message_size ) { ffc0e680: 81 23 00 68 lwz r9,104(r3) ffc0e684: 7f 89 f0 40 cmplw cr7,r9,r30 ffc0e688: 41 9d 00 94 bgt- cr7,ffc0e71c <_POSIX_Message_queue_Receive_support+0x144> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) ffc0e68c: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0e690: 38 e0 00 00 li r7,0 ffc0e694: 40 9e 00 7c bne- cr7,ffc0e710 <_POSIX_Message_queue_Receive_support+0x138><== ALWAYS TAKEN /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; ffc0e698: 38 00 ff ff li r0,-1 ffc0e69c: 7c 26 0b 78 mr r6,r1 ffc0e6a0: 94 06 00 0c stwu r0,12(r6) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( ffc0e6a4: 7f e4 fb 78 mr r4,r31 ffc0e6a8: 38 63 00 1c addi r3,r3,28 ffc0e6ac: 7f 85 e3 78 mr r5,r28 ffc0e6b0: 7f 68 db 78 mr r8,r27 timeout ); _Thread_Enable_dispatch(); *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); ffc0e6b4: 3f e0 00 00 lis r31,0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( ffc0e6b8: 48 00 2b 19 bl ffc111d0 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); ffc0e6bc: 48 00 4c 01 bl ffc132bc <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); ffc0e6c0: 81 3f 2a 38 lwz r9,10808(r31) if ( !_Thread_Executing->Wait.return_code ) ffc0e6c4: 80 09 00 34 lwz r0,52(r9) do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = ffc0e6c8: 81 29 00 24 lwz r9,36(r9) _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) ffc0e6cc: 2f 80 00 00 cmpwi cr7,r0,0 do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = ffc0e6d0: 7d 2b fe 70 srawi r11,r9,31 ffc0e6d4: 7d 60 4a 78 xor r0,r11,r9 ffc0e6d8: 7c 0b 00 50 subf r0,r11,r0 ffc0e6dc: 90 1d 00 00 stw r0,0(r29) _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) ffc0e6e0: 40 9e 00 54 bne- cr7,ffc0e734 <_POSIX_Message_queue_Receive_support+0x15c> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } ffc0e6e4: 80 01 00 34 lwz r0,52(r1) _Thread_Enable_dispatch(); *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) return length_out; ffc0e6e8: 80 61 00 0c lwz r3,12(r1) case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } ffc0e6ec: 7c 08 03 a6 mtlr r0 ffc0e6f0: 83 41 00 18 lwz r26,24(r1) ffc0e6f4: 83 61 00 1c lwz r27,28(r1) ffc0e6f8: 83 81 00 20 lwz r28,32(r1) ffc0e6fc: 83 a1 00 24 lwz r29,36(r1) ffc0e700: 83 c1 00 28 lwz r30,40(r1) ffc0e704: 83 e1 00 2c lwz r31,44(r1) ffc0e708: 38 21 00 30 addi r1,r1,48 ffc0e70c: 4e 80 00 20 blr /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; ffc0e710: 68 07 40 00 xori r7,r0,16384 ffc0e714: 54 e7 97 fe rlwinm r7,r7,18,31,31 ffc0e718: 4b ff ff 80 b ffc0e698 <_POSIX_Message_queue_Receive_support+0xc0> } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); ffc0e71c: 48 00 4b a1 bl ffc132bc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); ffc0e720: 48 00 cf 31 bl ffc1b650 <__errno> ffc0e724: 38 00 00 7a li r0,122 ffc0e728: 90 03 00 00 stw r0,0(r3) ffc0e72c: 38 60 ff ff li r3,-1 ffc0e730: 4b ff ff 14 b ffc0e644 <_POSIX_Message_queue_Receive_support+0x6c> _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) return length_out; rtems_set_errno_and_return_minus_one( ffc0e734: 48 00 cf 1d bl ffc1b650 <__errno> ffc0e738: 81 3f 2a 38 lwz r9,10808(r31) ffc0e73c: 7c 7e 1b 78 mr r30,r3 ffc0e740: 80 69 00 34 lwz r3,52(r9) ffc0e744: 48 00 03 6d bl ffc0eab0 <_POSIX_Message_queue_Translate_core_message_queue_return_code> ffc0e748: 90 7e 00 00 stw r3,0(r30) ffc0e74c: 38 60 ff ff li r3,-1 ffc0e750: 4b ff fe f4 b ffc0e644 <_POSIX_Message_queue_Receive_support+0x6c> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); ffc0e754: 48 00 4b 69 bl ffc132bc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); ffc0e758: 48 00 ce f9 bl ffc1b650 <__errno> ffc0e75c: 38 00 00 09 li r0,9 ffc0e760: 90 03 00 00 stw r0,0(r3) ffc0e764: 38 60 ff ff li r3,-1 ffc0e768: 4b ff fe dc b ffc0e644 <_POSIX_Message_queue_Receive_support+0x6c> =============================================================================== ffc0e794 <_POSIX_Message_queue_Send_support>: /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) ffc0e794: 2b 86 00 20 cmplwi cr7,r6,32 size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { ffc0e798: 94 21 ff d0 stwu r1,-48(r1) ffc0e79c: 7c 08 02 a6 mflr r0 ffc0e7a0: 93 41 00 18 stw r26,24(r1) ffc0e7a4: 7c fa 3b 78 mr r26,r7 ffc0e7a8: 93 61 00 1c stw r27,28(r1) ffc0e7ac: 7c 9b 23 78 mr r27,r4 ffc0e7b0: 93 81 00 20 stw r28,32(r1) ffc0e7b4: 7c bc 2b 78 mr r28,r5 ffc0e7b8: 93 a1 00 24 stw r29,36(r1) ffc0e7bc: 7c 7d 1b 78 mr r29,r3 ffc0e7c0: 93 c1 00 28 stw r30,40(r1) ffc0e7c4: 7d 1e 43 78 mr r30,r8 ffc0e7c8: 93 e1 00 2c stw r31,44(r1) ffc0e7cc: 7c df 33 78 mr r31,r6 ffc0e7d0: 90 01 00 34 stw r0,52(r1) /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) ffc0e7d4: 41 9d 01 00 bgt- cr7,ffc0e8d4 <_POSIX_Message_queue_Send_support+0x140> ffc0e7d8: 3c 60 00 00 lis r3,0 ffc0e7dc: 38 63 36 44 addi r3,r3,13892 ffc0e7e0: 7f a4 eb 78 mr r4,r29 ffc0e7e4: 38 a1 00 08 addi r5,r1,8 ffc0e7e8: 48 00 3e 89 bl ffc12670 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { ffc0e7ec: 80 01 00 08 lwz r0,8(r1) ffc0e7f0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e7f4: 40 9e 00 cc bne- cr7,ffc0e8c0 <_POSIX_Message_queue_Send_support+0x12c> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { ffc0e7f8: 80 03 00 14 lwz r0,20(r3) ffc0e7fc: 70 09 00 03 andi. r9,r0,3 ffc0e800: 41 82 00 e8 beq- ffc0e8e8 <_POSIX_Message_queue_Send_support+0x154> the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) ffc0e804: 2f 9a 00 00 cmpwi cr7,r26,0 if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; ffc0e808: 81 63 00 10 lwz r11,16(r3) /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) ffc0e80c: 39 20 00 00 li r9,0 ffc0e810: 40 9e 00 68 bne- cr7,ffc0e878 <_POSIX_Message_queue_Send_support+0xe4> do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( ffc0e814: 7d 1f 00 d0 neg r8,r31 ffc0e818: 7f 64 db 78 mr r4,r27 ffc0e81c: 7f 85 e3 78 mr r5,r28 ffc0e820: 7f a6 eb 78 mr r6,r29 ffc0e824: 7f ca f3 78 mr r10,r30 ffc0e828: 38 6b 00 1c addi r3,r11,28 ffc0e82c: 38 e0 00 00 li r7,0 ffc0e830: 48 00 2b 2d bl ffc1135c <_CORE_message_queue_Submit> ffc0e834: 7c 7f 1b 78 mr r31,r3 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); ffc0e838: 48 00 4a 85 bl ffc132bc <_Thread_Enable_dispatch> * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) ffc0e83c: 2f 9f 00 07 cmpwi cr7,r31,7 ffc0e840: 41 9e 00 70 beq- cr7,ffc0e8b0 <_POSIX_Message_queue_Send_support+0x11c><== NEVER TAKEN msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) ffc0e844: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0e848: 38 60 00 00 li r3,0 ffc0e84c: 40 9e 00 b4 bne- cr7,ffc0e900 <_POSIX_Message_queue_Send_support+0x16c> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } ffc0e850: 80 01 00 34 lwz r0,52(r1) ffc0e854: 83 41 00 18 lwz r26,24(r1) ffc0e858: 7c 08 03 a6 mtlr r0 ffc0e85c: 83 61 00 1c lwz r27,28(r1) ffc0e860: 83 81 00 20 lwz r28,32(r1) ffc0e864: 83 a1 00 24 lwz r29,36(r1) ffc0e868: 83 c1 00 28 lwz r30,40(r1) ffc0e86c: 83 e1 00 2c lwz r31,44(r1) ffc0e870: 38 21 00 30 addi r1,r1,48 ffc0e874: 4e 80 00 20 blr /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; ffc0e878: 68 09 40 00 xori r9,r0,16384 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( ffc0e87c: 7d 1f 00 d0 neg r8,r31 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; ffc0e880: 55 29 97 fe rlwinm r9,r9,18,31,31 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( ffc0e884: 7f 64 db 78 mr r4,r27 ffc0e888: 7f 85 e3 78 mr r5,r28 ffc0e88c: 7f a6 eb 78 mr r6,r29 ffc0e890: 7f ca f3 78 mr r10,r30 ffc0e894: 38 6b 00 1c addi r3,r11,28 ffc0e898: 38 e0 00 00 li r7,0 ffc0e89c: 48 00 2a c1 bl ffc1135c <_CORE_message_queue_Submit> ffc0e8a0: 7c 7f 1b 78 mr r31,r3 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); ffc0e8a4: 48 00 4a 19 bl ffc132bc <_Thread_Enable_dispatch> * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) ffc0e8a8: 2f 9f 00 07 cmpwi cr7,r31,7 ffc0e8ac: 40 9e ff 98 bne+ cr7,ffc0e844 <_POSIX_Message_queue_Send_support+0xb0> msg_status = _Thread_Executing->Wait.return_code; ffc0e8b0: 3d 20 00 00 lis r9,0 ffc0e8b4: 81 29 2a 38 lwz r9,10808(r9) ffc0e8b8: 83 e9 00 34 lwz r31,52(r9) ffc0e8bc: 4b ff ff 88 b ffc0e844 <_POSIX_Message_queue_Send_support+0xb0> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); ffc0e8c0: 48 00 cd 91 bl ffc1b650 <__errno> ffc0e8c4: 38 00 00 09 li r0,9 ffc0e8c8: 90 03 00 00 stw r0,0(r3) ffc0e8cc: 38 60 ff ff li r3,-1 ffc0e8d0: 4b ff ff 80 b ffc0e850 <_POSIX_Message_queue_Send_support+0xbc> * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc0e8d4: 48 00 cd 7d bl ffc1b650 <__errno> ffc0e8d8: 38 00 00 16 li r0,22 ffc0e8dc: 90 03 00 00 stw r0,0(r3) ffc0e8e0: 38 60 ff ff li r3,-1 ffc0e8e4: 4b ff ff 6c b ffc0e850 <_POSIX_Message_queue_Send_support+0xbc> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); ffc0e8e8: 48 00 49 d5 bl ffc132bc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); ffc0e8ec: 48 00 cd 65 bl ffc1b650 <__errno> ffc0e8f0: 38 00 00 09 li r0,9 ffc0e8f4: 90 03 00 00 stw r0,0(r3) ffc0e8f8: 38 60 ff ff li r3,-1 ffc0e8fc: 4b ff ff 54 b ffc0e850 <_POSIX_Message_queue_Send_support+0xbc> msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( ffc0e900: 48 00 cd 51 bl ffc1b650 <__errno> ffc0e904: 7c 7e 1b 78 mr r30,r3 ffc0e908: 7f e3 fb 78 mr r3,r31 ffc0e90c: 48 00 01 a5 bl ffc0eab0 <_POSIX_Message_queue_Translate_core_message_queue_return_code> ffc0e910: 90 7e 00 00 stw r3,0(r30) ffc0e914: 38 60 ff ff li r3,-1 ffc0e918: 4b ff ff 38 b ffc0e850 <_POSIX_Message_queue_Send_support+0xbc> =============================================================================== ffc0ed94 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { ffc0ed94: 7c 08 02 a6 mflr r0 ffc0ed98: 94 21 ff f8 stwu r1,-8(r1) ffc0ed9c: 90 01 00 0c stw r0,12(r1) POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0eda0: 81 23 01 48 lwz r9,328(r3) if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && ffc0eda4: 80 09 00 d4 lwz r0,212(r9) ffc0eda8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0edac: 40 9e 00 10 bne- cr7,ffc0edbc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28><== NEVER TAKEN thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && ffc0edb0: 80 09 00 d8 lwz r0,216(r9) ffc0edb4: 2f 80 00 01 cmpwi cr7,r0,1 ffc0edb8: 41 9e 00 18 beq- cr7,ffc0edd0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x3c> thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); ffc0edbc: 4b ff c9 f1 bl ffc0b7ac <_Thread_Enable_dispatch> } ffc0edc0: 80 01 00 0c lwz r0,12(r1) ffc0edc4: 38 21 00 08 addi r1,r1,8 ffc0edc8: 7c 08 03 a6 mtlr r0 ffc0edcc: 4e 80 00 20 blr thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { ffc0edd0: 80 09 00 dc lwz r0,220(r9) ffc0edd4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0edd8: 41 9e ff e4 beq+ cr7,ffc0edbc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0eddc: 3d 20 00 00 lis r9,0 ffc0ede0: 81 69 27 9c lwz r11,10140(r9) _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); ffc0ede4: 38 80 ff ff li r4,-1 ffc0ede8: 38 0b ff ff addi r0,r11,-1 ffc0edec: 90 09 27 9c stw r0,10140(r9) ffc0edf0: 48 00 08 3d bl ffc0f62c <_POSIX_Thread_Exit> { POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && ffc0edf4: 4b ff ff cc b ffc0edc0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x2c> =============================================================================== ffc1074c <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { ffc1074c: 94 21 ff e8 stwu r1,-24(r1) ffc10750: 7c 08 02 a6 mflr r0 ffc10754: 93 e1 00 14 stw r31,20(r1) ffc10758: 7c 7f 1b 78 mr r31,r3 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) ffc1075c: 80 64 00 00 lwz r3,0(r4) int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { ffc10760: 93 81 00 08 stw r28,8(r1) ffc10764: 7c dc 33 78 mr r28,r6 ffc10768: 93 a1 00 0c stw r29,12(r1) ffc1076c: 7c bd 2b 78 mr r29,r5 ffc10770: 93 c1 00 10 stw r30,16(r1) ffc10774: 7c 9e 23 78 mr r30,r4 ffc10778: 90 01 00 1c stw r0,28(r1) if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) ffc1077c: 4b ff ff ad bl ffc10728 <_POSIX_Priority_Is_valid> ffc10780: 2f 83 00 00 cmpwi cr7,r3,0 ffc10784: 41 9e 00 30 beq- cr7,ffc107b4 <_POSIX_Thread_Translate_sched_param+0x68><== NEVER TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { ffc10788: 2f 9f 00 00 cmpwi cr7,r31,0 ) { if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; ffc1078c: 38 00 00 00 li r0,0 ffc10790: 90 1d 00 00 stw r0,0(r29) *budget_callout = NULL; ffc10794: 90 1c 00 00 stw r0,0(r28) if ( policy == SCHED_OTHER ) { ffc10798: 41 9e 00 40 beq- cr7,ffc107d8 <_POSIX_Thread_Translate_sched_param+0x8c> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { ffc1079c: 2f 9f 00 01 cmpwi cr7,r31,1 ffc107a0: 41 9e 00 dc beq- cr7,ffc1087c <_POSIX_Thread_Translate_sched_param+0x130> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { ffc107a4: 2f 9f 00 02 cmpwi cr7,r31,2 ffc107a8: 41 9e 00 e0 beq- cr7,ffc10888 <_POSIX_Thread_Translate_sched_param+0x13c> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { ffc107ac: 2f 9f 00 04 cmpwi cr7,r31,4 ffc107b0: 41 9e 00 54 beq- cr7,ffc10804 <_POSIX_Thread_Translate_sched_param+0xb8> if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; ffc107b4: 38 60 00 16 li r3,22 } return EINVAL; } ffc107b8: 80 01 00 1c lwz r0,28(r1) ffc107bc: 83 81 00 08 lwz r28,8(r1) ffc107c0: 7c 08 03 a6 mtlr r0 ffc107c4: 83 a1 00 0c lwz r29,12(r1) ffc107c8: 83 c1 00 10 lwz r30,16(r1) ffc107cc: 83 e1 00 14 lwz r31,20(r1) ffc107d0: 38 21 00 18 addi r1,r1,24 ffc107d4: 4e 80 00 20 blr *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; ffc107d8: 38 00 00 01 li r0,1 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } ffc107dc: 83 81 00 08 lwz r28,8(r1) *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; ffc107e0: 90 1d 00 00 stw r0,0(r29) ffc107e4: 38 60 00 00 li r3,0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } ffc107e8: 80 01 00 1c lwz r0,28(r1) ffc107ec: 83 a1 00 0c lwz r29,12(r1) ffc107f0: 7c 08 03 a6 mtlr r0 ffc107f4: 83 c1 00 10 lwz r30,16(r1) ffc107f8: 83 e1 00 14 lwz r31,20(r1) ffc107fc: 38 21 00 18 addi r1,r1,24 ffc10800: 4e 80 00 20 blr *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { if ( (param->sched_ss_repl_period.tv_sec == 0) && ffc10804: 80 1e 00 08 lwz r0,8(r30) ffc10808: 2f 80 00 00 cmpwi cr7,r0,0 ffc1080c: 40 9e 00 10 bne- cr7,ffc1081c <_POSIX_Thread_Translate_sched_param+0xd0> (param->sched_ss_repl_period.tv_nsec == 0) ) ffc10810: 80 1e 00 0c lwz r0,12(r30) ffc10814: 2f 80 00 00 cmpwi cr7,r0,0 ffc10818: 41 be ff 9c beq- cr7,ffc107b4 <_POSIX_Thread_Translate_sched_param+0x68> return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && ffc1081c: 80 1e 00 10 lwz r0,16(r30) ffc10820: 2f 80 00 00 cmpwi cr7,r0,0 ffc10824: 40 9e 00 10 bne- cr7,ffc10834 <_POSIX_Thread_Translate_sched_param+0xe8> (param->sched_ss_init_budget.tv_nsec == 0) ) ffc10828: 80 1e 00 14 lwz r0,20(r30) ffc1082c: 2f 80 00 00 cmpwi cr7,r0,0 ffc10830: 41 be ff 84 beq- cr7,ffc107b4 <_POSIX_Thread_Translate_sched_param+0x68> return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < ffc10834: 38 7e 00 08 addi r3,r30,8 ffc10838: 4b ff d4 7d bl ffc0dcb4 <_Timespec_To_ticks> ffc1083c: 7c 7f 1b 78 mr r31,r3 ffc10840: 38 7e 00 10 addi r3,r30,16 ffc10844: 4b ff d4 71 bl ffc0dcb4 <_Timespec_To_ticks> ffc10848: 7f 9f 18 40 cmplw cr7,r31,r3 ffc1084c: 41 bc ff 68 blt- cr7,ffc107b4 <_POSIX_Thread_Translate_sched_param+0x68> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) ffc10850: 80 7e 00 04 lwz r3,4(r30) ffc10854: 4b ff fe d5 bl ffc10728 <_POSIX_Priority_Is_valid> ffc10858: 2f 83 00 00 cmpwi cr7,r3,0 ffc1085c: 41 be ff 58 beq- cr7,ffc107b4 <_POSIX_Thread_Translate_sched_param+0x68> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; ffc10860: 38 00 00 03 li r0,3 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; ffc10864: 3d 20 ff c1 lis r9,-63 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; ffc10868: 90 1d 00 00 stw r0,0(r29) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; ffc1086c: 38 09 92 44 addi r0,r9,-28092 ffc10870: 38 60 00 00 li r3,0 ffc10874: 90 1c 00 00 stw r0,0(r28) return 0; ffc10878: 4b ff ff 40 b ffc107b8 <_POSIX_Thread_Translate_sched_param+0x6c> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; ffc1087c: 90 1d 00 00 stw r0,0(r29) ffc10880: 38 60 00 00 li r3,0 return 0; ffc10884: 4b ff ff 34 b ffc107b8 <_POSIX_Thread_Translate_sched_param+0x6c> } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; ffc10888: 93 fd 00 00 stw r31,0(r29) ffc1088c: 38 60 00 00 li r3,0 return 0; ffc10890: 4b ff ff 28 b ffc107b8 <_POSIX_Thread_Translate_sched_param+0x6c> =============================================================================== ffc0ec88 <_POSIX_Threads_Exitted_extension>: * This method is invoked each time a thread exits. */ void _POSIX_Threads_Exitted_extension( Thread_Control *executing ) { ffc0ec88: 7c 08 02 a6 mflr r0 ffc0ec8c: 94 21 ff f8 stwu r1,-8(r1) ffc0ec90: 90 01 00 0c stw r0,12(r1) /* * If the executing thread was not created with the POSIX API, then this * API do not get to define its exit behavior. */ if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API ) ffc0ec94: 88 03 00 08 lbz r0,8(r3) ffc0ec98: 54 00 07 7e clrlwi r0,r0,29 ffc0ec9c: 2f 80 00 03 cmpwi cr7,r0,3 ffc0eca0: 41 9e 00 14 beq- cr7,ffc0ecb4 <_POSIX_Threads_Exitted_extension+0x2c> pthread_exit( executing->Wait.return_argument ); } ffc0eca4: 80 01 00 0c lwz r0,12(r1) ffc0eca8: 38 21 00 08 addi r1,r1,8 ffc0ecac: 7c 08 03 a6 mtlr r0 ffc0ecb0: 4e 80 00 20 blr /* * If the executing thread was not created with the POSIX API, then this * API do not get to define its exit behavior. */ if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API ) pthread_exit( executing->Wait.return_argument ); ffc0ecb4: 80 63 00 28 lwz r3,40(r3) ffc0ecb8: 48 00 2e cd bl ffc11b84 } ffc0ecbc: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc0ecc0: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc0ecc4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0ecc8: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc08e6c <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc08e6c: 94 21 ff a0 stwu r1,-96(r1) ffc08e70: 7c 08 02 a6 mflr r0 uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; ffc08e74: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc08e78: 90 01 00 64 stw r0,100(r1) uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; ffc08e7c: 39 29 20 84 addi r9,r9,8324 * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc08e80: 93 c1 00 58 stw r30,88(r1) uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; ffc08e84: 83 c9 00 34 lwz r30,52(r9) * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc08e88: 93 81 00 50 stw r28,80(r1) pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; maximum = Configuration_POSIX_API.number_of_initialization_threads; if ( !user_threads || maximum == 0 ) ffc08e8c: 2f 9e 00 00 cmpwi cr7,r30,0 * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc08e90: 93 61 00 4c stw r27,76(r1) ffc08e94: 93 a1 00 54 stw r29,84(r1) ffc08e98: 93 e1 00 5c stw r31,92(r1) posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; maximum = Configuration_POSIX_API.number_of_initialization_threads; ffc08e9c: 83 89 00 30 lwz r28,48(r9) if ( !user_threads || maximum == 0 ) ffc08ea0: 41 9e 00 64 beq- cr7,ffc08f04 <_POSIX_Threads_Initialize_user_threads_body+0x98><== NEVER TAKEN ffc08ea4: 2f 9c 00 00 cmpwi cr7,r28,0 ffc08ea8: 41 9e 00 5c beq- cr7,ffc08f04 <_POSIX_Threads_Initialize_user_threads_body+0x98><== NEVER TAKEN ffc08eac: 3b a0 00 00 li r29,0 ffc08eb0: 3b e1 00 0c addi r31,r1,12 ffc08eb4: 3b 61 00 08 addi r27,r1,8 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); ffc08eb8: 7f e3 fb 78 mr r3,r31 ffc08ebc: 48 00 79 d9 bl ffc10894 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); ffc08ec0: 38 80 00 02 li r4,2 ffc08ec4: 7f e3 fb 78 mr r3,r31 ffc08ec8: 48 00 7a 0d bl ffc108d4 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); ffc08ecc: 80 9e 00 04 lwz r4,4(r30) ffc08ed0: 7f e3 fb 78 mr r3,r31 ffc08ed4: 48 00 7a 39 bl ffc1090c status = pthread_create( ffc08ed8: 80 be 00 00 lwz r5,0(r30) ffc08edc: 7f 63 db 78 mr r3,r27 ffc08ee0: 7f e4 fb 78 mr r4,r31 ffc08ee4: 38 c0 00 00 li r6,0 ffc08ee8: 4b ff fb c1 bl ffc08aa8 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) ffc08eec: 2c 03 00 00 cmpwi r3,0 ffc08ef0: 40 82 00 38 bne- ffc08f28 <_POSIX_Threads_Initialize_user_threads_body+0xbc> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { ffc08ef4: 3b bd 00 01 addi r29,r29,1 ffc08ef8: 7f 9c e8 40 cmplw cr7,r28,r29 ffc08efc: 3b de 00 08 addi r30,r30,8 ffc08f00: 41 9d ff b8 bgt+ cr7,ffc08eb8 <_POSIX_Threads_Initialize_user_threads_body+0x4c><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } ffc08f04: 80 01 00 64 lwz r0,100(r1) ffc08f08: 83 61 00 4c lwz r27,76(r1) ffc08f0c: 7c 08 03 a6 mtlr r0 ffc08f10: 83 81 00 50 lwz r28,80(r1) ffc08f14: 83 a1 00 54 lwz r29,84(r1) ffc08f18: 83 c1 00 58 lwz r30,88(r1) ffc08f1c: 83 e1 00 5c lwz r31,92(r1) ffc08f20: 38 21 00 60 addi r1,r1,96 ffc08f24: 4e 80 00 20 blr &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); ffc08f28: 7c 65 1b 78 mr r5,r3 ffc08f2c: 38 80 00 01 li r4,1 ffc08f30: 38 60 00 02 li r3,2 ffc08f34: 48 00 28 65 bl ffc0b798 <_Internal_error_Occurred> =============================================================================== ffc0ef68 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { ffc0ef68: 94 21 ff f0 stwu r1,-16(r1) ffc0ef6c: 7c 08 02 a6 mflr r0 ffc0ef70: 90 01 00 14 stw r0,20(r1) ffc0ef74: 93 e1 00 0c stw r31,12(r1) Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0ef78: 83 e4 01 48 lwz r31,328(r4) */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { ffc0ef7c: 93 c1 00 08 stw r30,8(r1) ffc0ef80: 7c 9e 23 78 mr r30,r4 the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); ffc0ef84: 38 7f 00 94 addi r3,r31,148 ffc0ef88: 48 00 13 a9 bl ffc10330 <_Timespec_To_ticks> */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { ffc0ef8c: 80 1e 00 1c lwz r0,28(r30) ffc0ef90: 3d 20 00 00 lis r9,0 ffc0ef94: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ef98: 88 89 26 a4 lbz r4,9892(r9) ffc0ef9c: 80 1f 00 84 lwz r0,132(r31) api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); the_thread->cpu_time_budget = ticks; ffc0efa0: 90 7e 00 78 stw r3,120(r30) ffc0efa4: 7c 80 20 50 subf r4,r0,r4 new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; ffc0efa8: 90 9e 00 18 stw r4,24(r30) */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { ffc0efac: 40 9e 00 10 bne- cr7,ffc0efbc <_POSIX_Threads_Sporadic_budget_TSR+0x54><== NEVER TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { ffc0efb0: 80 1e 00 14 lwz r0,20(r30) ffc0efb4: 7f 80 20 40 cmplw cr7,r0,r4 ffc0efb8: 41 9d 00 38 bgt- cr7,ffc0eff0 <_POSIX_Threads_Sporadic_budget_TSR+0x88> #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); ffc0efbc: 38 7f 00 8c addi r3,r31,140 ffc0efc0: 48 00 13 71 bl ffc10330 <_Timespec_To_ticks> ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0efc4: 38 9f 00 a4 addi r4,r31,164 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0efc8: 90 7f 00 b0 stw r3,176(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0efcc: 3c 60 00 00 lis r3,0 ffc0efd0: 38 63 2d 48 addi r3,r3,11592 ffc0efd4: 4b ff d8 c5 bl ffc0c898 <_Watchdog_Insert> _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } ffc0efd8: 80 01 00 14 lwz r0,20(r1) ffc0efdc: 83 c1 00 08 lwz r30,8(r1) ffc0efe0: 7c 08 03 a6 mtlr r0 ffc0efe4: 83 e1 00 0c lwz r31,12(r1) ffc0efe8: 38 21 00 10 addi r1,r1,16 ffc0efec: 4e 80 00 20 blr if ( the_thread->resource_count == 0 ) { /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); ffc0eff0: 7f c3 f3 78 mr r3,r30 ffc0eff4: 38 a0 00 01 li r5,1 ffc0eff8: 4b ff ba 9d bl ffc0aa94 <_Thread_Change_priority> #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); ffc0effc: 38 7f 00 8c addi r3,r31,140 ffc0f000: 48 00 13 31 bl ffc10330 <_Timespec_To_ticks> ffc0f004: 38 9f 00 a4 addi r4,r31,164 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0f008: 90 7f 00 b0 stw r3,176(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0f00c: 3c 60 00 00 lis r3,0 ffc0f010: 38 63 2d 48 addi r3,r3,11592 ffc0f014: 4b ff d8 85 bl ffc0c898 <_Watchdog_Insert> _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } ffc0f018: 80 01 00 14 lwz r0,20(r1) ffc0f01c: 83 c1 00 08 lwz r30,8(r1) ffc0f020: 7c 08 03 a6 mtlr r0 ffc0f024: 83 e1 00 0c lwz r31,12(r1) ffc0f028: 38 21 00 10 addi r1,r1,16 ffc0f02c: 4e 80 00 20 blr =============================================================================== ffc0eefc <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { ffc0eefc: 7c 08 02 a6 mflr r0 ffc0ef00: 94 21 ff f8 stwu r1,-8(r1) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); ffc0ef04: 3d 40 00 00 lis r10,0 ffc0ef08: 90 01 00 0c stw r0,12(r1) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { ffc0ef0c: 80 03 00 1c lwz r0,28(r3) ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0ef10: 81 63 01 48 lwz r11,328(r3) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { ffc0ef14: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ef18: 88 8a 26 a4 lbz r4,9892(r10) ffc0ef1c: 80 0b 00 88 lwz r0,136(r11) ffc0ef20: 7c 80 20 50 subf r4,r0,r4 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ ffc0ef24: 38 00 ff ff li r0,-1 new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; ffc0ef28: 90 83 00 18 stw r4,24(r3) /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ ffc0ef2c: 90 03 00 78 stw r0,120(r3) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { ffc0ef30: 40 9e 00 10 bne- cr7,ffc0ef40 <_POSIX_Threads_Sporadic_budget_callout+0x44><== NEVER TAKEN /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { ffc0ef34: 80 03 00 14 lwz r0,20(r3) ffc0ef38: 7f 80 20 40 cmplw cr7,r0,r4 ffc0ef3c: 41 9c 00 14 blt- cr7,ffc0ef50 <_POSIX_Threads_Sporadic_budget_callout+0x54><== ALWAYS TAKEN #if 0 printk( "lower priority\n" ); #endif } } } ffc0ef40: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc0ef44: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc0ef48: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0ef4c: 4e 80 00 20 blr <== NOT EXECUTED * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); ffc0ef50: 38 a0 00 01 li r5,1 ffc0ef54: 4b ff bb 41 bl ffc0aa94 <_Thread_Change_priority> #if 0 printk( "lower priority\n" ); #endif } } } ffc0ef58: 80 01 00 0c lwz r0,12(r1) ffc0ef5c: 38 21 00 08 addi r1,r1,8 ffc0ef60: 7c 08 03 a6 mtlr r0 ffc0ef64: 4e 80 00 20 blr =============================================================================== ffc116bc <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { ffc116bc: 94 21 ff e8 stwu r1,-24(r1) ffc116c0: 7c 08 02 a6 mflr r0 ffc116c4: 90 01 00 1c stw r0,28(r1) ffc116c8: 93 a1 00 0c stw r29,12(r1) POSIX_Cancel_Handler_control *handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc116cc: 83 a3 01 48 lwz r29,328(r3) #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { ffc116d0: 93 c1 00 10 stw r30,16(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc116d4: 3b dd 00 e4 addi r30,r29,228 POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; ffc116d8: 80 1d 00 e0 lwz r0,224(r29) #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { ffc116dc: 93 e1 00 14 stw r31,20(r1) POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; ffc116e0: 7f 80 f0 00 cmpw cr7,r0,r30 thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; ffc116e4: 38 00 00 01 li r0,1 ffc116e8: 90 1d 00 d4 stw r0,212(r29) POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; ffc116ec: 41 9e 00 50 beq- cr7,ffc1173c <_POSIX_Threads_cancel_run+0x80> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc116f0: 7c 00 00 a6 mfmsr r0 ffc116f4: 7d 30 42 a6 mfsprg r9,0 ffc116f8: 7c 09 48 78 andc r9,r0,r9 ffc116fc: 7d 20 01 24 mtmsr r9 thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); handler = (POSIX_Cancel_Handler_control *) ffc11700: 83 fe 00 04 lwz r31,4(r30) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc11704: 81 3f 00 00 lwz r9,0(r31) previous = the_node->previous; ffc11708: 81 7f 00 04 lwz r11,4(r31) next->previous = previous; previous->next = next; ffc1170c: 91 2b 00 00 stw r9,0(r11) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc11710: 91 69 00 04 stw r11,4(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc11714: 7c 00 01 24 mtmsr r0 _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); (*handler->routine)( handler->arg ); ffc11718: 80 1f 00 08 lwz r0,8(r31) ffc1171c: 80 7f 00 0c lwz r3,12(r31) ffc11720: 7c 09 03 a6 mtctr r0 ffc11724: 4e 80 04 21 bctrl _Workspace_Free( handler ); ffc11728: 7f e3 fb 78 mr r3,r31 ffc1172c: 4b ff b5 59 bl ffc0cc84 <_Workspace_Free> POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; ffc11730: 80 1d 00 e0 lwz r0,224(r29) ffc11734: 7f 80 f0 00 cmpw cr7,r0,r30 ffc11738: 40 9e ff b8 bne+ cr7,ffc116f0 <_POSIX_Threads_cancel_run+0x34><== NEVER TAKEN (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } ffc1173c: 80 01 00 1c lwz r0,28(r1) ffc11740: 83 a1 00 0c lwz r29,12(r1) ffc11744: 7c 08 03 a6 mtlr r0 ffc11748: 83 c1 00 10 lwz r30,16(r1) ffc1174c: 83 e1 00 14 lwz r31,20(r1) ffc11750: 38 21 00 18 addi r1,r1,24 ffc11754: 4e 80 00 20 blr =============================================================================== ffc08ac0 <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { ffc08ac0: 94 21 ff f0 stwu r1,-16(r1) ffc08ac4: 7c 08 02 a6 mflr r0 ffc08ac8: 90 01 00 14 stw r0,20(r1) /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ffc08acc: 80 04 00 54 lwz r0,84(r4) bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; ffc08ad0: 81 24 00 68 lwz r9,104(r4) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ffc08ad4: 2f 80 00 00 cmpwi cr7,r0,0 * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { ffc08ad8: 93 e1 00 0c stw r31,12(r1) bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; ffc08adc: 38 09 00 01 addi r0,r9,1 * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { ffc08ae0: 7c 9f 23 78 mr r31,r4 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; ffc08ae4: 90 04 00 68 stw r0,104(r4) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ffc08ae8: 40 9e 00 40 bne- cr7,ffc08b28 <_POSIX_Timer_TSR+0x68> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { ffc08aec: 80 04 00 58 lwz r0,88(r4) ffc08af0: 2f 80 00 00 cmpwi cr7,r0,0 ffc08af4: 40 9e 00 34 bne- cr7,ffc08b28 <_POSIX_Timer_TSR+0x68> <== ALWAYS TAKEN /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; ffc08af8: 38 00 00 04 li r0,4 <== NOT EXECUTED ffc08afc: 98 04 00 3c stb r0,60(r4) <== NOT EXECUTED /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { ffc08b00: 80 7f 00 38 lwz r3,56(r31) ffc08b04: 80 9f 00 44 lwz r4,68(r31) ffc08b08: 48 00 72 55 bl ffc0fd5c } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; ffc08b0c: 38 00 00 00 li r0,0 ffc08b10: 90 1f 00 68 stw r0,104(r31) } ffc08b14: 80 01 00 14 lwz r0,20(r1) ffc08b18: 83 e1 00 0c lwz r31,12(r1) ffc08b1c: 38 21 00 10 addi r1,r1,16 ffc08b20: 7c 08 03 a6 mtlr r0 ffc08b24: 4e 80 00 20 blr ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( ffc08b28: 80 9f 00 64 lwz r4,100(r31) ffc08b2c: 3c c0 ff c1 lis r6,-63 ffc08b30: 80 bf 00 08 lwz r5,8(r31) ffc08b34: 38 c6 8a c0 addi r6,r6,-30016 ffc08b38: 38 7f 00 10 addi r3,r31,16 ffc08b3c: 7f e7 fb 78 mr r7,r31 ffc08b40: 48 00 78 3d bl ffc1037c <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) ffc08b44: 2f 83 00 00 cmpwi cr7,r3,0 ffc08b48: 41 9e ff cc beq+ cr7,ffc08b14 <_POSIX_Timer_TSR+0x54> <== NEVER TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); ffc08b4c: 38 7f 00 6c addi r3,r31,108 ffc08b50: 48 00 1e 25 bl ffc0a974 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; ffc08b54: 38 00 00 03 li r0,3 ffc08b58: 98 1f 00 3c stb r0,60(r31) /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ffc08b5c: 4b ff ff a4 b ffc08b00 <_POSIX_Timer_TSR+0x40> =============================================================================== ffc11878 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { ffc11878: 94 21 ff d8 stwu r1,-40(r1) ffc1187c: 7c 08 02 a6 mflr r0 ffc11880: 7c a6 2b 78 mr r6,r5 ffc11884: 93 c1 00 20 stw r30,32(r1) siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, ffc11888: 3b c1 00 08 addi r30,r1,8 ffc1188c: 7f c5 f3 78 mr r5,r30 ffc11890: 38 e0 00 01 li r7,1 bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { ffc11894: 93 a1 00 1c stw r29,28(r1) ffc11898: 7c 9d 23 78 mr r29,r4 ffc1189c: 93 e1 00 24 stw r31,36(r1) ffc118a0: 7c 7f 1b 78 mr r31,r3 ffc118a4: 90 01 00 2c stw r0,44(r1) ffc118a8: 93 81 00 18 stw r28,24(r1) siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, ffc118ac: 48 00 00 b9 bl ffc11964 <_POSIX_signals_Clear_signals> ffc118b0: 2f 83 00 00 cmpwi cr7,r3,0 ffc118b4: 41 9e 00 8c beq- cr7,ffc11940 <_POSIX_signals_Check_signal+0xc8> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) ffc118b8: 1d 7d 00 0c mulli r11,r29,12 ffc118bc: 3d 40 00 00 lis r10,0 ffc118c0: 39 4a 31 70 addi r10,r10,12656 ffc118c4: 7d 2a 5a 14 add r9,r10,r11 ffc118c8: 80 09 00 08 lwz r0,8(r9) ffc118cc: 2f 80 00 01 cmpwi cr7,r0,1 ffc118d0: 41 9e 00 70 beq- cr7,ffc11940 <_POSIX_signals_Check_signal+0xc8><== NEVER TAKEN api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { ffc118d4: 7d 6a 58 2e lwzx r11,r10,r11 /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; ffc118d8: 81 29 00 04 lwz r9,4(r9) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { ffc118dc: 2f 8b 00 02 cmpwi cr7,r11,2 return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; ffc118e0: 83 9f 00 cc lwz r28,204(r31) api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; ffc118e4: 7d 29 e3 78 or r9,r9,r28 ffc118e8: 91 3f 00 cc stw r9,204(r31) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { ffc118ec: 41 9e 00 3c beq- cr7,ffc11928 <_POSIX_signals_Check_signal+0xb0> &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); ffc118f0: 7f a3 eb 78 mr r3,r29 ffc118f4: 7c 09 03 a6 mtctr r0 ffc118f8: 4c c6 31 82 crclr 4*cr1+eq ffc118fc: 4e 80 04 21 bctrl * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; } ffc11900: 80 01 00 2c lwz r0,44(r1) } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; ffc11904: 38 60 00 01 li r3,1 ffc11908: 93 9f 00 cc stw r28,204(r31) return true; } ffc1190c: 7c 08 03 a6 mtlr r0 ffc11910: 83 81 00 18 lwz r28,24(r1) ffc11914: 83 a1 00 1c lwz r29,28(r1) ffc11918: 83 c1 00 20 lwz r30,32(r1) ffc1191c: 83 e1 00 24 lwz r31,36(r1) ffc11920: 38 21 00 28 addi r1,r1,40 ffc11924: 4e 80 00 20 blr /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( ffc11928: 7f a3 eb 78 mr r3,r29 ffc1192c: 7c 09 03 a6 mtctr r0 ffc11930: 7f c4 f3 78 mr r4,r30 ffc11934: 38 a0 00 00 li r5,0 ffc11938: 4e 80 04 21 bctrl signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; ffc1193c: 4b ff ff c4 b ffc11900 <_POSIX_signals_Check_signal+0x88> * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; } ffc11940: 80 01 00 2c lwz r0,44(r1) /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; ffc11944: 38 60 00 00 li r3,0 } ffc11948: 83 81 00 18 lwz r28,24(r1) ffc1194c: 7c 08 03 a6 mtlr r0 ffc11950: 83 a1 00 1c lwz r29,28(r1) ffc11954: 83 c1 00 20 lwz r30,32(r1) ffc11958: 83 e1 00 24 lwz r31,36(r1) ffc1195c: 38 21 00 28 addi r1,r1,40 ffc11960: 4e 80 00 20 blr =============================================================================== ffc12e2c <_POSIX_signals_Clear_process_signals>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc12e2c: 7d 60 00 a6 mfmsr r11 ffc12e30: 7c 10 42 a6 mfsprg r0,0 ffc12e34: 7d 60 00 78 andc r0,r11,r0 ffc12e38: 7c 00 01 24 mtmsr r0 mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { ffc12e3c: 3d 20 00 00 lis r9,0 ffc12e40: 1c 03 00 0c mulli r0,r3,12 ffc12e44: 39 29 31 70 addi r9,r9,12656 ffc12e48: 7d 29 00 2e lwzx r9,r9,r0 ffc12e4c: 2f 89 00 02 cmpwi cr7,r9,2 ffc12e50: 41 9e 00 40 beq- cr7,ffc12e90 <_POSIX_signals_Clear_process_signals+0x64> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; ffc12e54: 3d 20 00 00 lis r9,0 ffc12e58: 80 09 27 e4 lwz r0,10212(r9) ffc12e5c: 38 63 ff ff addi r3,r3,-1 ffc12e60: 39 40 ff fe li r10,-2 ffc12e64: 5d 43 18 3e rotlw r3,r10,r3 ffc12e68: 7c 63 00 38 and r3,r3,r0 if ( !_POSIX_signals_Pending ) ffc12e6c: 2f 83 00 00 cmpwi cr7,r3,0 if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; ffc12e70: 90 69 27 e4 stw r3,10212(r9) if ( !_POSIX_signals_Pending ) ffc12e74: 40 9e 00 14 bne- cr7,ffc12e88 <_POSIX_signals_Clear_process_signals+0x5c><== NEVER TAKEN _Thread_Do_post_task_switch_extension--; ffc12e78: 3d 20 00 00 lis r9,0 ffc12e7c: 81 49 27 a0 lwz r10,10144(r9) ffc12e80: 38 0a ff ff addi r0,r10,-1 ffc12e84: 90 09 27 a0 stw r0,10144(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc12e88: 7d 60 01 24 mtmsr r11 } _ISR_Enable( level ); } ffc12e8c: 4e 80 00 20 blr ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) ffc12e90: 3d 20 00 00 lis r9,0 ffc12e94: 39 29 33 64 addi r9,r9,13156 ffc12e98: 7d 49 00 2e lwzx r10,r9,r0 ffc12e9c: 7d 29 02 14 add r9,r9,r0 ffc12ea0: 38 09 00 04 addi r0,r9,4 ffc12ea4: 7f 8a 00 00 cmpw cr7,r10,r0 ffc12ea8: 41 be ff ac beq- cr7,ffc12e54 <_POSIX_signals_Clear_process_signals+0x28><== ALWAYS TAKEN ffc12eac: 7d 60 01 24 mtmsr r11 <== NOT EXECUTED _POSIX_signals_Pending &= ~mask; if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; } _ISR_Enable( level ); } ffc12eb0: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0989c <_POSIX_signals_Get_highest>: ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { ffc0989c: 38 00 00 05 li r0,5 ffc098a0: 7c 09 03 a6 mtctr r0 #include int _POSIX_signals_Get_highest( sigset_t set ) { ffc098a4: 39 20 00 1b li r9,27 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { ffc098a8: 39 60 00 01 li r11,1 ffc098ac: 38 09 ff ff addi r0,r9,-1 ffc098b0: 7d 60 00 30 slw r0,r11,r0 ffc098b4: 7c 0a 18 39 and. r10,r0,r3 ffc098b8: 40 82 00 38 bne- ffc098f0 <_POSIX_signals_Get_highest+0x54><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { ffc098bc: 39 29 00 01 addi r9,r9,1 ffc098c0: 42 00 ff ec bdnz+ ffc098ac <_POSIX_signals_Get_highest+0x10> #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { ffc098c4: 38 00 00 1a li r0,26 sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { ffc098c8: 39 20 00 01 li r9,1 #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { ffc098cc: 7c 09 03 a6 mtctr r0 ffc098d0: 39 60 00 01 li r11,1 ffc098d4: 48 00 00 0c b ffc098e0 <_POSIX_signals_Get_highest+0x44> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { ffc098d8: 39 29 00 01 addi r9,r9,1 ffc098dc: 42 40 00 14 bdz- ffc098f0 <_POSIX_signals_Get_highest+0x54> if ( set & signo_to_mask( signo ) ) { ffc098e0: 38 09 ff ff addi r0,r9,-1 ffc098e4: 7d 60 00 30 slw r0,r11,r0 ffc098e8: 7c 0a 18 39 and. r10,r0,r3 ffc098ec: 41 82 ff ec beq+ ffc098d8 <_POSIX_signals_Get_highest+0x3c> * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } ffc098f0: 7d 23 4b 78 mr r3,r9 ffc098f4: 4e 80 00 20 blr =============================================================================== ffc0eaa0 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { ffc0eaa0: 94 21 ff e8 stwu r1,-24(r1) ffc0eaa4: 7c 08 02 a6 mflr r0 ffc0eaa8: 90 01 00 1c stw r0,28(r1) ffc0eaac: 93 a1 00 0c stw r29,12(r1) ffc0eab0: 3f a0 00 00 lis r29,0 ffc0eab4: 3b bd 27 e4 addi r29,r29,10212 ffc0eab8: 93 c1 00 10 stw r30,16(r1) ffc0eabc: 93 e1 00 14 stw r31,20(r1) POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0eac0: 83 c3 01 48 lwz r30,328(r3) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0eac4: 7c 00 00 a6 mfmsr r0 ffc0eac8: 7d 30 42 a6 mfsprg r9,0 ffc0eacc: 7c 09 48 78 andc r9,r0,r9 ffc0ead0: 7d 20 01 24 mtmsr r9 * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { ffc0ead4: 81 5d 00 00 lwz r10,0(r29) ffc0ead8: 81 3e 00 d0 lwz r9,208(r30) * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & ffc0eadc: 81 7e 00 cc lwz r11,204(r30) (api->signals_pending | _POSIX_signals_Pending)) ) { ffc0eae0: 7d 49 4b 78 or r9,r10,r9 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & ffc0eae4: 7d 2a 58 79 andc. r10,r9,r11 ffc0eae8: 41 82 00 90 beq- ffc0eb78 <_POSIX_signals_Post_switch_extension+0xd8> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0eaec: 7c 00 01 24 mtmsr r0 ffc0eaf0: 3b e0 00 1b li r31,27 break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); ffc0eaf4: 7f e4 fb 78 mr r4,r31 ffc0eaf8: 38 a0 00 00 li r5,0 ffc0eafc: 7f c3 f3 78 mr r3,r30 ffc0eb00: 48 00 2d 79 bl ffc11878 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); ffc0eb04: 7f e4 fb 78 mr r4,r31 ffc0eb08: 7f c3 f3 78 mr r3,r30 ffc0eb0c: 38 a0 00 01 li r5,1 ffc0eb10: 48 00 2d 69 bl ffc11878 <_POSIX_signals_Check_signal> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { ffc0eb14: 2f 9f 00 1f cmpwi cr7,r31,31 ffc0eb18: 3b ff 00 01 addi r31,r31,1 ffc0eb1c: 40 9e ff d8 bne+ cr7,ffc0eaf4 <_POSIX_signals_Post_switch_extension+0x54> ffc0eb20: 3b e0 00 01 li r31,1 _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); ffc0eb24: 7f e4 fb 78 mr r4,r31 ffc0eb28: 38 a0 00 00 li r5,0 ffc0eb2c: 7f c3 f3 78 mr r3,r30 ffc0eb30: 48 00 2d 49 bl ffc11878 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); ffc0eb34: 7f e4 fb 78 mr r4,r31 ffc0eb38: 7f c3 f3 78 mr r3,r30 ffc0eb3c: 38 a0 00 01 li r5,1 ffc0eb40: 48 00 2d 39 bl ffc11878 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { ffc0eb44: 2f 9f 00 1a cmpwi cr7,r31,26 ffc0eb48: 3b ff 00 01 addi r31,r31,1 ffc0eb4c: 40 9e ff d8 bne+ cr7,ffc0eb24 <_POSIX_signals_Post_switch_extension+0x84> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0eb50: 7c 00 00 a6 mfmsr r0 ffc0eb54: 7d 30 42 a6 mfsprg r9,0 ffc0eb58: 7c 09 48 78 andc r9,r0,r9 ffc0eb5c: 7d 20 01 24 mtmsr r9 * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { ffc0eb60: 81 5d 00 00 lwz r10,0(r29) ffc0eb64: 81 3e 00 d0 lwz r9,208(r30) * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & ffc0eb68: 81 7e 00 cc lwz r11,204(r30) (api->signals_pending | _POSIX_signals_Pending)) ) { ffc0eb6c: 7d 49 4b 78 or r9,r10,r9 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & ffc0eb70: 7d 2a 58 79 andc. r10,r9,r11 ffc0eb74: 40 82 ff 78 bne+ ffc0eaec <_POSIX_signals_Post_switch_extension+0x4c><== NEVER TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0eb78: 7c 00 01 24 mtmsr r0 for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } } } ffc0eb7c: 80 01 00 1c lwz r0,28(r1) ffc0eb80: 83 a1 00 0c lwz r29,12(r1) ffc0eb84: 7c 08 03 a6 mtlr r0 ffc0eb88: 83 c1 00 10 lwz r30,16(r1) ffc0eb8c: 83 e1 00 14 lwz r31,20(r1) ffc0eb90: 38 21 00 18 addi r1,r1,24 ffc0eb94: 4e 80 00 20 blr =============================================================================== ffc12ef4 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { ffc12ef4: 94 21 ff f0 stwu r1,-16(r1) ffc12ef8: 7c 08 02 a6 mflr r0 ffc12efc: 90 01 00 14 stw r0,20(r1) /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { ffc12f00: 3c 00 10 00 lis r0,4096 ffc12f04: 60 00 80 00 ori r0,r0,32768 ffc12f08: 81 23 00 10 lwz r9,16(r3) bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { ffc12f0c: 93 e1 00 0c stw r31,12(r1) ffc12f10: 7c 7f 1b 78 mr r31,r3 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { ffc12f14: 7c 0b 48 38 and r11,r0,r9 ffc12f18: 7f 8b 00 00 cmpw cr7,r11,r0 { POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc12f1c: 81 43 01 48 lwz r10,328(r3) ffc12f20: 39 64 ff ff addi r11,r4,-1 ffc12f24: 38 00 00 01 li r0,1 ffc12f28: 7c 0b 58 30 slw r11,r0,r11 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { ffc12f2c: 41 9e 00 a0 beq- cr7,ffc12fcc <_POSIX_signals_Unblock_thread+0xd8> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { ffc12f30: 81 4a 00 cc lwz r10,204(r10) ffc12f34: 7d 68 50 79 andc. r8,r11,r10 ffc12f38: 41 82 00 7c beq- ffc12fb4 <_POSIX_signals_Unblock_thread+0xc0> * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { ffc12f3c: 75 2b 10 00 andis. r11,r9,4096 * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; ffc12f40: 98 03 00 74 stb r0,116(r3) if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { ffc12f44: 41 82 00 48 beq- ffc12f8c <_POSIX_signals_Unblock_thread+0x98> #if 0 if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ ffc12f48: 71 20 00 08 andi. r0,r9,8 */ the_thread->do_post_task_switch_extension = true; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { the_thread->Wait.return_code = EINTR; ffc12f4c: 38 00 00 04 li r0,4 ffc12f50: 90 03 00 34 stw r0,52(r3) #if 0 if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ ffc12f54: 41 82 00 60 beq- ffc12fb4 <_POSIX_signals_Unblock_thread+0xc0><== NEVER TAKEN if ( _Watchdog_Is_active( &the_thread->Timer ) ) ffc12f58: 80 03 00 50 lwz r0,80(r3) ffc12f5c: 2f 80 00 02 cmpwi cr7,r0,2 ffc12f60: 41 9e 00 f8 beq- cr7,ffc13058 <_POSIX_signals_Unblock_thread+0x164><== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc12f64: 3c 80 10 03 lis r4,4099 ffc12f68: 7f e3 fb 78 mr r3,r31 ffc12f6c: 60 84 ff f8 ori r4,r4,65528 ffc12f70: 4b ff 7d 1d bl ffc0ac8c <_Thread_Clear_state> if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; } ffc12f74: 80 01 00 14 lwz r0,20(r1) ffc12f78: 38 60 00 00 li r3,0 ffc12f7c: 83 e1 00 0c lwz r31,12(r1) ffc12f80: 7c 08 03 a6 mtlr r0 ffc12f84: 38 21 00 10 addi r1,r1,16 ffc12f88: 4e 80 00 20 blr if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { ffc12f8c: 2f 89 00 00 cmpwi cr7,r9,0 ffc12f90: 40 9e 00 24 bne- cr7,ffc12fb4 <_POSIX_signals_Unblock_thread+0xc0><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) ffc12f94: 3d 20 00 00 lis r9,0 ffc12f98: 81 29 27 98 lwz r9,10136(r9) ffc12f9c: 2f 89 00 00 cmpwi cr7,r9,0 ffc12fa0: 41 9e 00 14 beq- cr7,ffc12fb4 <_POSIX_signals_Unblock_thread+0xc0> ffc12fa4: 3d 20 00 00 lis r9,0 ffc12fa8: 81 29 27 b0 lwz r9,10160(r9) ffc12fac: 7f 83 48 00 cmpw cr7,r3,r9 ffc12fb0: 41 9e 00 98 beq- cr7,ffc13048 <_POSIX_signals_Unblock_thread+0x154><== ALWAYS TAKEN _ISR_Signals_to_thread_executing = true; ffc12fb4: 38 60 00 00 li r3,0 } } return false; } ffc12fb8: 80 01 00 14 lwz r0,20(r1) ffc12fbc: 83 e1 00 0c lwz r31,12(r1) ffc12fc0: 38 21 00 10 addi r1,r1,16 ffc12fc4: 7c 08 03 a6 mtlr r0 ffc12fc8: 4e 80 00 20 blr * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { ffc12fcc: 80 03 00 30 lwz r0,48(r3) ffc12fd0: 7d 68 00 39 and. r8,r11,r0 ffc12fd4: 41 82 00 50 beq- ffc13024 <_POSIX_signals_Unblock_thread+0x130> the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { ffc12fd8: 2f 85 00 00 cmpwi cr7,r5,0 if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; ffc12fdc: 81 3f 00 28 lwz r9,40(r31) */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; ffc12fe0: 38 00 00 04 li r0,4 ffc12fe4: 90 1f 00 34 stw r0,52(r31) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { ffc12fe8: 41 9e 00 4c beq- cr7,ffc13034 <_POSIX_signals_Unblock_thread+0x140> the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; ffc12fec: 81 45 00 08 lwz r10,8(r5) ffc12ff0: 81 65 00 00 lwz r11,0(r5) ffc12ff4: 80 05 00 04 lwz r0,4(r5) ffc12ff8: 91 49 00 08 stw r10,8(r9) ffc12ffc: 91 69 00 00 stw r11,0(r9) ffc13000: 90 09 00 04 stw r0,4(r9) } _Thread_queue_Extract_with_proxy( the_thread ); ffc13004: 7f e3 fb 78 mr r3,r31 ffc13008: 4b ff 8a e5 bl ffc0baec <_Thread_queue_Extract_with_proxy> if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; } ffc1300c: 80 01 00 14 lwz r0,20(r1) the_info->si_value.sival_int = 0; } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); ffc13010: 38 60 00 01 li r3,1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; } ffc13014: 83 e1 00 0c lwz r31,12(r1) ffc13018: 7c 08 03 a6 mtlr r0 ffc1301c: 38 21 00 10 addi r1,r1,16 ffc13020: 4e 80 00 20 blr * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { ffc13024: 80 0a 00 cc lwz r0,204(r10) ffc13028: 7d 69 00 79 andc. r9,r11,r0 ffc1302c: 40 82 ff ac bne+ ffc12fd8 <_POSIX_signals_Unblock_thread+0xe4> ffc13030: 4b ff ff 84 b ffc12fb4 <_POSIX_signals_Unblock_thread+0xc0> the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; ffc13034: 38 00 00 01 li r0,1 the_info->si_value.sival_int = 0; ffc13038: 90 a9 00 08 stw r5,8(r9) the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; ffc1303c: 90 89 00 00 stw r4,0(r9) the_info->si_code = SI_USER; ffc13040: 90 09 00 04 stw r0,4(r9) ffc13044: 4b ff ff c0 b ffc13004 <_POSIX_signals_Unblock_thread+0x110> (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; ffc13048: 3d 20 00 00 lis r9,0 ffc1304c: 98 09 27 cc stb r0,10188(r9) ffc13050: 38 60 00 00 li r3,0 ffc13054: 4b ff ff 64 b ffc12fb8 <_POSIX_signals_Unblock_thread+0xc4> _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); ffc13058: 38 63 00 48 addi r3,r3,72 ffc1305c: 4b ff 9a 05 bl ffc0ca60 <_Watchdog_Remove> ffc13060: 4b ff ff 04 b ffc12f64 <_POSIX_signals_Unblock_thread+0x70> =============================================================================== ffc08c48 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc08c48: 94 21 ff d8 stwu r1,-40(r1) ffc08c4c: 7c 08 02 a6 mflr r0 rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; ffc08c50: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc08c54: 90 01 00 2c stw r0,44(r1) rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; ffc08c58: 39 29 20 70 addi r9,r9,8304 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc08c5c: 93 e1 00 24 stw r31,36(r1) rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; ffc08c60: 83 e9 00 2c lwz r31,44(r9) * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc08c64: 93 a1 00 1c stw r29,28(r1) maximum = Configuration_RTEMS_API.number_of_initialization_tasks; /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) ffc08c68: 2f 9f 00 00 cmpwi cr7,r31,0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { ffc08c6c: 93 81 00 18 stw r28,24(r1) ffc08c70: 93 c1 00 20 stw r30,32(r1) /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; maximum = Configuration_RTEMS_API.number_of_initialization_tasks; ffc08c74: 83 a9 00 28 lwz r29,40(r9) /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) ffc08c78: 41 9e 00 60 beq- cr7,ffc08cd8 <_RTEMS_tasks_Initialize_user_tasks_body+0x90> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { ffc08c7c: 2f 9d 00 00 cmpwi cr7,r29,0 ffc08c80: 41 9e 00 58 beq- cr7,ffc08cd8 <_RTEMS_tasks_Initialize_user_tasks_body+0x90><== NEVER TAKEN ffc08c84: 3b c0 00 00 li r30,0 ffc08c88: 3b 81 00 08 addi r28,r1,8 return_value = rtems_task_create( ffc08c8c: 80 7f 00 00 lwz r3,0(r31) ffc08c90: 7f 88 e3 78 mr r8,r28 ffc08c94: 80 9f 00 08 lwz r4,8(r31) ffc08c98: 80 bf 00 04 lwz r5,4(r31) ffc08c9c: 80 df 00 14 lwz r6,20(r31) ffc08ca0: 80 ff 00 0c lwz r7,12(r31) ffc08ca4: 4b ff fc a9 bl ffc0894c user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) ffc08ca8: 2c 03 00 00 cmpwi r3,0 ffc08cac: 40 82 00 4c bne- ffc08cf8 <_RTEMS_tasks_Initialize_user_tasks_body+0xb0> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( ffc08cb0: 80 61 00 08 lwz r3,8(r1) ffc08cb4: 80 9f 00 10 lwz r4,16(r31) ffc08cb8: 80 bf 00 18 lwz r5,24(r31) ffc08cbc: 48 00 00 4d bl ffc08d08 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) ffc08cc0: 2c 03 00 00 cmpwi r3,0 ffc08cc4: 40 82 00 34 bne- ffc08cf8 <_RTEMS_tasks_Initialize_user_tasks_body+0xb0> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { ffc08cc8: 3b de 00 01 addi r30,r30,1 ffc08ccc: 7f 9d f0 40 cmplw cr7,r29,r30 ffc08cd0: 3b ff 00 1c addi r31,r31,28 ffc08cd4: 41 9d ff b8 bgt+ cr7,ffc08c8c <_RTEMS_tasks_Initialize_user_tasks_body+0x44><== NEVER TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } ffc08cd8: 80 01 00 2c lwz r0,44(r1) ffc08cdc: 83 81 00 18 lwz r28,24(r1) ffc08ce0: 7c 08 03 a6 mtlr r0 ffc08ce4: 83 a1 00 1c lwz r29,28(r1) ffc08ce8: 83 c1 00 20 lwz r30,32(r1) ffc08cec: 83 e1 00 24 lwz r31,36(r1) ffc08cf0: 38 21 00 28 addi r1,r1,40 ffc08cf4: 4e 80 00 20 blr id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); ffc08cf8: 7c 65 1b 78 mr r5,r3 ffc08cfc: 38 80 00 01 li r4,1 ffc08d00: 38 60 00 01 li r3,1 ffc08d04: 48 00 12 71 bl ffc09f74 <_Internal_error_Occurred> =============================================================================== ffc0f440 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc0f440: 94 21 ff d8 stwu r1,-40(r1) ffc0f444: 7c 08 02 a6 mflr r0 ffc0f448: 90 01 00 2c stw r0,44(r1) ffc0f44c: 93 e1 00 24 stw r31,36(r1) RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc0f450: 83 e3 01 44 lwz r31,324(r3) */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc0f454: 93 a1 00 1c stw r29,28(r1) ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; if ( !api ) ffc0f458: 2f 9f 00 00 cmpwi cr7,r31,0 */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc0f45c: 93 c1 00 20 stw r30,32(r1) ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; if ( !api ) ffc0f460: 41 9e 00 80 beq- cr7,ffc0f4e0 <_RTEMS_tasks_Post_switch_extension+0xa0><== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0f464: 7c 00 00 a6 mfmsr r0 ffc0f468: 7d 30 42 a6 mfsprg r9,0 ffc0f46c: 7c 09 48 78 andc r9,r0,r9 ffc0f470: 7d 20 01 24 mtmsr r9 asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; asr->signals_posted = 0; ffc0f474: 39 20 00 00 li r9,0 */ asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; ffc0f478: 83 df 00 14 lwz r30,20(r31) asr->signals_posted = 0; ffc0f47c: 91 3f 00 14 stw r9,20(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0f480: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ ffc0f484: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0f488: 41 be 00 58 beq+ cr7,ffc0f4e0 <_RTEMS_tasks_Post_switch_extension+0xa0> return; asr->nest_level += 1; ffc0f48c: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0f490: 3b a1 00 08 addi r29,r1,8 ffc0f494: 80 7f 00 10 lwz r3,16(r31) ffc0f498: 38 80 00 00 li r4,0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; ffc0f49c: 38 09 00 01 addi r0,r9,1 ffc0f4a0: 90 1f 00 1c stw r0,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0f4a4: 60 84 ff ff ori r4,r4,65535 ffc0f4a8: 7f a5 eb 78 mr r5,r29 ffc0f4ac: 48 00 29 cd bl ffc11e78 (*asr->handler)( signal_set ); ffc0f4b0: 80 1f 00 0c lwz r0,12(r31) ffc0f4b4: 7f c3 f3 78 mr r3,r30 ffc0f4b8: 7c 09 03 a6 mtctr r0 ffc0f4bc: 4e 80 04 21 bctrl asr->nest_level -= 1; ffc0f4c0: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0f4c4: 38 80 00 00 li r4,0 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; ffc0f4c8: 38 09 ff ff addi r0,r9,-1 ffc0f4cc: 90 1f 00 1c stw r0,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc0f4d0: 60 84 ff ff ori r4,r4,65535 ffc0f4d4: 7f a5 eb 78 mr r5,r29 ffc0f4d8: 80 61 00 08 lwz r3,8(r1) ffc0f4dc: 48 00 29 9d bl ffc11e78 } ffc0f4e0: 80 01 00 2c lwz r0,44(r1) ffc0f4e4: 83 a1 00 1c lwz r29,28(r1) ffc0f4e8: 7c 08 03 a6 mtlr r0 ffc0f4ec: 83 c1 00 20 lwz r30,32(r1) ffc0f4f0: 83 e1 00 24 lwz r31,36(r1) ffc0f4f4: 38 21 00 28 addi r1,r1,40 ffc0f4f8: 4e 80 00 20 blr =============================================================================== ffc0f34c <_RTEMS_tasks_Switch_extension>: /* * Per Task Variables */ tvp = executing->task_variables; ffc0f34c: 81 23 01 54 lwz r9,340(r3) while (tvp) { ffc0f350: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f354: 41 9e 00 24 beq- cr7,ffc0f378 <_RTEMS_tasks_Switch_extension+0x2c> tvp->tval = *tvp->ptr; ffc0f358: 81 69 00 04 lwz r11,4(r9) *tvp->ptr = tvp->gval; ffc0f35c: 80 09 00 08 lwz r0,8(r9) * Per Task Variables */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; ffc0f360: 81 4b 00 00 lwz r10,0(r11) ffc0f364: 91 49 00 0c stw r10,12(r9) *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; ffc0f368: 81 29 00 00 lwz r9,0(r9) */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; ffc0f36c: 90 0b 00 00 stw r0,0(r11) /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { ffc0f370: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f374: 40 9e ff e4 bne+ cr7,ffc0f358 <_RTEMS_tasks_Switch_extension+0xc><== NEVER TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; ffc0f378: 81 24 01 54 lwz r9,340(r4) while (tvp) { ffc0f37c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f380: 4d 9e 00 20 beqlr cr7 tvp->gval = *tvp->ptr; ffc0f384: 81 69 00 04 lwz r11,4(r9) *tvp->ptr = tvp->tval; ffc0f388: 80 09 00 0c lwz r0,12(r9) tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { tvp->gval = *tvp->ptr; ffc0f38c: 81 4b 00 00 lwz r10,0(r11) ffc0f390: 91 49 00 08 stw r10,8(r9) *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; ffc0f394: 81 29 00 00 lwz r9,0(r9) } tvp = heir->task_variables; while (tvp) { tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; ffc0f398: 90 0b 00 00 stw r0,0(r11) *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { ffc0f39c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f3a0: 40 9e ff e4 bne+ cr7,ffc0f384 <_RTEMS_tasks_Switch_extension+0x38><== NEVER TAKEN ffc0f3a4: 4e 80 00 20 blr =============================================================================== ffc0a268 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { ffc0a268: 94 21 ff e0 stwu r1,-32(r1) ffc0a26c: 7c 08 02 a6 mflr r0 ffc0a270: 7c 64 1b 78 mr r4,r3 ffc0a274: 3c 60 00 00 lis r3,0 ffc0a278: 90 01 00 24 stw r0,36(r1) ffc0a27c: 38 63 2c 64 addi r3,r3,11364 ffc0a280: 38 a1 00 08 addi r5,r1,8 ffc0a284: 93 e1 00 1c stw r31,28(r1) ffc0a288: 48 00 26 ad bl ffc0c934 <_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 ) { ffc0a28c: 80 01 00 08 lwz r0,8(r1) ffc0a290: 7c 7f 1b 78 mr r31,r3 ffc0a294: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a298: 40 9e 00 48 bne- cr7,ffc0a2e0 <_Rate_monotonic_Timeout+0x78><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; ffc0a29c: 80 63 00 40 lwz r3,64(r3) if ( _States_Is_waiting_for_period( the_thread->current_state ) && ffc0a2a0: 80 03 00 10 lwz r0,16(r3) ffc0a2a4: 70 09 40 00 andi. r9,r0,16384 ffc0a2a8: 41 82 00 14 beq- ffc0a2bc <_Rate_monotonic_Timeout+0x54> the_thread->Wait.id == the_period->Object.id ) { ffc0a2ac: 81 23 00 20 lwz r9,32(r3) ffc0a2b0: 80 1f 00 08 lwz r0,8(r31) ffc0a2b4: 7f 89 00 00 cmpw cr7,r9,r0 ffc0a2b8: 41 9e 00 68 beq- cr7,ffc0a320 <_Rate_monotonic_Timeout+0xb8> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { ffc0a2bc: 80 1f 00 38 lwz r0,56(r31) ffc0a2c0: 2f 80 00 01 cmpwi cr7,r0,1 ffc0a2c4: 41 9e 00 30 beq- cr7,ffc0a2f4 <_Rate_monotonic_Timeout+0x8c> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; ffc0a2c8: 38 00 00 04 li r0,4 ffc0a2cc: 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; ffc0a2d0: 3d 20 00 00 lis r9,0 ffc0a2d4: 81 69 27 f4 lwz r11,10228(r9) ffc0a2d8: 38 0b ff ff addi r0,r11,-1 ffc0a2dc: 90 09 27 f4 stw r0,10228(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc0a2e0: 80 01 00 24 lwz r0,36(r1) ffc0a2e4: 83 e1 00 1c lwz r31,28(r1) ffc0a2e8: 38 21 00 20 addi r1,r1,32 ffc0a2ec: 7c 08 03 a6 mtlr r0 ffc0a2f0: 4e 80 00 20 blr _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; ffc0a2f4: 38 00 00 03 li r0,3 ffc0a2f8: 90 1f 00 38 stw r0,56(r31) _Rate_monotonic_Initiate_statistics( the_period ); ffc0a2fc: 7f e3 fb 78 mr r3,r31 ffc0a300: 4b ff f6 75 bl ffc09974 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0a304: 80 1f 00 3c lwz r0,60(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a308: 3c 60 00 00 lis r3,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0a30c: 90 1f 00 1c stw r0,28(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0a310: 38 63 2e 68 addi r3,r3,11880 ffc0a314: 38 9f 00 10 addi r4,r31,16 ffc0a318: 48 00 4a 51 bl ffc0ed68 <_Watchdog_Insert> ffc0a31c: 4b ff ff b4 b ffc0a2d0 <_Rate_monotonic_Timeout+0x68> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc0a320: 3c 80 10 03 lis r4,4099 ffc0a324: 60 84 ff f8 ori r4,r4,65528 ffc0a328: 48 00 2c c5 bl ffc0cfec <_Thread_Clear_state> ffc0a32c: 4b ff ff d0 b ffc0a2fc <_Rate_monotonic_Timeout+0x94> =============================================================================== ffc09a84 <_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) || ffc09a84: 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(); ffc09a88: 3d 20 00 00 lis r9,0 ffc09a8c: 80 09 20 cc lwz r0,8396(r9) if ((!the_tod) || ffc09a90: 41 82 00 98 beq- ffc09b28 <_TOD_Validate+0xa4> <== NEVER TAKEN ffc09a94: 3d 20 00 0f lis r9,15 ffc09a98: 61 29 42 40 ori r9,r9,16960 ffc09a9c: 7c 09 03 96 divwu r0,r9,r0 (the_tod->ticks >= ticks_per_second) || ffc09aa0: 81 23 00 18 lwz r9,24(r3) ffc09aa4: 7f 80 48 40 cmplw cr7,r0,r9 ffc09aa8: 40 9d 00 80 ble- cr7,ffc09b28 <_TOD_Validate+0xa4> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || ffc09aac: 80 03 00 14 lwz r0,20(r3) ffc09ab0: 2b 80 00 3b cmplwi cr7,r0,59 ffc09ab4: 41 9d 00 74 bgt- cr7,ffc09b28 <_TOD_Validate+0xa4> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || ffc09ab8: 80 03 00 10 lwz r0,16(r3) ffc09abc: 2b 80 00 3b cmplwi cr7,r0,59 ffc09ac0: 41 9d 00 68 bgt- cr7,ffc09b28 <_TOD_Validate+0xa4> (the_tod->hour >= TOD_HOURS_PER_DAY) || ffc09ac4: 80 03 00 0c lwz r0,12(r3) ffc09ac8: 2b 80 00 17 cmplwi cr7,r0,23 ffc09acc: 41 9d 00 5c bgt- cr7,ffc09b28 <_TOD_Validate+0xa4> (the_tod->month == 0) || ffc09ad0: 81 23 00 04 lwz r9,4(r3) 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) || ffc09ad4: 2f 89 00 00 cmpwi cr7,r9,0 ffc09ad8: 41 9e 00 50 beq- cr7,ffc09b28 <_TOD_Validate+0xa4> <== NEVER TAKEN ffc09adc: 2b 89 00 0c cmplwi cr7,r9,12 ffc09ae0: 41 9d 00 48 bgt- cr7,ffc09b28 <_TOD_Validate+0xa4> (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) || ffc09ae4: 80 03 00 00 lwz r0,0(r3) 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) || ffc09ae8: 2b 80 07 c3 cmplwi cr7,r0,1987 ffc09aec: 40 9d 00 3c ble- cr7,ffc09b28 <_TOD_Validate+0xa4> (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) || (the_tod->day == 0) ) ffc09af0: 81 63 00 08 lwz r11,8(r3) 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) || ffc09af4: 2f 8b 00 00 cmpwi cr7,r11,0 ffc09af8: 41 9e 00 30 beq- cr7,ffc09b28 <_TOD_Validate+0xa4> <== NEVER TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) ffc09afc: 70 0a 00 03 andi. r10,r0,3 ffc09b00: 40 82 00 30 bne- ffc09b30 <_TOD_Validate+0xac> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; ffc09b04: 38 09 00 0d addi r0,r9,13 ffc09b08: 3d 20 ff c2 lis r9,-62 ffc09b0c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc09b10: 39 29 58 24 addi r9,r9,22564 ffc09b14: 7c 69 00 2e lwzx r3,r9,r0 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( ffc09b18: 7c 6b 18 10 subfc r3,r11,r3 ffc09b1c: 38 60 00 00 li r3,0 ffc09b20: 7c 63 19 14 adde r3,r3,r3 ffc09b24: 4e 80 00 20 blr ffc09b28: 38 60 00 00 li r3,0 if ( the_tod->day > days_in_month ) return false; return true; } ffc09b2c: 4e 80 00 20 blr return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; ffc09b30: 3d 40 ff c2 lis r10,-62 ffc09b34: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc09b38: 39 4a 58 24 addi r10,r10,22564 ffc09b3c: 7c 6a 48 2e lwzx r3,r10,r9 ffc09b40: 4b ff ff d8 b ffc09b18 <_TOD_Validate+0x94> =============================================================================== ffc0aa94 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { ffc0aa94: 94 21 ff e8 stwu r1,-24(r1) ffc0aa98: 7c 08 02 a6 mflr r0 ffc0aa9c: 90 01 00 1c stw r0,28(r1) ffc0aaa0: 93 e1 00 14 stw r31,20(r1) ffc0aaa4: 7c 7f 1b 78 mr r31,r3 ffc0aaa8: 93 81 00 08 stw r28,8(r1) ffc0aaac: 7c bc 2b 78 mr r28,r5 ffc0aab0: 93 a1 00 0c stw r29,12(r1) ffc0aab4: 93 c1 00 10 stw r30,16(r1) ffc0aab8: 7c 9e 23 78 mr r30,r4 */ /* * Save original state */ original_state = the_thread->current_state; ffc0aabc: 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 ); ffc0aac0: 48 00 13 8d bl ffc0be4c <_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 ) ffc0aac4: 80 1f 00 14 lwz r0,20(r31) ffc0aac8: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0aacc: 41 9e 00 10 beq- cr7,ffc0aadc <_Thread_Change_priority+0x48> _Thread_Set_priority( the_thread, new_priority ); ffc0aad0: 7f c4 f3 78 mr r4,r30 ffc0aad4: 7f e3 fb 78 mr r3,r31 ffc0aad8: 48 00 11 f5 bl ffc0bccc <_Thread_Set_priority> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0aadc: 7d 20 00 a6 mfmsr r9 ffc0aae0: 7c 10 42 a6 mfsprg r0,0 ffc0aae4: 7d 20 00 78 andc r0,r9,r0 ffc0aae8: 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; ffc0aaec: 80 1f 00 10 lwz r0,16(r31) if ( state != STATES_TRANSIENT ) { ffc0aaf0: 2f 80 00 04 cmpwi cr7,r0,4 ffc0aaf4: 41 9e 00 88 beq- cr7,ffc0ab7c <_Thread_Change_priority+0xe8> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) ffc0aaf8: 73 ab 00 04 andi. r11,r29,4 ffc0aafc: 41 82 00 38 beq- ffc0ab34 <_Thread_Change_priority+0xa0><== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ab00: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc0ab04: 3d 20 00 03 lis r9,3 <== NOT EXECUTED ffc0ab08: 61 29 be e0 ori r9,r9,48864 <== NOT EXECUTED ffc0ab0c: 7c 0b 48 39 and. r11,r0,r9 <== NOT EXECUTED ffc0ab10: 40 82 00 40 bne- ffc0ab50 <_Thread_Change_priority+0xbc><== NOT EXECUTED if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } ffc0ab14: 80 01 00 1c lwz r0,28(r1) ffc0ab18: 83 81 00 08 lwz r28,8(r1) ffc0ab1c: 7c 08 03 a6 mtlr r0 ffc0ab20: 83 a1 00 0c lwz r29,12(r1) ffc0ab24: 83 c1 00 10 lwz r30,16(r1) ffc0ab28: 83 e1 00 14 lwz r31,20(r1) ffc0ab2c: 38 21 00 18 addi r1,r1,24 ffc0ab30: 4e 80 00 20 blr */ state = the_thread->current_state; if ( state != STATES_TRANSIENT ) { /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); ffc0ab34: 54 0b 07 b8 rlwinm r11,r0,0,30,28 ffc0ab38: 91 7f 00 10 stw r11,16(r31) ffc0ab3c: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc0ab40: 3d 20 00 03 lis r9,3 ffc0ab44: 61 29 be e0 ori r9,r9,48864 ffc0ab48: 7c 0b 48 39 and. r11,r0,r9 ffc0ab4c: 41 82 ff c8 beq+ ffc0ab14 <_Thread_Change_priority+0x80> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); ffc0ab50: 80 7f 00 44 lwz r3,68(r31) ffc0ab54: 7f e4 fb 78 mr r4,r31 ffc0ab58: 48 00 10 7d bl ffc0bbd4 <_Thread_queue_Requeue> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } ffc0ab5c: 80 01 00 1c lwz r0,28(r1) ffc0ab60: 83 81 00 08 lwz r28,8(r1) ffc0ab64: 7c 08 03 a6 mtlr r0 ffc0ab68: 83 a1 00 0c lwz r29,12(r1) ffc0ab6c: 83 c1 00 10 lwz r30,16(r1) ffc0ab70: 83 e1 00 14 lwz r31,20(r1) ffc0ab74: 38 21 00 18 addi r1,r1,24 ffc0ab78: 4e 80 00 20 blr } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { ffc0ab7c: 73 bd 00 04 andi. r29,r29,4 ffc0ab80: 3d 40 00 00 lis r10,0 ffc0ab84: 40 82 00 4c bne- ffc0abd0 <_Thread_Change_priority+0x13c><== NEVER TAKEN * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); ffc0ab88: 93 bf 00 10 stw r29,16(r31) _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) ffc0ab8c: 2f 9c 00 00 cmpwi cr7,r28,0 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc0ab90: 81 7f 00 90 lwz r11,144(r31) ffc0ab94: 80 1f 00 98 lwz r0,152(r31) ffc0ab98: 81 0b 00 00 lwz r8,0(r11) ffc0ab9c: 7d 00 03 78 or r0,r8,r0 ffc0aba0: 90 0b 00 00 stw r0,0(r11) _Priority_Major_bit_map |= the_priority_map->ready_major; ffc0aba4: 81 6a 27 a4 lwz r11,10148(r10) ffc0aba8: 80 1f 00 94 lwz r0,148(r31) ffc0abac: 7d 60 03 78 or r0,r11,r0 ffc0abb0: 90 0a 27 a4 stw r0,10148(r10) ffc0abb4: 41 9e 00 b8 beq- cr7,ffc0ac6c <_Thread_Change_priority+0x1d8> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; ffc0abb8: 81 7f 00 8c lwz r11,140(r31) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0abbc: 81 0b 00 00 lwz r8,0(r11) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0abc0: 91 7f 00 04 stw r11,4(r31) before_node = after_node->next; after_node->next = the_node; ffc0abc4: 93 eb 00 00 stw r31,0(r11) the_node->next = before_node; before_node->previous = the_node; ffc0abc8: 93 e8 00 04 stw r31,4(r8) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0abcc: 91 1f 00 00 stw r8,0(r31) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0abd0: 7c 00 00 a6 mfmsr r0 ffc0abd4: 7d 20 01 24 mtmsr r9 ffc0abd8: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; ffc0abdc: 3d 00 00 00 lis r8,0 RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0abe0: 81 6a 27 a4 lwz r11,10148(r10) ffc0abe4: 80 a8 27 64 lwz r5,10084(r8) ffc0abe8: 7d 66 00 34 cntlzw r6,r11 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0abec: 3c e0 00 00 lis r7,0 RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0abf0: 91 6a 27 a4 stw r11,10148(r10) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0abf4: 38 e7 2d a0 addi r7,r7,11680 ffc0abf8: 54 c8 10 3a rlwinm r8,r6,2,0,29 ffc0abfc: 7c 07 40 2e lwzx r0,r7,r8 ffc0ac00: 7c 0b 00 34 cntlzw r11,r0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc0ac04: 54 c6 20 36 rlwinm r6,r6,4,0,27 ffc0ac08: 7c 07 41 2e stwx r0,r7,r8 ffc0ac0c: 7c c6 5a 14 add r6,r6,r11 ffc0ac10: 1c c6 00 0c mulli r6,r6,12 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); ffc0ac14: 3d 60 00 00 lis r11,0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc0ac18: 7c 05 30 2e lwzx r0,r5,r6 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); ffc0ac1c: 81 6b 27 b0 lwz r11,10160(r11) * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc0ac20: 3d 40 00 00 lis r10,0 ffc0ac24: 90 0a 27 8c stw r0,10124(r10) * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && ffc0ac28: 7f 80 58 00 cmpw cr7,r0,r11 ffc0ac2c: 41 9e 00 1c beq- cr7,ffc0ac48 <_Thread_Change_priority+0x1b4> _Thread_Executing->is_preemptible ) ffc0ac30: 88 0b 00 75 lbz r0,117(r11) ffc0ac34: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ac38: 41 9e 00 10 beq- cr7,ffc0ac48 <_Thread_Change_priority+0x1b4> _Context_Switch_necessary = true; ffc0ac3c: 38 00 00 01 li r0,1 ffc0ac40: 3d 60 00 00 lis r11,0 ffc0ac44: 98 0b 27 c0 stb r0,10176(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ac48: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); } ffc0ac4c: 80 01 00 1c lwz r0,28(r1) ffc0ac50: 83 81 00 08 lwz r28,8(r1) ffc0ac54: 7c 08 03 a6 mtlr r0 ffc0ac58: 83 a1 00 0c lwz r29,12(r1) ffc0ac5c: 83 c1 00 10 lwz r30,16(r1) ffc0ac60: 83 e1 00 14 lwz r31,20(r1) ffc0ac64: 38 21 00 18 addi r1,r1,24 ffc0ac68: 4e 80 00 20 blr _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); ffc0ac6c: 81 7f 00 8c lwz r11,140(r31) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0ac70: 38 0b 00 04 addi r0,r11,4 ffc0ac74: 90 1f 00 00 stw r0,0(r31) old_last_node = the_chain->last; ffc0ac78: 81 0b 00 08 lwz r8,8(r11) the_chain->last = the_node; ffc0ac7c: 93 eb 00 08 stw r31,8(r11) old_last_node->next = the_node; the_node->previous = old_last_node; ffc0ac80: 91 1f 00 04 stw r8,4(r31) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; ffc0ac84: 93 e8 00 00 stw r31,0(r8) ffc0ac88: 4b ff ff 48 b ffc0abd0 <_Thread_Change_priority+0x13c> =============================================================================== ffc0ac8c <_Thread_Clear_state>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0ac8c: 7d 20 00 a6 mfmsr r9 ffc0ac90: 7c 10 42 a6 mfsprg r0,0 ffc0ac94: 7d 20 00 78 andc r0,r9,r0 ffc0ac98: 7c 00 01 24 mtmsr r0 { ISR_Level level; States_Control current_state; _ISR_Disable( level ); current_state = the_thread->current_state; ffc0ac9c: 80 03 00 10 lwz r0,16(r3) if ( current_state & state ) { ffc0aca0: 7c 8b 00 39 and. r11,r4,r0 ffc0aca4: 41 82 00 a0 beq- ffc0ad44 <_Thread_Clear_state+0xb8> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); ffc0aca8: 7c 00 20 78 andc r0,r0,r4 current_state = the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { ffc0acac: 2f 80 00 00 cmpwi cr7,r0,0 _ISR_Disable( level ); current_state = the_thread->current_state; if ( current_state & state ) { current_state = ffc0acb0: 90 03 00 10 stw r0,16(r3) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { ffc0acb4: 40 9e 00 90 bne- cr7,ffc0ad44 <_Thread_Clear_state+0xb8> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc0acb8: 81 43 00 90 lwz r10,144(r3) ffc0acbc: 80 03 00 98 lwz r0,152(r3) ffc0acc0: 81 0a 00 00 lwz r8,0(r10) _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); ffc0acc4: 81 63 00 8c lwz r11,140(r3) ffc0acc8: 7d 00 03 78 or r0,r8,r0 ffc0accc: 90 0a 00 00 stw r0,0(r10) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0acd0: 38 0b 00 04 addi r0,r11,4 _Priority_Major_bit_map |= the_priority_map->ready_major; ffc0acd4: 3d 00 00 00 lis r8,0 ffc0acd8: 90 03 00 00 stw r0,0(r3) ffc0acdc: 80 e8 27 a4 lwz r7,10148(r8) ffc0ace0: 80 03 00 94 lwz r0,148(r3) old_last_node = the_chain->last; ffc0ace4: 81 4b 00 08 lwz r10,8(r11) ffc0ace8: 7c e0 03 78 or r0,r7,r0 the_chain->last = the_node; ffc0acec: 90 6b 00 08 stw r3,8(r11) ffc0acf0: 90 08 27 a4 stw r0,10148(r8) old_last_node->next = the_node; the_node->previous = old_last_node; ffc0acf4: 91 43 00 04 stw r10,4(r3) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; ffc0acf8: 90 6a 00 00 stw r3,0(r10) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0acfc: 7c 00 00 a6 mfmsr r0 ffc0ad00: 7d 20 01 24 mtmsr r9 ffc0ad04: 7c 00 01 24 mtmsr r0 * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { ffc0ad08: 3d 60 00 00 lis r11,0 ffc0ad0c: 80 03 00 14 lwz r0,20(r3) ffc0ad10: 81 4b 27 8c lwz r10,10124(r11) ffc0ad14: 81 4a 00 14 lwz r10,20(r10) ffc0ad18: 7f 80 50 40 cmplw cr7,r0,r10 ffc0ad1c: 40 9c 00 28 bge- cr7,ffc0ad44 <_Thread_Clear_state+0xb8> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc0ad20: 3d 40 00 00 lis r10,0 * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; ffc0ad24: 90 6b 27 8c stw r3,10124(r11) if ( _Thread_Executing->is_preemptible || ffc0ad28: 81 4a 27 b0 lwz r10,10160(r10) ffc0ad2c: 89 6a 00 75 lbz r11,117(r10) ffc0ad30: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0ad34: 41 9e 00 18 beq- cr7,ffc0ad4c <_Thread_Clear_state+0xc0> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; ffc0ad38: 38 00 00 01 li r0,1 ffc0ad3c: 3d 60 00 00 lis r11,0 ffc0ad40: 98 0b 27 c0 stb r0,10176(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ad44: 7d 20 01 24 mtmsr r9 } } } _ISR_Enable( level ); } ffc0ad48: 4e 80 00 20 blr * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc0ad4c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ad50: 41 9e ff e8 beq+ cr7,ffc0ad38 <_Thread_Clear_state+0xac><== NEVER TAKEN ffc0ad54: 4b ff ff f0 b ffc0ad44 <_Thread_Clear_state+0xb8> =============================================================================== ffc0ad58 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { ffc0ad58: 94 21 ff e8 stwu r1,-24(r1) ffc0ad5c: 7c 08 02 a6 mflr r0 ffc0ad60: 39 60 00 00 li r11,0 ffc0ad64: 90 01 00 1c stw r0,28(r1) ffc0ad68: a0 04 00 0a lhz r0,10(r4) ffc0ad6c: 81 23 00 1c lwz r9,28(r3) ffc0ad70: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0ad74: 93 a1 00 0c stw r29,12(r1) ffc0ad78: 7c 7d 1b 78 mr r29,r3 ffc0ad7c: 93 e1 00 14 stw r31,20(r1) ffc0ad80: 7c 9f 23 78 mr r31,r4 ffc0ad84: 93 c1 00 10 stw r30,16(r1) ffc0ad88: 7d 69 01 2e stwx r11,r9,r0 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0ad8c: 3f c0 00 00 lis r30,0 ffc0ad90: 81 3e 27 70 lwz r9,10096(r30) * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); ffc0ad94: 7c 83 23 78 mr r3,r4 ffc0ad98: 38 09 ff ff addi r0,r9,-1 ffc0ad9c: 90 1e 27 70 stw r0,10096(r30) ffc0ada0: 48 00 19 71 bl ffc0c710 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0ada4: 81 3e 27 70 lwz r9,10096(r30) ffc0ada8: 38 09 00 01 addi r0,r9,1 ffc0adac: 90 1e 27 70 stw r0,10096(r30) /* * 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 ); ffc0adb0: 7f a3 eb 78 mr r3,r29 ffc0adb4: 7f e4 fb 78 mr r4,r31 ffc0adb8: 4b ff f2 e5 bl ffc0a09c <_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 ); ffc0adbc: 7f e3 fb 78 mr r3,r31 ffc0adc0: 38 80 00 01 li r4,1 ffc0adc4: 48 00 0f 65 bl ffc0bd28 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { ffc0adc8: 7f e3 fb 78 mr r3,r31 ffc0adcc: 48 00 0d 21 bl ffc0baec <_Thread_queue_Extract_with_proxy> ffc0add0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0add4: 40 9e 00 10 bne- cr7,ffc0ade4 <_Thread_Close+0x8c> if ( _Watchdog_Is_active( &the_thread->Timer ) ) ffc0add8: 80 1f 00 50 lwz r0,80(r31) ffc0addc: 2f 80 00 02 cmpwi cr7,r0,2 ffc0ade0: 41 9e 00 60 beq- cr7,ffc0ae40 <_Thread_Close+0xe8> if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; if ( the_thread->Start.fp_context ) ffc0ade4: 80 7f 00 d4 lwz r3,212(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; ffc0ade8: 38 00 00 00 li r0,0 ffc0adec: 90 1f 01 3c stw r0,316(r31) if ( the_thread->Start.fp_context ) ffc0adf0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0adf4: 41 9e 00 08 beq- cr7,ffc0adfc <_Thread_Close+0xa4> <== NEVER TAKEN (void) _Workspace_Free( the_thread->Start.fp_context ); ffc0adf8: 48 00 1e 8d bl ffc0cc84 <_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 ); ffc0adfc: 7f e3 fb 78 mr r3,r31 ffc0ae00: 48 00 11 99 bl ffc0bf98 <_Thread_Stack_Free> the_thread->Start.stack = NULL; if ( the_thread->extensions ) ffc0ae04: 80 7f 01 50 lwz r3,336(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; ffc0ae08: 38 00 00 00 li r0,0 if ( the_thread->extensions ) ffc0ae0c: 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; ffc0ae10: 90 1f 00 d8 stw r0,216(r31) if ( the_thread->extensions ) ffc0ae14: 41 9e 00 08 beq- cr7,ffc0ae1c <_Thread_Close+0xc4> (void) _Workspace_Free( the_thread->extensions ); ffc0ae18: 48 00 1e 6d bl ffc0cc84 <_Workspace_Free> the_thread->extensions = NULL; ffc0ae1c: 38 00 00 00 li r0,0 } ffc0ae20: 83 a1 00 0c lwz r29,12(r1) _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; if ( the_thread->extensions ) (void) _Workspace_Free( the_thread->extensions ); the_thread->extensions = NULL; ffc0ae24: 90 1f 01 50 stw r0,336(r31) } ffc0ae28: 80 01 00 1c lwz r0,28(r1) ffc0ae2c: 83 c1 00 10 lwz r30,16(r1) ffc0ae30: 7c 08 03 a6 mtlr r0 ffc0ae34: 83 e1 00 14 lwz r31,20(r1) ffc0ae38: 38 21 00 18 addi r1,r1,24 ffc0ae3c: 4e 80 00 20 blr */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); ffc0ae40: 38 7f 00 48 addi r3,r31,72 ffc0ae44: 48 00 1c 1d bl ffc0ca60 <_Watchdog_Remove> ffc0ae48: 4b ff ff 9c b ffc0ade4 <_Thread_Close+0x8c> =============================================================================== ffc0af4c <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0af4c: 94 21 ff e8 stwu r1,-24(r1) ffc0af50: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0af54: 38 81 00 08 addi r4,r1,8 void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0af58: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0af5c: 48 00 02 65 bl ffc0b1c0 <_Thread_Get> switch ( location ) { ffc0af60: 80 01 00 08 lwz r0,8(r1) ffc0af64: 2f 80 00 00 cmpwi cr7,r0,0 ffc0af68: 40 9e 00 20 bne- cr7,ffc0af88 <_Thread_Delay_ended+0x3c><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( ffc0af6c: 3c 80 10 00 lis r4,4096 ffc0af70: 60 84 00 18 ori r4,r4,24 ffc0af74: 4b ff fd 19 bl ffc0ac8c <_Thread_Clear_state> ffc0af78: 3d 20 00 00 lis r9,0 ffc0af7c: 81 69 27 70 lwz r11,10096(r9) ffc0af80: 38 0b ff ff addi r0,r11,-1 ffc0af84: 90 09 27 70 stw r0,10096(r9) | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } ffc0af88: 80 01 00 1c lwz r0,28(r1) ffc0af8c: 38 21 00 18 addi r1,r1,24 ffc0af90: 7c 08 03 a6 mtlr r0 ffc0af94: 4e 80 00 20 blr =============================================================================== ffc0af98 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { ffc0af98: 94 21 ff b0 stwu r1,-80(r1) ffc0af9c: 7c 08 02 a6 mflr r0 ffc0afa0: 93 41 00 38 stw r26,56(r1) Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; ffc0afa4: 3f 40 00 00 lis r26,0 * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { ffc0afa8: 93 e1 00 4c stw r31,76(r1) ffc0afac: 90 01 00 54 stw r0,84(r1) ffc0afb0: 92 41 00 18 stw r18,24(r1) ffc0afb4: 92 61 00 1c stw r19,28(r1) ffc0afb8: 92 81 00 20 stw r20,32(r1) ffc0afbc: 92 a1 00 24 stw r21,36(r1) ffc0afc0: 92 c1 00 28 stw r22,40(r1) ffc0afc4: 92 e1 00 2c stw r23,44(r1) ffc0afc8: 93 01 00 30 stw r24,48(r1) ffc0afcc: 93 21 00 34 stw r25,52(r1) ffc0afd0: 93 61 00 3c stw r27,60(r1) ffc0afd4: 93 81 00 40 stw r28,64(r1) ffc0afd8: 93 a1 00 44 stw r29,68(r1) ffc0afdc: 93 c1 00 48 stw r30,72(r1) Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; ffc0afe0: 83 fa 27 b0 lwz r31,10160(r26) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0afe4: 7c 00 00 a6 mfmsr r0 ffc0afe8: 7d 30 42 a6 mfsprg r9,0 ffc0afec: 7c 09 48 78 andc r9,r0,r9 ffc0aff0: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { ffc0aff4: 3f 20 00 00 lis r25,0 ffc0aff8: 89 39 27 c0 lbz r9,10176(r25) ffc0affc: 3e 40 00 00 lis r18,0 ffc0b000: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b004: 41 9e 01 20 beq- cr7,ffc0b124 <_Thread_Dispatch+0x18c> ffc0b008: 3e 80 00 00 lis r20,0 ffc0b00c: 3f 60 00 00 lis r27,0 ffc0b010: 3e a0 00 00 lis r21,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; ffc0b014: 3e 60 00 00 lis r19,0 ffc0b018: 3a 94 27 8c addi r20,r20,10124 ffc0b01c: 3b 39 27 c0 addi r25,r25,10176 ffc0b020: 3b 5a 27 b0 addi r26,r26,10160 ffc0b024: 3b 7b 27 b8 addi r27,r27,10168 ffc0b028: 3a b5 27 88 addi r21,r21,10120 ffc0b02c: 3a 73 27 68 addi r19,r19,10088 ffc0b030: 3a d2 27 70 addi r22,r18,10096 ffc0b034: 3b 81 00 08 addi r28,r1,8 ffc0b038: 3b a1 00 10 addi r29,r1,16 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; ffc0b03c: 3a e0 00 01 li r23,1 _Context_Switch_necessary = false; ffc0b040: 3b 00 00 00 li r24,0 ffc0b044: 48 00 00 b8 b ffc0b0fc <_Thread_Dispatch+0x164> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0b048: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); ffc0b04c: 7f 83 e3 78 mr r3,r28 ffc0b050: 48 00 49 75 bl ffc0f9c4 <_TOD_Get_uptime> _Timestamp_Subtract( ffc0b054: 7f 63 db 78 mr r3,r27 ffc0b058: 7f 84 e3 78 mr r4,r28 ffc0b05c: 7f a5 eb 78 mr r5,r29 ffc0b060: 48 00 13 45 bl ffc0c3a4 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); ffc0b064: 7f a4 eb 78 mr r4,r29 ffc0b068: 38 7f 00 84 addi r3,r31,132 ffc0b06c: 48 00 12 dd bl ffc0c348 <_Timespec_Add_to> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0b070: 81 35 00 00 lwz r9,0(r21) &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0b074: 81 61 00 08 lwz r11,8(r1) if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); ffc0b078: 7f e3 fb 78 mr r3,r31 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0b07c: 2f 89 00 00 cmpwi cr7,r9,0 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0b080: 81 81 00 0c lwz r12,12(r1) if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); ffc0b084: 7f c4 f3 78 mr r4,r30 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0b088: 91 7b 00 00 stw r11,0(r27) ffc0b08c: 91 9b 00 04 stw r12,4(r27) #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0b090: 41 9e 00 14 beq- cr7,ffc0b0a4 <_Thread_Dispatch+0x10c> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; ffc0b094: 80 09 00 00 lwz r0,0(r9) ffc0b098: 90 1f 01 40 stw r0,320(r31) *_Thread_libc_reent = heir->libc_reent; ffc0b09c: 80 1e 01 40 lwz r0,320(r30) ffc0b0a0: 90 09 00 00 stw r0,0(r9) } _User_extensions_Thread_switch( executing, heir ); ffc0b0a4: 48 00 17 79 bl ffc0c81c <_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 ) ffc0b0a8: 80 1f 01 3c lwz r0,316(r31) _Context_Save_fp( &executing->fp_context ); ffc0b0ac: 38 7f 01 3c addi r3,r31,316 * operations. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE ) if ( executing->fp_context != NULL ) ffc0b0b0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b0b4: 41 9e 00 08 beq- cr7,ffc0b0bc <_Thread_Dispatch+0x124> _Context_Save_fp( &executing->fp_context ); ffc0b0b8: 48 01 29 49 bl ffc1da00 <_CPU_Context_save_fp> #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); ffc0b0bc: 38 7f 00 dc addi r3,r31,220 ffc0b0c0: 38 9e 00 dc addi r4,r30,220 ffc0b0c4: 48 01 2a bd bl ffc1db80 <_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 ) ffc0b0c8: 80 1f 01 3c lwz r0,316(r31) _Context_Restore_fp( &executing->fp_context ); ffc0b0cc: 38 7f 01 3c addi r3,r31,316 _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); _Context_Restore_fp( &executing->fp_context ); _Thread_Allocated_fp = executing; } #else if ( executing->fp_context != NULL ) ffc0b0d0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b0d4: 41 9e 00 08 beq- cr7,ffc0b0dc <_Thread_Dispatch+0x144> _Context_Restore_fp( &executing->fp_context ); ffc0b0d8: 48 01 29 e9 bl ffc1dac0 <_CPU_Context_restore_fp> #endif #endif executing = _Thread_Executing; ffc0b0dc: 83 fa 00 00 lwz r31,0(r26) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b0e0: 7c 00 00 a6 mfmsr r0 ffc0b0e4: 7d 30 42 a6 mfsprg r9,0 ffc0b0e8: 7c 09 48 78 andc r9,r0,r9 ffc0b0ec: 7d 20 01 24 mtmsr r9 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { ffc0b0f0: 89 39 00 00 lbz r9,0(r25) ffc0b0f4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b0f8: 41 9e 00 2c beq- cr7,ffc0b124 <_Thread_Dispatch+0x18c> heir = _Thread_Heir; ffc0b0fc: 83 d4 00 00 lwz r30,0(r20) _Thread_Dispatch_disable_level = 1; ffc0b100: 92 f6 00 00 stw r23,0(r22) _Thread_Executing = heir; #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 ) ffc0b104: 81 3e 00 7c lwz r9,124(r30) executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; ffc0b108: 9b 19 00 00 stb r24,0(r25) _Thread_Executing = heir; #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 ) ffc0b10c: 2f 89 00 01 cmpwi cr7,r9,1 _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; _Thread_Executing = heir; ffc0b110: 93 da 00 00 stw r30,0(r26) #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 ) ffc0b114: 40 9e ff 34 bne+ cr7,ffc0b048 <_Thread_Dispatch+0xb0> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0b118: 81 33 00 00 lwz r9,0(r19) ffc0b11c: 91 3e 00 78 stw r9,120(r30) ffc0b120: 4b ff ff 28 b ffc0b048 <_Thread_Dispatch+0xb0> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; ffc0b124: 39 20 00 00 li r9,0 ffc0b128: 91 32 27 70 stw r9,10096(r18) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0b12c: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); if ( _Thread_Do_post_task_switch_extension || ffc0b130: 3d 20 00 00 lis r9,0 ffc0b134: 80 09 27 a0 lwz r0,10144(r9) ffc0b138: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b13c: 40 9e 00 10 bne- cr7,ffc0b14c <_Thread_Dispatch+0x1b4> executing->do_post_task_switch_extension ) { ffc0b140: 88 1f 00 74 lbz r0,116(r31) ffc0b144: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b148: 41 9e 00 10 beq- cr7,ffc0b158 <_Thread_Dispatch+0x1c0> executing->do_post_task_switch_extension = false; ffc0b14c: 38 00 00 00 li r0,0 ffc0b150: 98 1f 00 74 stb r0,116(r31) _API_extensions_Run_postswitch(); ffc0b154: 4b ff e1 a1 bl ffc092f4 <_API_extensions_Run_postswitch> } } ffc0b158: 80 01 00 54 lwz r0,84(r1) ffc0b15c: 82 41 00 18 lwz r18,24(r1) ffc0b160: 7c 08 03 a6 mtlr r0 ffc0b164: 82 61 00 1c lwz r19,28(r1) ffc0b168: 82 81 00 20 lwz r20,32(r1) ffc0b16c: 82 a1 00 24 lwz r21,36(r1) ffc0b170: 82 c1 00 28 lwz r22,40(r1) ffc0b174: 82 e1 00 2c lwz r23,44(r1) ffc0b178: 83 01 00 30 lwz r24,48(r1) ffc0b17c: 83 21 00 34 lwz r25,52(r1) ffc0b180: 83 41 00 38 lwz r26,56(r1) ffc0b184: 83 61 00 3c lwz r27,60(r1) ffc0b188: 83 81 00 40 lwz r28,64(r1) ffc0b18c: 83 a1 00 44 lwz r29,68(r1) ffc0b190: 83 c1 00 48 lwz r30,72(r1) ffc0b194: 83 e1 00 4c lwz r31,76(r1) ffc0b198: 38 21 00 50 addi r1,r1,80 ffc0b19c: 4e 80 00 20 blr =============================================================================== ffc12390 <_Thread_Evaluate_mode>: bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; ffc12390: 3d 20 00 00 lis r9,0 ffc12394: 81 29 27 b0 lwz r9,10160(r9) if ( !_States_Is_ready( executing->current_state ) || ffc12398: 80 09 00 10 lwz r0,16(r9) ffc1239c: 2f 80 00 00 cmpwi cr7,r0,0 ffc123a0: 40 9e 00 20 bne- cr7,ffc123c0 <_Thread_Evaluate_mode+0x30><== NEVER TAKEN ffc123a4: 3d 60 00 00 lis r11,0 ffc123a8: 80 0b 27 8c lwz r0,10124(r11) ffc123ac: 7f 89 00 00 cmpw cr7,r9,r0 ffc123b0: 41 9e 00 24 beq- cr7,ffc123d4 <_Thread_Evaluate_mode+0x44> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { ffc123b4: 88 09 00 75 lbz r0,117(r9) ffc123b8: 2f 80 00 00 cmpwi cr7,r0,0 ffc123bc: 41 9e 00 18 beq- cr7,ffc123d4 <_Thread_Evaluate_mode+0x44><== NEVER TAKEN _Context_Switch_necessary = true; ffc123c0: 38 00 00 01 li r0,1 ffc123c4: 3d 20 00 00 lis r9,0 ffc123c8: 98 09 27 c0 stb r0,10176(r9) ffc123cc: 38 60 00 01 li r3,1 return true; ffc123d0: 4e 80 00 20 blr ffc123d4: 38 60 00 00 li r3,0 } return false; } ffc123d8: 4e 80 00 20 blr =============================================================================== ffc123dc <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc123dc: 94 21 ff f0 stwu r1,-16(r1) ffc123e0: 7c 08 02 a6 mflr r0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; ffc123e4: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc123e8: 90 01 00 14 stw r0,20(r1) ffc123ec: 93 e1 00 0c stw r31,12(r1) #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; ffc123f0: 83 e9 27 b0 lwz r31,10160(r9) * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc123f4: 93 c1 00 08 stw r30,8(r1) /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; ffc123f8: 81 3f 00 c0 lwz r9,192(r31) } static inline void _CPU_ISR_Set_level( uint32_t level ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc123fc: 38 00 00 00 li r0,0 ffc12400: 7c 00 00 a6 mfmsr r0 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc12404: 71 2b 00 01 andi. r11,r9,1 ffc12408: 40 82 00 60 bne- ffc12468 <_Thread_Handler+0x8c> static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; asm volatile ( ffc1240c: 7d 30 42 a6 mfsprg r9,0 msr |= ppc_interrupt_get_disable_mask(); ffc12410: 7d 20 03 78 or r0,r9,r0 } else { msr &= ~ppc_interrupt_get_disable_mask(); } _CPU_MSR_SET(msr); ffc12414: 7c 00 01 24 mtmsr r0 _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; ffc12418: 3d 20 00 00 lis r9,0 ffc1241c: 8b c9 29 98 lbz r30,10648(r9) doneConstructors = 1; ffc12420: 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 ); ffc12424: 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; ffc12428: 98 09 29 98 stb r0,10648(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 ); ffc1242c: 4b ff a0 dd bl ffc0c508 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); ffc12430: 4b ff 8d 71 bl ffc0b1a0 <_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) */ { ffc12434: 2f 9e 00 00 cmpwi cr7,r30,0 ffc12438: 41 9e 00 60 beq- cr7,ffc12498 <_Thread_Handler+0xbc> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { ffc1243c: 80 1f 00 a8 lwz r0,168(r31) ffc12440: 2f 80 00 00 cmpwi cr7,r0,0 ffc12444: 41 9e 00 64 beq- cr7,ffc124a8 <_Thread_Handler+0xcc> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { ffc12448: 2f 80 00 01 cmpwi cr7,r0,1 ffc1244c: 41 9e 00 74 beq- cr7,ffc124c0 <_Thread_Handler+0xe4> <== ALWAYS TAKEN * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); ffc12450: 7f e3 fb 78 mr r3,r31 ffc12454: 4b ff a1 29 bl ffc0c57c <_User_extensions_Thread_exitted> _Internal_error_Occurred( ffc12458: 38 60 00 00 li r3,0 ffc1245c: 38 80 00 01 li r4,1 ffc12460: 38 a0 00 06 li r5,6 ffc12464: 4b ff 7b 11 bl ffc09f74 <_Internal_error_Occurred> ffc12468: 7d 30 42 a6 mfsprg r9,0 _CPU_MSR_GET(msr); if (!(level & CPU_MODES_INTERRUPT_MASK)) { msr |= ppc_interrupt_get_disable_mask(); } else { msr &= ~ppc_interrupt_get_disable_mask(); ffc1246c: 7c 00 48 78 andc r0,r0,r9 } _CPU_MSR_SET(msr); ffc12470: 7c 00 01 24 mtmsr r0 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; ffc12474: 3d 20 00 00 lis r9,0 ffc12478: 8b c9 29 98 lbz r30,10648(r9) doneConstructors = 1; ffc1247c: 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 ); ffc12480: 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; ffc12484: 98 09 29 98 stb r0,10648(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 ); ffc12488: 4b ff a0 81 bl ffc0c508 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); ffc1248c: 4b ff 8d 15 bl ffc0b1a0 <_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) */ { ffc12490: 2f 9e 00 00 cmpwi cr7,r30,0 ffc12494: 40 9e ff a8 bne+ cr7,ffc1243c <_Thread_Handler+0x60> <== ALWAYS TAKEN INIT_NAME (); ffc12498: 48 00 c6 65 bl ffc1eafc <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { ffc1249c: 80 1f 00 a8 lwz r0,168(r31) ffc124a0: 2f 80 00 00 cmpwi cr7,r0,0 ffc124a4: 40 9e ff a4 bne+ cr7,ffc12448 <_Thread_Handler+0x6c> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( ffc124a8: 80 1f 00 a4 lwz r0,164(r31) ffc124ac: 80 7f 00 b0 lwz r3,176(r31) ffc124b0: 7c 09 03 a6 mtctr r0 ffc124b4: 4e 80 04 21 bctrl INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = ffc124b8: 90 7f 00 28 stw r3,40(r31) ffc124bc: 4b ff ff 94 b ffc12450 <_Thread_Handler+0x74> ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( ffc124c0: 80 1f 00 a4 lwz r0,164(r31) ffc124c4: 80 7f 00 ac lwz r3,172(r31) ffc124c8: 7c 09 03 a6 mtctr r0 ffc124cc: 4e 80 04 21 bctrl executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = ffc124d0: 90 7f 00 28 stw r3,40(r31) ffc124d4: 4b ff ff 7c b ffc12450 <_Thread_Handler+0x74> =============================================================================== ffc0b28c <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0b28c: 7d 80 00 26 mfcr r12 if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { ffc0b290: 2c 05 00 00 cmpwi r5,0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0b294: 94 21 ff c8 stwu r1,-56(r1) ffc0b298: 7c 08 02 a6 mflr r0 ffc0b29c: 93 81 00 28 stw r28,40(r1) ffc0b2a0: 7d 3c 4b 78 mr r28,r9 ffc0b2a4: 90 01 00 3c stw r0,60(r1) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0b2a8: 38 00 00 00 li r0,0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0b2ac: 81 21 00 48 lwz r9,72(r1) ffc0b2b0: 93 01 00 18 stw r24,24(r1) ffc0b2b4: 93 41 00 20 stw r26,32(r1) ffc0b2b8: 7d 5a 53 78 mr r26,r10 ffc0b2bc: 93 a1 00 2c stw r29,44(r1) ffc0b2c0: 7d 1d 43 78 mr r29,r8 ffc0b2c4: 93 c1 00 30 stw r30,48(r1) ffc0b2c8: 7c 7e 1b 78 mr r30,r3 ffc0b2cc: 93 e1 00 34 stw r31,52(r1) ffc0b2d0: 7c 9f 23 78 mr r31,r4 ffc0b2d4: 92 e1 00 14 stw r23,20(r1) ffc0b2d8: 93 21 00 1c stw r25,28(r1) ffc0b2dc: 93 61 00 24 stw r27,36(r1) ffc0b2e0: 91 81 00 10 stw r12,16(r1) ffc0b2e4: 83 09 00 00 lwz r24,0(r9) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0b2e8: 90 04 01 44 stw r0,324(r4) ffc0b2ec: 90 04 01 48 stw r0,328(r4) ffc0b2f0: 90 04 01 4c stw r0,332(r4) extensions_area = NULL; the_thread->libc_reent = NULL; ffc0b2f4: 90 04 01 40 stw r0,320(r4) if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { ffc0b2f8: 41 82 01 fc beq- ffc0b4f4 <_Thread_Initialize+0x268> stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = true; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; ffc0b2fc: 98 04 00 c8 stb r0,200(r4) ffc0b300: 7c c3 33 78 mr r3,r6 /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { ffc0b304: 2f 87 00 00 cmpwi cr7,r7,0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0b308: 90 bf 00 d0 stw r5,208(r31) ffc0b30c: 39 20 00 00 li r9,0 the_stack->size = size; ffc0b310: 90 7f 00 cc stw r3,204(r31) ffc0b314: 3b 60 00 00 li r27,0 ffc0b318: 40 9e 01 64 bne- cr7,ffc0b47c <_Thread_Initialize+0x1f0> #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0b31c: 3e e0 00 00 lis r23,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; ffc0b320: 91 3f 00 d4 stw r9,212(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0b324: 38 00 00 00 li r0,0 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0b328: 81 77 27 9c lwz r11,10140(r23) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; ffc0b32c: 90 1f 00 6c stw r0,108(r31) ffc0b330: 2f 8b 00 00 cmpwi cr7,r11,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; ffc0b334: 91 3f 01 3c stw r9,316(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0b338: 90 1f 00 50 stw r0,80(r31) the_watchdog->routine = routine; ffc0b33c: 90 1f 00 64 stw r0,100(r31) the_watchdog->id = id; ffc0b340: 90 1f 00 68 stw r0,104(r31) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0b344: 40 9e 01 5c bne- cr7,ffc0b4a0 <_Thread_Initialize+0x214> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0b348: 91 7f 01 50 stw r11,336(r31) ffc0b34c: 3b 20 00 00 li r25,0 the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { ffc0b350: 2f 9a 00 02 cmpwi cr7,r26,2 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0b354: 80 01 00 40 lwz r0,64(r1) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; ffc0b358: 9b 9f 00 b4 stb r28,180(r31) the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0b35c: 90 1f 00 bc stw r0,188(r31) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; ffc0b360: 93 5f 00 b8 stw r26,184(r31) the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { ffc0b364: 40 be 00 10 bne+ cr7,ffc0b374 <_Thread_Initialize+0xe8> case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0b368: 3d 20 00 00 lis r9,0 ffc0b36c: 80 09 27 68 lwz r0,10088(r9) ffc0b370: 90 1f 00 78 stw r0,120(r31) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0b374: 80 01 00 44 lwz r0,68(r1) the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; ffc0b378: 3b 80 00 00 li r28,0 ffc0b37c: 93 9f 00 44 stw r28,68(r31) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); ffc0b380: 7f a4 eb 78 mr r4,r29 ffc0b384: 7f e3 fb 78 mr r3,r31 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0b388: 90 1f 00 c0 stw r0,192(r31) the_thread->current_state = STATES_DORMANT; ffc0b38c: 38 00 00 01 li r0,1 ffc0b390: 2e 1b 00 00 cmpwi cr4,r27,0 ffc0b394: 90 1f 00 10 stw r0,16(r31) ffc0b398: 2d 99 00 00 cmpwi cr3,r25,0 the_thread->Wait.queue = NULL; the_thread->resource_count = 0; ffc0b39c: 93 9f 00 1c stw r28,28(r31) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; ffc0b3a0: 93 bf 00 18 stw r29,24(r31) the_thread->Start.initial_priority = priority; ffc0b3a4: 93 bf 00 c4 stw r29,196(r31) _Thread_Set_priority( the_thread, priority ); ffc0b3a8: 48 00 09 25 bl ffc0bccc <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0b3ac: a0 1f 00 0a lhz r0,10(r31) ffc0b3b0: 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 ); ffc0b3b4: 7f e3 fb 78 mr r3,r31 ffc0b3b8: 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 ); ffc0b3bc: 93 9f 00 88 stw r28,136(r31) ffc0b3c0: 7f e9 01 2e stwx r31,r9,r0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc0b3c4: 93 1f 00 0c stw r24,12(r31) ffc0b3c8: 93 9f 00 84 stw r28,132(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 ); ffc0b3cc: 48 00 12 b1 bl ffc0c67c <_User_extensions_Thread_create> if ( extension_status ) ffc0b3d0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b3d4: 38 60 00 01 li r3,1 ffc0b3d8: 40 9e 00 68 bne- cr7,ffc0b440 <_Thread_Initialize+0x1b4> return true; failed: if ( the_thread->libc_reent ) ffc0b3dc: 80 7f 01 40 lwz r3,320(r31) ffc0b3e0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b3e4: 41 9e 00 08 beq- cr7,ffc0b3ec <_Thread_Initialize+0x160> _Workspace_Free( the_thread->libc_reent ); ffc0b3e8: 48 00 18 9d bl ffc0cc84 <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) ffc0b3ec: 80 7f 01 44 lwz r3,324(r31) ffc0b3f0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b3f4: 41 9e 00 08 beq- cr7,ffc0b3fc <_Thread_Initialize+0x170> _Workspace_Free( the_thread->API_Extensions[i] ); ffc0b3f8: 48 00 18 8d bl ffc0cc84 <_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] ) ffc0b3fc: 80 7f 01 48 lwz r3,328(r31) ffc0b400: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b404: 41 9e 00 08 beq- cr7,ffc0b40c <_Thread_Initialize+0x180> _Workspace_Free( the_thread->API_Extensions[i] ); ffc0b408: 48 00 18 7d bl ffc0cc84 <_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] ) ffc0b40c: 80 7f 01 4c lwz r3,332(r31) ffc0b410: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b414: 41 9e 00 08 beq- cr7,ffc0b41c <_Thread_Initialize+0x190><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); ffc0b418: 48 00 18 6d bl ffc0cc84 <_Workspace_Free> <== NOT EXECUTED if ( extensions_area ) ffc0b41c: 41 8e 00 0c beq- cr3,ffc0b428 <_Thread_Initialize+0x19c> (void) _Workspace_Free( extensions_area ); ffc0b420: 7f 23 cb 78 mr r3,r25 ffc0b424: 48 00 18 61 bl ffc0cc84 <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) ffc0b428: 41 92 00 0c beq- cr4,ffc0b434 <_Thread_Initialize+0x1a8> (void) _Workspace_Free( fp_area ); ffc0b42c: 7f 63 db 78 mr r3,r27 ffc0b430: 48 00 18 55 bl ffc0cc84 <_Workspace_Free> #endif _Thread_Stack_Free( the_thread ); ffc0b434: 7f e3 fb 78 mr r3,r31 ffc0b438: 48 00 0b 61 bl ffc0bf98 <_Thread_Stack_Free> ffc0b43c: 38 60 00 00 li r3,0 return false; } ffc0b440: 80 01 00 3c lwz r0,60(r1) ffc0b444: 81 81 00 10 lwz r12,16(r1) ffc0b448: 7c 08 03 a6 mtlr r0 ffc0b44c: 82 e1 00 14 lwz r23,20(r1) ffc0b450: 83 01 00 18 lwz r24,24(r1) ffc0b454: 7d 81 81 20 mtcrf 24,r12 ffc0b458: 83 21 00 1c lwz r25,28(r1) ffc0b45c: 83 41 00 20 lwz r26,32(r1) ffc0b460: 83 61 00 24 lwz r27,36(r1) ffc0b464: 83 81 00 28 lwz r28,40(r1) ffc0b468: 83 a1 00 2c lwz r29,44(r1) ffc0b46c: 83 c1 00 30 lwz r30,48(r1) ffc0b470: 83 e1 00 34 lwz r31,52(r1) ffc0b474: 38 21 00 38 addi r1,r1,56 ffc0b478: 4e 80 00 20 blr /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); ffc0b47c: 38 60 01 08 li r3,264 ffc0b480: 48 00 17 d1 bl ffc0cc50 <_Workspace_Allocate> if ( !fp_area ) ffc0b484: 2e 03 00 00 cmpwi cr4,r3,0 /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); ffc0b488: 7c 7b 1b 78 mr r27,r3 if ( !fp_area ) ffc0b48c: 7c 69 1b 78 mr r9,r3 ffc0b490: 40 92 fe 8c bne+ cr4,ffc0b31c <_Thread_Initialize+0x90> ffc0b494: 3b 20 00 00 li r25,0 ffc0b498: 4d 90 00 00 mcrf cr3,cr4 ffc0b49c: 4b ff ff 40 b ffc0b3dc <_Thread_Initialize+0x150> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( ffc0b4a0: 39 6b 00 01 addi r11,r11,1 ffc0b4a4: 55 63 10 3a rlwinm r3,r11,2,0,29 ffc0b4a8: 48 00 17 a9 bl ffc0cc50 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) ffc0b4ac: 2d 83 00 00 cmpwi cr3,r3,0 ffc0b4b0: 7c 79 1b 78 mr r25,r3 ffc0b4b4: 41 8e 00 84 beq- cr3,ffc0b538 <_Thread_Initialize+0x2ac> goto failed; } the_thread->extensions = (void **) extensions_area; ffc0b4b8: 90 7f 01 50 stw r3,336(r31) ffc0b4bc: 7c 6b 1b 78 mr r11,r3 * 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++ ) ffc0b4c0: 38 00 00 00 li r0,0 ffc0b4c4: 81 17 27 9c lwz r8,10140(r23) ffc0b4c8: 39 20 00 00 li r9,0 the_thread->extensions[i] = NULL; ffc0b4cc: 39 40 00 00 li r10,0 ffc0b4d0: 48 00 00 08 b ffc0b4d8 <_Thread_Initialize+0x24c> * 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++ ) ffc0b4d4: 81 7f 01 50 lwz r11,336(r31) ffc0b4d8: 39 29 00 01 addi r9,r9,1 ffc0b4dc: 7f 88 48 40 cmplw cr7,r8,r9 the_thread->extensions[i] = NULL; ffc0b4e0: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0b4e4: 7d 4b 01 2e stwx r10,r11,r0 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) ffc0b4e8: 7d 20 4b 78 mr r0,r9 ffc0b4ec: 40 9c ff e8 bge+ cr7,ffc0b4d4 <_Thread_Initialize+0x248> ffc0b4f0: 4b ff fe 60 b ffc0b350 <_Thread_Initialize+0xc4> return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); ffc0b4f4: 7c 83 23 78 mr r3,r4 ffc0b4f8: 90 c1 00 08 stw r6,8(r1) ffc0b4fc: 7c c4 33 78 mr r4,r6 ffc0b500: 90 e1 00 0c stw r7,12(r1) ffc0b504: 48 00 09 dd bl ffc0bee0 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0b508: 2c 03 00 00 cmpwi r3,0 ffc0b50c: 80 c1 00 08 lwz r6,8(r1) ffc0b510: 80 e1 00 0c lwz r7,12(r1) ffc0b514: 41 82 00 1c beq- ffc0b530 <_Thread_Initialize+0x2a4> ffc0b518: 7f 86 18 40 cmplw cr7,r6,r3 ffc0b51c: 41 9d 00 14 bgt- cr7,ffc0b530 <_Thread_Initialize+0x2a4><== NEVER TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = true; ffc0b520: 38 00 00 01 li r0,1 if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; ffc0b524: 80 bf 00 d8 lwz r5,216(r31) the_thread->Start.core_allocated_stack = true; ffc0b528: 98 1f 00 c8 stb r0,200(r31) ffc0b52c: 4b ff fd d8 b ffc0b304 <_Thread_Initialize+0x78> if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return false; ffc0b530: 38 60 00 00 li r3,0 ffc0b534: 4b ff ff 0c b ffc0b440 <_Thread_Initialize+0x1b4> ffc0b538: 2e 1b 00 00 cmpwi cr4,r27,0 ffc0b53c: 4b ff fe a0 b ffc0b3dc <_Thread_Initialize+0x150> =============================================================================== ffc10288 <_Thread_Reset_timeslice>: { ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ffc10288: 3d 20 00 00 lis r9,0 ffc1028c: 81 29 27 b0 lwz r9,10160(r9) ready = executing->ready; ffc10290: 81 69 00 8c lwz r11,140(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc10294: 7c 00 00 a6 mfmsr r0 ffc10298: 7d 50 42 a6 mfsprg r10,0 ffc1029c: 7c 0a 50 78 andc r10,r0,r10 ffc102a0: 7d 40 01 24 mtmsr r10 _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { ffc102a4: 81 0b 00 00 lwz r8,0(r11) ffc102a8: 81 4b 00 08 lwz r10,8(r11) ffc102ac: 7f 88 50 00 cmpw cr7,r8,r10 ffc102b0: 41 9e 00 78 beq- cr7,ffc10328 <_Thread_Reset_timeslice+0xa0> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc102b4: 81 49 00 00 lwz r10,0(r9) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc102b8: 38 eb 00 04 addi r7,r11,4 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc102bc: 81 09 00 04 lwz r8,4(r9) next->previous = previous; previous->next = next; ffc102c0: 91 48 00 00 stw r10,0(r8) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc102c4: 91 0a 00 04 stw r8,4(r10) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc102c8: 90 e9 00 00 stw r7,0(r9) old_last_node = the_chain->last; ffc102cc: 81 4b 00 08 lwz r10,8(r11) the_chain->last = the_node; ffc102d0: 91 2b 00 08 stw r9,8(r11) old_last_node->next = the_node; the_node->previous = old_last_node; ffc102d4: 91 49 00 04 stw r10,4(r9) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; ffc102d8: 91 2a 00 00 stw r9,0(r10) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc102dc: 7d 40 00 a6 mfmsr r10 ffc102e0: 7c 00 01 24 mtmsr r0 ffc102e4: 7d 40 01 24 mtmsr r10 _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) ffc102e8: 3d 40 00 00 lis r10,0 ffc102ec: 81 0a 27 8c lwz r8,10124(r10) ffc102f0: 7f 89 40 00 cmpw cr7,r9,r8 ffc102f4: 41 9e 00 18 beq- cr7,ffc1030c <_Thread_Reset_timeslice+0x84><== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; ffc102f8: 39 60 00 01 li r11,1 <== NOT EXECUTED ffc102fc: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc10300: 99 69 27 c0 stb r11,10176(r9) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc10304: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED ffc10308: 4e 80 00 20 blr <== NOT EXECUTED _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; ffc1030c: 81 2b 00 00 lwz r9,0(r11) _Context_Switch_necessary = true; ffc10310: 39 60 00 01 li r11,1 _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; ffc10314: 91 2a 27 8c stw r9,10124(r10) _Context_Switch_necessary = true; ffc10318: 3d 20 00 00 lis r9,0 ffc1031c: 99 69 27 c0 stb r11,10176(r9) ffc10320: 7c 00 01 24 mtmsr r0 ffc10324: 4e 80 00 20 blr ffc10328: 7c 00 01 24 mtmsr r0 ffc1032c: 4e 80 00 20 blr =============================================================================== ffc0cd48 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0cd48: 94 21 ff e8 stwu r1,-24(r1) ffc0cd4c: 7c 08 02 a6 mflr r0 ffc0cd50: 90 01 00 1c stw r0,28(r1) if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0cd54: 80 03 00 10 lwz r0,16(r3) bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0cd58: 93 e1 00 14 stw r31,20(r1) ffc0cd5c: 7c 7f 1b 78 mr r31,r3 if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0cd60: 70 09 00 01 andi. r9,r0,1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0cd64: 93 c1 00 10 stw r30,16(r1) if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0cd68: 38 00 00 00 li r0,0 ffc0cd6c: 41 82 00 20 beq- ffc0cd8c <_Thread_Restart+0x44> return true; } return false; } ffc0cd70: 7c 03 03 78 mr r3,r0 ffc0cd74: 80 01 00 1c lwz r0,28(r1) ffc0cd78: 83 c1 00 10 lwz r30,16(r1) ffc0cd7c: 7c 08 03 a6 mtlr r0 ffc0cd80: 83 e1 00 14 lwz r31,20(r1) ffc0cd84: 38 21 00 18 addi r1,r1,24 ffc0cd88: 4e 80 00 20 blr Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); ffc0cd8c: 90 81 00 08 stw r4,8(r1) _Thread_Ready( the_thread ); _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) ffc0cd90: 3f c0 00 00 lis r30,0 Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); ffc0cd94: 90 a1 00 0c stw r5,12(r1) ffc0cd98: 48 00 01 e5 bl ffc0cf7c <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); ffc0cd9c: 7f e3 fb 78 mr r3,r31 ffc0cda0: 80 81 00 08 lwz r4,8(r1) ffc0cda4: 80 a1 00 0c lwz r5,12(r1) ffc0cda8: 48 00 47 c5 bl ffc1156c <_Thread_Reset> _Thread_Load_environment( the_thread ); ffc0cdac: 7f e3 fb 78 mr r3,r31 ffc0cdb0: 48 00 43 71 bl ffc11120 <_Thread_Load_environment> _Thread_Ready( the_thread ); ffc0cdb4: 7f e3 fb 78 mr r3,r31 ffc0cdb8: 48 00 46 d9 bl ffc11490 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); ffc0cdbc: 7f e3 fb 78 mr r3,r31 ffc0cdc0: 48 00 0b 05 bl ffc0d8c4 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) ffc0cdc4: 81 3e 27 fc lwz r9,10236(r30) ffc0cdc8: 38 00 00 01 li r0,1 ffc0cdcc: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0cdd0: 40 9e ff a0 bne+ cr7,ffc0cd70 <_Thread_Restart+0x28> */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) ffc0cdd4: 80 1f 01 3c lwz r0,316(r31) ffc0cdd8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cddc: 41 9e 00 10 beq- cr7,ffc0cdec <_Thread_Restart+0xa4> <== NEVER TAKEN _Context_Restore_fp( &_Thread_Executing->fp_context ); ffc0cde0: 38 7f 01 3c addi r3,r31,316 ffc0cde4: 48 01 4c 1d bl ffc21a00 <_CPU_Context_restore_fp> ffc0cde8: 83 fe 27 fc lwz r31,10236(r30) #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); ffc0cdec: 38 7f 00 dc addi r3,r31,220 ffc0cdf0: 48 01 4d d1 bl ffc21bc0 <_CPU_Context_restore> ffc0cdf4: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0cdf8: 4b ff ff 78 b ffc0cd70 <_Thread_Restart+0x28> <== NOT EXECUTED =============================================================================== ffc10894 <_Thread_Resume>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc10894: 7d 20 00 a6 mfmsr r9 ffc10898: 7c 10 42 a6 mfsprg r0,0 ffc1089c: 7d 20 00 78 andc r0,r9,r0 ffc108a0: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; ffc108a4: 80 03 00 10 lwz r0,16(r3) if ( current_state & STATES_SUSPENDED ) { ffc108a8: 70 0b 00 02 andi. r11,r0,2 ffc108ac: 41 82 00 a0 beq- ffc1094c <_Thread_Resume+0xb8> <== NEVER TAKEN ffc108b0: 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 ) ) { ffc108b4: 2f 80 00 00 cmpwi cr7,r0,0 } #endif current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = ffc108b8: 90 03 00 10 stw r0,16(r3) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { ffc108bc: 40 9e 00 90 bne- cr7,ffc1094c <_Thread_Resume+0xb8> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc108c0: 81 43 00 90 lwz r10,144(r3) ffc108c4: 80 03 00 98 lwz r0,152(r3) ffc108c8: 81 0a 00 00 lwz r8,0(r10) _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); ffc108cc: 81 63 00 8c lwz r11,140(r3) ffc108d0: 7d 00 03 78 or r0,r8,r0 ffc108d4: 90 0a 00 00 stw r0,0(r10) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc108d8: 38 0b 00 04 addi r0,r11,4 _Priority_Major_bit_map |= the_priority_map->ready_major; ffc108dc: 3d 00 00 00 lis r8,0 ffc108e0: 90 03 00 00 stw r0,0(r3) ffc108e4: 80 e8 27 c4 lwz r7,10180(r8) ffc108e8: 80 03 00 94 lwz r0,148(r3) old_last_node = the_chain->last; ffc108ec: 81 4b 00 08 lwz r10,8(r11) ffc108f0: 7c e0 03 78 or r0,r7,r0 the_chain->last = the_node; ffc108f4: 90 6b 00 08 stw r3,8(r11) ffc108f8: 90 08 27 c4 stw r0,10180(r8) old_last_node->next = the_node; the_node->previous = old_last_node; ffc108fc: 91 43 00 04 stw r10,4(r3) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; ffc10900: 90 6a 00 00 stw r3,0(r10) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc10904: 7c 00 00 a6 mfmsr r0 ffc10908: 7d 20 01 24 mtmsr r9 ffc1090c: 7c 00 01 24 mtmsr r0 _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { ffc10910: 3d 60 00 00 lis r11,0 ffc10914: 80 03 00 14 lwz r0,20(r3) ffc10918: 81 4b 27 ac lwz r10,10156(r11) ffc1091c: 81 4a 00 14 lwz r10,20(r10) ffc10920: 7f 80 50 40 cmplw cr7,r0,r10 ffc10924: 40 9c 00 28 bge- cr7,ffc1094c <_Thread_Resume+0xb8> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc10928: 3d 40 00 00 lis r10,0 _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; ffc1092c: 90 6b 27 ac stw r3,10156(r11) if ( _Thread_Executing->is_preemptible || ffc10930: 81 4a 27 d0 lwz r10,10192(r10) ffc10934: 89 6a 00 75 lbz r11,117(r10) ffc10938: 2f 8b 00 00 cmpwi cr7,r11,0 ffc1093c: 41 9e 00 18 beq- cr7,ffc10954 <_Thread_Resume+0xc0> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; ffc10940: 38 00 00 01 li r0,1 ffc10944: 3d 60 00 00 lis r11,0 ffc10948: 98 0b 27 e0 stb r0,10208(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1094c: 7d 20 01 24 mtmsr r9 } } } _ISR_Enable( level ); } ffc10950: 4e 80 00 20 blr _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc10954: 2f 80 00 00 cmpwi cr7,r0,0 ffc10958: 41 9e ff e8 beq+ cr7,ffc10940 <_Thread_Resume+0xac> <== NEVER TAKEN ffc1095c: 4b ff ff f0 b ffc1094c <_Thread_Resume+0xb8> =============================================================================== ffc0c1f4 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { ffc0c1f4: 94 21 ff f0 stwu r1,-16(r1) ffc0c1f8: 7c 08 02 a6 mflr r0 Thread_Control *executing; executing = _Thread_Executing; ffc0c1fc: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { ffc0c200: 90 01 00 14 stw r0,20(r1) ffc0c204: 93 e1 00 0c stw r31,12(r1) Thread_Control *executing; executing = _Thread_Executing; ffc0c208: 83 e9 27 b0 lwz r31,10160(r9) /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) ffc0c20c: 88 1f 00 75 lbz r0,117(r31) ffc0c210: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c214: 41 9e 00 2c beq- cr7,ffc0c240 <_Thread_Tickle_timeslice+0x4c> return; if ( !_States_Is_ready( executing->current_state ) ) ffc0c218: 80 1f 00 10 lwz r0,16(r31) ffc0c21c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c220: 40 9e 00 20 bne- cr7,ffc0c240 <_Thread_Tickle_timeslice+0x4c> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { ffc0c224: 80 1f 00 7c lwz r0,124(r31) ffc0c228: 2b 80 00 01 cmplwi cr7,r0,1 ffc0c22c: 41 9c 00 14 blt- cr7,ffc0c240 <_Thread_Tickle_timeslice+0x4c> ffc0c230: 2b 80 00 02 cmplwi cr7,r0,2 ffc0c234: 40 9d 00 48 ble- cr7,ffc0c27c <_Thread_Tickle_timeslice+0x88> ffc0c238: 2f 80 00 03 cmpwi cr7,r0,3 ffc0c23c: 41 9e 00 18 beq- cr7,ffc0c254 <_Thread_Tickle_timeslice+0x60><== ALWAYS TAKEN if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } ffc0c240: 80 01 00 14 lwz r0,20(r1) ffc0c244: 83 e1 00 0c lwz r31,12(r1) ffc0c248: 38 21 00 10 addi r1,r1,16 ffc0c24c: 7c 08 03 a6 mtlr r0 ffc0c250: 4e 80 00 20 blr } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) ffc0c254: 81 3f 00 78 lwz r9,120(r31) ffc0c258: 38 09 ff ff addi r0,r9,-1 ffc0c25c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c260: 90 1f 00 78 stw r0,120(r31) ffc0c264: 40 9e ff dc bne+ cr7,ffc0c240 <_Thread_Tickle_timeslice+0x4c> (*executing->budget_callout)( executing ); ffc0c268: 80 1f 00 80 lwz r0,128(r31) ffc0c26c: 7f e3 fb 78 mr r3,r31 ffc0c270: 7c 09 03 a6 mtctr r0 ffc0c274: 4e 80 04 21 bctrl ffc0c278: 4b ff ff c8 b ffc0c240 <_Thread_Tickle_timeslice+0x4c> case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { ffc0c27c: 81 3f 00 78 lwz r9,120(r31) ffc0c280: 38 09 ff ff addi r0,r9,-1 ffc0c284: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c288: 90 1f 00 78 stw r0,120(r31) ffc0c28c: 41 9d ff b4 bgt+ cr7,ffc0c240 <_Thread_Tickle_timeslice+0x4c> _Thread_Reset_timeslice(); ffc0c290: 48 00 3f f9 bl ffc10288 <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0c294: 3d 20 00 00 lis r9,0 ffc0c298: 80 09 27 68 lwz r0,10088(r9) ffc0c29c: 90 1f 00 78 stw r0,120(r31) ffc0c2a0: 4b ff ff a0 b ffc0c240 <_Thread_Tickle_timeslice+0x4c> =============================================================================== ffc0c2a4 <_Thread_Yield_processor>: { ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ffc0c2a4: 3d 20 00 00 lis r9,0 ffc0c2a8: 81 29 27 b0 lwz r9,10160(r9) ready = executing->ready; ffc0c2ac: 81 69 00 8c lwz r11,140(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0c2b0: 7c 00 00 a6 mfmsr r0 ffc0c2b4: 7d 50 42 a6 mfsprg r10,0 ffc0c2b8: 7c 0a 50 78 andc r10,r0,r10 ffc0c2bc: 7d 40 01 24 mtmsr r10 _ISR_Disable( level ); if ( !_Chain_Has_only_one_node( ready ) ) { ffc0c2c0: 81 0b 00 00 lwz r8,0(r11) ffc0c2c4: 81 4b 00 08 lwz r10,8(r11) ffc0c2c8: 7f 88 50 00 cmpw cr7,r8,r10 ffc0c2cc: 41 9e 00 68 beq- cr7,ffc0c334 <_Thread_Yield_processor+0x90> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0c2d0: 81 49 00 00 lwz r10,0(r9) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0c2d4: 38 eb 00 04 addi r7,r11,4 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0c2d8: 81 09 00 04 lwz r8,4(r9) next->previous = previous; previous->next = next; ffc0c2dc: 91 48 00 00 stw r10,0(r8) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc0c2e0: 91 0a 00 04 stw r8,4(r10) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0c2e4: 90 e9 00 00 stw r7,0(r9) old_last_node = the_chain->last; ffc0c2e8: 81 4b 00 08 lwz r10,8(r11) the_chain->last = the_node; ffc0c2ec: 91 2b 00 08 stw r9,8(r11) old_last_node->next = the_node; the_node->previous = old_last_node; ffc0c2f0: 91 49 00 04 stw r10,4(r9) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; ffc0c2f4: 91 2a 00 00 stw r9,0(r10) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0c2f8: 7d 40 00 a6 mfmsr r10 ffc0c2fc: 7c 00 01 24 mtmsr r0 ffc0c300: 7d 40 01 24 mtmsr r10 _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) ffc0c304: 3d 40 00 00 lis r10,0 ffc0c308: 81 0a 27 8c lwz r8,10124(r10) ffc0c30c: 7f 89 40 00 cmpw cr7,r9,r8 ffc0c310: 41 9e 00 18 beq- cr7,ffc0c328 <_Thread_Yield_processor+0x84><== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; ffc0c314: 39 60 00 01 li r11,1 ffc0c318: 3d 20 00 00 lis r9,0 ffc0c31c: 99 69 27 c0 stb r11,10176(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0c320: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); } ffc0c324: 4e 80 00 20 blr _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; ffc0c328: 81 2b 00 00 lwz r9,0(r11) ffc0c32c: 91 2a 27 8c stw r9,10124(r10) ffc0c330: 4b ff ff e4 b ffc0c314 <_Thread_Yield_processor+0x70> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) ffc0c334: 3d 60 00 00 lis r11,0 ffc0c338: 81 6b 27 8c lwz r11,10124(r11) ffc0c33c: 7f 89 58 00 cmpw cr7,r9,r11 ffc0c340: 40 9e ff d4 bne+ cr7,ffc0c314 <_Thread_Yield_processor+0x70><== NEVER TAKEN ffc0c344: 4b ff ff dc b ffc0c320 <_Thread_Yield_processor+0x7c> =============================================================================== ffc0b90c <_Thread_queue_Enqueue_priority>: Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; ffc0b90c: 80 04 00 14 lwz r0,20(r4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0b910: 39 04 00 3c addi r8,r4,60 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { ffc0b914: 94 21 ff f0 stwu r1,-16(r1) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc0b918: 39 64 00 38 addi r11,r4,56 priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) ffc0b91c: 70 09 00 20 andi. r9,r0,32 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; ffc0b920: 54 0a d1 be rlwinm r10,r0,26,6,31 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0b924: 91 04 00 38 stw r8,56(r4) ffc0b928: 1d 4a 00 0c mulli r10,r10,12 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { ffc0b92c: 93 e1 00 0c stw r31,12(r1) the_chain->permanent_null = NULL; ffc0b930: 39 00 00 00 li r8,0 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; ffc0b934: 81 23 00 38 lwz r9,56(r3) _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; ffc0b938: 7d 43 52 14 add r10,r3,r10 ffc0b93c: 91 04 00 3c stw r8,60(r4) the_chain->last = _Chain_Head(the_chain); ffc0b940: 91 64 00 40 stw r11,64(r4) block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) ffc0b944: 40 82 00 7c bne- ffc0b9c0 <_Thread_queue_Enqueue_priority+0xb4> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0b948: 39 8a 00 04 addi r12,r10,4 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b94c: 7c c0 00 a6 mfmsr r6 ffc0b950: 7d 70 42 a6 mfsprg r11,0 ffc0b954: 7c cb 58 78 andc r11,r6,r11 ffc0b958: 7d 60 01 24 mtmsr r11 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; ffc0b95c: 81 6a 00 00 lwz r11,0(r10) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { ffc0b960: 7f 8b 60 00 cmpw cr7,r11,r12 ffc0b964: 40 be 00 2c bne+ cr7,ffc0b990 <_Thread_queue_Enqueue_priority+0x84> ffc0b968: 48 00 01 78 b ffc0bae0 <_Thread_queue_Enqueue_priority+0x1d4> static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0b96c: 7c e0 00 a6 mfmsr r7 ffc0b970: 7c c0 01 24 mtmsr r6 ffc0b974: 7c e0 01 24 mtmsr r7 search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { ffc0b978: 80 eb 00 10 lwz r7,16(r11) ffc0b97c: 7d 3f 38 39 and. r31,r9,r7 ffc0b980: 41 82 00 f4 beq- ffc0ba74 <_Thread_queue_Enqueue_priority+0x168><== NEVER TAKEN _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; ffc0b984: 81 6b 00 00 lwz r11,0(r11) restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { ffc0b988: 7f 8b 60 00 cmpw cr7,r11,r12 ffc0b98c: 41 9e 00 10 beq- cr7,ffc0b99c <_Thread_queue_Enqueue_priority+0x90> search_priority = search_thread->current_priority; ffc0b990: 81 0b 00 14 lwz r8,20(r11) if ( priority <= search_priority ) ffc0b994: 7f 80 40 40 cmplw cr7,r0,r8 ffc0b998: 41 9d ff d4 bgt+ cr7,ffc0b96c <_Thread_queue_Enqueue_priority+0x60> restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { ffc0b99c: 7c ca 33 78 mr r10,r6 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != ffc0b9a0: 81 23 00 30 lwz r9,48(r3) ffc0b9a4: 2f 89 00 01 cmpwi cr7,r9,1 ffc0b9a8: 41 9e 00 d4 beq- cr7,ffc0ba7c <_Thread_queue_Enqueue_priority+0x170> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; ffc0b9ac: 91 45 00 00 stw r10,0(r5) return the_thread_queue->sync_state; ffc0b9b0: 7d 23 4b 78 mr r3,r9 } ffc0b9b4: 83 e1 00 0c lwz r31,12(r1) ffc0b9b8: 38 21 00 10 addi r1,r1,16 ffc0b9bc: 4e 80 00 20 blr ffc0b9c0: 3d 80 00 00 lis r12,0 ffc0b9c4: 39 8c 26 a4 addi r12,r12,9892 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; ffc0b9c8: 89 0c 00 00 lbz r8,0(r12) ffc0b9cc: 39 08 00 01 addi r8,r8,1 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b9d0: 7c c0 00 a6 mfmsr r6 ffc0b9d4: 7d 70 42 a6 mfsprg r11,0 ffc0b9d8: 7c cb 58 78 andc r11,r6,r11 ffc0b9dc: 7d 60 01 24 mtmsr r11 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; ffc0b9e0: 81 6a 00 08 lwz r11,8(r10) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { ffc0b9e4: 7f 8b 50 00 cmpw cr7,r11,r10 ffc0b9e8: 40 be 00 2c bne+ cr7,ffc0ba14 <_Thread_queue_Enqueue_priority+0x108> ffc0b9ec: 48 00 00 34 b ffc0ba20 <_Thread_queue_Enqueue_priority+0x114> static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0b9f0: 7c e0 00 a6 mfmsr r7 ffc0b9f4: 7c c0 01 24 mtmsr r6 ffc0b9f8: 7c e0 01 24 mtmsr r7 search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { ffc0b9fc: 80 eb 00 10 lwz r7,16(r11) ffc0ba00: 7d 3f 38 39 and. r31,r9,r7 ffc0ba04: 41 82 00 68 beq- ffc0ba6c <_Thread_queue_Enqueue_priority+0x160> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) ffc0ba08: 81 6b 00 04 lwz r11,4(r11) restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { ffc0ba0c: 7f 8b 50 00 cmpw cr7,r11,r10 ffc0ba10: 41 9e 00 10 beq- cr7,ffc0ba20 <_Thread_queue_Enqueue_priority+0x114> search_priority = search_thread->current_priority; ffc0ba14: 81 0b 00 14 lwz r8,20(r11) if ( priority >= search_priority ) ffc0ba18: 7f 80 40 40 cmplw cr7,r0,r8 ffc0ba1c: 41 9c ff d4 blt+ cr7,ffc0b9f0 <_Thread_queue_Enqueue_priority+0xe4> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != ffc0ba20: 81 23 00 30 lwz r9,48(r3) restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { ffc0ba24: 7c ca 33 78 mr r10,r6 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != ffc0ba28: 2f 89 00 01 cmpwi cr7,r9,1 ffc0ba2c: 40 9e ff 80 bne+ cr7,ffc0b9ac <_Thread_queue_Enqueue_priority+0xa0> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) ffc0ba30: 7f 80 40 00 cmpw cr7,r0,r8 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc0ba34: 38 00 00 00 li r0,0 ffc0ba38: 90 03 00 30 stw r0,48(r3) if ( priority == search_priority ) ffc0ba3c: 41 9e 00 7c beq- cr7,ffc0bab8 <_Thread_queue_Enqueue_priority+0x1ac> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; ffc0ba40: 81 2b 00 00 lwz r9,0(r11) the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; ffc0ba44: 91 64 00 04 stw r11,4(r4) search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; ffc0ba48: 91 24 00 00 stw r9,0(r4) the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; ffc0ba4c: 90 64 00 44 stw r3,68(r4) next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; ffc0ba50: 90 8b 00 00 stw r4,0(r11) next_node->previous = the_node; ffc0ba54: 90 89 00 04 stw r4,4(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ba58: 7c c0 01 24 mtmsr r6 ffc0ba5c: 38 60 00 01 li r3,1 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } ffc0ba60: 83 e1 00 0c lwz r31,12(r1) ffc0ba64: 38 21 00 10 addi r1,r1,16 ffc0ba68: 4e 80 00 20 blr ffc0ba6c: 7c c0 01 24 mtmsr r6 ffc0ba70: 4b ff ff 58 b ffc0b9c8 <_Thread_queue_Enqueue_priority+0xbc> ffc0ba74: 7c c0 01 24 mtmsr r6 <== NOT EXECUTED ffc0ba78: 4b ff fe d4 b ffc0b94c <_Thread_queue_Enqueue_priority+0x40><== NOT EXECUTED THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) ffc0ba7c: 7f 80 40 00 cmpw cr7,r0,r8 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc0ba80: 38 00 00 00 li r0,0 ffc0ba84: 90 03 00 30 stw r0,48(r3) if ( priority == search_priority ) ffc0ba88: 41 9e 00 30 beq- cr7,ffc0bab8 <_Thread_queue_Enqueue_priority+0x1ac> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; ffc0ba8c: 81 2b 00 04 lwz r9,4(r11) the_node = (Chain_Node *) the_thread; the_node->next = search_node; ffc0ba90: 91 64 00 00 stw r11,0(r4) the_node->previous = previous_node; ffc0ba94: 91 24 00 04 stw r9,4(r4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; ffc0ba98: 90 64 00 44 stw r3,68(r4) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; ffc0ba9c: 90 89 00 00 stw r4,0(r9) search_node->previous = the_node; ffc0baa0: 90 8b 00 04 stw r4,4(r11) ffc0baa4: 7c c0 01 24 mtmsr r6 ffc0baa8: 38 60 00 01 li r3,1 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } ffc0baac: 83 e1 00 0c lwz r31,12(r1) ffc0bab0: 38 21 00 10 addi r1,r1,16 ffc0bab4: 4e 80 00 20 blr ffc0bab8: 39 6b 00 3c addi r11,r11,60 the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; ffc0babc: 90 64 00 44 stw r3,68(r4) _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; ffc0bac0: 81 2b 00 04 lwz r9,4(r11) the_node = (Chain_Node *) the_thread; the_node->next = search_node; ffc0bac4: 91 64 00 00 stw r11,0(r4) the_node->previous = previous_node; ffc0bac8: 91 24 00 04 stw r9,4(r4) previous_node->next = the_node; ffc0bacc: 90 89 00 00 stw r4,0(r9) search_node->previous = the_node; ffc0bad0: 90 8b 00 04 stw r4,4(r11) ffc0bad4: 7d 40 01 24 mtmsr r10 ffc0bad8: 38 60 00 01 li r3,1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc0badc: 4b ff fe d8 b ffc0b9b4 <_Thread_queue_Enqueue_priority+0xa8> restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { ffc0bae0: 7c ca 33 78 mr r10,r6 ffc0bae4: 39 00 ff ff li r8,-1 ffc0bae8: 4b ff fe b8 b ffc0b9a0 <_Thread_queue_Enqueue_priority+0x94> =============================================================================== ffc0bbd4 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0bbd4: 94 21 ff d8 stwu r1,-40(r1) ffc0bbd8: 7c 08 02 a6 mflr r0 ffc0bbdc: 93 e1 00 24 stw r31,36(r1) /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) ffc0bbe0: 7c 7f 1b 79 mr. r31,r3 void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0bbe4: 93 c1 00 20 stw r30,32(r1) ffc0bbe8: 7c 9e 23 78 mr r30,r4 ffc0bbec: 90 01 00 2c stw r0,44(r1) ffc0bbf0: 93 a1 00 1c stw r29,28(r1) /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) ffc0bbf4: 41 82 00 10 beq- ffc0bc04 <_Thread_queue_Requeue+0x30> <== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { ffc0bbf8: 80 1f 00 34 lwz r0,52(r31) ffc0bbfc: 2f 80 00 01 cmpwi cr7,r0,1 ffc0bc00: 41 9e 00 20 beq- cr7,ffc0bc20 <_Thread_queue_Requeue+0x4c><== ALWAYS TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } ffc0bc04: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc0bc08: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc0bc0c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0bc10: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc0bc14: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc0bc18: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc0bc1c: 4e 80 00 20 blr <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0bc20: 7f a0 00 a6 mfmsr r29 ffc0bc24: 7d 30 42 a6 mfsprg r9,0 ffc0bc28: 7f a9 48 78 andc r9,r29,r9 ffc0bc2c: 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 ) ) { ffc0bc30: 3d 60 00 03 lis r11,3 ffc0bc34: 81 24 00 10 lwz r9,16(r4) ffc0bc38: 61 6b be e0 ori r11,r11,48864 ffc0bc3c: 7d 6a 48 39 and. r10,r11,r9 ffc0bc40: 40 82 00 24 bne- ffc0bc64 <_Thread_queue_Requeue+0x90> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0bc44: 7f a0 01 24 mtmsr r29 <== NOT EXECUTED _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } ffc0bc48: 80 01 00 2c lwz r0,44(r1) ffc0bc4c: 83 a1 00 1c lwz r29,28(r1) ffc0bc50: 7c 08 03 a6 mtlr r0 ffc0bc54: 83 c1 00 20 lwz r30,32(r1) ffc0bc58: 83 e1 00 24 lwz r31,36(r1) ffc0bc5c: 38 21 00 28 addi r1,r1,40 ffc0bc60: 4e 80 00 20 blr ffc0bc64: 90 1f 00 30 stw r0,48(r31) ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); ffc0bc68: 38 a0 00 01 li r5,1 ffc0bc6c: 48 00 43 c5 bl ffc10030 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); ffc0bc70: 7f e3 fb 78 mr r3,r31 ffc0bc74: 7f c4 f3 78 mr r4,r30 ffc0bc78: 38 a1 00 08 addi r5,r1,8 ffc0bc7c: 4b ff fc 91 bl ffc0b90c <_Thread_queue_Enqueue_priority> ffc0bc80: 7f a0 01 24 mtmsr r29 ffc0bc84: 4b ff ff c4 b ffc0bc48 <_Thread_queue_Requeue+0x74> =============================================================================== ffc0bc88 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0bc88: 94 21 ff e8 stwu r1,-24(r1) ffc0bc8c: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0bc90: 38 81 00 08 addi r4,r1,8 void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0bc94: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0bc98: 4b ff f5 29 bl ffc0b1c0 <_Thread_Get> switch ( location ) { ffc0bc9c: 80 01 00 08 lwz r0,8(r1) ffc0bca0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0bca4: 40 9e 00 18 bne- cr7,ffc0bcbc <_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 ); ffc0bca8: 48 00 44 9d bl ffc10144 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0bcac: 3d 20 00 00 lis r9,0 ffc0bcb0: 81 69 27 70 lwz r11,10096(r9) ffc0bcb4: 38 0b ff ff addi r0,r11,-1 ffc0bcb8: 90 09 27 70 stw r0,10096(r9) _Thread_Unnest_dispatch(); break; } } ffc0bcbc: 80 01 00 1c lwz r0,28(r1) ffc0bcc0: 38 21 00 18 addi r1,r1,24 ffc0bcc4: 7c 08 03 a6 mtlr r0 ffc0bcc8: 4e 80 00 20 blr =============================================================================== ffc1bb04 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1bb04: 94 21 ff 98 stwu r1,-104(r1) ffc1bb08: 7c 08 02 a6 mflr r0 ffc1bb0c: 92 a1 00 3c stw r21,60(r1) Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc1bb10: 3a a1 00 08 addi r21,r1,8 ffc1bb14: 90 01 00 6c stw r0,108(r1) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc1bb18: 38 00 00 00 li r0,0 ffc1bb1c: 92 e1 00 44 stw r23,68(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc1bb20: 3a e1 00 18 addi r23,r1,24 ffc1bb24: 93 41 00 50 stw r26,80(r1) ffc1bb28: 3b 41 00 0c addi r26,r1,12 ffc1bb2c: 93 81 00 58 stw r28,88(r1) ffc1bb30: 3b 81 00 14 addi r28,r1,20 ffc1bb34: 92 81 00 38 stw r20,56(r1) ffc1bb38: 3e 80 00 00 lis r20,0 ffc1bb3c: 3a 94 28 68 addi r20,r20,10344 ffc1bb40: 93 01 00 48 stw r24,72(r1) ffc1bb44: 3f 00 00 00 lis r24,0 ffc1bb48: 3b 18 28 c0 addi r24,r24,10432 ffc1bb4c: 93 21 00 4c stw r25,76(r1) ffc1bb50: 3f 20 00 00 lis r25,0 ffc1bb54: 3b 39 28 88 addi r25,r25,10376 ffc1bb58: 93 c1 00 60 stw r30,96(r1) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc1bb5c: 90 01 00 18 stw r0,24(r1) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc1bb60: 93 41 00 08 stw r26,8(r1) the_chain->permanent_null = NULL; ffc1bb64: 90 01 00 0c stw r0,12(r1) the_chain->last = _Chain_Head(the_chain); ffc1bb68: 92 a1 00 10 stw r21,16(r1) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc1bb6c: 92 e1 00 14 stw r23,20(r1) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc1bb70: 93 81 00 1c stw r28,28(r1) ffc1bb74: 92 01 00 28 stw r16,40(r1) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc1bb78: 3a 03 00 08 addi r16,r3,8 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1bb7c: 92 21 00 2c stw r17,44(r1) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc1bb80: 3a 23 00 40 addi r17,r3,64 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1bb84: 92 41 00 30 stw r18,48(r1) * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; ffc1bb88: 3a 40 00 00 li r18,0 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1bb8c: 92 61 00 34 stw r19,52(r1) _Thread_Set_state( ts->thread, STATES_DELAYING ); _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; ffc1bb90: 3a 60 00 01 li r19,1 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1bb94: 92 c1 00 40 stw r22,64(r1) * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; ffc1bb98: 3a c0 00 00 li r22,0 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1bb9c: 93 61 00 54 stw r27,84(r1) /* * 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 ); ffc1bba0: 3b 63 00 68 addi r27,r3,104 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1bba4: 93 a1 00 5c stw r29,92(r1) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1bba8: 3b a3 00 30 addi r29,r3,48 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc1bbac: 93 e1 00 64 stw r31,100(r1) ffc1bbb0: 7c 7f 1b 78 mr r31,r3 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; ffc1bbb4: 92 bf 00 78 stw r21,120(r31) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1bbb8: 7f a3 eb 78 mr r3,r29 ffc1bbbc: 7f 85 e3 78 mr r5,r28 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc1bbc0: 80 18 00 00 lwz r0,0(r24) /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; ffc1bbc4: 80 9f 00 3c lwz r4,60(r31) watchdogs->last_snapshot = snapshot; ffc1bbc8: 90 1f 00 3c stw r0,60(r31) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1bbcc: 7c 84 00 50 subf r4,r4,r0 ffc1bbd0: 48 00 54 b5 bl ffc21084 <_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(); ffc1bbd4: 83 d9 00 00 lwz r30,0(r25) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; ffc1bbd8: 80 9f 00 74 lwz r4,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 ) { ffc1bbdc: 7f 9e 20 40 cmplw cr7,r30,r4 ffc1bbe0: 41 9d 00 98 bgt- cr7,ffc1bc78 <_Timer_server_Body+0x174> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { ffc1bbe4: 41 9c 00 a8 blt- cr7,ffc1bc8c <_Timer_server_Body+0x188> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; ffc1bbe8: 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 ); ffc1bbec: 80 7f 00 78 lwz r3,120(r31) ffc1bbf0: 48 00 0c 09 bl ffc1c7f8 <_Chain_Get> if ( timer == NULL ) { ffc1bbf4: 2c 03 00 00 cmpwi r3,0 ffc1bbf8: 41 82 00 34 beq- ffc1bc2c <_Timer_server_Body+0x128> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1bbfc: 80 03 00 38 lwz r0,56(r3) ffc1bc00: 2f 80 00 01 cmpwi cr7,r0,1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc1bc04: 2f 00 00 03 cmpwi cr6,r0,3 static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc1bc08: 41 9e 00 98 beq- cr7,ffc1bca0 <_Timer_server_Body+0x19c> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc1bc0c: 40 9a ff e0 bne+ cr6,ffc1bbec <_Timer_server_Body+0xe8> <== NEVER TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc1bc10: 38 83 00 10 addi r4,r3,16 ffc1bc14: 7f 63 db 78 mr r3,r27 ffc1bc18: 48 00 55 29 bl ffc21140 <_Watchdog_Insert> } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); ffc1bc1c: 80 7f 00 78 lwz r3,120(r31) ffc1bc20: 48 00 0b d9 bl ffc1c7f8 <_Chain_Get> if ( timer == NULL ) { ffc1bc24: 2c 03 00 00 cmpwi r3,0 ffc1bc28: 40 82 ff d4 bne+ ffc1bbfc <_Timer_server_Body+0xf8> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1bc2c: 7d 20 00 a6 mfmsr r9 ffc1bc30: 7c 10 42 a6 mfsprg r0,0 ffc1bc34: 7d 20 00 78 andc r0,r9,r0 ffc1bc38: 7c 00 01 24 mtmsr r0 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ffc1bc3c: 80 01 00 08 lwz r0,8(r1) ffc1bc40: 7f 9a 00 00 cmpw cr7,r26,r0 ffc1bc44: 41 9e 00 6c beq- cr7,ffc1bcb0 <_Timer_server_Body+0x1ac><== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1bc48: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc1bc4c: 80 18 00 00 lwz r0,0(r24) <== NOT EXECUTED */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1bc50: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; ffc1bc54: 80 9f 00 3c lwz r4,60(r31) <== NOT EXECUTED watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1bc58: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; ffc1bc5c: 90 1f 00 3c stw r0,60(r31) <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1bc60: 7c 84 00 50 subf r4,r4,r0 <== NOT EXECUTED ffc1bc64: 48 00 54 21 bl ffc21084 <_Watchdog_Adjust_to_chain> <== NOT EXECUTED static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc1bc68: 83 d9 00 00 lwz r30,0(r25) <== NOT EXECUTED Watchdog_Interval last_snapshot = watchdogs->last_snapshot; ffc1bc6c: 80 9f 00 74 lwz r4,116(r31) <== NOT EXECUTED /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { ffc1bc70: 7f 9e 20 40 cmplw cr7,r30,r4 <== NOT EXECUTED ffc1bc74: 40 9d ff 70 ble+ cr7,ffc1bbe4 <_Timer_server_Body+0xe0> <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc1bc78: 7c 84 f0 50 subf r4,r4,r30 ffc1bc7c: 7f 63 db 78 mr r3,r27 ffc1bc80: 7f 85 e3 78 mr r5,r28 ffc1bc84: 48 00 54 01 bl ffc21084 <_Watchdog_Adjust_to_chain> ffc1bc88: 4b ff ff 60 b ffc1bbe8 <_Timer_server_Body+0xe4> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); ffc1bc8c: 7c be 20 50 subf r5,r30,r4 ffc1bc90: 7f 63 db 78 mr r3,r27 ffc1bc94: 38 80 00 01 li r4,1 ffc1bc98: 48 00 52 cd bl ffc20f64 <_Watchdog_Adjust> ffc1bc9c: 4b ff ff 4c b ffc1bbe8 <_Timer_server_Body+0xe4> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc1bca0: 38 83 00 10 addi r4,r3,16 ffc1bca4: 7f a3 eb 78 mr r3,r29 ffc1bca8: 48 00 54 99 bl ffc21140 <_Watchdog_Insert> ffc1bcac: 4b ff ff 40 b ffc1bbec <_Timer_server_Body+0xe8> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; ffc1bcb0: 90 7f 00 78 stw r3,120(r31) ffc1bcb4: 7d 20 01 24 mtmsr r9 _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { ffc1bcb8: 80 01 00 14 lwz r0,20(r1) ffc1bcbc: 7f 97 00 00 cmpw cr7,r23,r0 ffc1bcc0: 40 be 00 30 bne+ cr7,ffc1bcf0 <_Timer_server_Body+0x1ec> ffc1bcc4: 48 00 00 50 b ffc1bd14 <_Timer_server_Body+0x210> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; ffc1bcc8: 81 69 00 00 lwz r11,0(r9) * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; ffc1bccc: 92 c9 00 08 stw r22,8(r9) the_chain->first = new_first; ffc1bcd0: 91 61 00 14 stw r11,20(r1) new_first->previous = _Chain_Head(the_chain); ffc1bcd4: 93 8b 00 04 stw r28,4(r11) ffc1bcd8: 7c 00 01 24 mtmsr r0 /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); ffc1bcdc: 80 09 00 1c lwz r0,28(r9) ffc1bce0: 80 89 00 24 lwz r4,36(r9) ffc1bce4: 80 69 00 20 lwz r3,32(r9) ffc1bce8: 7c 09 03 a6 mtctr r0 ffc1bcec: 4e 80 04 21 bctrl static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1bcf0: 7c 00 00 a6 mfmsr r0 ffc1bcf4: 7d 30 42 a6 mfsprg r9,0 ffc1bcf8: 7c 09 48 78 andc r9,r0,r9 ffc1bcfc: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc1bd00: 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)) ffc1bd04: 7f 97 48 00 cmpw cr7,r23,r9 ffc1bd08: 40 9e ff c0 bne+ cr7,ffc1bcc8 <_Timer_server_Body+0x1c4> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1bd0c: 7c 00 01 24 mtmsr r0 ffc1bd10: 4b ff fe a4 b ffc1bbb4 <_Timer_server_Body+0xb0> } } else { ts->active = false; ffc1bd14: 9a 5f 00 7c stb r18,124(r31) ffc1bd18: 80 14 00 00 lwz r0,0(r20) ffc1bd1c: 30 00 00 01 addic r0,r0,1 ffc1bd20: 90 14 00 00 stw r0,0(r20) /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); ffc1bd24: 80 7f 00 00 lwz r3,0(r31) ffc1bd28: 38 80 00 08 li r4,8 ffc1bd2c: 48 00 45 c9 bl ffc202f4 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); ffc1bd30: 7f e3 fb 78 mr r3,r31 ffc1bd34: 4b ff fc a9 bl ffc1b9dc <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); ffc1bd38: 7f e3 fb 78 mr r3,r31 ffc1bd3c: 4b ff fd 35 bl ffc1ba70 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); ffc1bd40: 48 00 38 61 bl ffc1f5a0 <_Thread_Enable_dispatch> ts->active = true; ffc1bd44: 9a 7f 00 7c stb r19,124(r31) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc1bd48: 7e 03 83 78 mr r3,r16 ffc1bd4c: 48 00 55 bd bl ffc21308 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc1bd50: 7e 23 8b 78 mr r3,r17 ffc1bd54: 48 00 55 b5 bl ffc21308 <_Watchdog_Remove> ffc1bd58: 4b ff fe 5c b ffc1bbb4 <_Timer_server_Body+0xb0> =============================================================================== ffc0c5ec <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0c5ec: 94 21 ff e0 stwu r1,-32(r1) ffc0c5f0: 7c 08 02 a6 mflr r0 ffc0c5f4: 93 c1 00 18 stw r30,24(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c5f8: 3f c0 00 00 lis r30,0 ffc0c5fc: 3b de 2e 20 addi r30,r30,11808 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0c600: 93 e1 00 1c stw r31,28(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c604: 83 fe 00 08 lwz r31,8(r30) void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0c608: 93 61 00 0c stw r27,12(r1) ffc0c60c: 7c 7b 1b 78 mr r27,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c610: 7f 9f f0 00 cmpw cr7,r31,r30 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0c614: 93 81 00 10 stw r28,16(r1) ffc0c618: 7c 9c 23 78 mr r28,r4 ffc0c61c: 93 a1 00 14 stw r29,20(r1) ffc0c620: 7c bd 2b 78 mr r29,r5 ffc0c624: 90 01 00 24 stw r0,36(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c628: 41 9e 00 30 beq- cr7,ffc0c658 <_User_extensions_Fatal+0x6c><== NEVER TAKEN !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) ffc0c62c: 80 1f 00 30 lwz r0,48(r31) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0c630: 7f 63 db 78 mr r3,r27 ffc0c634: 7f 84 e3 78 mr r4,r28 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) ffc0c638: 2f 80 00 00 cmpwi cr7,r0,0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0c63c: 7f a5 eb 78 mr r5,r29 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) ffc0c640: 41 9e 00 0c beq- cr7,ffc0c64c <_User_extensions_Fatal+0x60> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); ffc0c644: 7c 09 03 a6 mtctr r0 ffc0c648: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { ffc0c64c: 83 ff 00 04 lwz r31,4(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c650: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0c654: 40 9e ff d8 bne+ cr7,ffc0c62c <_User_extensions_Fatal+0x40> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } ffc0c658: 80 01 00 24 lwz r0,36(r1) ffc0c65c: 83 61 00 0c lwz r27,12(r1) ffc0c660: 7c 08 03 a6 mtlr r0 ffc0c664: 83 81 00 10 lwz r28,16(r1) ffc0c668: 83 a1 00 14 lwz r29,20(r1) ffc0c66c: 83 c1 00 18 lwz r30,24(r1) ffc0c670: 83 e1 00 1c lwz r31,28(r1) ffc0c674: 38 21 00 20 addi r1,r1,32 ffc0c678: 4e 80 00 20 blr =============================================================================== ffc0c3f8 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { ffc0c3f8: 94 21 ff e8 stwu r1,-24(r1) ffc0c3fc: 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; ffc0c400: 3d 40 00 00 lis r10,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0c404: 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; ffc0c408: 39 4a 20 a0 addi r10,r10,8352 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0c40c: 3c e0 00 00 lis r7,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0c410: 93 a1 00 0c stw r29,12(r1) ffc0c414: 3d 00 00 00 lis r8,0 ffc0c418: 39 27 2e 20 addi r9,r7,11808 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; ffc0c41c: 83 aa 00 3c lwz r29,60(r10) ffc0c420: 39 68 2c 94 addi r11,r8,11412 the_chain->permanent_null = NULL; ffc0c424: 38 00 00 00 li r0,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0c428: 93 c1 00 10 stw r30,16(r1) initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { ffc0c42c: 2f 9d 00 00 cmpwi cr7,r29,0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc0c430: 38 a9 00 04 addi r5,r9,4 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0c434: 93 81 00 08 stw r28,8(r1) ffc0c438: 38 cb 00 04 addi r6,r11,4 ffc0c43c: 93 e1 00 14 stw r31,20(r1) ffc0c440: 90 a7 2e 20 stw r5,11808(r7) ffc0c444: 90 c8 2c 94 stw r6,11412(r8) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc0c448: 91 29 00 08 stw r9,8(r9) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc0c44c: 90 0b 00 04 stw r0,4(r11) the_chain->last = _Chain_Head(the_chain); ffc0c450: 91 6b 00 08 stw r11,8(r11) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc0c454: 90 09 00 04 stw r0,4(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; ffc0c458: 83 ca 00 38 lwz r30,56(r10) initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { ffc0c45c: 41 9e 00 8c beq- cr7,ffc0c4e8 <_User_extensions_Handler_initialization+0xf0> extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ffc0c460: 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 *) ffc0c464: 7f 83 e3 78 mr r3,r28 ffc0c468: 48 00 07 a1 bl ffc0cc08 <_Workspace_Allocate_or_fatal_error> _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0c46c: 7f 85 e3 78 mr r5,r28 ffc0c470: 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 *) ffc0c474: 7c 7f 1b 78 mr r31,r3 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0c478: 48 00 7a e5 bl ffc13f5c extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0c47c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0c480: 41 9e 00 68 beq- cr7,ffc0c4e8 <_User_extensions_Handler_initialization+0xf0><== NEVER TAKEN ffc0c484: 3b 80 00 00 li r28,0 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; ffc0c488: 7f a9 eb 78 mr r9,r29 ffc0c48c: 57 80 28 34 rlwinm r0,r28,5,0,26 ffc0c490: 7d 09 00 6e lwzux r8,r9,r0 _User_extensions_Add_set( extension ); ffc0c494: 7f e3 fb 78 mr r3,r31 ffc0c498: 3b 9c 00 01 addi r28,r28,1 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; ffc0c49c: 81 49 00 04 lwz r10,4(r9) ffc0c4a0: 81 69 00 08 lwz r11,8(r9) ffc0c4a4: 80 09 00 0c lwz r0,12(r9) ffc0c4a8: 91 1f 00 14 stw r8,20(r31) ffc0c4ac: 91 5f 00 18 stw r10,24(r31) ffc0c4b0: 91 7f 00 1c stw r11,28(r31) ffc0c4b4: 90 1f 00 20 stw r0,32(r31) ffc0c4b8: 80 09 00 1c lwz r0,28(r9) ffc0c4bc: 81 49 00 10 lwz r10,16(r9) ffc0c4c0: 81 69 00 14 lwz r11,20(r9) ffc0c4c4: 81 29 00 18 lwz r9,24(r9) ffc0c4c8: 91 5f 00 24 stw r10,36(r31) ffc0c4cc: 91 7f 00 28 stw r11,40(r31) ffc0c4d0: 91 3f 00 2c stw r9,44(r31) ffc0c4d4: 90 1f 00 30 stw r0,48(r31) _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; ffc0c4d8: 3b ff 00 34 addi r31,r31,52 _User_extensions_Add_set( extension ); ffc0c4dc: 48 00 3e e1 bl ffc103bc <_User_extensions_Add_set> extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0c4e0: 7f 9e e0 40 cmplw cr7,r30,r28 ffc0c4e4: 41 9d ff a4 bgt+ cr7,ffc0c488 <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } ffc0c4e8: 80 01 00 1c lwz r0,28(r1) ffc0c4ec: 83 81 00 08 lwz r28,8(r1) ffc0c4f0: 7c 08 03 a6 mtlr r0 ffc0c4f4: 83 a1 00 0c lwz r29,12(r1) ffc0c4f8: 83 c1 00 10 lwz r30,16(r1) ffc0c4fc: 83 e1 00 14 lwz r31,20(r1) ffc0c500: 38 21 00 18 addi r1,r1,24 ffc0c504: 4e 80 00 20 blr =============================================================================== ffc0c508 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0c508: 94 21 ff e8 stwu r1,-24(r1) ffc0c50c: 7c 08 02 a6 mflr r0 ffc0c510: 93 c1 00 10 stw r30,16(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0c514: 3f c0 00 00 lis r30,0 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0c518: 93 e1 00 14 stw r31,20(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0c51c: 83 fe 2e 20 lwz r31,11808(r30) ffc0c520: 3b de 2e 20 addi r30,r30,11808 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0c524: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0c528: 93 a1 00 0c stw r29,12(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0c52c: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { ffc0c530: 90 01 00 1c stw r0,28(r1) ffc0c534: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0c538: 41 9e 00 28 beq- cr7,ffc0c560 <_User_extensions_Thread_begin+0x58><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) ffc0c53c: 80 1f 00 28 lwz r0,40(r31) (*the_extension->Callouts.thread_begin)( executing ); ffc0c540: 7f a3 eb 78 mr r3,r29 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) ffc0c544: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c548: 41 9e 00 0c beq- cr7,ffc0c554 <_User_extensions_Thread_begin+0x4c> (*the_extension->Callouts.thread_begin)( executing ); ffc0c54c: 7c 09 03 a6 mtctr r0 ffc0c550: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0c554: 83 ff 00 00 lwz r31,0(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0c558: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0c55c: 40 9e ff e0 bne+ cr7,ffc0c53c <_User_extensions_Thread_begin+0x34> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } ffc0c560: 80 01 00 1c lwz r0,28(r1) ffc0c564: 83 a1 00 0c lwz r29,12(r1) ffc0c568: 7c 08 03 a6 mtlr r0 ffc0c56c: 83 c1 00 10 lwz r30,16(r1) ffc0c570: 83 e1 00 14 lwz r31,20(r1) ffc0c574: 38 21 00 18 addi r1,r1,24 ffc0c578: 4e 80 00 20 blr =============================================================================== ffc0c67c <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0c67c: 94 21 ff e8 stwu r1,-24(r1) ffc0c680: 7c 08 02 a6 mflr r0 ffc0c684: 93 c1 00 10 stw r30,16(r1) Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; ffc0c688: 3f c0 00 00 lis r30,0 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0c68c: 93 e1 00 14 stw r31,20(r1) Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; ffc0c690: 83 fe 2e 20 lwz r31,11808(r30) ffc0c694: 3b de 2e 20 addi r30,r30,11808 ffc0c698: 3b de 00 04 addi r30,r30,4 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0c69c: 93 a1 00 0c stw r29,12(r1) Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; ffc0c6a0: 7f 9f f0 00 cmpw cr7,r31,r30 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { ffc0c6a4: 90 01 00 1c stw r0,28(r1) ffc0c6a8: 7c 7d 1b 78 mr r29,r3 ffc0c6ac: 93 81 00 08 stw r28,8(r1) Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; ffc0c6b0: 41 9e 00 3c beq- cr7,ffc0c6ec <_User_extensions_Thread_create+0x70><== NEVER TAKEN the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( ffc0c6b4: 3f 80 00 00 lis r28,0 ffc0c6b8: 3b 9c 27 b0 addi r28,r28,10160 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { ffc0c6bc: 80 1f 00 14 lwz r0,20(r31) status = (*the_extension->Callouts.thread_create)( ffc0c6c0: 7f a4 eb 78 mr r4,r29 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { ffc0c6c4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c6c8: 41 9e 00 18 beq- cr7,ffc0c6e0 <_User_extensions_Thread_create+0x64> status = (*the_extension->Callouts.thread_create)( ffc0c6cc: 80 7c 00 00 lwz r3,0(r28) ffc0c6d0: 7c 09 03 a6 mtctr r0 ffc0c6d4: 4e 80 04 21 bctrl _Thread_Executing, the_thread ); if ( !status ) ffc0c6d8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c6dc: 41 9e 00 14 beq- cr7,ffc0c6f0 <_User_extensions_Thread_create+0x74> User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0c6e0: 83 ff 00 00 lwz r31,0(r31) { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; ffc0c6e4: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0c6e8: 40 9e ff d4 bne+ cr7,ffc0c6bc <_User_extensions_Thread_create+0x40> ffc0c6ec: 38 60 00 01 li r3,1 return false; } } return true; } ffc0c6f0: 80 01 00 1c lwz r0,28(r1) ffc0c6f4: 83 81 00 08 lwz r28,8(r1) ffc0c6f8: 7c 08 03 a6 mtlr r0 ffc0c6fc: 83 a1 00 0c lwz r29,12(r1) ffc0c700: 83 c1 00 10 lwz r30,16(r1) ffc0c704: 83 e1 00 14 lwz r31,20(r1) ffc0c708: 38 21 00 18 addi r1,r1,24 ffc0c70c: 4e 80 00 20 blr =============================================================================== ffc0c710 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0c710: 94 21 ff e8 stwu r1,-24(r1) ffc0c714: 7c 08 02 a6 mflr r0 ffc0c718: 93 c1 00 10 stw r30,16(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c71c: 3f c0 00 00 lis r30,0 ffc0c720: 3b de 2e 20 addi r30,r30,11808 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0c724: 93 e1 00 14 stw r31,20(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c728: 83 fe 00 08 lwz r31,8(r30) #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0c72c: 93 a1 00 0c stw r29,12(r1) ffc0c730: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c734: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { ffc0c738: 90 01 00 1c stw r0,28(r1) ffc0c73c: 93 81 00 08 stw r28,8(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c740: 41 9e 00 34 beq- cr7,ffc0c774 <_User_extensions_Thread_delete+0x64><== NEVER TAKEN the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) (*the_extension->Callouts.thread_delete)( ffc0c744: 3f 80 00 00 lis r28,0 ffc0c748: 3b 9c 27 b0 addi r28,r28,10160 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) ffc0c74c: 80 1f 00 20 lwz r0,32(r31) (*the_extension->Callouts.thread_delete)( ffc0c750: 7f a4 eb 78 mr r4,r29 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) ffc0c754: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c758: 41 9e 00 10 beq- cr7,ffc0c768 <_User_extensions_Thread_delete+0x58> (*the_extension->Callouts.thread_delete)( ffc0c75c: 80 7c 00 00 lwz r3,0(r28) ffc0c760: 7c 09 03 a6 mtctr r0 ffc0c764: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { ffc0c768: 83 ff 00 04 lwz r31,4(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c76c: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0c770: 40 9e ff dc bne+ cr7,ffc0c74c <_User_extensions_Thread_delete+0x3c> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } ffc0c774: 80 01 00 1c lwz r0,28(r1) ffc0c778: 83 81 00 08 lwz r28,8(r1) ffc0c77c: 7c 08 03 a6 mtlr r0 ffc0c780: 83 a1 00 0c lwz r29,12(r1) ffc0c784: 83 c1 00 10 lwz r30,16(r1) ffc0c788: 83 e1 00 14 lwz r31,20(r1) ffc0c78c: 38 21 00 18 addi r1,r1,24 ffc0c790: 4e 80 00 20 blr =============================================================================== ffc0c57c <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0c57c: 94 21 ff e8 stwu r1,-24(r1) ffc0c580: 7c 08 02 a6 mflr r0 ffc0c584: 93 c1 00 10 stw r30,16(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c588: 3f c0 00 00 lis r30,0 ffc0c58c: 3b de 2e 20 addi r30,r30,11808 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0c590: 93 e1 00 14 stw r31,20(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c594: 83 fe 00 08 lwz r31,8(r30) } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0c598: 93 a1 00 0c stw r29,12(r1) ffc0c59c: 7c 7d 1b 78 mr r29,r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c5a0: 7f 9f f0 00 cmpw cr7,r31,r30 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { ffc0c5a4: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c5a8: 41 9e 00 28 beq- cr7,ffc0c5d0 <_User_extensions_Thread_exitted+0x54><== NEVER TAKEN !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) ffc0c5ac: 80 1f 00 2c lwz r0,44(r31) (*the_extension->Callouts.thread_exitted)( executing ); ffc0c5b0: 7f a3 eb 78 mr r3,r29 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) ffc0c5b4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c5b8: 41 9e 00 0c beq- cr7,ffc0c5c4 <_User_extensions_Thread_exitted+0x48> (*the_extension->Callouts.thread_exitted)( executing ); ffc0c5bc: 7c 09 03 a6 mtctr r0 ffc0c5c0: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { ffc0c5c4: 83 ff 00 04 lwz r31,4(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; ffc0c5c8: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0c5cc: 40 9e ff e0 bne+ cr7,ffc0c5ac <_User_extensions_Thread_exitted+0x30> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } ffc0c5d0: 80 01 00 1c lwz r0,28(r1) ffc0c5d4: 83 a1 00 0c lwz r29,12(r1) ffc0c5d8: 7c 08 03 a6 mtlr r0 ffc0c5dc: 83 c1 00 10 lwz r30,16(r1) ffc0c5e0: 83 e1 00 14 lwz r31,20(r1) ffc0c5e4: 38 21 00 18 addi r1,r1,24 ffc0c5e8: 4e 80 00 20 blr =============================================================================== ffc0d8c4 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0d8c4: 94 21 ff e8 stwu r1,-24(r1) ffc0d8c8: 7c 08 02 a6 mflr r0 ffc0d8cc: 93 c1 00 10 stw r30,16(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0d8d0: 3f c0 00 00 lis r30,0 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0d8d4: 93 e1 00 14 stw r31,20(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0d8d8: 83 fe 2e 80 lwz r31,11904(r30) ffc0d8dc: 3b de 2e 80 addi r30,r30,11904 ffc0d8e0: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0d8e4: 93 a1 00 0c stw r29,12(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0d8e8: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { ffc0d8ec: 90 01 00 1c stw r0,28(r1) ffc0d8f0: 7c 7d 1b 78 mr r29,r3 ffc0d8f4: 93 81 00 08 stw r28,8(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0d8f8: 41 9e 00 34 beq- cr7,ffc0d92c <_User_extensions_Thread_restart+0x68><== NEVER TAKEN the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) (*the_extension->Callouts.thread_restart)( ffc0d8fc: 3f 80 00 00 lis r28,0 ffc0d900: 3b 9c 27 fc addi r28,r28,10236 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) ffc0d904: 80 1f 00 1c lwz r0,28(r31) (*the_extension->Callouts.thread_restart)( ffc0d908: 7f a4 eb 78 mr r4,r29 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) ffc0d90c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d910: 41 9e 00 10 beq- cr7,ffc0d920 <_User_extensions_Thread_restart+0x5c> (*the_extension->Callouts.thread_restart)( ffc0d914: 80 7c 00 00 lwz r3,0(r28) ffc0d918: 7c 09 03 a6 mtctr r0 ffc0d91c: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0d920: 83 ff 00 00 lwz r31,0(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0d924: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0d928: 40 9e ff dc bne+ cr7,ffc0d904 <_User_extensions_Thread_restart+0x40> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } ffc0d92c: 80 01 00 1c lwz r0,28(r1) ffc0d930: 83 81 00 08 lwz r28,8(r1) ffc0d934: 7c 08 03 a6 mtlr r0 ffc0d938: 83 a1 00 0c lwz r29,12(r1) ffc0d93c: 83 c1 00 10 lwz r30,16(r1) ffc0d940: 83 e1 00 14 lwz r31,20(r1) ffc0d944: 38 21 00 18 addi r1,r1,24 ffc0d948: 4e 80 00 20 blr =============================================================================== ffc0c794 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0c794: 94 21 ff e8 stwu r1,-24(r1) ffc0c798: 7c 08 02 a6 mflr r0 ffc0c79c: 93 c1 00 10 stw r30,16(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0c7a0: 3f c0 00 00 lis r30,0 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0c7a4: 93 e1 00 14 stw r31,20(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0c7a8: 83 fe 2e 20 lwz r31,11808(r30) ffc0c7ac: 3b de 2e 20 addi r30,r30,11808 ffc0c7b0: 3b de 00 04 addi r30,r30,4 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0c7b4: 93 a1 00 0c stw r29,12(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0c7b8: 7f 9f f0 00 cmpw cr7,r31,r30 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { ffc0c7bc: 90 01 00 1c stw r0,28(r1) ffc0c7c0: 7c 7d 1b 78 mr r29,r3 ffc0c7c4: 93 81 00 08 stw r28,8(r1) Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0c7c8: 41 9e 00 34 beq- cr7,ffc0c7fc <_User_extensions_Thread_start+0x68><== NEVER TAKEN the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) (*the_extension->Callouts.thread_start)( ffc0c7cc: 3f 80 00 00 lis r28,0 ffc0c7d0: 3b 9c 27 b0 addi r28,r28,10160 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) ffc0c7d4: 80 1f 00 18 lwz r0,24(r31) (*the_extension->Callouts.thread_start)( ffc0c7d8: 7f a4 eb 78 mr r4,r29 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) ffc0c7dc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c7e0: 41 9e 00 10 beq- cr7,ffc0c7f0 <_User_extensions_Thread_start+0x5c> (*the_extension->Callouts.thread_start)( ffc0c7e4: 80 7c 00 00 lwz r3,0(r28) ffc0c7e8: 7c 09 03 a6 mtctr r0 ffc0c7ec: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { ffc0c7f0: 83 ff 00 00 lwz r31,0(r31) ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; ffc0c7f4: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0c7f8: 40 9e ff dc bne+ cr7,ffc0c7d4 <_User_extensions_Thread_start+0x40> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } ffc0c7fc: 80 01 00 1c lwz r0,28(r1) ffc0c800: 83 81 00 08 lwz r28,8(r1) ffc0c804: 7c 08 03 a6 mtlr r0 ffc0c808: 83 a1 00 0c lwz r29,12(r1) ffc0c80c: 83 c1 00 10 lwz r30,16(r1) ffc0c810: 83 e1 00 14 lwz r31,20(r1) ffc0c814: 38 21 00 18 addi r1,r1,24 ffc0c818: 4e 80 00 20 blr =============================================================================== ffc0c81c <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0c81c: 94 21 ff e8 stwu r1,-24(r1) ffc0c820: 7c 08 02 a6 mflr r0 ffc0c824: 93 c1 00 10 stw r30,16(r1) Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; ffc0c828: 3f c0 00 00 lis r30,0 void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0c82c: 93 e1 00 14 stw r31,20(r1) Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; ffc0c830: 83 fe 2c 94 lwz r31,11412(r30) ffc0c834: 3b de 2c 94 addi r30,r30,11412 ffc0c838: 3b de 00 04 addi r30,r30,4 void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0c83c: 93 81 00 08 stw r28,8(r1) Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; ffc0c840: 7f 9f f0 00 cmpw cr7,r31,r30 void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { ffc0c844: 93 a1 00 0c stw r29,12(r1) ffc0c848: 7c 7c 1b 78 mr r28,r3 ffc0c84c: 7c 9d 23 78 mr r29,r4 ffc0c850: 90 01 00 1c stw r0,28(r1) Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; ffc0c854: 41 9e 00 24 beq- cr7,ffc0c878 <_User_extensions_Thread_switch+0x5c><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); ffc0c858: 80 1f 00 08 lwz r0,8(r31) ffc0c85c: 7f 83 e3 78 mr r3,r28 ffc0c860: 7f a4 eb 78 mr r4,r29 ffc0c864: 7c 09 03 a6 mtctr r0 ffc0c868: 4e 80 04 21 bctrl Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { ffc0c86c: 83 ff 00 00 lwz r31,0(r31) ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; ffc0c870: 7f 9f f0 00 cmpw cr7,r31,r30 ffc0c874: 40 9e ff e4 bne+ cr7,ffc0c858 <_User_extensions_Thread_switch+0x3c> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } ffc0c878: 80 01 00 1c lwz r0,28(r1) ffc0c87c: 83 81 00 08 lwz r28,8(r1) ffc0c880: 7c 08 03 a6 mtlr r0 ffc0c884: 83 a1 00 0c lwz r29,12(r1) ffc0c888: 83 c1 00 10 lwz r30,16(r1) ffc0c88c: 83 e1 00 14 lwz r31,20(r1) ffc0c890: 38 21 00 18 addi r1,r1,24 ffc0c894: 4e 80 00 20 blr =============================================================================== ffc0eedc <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { ffc0eedc: 94 21 ff e0 stwu r1,-32(r1) ffc0eee0: 7c 08 02 a6 mflr r0 ffc0eee4: 90 01 00 24 stw r0,36(r1) ffc0eee8: 93 c1 00 18 stw r30,24(r1) ffc0eeec: 7c be 2b 78 mr r30,r5 ffc0eef0: 93 e1 00 1c stw r31,28(r1) ffc0eef4: 7c 7f 1b 78 mr r31,r3 ffc0eef8: 93 61 00 0c stw r27,12(r1) ffc0eefc: 93 81 00 10 stw r28,16(r1) ffc0ef00: 93 a1 00 14 stw r29,20(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0ef04: 7c 00 00 a6 mfmsr r0 ffc0ef08: 7d 30 42 a6 mfsprg r9,0 ffc0ef0c: 7c 09 48 78 andc r9,r0,r9 ffc0ef10: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc0ef14: 81 23 00 00 lwz r9,0(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0ef18: 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 ) ) { ffc0ef1c: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0ef20: 41 9e 00 6c beq- cr7,ffc0ef8c <_Watchdog_Adjust+0xb0> switch ( direction ) { ffc0ef24: 2f 84 00 00 cmpwi cr7,r4,0 ffc0ef28: 40 9e 00 8c bne- cr7,ffc0efb4 <_Watchdog_Adjust+0xd8> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0ef2c: 2f 85 00 00 cmpwi cr7,r5,0 ffc0ef30: 41 9e 00 5c beq- cr7,ffc0ef8c <_Watchdog_Adjust+0xb0> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { ffc0ef34: 83 a9 00 10 lwz r29,16(r9) _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0ef38: 3b 60 00 01 li r27,1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { ffc0ef3c: 7f 85 e8 40 cmplw cr7,r5,r29 ffc0ef40: 40 bc 00 18 bge+ cr7,ffc0ef58 <_Watchdog_Adjust+0x7c> <== ALWAYS TAKEN ffc0ef44: 48 00 00 ac b ffc0eff0 <_Watchdog_Adjust+0x114> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0ef48: 41 82 00 44 beq- ffc0ef8c <_Watchdog_Adjust+0xb0> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { ffc0ef4c: 83 a9 00 10 lwz r29,16(r9) ffc0ef50: 7f 9d f0 40 cmplw cr7,r29,r30 ffc0ef54: 41 9d 00 9c bgt- cr7,ffc0eff0 <_Watchdog_Adjust+0x114> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0ef58: 93 69 00 10 stw r27,16(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ef5c: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _Watchdog_Tickle( header ); ffc0ef60: 7f e3 fb 78 mr r3,r31 ffc0ef64: 48 00 03 31 bl ffc0f294 <_Watchdog_Tickle> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0ef68: 7c 00 00 a6 mfmsr r0 ffc0ef6c: 7d 30 42 a6 mfsprg r9,0 ffc0ef70: 7c 09 48 78 andc r9,r0,r9 ffc0ef74: 7d 20 01 24 mtmsr r9 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc0ef78: 81 7f 00 00 lwz r11,0(r31) switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0ef7c: 7f dd f0 51 subf. r30,r29,r30 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0ef80: 7f 9c 58 00 cmpw cr7,r28,r11 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); ffc0ef84: 7d 69 5b 78 mr r9,r11 ffc0ef88: 40 9e ff c0 bne+ cr7,ffc0ef48 <_Watchdog_Adjust+0x6c> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ef8c: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0ef90: 80 01 00 24 lwz r0,36(r1) ffc0ef94: 83 61 00 0c lwz r27,12(r1) ffc0ef98: 7c 08 03 a6 mtlr r0 ffc0ef9c: 83 81 00 10 lwz r28,16(r1) ffc0efa0: 83 a1 00 14 lwz r29,20(r1) ffc0efa4: 83 c1 00 18 lwz r30,24(r1) ffc0efa8: 83 e1 00 1c lwz r31,28(r1) ffc0efac: 38 21 00 20 addi r1,r1,32 ffc0efb0: 4e 80 00 20 blr * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { ffc0efb4: 2f 84 00 01 cmpwi cr7,r4,1 ffc0efb8: 40 9e ff d4 bne+ cr7,ffc0ef8c <_Watchdog_Adjust+0xb0> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; ffc0efbc: 81 69 00 10 lwz r11,16(r9) ffc0efc0: 7f cb 2a 14 add r30,r11,r5 ffc0efc4: 93 c9 00 10 stw r30,16(r9) ffc0efc8: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0efcc: 80 01 00 24 lwz r0,36(r1) ffc0efd0: 83 61 00 0c lwz r27,12(r1) ffc0efd4: 7c 08 03 a6 mtlr r0 ffc0efd8: 83 81 00 10 lwz r28,16(r1) ffc0efdc: 83 a1 00 14 lwz r29,20(r1) ffc0efe0: 83 c1 00 18 lwz r30,24(r1) ffc0efe4: 83 e1 00 1c lwz r31,28(r1) ffc0efe8: 38 21 00 20 addi r1,r1,32 ffc0efec: 4e 80 00 20 blr _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; ffc0eff0: 7f de e8 50 subf r30,r30,r29 ffc0eff4: 93 c9 00 10 stw r30,16(r9) break; ffc0eff8: 4b ff ff 94 b ffc0ef8c <_Watchdog_Adjust+0xb0> =============================================================================== ffc21084 <_Watchdog_Adjust_to_chain>: { Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { ffc21084: 2c 04 00 00 cmpwi r4,0 ffc21088: 4d 82 00 20 beqlr static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc2108c: 7c e0 00 a6 mfmsr r7 ffc21090: 7c 10 42 a6 mfsprg r0,0 ffc21094: 7c e0 00 78 andc r0,r7,r0 ffc21098: 7c 00 01 24 mtmsr r0 return; } _ISR_Disable( level ); ffc2109c: 81 23 00 00 lwz r9,0(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc210a0: 39 03 00 04 addi r8,r3,4 ffc210a4: 38 c5 00 04 addi r6,r5,4 /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; first->delta_interval = 0; ffc210a8: 39 80 00 00 li r12,0 while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { ffc210ac: 7f 88 48 00 cmpw cr7,r8,r9 ffc210b0: 41 9e 00 68 beq- cr7,ffc21118 <_Watchdog_Adjust_to_chain+0x94> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { ffc210b4: 80 09 00 10 lwz r0,16(r9) ffc210b8: 7f 80 20 40 cmplw cr7,r0,r4 ffc210bc: 41 9d 00 74 bgt- cr7,ffc21130 <_Watchdog_Adjust_to_chain+0xac> /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; first->delta_interval = 0; ffc210c0: 91 89 00 10 stw r12,16(r9) /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; ffc210c4: 7c 80 20 50 subf r4,r0,r4 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc210c8: 81 69 00 00 lwz r11,0(r9) previous = the_node->previous; ffc210cc: 81 49 00 04 lwz r10,4(r9) next->previous = previous; previous->next = next; ffc210d0: 91 6a 00 00 stw r11,0(r10) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc210d4: 91 4b 00 04 stw r10,4(r11) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc210d8: 90 c9 00 00 stw r6,0(r9) old_last_node = the_chain->last; ffc210dc: 81 65 00 08 lwz r11,8(r5) the_chain->last = the_node; ffc210e0: 91 25 00 08 stw r9,8(r5) old_last_node->next = the_node; the_node->previous = old_last_node; ffc210e4: 91 69 00 04 stw r11,4(r9) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; ffc210e8: 91 2b 00 00 stw r9,0(r11) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc210ec: 7c 00 00 a6 mfmsr r0 ffc210f0: 7c e0 01 24 mtmsr r7 ffc210f4: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc210f8: 81 23 00 00 lwz r9,0(r3) _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); if ( _Chain_Is_empty( header ) ) ffc210fc: 7f 88 48 00 cmpw cr7,r8,r9 ffc21100: 41 9e 00 20 beq- cr7,ffc21120 <_Watchdog_Adjust_to_chain+0x9c> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) ffc21104: 80 09 00 10 lwz r0,16(r9) ffc21108: 2f 80 00 00 cmpwi cr7,r0,0 ffc2110c: 41 9e ff bc beq+ cr7,ffc210c8 <_Watchdog_Adjust_to_chain+0x44><== NEVER TAKEN } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { ffc21110: 2f 84 00 00 cmpwi cr7,r4,0 ffc21114: 40 9e ff 98 bne+ cr7,ffc210ac <_Watchdog_Adjust_to_chain+0x28> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc21118: 7c e0 01 24 mtmsr r7 ffc2111c: 4e 80 00 20 blr ffc21120: 2f 84 00 00 cmpwi cr7,r4,0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc21124: 7d 09 43 78 mr r9,r8 ffc21128: 40 9e ff 84 bne+ cr7,ffc210ac <_Watchdog_Adjust_to_chain+0x28> ffc2112c: 4b ff ff ec b ffc21118 <_Watchdog_Adjust_to_chain+0x94> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { first->delta_interval -= units; ffc21130: 7c 04 00 50 subf r0,r4,r0 ffc21134: 90 09 00 10 stw r0,16(r9) ffc21138: 7c e0 01 24 mtmsr r7 ffc2113c: 4e 80 00 20 blr =============================================================================== ffc0c898 <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; ffc0c898: 3d 20 00 00 lis r9,0 ffc0c89c: 80 09 27 98 lwz r0,10136(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0c8a0: 7c e0 00 a6 mfmsr r7 ffc0c8a4: 7d 30 42 a6 mfsprg r9,0 ffc0c8a8: 7c e9 48 78 andc r9,r7,r9 ffc0c8ac: 7d 20 01 24 mtmsr r9 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { ffc0c8b0: 81 24 00 08 lwz r9,8(r4) ffc0c8b4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c8b8: 40 9e 01 0c bne- cr7,ffc0c9c4 <_Watchdog_Insert+0x12c> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; ffc0c8bc: 3c a0 00 00 lis r5,0 ffc0c8c0: 81 25 27 c4 lwz r9,10180(r5) if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; ffc0c8c4: 39 60 00 01 li r11,1 ffc0c8c8: 3d 80 00 00 lis r12,0 ffc0c8cc: 91 64 00 08 stw r11,8(r4) _Watchdog_Sync_count++; ffc0c8d0: 39 29 00 01 addi r9,r9,1 ffc0c8d4: 91 25 27 c4 stw r9,10180(r5) if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0c8d8: 38 cc 27 ac addi r6,r12,10156 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; ffc0c8dc: 81 24 00 0c lwz r9,12(r4) * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ffc0c8e0: 81 63 00 00 lwz r11,0(r3) ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0c8e4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c8e8: 41 9e 00 94 beq- cr7,ffc0c97c <_Watchdog_Insert+0xe4> ffc0c8ec: 81 4b 00 00 lwz r10,0(r11) ffc0c8f0: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c8f4: 41 9e 00 88 beq- cr7,ffc0c97c <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { ffc0c8f8: 81 4b 00 10 lwz r10,16(r11) ffc0c8fc: 7f 89 50 40 cmplw cr7,r9,r10 ffc0c900: 41 9c 00 cc blt- cr7,ffc0c9cc <_Watchdog_Insert+0x134> static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0c904: 7d 00 00 a6 mfmsr r8 ffc0c908: 7c e0 01 24 mtmsr r7 ffc0c90c: 7d 00 01 24 mtmsr r8 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0c910: 81 04 00 08 lwz r8,8(r4) ffc0c914: 2f 88 00 01 cmpwi cr7,r8,1 ffc0c918: 40 9e 00 94 bne- cr7,ffc0c9ac <_Watchdog_Insert+0x114> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0c91c: 81 06 00 00 lwz r8,0(r6) if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; ffc0c920: 7d 2a 48 50 subf r9,r10,r9 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0c924: 7f 80 40 40 cmplw cr7,r0,r8 ffc0c928: 40 bc 00 48 bge+ cr7,ffc0c970 <_Watchdog_Insert+0xd8> ffc0c92c: 48 00 00 dc b ffc0ca08 <_Watchdog_Insert+0x170> */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0c930: 81 4b 00 00 lwz r10,0(r11) ffc0c934: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0c938: 41 9e 00 44 beq- cr7,ffc0c97c <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { ffc0c93c: 81 4b 00 10 lwz r10,16(r11) ffc0c940: 7f 8a 48 40 cmplw cr7,r10,r9 ffc0c944: 41 9d 00 88 bgt- cr7,ffc0c9cc <_Watchdog_Insert+0x134> ffc0c948: 7d 00 00 a6 mfmsr r8 ffc0c94c: 7c e0 01 24 mtmsr r7 ffc0c950: 7d 00 01 24 mtmsr r8 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0c954: 81 04 00 08 lwz r8,8(r4) if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; ffc0c958: 7d 2a 48 50 subf r9,r10,r9 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { ffc0c95c: 2f 88 00 01 cmpwi cr7,r8,1 ffc0c960: 40 9e 00 4c bne- cr7,ffc0c9ac <_Watchdog_Insert+0x114> <== NEVER TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { ffc0c964: 81 46 00 00 lwz r10,0(r6) ffc0c968: 7f 80 50 40 cmplw cr7,r0,r10 ffc0c96c: 41 9c 00 9c blt- cr7,ffc0ca08 <_Watchdog_Insert+0x170> */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) ffc0c970: 2f 89 00 00 cmpwi cr7,r9,0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); ffc0c974: 81 6b 00 00 lwz r11,0(r11) ffc0c978: 40 9e ff b8 bne+ cr7,ffc0c930 <_Watchdog_Insert+0x98> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); ffc0c97c: 81 6b 00 04 lwz r11,4(r11) the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0c980: 3d 40 00 00 lis r10,0 ffc0c984: 81 0a 27 c8 lwz r8,10184(r10) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0c988: 81 4b 00 00 lwz r10,0(r11) ffc0c98c: 91 04 00 14 stw r8,20(r4) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; ffc0c990: 39 00 00 02 li r8,2 after_node->next = the_node; ffc0c994: 90 8b 00 00 stw r4,0(r11) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0c998: 91 64 00 04 stw r11,4(r4) ffc0c99c: 91 04 00 08 stw r8,8(r4) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; ffc0c9a0: 91 24 00 10 stw r9,16(r4) before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; ffc0c9a4: 90 8a 00 04 stw r4,4(r10) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0c9a8: 91 44 00 00 stw r10,0(r4) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; ffc0c9ac: 90 0c 27 ac stw r0,10156(r12) _Watchdog_Sync_count--; ffc0c9b0: 81 25 27 c4 lwz r9,10180(r5) ffc0c9b4: 38 09 ff ff addi r0,r9,-1 ffc0c9b8: 90 05 27 c4 stw r0,10180(r5) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0c9bc: 7c e0 01 24 mtmsr r7 ffc0c9c0: 4e 80 00 20 blr ffc0c9c4: 7c e0 01 24 mtmsr r7 ffc0c9c8: 4e 80 00 20 blr if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; ffc0c9cc: 7d 49 50 50 subf r10,r9,r10 ffc0c9d0: 91 4b 00 10 stw r10,16(r11) the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0c9d4: 3d 40 00 00 lis r10,0 _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); ffc0c9d8: 81 6b 00 04 lwz r11,4(r11) the_watchdog->start_time = _Watchdog_Ticks_since_boot; ffc0c9dc: 81 0a 27 c8 lwz r8,10184(r10) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0c9e0: 81 4b 00 00 lwz r10,0(r11) ffc0c9e4: 91 04 00 14 stw r8,20(r4) ffc0c9e8: 39 00 00 02 li r8,2 after_node->next = the_node; ffc0c9ec: 90 8b 00 00 stw r4,0(r11) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0c9f0: 91 64 00 04 stw r11,4(r4) ffc0c9f4: 91 04 00 08 stw r8,8(r4) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; ffc0c9f8: 91 24 00 10 stw r9,16(r4) before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; ffc0c9fc: 90 8a 00 04 stw r4,4(r10) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc0ca00: 91 44 00 00 stw r10,0(r4) ffc0ca04: 4b ff ff a8 b ffc0c9ac <_Watchdog_Insert+0x114> if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; ffc0ca08: 90 06 00 00 stw r0,0(r6) goto restart; ffc0ca0c: 4b ff fe d0 b ffc0c8dc <_Watchdog_Insert+0x44> =============================================================================== ffc0ca60 <_Watchdog_Remove>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0ca60: 7d 20 00 a6 mfmsr r9 ffc0ca64: 7c 10 42 a6 mfsprg r0,0 ffc0ca68: 7d 20 00 78 andc r0,r9,r0 ffc0ca6c: 7c 00 01 24 mtmsr r0 ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; ffc0ca70: 80 03 00 08 lwz r0,8(r3) switch ( previous_state ) { ffc0ca74: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ca78: 41 9e 00 98 beq- cr7,ffc0cb10 <_Watchdog_Remove+0xb0> ffc0ca7c: 2b 80 00 01 cmplwi cr7,r0,1 ffc0ca80: 40 9c 00 1c bge- cr7,ffc0ca9c <_Watchdog_Remove+0x3c> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0ca84: 3d 60 00 00 lis r11,0 ffc0ca88: 81 6b 27 c8 lwz r11,10184(r11) ffc0ca8c: 91 63 00 18 stw r11,24(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ca90: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0ca94: 7c 03 03 78 mr r3,r0 ffc0ca98: 4e 80 00 20 blr Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { ffc0ca9c: 2b 80 00 03 cmplwi cr7,r0,3 ffc0caa0: 41 bd ff e4 bgt- cr7,ffc0ca84 <_Watchdog_Remove+0x24> <== NEVER TAKEN RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); ffc0caa4: 81 63 00 00 lwz r11,0(r3) break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; ffc0caa8: 39 00 00 00 li r8,0 ffc0caac: 91 03 00 08 stw r8,8(r3) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) ffc0cab0: 81 4b 00 00 lwz r10,0(r11) ffc0cab4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0cab8: 41 9e 00 14 beq- cr7,ffc0cacc <_Watchdog_Remove+0x6c> next_watchdog->delta_interval += the_watchdog->delta_interval; ffc0cabc: 81 0b 00 10 lwz r8,16(r11) ffc0cac0: 81 43 00 10 lwz r10,16(r3) ffc0cac4: 7d 48 52 14 add r10,r8,r10 ffc0cac8: 91 4b 00 10 stw r10,16(r11) if ( _Watchdog_Sync_count ) ffc0cacc: 3d 40 00 00 lis r10,0 ffc0cad0: 81 4a 27 c4 lwz r10,10180(r10) ffc0cad4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0cad8: 41 9e 00 14 beq- cr7,ffc0caec <_Watchdog_Remove+0x8c> _Watchdog_Sync_level = _ISR_Nest_level; ffc0cadc: 3d 40 00 00 lis r10,0 ffc0cae0: 81 0a 27 98 lwz r8,10136(r10) ffc0cae4: 3d 40 00 00 lis r10,0 ffc0cae8: 91 0a 27 ac stw r8,10156(r10) { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0caec: 81 43 00 04 lwz r10,4(r3) next->previous = previous; previous->next = next; ffc0caf0: 91 6a 00 00 stw r11,0(r10) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc0caf4: 91 4b 00 04 stw r10,4(r11) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0caf8: 3d 60 00 00 lis r11,0 ffc0cafc: 81 6b 27 c8 lwz r11,10184(r11) ffc0cb00: 91 63 00 18 stw r11,24(r3) ffc0cb04: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0cb08: 7c 03 03 78 mr r3,r0 ffc0cb0c: 4e 80 00 20 blr /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; ffc0cb10: 39 60 00 00 li r11,0 ffc0cb14: 91 63 00 08 stw r11,8(r3) _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0cb18: 3d 60 00 00 lis r11,0 ffc0cb1c: 81 6b 27 c8 lwz r11,10184(r11) ffc0cb20: 91 63 00 18 stw r11,24(r3) ffc0cb24: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return( previous_state ); } ffc0cb28: 7c 03 03 78 mr r3,r0 ffc0cb2c: 4e 80 00 20 blr =============================================================================== ffc0e5f0 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { ffc0e5f0: 94 21 ff e8 stwu r1,-24(r1) ffc0e5f4: 7c 08 02 a6 mflr r0 ffc0e5f8: 93 c1 00 10 stw r30,16(r1) ffc0e5fc: 7c 7e 1b 78 mr r30,r3 ffc0e600: 93 e1 00 14 stw r31,20(r1) ffc0e604: 7c 9f 23 78 mr r31,r4 ffc0e608: 90 01 00 1c stw r0,28(r1) ffc0e60c: 93 81 00 08 stw r28,8(r1) ffc0e610: 93 a1 00 0c stw r29,12(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0e614: 7f a0 00 a6 mfmsr r29 ffc0e618: 7c 10 42 a6 mfsprg r0,0 ffc0e61c: 7f a0 00 78 andc r0,r29,r0 ffc0e620: 7c 00 01 24 mtmsr r0 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); ffc0e624: 3c 60 ff c2 lis r3,-62 ffc0e628: 7f e5 fb 78 mr r5,r31 ffc0e62c: 38 63 4f 9c addi r3,r3,20380 ffc0e630: 7f c4 f3 78 mr r4,r30 ffc0e634: 4c c6 31 82 crclr 4*cr1+eq ffc0e638: 4b ff 81 1d bl ffc06754 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc0e63c: 83 9f 00 00 lwz r28,0(r31) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0e640: 3b ff 00 04 addi r31,r31,4 if ( !_Chain_Is_empty( header ) ) { ffc0e644: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0e648: 41 9e 00 54 beq- cr7,ffc0e69c <_Watchdog_Report_chain+0xac> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); ffc0e64c: 7f 84 e3 78 mr r4,r28 ffc0e650: 38 60 00 00 li r3,0 ffc0e654: 48 00 00 5d bl ffc0e6b0 <_Watchdog_Report> _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next ) ffc0e658: 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 = header->first ; ffc0e65c: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0e660: 40 9e ff ec bne+ cr7,ffc0e64c <_Watchdog_Report_chain+0x5c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); ffc0e664: 3c 60 ff c2 lis r3,-62 ffc0e668: 38 63 4f b4 addi r3,r3,20404 ffc0e66c: 7f c4 f3 78 mr r4,r30 ffc0e670: 4c c6 31 82 crclr 4*cr1+eq ffc0e674: 4b ff 80 e1 bl ffc06754 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0e678: 7f a0 01 24 mtmsr r29 } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } ffc0e67c: 80 01 00 1c lwz r0,28(r1) ffc0e680: 83 81 00 08 lwz r28,8(r1) ffc0e684: 7c 08 03 a6 mtlr r0 ffc0e688: 83 a1 00 0c lwz r29,12(r1) ffc0e68c: 83 c1 00 10 lwz r30,16(r1) ffc0e690: 83 e1 00 14 lwz r31,20(r1) ffc0e694: 38 21 00 18 addi r1,r1,24 ffc0e698: 4e 80 00 20 blr _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); ffc0e69c: 3c 60 ff c2 lis r3,-62 ffc0e6a0: 38 63 4f c4 addi r3,r3,20420 ffc0e6a4: 4c c6 31 82 crclr 4*cr1+eq ffc0e6a8: 4b ff 80 ad bl ffc06754 ffc0e6ac: 4b ff ff cc b ffc0e678 <_Watchdog_Report_chain+0x88> =============================================================================== ffc1e0b8 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); ffc1e0b8: 94 21 ff f0 stwu r1,-16(r1) ffc1e0bc: 7c 08 02 a6 mflr r0 ffc1e0c0: 90 61 00 08 stw r3,8(r1) ffc1e0c4: 90 01 00 14 stw r0,20(r1) ffc1e0c8: 48 00 0a 59 bl ffc1eb20 <__fini> * We need to do the exit processing on the global reentrancy structure. * This has already been done on the per task reentrancy structure * associated with this task. */ libc_wrapup(); ffc1e0cc: 4b ff ff 55 bl ffc1e020 rtems_shutdown_executive(status); ffc1e0d0: 80 61 00 08 lwz r3,8(r1) ffc1e0d4: 48 00 01 59 bl ffc1e22c ffc1e0d8: 48 00 00 00 b ffc1e0d8 <_exit+0x20> <== NOT EXECUTED =============================================================================== ffc05d54 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); ffc05d54: 7c 83 23 78 mr r3,r4 <== NOT EXECUTED ffc05d58: 7c a4 2b 78 mr r4,r5 <== NOT EXECUTED ffc05d5c: 7c c5 33 78 mr r5,r6 <== NOT EXECUTED ffc05d60: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc05d64: 4b ff fd 08 b ffc05a6c <== NOT EXECUTED =============================================================================== ffc116b4 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } ffc116b4: 38 60 00 01 li r3,1 <== NOT EXECUTED ffc116b8: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0e3f8 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); ffc0e3f8: 4b ff ff 70 b ffc0e368 <== NOT EXECUTED =============================================================================== ffc06830 <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); ffc06830: 7c 83 23 78 mr r3,r4 <== NOT EXECUTED ffc06834: 7c a4 2b 78 mr r4,r5 <== NOT EXECUTED ffc06838: 4b ff fd 18 b ffc06550 <== NOT EXECUTED =============================================================================== ffc1e1d8 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { ffc1e1d8: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED ffc1e1dc: 7c 08 02 a6 mflr r0 <== NOT EXECUTED return realloc( ptr, size ); ffc1e1e0: 7c 83 23 78 mr r3,r4 <== NOT EXECUTED ffc1e1e4: 7c a4 2b 78 mr r4,r5 <== NOT EXECUTED void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { ffc1e1e8: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED return realloc( ptr, size ); ffc1e1ec: 48 00 00 81 bl ffc1e26c <== NOT EXECUTED } ffc1e1f0: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc1e1f4: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc1e1f8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc1e1fc: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc09fb4 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { ffc09fb4: 94 21 ff a0 stwu r1,-96(r1) ffc09fb8: 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 ); ffc09fbc: 7c 83 23 78 mr r3,r4 int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { ffc09fc0: 93 a1 00 54 stw r29,84(r1) ffc09fc4: 7c bd 2b 78 mr r29,r5 ffc09fc8: 93 c1 00 58 stw r30,88(r1) ffc09fcc: 93 e1 00 5c stw r31,92(r1) ffc09fd0: 7c 9f 23 78 mr r31,r4 ffc09fd4: 90 01 00 64 stw r0,100(r1) ffc09fd8: 93 61 00 4c stw r27,76(r1) ffc09fdc: 93 81 00 50 stw r28,80(r1) /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); ffc09fe0: 4b ff e4 6d bl ffc0844c if ( old_parent_pathlen == 0 ) ffc09fe4: 7c 7e 1b 79 mr. r30,r3 ffc09fe8: 40 82 04 7c bne- ffc0a464 <_rename_r+0x4b0> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); ffc09fec: 88 1f 00 00 lbz r0,0(r31) ffc09ff0: 2f 80 00 2f cmpwi cr7,r0,47 ffc09ff4: 41 9e 00 14 beq- cr7,ffc0a008 <_rename_r+0x54> <== NEVER TAKEN ffc09ff8: 2f 80 00 5c cmpwi cr7,r0,92 ffc09ffc: 41 9e 00 0c beq- cr7,ffc0a008 <_rename_r+0x54> <== NEVER TAKEN ffc0a000: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a004: 40 9e 02 48 bne- cr7,ffc0a24c <_rename_r+0x298> <== ALWAYS TAKEN ffc0a008: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0a00c: 81 29 27 3c lwz r9,10044(r9) <== NOT EXECUTED ffc0a010: 3b 80 00 00 li r28,0 <== NOT EXECUTED ffc0a014: 80 09 00 24 lwz r0,36(r9) <== NOT EXECUTED ffc0a018: 81 09 00 18 lwz r8,24(r9) <== NOT EXECUTED ffc0a01c: 81 49 00 1c lwz r10,28(r9) <== NOT EXECUTED ffc0a020: 81 69 00 20 lwz r11,32(r9) <== NOT EXECUTED ffc0a024: 91 01 00 20 stw r8,32(r1) <== NOT EXECUTED ffc0a028: 91 41 00 24 stw r10,36(r1) <== NOT EXECUTED ffc0a02c: 91 61 00 28 stw r11,40(r1) <== NOT EXECUTED ffc0a030: 90 01 00 2c stw r0,44(r1) <== NOT EXECUTED ffc0a034: 80 09 00 28 lwz r0,40(r9) <== NOT EXECUTED ffc0a038: 90 01 00 30 stw r0,48(r1) <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; ffc0a03c: 80 01 00 20 lwz r0,32(r1) name = old + old_parent_pathlen; ffc0a040: 7f ff f2 14 add r31,r31,r30 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc0a044: 7f e3 fb 78 mr r3,r31 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; ffc0a048: 93 e1 00 08 stw r31,8(r1) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc0a04c: 3b c1 00 0c addi r30,r1,12 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; ffc0a050: 90 01 00 0c stw r0,12(r1) ffc0a054: 80 01 00 24 lwz r0,36(r1) ffc0a058: 90 01 00 10 stw r0,16(r1) ffc0a05c: 80 01 00 28 lwz r0,40(r1) ffc0a060: 90 01 00 14 stw r0,20(r1) ffc0a064: 80 01 00 2c lwz r0,44(r1) ffc0a068: 90 01 00 18 stw r0,24(r1) ffc0a06c: 80 01 00 30 lwz r0,48(r1) ffc0a070: 90 01 00 1c stw r0,28(r1) name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc0a074: 48 01 38 4d bl ffc1d8c0 ffc0a078: 7c 64 1b 78 mr r4,r3 ffc0a07c: 7f e3 fb 78 mr r3,r31 ffc0a080: 4b ff e3 7d bl ffc083fc ffc0a084: 7f ff 1a 14 add r31,r31,r3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc0a088: 7f e3 fb 78 mr r3,r31 * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc0a08c: 93 e1 00 08 stw r31,8(r1) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc0a090: 48 01 38 31 bl ffc1d8c0 ffc0a094: 38 a0 00 00 li r5,0 ffc0a098: 7c 64 1b 78 mr r4,r3 ffc0a09c: 7f c6 f3 78 mr r6,r30 ffc0a0a0: 7f e3 fb 78 mr r3,r31 ffc0a0a4: 38 e0 00 00 li r7,0 ffc0a0a8: 4b ff e4 31 bl ffc084d8 0, &old_loc, false ); if ( result != 0 ) { ffc0a0ac: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a0b0: 40 9e 02 80 bne- cr7,ffc0a330 <_rename_r+0x37c> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); ffc0a0b4: 88 1d 00 00 lbz r0,0(r29) ffc0a0b8: 2f 80 00 2f cmpwi cr7,r0,47 ffc0a0bc: 41 9e 00 4c beq- cr7,ffc0a108 <_rename_r+0x154> ffc0a0c0: 2f 80 00 5c cmpwi cr7,r0,92 ffc0a0c4: 41 9e 00 44 beq- cr7,ffc0a108 <_rename_r+0x154> <== NEVER TAKEN ffc0a0c8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a0cc: 41 9e 00 3c beq- cr7,ffc0a108 <_rename_r+0x154> <== NEVER TAKEN ffc0a0d0: 3d 20 00 00 lis r9,0 ffc0a0d4: 81 29 27 3c lwz r9,10044(r9) ffc0a0d8: 38 60 00 00 li r3,0 ffc0a0dc: 80 09 00 10 lwz r0,16(r9) ffc0a0e0: 81 09 00 04 lwz r8,4(r9) ffc0a0e4: 81 49 00 08 lwz r10,8(r9) ffc0a0e8: 81 69 00 0c lwz r11,12(r9) ffc0a0ec: 91 01 00 34 stw r8,52(r1) ffc0a0f0: 91 41 00 38 stw r10,56(r1) ffc0a0f4: 91 61 00 3c stw r11,60(r1) ffc0a0f8: 90 01 00 40 stw r0,64(r1) ffc0a0fc: 80 09 00 14 lwz r0,20(r9) ffc0a100: 90 01 00 44 stw r0,68(r1) ffc0a104: 48 00 00 38 b ffc0a13c <_rename_r+0x188> ffc0a108: 3d 20 00 00 lis r9,0 ffc0a10c: 81 29 27 3c lwz r9,10044(r9) ffc0a110: 38 60 00 01 li r3,1 ffc0a114: 80 09 00 24 lwz r0,36(r9) ffc0a118: 81 09 00 18 lwz r8,24(r9) ffc0a11c: 81 49 00 1c lwz r10,28(r9) ffc0a120: 81 69 00 20 lwz r11,32(r9) ffc0a124: 91 01 00 34 stw r8,52(r1) ffc0a128: 91 41 00 38 stw r10,56(r1) ffc0a12c: 91 61 00 3c stw r11,60(r1) ffc0a130: 90 01 00 40 stw r0,64(r1) ffc0a134: 80 09 00 28 lwz r0,40(r9) ffc0a138: 90 01 00 44 stw r0,68(r1) if ( !new_parent_loc.ops->evalformake_h ) { ffc0a13c: 81 21 00 40 lwz r9,64(r1) ffc0a140: 80 09 00 04 lwz r0,4(r9) ffc0a144: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a148: 41 9e 02 b8 beq- cr7,ffc0a400 <_rename_r+0x44c> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); ffc0a14c: 3b e1 00 34 addi r31,r1,52 ffc0a150: 7c 09 03 a6 mtctr r0 ffc0a154: 7c 7d 1a 14 add r3,r29,r3 ffc0a158: 7f e4 fb 78 mr r4,r31 ffc0a15c: 38 a1 00 08 addi r5,r1,8 ffc0a160: 4e 80 04 21 bctrl if ( result != 0 ) { ffc0a164: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a168: 40 9e 02 04 bne- cr7,ffc0a36c <_rename_r+0x3b8> /* * 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 ) { ffc0a16c: 80 01 00 44 lwz r0,68(r1) ffc0a170: 81 21 00 30 lwz r9,48(r1) ffc0a174: 7f 89 00 00 cmpw cr7,r9,r0 ffc0a178: 40 9e 01 0c bne- cr7,ffc0a284 <_rename_r+0x2d0> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { ffc0a17c: 81 21 00 40 lwz r9,64(r1) ffc0a180: 80 09 00 40 lwz r0,64(r9) ffc0a184: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a188: 41 9e 02 60 beq- cr7,ffc0a3e8 <_rename_r+0x434> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); ffc0a18c: 3b a1 00 20 addi r29,r1,32 ffc0a190: 80 c1 00 08 lwz r6,8(r1) ffc0a194: 7f a3 eb 78 mr r3,r29 ffc0a198: 7c 09 03 a6 mtctr r0 ffc0a19c: 7f c4 f3 78 mr r4,r30 ffc0a1a0: 7f e5 fb 78 mr r5,r31 ffc0a1a4: 4e 80 04 21 bctrl rtems_filesystem_freenode( &new_parent_loc ); ffc0a1a8: 81 21 00 40 lwz r9,64(r1) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); ffc0a1ac: 7c 7b 1b 78 mr r27,r3 rtems_filesystem_freenode( &new_parent_loc ); ffc0a1b0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a1b4: 41 9e 00 1c beq- cr7,ffc0a1d0 <_rename_r+0x21c> <== NEVER TAKEN ffc0a1b8: 80 09 00 1c lwz r0,28(r9) ffc0a1bc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a1c0: 41 9e 00 10 beq- cr7,ffc0a1d0 <_rename_r+0x21c> <== NEVER TAKEN ffc0a1c4: 7f e3 fb 78 mr r3,r31 ffc0a1c8: 7c 09 03 a6 mtctr r0 ffc0a1cc: 4e 80 04 21 bctrl if ( free_old_parentloc ) ffc0a1d0: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0a1d4: 40 9e 00 50 bne- cr7,ffc0a224 <_rename_r+0x270> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); ffc0a1d8: 81 21 00 18 lwz r9,24(r1) ffc0a1dc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a1e0: 41 9e 00 1c beq- cr7,ffc0a1fc <_rename_r+0x248> <== NEVER TAKEN ffc0a1e4: 80 09 00 1c lwz r0,28(r9) ffc0a1e8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a1ec: 41 9e 00 10 beq- cr7,ffc0a1fc <_rename_r+0x248> <== NEVER TAKEN ffc0a1f0: 7f c3 f3 78 mr r3,r30 ffc0a1f4: 7c 09 03 a6 mtctr r0 ffc0a1f8: 4e 80 04 21 bctrl return result; } ffc0a1fc: 80 01 00 64 lwz r0,100(r1) ffc0a200: 7f 63 db 78 mr r3,r27 ffc0a204: 83 81 00 50 lwz r28,80(r1) ffc0a208: 7c 08 03 a6 mtlr r0 ffc0a20c: 83 61 00 4c lwz r27,76(r1) ffc0a210: 83 a1 00 54 lwz r29,84(r1) ffc0a214: 83 c1 00 58 lwz r30,88(r1) ffc0a218: 83 e1 00 5c lwz r31,92(r1) ffc0a21c: 38 21 00 60 addi r1,r1,96 ffc0a220: 4e 80 00 20 blr result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); ffc0a224: 81 21 00 2c lwz r9,44(r1) ffc0a228: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a22c: 41 be ff ac beq- cr7,ffc0a1d8 <_rename_r+0x224> <== NEVER TAKEN ffc0a230: 80 09 00 1c lwz r0,28(r9) ffc0a234: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a238: 41 be ff a0 beq- cr7,ffc0a1d8 <_rename_r+0x224> <== NEVER TAKEN ffc0a23c: 7f a3 eb 78 mr r3,r29 ffc0a240: 7c 09 03 a6 mtctr r0 ffc0a244: 4e 80 04 21 bctrl ffc0a248: 4b ff ff 90 b ffc0a1d8 <_rename_r+0x224> */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); ffc0a24c: 3d 20 00 00 lis r9,0 ffc0a250: 81 29 27 3c lwz r9,10044(r9) ffc0a254: 3b 80 00 00 li r28,0 ffc0a258: 80 09 00 10 lwz r0,16(r9) ffc0a25c: 81 09 00 04 lwz r8,4(r9) ffc0a260: 81 49 00 08 lwz r10,8(r9) ffc0a264: 81 69 00 0c lwz r11,12(r9) ffc0a268: 91 01 00 20 stw r8,32(r1) ffc0a26c: 91 41 00 24 stw r10,36(r1) ffc0a270: 91 61 00 28 stw r11,40(r1) ffc0a274: 90 01 00 2c stw r0,44(r1) ffc0a278: 80 09 00 14 lwz r0,20(r9) ffc0a27c: 90 01 00 30 stw r0,48(r1) ffc0a280: 4b ff fd bc b ffc0a03c <_rename_r+0x88> * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); ffc0a284: 81 21 00 40 lwz r9,64(r1) ffc0a288: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a28c: 41 9e 00 1c beq- cr7,ffc0a2a8 <_rename_r+0x2f4> <== NEVER TAKEN ffc0a290: 80 09 00 1c lwz r0,28(r9) ffc0a294: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a298: 41 9e 00 10 beq- cr7,ffc0a2a8 <_rename_r+0x2f4> <== NEVER TAKEN ffc0a29c: 7f e3 fb 78 mr r3,r31 ffc0a2a0: 7c 09 03 a6 mtctr r0 ffc0a2a4: 4e 80 04 21 bctrl if ( free_old_parentloc ) ffc0a2a8: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0a2ac: 41 9e 00 28 beq- cr7,ffc0a2d4 <_rename_r+0x320> rtems_filesystem_freenode( &old_parent_loc ); ffc0a2b0: 81 21 00 2c lwz r9,44(r1) ffc0a2b4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a2b8: 41 9e 00 1c beq- cr7,ffc0a2d4 <_rename_r+0x320> <== NEVER TAKEN ffc0a2bc: 80 09 00 1c lwz r0,28(r9) ffc0a2c0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a2c4: 41 9e 00 10 beq- cr7,ffc0a2d4 <_rename_r+0x320> <== NEVER TAKEN ffc0a2c8: 38 61 00 20 addi r3,r1,32 ffc0a2cc: 7c 09 03 a6 mtctr r0 ffc0a2d0: 4e 80 04 21 bctrl rtems_filesystem_freenode( &old_loc ); ffc0a2d4: 81 21 00 18 lwz r9,24(r1) ffc0a2d8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a2dc: 41 9e 00 1c beq- cr7,ffc0a2f8 <_rename_r+0x344> <== NEVER TAKEN ffc0a2e0: 80 09 00 1c lwz r0,28(r9) ffc0a2e4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a2e8: 41 9e 00 10 beq- cr7,ffc0a2f8 <_rename_r+0x344> <== NEVER TAKEN ffc0a2ec: 7f c3 f3 78 mr r3,r30 ffc0a2f0: 7c 09 03 a6 mtctr r0 ffc0a2f4: 4e 80 04 21 bctrl rtems_set_errno_and_return_minus_one( EXDEV ); ffc0a2f8: 48 00 fa 71 bl ffc19d68 <__errno> ffc0a2fc: 38 00 00 12 li r0,18 ffc0a300: 90 03 00 00 stw r0,0(r3) ffc0a304: 3b 60 ff ff li r27,-1 if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } ffc0a308: 7f 63 db 78 mr r3,r27 ffc0a30c: 80 01 00 64 lwz r0,100(r1) ffc0a310: 83 61 00 4c lwz r27,76(r1) ffc0a314: 7c 08 03 a6 mtlr r0 ffc0a318: 83 81 00 50 lwz r28,80(r1) ffc0a31c: 83 a1 00 54 lwz r29,84(r1) ffc0a320: 83 c1 00 58 lwz r30,88(r1) ffc0a324: 83 e1 00 5c lwz r31,92(r1) ffc0a328: 38 21 00 60 addi r1,r1,96 ffc0a32c: 4e 80 00 20 blr 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 ) ffc0a330: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0a334: 40 9e 00 0c bne- cr7,ffc0a340 <_rename_r+0x38c> <== ALWAYS TAKEN result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); ffc0a338: 3b 60 ff ff li r27,-1 <== NOT EXECUTED ffc0a33c: 4b ff fe c0 b ffc0a1fc <_rename_r+0x248> <== NOT EXECUTED 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 ); ffc0a340: 81 21 00 2c lwz r9,44(r1) ffc0a344: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a348: 41 9e ff f0 beq+ cr7,ffc0a338 <_rename_r+0x384> <== NEVER TAKEN ffc0a34c: 80 09 00 1c lwz r0,28(r9) ffc0a350: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a354: 41 9e ff e4 beq+ cr7,ffc0a338 <_rename_r+0x384> <== NEVER TAKEN ffc0a358: 38 61 00 20 addi r3,r1,32 ffc0a35c: 7c 09 03 a6 mtctr r0 ffc0a360: 3b 60 ff ff li r27,-1 ffc0a364: 4e 80 04 21 bctrl ffc0a368: 4b ff fe 94 b ffc0a1fc <_rename_r+0x248> rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); ffc0a36c: 81 21 00 40 lwz r9,64(r1) ffc0a370: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a374: 41 9e 00 1c beq- cr7,ffc0a390 <_rename_r+0x3dc> <== NEVER TAKEN ffc0a378: 80 09 00 1c lwz r0,28(r9) ffc0a37c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a380: 41 9e 00 10 beq- cr7,ffc0a390 <_rename_r+0x3dc> <== NEVER TAKEN ffc0a384: 7f e3 fb 78 mr r3,r31 ffc0a388: 7c 09 03 a6 mtctr r0 ffc0a38c: 4e 80 04 21 bctrl if ( free_old_parentloc ) ffc0a390: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0a394: 41 9e 00 28 beq- cr7,ffc0a3bc <_rename_r+0x408> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); ffc0a398: 81 21 00 2c lwz r9,44(r1) ffc0a39c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a3a0: 41 9e 00 1c beq- cr7,ffc0a3bc <_rename_r+0x408> <== NEVER TAKEN ffc0a3a4: 80 09 00 1c lwz r0,28(r9) ffc0a3a8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a3ac: 41 9e 00 10 beq- cr7,ffc0a3bc <_rename_r+0x408> <== NEVER TAKEN ffc0a3b0: 38 61 00 20 addi r3,r1,32 ffc0a3b4: 7c 09 03 a6 mtctr r0 ffc0a3b8: 4e 80 04 21 bctrl rtems_filesystem_freenode( &old_loc ); ffc0a3bc: 81 21 00 18 lwz r9,24(r1) ffc0a3c0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a3c4: 41 9e ff 74 beq+ cr7,ffc0a338 <_rename_r+0x384> <== NEVER TAKEN ffc0a3c8: 80 09 00 1c lwz r0,28(r9) ffc0a3cc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a3d0: 41 9e ff 68 beq+ cr7,ffc0a338 <_rename_r+0x384> <== NEVER TAKEN ffc0a3d4: 7f c3 f3 78 mr r3,r30 ffc0a3d8: 7c 09 03 a6 mtctr r0 ffc0a3dc: 3b 60 ff ff li r27,-1 ffc0a3e0: 4e 80 04 21 bctrl ffc0a3e4: 4b ff fe 18 b ffc0a1fc <_rename_r+0x248> rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { rtems_filesystem_freenode( &new_parent_loc ); ffc0a3e8: 80 09 00 1c lwz r0,28(r9) ffc0a3ec: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a3f0: 41 9e 00 10 beq- cr7,ffc0a400 <_rename_r+0x44c> <== NEVER TAKEN ffc0a3f4: 7f e3 fb 78 mr r3,r31 ffc0a3f8: 7c 09 03 a6 mtctr r0 ffc0a3fc: 4e 80 04 21 bctrl if ( free_old_parentloc ) ffc0a400: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0a404: 41 9e 00 28 beq- cr7,ffc0a42c <_rename_r+0x478> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); ffc0a408: 81 21 00 2c lwz r9,44(r1) ffc0a40c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a410: 41 9e 00 1c beq- cr7,ffc0a42c <_rename_r+0x478> <== NEVER TAKEN ffc0a414: 80 09 00 1c lwz r0,28(r9) ffc0a418: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a41c: 41 9e 00 10 beq- cr7,ffc0a42c <_rename_r+0x478> <== NEVER TAKEN ffc0a420: 38 61 00 20 addi r3,r1,32 ffc0a424: 7c 09 03 a6 mtctr r0 ffc0a428: 4e 80 04 21 bctrl rtems_filesystem_freenode( &old_loc ); ffc0a42c: 81 21 00 18 lwz r9,24(r1) ffc0a430: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a434: 41 9e 00 1c beq- cr7,ffc0a450 <_rename_r+0x49c> <== NEVER TAKEN ffc0a438: 80 09 00 1c lwz r0,28(r9) ffc0a43c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a440: 41 9e 00 10 beq- cr7,ffc0a450 <_rename_r+0x49c> <== NEVER TAKEN ffc0a444: 7f c3 f3 78 mr r3,r30 ffc0a448: 7c 09 03 a6 mtctr r0 ffc0a44c: 4e 80 04 21 bctrl rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc0a450: 48 00 f9 19 bl ffc19d68 <__errno> ffc0a454: 38 00 00 86 li r0,134 ffc0a458: 90 03 00 00 stw r0,0(r3) ffc0a45c: 3b 60 ff ff li r27,-1 ffc0a460: 4b ff fd 9c b ffc0a1fc <_rename_r+0x248> 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, ffc0a464: 7f e3 fb 78 mr r3,r31 ffc0a468: 7f c4 f3 78 mr r4,r30 ffc0a46c: 38 a0 00 02 li r5,2 ffc0a470: 38 c1 00 20 addi r6,r1,32 ffc0a474: 38 e0 00 00 li r7,0 ffc0a478: 4b ff e1 89 bl ffc08600 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) ffc0a47c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a480: 40 be fe b8 bne- cr7,ffc0a338 <_rename_r+0x384> <== NEVER TAKEN ffc0a484: 3b 80 00 01 li r28,1 ffc0a488: 4b ff fb b4 b ffc0a03c <_rename_r+0x88> =============================================================================== ffc0de10 <_rtems_octal2ulong>: { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) ffc0de10: 2c 04 00 00 cmpwi r4,0 <== NOT EXECUTED ffc0de14: 39 40 00 00 li r10,0 <== NOT EXECUTED ffc0de18: 39 20 00 00 li r9,0 <== NOT EXECUTED ffc0de1c: 41 82 00 2c beq- ffc0de48 <_rtems_octal2ulong+0x38> <== NOT EXECUTED ffc0de20: 7c 89 03 a6 mtctr r4 <== NOT EXECUTED { if ((octascii[i] < '0') || (octascii[i] > '9')) ffc0de24: 7d 63 48 ae lbzx r11,r3,r9 <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); ffc0de28: 55 48 18 38 rlwinm r8,r10,3,0,28 <== NOT EXECUTED { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) ffc0de2c: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED { if ((octascii[i] < '0') || (octascii[i] > '9')) ffc0de30: 38 0b ff d0 addi r0,r11,-48 <== NOT EXECUTED ffc0de34: 54 0b 06 3e clrlwi r11,r0,24 <== NOT EXECUTED ffc0de38: 2b 8b 00 09 cmplwi cr7,r11,9 <== NOT EXECUTED ffc0de3c: 41 9d 00 08 bgt- cr7,ffc0de44 <_rtems_octal2ulong+0x34> <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); ffc0de40: 7d 40 42 14 add r10,r0,r8 <== NOT EXECUTED { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) ffc0de44: 42 00 ff e0 bdnz+ ffc0de24 <_rtems_octal2ulong+0x14> <== NOT EXECUTED continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); } return(num); } ffc0de48: 7d 43 53 78 mr r3,r10 <== NOT EXECUTED ffc0de4c: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0de50 <_rtems_tar_header_checksum>: ************************************************************************/ int _rtems_tar_header_checksum( const char *bufr ) { ffc0de50: 38 00 02 00 li r0,512 <== NOT EXECUTED ffc0de54: 39 60 00 00 li r11,0 <== NOT EXECUTED ffc0de58: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0de5c: 39 20 00 00 li r9,0 <== NOT EXECUTED ffc0de60: 48 00 00 10 b ffc0de70 <_rtems_tar_header_checksum+0x20><== NOT EXECUTED sum = 0; for (i=0; i<512; i++) { if ((i >= 148) && (i < 156)) sum += 0xff & ' '; ffc0de64: 39 6b 00 20 addi r11,r11,32 <== NOT EXECUTED ) { int i, sum; sum = 0; for (i=0; i<512; i++) ffc0de68: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED ffc0de6c: 42 40 00 20 bdz- ffc0de8c <_rtems_tar_header_checksum+0x3c><== NOT EXECUTED { if ((i >= 148) && (i < 156)) ffc0de70: 38 09 ff 6c addi r0,r9,-148 <== NOT EXECUTED ffc0de74: 2b 80 00 07 cmplwi cr7,r0,7 <== NOT EXECUTED ffc0de78: 40 bd ff ec ble- cr7,ffc0de64 <_rtems_tar_header_checksum+0x14><== NOT EXECUTED sum += 0xff & ' '; else sum += 0xff & bufr[i]; ffc0de7c: 7c 03 48 ae lbzx r0,r3,r9 <== NOT EXECUTED ) { int i, sum; sum = 0; for (i=0; i<512; i++) ffc0de80: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED { if ((i >= 148) && (i < 156)) sum += 0xff & ' '; else sum += 0xff & bufr[i]; ffc0de84: 7d 6b 02 14 add r11,r11,r0 <== NOT EXECUTED ) { int i, sum; sum = 0; for (i=0; i<512; i++) ffc0de88: 42 00 ff e8 bdnz+ ffc0de70 <_rtems_tar_header_checksum+0x20><== NOT EXECUTED sum += 0xff & ' '; else sum += 0xff & bufr[i]; } return(sum); } ffc0de8c: 7d 63 5b 78 mr r3,r11 <== NOT EXECUTED ffc0de90: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc07a00 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); ffc07a00: 7c 83 23 78 mr r3,r4 <== NOT EXECUTED ffc07a04: 7c a4 2b 78 mr r4,r5 <== NOT EXECUTED ffc07a08: 4b ff fe c0 b ffc078c8 <== NOT EXECUTED =============================================================================== ffc12b0c <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); ffc12b0c: 7c 83 23 78 mr r3,r4 <== NOT EXECUTED ffc12b10: 4b ff fc f8 b ffc12808 <== NOT EXECUTED =============================================================================== ffc087f0 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { ffc087f0: 94 21 ff d8 stwu r1,-40(r1) ffc087f4: 7d 80 00 26 mfcr r12 ffc087f8: 7c 08 02 a6 mflr r0 ffc087fc: 93 e1 00 24 stw r31,36(r1) long adjustment; /* * Simple validations */ if ( !delta ) ffc08800: 7c 7f 1b 79 mr. r31,r3 int adjtime( struct timeval *delta, struct timeval *olddelta ) { ffc08804: 93 c1 00 20 stw r30,32(r1) ffc08808: 7c 9e 23 78 mr r30,r4 ffc0880c: 90 01 00 2c stw r0,44(r1) ffc08810: 93 a1 00 1c stw r29,28(r1) ffc08814: 91 81 00 18 stw r12,24(r1) long adjustment; /* * Simple validations */ if ( !delta ) ffc08818: 41 82 01 70 beq- ffc08988 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) ffc0881c: 81 3f 00 04 lwz r9,4(r31) ffc08820: 3c 00 00 0f lis r0,15 ffc08824: 60 00 42 3f ori r0,r0,16959 ffc08828: 7f 89 00 40 cmplw cr7,r9,r0 ffc0882c: 41 9d 01 5c bgt- cr7,ffc08988 rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { ffc08830: 2e 04 00 00 cmpwi cr4,r4,0 ffc08834: 41 92 00 14 beq- cr4,ffc08848 olddelta->tv_sec = 0; ffc08838: 38 00 00 00 li r0,0 olddelta->tv_usec = 0; ffc0883c: 90 04 00 04 stw r0,4(r4) if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { olddelta->tv_sec = 0; ffc08840: 90 04 00 00 stw r0,0(r4) olddelta->tv_usec = 0; ffc08844: 81 3f 00 04 lwz r9,4(r31) } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); ffc08848: 80 1f 00 00 lwz r0,0(r31) ffc0884c: 54 0a 40 2e rlwinm r10,r0,8,0,23 ffc08850: 54 0b 18 38 rlwinm r11,r0,3,0,28 ffc08854: 7d 6b 50 50 subf r11,r11,r10 ffc08858: 55 6a 30 32 rlwinm r10,r11,6,0,25 ffc0885c: 7d 6b 50 50 subf r11,r11,r10 ffc08860: 7c 0b 02 14 add r0,r11,r0 adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) ffc08864: 3d 60 00 00 lis r11,0 olddelta->tv_sec = 0; olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); ffc08868: 54 00 30 32 rlwinm r0,r0,6,0,25 adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) ffc0886c: 81 4b 20 ac lwz r10,8364(r11) ffc08870: 7d 29 02 14 add r9,r9,r0 ffc08874: 7f 89 50 40 cmplw cr7,r9,r10 ffc08878: 40 9c 00 2c bge- cr7,ffc088a4 _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; ffc0887c: 38 60 00 00 li r3,0 return 0; } ffc08880: 80 01 00 2c lwz r0,44(r1) ffc08884: 81 81 00 18 lwz r12,24(r1) ffc08888: 7c 08 03 a6 mtlr r0 ffc0888c: 83 a1 00 1c lwz r29,28(r1) ffc08890: 83 c1 00 20 lwz r30,32(r1) ffc08894: 7d 80 81 20 mtcrf 8,r12 ffc08898: 83 e1 00 24 lwz r31,36(r1) ffc0889c: 38 21 00 28 addi r1,r1,40 ffc088a0: 4e 80 00 20 blr rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc088a4: 3d 20 00 00 lis r9,0 ffc088a8: 81 69 28 b0 lwz r11,10416(r9) ffc088ac: 38 0b 00 01 addi r0,r11,1 ffc088b0: 90 09 28 b0 stw r0,10416(r9) * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); ffc088b4: 3b a1 00 08 addi r29,r1,8 ffc088b8: 7f a3 eb 78 mr r3,r29 ffc088bc: 48 00 1f 79 bl ffc0a834 <_TOD_Get> ts.tv_sec += delta->tv_sec; ffc088c0: 80 1f 00 00 lwz r0,0(r31) ffc088c4: 81 61 00 08 lwz r11,8(r1) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; ffc088c8: 81 41 00 0c lwz r10,12(r1) _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ffc088cc: 7d 6b 02 14 add r11,r11,r0 ffc088d0: 91 61 00 08 stw r11,8(r1) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc088d4: 3c 00 3b 9a lis r0,15258 ffc088d8: 60 00 c9 ff ori r0,r0,51711 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; ffc088dc: 81 3f 00 04 lwz r9,4(r31) ffc088e0: 1d 29 03 e8 mulli r9,r9,1000 ffc088e4: 7d 29 52 14 add r9,r9,r10 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc088e8: 7f 89 00 40 cmplw cr7,r9,r0 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; ffc088ec: 91 21 00 0c stw r9,12(r1) /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc088f0: 40 9d 00 20 ble- cr7,ffc08910 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ffc088f4: 3d 29 c4 65 addis r9,r9,-15259 ffc088f8: 39 29 36 00 addi r9,r9,13824 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc088fc: 7f 89 00 40 cmplw cr7,r9,r0 * At one point there was a static variable named adjustment * used by this implementation. I don't see any reason for it * to be here based upon the GNU/Linux documentation. */ int adjtime( ffc08900: 39 6b 00 01 addi r11,r11,1 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc08904: 41 9d ff f0 bgt+ cr7,ffc088f4 <== NEVER TAKEN ffc08908: 91 61 00 08 stw r11,8(r1) ffc0890c: 91 21 00 0c stw r9,12(r1) ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { ffc08910: 3c 00 c4 65 lis r0,-15259 ffc08914: 60 00 36 00 ori r0,r0,13824 ffc08918: 7f 89 00 40 cmplw cr7,r9,r0 ffc0891c: 41 9d 00 24 bgt- cr7,ffc08940 <== NEVER TAKEN ffc08920: 81 61 00 08 lwz r11,8(r1) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ffc08924: 3d 29 3b 9b addis r9,r9,15259 ffc08928: 39 29 ca 00 addi r9,r9,-13824 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { ffc0892c: 7f 89 00 40 cmplw cr7,r9,r0 * At one point there was a static variable named adjustment * used by this implementation. I don't see any reason for it * to be here based upon the GNU/Linux documentation. */ int adjtime( ffc08930: 39 6b ff ff addi r11,r11,-1 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { ffc08934: 40 9d ff f0 ble+ cr7,ffc08924 ffc08938: 91 21 00 0c stw r9,12(r1) ffc0893c: 91 61 00 08 stw r11,8(r1) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); ffc08940: 7f a3 eb 78 mr r3,r29 ffc08944: 48 00 1f cd bl ffc0a910 <_TOD_Set> _Thread_Enable_dispatch(); ffc08948: 48 00 37 6d bl ffc0c0b4 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) ffc0894c: 41 b2 ff 30 beq- cr4,ffc0887c <== NEVER TAKEN *olddelta = *delta; return 0; } ffc08950: 80 01 00 2c lwz r0,44(r1) _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; ffc08954: 38 60 00 00 li r3,0 ffc08958: 81 3f 00 00 lwz r9,0(r31) return 0; } ffc0895c: 7c 08 03 a6 mtlr r0 _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; ffc08960: 81 5f 00 04 lwz r10,4(r31) return 0; } ffc08964: 81 81 00 18 lwz r12,24(r1) _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; ffc08968: 91 3e 00 00 stw r9,0(r30) return 0; } ffc0896c: 7d 80 81 20 mtcrf 8,r12 _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; ffc08970: 91 5e 00 04 stw r10,4(r30) return 0; } ffc08974: 83 a1 00 1c lwz r29,28(r1) ffc08978: 83 c1 00 20 lwz r30,32(r1) ffc0897c: 83 e1 00 24 lwz r31,36(r1) ffc08980: 38 21 00 28 addi r1,r1,40 ffc08984: 4e 80 00 20 blr */ if ( !delta ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc08988: 48 00 b8 ad bl ffc14234 <__errno> ffc0898c: 38 00 00 16 li r0,22 ffc08990: 90 03 00 00 stw r0,0(r3) ffc08994: 38 60 ff ff li r3,-1 ffc08998: 4b ff fe e8 b ffc08880 =============================================================================== ffc0e0d8 : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); ffc0e0d8: 94 21 ff e8 stwu r1,-24(r1) ffc0e0dc: 7c 08 02 a6 mflr r0 ffc0e0e0: 93 e1 00 14 stw r31,20(r1) ffc0e0e4: 3f e0 00 00 lis r31,0 ffc0e0e8: 3b ff 2b 00 addi r31,r31,11008 ffc0e0ec: 90 01 00 1c stw r0,28(r1) ffc0e0f0: 81 3f 00 14 lwz r9,20(r31) ffc0e0f4: 93 a1 00 0c stw r29,12(r1) length = nelem * elsize; ffc0e0f8: 7f a4 19 d6 mullw r29,r4,r3 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); ffc0e0fc: 38 09 00 01 addi r0,r9,1 ffc0e100: 93 c1 00 10 stw r30,16(r1) length = nelem * elsize; cptr = malloc( length ); ffc0e104: 7f a3 eb 78 mr r3,r29 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); ffc0e108: 90 1f 00 14 stw r0,20(r31) length = nelem * elsize; cptr = malloc( length ); ffc0e10c: 4b ff 68 69 bl ffc04974 if ( cptr ) ffc0e110: 7c 7e 1b 79 mr. r30,r3 ffc0e114: 41 82 00 10 beq- ffc0e124 <== NEVER TAKEN memset( cptr, '\0', length ); ffc0e118: 7f a5 eb 78 mr r5,r29 ffc0e11c: 38 80 00 00 li r4,0 ffc0e120: 48 00 5e 3d bl ffc13f5c MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ ffc0e124: 81 3f 00 04 lwz r9,4(r31) return cptr; } ffc0e128: 7f c3 f3 78 mr r3,r30 ffc0e12c: 83 a1 00 0c lwz r29,12(r1) length = nelem * elsize; cptr = malloc( length ); if ( cptr ) memset( cptr, '\0', length ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ ffc0e130: 38 09 ff ff addi r0,r9,-1 return cptr; } ffc0e134: 83 c1 00 10 lwz r30,16(r1) length = nelem * elsize; cptr = malloc( length ); if ( cptr ) memset( cptr, '\0', length ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ ffc0e138: 90 1f 00 04 stw r0,4(r31) return cptr; } ffc0e13c: 80 01 00 1c lwz r0,28(r1) ffc0e140: 83 e1 00 14 lwz r31,20(r1) ffc0e144: 38 21 00 18 addi r1,r1,24 ffc0e148: 7c 08 03 a6 mtlr r0 ffc0e14c: 4e 80 00 20 blr =============================================================================== ffc10258 : #include int chdir( const char *pathname ) { ffc10258: 94 21 ff d0 stwu r1,-48(r1) ffc1025c: 7c 08 02 a6 mflr r0 ffc10260: 93 c1 00 28 stw r30,40(r1) rtems_filesystem_location_info_t loc; int result; if ( !pathname ) ffc10264: 7c 7e 1b 79 mr. r30,r3 #include int chdir( const char *pathname ) { ffc10268: 90 01 00 34 stw r0,52(r1) ffc1026c: 93 e1 00 2c stw r31,44(r1) rtems_filesystem_location_info_t loc; int result; if ( !pathname ) ffc10270: 41 82 00 c8 beq- ffc10338 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); ffc10274: 48 00 66 a9 bl ffc1691c rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( ffc10278: 3b e1 00 08 addi r31,r1,8 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); ffc1027c: 7c 64 1b 78 mr r4,r3 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( ffc10280: 38 a0 00 01 li r5,1 ffc10284: 7f c3 f3 78 mr r3,r30 ffc10288: 7f e6 fb 78 mr r6,r31 ffc1028c: 38 e0 00 01 li r7,1 ffc10290: 4b ff 4b 21 bl ffc04db0 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) ffc10294: 2f 83 00 00 cmpwi cr7,r3,0 ffc10298: 38 60 ff ff li r3,-1 ffc1029c: 40 9e 00 84 bne- cr7,ffc10320 return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { ffc102a0: 81 21 00 14 lwz r9,20(r1) ffc102a4: 80 09 00 10 lwz r0,16(r9) ffc102a8: 2f 80 00 00 cmpwi cr7,r0,0 ffc102ac: 41 9e 00 ec beq- cr7,ffc10398 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { ffc102b0: 7f e3 fb 78 mr r3,r31 ffc102b4: 7c 09 03 a6 mtctr r0 ffc102b8: 4e 80 04 21 bctrl ffc102bc: 2f 83 00 01 cmpwi cr7,r3,1 ffc102c0: 40 9e 00 a0 bne- cr7,ffc10360 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); ffc102c4: 3f e0 00 00 lis r31,0 ffc102c8: 81 3f 26 b4 lwz r9,9908(r31) ffc102cc: 81 69 00 10 lwz r11,16(r9) ffc102d0: 2f 8b 00 00 cmpwi cr7,r11,0 ffc102d4: 41 9e 00 20 beq- cr7,ffc102f4 <== NEVER TAKEN ffc102d8: 80 0b 00 1c lwz r0,28(r11) ffc102dc: 2f 80 00 00 cmpwi cr7,r0,0 ffc102e0: 41 9e 00 14 beq- cr7,ffc102f4 <== NEVER TAKEN ffc102e4: 38 69 00 04 addi r3,r9,4 ffc102e8: 7c 09 03 a6 mtctr r0 ffc102ec: 4e 80 04 21 bctrl ffc102f0: 81 3f 26 b4 lwz r9,9908(r31) rtems_filesystem_current = loc; ffc102f4: 80 01 00 14 lwz r0,20(r1) ffc102f8: 38 60 00 00 li r3,0 ffc102fc: 81 41 00 0c lwz r10,12(r1) ffc10300: 81 61 00 10 lwz r11,16(r1) ffc10304: 81 01 00 08 lwz r8,8(r1) ffc10308: 91 49 00 08 stw r10,8(r9) ffc1030c: 91 09 00 04 stw r8,4(r9) ffc10310: 91 69 00 0c stw r11,12(r9) ffc10314: 90 09 00 10 stw r0,16(r9) ffc10318: 80 01 00 18 lwz r0,24(r1) ffc1031c: 90 09 00 14 stw r0,20(r9) return 0; } ffc10320: 80 01 00 34 lwz r0,52(r1) ffc10324: 83 c1 00 28 lwz r30,40(r1) ffc10328: 7c 08 03 a6 mtlr r0 ffc1032c: 83 e1 00 2c lwz r31,44(r1) ffc10330: 38 21 00 30 addi r1,r1,48 ffc10334: 4e 80 00 20 blr { rtems_filesystem_location_info_t loc; int result; if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); ffc10338: 48 00 53 25 bl ffc1565c <__errno> ffc1033c: 38 00 00 0e li r0,14 ffc10340: 90 03 00 00 stw r0,0(r3) ffc10344: 38 60 ff ff li r3,-1 rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } ffc10348: 80 01 00 34 lwz r0,52(r1) ffc1034c: 83 c1 00 28 lwz r30,40(r1) ffc10350: 7c 08 03 a6 mtlr r0 ffc10354: 83 e1 00 2c lwz r31,44(r1) ffc10358: 38 21 00 30 addi r1,r1,48 ffc1035c: 4e 80 00 20 blr rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); ffc10360: 81 21 00 14 lwz r9,20(r1) ffc10364: 2f 89 00 00 cmpwi cr7,r9,0 ffc10368: 41 9e 00 1c beq- cr7,ffc10384 <== NEVER TAKEN ffc1036c: 80 09 00 1c lwz r0,28(r9) ffc10370: 2f 80 00 00 cmpwi cr7,r0,0 ffc10374: 41 9e 00 10 beq- cr7,ffc10384 <== NEVER TAKEN ffc10378: 7f e3 fb 78 mr r3,r31 ffc1037c: 7c 09 03 a6 mtctr r0 ffc10380: 4e 80 04 21 bctrl rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc10384: 48 00 52 d9 bl ffc1565c <__errno> ffc10388: 38 00 00 14 li r0,20 ffc1038c: 90 03 00 00 stw r0,0(r3) ffc10390: 38 60 ff ff li r3,-1 ffc10394: 4b ff ff 8c b ffc10320 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); ffc10398: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc1039c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc103a0: 41 9e 00 10 beq- cr7,ffc103b0 <== NOT EXECUTED ffc103a4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc103a8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc103ac: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc103b0: 48 00 52 ad bl ffc1565c <__errno> <== NOT EXECUTED ffc103b4: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc103b8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc103bc: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc103c0: 4b ff ff 60 b ffc10320 <== NOT EXECUTED =============================================================================== ffc0737c : int chmod( const char *path, mode_t mode ) { ffc0737c: 94 21 ff c8 stwu r1,-56(r1) ffc07380: 7c 08 02 a6 mflr r0 ffc07384: 93 a1 00 2c stw r29,44(r1) ffc07388: 7c 7d 1b 78 mr r29,r3 ffc0738c: 90 01 00 3c stw r0,60(r1) ffc07390: 93 c1 00 30 stw r30,48(r1) ffc07394: 7c 9e 23 78 mr r30,r4 ffc07398: 93 e1 00 34 stw r31,52(r1) int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); ffc0739c: 48 01 3a b5 bl ffc1ae50 ffc073a0: 3b e1 00 08 addi r31,r1,8 ffc073a4: 7c 64 1b 78 mr r4,r3 ffc073a8: 38 a0 00 00 li r5,0 ffc073ac: 7f a3 eb 78 mr r3,r29 ffc073b0: 7f e6 fb 78 mr r6,r31 ffc073b4: 38 e0 00 01 li r7,1 ffc073b8: 48 00 03 e5 bl ffc0779c if ( status != 0 ) ffc073bc: 3b a0 ff ff li r29,-1 ffc073c0: 2f 83 00 00 cmpwi cr7,r3,0 ffc073c4: 40 9e 00 54 bne- cr7,ffc07418 return -1; if ( !loc.handlers ){ ffc073c8: 81 21 00 10 lwz r9,16(r1) ffc073cc: 2f 89 00 00 cmpwi cr7,r9,0 ffc073d0: 41 9e 00 a0 beq- cr7,ffc07470 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ ffc073d4: 80 09 00 1c lwz r0,28(r9) ffc073d8: 2f 80 00 00 cmpwi cr7,r0,0 ffc073dc: 41 9e 00 5c beq- cr7,ffc07438 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); ffc073e0: 7f c4 f3 78 mr r4,r30 ffc073e4: 7c 09 03 a6 mtctr r0 ffc073e8: 7f e3 fb 78 mr r3,r31 ffc073ec: 4e 80 04 21 bctrl rtems_filesystem_freenode( &loc ); ffc073f0: 81 21 00 14 lwz r9,20(r1) if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); ffc073f4: 7c 7d 1b 78 mr r29,r3 rtems_filesystem_freenode( &loc ); ffc073f8: 2f 89 00 00 cmpwi cr7,r9,0 ffc073fc: 41 9e 00 1c beq- cr7,ffc07418 <== NEVER TAKEN ffc07400: 80 09 00 1c lwz r0,28(r9) ffc07404: 2f 80 00 00 cmpwi cr7,r0,0 ffc07408: 41 9e 00 10 beq- cr7,ffc07418 <== NEVER TAKEN ffc0740c: 7f e3 fb 78 mr r3,r31 ffc07410: 7c 09 03 a6 mtctr r0 ffc07414: 4e 80 04 21 bctrl return result; } ffc07418: 80 01 00 3c lwz r0,60(r1) ffc0741c: 7f a3 eb 78 mr r3,r29 ffc07420: 83 c1 00 30 lwz r30,48(r1) ffc07424: 7c 08 03 a6 mtlr r0 ffc07428: 83 a1 00 2c lwz r29,44(r1) ffc0742c: 83 e1 00 34 lwz r31,52(r1) ffc07430: 38 21 00 38 addi r1,r1,56 ffc07434: 4e 80 00 20 blr rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); ffc07438: 81 21 00 14 lwz r9,20(r1) <== NOT EXECUTED ffc0743c: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc07440: 41 9e 00 1c beq- cr7,ffc0745c <== NOT EXECUTED ffc07444: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc07448: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0744c: 41 9e 00 10 beq- cr7,ffc0745c <== NOT EXECUTED ffc07450: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc07454: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07458: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc0745c: 48 01 1a 8d bl ffc18ee8 <__errno> <== NOT EXECUTED ffc07460: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc07464: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc07468: 3b a0 ff ff li r29,-1 <== NOT EXECUTED ffc0746c: 4b ff ff ac b ffc07418 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) return -1; if ( !loc.handlers ){ rtems_filesystem_freenode( &loc ); ffc07470: 81 21 00 14 lwz r9,20(r1) <== NOT EXECUTED ffc07474: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc07478: 41 9e 00 1c beq- cr7,ffc07494 <== NOT EXECUTED ffc0747c: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc07480: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc07484: 41 9e 00 10 beq- cr7,ffc07494 <== NOT EXECUTED ffc07488: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0748c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07490: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); ffc07494: 48 01 1a 55 bl ffc18ee8 <__errno> <== NOT EXECUTED ffc07498: 38 00 00 09 li r0,9 <== NOT EXECUTED ffc0749c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc074a0: 3b a0 ff ff li r29,-1 <== NOT EXECUTED ffc074a4: 4b ff ff 74 b ffc07418 <== NOT EXECUTED =============================================================================== ffc074a8 : int chown( const char *path, uid_t owner, gid_t group ) { ffc074a8: 94 21 ff c8 stwu r1,-56(r1) ffc074ac: 7c 08 02 a6 mflr r0 ffc074b0: 93 81 00 28 stw r28,40(r1) ffc074b4: 7c 7c 1b 78 mr r28,r3 ffc074b8: 90 01 00 3c stw r0,60(r1) ffc074bc: 93 a1 00 2c stw r29,44(r1) ffc074c0: 7c 9d 23 78 mr r29,r4 ffc074c4: 93 c1 00 30 stw r30,48(r1) ffc074c8: 7c be 2b 78 mr r30,r5 ffc074cc: 93 e1 00 34 stw r31,52(r1) rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) ffc074d0: 48 01 39 81 bl ffc1ae50 ffc074d4: 3b e1 00 08 addi r31,r1,8 ffc074d8: 7c 64 1b 78 mr r4,r3 ffc074dc: 38 a0 00 00 li r5,0 ffc074e0: 7f 83 e3 78 mr r3,r28 ffc074e4: 7f e6 fb 78 mr r6,r31 ffc074e8: 38 e0 00 01 li r7,1 ffc074ec: 48 00 02 b1 bl ffc0779c ffc074f0: 3b 80 ff ff li r28,-1 ffc074f4: 2f 83 00 00 cmpwi cr7,r3,0 ffc074f8: 40 9e 00 50 bne- cr7,ffc07548 return -1; if ( !loc.ops->chown_h ) { ffc074fc: 81 21 00 14 lwz r9,20(r1) ffc07500: 80 09 00 18 lwz r0,24(r9) ffc07504: 2f 80 00 00 cmpwi cr7,r0,0 ffc07508: 41 9e 00 64 beq- cr7,ffc0756c <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); ffc0750c: 7f a4 eb 78 mr r4,r29 ffc07510: 7c 09 03 a6 mtctr r0 ffc07514: 7f c5 f3 78 mr r5,r30 ffc07518: 7f e3 fb 78 mr r3,r31 ffc0751c: 4e 80 04 21 bctrl rtems_filesystem_freenode( &loc ); ffc07520: 81 21 00 14 lwz r9,20(r1) if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); ffc07524: 7c 7c 1b 78 mr r28,r3 rtems_filesystem_freenode( &loc ); ffc07528: 2f 89 00 00 cmpwi cr7,r9,0 ffc0752c: 41 9e 00 1c beq- cr7,ffc07548 <== NEVER TAKEN ffc07530: 80 09 00 1c lwz r0,28(r9) ffc07534: 2f 80 00 00 cmpwi cr7,r0,0 ffc07538: 41 9e 00 10 beq- cr7,ffc07548 <== NEVER TAKEN ffc0753c: 7f e3 fb 78 mr r3,r31 ffc07540: 7c 09 03 a6 mtctr r0 ffc07544: 4e 80 04 21 bctrl return result; } ffc07548: 80 01 00 3c lwz r0,60(r1) ffc0754c: 7f 83 e3 78 mr r3,r28 ffc07550: 83 a1 00 2c lwz r29,44(r1) ffc07554: 7c 08 03 a6 mtlr r0 ffc07558: 83 81 00 28 lwz r28,40(r1) ffc0755c: 83 c1 00 30 lwz r30,48(r1) ffc07560: 83 e1 00 34 lwz r31,52(r1) ffc07564: 38 21 00 38 addi r1,r1,56 ffc07568: 4e 80 00 20 blr if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); ffc0756c: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc07570: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc07574: 41 9e 00 10 beq- cr7,ffc07584 <== NOT EXECUTED ffc07578: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0757c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07580: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc07584: 48 01 19 65 bl ffc18ee8 <__errno> <== NOT EXECUTED ffc07588: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc0758c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc07590: 3b 80 ff ff li r28,-1 <== NOT EXECUTED ffc07594: 4b ff ff b4 b ffc07548 <== NOT EXECUTED =============================================================================== ffc049c4 : #include int chroot( const char *pathname ) { ffc049c4: 94 21 ff c8 stwu r1,-56(r1) ffc049c8: 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) { ffc049cc: 3d 20 00 00 lis r9,0 #include int chroot( const char *pathname ) { ffc049d0: 93 e1 00 34 stw r31,52(r1) int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { ffc049d4: 3f e0 00 00 lis r31,0 #include int chroot( const char *pathname ) { ffc049d8: 93 c1 00 30 stw r30,48(r1) int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { ffc049dc: 83 df 26 b4 lwz r30,9908(r31) #include int chroot( const char *pathname ) { ffc049e0: 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) { ffc049e4: 38 09 2b 1c addi r0,r9,11036 ffc049e8: 7f 9e 00 00 cmpw cr7,r30,r0 #include int chroot( const char *pathname ) { ffc049ec: 93 a1 00 2c stw r29,44(r1) ffc049f0: 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) { ffc049f4: 41 9e 00 b0 beq- cr7,ffc04aa4 <== ALWAYS TAKEN rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = chdir(pathname); ffc049f8: 7f a3 eb 78 mr r3,r29 ffc049fc: 48 00 b8 5d bl ffc10258 if (result) { ffc04a00: 2f 83 00 00 cmpwi cr7,r3,0 ffc04a04: 40 9e 00 c4 bne- cr7,ffc04ac8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { ffc04a08: 3c 60 ff c2 lis r3,-62 ffc04a0c: 38 63 23 18 addi r3,r3,8984 ffc04a10: 38 80 00 01 li r4,1 ffc04a14: 38 a0 00 00 li r5,0 ffc04a18: 38 c1 00 08 addi r6,r1,8 ffc04a1c: 38 e0 00 00 li r7,0 ffc04a20: 48 00 03 91 bl ffc04db0 ffc04a24: 2f 83 00 00 cmpwi cr7,r3,0 ffc04a28: 40 9e 00 a0 bne- cr7,ffc04ac8 <== 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); ffc04a2c: 81 3f 26 b4 lwz r9,9908(r31) ffc04a30: 81 69 00 24 lwz r11,36(r9) ffc04a34: 2f 8b 00 00 cmpwi cr7,r11,0 ffc04a38: 41 9e 00 24 beq- cr7,ffc04a5c <== NEVER TAKEN ffc04a3c: 80 0b 00 1c lwz r0,28(r11) ffc04a40: 2f 80 00 00 cmpwi cr7,r0,0 ffc04a44: 41 9e 00 18 beq- cr7,ffc04a5c <== NEVER TAKEN ffc04a48: 38 69 00 18 addi r3,r9,24 ffc04a4c: 7c 09 03 a6 mtctr r0 ffc04a50: 4e 80 04 21 bctrl ffc04a54: 3d 20 00 00 lis r9,0 ffc04a58: 81 29 26 b4 lwz r9,9908(r9) rtems_filesystem_root = loc; ffc04a5c: 80 01 00 14 lwz r0,20(r1) ffc04a60: 38 60 00 00 li r3,0 ffc04a64: 81 41 00 0c lwz r10,12(r1) ffc04a68: 81 61 00 10 lwz r11,16(r1) ffc04a6c: 81 01 00 08 lwz r8,8(r1) ffc04a70: 91 49 00 1c stw r10,28(r9) ffc04a74: 91 09 00 18 stw r8,24(r9) ffc04a78: 91 69 00 20 stw r11,32(r9) ffc04a7c: 90 09 00 24 stw r0,36(r9) ffc04a80: 80 01 00 18 lwz r0,24(r1) ffc04a84: 90 09 00 28 stw r0,40(r9) return 0; } ffc04a88: 80 01 00 3c lwz r0,60(r1) ffc04a8c: 83 a1 00 2c lwz r29,44(r1) ffc04a90: 7c 08 03 a6 mtlr r0 ffc04a94: 83 c1 00 30 lwz r30,48(r1) ffc04a98: 83 e1 00 34 lwz r31,52(r1) ffc04a9c: 38 21 00 38 addi r1,r1,56 ffc04aa0: 4e 80 00 20 blr int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ ffc04aa4: 48 00 1b 51 bl ffc065f4 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ ffc04aa8: 80 1f 26 b4 lwz r0,9908(r31) ffc04aac: 7f 80 f0 00 cmpw cr7,r0,r30 ffc04ab0: 40 9e ff 48 bne+ cr7,ffc049f8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc04ab4: 48 01 0b a9 bl ffc1565c <__errno> <== NOT EXECUTED ffc04ab8: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc04abc: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc04ac0: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc04ac4: 4b ff ff c4 b ffc04a88 <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); ffc04ac8: 48 01 0b 95 bl ffc1565c <__errno> <== NOT EXECUTED ffc04acc: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED ffc04ad0: 48 01 0b 8d bl ffc1565c <__errno> <== NOT EXECUTED ffc04ad4: 80 03 00 00 lwz r0,0(r3) <== NOT EXECUTED ffc04ad8: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc04adc: 90 1f 00 00 stw r0,0(r31) <== NOT EXECUTED ffc04ae0: 4b ff ff a8 b ffc04a88 <== NOT EXECUTED =============================================================================== ffc086f4 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { if ( !tp ) ffc086f4: 2c 04 00 00 cmpwi r4,0 int clock_gettime( clockid_t clock_id, struct timespec *tp ) { ffc086f8: 94 21 ff f8 stwu r1,-8(r1) ffc086fc: 7c 08 02 a6 mflr r0 ffc08700: 90 01 00 0c stw r0,12(r1) if ( !tp ) ffc08704: 41 82 00 24 beq- ffc08728 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { ffc08708: 2f 83 00 01 cmpwi cr7,r3,1 ffc0870c: 41 9e 00 78 beq- cr7,ffc08784 _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { ffc08710: 2f 83 00 04 cmpwi cr7,r3,4 ffc08714: 41 9e 00 54 beq- cr7,ffc08768 <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { ffc08718: 2f 83 00 02 cmpwi cr7,r3,2 ffc0871c: 41 9e 00 4c beq- cr7,ffc08768 return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) ffc08720: 2f 83 00 03 cmpwi cr7,r3,3 ffc08724: 41 9e 00 24 beq- cr7,ffc08748 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); ffc08728: 48 00 c1 79 bl ffc148a0 <__errno> ffc0872c: 38 00 00 16 li r0,22 ffc08730: 90 03 00 00 stw r0,0(r3) ffc08734: 38 60 ff ff li r3,-1 return 0; } ffc08738: 80 01 00 0c lwz r0,12(r1) ffc0873c: 38 21 00 08 addi r1,r1,8 ffc08740: 7c 08 03 a6 mtlr r0 ffc08744: 4e 80 00 20 blr } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); ffc08748: 48 00 c1 59 bl ffc148a0 <__errno> ffc0874c: 38 00 00 58 li r0,88 ffc08750: 90 03 00 00 stw r0,0(r3) ffc08754: 38 60 ff ff li r3,-1 #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc08758: 80 01 00 0c lwz r0,12(r1) ffc0875c: 38 21 00 08 addi r1,r1,8 ffc08760: 7c 08 03 a6 mtlr r0 ffc08764: 4e 80 00 20 blr } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); ffc08768: 7c 83 23 78 mr r3,r4 ffc0876c: 48 00 29 85 bl ffc0b0f0 <_TOD_Get_uptime_as_timespec> #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc08770: 80 01 00 0c lwz r0,12(r1) } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); ffc08774: 38 60 00 00 li r3,0 #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc08778: 7c 08 03 a6 mtlr r0 ffc0877c: 38 21 00 08 addi r1,r1,8 ffc08780: 4e 80 00 20 blr { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); ffc08784: 7c 83 23 78 mr r3,r4 ffc08788: 48 00 28 c5 bl ffc0b04c <_TOD_Get> ffc0878c: 38 60 00 00 li r3,0 return 0; ffc08790: 4b ff ff a8 b ffc08738 =============================================================================== ffc08794 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { if ( !tp ) ffc08794: 2c 04 00 00 cmpwi r4,0 int clock_settime( clockid_t clock_id, const struct timespec *tp ) { ffc08798: 94 21 ff f8 stwu r1,-8(r1) ffc0879c: 7c 08 02 a6 mflr r0 ffc087a0: 90 01 00 0c stw r0,12(r1) if ( !tp ) ffc087a4: 41 82 00 1c beq- ffc087c0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { ffc087a8: 2f 83 00 01 cmpwi cr7,r3,1 ffc087ac: 41 9e 00 34 beq- cr7,ffc087e0 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) ffc087b0: 2f 83 00 02 cmpwi cr7,r3,2 ffc087b4: 41 9e 00 70 beq- cr7,ffc08824 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) ffc087b8: 2f 83 00 03 cmpwi cr7,r3,3 ffc087bc: 41 9e 00 68 beq- cr7,ffc08824 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); ffc087c0: 48 00 c0 e1 bl ffc148a0 <__errno> ffc087c4: 38 00 00 16 li r0,22 ffc087c8: 90 03 00 00 stw r0,0(r3) ffc087cc: 38 60 ff ff li r3,-1 return 0; } ffc087d0: 80 01 00 0c lwz r0,12(r1) ffc087d4: 38 21 00 08 addi r1,r1,8 ffc087d8: 7c 08 03 a6 mtlr r0 ffc087dc: 4e 80 00 20 blr { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) ffc087e0: 81 24 00 00 lwz r9,0(r4) ffc087e4: 3c 00 21 da lis r0,8666 ffc087e8: 60 00 e4 ff ori r0,r0,58623 ffc087ec: 7f 89 00 40 cmplw cr7,r9,r0 ffc087f0: 40 bd ff d0 ble- cr7,ffc087c0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc087f4: 3d 20 00 00 lis r9,0 ffc087f8: 81 69 28 00 lwz r11,10240(r9) ffc087fc: 38 0b 00 01 addi r0,r11,1 ffc08800: 90 09 28 00 stw r0,10240(r9) rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); ffc08804: 7c 83 23 78 mr r3,r4 ffc08808: 48 00 29 61 bl ffc0b168 <_TOD_Set> _Thread_Enable_dispatch(); ffc0880c: 48 00 41 01 bl ffc0c90c <_Thread_Enable_dispatch> #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc08810: 80 01 00 0c lwz r0,12(r1) if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); ffc08814: 38 60 00 00 li r3,0 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc08818: 7c 08 03 a6 mtlr r0 ffc0881c: 38 21 00 08 addi r1,r1,8 ffc08820: 4e 80 00 20 blr else if ( clock_id == CLOCK_PROCESS_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); ffc08824: 48 00 c0 7d bl ffc148a0 <__errno> ffc08828: 38 00 00 58 li r0,88 ffc0882c: 90 03 00 00 stw r0,0(r3) ffc08830: 38 60 ff ff li r3,-1 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } ffc08834: 80 01 00 0c lwz r0,12(r1) ffc08838: 38 21 00 08 addi r1,r1,8 ffc0883c: 7c 08 03 a6 mtlr r0 ffc08840: 4e 80 00 20 blr =============================================================================== ffc0e150 : #include int close( int fd ) { ffc0e150: 94 21 ff f0 stwu r1,-16(r1) ffc0e154: 7c 08 02 a6 mflr r0 rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); ffc0e158: 3d 20 00 00 lis r9,0 #include int close( int fd ) { ffc0e15c: 90 01 00 14 stw r0,20(r1) rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); ffc0e160: 80 09 26 8c lwz r0,9868(r9) #include int close( int fd ) { ffc0e164: 93 c1 00 08 stw r30,8(r1) rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); ffc0e168: 7f 83 00 40 cmplw cr7,r3,r0 #include int close( int fd ) { ffc0e16c: 93 e1 00 0c stw r31,12(r1) rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); ffc0e170: 40 9c 00 8c bge- cr7,ffc0e1fc iop = rtems_libio_iop(fd); ffc0e174: 3d 20 00 00 lis r9,0 ffc0e178: 83 e9 27 4c lwz r31,10060(r9) ffc0e17c: 1c 63 00 48 mulli r3,r3,72 ffc0e180: 7f ff 1a 14 add r31,r31,r3 rtems_libio_check_is_open(iop); ffc0e184: 80 1f 00 18 lwz r0,24(r31) ffc0e188: 70 09 01 00 andi. r9,r0,256 ffc0e18c: 41 82 00 70 beq- ffc0e1fc rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) ffc0e190: 81 3f 00 40 lwz r9,64(r31) ffc0e194: 3b c0 00 00 li r30,0 ffc0e198: 80 09 00 04 lwz r0,4(r9) ffc0e19c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e1a0: 41 9e 00 14 beq- cr7,ffc0e1b4 <== NEVER TAKEN rc = (*iop->handlers->close_h)( iop ); ffc0e1a4: 7f e3 fb 78 mr r3,r31 ffc0e1a8: 7c 09 03 a6 mtctr r0 ffc0e1ac: 4e 80 04 21 bctrl ffc0e1b0: 7c 7e 1b 78 mr r30,r3 rtems_filesystem_freenode( &iop->pathinfo ); ffc0e1b4: 81 3f 00 28 lwz r9,40(r31) ffc0e1b8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0e1bc: 41 9e 00 1c beq- cr7,ffc0e1d8 <== NEVER TAKEN ffc0e1c0: 80 09 00 1c lwz r0,28(r9) ffc0e1c4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e1c8: 41 9e 00 10 beq- cr7,ffc0e1d8 ffc0e1cc: 38 7f 00 1c addi r3,r31,28 ffc0e1d0: 7c 09 03 a6 mtctr r0 ffc0e1d4: 4e 80 04 21 bctrl rtems_libio_free( iop ); ffc0e1d8: 7f e3 fb 78 mr r3,r31 ffc0e1dc: 48 00 03 f5 bl ffc0e5d0 return rc; } ffc0e1e0: 80 01 00 14 lwz r0,20(r1) ffc0e1e4: 7f c3 f3 78 mr r3,r30 ffc0e1e8: 83 e1 00 0c lwz r31,12(r1) ffc0e1ec: 7c 08 03 a6 mtlr r0 ffc0e1f0: 83 c1 00 08 lwz r30,8(r1) ffc0e1f4: 38 21 00 10 addi r1,r1,16 ffc0e1f8: 4e 80 00 20 blr rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); ffc0e1fc: 48 00 50 79 bl ffc13274 <__errno> ffc0e200: 38 00 00 09 li r0,9 ffc0e204: 90 03 00 00 stw r0,0(r3) ffc0e208: 3b c0 ff ff li r30,-1 ffc0e20c: 4b ff ff d4 b ffc0e1e0 =============================================================================== ffc0cc38 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { ffc0cc38: 94 21 ff e8 stwu r1,-24(r1) ffc0cc3c: 7c 08 02 a6 mflr r0 ffc0cc40: 90 01 00 1c stw r0,28(r1) rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = 0; ffc0cc44: 38 00 00 00 li r0,0 args.mode = 0; status = rtems_io_close( ffc0cc48: 38 a1 00 08 addi r5,r1,8 np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = 0; args.mode = 0; ffc0cc4c: 90 01 00 10 stw r0,16(r1) rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = 0; ffc0cc50: 90 01 00 0c stw r0,12(r1) { rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; ffc0cc54: 81 23 00 3c lwz r9,60(r3) args.iop = iop; ffc0cc58: 90 61 00 08 stw r3,8(r1) args.flags = 0; args.mode = 0; status = rtems_io_close( ffc0cc5c: 80 89 00 0c lwz r4,12(r9) ffc0cc60: 80 69 00 08 lwz r3,8(r9) ffc0cc64: 48 00 17 45 bl ffc0e3a8 np->major, np->minor, (void *) &args ); if ( status ) { ffc0cc68: 38 00 00 00 li r0,0 ffc0cc6c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0cc70: 41 be 00 0c beq+ cr7,ffc0cc7c <== ALWAYS TAKEN return rtems_deviceio_errno(status); ffc0cc74: 48 00 01 7d bl ffc0cdf0 <== NOT EXECUTED ffc0cc78: 7c 60 1b 78 mr r0,r3 <== NOT EXECUTED } return 0; } ffc0cc7c: 7c 03 03 78 mr r3,r0 ffc0cc80: 80 01 00 1c lwz r0,28(r1) ffc0cc84: 38 21 00 18 addi r1,r1,24 ffc0cc88: 7c 08 03 a6 mtlr r0 ffc0cc8c: 4e 80 00 20 blr =============================================================================== ffc0cc9c : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { ffc0cc9c: 94 21 ff d8 stwu r1,-40(r1) ffc0cca0: 7c 08 02 a6 mflr r0 ffc0cca4: 93 a1 00 1c stw r29,28(r1) assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; ffc0cca8: 83 a6 00 00 lwz r29,0(r6) const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { ffc0ccac: 93 01 00 08 stw r24,8(r1) ffc0ccb0: 7c d8 33 78 mr r24,r6 rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) ffc0ccb4: 2f 9d 00 00 cmpwi cr7,r29,0 const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { ffc0ccb8: 93 41 00 10 stw r26,16(r1) ffc0ccbc: 7c 7a 1b 78 mr r26,r3 ffc0ccc0: 93 81 00 18 stw r28,24(r1) ffc0ccc4: 7c 9c 23 78 mr r28,r4 ffc0ccc8: 90 01 00 2c stw r0,44(r1) ffc0cccc: 93 21 00 0c stw r25,12(r1) ffc0ccd0: 93 61 00 14 stw r27,20(r1) ffc0ccd4: 93 c1 00 20 stw r30,32(r1) ffc0ccd8: 93 e1 00 24 stw r31,36(r1) rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) ffc0ccdc: 41 9e 01 00 beq- cr7,ffc0cddc <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { ffc0cce0: 3d 20 00 00 lis r9,0 ffc0cce4: 83 69 26 b0 lwz r27,9904(r9) } /* 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 ); ffc0cce8: 38 00 00 00 li r0,0 ffc0ccec: 3b e0 00 00 li r31,0 for (i = 0; i < rtems_device_table_size; i++) { ffc0ccf0: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0ccf4: 41 9e 00 4c beq- cr7,ffc0cd40 <== NEVER TAKEN if (!device_name_table[i].device_name) ffc0ccf8: 1c 00 00 14 mulli r0,r0,20 ffc0ccfc: 7f dd 00 2e lwzx r30,r29,r0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) ffc0cd00: 7f 43 d3 78 mr r3,r26 ffc0cd04: 7f 85 e3 78 mr r5,r28 device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) ffc0cd08: 2f 9e 00 00 cmpwi cr7,r30,0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) ffc0cd0c: 7f c4 f3 78 mr r4,r30 /* 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++) { ffc0cd10: 3b ff 00 01 addi r31,r31,1 if (!device_name_table[i].device_name) ffc0cd14: 7f 3d 02 14 add r25,r29,r0 ffc0cd18: 41 9e 00 1c beq- cr7,ffc0cd34 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) ffc0cd1c: 48 00 3f 89 bl ffc10ca4 ffc0cd20: 2f 83 00 00 cmpwi cr7,r3,0 ffc0cd24: 40 9e 00 10 bne- cr7,ffc0cd34 <== NEVER TAKEN continue; if (device_name_table[i].device_name[pathnamelen] != '\0') ffc0cd28: 7c 1e e0 ae lbzx r0,r30,r28 ffc0cd2c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cd30: 41 9e 00 50 beq- cr7,ffc0cd80 <== ALWAYS TAKEN /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { ffc0cd34: 7f 9b f8 40 cmplw cr7,r27,r31 ffc0cd38: 7f e0 fb 78 mr r0,r31 ffc0cd3c: 41 9d ff bc bgt+ cr7,ffc0ccf8 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); ffc0cd40: 48 00 2e 65 bl ffc0fba4 <__errno> ffc0cd44: 38 00 00 02 li r0,2 ffc0cd48: 90 03 00 00 stw r0,0(r3) ffc0cd4c: 38 60 ff ff li r3,-1 } ffc0cd50: 80 01 00 2c lwz r0,44(r1) ffc0cd54: 83 01 00 08 lwz r24,8(r1) ffc0cd58: 7c 08 03 a6 mtlr r0 ffc0cd5c: 83 21 00 0c lwz r25,12(r1) ffc0cd60: 83 41 00 10 lwz r26,16(r1) ffc0cd64: 83 61 00 14 lwz r27,20(r1) ffc0cd68: 83 81 00 18 lwz r28,24(r1) ffc0cd6c: 83 a1 00 1c lwz r29,28(r1) ffc0cd70: 83 c1 00 20 lwz r30,32(r1) ffc0cd74: 83 e1 00 24 lwz r31,36(r1) ffc0cd78: 38 21 00 28 addi r1,r1,40 ffc0cd7c: 4e 80 00 20 blr /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; ffc0cd80: 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]; ffc0cd84: 93 38 00 00 stw r25,0(r24) pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; ffc0cd88: 81 29 26 f8 lwz r9,9976(r9) ffc0cd8c: 80 09 00 28 lwz r0,40(r9) if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; ffc0cd90: 3d 20 00 00 lis r9,0 pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; ffc0cd94: 90 18 00 10 stw r0,16(r24) 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; ffc0cd98: 38 09 21 48 addi r0,r9,8520 pathloc->ops = &devFS_ops; ffc0cd9c: 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; ffc0cda0: 90 18 00 08 stw r0,8(r24) pathloc->ops = &devFS_ops; ffc0cda4: 38 09 21 80 addi r0,r9,8576 ffc0cda8: 90 18 00 0c stw r0,12(r24) return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } ffc0cdac: 80 01 00 2c lwz r0,44(r1) ffc0cdb0: 83 01 00 08 lwz r24,8(r1) ffc0cdb4: 7c 08 03 a6 mtlr r0 ffc0cdb8: 83 21 00 0c lwz r25,12(r1) ffc0cdbc: 83 41 00 10 lwz r26,16(r1) ffc0cdc0: 83 61 00 14 lwz r27,20(r1) ffc0cdc4: 83 81 00 18 lwz r28,24(r1) ffc0cdc8: 83 a1 00 1c lwz r29,28(r1) ffc0cdcc: 83 c1 00 20 lwz r30,32(r1) ffc0cdd0: 83 e1 00 24 lwz r31,36(r1) ffc0cdd4: 38 21 00 28 addi r1,r1,40 ffc0cdd8: 4e 80 00 20 blr } /* 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 ); ffc0cddc: 48 00 2d c9 bl ffc0fba4 <__errno> <== NOT EXECUTED ffc0cde0: 38 00 00 0e li r0,14 <== NOT EXECUTED ffc0cde4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0cde8: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0cdec: 4b ff ff c0 b ffc0cdac <== NOT EXECUTED =============================================================================== ffc03ad4 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc03ad4: 94 21 ff e8 stwu r1,-24(r1) ffc03ad8: 7c 08 02 a6 mflr r0 ffc03adc: 93 a1 00 0c stw r29,12(r1) rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( ffc03ae0: 3f a0 00 00 lis r29,0 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc03ae4: 90 01 00 1c stw r0,28(r1) rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( ffc03ae8: 80 1d 26 b0 lwz r0,9904(r29) int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc03aec: 93 e1 00 14 stw r31,20(r1) ffc03af0: 7c 7f 1b 78 mr r31,r3 rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( ffc03af4: 1c 60 00 14 mulli r3,r0,20 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc03af8: 93 c1 00 10 stw r30,16(r1) rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( ffc03afc: 48 00 90 55 bl ffc0cb50 <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) ffc03b00: 7c 7e 1b 79 mr. r30,r3 ffc03b04: 41 82 00 4c beq- ffc03b50 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); memset( ffc03b08: 80 bd 26 b0 lwz r5,9904(r29) ffc03b0c: 38 80 00 00 li r4,0 ffc03b10: 1c a5 00 14 mulli r5,r5,20 ffc03b14: 48 00 cc 69 bl ffc1077c device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; ffc03b18: 3d 20 00 00 lis r9,0 ffc03b1c: 39 29 21 48 addi r9,r9,8520 temp_mt_entry->mt_fs_root.ops = &devFS_ops; /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; ffc03b20: 93 df 00 1c stw r30,28(r31) sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; temp_mt_entry->mt_fs_root.ops = &devFS_ops; ffc03b24: 38 09 00 38 addi r0,r9,56 ffc03b28: 90 1f 00 28 stw r0,40(r31) /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; ffc03b2c: 38 60 00 00 li r3,0 device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; ffc03b30: 91 3f 00 24 stw r9,36(r31) /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; } ffc03b34: 80 01 00 1c lwz r0,28(r1) ffc03b38: 83 a1 00 0c lwz r29,12(r1) ffc03b3c: 7c 08 03 a6 mtlr r0 ffc03b40: 83 c1 00 10 lwz r30,16(r1) ffc03b44: 83 e1 00 14 lwz r31,20(r1) ffc03b48: 38 21 00 18 addi r1,r1,24 ffc03b4c: 4e 80 00 20 blr sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); ffc03b50: 48 00 c0 55 bl ffc0fba4 <__errno> <== NOT EXECUTED ffc03b54: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc03b58: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc03b5c: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc03b60: 4b ff ff d4 b ffc03b34 <== NOT EXECUTED =============================================================================== ffc03d58 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { ffc03d58: 94 21 ff e8 stwu r1,-24(r1) ffc03d5c: 7c 08 02 a6 mflr r0 ffc03d60: 7c 69 1b 78 mr r9,r3 ffc03d64: 90 01 00 1c stw r0,28(r1) rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.command = command; ffc03d68: 90 81 00 0c stw r4,12(r1) { rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; ffc03d6c: 81 63 00 3c lwz r11,60(r3) args.iop = iop; args.command = command; args.buffer = buffer; ffc03d70: 90 a1 00 10 stw r5,16(r1) status = rtems_io_control( ffc03d74: 38 a1 00 08 addi r5,r1,8 ffc03d78: 80 8b 00 0c lwz r4,12(r11) ffc03d7c: 80 6b 00 08 lwz r3,8(r11) rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; ffc03d80: 91 21 00 08 stw r9,8(r1) args.command = command; args.buffer = buffer; status = rtems_io_control( ffc03d84: 48 00 52 75 bl ffc08ff8 np->major, np->minor, (void *) &args ); if ( status ) ffc03d88: 2f 83 00 00 cmpwi cr7,r3,0 ffc03d8c: 40 9e 00 18 bne- cr7,ffc03da4 <== NEVER TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; } ffc03d90: 80 01 00 1c lwz r0,28(r1) ); if ( status ) return rtems_deviceio_errno(status); return args.ioctl_return; ffc03d94: 80 61 00 14 lwz r3,20(r1) } ffc03d98: 38 21 00 18 addi r1,r1,24 ffc03d9c: 7c 08 03 a6 mtlr r0 ffc03da0: 4e 80 00 20 blr np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); ffc03da4: 48 00 90 4d bl ffc0cdf0 <== NOT EXECUTED return args.ioctl_return; } ffc03da8: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc03dac: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc03db0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc03db4: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc03b64 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { ffc03b64: 94 21 ff d8 stwu r1,-40(r1) ffc03b68: 7c 08 02 a6 mflr r0 ffc03b6c: 93 81 00 18 stw r28,24(r1) ffc03b70: 7c dc 33 78 mr r28,r6 ffc03b74: 93 a1 00 1c stw r29,28(r1) ffc03b78: 7c bd 2b 78 mr r29,r5 ffc03b7c: 93 c1 00 20 stw r30,32(r1) ffc03b80: 7c 9e 23 78 mr r30,r4 ffc03b84: 93 e1 00 24 stw r31,36(r1) ffc03b88: 7c 7f 1b 78 mr r31,r3 ffc03b8c: 90 01 00 2c stw r0,44(r1) ffc03b90: 93 01 00 08 stw r24,8(r1) ffc03b94: 93 21 00 0c stw r25,12(r1) ffc03b98: 93 41 00 10 stw r26,16(r1) ffc03b9c: 93 61 00 14 stw r27,20(r1) * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && ffc03ba0: 88 03 00 00 lbz r0,0(r3) ffc03ba4: 2f 80 00 64 cmpwi cr7,r0,100 ffc03ba8: 41 9e 01 40 beq- cr7,ffc03ce8 <== ALWAYS TAKEN (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) ffc03bac: 57 c0 04 26 rlwinm r0,r30,0,16,19 ffc03bb0: 2f 80 60 00 cmpwi cr7,r0,24576 ffc03bb4: 41 9e 00 0c beq- cr7,ffc03bc0 <== NEVER TAKEN ffc03bb8: 2f 80 20 00 cmpwi cr7,r0,8192 ffc03bbc: 40 9e 01 58 bne- cr7,ffc03d14 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; ffc03bc0: 83 47 00 00 lwz r26,0(r7) if (!device_name_table) ffc03bc4: 2f 9a 00 00 cmpwi cr7,r26,0 ffc03bc8: 41 9e 01 74 beq- cr7,ffc03d3c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ ffc03bcc: 3d 20 00 00 lis r9,0 ffc03bd0: 83 29 26 b0 lwz r25,9904(r9) ffc03bd4: 2f 99 00 00 cmpwi cr7,r25,0 ffc03bd8: 41 9e 01 50 beq- cr7,ffc03d28 <== NEVER TAKEN 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 ); ffc03bdc: 38 00 00 00 li r0,0 ffc03be0: 3b 00 ff ff li r24,-1 ffc03be4: 3b 60 00 00 li r27,0 ffc03be8: 48 00 00 20 b ffc03c08 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) ffc03bec: 48 00 ce fd bl ffc10ae8 <== NOT EXECUTED ffc03bf0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc03bf4: 41 9e 00 b4 beq- cr7,ffc03ca8 <== NOT EXECUTED /* 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++){ ffc03bf8: 3b 7b 00 01 addi r27,r27,1 <== NOT EXECUTED ffc03bfc: 7f 9b c8 40 cmplw cr7,r27,r25 <== NOT EXECUTED ffc03c00: 7f 60 db 78 mr r0,r27 <== NOT EXECUTED ffc03c04: 40 9c 00 30 bge- cr7,ffc03c34 <== NOT EXECUTED if (device_name_table[i].device_name == NULL) ffc03c08: 1c 00 00 14 mulli r0,r0,20 ffc03c0c: 7c 1a 00 2e lwzx r0,r26,r0 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) ffc03c10: 7f e3 fb 78 mr r3,r31 device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) ffc03c14: 2f 80 00 00 cmpwi cr7,r0,0 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) ffc03c18: 7c 04 03 78 mr r4,r0 device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) ffc03c1c: 40 9e ff d0 bne+ cr7,ffc03bec <== NEVER TAKEN slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); ffc03c20: 7f 78 db 78 mr r24,r27 /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ ffc03c24: 3b 7b 00 01 addi r27,r27,1 ffc03c28: 7f 9b c8 40 cmplw cr7,r27,r25 ffc03c2c: 7f 60 db 78 mr r0,r27 ffc03c30: 41 9c ff d8 blt+ cr7,ffc03c08 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) ffc03c34: 2f 98 ff ff cmpwi cr7,r24,-1 ffc03c38: 41 9e 00 f0 beq- cr7,ffc03d28 <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc03c3c: 7f 60 00 a6 mfmsr r27 ffc03c40: 7c 10 42 a6 mfsprg r0,0 ffc03c44: 7f 60 00 78 andc r0,r27,r0 ffc03c48: 7c 00 01 24 mtmsr r0 rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; ffc03c4c: 1f 18 00 14 mulli r24,r24,20 ffc03c50: 7f fa c1 2e stwx r31,r26,r24 device_name_table[slot].device_name_length = strlen(path); ffc03c54: 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; ffc03c58: 7f 5a c2 14 add r26,r26,r24 device_name_table[slot].device_name_length = strlen(path); ffc03c5c: 48 00 cf ad bl ffc10c08 device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; ffc03c60: 93 da 00 10 stw r30,16(r26) if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); ffc03c64: 90 7a 00 04 stw r3,4(r26) device_name_table[slot].major = major; ffc03c68: 93 ba 00 08 stw r29,8(r26) device_name_table[slot].minor = minor; ffc03c6c: 93 9a 00 0c stw r28,12(r26) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc03c70: 7f 60 01 24 mtmsr r27 ffc03c74: 38 60 00 00 li r3,0 device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } ffc03c78: 80 01 00 2c lwz r0,44(r1) ffc03c7c: 83 01 00 08 lwz r24,8(r1) ffc03c80: 7c 08 03 a6 mtlr r0 ffc03c84: 83 21 00 0c lwz r25,12(r1) ffc03c88: 83 41 00 10 lwz r26,16(r1) ffc03c8c: 83 61 00 14 lwz r27,20(r1) ffc03c90: 83 81 00 18 lwz r28,24(r1) ffc03c94: 83 a1 00 1c lwz r29,28(r1) ffc03c98: 83 c1 00 20 lwz r30,32(r1) ffc03c9c: 83 e1 00 24 lwz r31,36(r1) ffc03ca0: 38 21 00 28 addi r1,r1,40 ffc03ca4: 4e 80 00 20 blr for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); ffc03ca8: 48 00 be fd bl ffc0fba4 <__errno> <== NOT EXECUTED ffc03cac: 38 00 00 11 li r0,17 <== NOT EXECUTED ffc03cb0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc03cb4: 38 60 ff ff li r3,-1 <== NOT EXECUTED device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } ffc03cb8: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc03cbc: 83 01 00 08 lwz r24,8(r1) <== NOT EXECUTED ffc03cc0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc03cc4: 83 21 00 0c lwz r25,12(r1) <== NOT EXECUTED ffc03cc8: 83 41 00 10 lwz r26,16(r1) <== NOT EXECUTED ffc03ccc: 83 61 00 14 lwz r27,20(r1) <== NOT EXECUTED ffc03cd0: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc03cd4: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc03cd8: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc03cdc: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc03ce0: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc03ce4: 4e 80 00 20 blr <== NOT EXECUTED * 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') && ffc03ce8: 88 03 00 01 lbz r0,1(r3) ffc03cec: 2f 80 00 65 cmpwi cr7,r0,101 ffc03cf0: 40 9e fe bc bne+ cr7,ffc03bac <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) ffc03cf4: 88 03 00 02 lbz r0,2(r3) ffc03cf8: 2f 80 00 76 cmpwi cr7,r0,118 ffc03cfc: 40 9e fe b0 bne+ cr7,ffc03bac <== NEVER TAKEN ffc03d00: 88 03 00 03 lbz r0,3(r3) ffc03d04: 38 60 00 00 li r3,0 ffc03d08: 2f 80 00 00 cmpwi cr7,r0,0 ffc03d0c: 40 9e fe a0 bne+ cr7,ffc03bac ffc03d10: 4b ff ff 68 b ffc03c78 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) rtems_set_errno_and_return_minus_one( EINVAL ); ffc03d14: 48 00 be 91 bl ffc0fba4 <__errno> <== NOT EXECUTED ffc03d18: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc03d1c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc03d20: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc03d24: 4b ff ff 54 b ffc03c78 <== NOT EXECUTED if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); ffc03d28: 48 00 be 7d bl ffc0fba4 <__errno> <== NOT EXECUTED ffc03d2c: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc03d30: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc03d34: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc03d38: 4b ff ff 40 b ffc03c78 <== NOT EXECUTED 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 ); ffc03d3c: 48 00 be 69 bl ffc0fba4 <__errno> <== NOT EXECUTED ffc03d40: 38 00 00 0e li r0,14 <== NOT EXECUTED ffc03d44: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc03d48: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc03d4c: 4b ff ff 2c b ffc03c78 <== NOT EXECUTED =============================================================================== ffc03db8 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc03db8: 94 21 ff e8 stwu r1,-24(r1) ffc03dbc: 7c 08 02 a6 mflr r0 ffc03dc0: 90 01 00 1c stw r0,28(r1) args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( ffc03dc4: 38 a1 00 08 addi r5,r1,8 rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = iop->flags; ffc03dc8: 80 03 00 18 lwz r0,24(r3) { rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; ffc03dcc: 81 23 00 3c lwz r9,60(r3) args.iop = iop; args.flags = iop->flags; ffc03dd0: 90 01 00 0c stw r0,12(r1) args.mode = mode; ffc03dd4: 90 c1 00 10 stw r6,16(r1) rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; ffc03dd8: 90 61 00 08 stw r3,8(r1) args.flags = iop->flags; args.mode = mode; status = rtems_io_open( ffc03ddc: 80 89 00 0c lwz r4,12(r9) ffc03de0: 80 69 00 08 lwz r3,8(r9) ffc03de4: 48 00 53 e9 bl ffc091cc np->major, np->minor, (void *) &args ); if ( status ) ffc03de8: 38 00 00 00 li r0,0 ffc03dec: 2f 83 00 00 cmpwi cr7,r3,0 ffc03df0: 41 be 00 0c beq+ cr7,ffc03dfc <== ALWAYS TAKEN return rtems_deviceio_errno(status); ffc03df4: 48 00 8f fd bl ffc0cdf0 <== NOT EXECUTED ffc03df8: 7c 60 1b 78 mr r0,r3 <== NOT EXECUTED return 0; } ffc03dfc: 7c 03 03 78 mr r3,r0 ffc03e00: 80 01 00 1c lwz r0,28(r1) ffc03e04: 38 21 00 18 addi r1,r1,24 ffc03e08: 7c 08 03 a6 mtlr r0 ffc03e0c: 4e 80 00 20 blr =============================================================================== ffc03e10 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc03e10: 94 21 ff d8 stwu r1,-40(r1) <== NOT EXECUTED ffc03e14: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc03e18: 7c 69 1b 78 mr r9,r3 <== NOT EXECUTED ffc03e1c: 90 01 00 2c stw r0,44(r1) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; ffc03e20: 80 03 00 18 lwz r0,24(r3) <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; ffc03e24: 81 43 00 3c lwz r10,60(r3) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; ffc03e28: 90 01 00 20 stw r0,32(r1) <== NOT EXECUTED args.bytes_moved = 0; ffc03e2c: 38 00 00 00 li r0,0 <== NOT EXECUTED np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; ffc03e30: 90 a1 00 1c stw r5,28(r1) <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( ffc03e34: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; ffc03e38: 90 01 00 24 stw r0,36(r1) <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; ffc03e3c: 81 63 00 10 lwz r11,16(r3) <== NOT EXECUTED ffc03e40: 81 83 00 14 lwz r12,20(r3) <== NOT EXECUTED args.buffer = buffer; ffc03e44: 90 81 00 18 stw r4,24(r1) <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( ffc03e48: 80 6a 00 08 lwz r3,8(r10) <== NOT EXECUTED ffc03e4c: 80 8a 00 0c lwz r4,12(r10) <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; ffc03e50: 91 61 00 10 stw r11,16(r1) <== NOT EXECUTED ffc03e54: 91 81 00 14 stw r12,20(r1) <== NOT EXECUTED rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; ffc03e58: 91 21 00 08 stw r9,8(r1) <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( ffc03e5c: 48 00 53 d1 bl ffc0922c <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) ffc03e60: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc03e64: 40 9e 00 18 bne- cr7,ffc03e7c <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } ffc03e68: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ); if ( status ) return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; ffc03e6c: 80 61 00 24 lwz r3,36(r1) <== NOT EXECUTED } ffc03e70: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc03e74: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc03e78: 4e 80 00 20 blr <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); ffc03e7c: 48 00 8f 75 bl ffc0cdf0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } ffc03e80: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc03e84: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc03e88: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc03e8c: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc03e90 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { ffc03e90: 94 21 ff f8 stwu r1,-8(r1) ffc03e94: 7c 08 02 a6 mflr r0 ffc03e98: 90 01 00 0c stw r0,12(r1) rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; ffc03e9c: 81 23 00 00 lwz r9,0(r3) if (!the_dev) ffc03ea0: 2f 89 00 00 cmpwi cr7,r9,0 ffc03ea4: 41 9e 00 30 beq- cr7,ffc03ed4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); ffc03ea8: 80 09 00 0c lwz r0,12(r9) buf->st_mode = the_dev->mode; ffc03eac: 38 60 00 00 li r3,0 ffc03eb0: 81 69 00 10 lwz r11,16(r9) rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; ffc03eb4: 81 29 00 08 lwz r9,8(r9) the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); ffc03eb8: 90 04 00 1c stw r0,28(r4) buf->st_mode = the_dev->mode; ffc03ebc: 91 64 00 0c stw r11,12(r4) the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); ffc03ec0: 91 24 00 18 stw r9,24(r4) buf->st_mode = the_dev->mode; return 0; } ffc03ec4: 80 01 00 0c lwz r0,12(r1) ffc03ec8: 38 21 00 08 addi r1,r1,8 ffc03ecc: 7c 08 03 a6 mtlr r0 ffc03ed0: 4e 80 00 20 blr { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); ffc03ed4: 48 00 bc d1 bl ffc0fba4 <__errno> <== NOT EXECUTED ffc03ed8: 38 00 00 0e li r0,14 <== NOT EXECUTED ffc03edc: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc03ee0: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc03ee4: 4b ff ff e0 b ffc03ec4 <== NOT EXECUTED =============================================================================== ffc03ee8 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { ffc03ee8: 94 21 ff d8 stwu r1,-40(r1) ffc03eec: 7c 08 02 a6 mflr r0 ffc03ef0: 7c 69 1b 78 mr r9,r3 ffc03ef4: 90 01 00 2c stw r0,44(r1) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; ffc03ef8: 80 03 00 18 lwz r0,24(r3) { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; ffc03efc: 81 43 00 3c lwz r10,60(r3) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; ffc03f00: 90 01 00 20 stw r0,32(r1) args.bytes_moved = 0; ffc03f04: 38 00 00 00 li r0,0 np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; ffc03f08: 90 a1 00 1c stw r5,28(r1) args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( ffc03f0c: 38 a1 00 08 addi r5,r1,8 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; ffc03f10: 90 01 00 24 stw r0,36(r1) rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; ffc03f14: 81 63 00 10 lwz r11,16(r3) ffc03f18: 81 83 00 14 lwz r12,20(r3) args.buffer = (void *) buffer; ffc03f1c: 90 81 00 18 stw r4,24(r1) args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( ffc03f20: 80 6a 00 08 lwz r3,8(r10) ffc03f24: 80 8a 00 0c lwz r4,12(r10) rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; ffc03f28: 91 61 00 10 stw r11,16(r1) ffc03f2c: 91 81 00 14 stw r12,20(r1) rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; ffc03f30: 91 21 00 08 stw r9,8(r1) args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( ffc03f34: 48 00 53 59 bl ffc0928c np->major, np->minor, (void *) &args ); if ( status ) ffc03f38: 2f 83 00 00 cmpwi cr7,r3,0 ffc03f3c: 40 9e 00 18 bne- cr7,ffc03f54 <== NEVER TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } ffc03f40: 80 01 00 2c lwz r0,44(r1) ); if ( status ) return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; ffc03f44: 80 61 00 24 lwz r3,36(r1) } ffc03f48: 38 21 00 28 addi r1,r1,40 ffc03f4c: 7c 08 03 a6 mtlr r0 ffc03f50: 4e 80 00 20 blr np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); ffc03f54: 48 00 8e 9d bl ffc0cdf0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } ffc03f58: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc03f5c: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc03f60: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc03f64: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc1057c : */ int device_close( rtems_libio_t *iop ) { ffc1057c: 94 21 ff e8 stwu r1,-24(r1) ffc10580: 7c 08 02 a6 mflr r0 ffc10584: 90 01 00 1c stw r0,28(r1) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = 0; ffc10588: 38 00 00 00 li r0,0 args.mode = 0; status = rtems_io_close( ffc1058c: 38 a1 00 08 addi r5,r1,8 the_jnode = iop->file_info; args.iop = iop; args.flags = 0; args.mode = 0; ffc10590: 90 01 00 10 stw r0,16(r1) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = 0; ffc10594: 90 01 00 0c stw r0,12(r1) rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; ffc10598: 90 61 00 08 stw r3,8(r1) { rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; ffc1059c: 81 23 00 3c lwz r9,60(r3) args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close( ffc105a0: 80 89 00 54 lwz r4,84(r9) ffc105a4: 80 69 00 50 lwz r3,80(r9) ffc105a8: 48 00 1a bd bl ffc12064 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { ffc105ac: 38 00 00 00 li r0,0 ffc105b0: 2f 83 00 00 cmpwi cr7,r3,0 ffc105b4: 41 be 00 0c beq+ cr7,ffc105c0 <== ALWAYS TAKEN return rtems_deviceio_errno(status); ffc105b8: 48 00 21 ad bl ffc12764 <== NOT EXECUTED ffc105bc: 7c 60 1b 78 mr r0,r3 <== NOT EXECUTED } return 0; } ffc105c0: 7c 03 03 78 mr r3,r0 ffc105c4: 80 01 00 1c lwz r0,28(r1) ffc105c8: 38 21 00 18 addi r1,r1,24 ffc105cc: 7c 08 03 a6 mtlr r0 ffc105d0: 4e 80 00 20 blr =============================================================================== ffc10428 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { ffc10428: 94 21 ff e8 stwu r1,-24(r1) ffc1042c: 7c 08 02 a6 mflr r0 rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; args.buffer = buffer; ffc10430: 90 a1 00 10 stw r5,16(r1) the_jnode = iop->file_info; status = rtems_io_control( ffc10434: 38 a1 00 08 addi r5,r1,8 int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { ffc10438: 90 01 00 1c stw r0,28(r1) rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; ffc1043c: 90 81 00 0c stw r4,12(r1) { rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; ffc10440: 90 61 00 08 stw r3,8(r1) args.command = command; args.buffer = buffer; the_jnode = iop->file_info; ffc10444: 81 23 00 3c lwz r9,60(r3) status = rtems_io_control( ffc10448: 80 89 00 54 lwz r4,84(r9) ffc1044c: 80 69 00 50 lwz r3,80(r9) ffc10450: 48 00 1c 75 bl ffc120c4 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) ffc10454: 2f 83 00 00 cmpwi cr7,r3,0 ffc10458: 40 9e 00 18 bne- cr7,ffc10470 <== NEVER TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; } ffc1045c: 80 01 00 1c lwz r0,28(r1) ); if ( status ) return rtems_deviceio_errno(status); return args.ioctl_return; ffc10460: 80 61 00 14 lwz r3,20(r1) } ffc10464: 38 21 00 18 addi r1,r1,24 ffc10468: 7c 08 03 a6 mtlr r0 ffc1046c: 4e 80 00 20 blr the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); ffc10470: 48 00 22 f5 bl ffc12764 <== NOT EXECUTED return args.ioctl_return; } ffc10474: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc10478: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc1047c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc10480: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc105d4 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc105d4: 94 21 ff e8 stwu r1,-24(r1) ffc105d8: 7c 08 02 a6 mflr r0 ffc105dc: 90 01 00 1c stw r0,28(r1) args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( ffc105e0: 38 a1 00 08 addi r5,r1,8 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = iop->flags; ffc105e4: 80 03 00 18 lwz r0,24(r3) rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; ffc105e8: 90 61 00 08 stw r3,8(r1) args.flags = iop->flags; ffc105ec: 90 01 00 0c stw r0,12(r1) args.mode = mode; ffc105f0: 90 c1 00 10 stw r6,16(r1) { rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; ffc105f4: 81 23 00 3c lwz r9,60(r3) args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( ffc105f8: 80 89 00 54 lwz r4,84(r9) ffc105fc: 80 69 00 50 lwz r3,80(r9) ffc10600: 48 00 1b 25 bl ffc12124 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) ffc10604: 38 00 00 00 li r0,0 ffc10608: 2f 83 00 00 cmpwi cr7,r3,0 ffc1060c: 41 be 00 0c beq+ cr7,ffc10618 <== ALWAYS TAKEN return rtems_deviceio_errno(status); ffc10610: 48 00 21 55 bl ffc12764 <== NOT EXECUTED ffc10614: 7c 60 1b 78 mr r0,r3 <== NOT EXECUTED return 0; } ffc10618: 7c 03 03 78 mr r3,r0 ffc1061c: 80 01 00 1c lwz r0,28(r1) ffc10620: 38 21 00 18 addi r1,r1,24 ffc10624: 7c 08 03 a6 mtlr r0 ffc10628: 4e 80 00 20 blr =============================================================================== ffc10500 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc10500: 94 21 ff d8 stwu r1,-40(r1) <== NOT EXECUTED ffc10504: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc10508: 90 01 00 2c stw r0,44(r1) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; ffc1050c: 80 03 00 18 lwz r0,24(r3) <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; ffc10510: 81 23 00 10 lwz r9,16(r3) <== NOT EXECUTED ffc10514: 81 43 00 14 lwz r10,20(r3) <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; ffc10518: 90 01 00 20 stw r0,32(r1) <== NOT EXECUTED args.bytes_moved = 0; ffc1051c: 38 00 00 00 li r0,0 <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; ffc10520: 90 a1 00 1c stw r5,28(r1) <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( ffc10524: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; ffc10528: 91 21 00 10 stw r9,16(r1) <== NOT EXECUTED ffc1052c: 91 41 00 14 stw r10,20(r1) <== NOT EXECUTED args.buffer = buffer; ffc10530: 90 81 00 18 stw r4,24(r1) <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; ffc10534: 90 01 00 24 stw r0,36(r1) <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; ffc10538: 90 61 00 08 stw r3,8(r1) <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; ffc1053c: 81 23 00 3c lwz r9,60(r3) <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( ffc10540: 80 89 00 54 lwz r4,84(r9) <== NOT EXECUTED ffc10544: 80 69 00 50 lwz r3,80(r9) <== NOT EXECUTED ffc10548: 48 00 1c 3d bl ffc12184 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) ffc1054c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc10550: 40 9e 00 18 bne- cr7,ffc10568 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } ffc10554: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ); if ( status ) return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; ffc10558: 80 61 00 24 lwz r3,36(r1) <== NOT EXECUTED } ffc1055c: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc10560: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc10564: 4e 80 00 20 blr <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); ffc10568: 48 00 21 fd bl ffc12764 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } ffc1056c: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc10570: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc10574: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc10578: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc10484 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { ffc10484: 94 21 ff d8 stwu r1,-40(r1) ffc10488: 7c 08 02 a6 mflr r0 ffc1048c: 90 01 00 2c stw r0,44(r1) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; ffc10490: 80 03 00 18 lwz r0,24(r3) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; ffc10494: 81 23 00 10 lwz r9,16(r3) ffc10498: 81 43 00 14 lwz r10,20(r3) args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; ffc1049c: 90 01 00 20 stw r0,32(r1) args.bytes_moved = 0; ffc104a0: 38 00 00 00 li r0,0 the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; ffc104a4: 90 a1 00 1c stw r5,28(r1) args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( ffc104a8: 38 a1 00 08 addi r5,r1,8 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; ffc104ac: 91 21 00 10 stw r9,16(r1) ffc104b0: 91 41 00 14 stw r10,20(r1) args.buffer = (void *) buffer; ffc104b4: 90 81 00 18 stw r4,24(r1) args.count = count; args.flags = iop->flags; args.bytes_moved = 0; ffc104b8: 90 01 00 24 stw r0,36(r1) rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; ffc104bc: 90 61 00 08 stw r3,8(r1) { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; ffc104c0: 81 23 00 3c lwz r9,60(r3) args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( ffc104c4: 80 89 00 54 lwz r4,84(r9) ffc104c8: 80 69 00 50 lwz r3,80(r9) ffc104cc: 48 00 1d 19 bl ffc121e4 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) ffc104d0: 2f 83 00 00 cmpwi cr7,r3,0 ffc104d4: 40 9e 00 18 bne- cr7,ffc104ec <== NEVER TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; } ffc104d8: 80 01 00 2c lwz r0,44(r1) ); if ( status ) return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; ffc104dc: 80 61 00 24 lwz r3,36(r1) } ffc104e0: 38 21 00 28 addi r1,r1,40 ffc104e4: 7c 08 03 a6 mtlr r0 ffc104e8: 4e 80 00 20 blr the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); ffc104ec: 48 00 22 79 bl ffc12764 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } ffc104f0: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc104f4: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc104f8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc104fc: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc06948 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { ffc06948: 94 21 ff f0 stwu r1,-16(r1) ffc0694c: 7c 08 02 a6 mflr r0 ffc06950: 90 01 00 14 stw r0,20(r1) rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { ffc06954: 80 03 00 b4 lwz r0,180(r3) /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { ffc06958: 93 e1 00 0c stw r31,12(r1) ffc0695c: 7c 7f 1b 78 mr r31,r3 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { ffc06960: 2f 80 00 00 cmpwi cr7,r0,0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { ffc06964: 93 c1 00 08 stw r30,8(r1) rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { ffc06968: 41 9e 00 6c beq- cr7,ffc069d4 <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0696c: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc06970: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED ffc06974: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED ffc06978: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { ffc0697c: 81 63 00 84 lwz r11,132(r3) <== NOT EXECUTED ffc06980: 81 23 00 80 lwz r9,128(r3) <== NOT EXECUTED ffc06984: 7f 8b 48 00 cmpw cr7,r11,r9 <== NOT EXECUTED ffc06988: 41 9e 00 48 beq- cr7,ffc069d0 <== NOT EXECUTED tty->rawOutBufState = rob_wait; ffc0698c: 3b c0 00 02 li r30,2 <== NOT EXECUTED ffc06990: 93 df 00 94 stw r30,148(r31) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc06994: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, ffc06998: 80 7f 00 8c lwz r3,140(r31) <== NOT EXECUTED ffc0699c: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc069a0: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc069a4: 48 00 1d 6d bl ffc08710 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) ffc069a8: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc069ac: 40 9e 00 40 bne- cr7,ffc069ec <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc069b0: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc069b4: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED ffc069b8: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED ffc069bc: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { ffc069c0: 81 7f 00 84 lwz r11,132(r31) <== NOT EXECUTED ffc069c4: 81 3f 00 80 lwz r9,128(r31) <== NOT EXECUTED ffc069c8: 7f 8b 48 00 cmpw cr7,r11,r9 <== NOT EXECUTED ffc069cc: 40 9e ff c4 bne+ cr7,ffc06990 <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc069d0: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); } } ffc069d4: 80 01 00 14 lwz r0,20(r1) ffc069d8: 83 c1 00 08 lwz r30,8(r1) ffc069dc: 7c 08 03 a6 mtlr r0 ffc069e0: 83 e1 00 0c lwz r31,12(r1) ffc069e4: 38 21 00 10 addi r1,r1,16 ffc069e8: 4e 80 00 20 blr rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); ffc069ec: 48 00 26 4d bl ffc09038 <== NOT EXECUTED =============================================================================== ffc056b4 : int dup2( int fildes, int fildes2 ) { ffc056b4: 94 21 ff 98 stwu r1,-104(r1) ffc056b8: 7c 08 02 a6 mflr r0 ffc056bc: 93 e1 00 64 stw r31,100(r1) /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); ffc056c0: 3b e1 00 08 addi r31,r1,8 int dup2( int fildes, int fildes2 ) { ffc056c4: 93 c1 00 60 stw r30,96(r1) ffc056c8: 7c 9e 23 78 mr r30,r4 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); ffc056cc: 7f e4 fb 78 mr r4,r31 int dup2( int fildes, int fildes2 ) { ffc056d0: 93 a1 00 5c stw r29,92(r1) ffc056d4: 7c 7d 1b 78 mr r29,r3 ffc056d8: 90 01 00 6c stw r0,108(r1) /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); ffc056dc: 48 00 08 f5 bl ffc05fd0 if ( status == -1 ) ffc056e0: 2f 83 ff ff cmpwi cr7,r3,-1 ffc056e4: 40 9e 00 24 bne- cr7,ffc05708 <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); ffc056e8: 38 60 ff ff li r3,-1 } ffc056ec: 80 01 00 6c lwz r0,108(r1) ffc056f0: 83 a1 00 5c lwz r29,92(r1) ffc056f4: 7c 08 03 a6 mtlr r0 ffc056f8: 83 c1 00 60 lwz r30,96(r1) ffc056fc: 83 e1 00 64 lwz r31,100(r1) ffc05700: 38 21 00 68 addi r1,r1,104 ffc05704: 4e 80 00 20 blr /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); ffc05708: 7f e4 fb 78 mr r4,r31 ffc0570c: 7f c3 f3 78 mr r3,r30 ffc05710: 48 00 08 c1 bl ffc05fd0 if ( status == -1 ) ffc05714: 2f 83 ff ff cmpwi cr7,r3,-1 ffc05718: 41 be ff d0 beq- cr7,ffc056e8 <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); ffc0571c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc05720: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED ffc05724: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc05728: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc0572c: 48 00 03 41 bl ffc05a6c <== NOT EXECUTED ffc05730: 4b ff ff bc b ffc056ec <== NOT EXECUTED =============================================================================== ffc0625c : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { ffc0625c: 94 21 ff e0 stwu r1,-32(r1) <== NOT EXECUTED ffc06260: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc06264: 90 01 00 24 stw r0,36(r1) <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { ffc06268: 81 24 00 3c lwz r9,60(r4) <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { ffc0626c: 93 e1 00 1c stw r31,28(r1) <== NOT EXECUTED ffc06270: 7c 9f 23 78 mr r31,r4 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { ffc06274: 71 20 02 00 andi. r0,r9,512 <== NOT EXECUTED ffc06278: 41 82 00 2c beq- ffc062a4 <== NOT EXECUTED ffc0627c: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc06280: 81 29 26 e0 lwz r9,9952(r9) <== NOT EXECUTED ffc06284: 7d 29 1a 14 add r9,r9,r3 <== NOT EXECUTED ffc06288: 88 09 00 01 lbz r0,1(r9) <== NOT EXECUTED ffc0628c: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED ffc06290: 41 82 00 14 beq- ffc062a4 <== NOT EXECUTED ffc06294: 2f 83 00 09 cmpwi cr7,r3,9 <== NOT EXECUTED ffc06298: 41 9e 00 0c beq- cr7,ffc062a4 <== NOT EXECUTED ffc0629c: 2f 83 00 0a cmpwi cr7,r3,10 <== NOT EXECUTED ffc062a0: 40 9e 00 20 bne- cr7,ffc062c0 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); ffc062a4: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc062a8: 4b ff fe 1d bl ffc060c4 <== NOT EXECUTED } } ffc062ac: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED ffc062b0: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc062b4: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc062b8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc062bc: 4e 80 00 20 blr <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; ffc062c0: 68 60 00 40 xori r0,r3,64 <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; ffc062c4: 39 20 00 5e li r9,94 <== NOT EXECUTED echobuf[1] = c ^ 0x40; ffc062c8: 98 01 00 09 stb r0,9(r1) <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); ffc062cc: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED ffc062d0: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; ffc062d4: 99 21 00 08 stb r9,8(r1) <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); ffc062d8: 38 80 00 02 li r4,2 <== NOT EXECUTED ffc062dc: 4b ff fc 5d bl ffc05f38 <== NOT EXECUTED tty->column += 2; ffc062e0: 81 3f 00 28 lwz r9,40(r31) <== NOT EXECUTED ffc062e4: 38 09 00 02 addi r0,r9,2 <== NOT EXECUTED ffc062e8: 90 1f 00 28 stw r0,40(r31) <== NOT EXECUTED } else { oproc (c, tty); } } ffc062ec: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED ffc062f0: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc062f4: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc062f8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc062fc: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0500c : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) ffc0500c: 3d 20 00 00 lis r9,0 <== NOT EXECUTED fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { ffc05010: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED ffc05014: 7c 08 02 a6 mflr r0 <== NOT EXECUTED if (group_fp != NULL) ffc05018: 80 69 28 8c lwz r3,10380(r9) <== NOT EXECUTED fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { ffc0501c: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED if (group_fp != NULL) ffc05020: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc05024: 41 9e 00 08 beq- cr7,ffc0502c <== NOT EXECUTED fclose(group_fp); ffc05028: 48 01 11 5d bl ffc16184 <== NOT EXECUTED } ffc0502c: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc05030: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc05034: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05038: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0503c : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) ffc0503c: 3d 20 00 00 lis r9,0 <== NOT EXECUTED fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { ffc05040: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED ffc05044: 7c 08 02 a6 mflr r0 <== NOT EXECUTED if (passwd_fp != NULL) ffc05048: 80 69 28 90 lwz r3,10384(r9) <== NOT EXECUTED fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { ffc0504c: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED if (passwd_fp != NULL) ffc05050: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc05054: 41 9e 00 08 beq- cr7,ffc0505c <== NOT EXECUTED fclose(passwd_fp); ffc05058: 48 01 11 2d bl ffc16184 <== NOT EXECUTED } ffc0505c: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc05060: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc05064: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05068: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc06300 : * 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) { ffc06300: 94 21 ff e0 stwu r1,-32(r1) <== NOT EXECUTED ffc06304: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc06308: 7d 80 00 26 mfcr r12 <== NOT EXECUTED ffc0630c: 90 01 00 24 stw r0,36(r1) <== NOT EXECUTED if (tty->ccount == 0) ffc06310: 81 23 00 20 lwz r9,32(r3) <== NOT EXECUTED * 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) { ffc06314: 93 e1 00 1c stw r31,28(r1) <== NOT EXECUTED ffc06318: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED if (tty->ccount == 0) ffc0631c: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED * 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) { ffc06320: 93 61 00 0c stw r27,12(r1) <== NOT EXECUTED ffc06324: 93 81 00 10 stw r28,16(r1) <== NOT EXECUTED ffc06328: 93 a1 00 14 stw r29,20(r1) <== NOT EXECUTED ffc0632c: 93 c1 00 18 stw r30,24(r1) <== NOT EXECUTED ffc06330: 91 81 00 08 stw r12,8(r1) <== NOT EXECUTED if (tty->ccount == 0) ffc06334: 41 9e 00 9c beq- cr7,ffc063d0 <== NOT EXECUTED return; if (lineFlag) { ffc06338: 2e 04 00 00 cmpwi cr4,r4,0 <== NOT EXECUTED ffc0633c: 40 92 00 84 bne- cr4,ffc063c0 <== NOT EXECUTED ffc06340: 80 03 00 3c lwz r0,60(r3) <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { ffc06344: 3f 80 00 00 lis r28,0 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); ffc06348: 3f 60 ff c2 lis r27,-62 <== NOT EXECUTED ffc0634c: 3f a0 ff c2 lis r29,-62 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { ffc06350: 3b 9c 26 e0 addi r28,r28,9952 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); ffc06354: 3b 7b f6 a8 addi r27,r27,-2392 <== NOT EXECUTED ffc06358: 3b bd f6 a4 addi r29,r29,-2396 <== NOT EXECUTED } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { ffc0635c: 70 0a 00 08 andi. r10,r0,8 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; ffc06360: 81 7f 00 1c lwz r11,28(r31) <== NOT EXECUTED ffc06364: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED ffc06368: 91 3f 00 20 stw r9,32(r31) <== NOT EXECUTED ffc0636c: 7f cb 48 ae lbzx r30,r11,r9 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { ffc06370: 41 82 00 38 beq- ffc063a8 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { ffc06374: 40 92 00 0c bne- cr4,ffc06380 <== NOT EXECUTED ffc06378: 70 0a 00 10 andi. r10,r0,16 <== NOT EXECUTED ffc0637c: 41 82 01 d8 beq- ffc06554 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { ffc06380: 2f 9e 00 09 cmpwi cr7,r30,9 <== NOT EXECUTED ffc06384: 41 9e 00 dc beq- cr7,ffc06460 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { ffc06388: 81 3c 00 00 lwz r9,0(r28) <== NOT EXECUTED ffc0638c: 3b de 00 01 addi r30,r30,1 <== NOT EXECUTED ffc06390: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc06394: 7d 29 f0 ae lbzx r9,r9,r30 <== NOT EXECUTED ffc06398: 71 2b 00 20 andi. r11,r9,32 <== NOT EXECUTED ffc0639c: 41 82 00 a0 beq- ffc0643c <== NOT EXECUTED ffc063a0: 70 09 02 00 andi. r9,r0,512 <== NOT EXECUTED ffc063a4: 40 82 00 58 bne- ffc063fc <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) ffc063a8: 41 92 00 28 beq- cr4,ffc063d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { ffc063ac: 81 3f 00 20 lwz r9,32(r31) <== NOT EXECUTED ffc063b0: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc063b4: 41 9e 00 1c beq- cr7,ffc063d0 <== NOT EXECUTED ffc063b8: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED ffc063bc: 4b ff ff a0 b ffc0635c <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { ffc063c0: 80 03 00 3c lwz r0,60(r3) <== NOT EXECUTED ffc063c4: 70 0b 00 08 andi. r11,r0,8 <== NOT EXECUTED ffc063c8: 40 a2 01 34 bne+ ffc064fc <== NOT EXECUTED tty->ccount = 0; ffc063cc: 91 63 00 20 stw r11,32(r3) <== NOT EXECUTED } } if (!lineFlag) break; } } ffc063d0: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED ffc063d4: 81 81 00 08 lwz r12,8(r1) <== NOT EXECUTED ffc063d8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc063dc: 83 61 00 0c lwz r27,12(r1) <== NOT EXECUTED ffc063e0: 83 81 00 10 lwz r28,16(r1) <== NOT EXECUTED ffc063e4: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED ffc063e8: 83 a1 00 14 lwz r29,20(r1) <== NOT EXECUTED ffc063ec: 83 c1 00 18 lwz r30,24(r1) <== NOT EXECUTED ffc063f0: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc063f4: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc063f8: 4e 80 00 20 blr <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); ffc063fc: 38 80 00 03 li r4,3 <== NOT EXECUTED ffc06400: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED ffc06404: 4b ff fb 35 bl ffc05f38 <== NOT EXECUTED if (tty->column) ffc06408: 81 3f 00 28 lwz r9,40(r31) <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); ffc0640c: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED if (tty->column) ffc06410: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc06414: 41 9e 00 0c beq- cr7,ffc06420 <== NOT EXECUTED tty->column--; ffc06418: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED ffc0641c: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { ffc06420: 81 3c 00 00 lwz r9,0(r28) <== NOT EXECUTED ffc06424: 7c 09 f0 ae lbzx r0,r9,r30 <== NOT EXECUTED ffc06428: 70 0a 00 20 andi. r10,r0,32 <== NOT EXECUTED ffc0642c: 41 82 00 10 beq- ffc0643c <== NOT EXECUTED ffc06430: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED ffc06434: 70 0b 02 00 andi. r11,r0,512 <== NOT EXECUTED ffc06438: 41 a2 ff 70 beq- ffc063a8 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); ffc0643c: 38 80 00 03 li r4,3 <== NOT EXECUTED ffc06440: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED ffc06444: 4b ff fa f5 bl ffc05f38 <== NOT EXECUTED if (tty->column) ffc06448: 81 3f 00 28 lwz r9,40(r31) <== NOT EXECUTED ffc0644c: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc06450: 41 be ff 58 beq- cr7,ffc063a8 <== NOT EXECUTED tty->column--; ffc06454: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED ffc06458: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED ffc0645c: 4b ff ff 4c b ffc063a8 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc06460: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED 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; ffc06464: 83 df 00 2c lwz r30,44(r31) <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc06468: 41 9e 00 44 beq- cr7,ffc064ac <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) ffc0646c: 54 0a bf fe rlwinm r10,r0,23,31,31 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { ffc06470: 81 1c 00 00 lwz r8,0(r28) <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) ffc06474: 2f 0a 00 00 cmpwi cr6,r10,0 <== NOT EXECUTED ffc06478: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { ffc0647c: 39 20 00 00 li r9,0 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; ffc06480: 7c 0b 48 ae lbzx r0,r11,r9 <== NOT EXECUTED ffc06484: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED if (c == '\t') { ffc06488: 2f 80 00 09 cmpwi cr7,r0,9 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { ffc0648c: 7d 48 02 14 add r10,r8,r0 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { ffc06490: 41 9e 00 5c beq- cr7,ffc064ec <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { ffc06494: 88 0a 00 01 lbz r0,1(r10) <== NOT EXECUTED ffc06498: 70 0a 00 20 andi. r10,r0,32 <== NOT EXECUTED ffc0649c: 41 82 00 44 beq- ffc064e0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) ffc064a0: 41 9a 00 08 beq- cr6,ffc064a8 <== NOT EXECUTED col += 2; ffc064a4: 3b de 00 02 addi r30,r30,2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc064a8: 42 00 ff d8 bdnz+ ffc06480 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { ffc064ac: 80 1f 00 28 lwz r0,40(r31) <== NOT EXECUTED ffc064b0: 7f 9e 00 00 cmpw cr7,r30,r0 <== NOT EXECUTED ffc064b4: 40 bc fe f4 bge- cr7,ffc063a8 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); ffc064b8: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc064bc: 38 80 00 01 li r4,1 <== NOT EXECUTED ffc064c0: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED ffc064c4: 4b ff fa 75 bl ffc05f38 <== NOT EXECUTED tty->column--; ffc064c8: 81 3f 00 28 lwz r9,40(r31) <== NOT EXECUTED ffc064cc: 38 09 ff ff addi r0,r9,-1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { ffc064d0: 7f 9e 00 00 cmpw cr7,r30,r0 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; ffc064d4: 90 1f 00 28 stw r0,40(r31) <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { ffc064d8: 41 9c ff e0 blt+ cr7,ffc064b8 <== NOT EXECUTED ffc064dc: 4b ff fe cc b ffc063a8 <== NOT EXECUTED else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; ffc064e0: 3b de 00 01 addi r30,r30,1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc064e4: 42 00 ff 9c bdnz+ ffc06480 <== NOT EXECUTED ffc064e8: 4b ff ff c4 b ffc064ac <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; ffc064ec: 63 de 00 07 ori r30,r30,7 <== NOT EXECUTED ffc064f0: 3b de 00 01 addi r30,r30,1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc064f4: 42 00 ff 8c bdnz+ ffc06480 <== NOT EXECUTED ffc064f8: 4b ff ff b4 b ffc064ac <== NOT EXECUTED if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { ffc064fc: 70 0b 00 10 andi. r11,r0,16 <== NOT EXECUTED ffc06500: 40 82 fe 44 bne+ ffc06344 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); ffc06504: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; ffc06508: 91 63 00 20 stw r11,32(r3) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); ffc0650c: 88 63 00 44 lbz r3,68(r3) <== NOT EXECUTED ffc06510: 4b ff fd 4d bl ffc0625c <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) ffc06514: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED echo ('\n', tty); ffc06518: 7f e4 fb 78 mr r4,r31 <== 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) ffc0651c: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED echo ('\n', tty); ffc06520: 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) ffc06524: 41 82 fe ac beq+ ffc063d0 <== NOT EXECUTED } } if (!lineFlag) break; } } ffc06528: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED ffc0652c: 81 81 00 08 lwz r12,8(r1) <== NOT EXECUTED ffc06530: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc06534: 83 61 00 0c lwz r27,12(r1) <== NOT EXECUTED ffc06538: 83 81 00 10 lwz r28,16(r1) <== NOT EXECUTED ffc0653c: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED ffc06540: 83 a1 00 14 lwz r29,20(r1) <== NOT EXECUTED ffc06544: 83 c1 00 18 lwz r30,24(r1) <== NOT EXECUTED ffc06548: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc0654c: 38 21 00 20 addi r1,r1,32 <== 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); ffc06550: 4b ff fd 0c b ffc0625c <== NOT EXECUTED } } if (!lineFlag) break; } } ffc06554: 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); ffc06558: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED } } if (!lineFlag) break; } } ffc0655c: 81 81 00 08 lwz r12,8(r1) <== NOT EXECUTED ffc06560: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); ffc06564: 88 7f 00 43 lbz r3,67(r31) <== NOT EXECUTED } } if (!lineFlag) break; } } ffc06568: 83 61 00 0c lwz r27,12(r1) <== NOT EXECUTED ffc0656c: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED ffc06570: 83 81 00 10 lwz r28,16(r1) <== NOT EXECUTED ffc06574: 83 a1 00 14 lwz r29,20(r1) <== NOT EXECUTED ffc06578: 83 c1 00 18 lwz r30,24(r1) <== NOT EXECUTED ffc0657c: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc06580: 38 21 00 20 addi r1,r1,32 <== 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); ffc06584: 4b ff fc d8 b ffc0625c <== NOT EXECUTED =============================================================================== ffc05a6c : int fcntl( int fd, int cmd, ... ) { ffc05a6c: 94 21 ff c0 stwu r1,-64(r1) ffc05a70: 7c 08 02 a6 mflr r0 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc05a74: 3d 20 00 00 lis r9,0 int fcntl( int fd, int cmd, ... ) { ffc05a78: 90 01 00 44 stw r0,68(r1) int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc05a7c: 80 09 26 8c lwz r0,9868(r9) ... ) { int ret; va_list ap; va_start( ap, cmd ); ffc05a80: 39 20 00 02 li r9,2 ffc05a84: 99 21 00 08 stb r9,8(r1) ffc05a88: 39 21 00 48 addi r9,r1,72 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc05a8c: 7f 83 00 40 cmplw cr7,r3,r0 ... ) { int ret; va_list ap; va_start( ap, cmd ); ffc05a90: 91 21 00 0c stw r9,12(r1) ffc05a94: 39 21 00 10 addi r9,r1,16 int fcntl( int fd, int cmd, ... ) { ffc05a98: 93 a1 00 34 stw r29,52(r1) ffc05a9c: 93 c1 00 38 stw r30,56(r1) ffc05aa0: 93 e1 00 3c stw r31,60(r1) ffc05aa4: 90 a1 00 18 stw r5,24(r1) ffc05aa8: 90 c1 00 1c stw r6,28(r1) ffc05aac: 90 e1 00 20 stw r7,32(r1) int ret; va_list ap; va_start( ap, cmd ); ffc05ab0: 91 21 00 10 stw r9,16(r1) int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc05ab4: 40 9c 02 58 bge- cr7,ffc05d0c <== NEVER TAKEN iop = rtems_libio_iop( fd ); ffc05ab8: 3f a0 00 00 lis r29,0 ffc05abc: 1c 63 00 48 mulli r3,r3,72 ffc05ac0: 81 7d 27 50 lwz r11,10064(r29) ffc05ac4: 7f cb 1a 14 add r30,r11,r3 rtems_libio_check_is_open(iop); ffc05ac8: 80 7e 00 18 lwz r3,24(r30) ffc05acc: 70 69 01 00 andi. r9,r3,256 ffc05ad0: 41 82 02 3c beq- ffc05d0c <== NEVER TAKEN /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { ffc05ad4: 2b 84 00 09 cmplwi cr7,r4,9 ffc05ad8: 40 9d 00 18 ble- cr7,ffc05af0 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; ffc05adc: 48 01 0e 6d bl ffc16948 <__errno> ffc05ae0: 38 00 00 16 li r0,22 ffc05ae4: 90 03 00 00 stw r0,0(r3) ffc05ae8: 3b e0 ff ff li r31,-1 ffc05aec: 48 00 00 30 b ffc05b1c /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { ffc05af0: 3d 20 ff c2 lis r9,-62 ffc05af4: 39 29 43 10 addi r9,r9,17168 ffc05af8: 54 8a 10 3a rlwinm r10,r4,2,0,29 ffc05afc: 7d 49 50 2e lwzx r10,r9,r10 ffc05b00: 7d 2a 4a 14 add r9,r10,r9 ffc05b04: 7d 29 03 a6 mtctr r9 ffc05b08: 4e 80 04 20 bctr errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; ffc05b0c: 48 01 0e 3d bl ffc16948 <__errno> ffc05b10: 38 00 00 86 li r0,134 ffc05b14: 90 03 00 00 stw r0,0(r3) ffc05b18: 3b e0 ff ff li r31,-1 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } ffc05b1c: 80 01 00 44 lwz r0,68(r1) ffc05b20: 7f e3 fb 78 mr r3,r31 ffc05b24: 83 a1 00 34 lwz r29,52(r1) ffc05b28: 7c 08 03 a6 mtlr r0 ffc05b2c: 83 c1 00 38 lwz r30,56(r1) ffc05b30: 83 e1 00 3c lwz r31,60(r1) ffc05b34: 38 21 00 40 addi r1,r1,64 ffc05b38: 4e 80 00 20 blr case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); ffc05b3c: 89 21 00 08 lbz r9,8(r1) ffc05b40: 2b 89 00 07 cmplwi cr7,r9,7 ffc05b44: 40 9d 01 b0 ble- cr7,ffc05cf4 <== ALWAYS TAKEN ffc05b48: 81 21 00 0c lwz r9,12(r1) <== NOT EXECUTED ffc05b4c: 38 09 00 04 addi r0,r9,4 <== NOT EXECUTED ffc05b50: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc05b54: 80 69 00 00 lwz r3,0(r9) /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); ffc05b58: 3b e0 00 00 li r31,0 case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); ffc05b5c: 90 81 00 28 stw r4,40(r1) ffc05b60: 48 00 0a a9 bl ffc06608 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); ffc05b64: 39 20 fd fe li r9,-514 ffc05b68: 80 1e 00 18 lwz r0,24(r30) ffc05b6c: 70 63 02 01 andi. r3,r3,513 ffc05b70: 80 81 00 28 lwz r4,40(r1) ffc05b74: 7d 20 00 38 and r0,r9,r0 ffc05b78: 7c 60 03 78 or r0,r3,r0 ffc05b7c: 90 1e 00 18 stw r0,24(r30) ffc05b80: 48 00 00 1c b ffc05b9c else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); ffc05b84: 90 81 00 28 stw r4,40(r1) ffc05b88: 48 00 07 61 bl ffc062e8 ffc05b8c: 7c 7f 1b 78 mr r31,r3 ffc05b90: 80 81 00 28 lwz r4,40(r1) /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { ffc05b94: 2f 9f 00 00 cmpwi cr7,r31,0 ffc05b98: 41 bc ff 84 blt- cr7,ffc05b1c <== NEVER TAKEN if (iop->handlers->fcntl_h) { ffc05b9c: 81 3e 00 40 lwz r9,64(r30) ffc05ba0: 80 09 00 30 lwz r0,48(r9) ffc05ba4: 2f 80 00 00 cmpwi cr7,r0,0 ffc05ba8: 41 be ff 74 beq- cr7,ffc05b1c <== NEVER TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); ffc05bac: 7c 83 23 78 mr r3,r4 ffc05bb0: 7c 09 03 a6 mtctr r0 ffc05bb4: 7f c4 f3 78 mr r4,r30 ffc05bb8: 4e 80 04 21 bctrl if (err) { ffc05bbc: 7c 7e 1b 79 mr. r30,r3 ffc05bc0: 41 82 ff 5c beq+ ffc05b1c <== ALWAYS TAKEN errno = err; ffc05bc4: 48 01 0d 85 bl ffc16948 <__errno> <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } ffc05bc8: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED if (ret >= 0) { if (iop->handlers->fcntl_h) { int err = (*iop->handlers->fcntl_h)( cmd, iop ); if (err) { errno = err; ffc05bcc: 3b e0 ff ff li r31,-1 <== NOT EXECUTED ffc05bd0: 93 c3 00 00 stw r30,0(r3) <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } ffc05bd4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05bd8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc05bdc: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc05be0: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc05be4: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc05be8: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc05bec: 4e 80 00 20 blr <== NOT EXECUTED * if a new process is exec()'ed. Since RTEMS does not support * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) ffc05bf0: 89 21 00 08 lbz r9,8(r1) ffc05bf4: 2b 89 00 07 cmplwi cr7,r9,7 ffc05bf8: 41 9d 00 ec bgt- cr7,ffc05ce4 <== NEVER TAKEN ffc05bfc: 38 09 00 01 addi r0,r9,1 ffc05c00: 81 61 00 10 lwz r11,16(r1) ffc05c04: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc05c08: 98 01 00 08 stb r0,8(r1) ffc05c0c: 7d 2b 4a 14 add r9,r11,r9 ffc05c10: 80 09 00 00 lwz r0,0(r9) ffc05c14: 2f 80 00 00 cmpwi cr7,r0,0 ffc05c18: 41 9e 01 08 beq- cr7,ffc05d20 <== NEVER TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; ffc05c1c: 60 63 08 00 ori r3,r3,2048 ffc05c20: 90 7e 00 18 stw r3,24(r30) ffc05c24: 3b e0 00 00 li r31,0 ffc05c28: 4b ff ff 74 b ffc05b9c diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); ffc05c2c: 54 7f af fe rlwinm r31,r3,21,31,31 ffc05c30: 4b ff ff 6c b ffc05b9c * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); ffc05c34: 89 21 00 08 lbz r9,8(r1) ffc05c38: 2b 89 00 07 cmplwi cr7,r9,7 ffc05c3c: 41 9d 00 98 bgt- cr7,ffc05cd4 <== NEVER TAKEN ffc05c40: 39 49 00 01 addi r10,r9,1 ffc05c44: 81 01 00 10 lwz r8,16(r1) ffc05c48: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc05c4c: 99 41 00 08 stb r10,8(r1) ffc05c50: 7d 28 4a 14 add r9,r8,r9 ffc05c54: 81 29 00 00 lwz r9,0(r9) if ( fd2 ) ffc05c58: 2f 89 00 00 cmpwi cr7,r9,0 ffc05c5c: 41 9e 00 d4 beq- cr7,ffc05d30 <== ALWAYS TAKEN diop = rtems_libio_iop( fd2 ); ffc05c60: 7f 80 48 40 cmplw cr7,r0,r9 <== NOT EXECUTED ffc05c64: 3b e0 00 00 li r31,0 <== NOT EXECUTED ffc05c68: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc05c6c: 40 9d 00 10 ble- cr7,ffc05c7c <== NOT EXECUTED ffc05c70: 1d 29 00 48 mulli r9,r9,72 <== NOT EXECUTED ffc05c74: 7c 6b 4a 14 add r3,r11,r9 <== NOT EXECUTED ffc05c78: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc05c7c: 81 1e 00 1c lwz r8,28(r30) ret = (int) (diop - rtems_libio_iops); ffc05c80: 7f eb f8 50 subf r31,r11,r31 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc05c84: 81 5e 00 20 lwz r10,32(r30) ret = (int) (diop - rtems_libio_iops); ffc05c88: 7f ff 1e 70 srawi r31,r31,3 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc05c8c: 81 3e 00 24 lwz r9,36(r30) ffc05c90: 80 1e 00 28 lwz r0,40(r30) ffc05c94: 91 03 00 1c stw r8,28(r3) ret = (int) (diop - rtems_libio_iops); ffc05c98: 3d 00 38 e3 lis r8,14563 ffc05c9c: 61 08 8e 39 ori r8,r8,36409 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc05ca0: 91 23 00 24 stw r9,36(r3) ret = (int) (diop - rtems_libio_iops); ffc05ca4: 7f ff 41 d6 mullw r31,r31,r8 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc05ca8: 90 03 00 28 stw r0,40(r3) ffc05cac: 91 43 00 20 stw r10,32(r3) ret = -1; break; } } diop->handlers = iop->handlers; ffc05cb0: 81 7e 00 40 lwz r11,64(r30) diop->file_info = iop->file_info; ffc05cb4: 81 3e 00 3c lwz r9,60(r30) diop->flags = iop->flags; ffc05cb8: 80 1e 00 18 lwz r0,24(r30) diop->pathinfo = iop->pathinfo; ffc05cbc: 81 5e 00 2c lwz r10,44(r30) ret = -1; break; } } diop->handlers = iop->handlers; ffc05cc0: 91 63 00 40 stw r11,64(r3) diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc05cc4: 91 43 00 2c stw r10,44(r3) break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; ffc05cc8: 91 23 00 3c stw r9,60(r3) diop->flags = iop->flags; ffc05ccc: 90 03 00 18 stw r0,24(r3) ffc05cd0: 4b ff fe c4 b ffc05b94 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); ffc05cd4: 81 21 00 0c lwz r9,12(r1) <== NOT EXECUTED ffc05cd8: 39 49 00 04 addi r10,r9,4 <== NOT EXECUTED ffc05cdc: 91 41 00 0c stw r10,12(r1) <== NOT EXECUTED ffc05ce0: 4b ff ff 74 b ffc05c54 <== NOT EXECUTED * if a new process is exec()'ed. Since RTEMS does not support * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) ffc05ce4: 81 21 00 0c lwz r9,12(r1) <== NOT EXECUTED ffc05ce8: 38 09 00 04 addi r0,r9,4 <== NOT EXECUTED ffc05cec: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc05cf0: 4b ff ff 20 b ffc05c10 <== NOT EXECUTED case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); ffc05cf4: 81 61 00 10 lwz r11,16(r1) ffc05cf8: 38 09 00 01 addi r0,r9,1 ffc05cfc: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc05d00: 98 01 00 08 stb r0,8(r1) ffc05d04: 7d 2b 4a 14 add r9,r11,r9 ffc05d08: 4b ff fe 4c b ffc05b54 int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); ffc05d0c: 48 01 0c 3d bl ffc16948 <__errno> <== NOT EXECUTED ffc05d10: 38 00 00 09 li r0,9 <== NOT EXECUTED ffc05d14: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc05d18: 3b e0 ff ff li r31,-1 <== NOT EXECUTED ffc05d1c: 4b ff fe 00 b ffc05b1c <== NOT EXECUTED */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; ffc05d20: 54 63 05 66 rlwinm r3,r3,0,21,19 <== NOT EXECUTED ffc05d24: 90 7e 00 18 stw r3,24(r30) <== NOT EXECUTED ffc05d28: 3b e0 00 00 li r31,0 <== NOT EXECUTED ffc05d2c: 4b ff fe 70 b ffc05b9c <== NOT EXECUTED fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); ffc05d30: 90 81 00 28 stw r4,40(r1) ffc05d34: 48 00 07 f5 bl ffc06528 if ( diop == 0 ) { ffc05d38: 2c 03 00 00 cmpwi r3,0 ffc05d3c: 3b e0 ff ff li r31,-1 ffc05d40: 80 81 00 28 lwz r4,40(r1) ffc05d44: 41 a2 fd d8 beq- ffc05b1c <== NEVER TAKEN ffc05d48: 81 7d 27 50 lwz r11,10064(r29) ffc05d4c: 7c 7f 1b 78 mr r31,r3 ffc05d50: 4b ff ff 2c b ffc05c7c =============================================================================== ffc05d68 : #include int fdatasync( int fd ) { ffc05d68: 7c 08 02 a6 mflr r0 ffc05d6c: 94 21 ff f8 stwu r1,-8(r1) rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc05d70: 3d 20 00 00 lis r9,0 #include int fdatasync( int fd ) { ffc05d74: 90 01 00 0c stw r0,12(r1) rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc05d78: 80 09 26 8c lwz r0,9868(r9) ffc05d7c: 7f 83 00 40 cmplw cr7,r3,r0 ffc05d80: 40 9c 00 50 bge- cr7,ffc05dd0 iop = rtems_libio_iop( fd ); ffc05d84: 3d 20 00 00 lis r9,0 ffc05d88: 80 09 27 50 lwz r0,10064(r9) ffc05d8c: 1c 63 00 48 mulli r3,r3,72 ffc05d90: 7c 60 1a 14 add r3,r0,r3 rtems_libio_check_is_open(iop); ffc05d94: 80 03 00 18 lwz r0,24(r3) ffc05d98: 70 09 01 00 andi. r9,r0,256 ffc05d9c: 41 82 00 34 beq- ffc05dd0 <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); ffc05da0: 70 09 00 04 andi. r9,r0,4 ffc05da4: 41 82 00 40 beq- ffc05de4 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) ffc05da8: 81 23 00 40 lwz r9,64(r3) ffc05dac: 80 09 00 2c lwz r0,44(r9) ffc05db0: 2f 80 00 00 cmpwi cr7,r0,0 ffc05db4: 41 9e 00 44 beq- cr7,ffc05df8 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); ffc05db8: 7c 09 03 a6 mtctr r0 ffc05dbc: 4e 80 04 21 bctrl } ffc05dc0: 80 01 00 0c lwz r0,12(r1) ffc05dc4: 38 21 00 08 addi r1,r1,8 ffc05dc8: 7c 08 03 a6 mtlr r0 ffc05dcc: 4e 80 00 20 blr { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); ffc05dd0: 48 01 0b 79 bl ffc16948 <__errno> ffc05dd4: 38 00 00 09 li r0,9 ffc05dd8: 90 03 00 00 stw r0,0(r3) ffc05ddc: 38 60 ff ff li r3,-1 ffc05de0: 4b ff ff e0 b ffc05dc0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); ffc05de4: 48 01 0b 65 bl ffc16948 <__errno> ffc05de8: 38 00 00 16 li r0,22 ffc05dec: 90 03 00 00 stw r0,0(r3) ffc05df0: 38 60 ff ff li r3,-1 ffc05df4: 4b ff ff cc b ffc05dc0 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc05df8: 48 01 0b 51 bl ffc16948 <__errno> ffc05dfc: 38 00 00 86 li r0,134 ffc05e00: 90 03 00 00 stw r0,0(r3) ffc05e04: 38 60 ff ff li r3,-1 ffc05e08: 4b ff ff b8 b ffc05dc0 =============================================================================== ffc10dc0 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc10dc0: 94 21 ff c8 stwu r1,-56(r1) ffc10dc4: 7c 08 02 a6 mflr r0 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, ffc10dc8: 38 a0 00 00 li r5,0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc10dcc: 93 c1 00 30 stw r30,48(r1) ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, ffc10dd0: 3f c0 00 00 lis r30,0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc10dd4: 93 e1 00 34 stw r31,52(r1) ffc10dd8: 7c 7f 1b 78 mr r31,r3 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, ffc10ddc: 80 7e 29 94 lwz r3,10644(r30) */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc10de0: 93 81 00 28 stw r28,40(r1) ffc10de4: 7c 9c 23 78 mr r28,r4 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, ffc10de8: 38 80 00 00 li r4,0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc10dec: 93 41 00 20 stw r26,32(r1) ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, ffc10df0: 3b 40 ff fc li r26,-4 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc10df4: 90 01 00 3c stw r0,60(r1) ffc10df8: 93 21 00 1c stw r25,28(r1) ffc10dfc: 93 61 00 24 stw r27,36(r1) ffc10e00: 93 a1 00 2c stw r29,44(r1) ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, ffc10e04: 4b ff 79 0d bl ffc08710 ffc10e08: 2f 83 00 00 cmpwi cr7,r3,0 ffc10e0c: 40 9e 00 7c bne- cr7,ffc10e88 <== ALWAYS TAKEN RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; ffc10e10: 83 bf 00 00 lwz r29,0(r31) <== NOT EXECUTED if (pipe == NULL) { ffc10e14: 2f 9d 00 00 cmpwi cr7,r29,0 <== NOT EXECUTED ffc10e18: 41 9e 00 a0 beq- cr7,ffc10eb8 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) ffc10e1c: 80 7d 00 28 lwz r3,40(r29) <== NOT EXECUTED ffc10e20: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc10e24: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc10e28: 4b ff 78 e9 bl ffc08710 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { ffc10e2c: 80 1f 00 00 lwz r0,0(r31) <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) ffc10e30: 30 63 ff ff addic r3,r3,-1 <== NOT EXECUTED ffc10e34: 7c 63 19 10 subfe r3,r3,r3 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { ffc10e38: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) ffc10e3c: 54 7a 07 7a rlwinm r26,r3,0,29,29 <== NOT EXECUTED ffc10e40: 3b 5a ff fc addi r26,r26,-4 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { ffc10e44: 41 9e 03 0c beq- cr7,ffc11150 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); ffc10e48: 80 7e 29 94 lwz r3,10644(r30) <== NOT EXECUTED ffc10e4c: 4b ff 7a 25 bl ffc08870 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) ffc10e50: 2f 9a 00 00 cmpwi cr7,r26,0 <== NOT EXECUTED ffc10e54: 40 9e 00 34 bne- cr7,ffc10e88 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { ffc10e58: 81 3c 00 18 lwz r9,24(r28) <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; ffc10e5c: 83 df 00 00 lwz r30,0(r31) <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { ffc10e60: 55 20 07 7c rlwinm r0,r9,0,29,30 <== NOT EXECUTED ffc10e64: 2f 80 00 04 cmpwi cr7,r0,4 <== NOT EXECUTED ffc10e68: 41 9e 02 08 beq- cr7,ffc11070 <== NOT EXECUTED ffc10e6c: 2f 80 00 06 cmpwi cr7,r0,6 <== NOT EXECUTED ffc10e70: 41 9e 02 90 beq- cr7,ffc11100 <== NOT EXECUTED ffc10e74: 2f 80 00 02 cmpwi cr7,r0,2 <== NOT EXECUTED ffc10e78: 41 9e 01 64 beq- cr7,ffc10fdc <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); ffc10e7c: 80 7e 00 28 lwz r3,40(r30) <== NOT EXECUTED ffc10e80: 3b 40 00 00 li r26,0 <== NOT EXECUTED ffc10e84: 4b ff 79 ed bl ffc08870 <== NOT EXECUTED return 0; out_error: pipe_release(pipep, iop); return err; } ffc10e88: 80 01 00 3c lwz r0,60(r1) ffc10e8c: 7f 43 d3 78 mr r3,r26 ffc10e90: 83 21 00 1c lwz r25,28(r1) ffc10e94: 7c 08 03 a6 mtlr r0 ffc10e98: 83 41 00 20 lwz r26,32(r1) ffc10e9c: 83 61 00 24 lwz r27,36(r1) ffc10ea0: 83 81 00 28 lwz r28,40(r1) ffc10ea4: 83 a1 00 2c lwz r29,44(r1) ffc10ea8: 83 c1 00 30 lwz r30,48(r1) ffc10eac: 83 e1 00 34 lwz r31,52(r1) ffc10eb0: 38 21 00 38 addi r1,r1,56 ffc10eb4: 4e 80 00 20 blr { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); ffc10eb8: 38 60 00 34 li r3,52 <== NOT EXECUTED ffc10ebc: 4b ff 3a b9 bl ffc04974 <== NOT EXECUTED if (pipe == NULL) ffc10ec0: 3b 40 ff f4 li r26,-12 <== NOT EXECUTED ffc10ec4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); ffc10ec8: 7c 7b 1b 78 mr r27,r3 <== NOT EXECUTED ffc10ecc: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED if (pipe == NULL) ffc10ed0: 41 be ff 78 beq- cr7,ffc10e48 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); ffc10ed4: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc10ed8: 38 a0 00 34 li r5,52 <== NOT EXECUTED ffc10edc: 48 00 30 81 bl ffc13f5c <== NOT EXECUTED pipe->Size = PIPE_BUF; ffc10ee0: 38 00 02 00 li r0,512 <== NOT EXECUTED ffc10ee4: 90 1b 00 04 stw r0,4(r27) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); ffc10ee8: 38 60 02 00 li r3,512 <== NOT EXECUTED ffc10eec: 4b ff 3a 89 bl ffc04974 <== NOT EXECUTED if (! pipe->Buffer) ffc10ef0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); ffc10ef4: 90 7b 00 00 stw r3,0(r27) <== NOT EXECUTED if (! pipe->Buffer) ffc10ef8: 41 9e 02 8c beq- cr7,ffc11184 <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( ffc10efc: 3f 40 00 00 lis r26,0 <== NOT EXECUTED ffc10f00: 88 7a 22 00 lbz r3,8704(r26) <== NOT EXECUTED ffc10f04: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc10f08: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc10f0c: 64 63 50 49 oris r3,r3,20553 <== NOT EXECUTED ffc10f10: 60 63 72 00 ori r3,r3,29184 <== NOT EXECUTED ffc10f14: 38 db 00 2c addi r6,r27,44 <== NOT EXECUTED ffc10f18: 48 00 0c 7d bl ffc11b94 <== NOT EXECUTED ffc10f1c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc10f20: 40 9e 02 58 bne- cr7,ffc11178 <== NOT EXECUTED rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( ffc10f24: 88 7a 22 00 lbz r3,8704(r26) <== NOT EXECUTED ffc10f28: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc10f2c: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc10f30: 64 63 50 49 oris r3,r3,20553 <== NOT EXECUTED ffc10f34: 60 63 77 00 ori r3,r3,30464 <== NOT EXECUTED ffc10f38: 38 db 00 30 addi r6,r27,48 <== NOT EXECUTED ffc10f3c: 48 00 0c 59 bl ffc11b94 <== NOT EXECUTED ffc10f40: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc10f44: 40 9e 02 2c bne- cr7,ffc11170 <== NOT EXECUTED rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( ffc10f48: 88 7a 22 00 lbz r3,8704(r26) <== NOT EXECUTED ffc10f4c: 38 80 00 01 li r4,1 <== NOT EXECUTED ffc10f50: 38 a0 00 10 li r5,16 <== NOT EXECUTED ffc10f54: 64 63 50 49 oris r3,r3,20553 <== NOT EXECUTED ffc10f58: 60 63 73 00 ori r3,r3,29440 <== NOT EXECUTED ffc10f5c: 38 c0 00 00 li r6,0 <== NOT EXECUTED ffc10f60: 38 fb 00 28 addi r7,r27,40 <== NOT EXECUTED ffc10f64: 4b ff 74 b1 bl ffc08414 <== NOT EXECUTED ffc10f68: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc10f6c: 40 9e 01 fc bne- cr7,ffc11168 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) ffc10f70: 3f 20 00 00 lis r25,0 <== NOT EXECUTED ffc10f74: 80 9b 00 2c lwz r4,44(r27) <== NOT EXECUTED ffc10f78: 3b 39 35 4c addi r25,r25,13644 <== NOT EXECUTED ffc10f7c: 3b 61 00 0c addi r27,r1,12 <== NOT EXECUTED ffc10f80: 7f 65 db 78 mr r5,r27 <== NOT EXECUTED ffc10f84: 7f 23 cb 78 mr r3,r25 <== NOT EXECUTED ffc10f88: 4b ff 96 4d bl ffc0a5d4 <_Objects_Get> <== NOT EXECUTED /* Set barriers to be interruptible by signals. */ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state ffc10f8c: 80 03 00 4c lwz r0,76(r3) <== NOT EXECUTED ffc10f90: 64 00 10 00 oris r0,r0,4096 <== NOT EXECUTED ffc10f94: 90 03 00 4c stw r0,76(r3) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); ffc10f98: 4b ff a2 09 bl ffc0b1a0 <_Thread_Enable_dispatch> <== NOT EXECUTED ffc10f9c: 80 9d 00 30 lwz r4,48(r29) <== NOT EXECUTED ffc10fa0: 7f 65 db 78 mr r5,r27 <== NOT EXECUTED ffc10fa4: 7f 23 cb 78 mr r3,r25 <== NOT EXECUTED ffc10fa8: 4b ff 96 2d bl ffc0a5d4 <_Objects_Get> <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state ffc10fac: 80 03 00 4c lwz r0,76(r3) <== NOT EXECUTED ffc10fb0: 64 00 10 00 oris r0,r0,4096 <== NOT EXECUTED ffc10fb4: 90 03 00 4c stw r0,76(r3) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); ffc10fb8: 4b ff a1 e9 bl ffc0b1a0 <_Thread_Enable_dispatch> <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') ffc10fbc: 89 3a 22 00 lbz r9,8704(r26) <== NOT EXECUTED ffc10fc0: 2f 89 00 7a cmpwi cr7,r9,122 <== NOT EXECUTED ffc10fc4: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED ffc10fc8: 99 3a 22 00 stb r9,8704(r26) <== NOT EXECUTED ffc10fcc: 40 9e fe 50 bne+ cr7,ffc10e1c <== NOT EXECUTED c = 'a'; ffc10fd0: 38 00 00 61 li r0,97 <== NOT EXECUTED ffc10fd4: 98 1a 22 00 stb r0,8704(r26) <== NOT EXECUTED ffc10fd8: 4b ff fe 44 b ffc10e1c <== NOT EXECUTED pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) ffc10fdc: 81 3e 00 10 lwz r9,16(r30) <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc10fe0: 81 7e 00 20 lwz r11,32(r30) <== NOT EXECUTED if (pipe->Readers ++ == 0) ffc10fe4: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc10fe8: 38 0b 00 01 addi r0,r11,1 <== NOT EXECUTED if (pipe->Readers ++ == 0) ffc10fec: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc10ff0: 90 1e 00 20 stw r0,32(r30) <== NOT EXECUTED if (pipe->Readers ++ == 0) ffc10ff4: 91 3e 00 10 stw r9,16(r30) <== NOT EXECUTED ffc10ff8: 41 9e 01 cc beq- cr7,ffc111c4 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { ffc10ffc: 80 1e 00 14 lwz r0,20(r30) <== NOT EXECUTED ffc11000: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc11004: 40 be fe 78 bne- cr7,ffc10e7c <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) ffc11008: 80 1c 00 18 lwz r0,24(r28) <== NOT EXECUTED ffc1100c: 70 09 00 01 andi. r9,r0,1 <== NOT EXECUTED ffc11010: 40 a2 fe 6c bne- ffc10e7c <== NOT EXECUTED break; prevCounter = pipe->writerCounter; ffc11014: 83 be 00 24 lwz r29,36(r30) <== NOT EXECUTED ffc11018: 48 00 00 20 b ffc11038 <== NOT EXECUTED /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) ffc1101c: 80 7e 00 28 lwz r3,40(r30) <== NOT EXECUTED ffc11020: 4b ff 76 f1 bl ffc08710 <== NOT EXECUTED ffc11024: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc11028: 40 9e 00 34 bne- cr7,ffc1105c <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); ffc1102c: 80 1e 00 24 lwz r0,36(r30) <== NOT EXECUTED ffc11030: 7f 80 e8 00 cmpw cr7,r0,r29 <== NOT EXECUTED ffc11034: 40 be fe 48 bne- cr7,ffc10e7c <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); ffc11038: 80 7e 00 28 lwz r3,40(r30) <== NOT EXECUTED ffc1103c: 4b ff 78 35 bl ffc08870 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) ffc11040: 80 7e 00 2c lwz r3,44(r30) <== NOT EXECUTED ffc11044: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc11048: 48 00 0d a9 bl ffc11df0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) ffc1104c: 38 80 00 00 li r4,0 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ffc11050: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) ffc11054: 38 a0 00 00 li r5,0 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ffc11058: 41 9e ff c4 beq+ cr7,ffc1101c <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; ffc1105c: 3b 40 ff fc li r26,-4 <== NOT EXECUTED out_error: pipe_release(pipep, iop); ffc11060: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc11064: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED ffc11068: 4b ff fb b1 bl ffc10c18 <== NOT EXECUTED return err; ffc1106c: 4b ff fe 1c b ffc10e88 <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { ffc11070: 80 1e 00 10 lwz r0,16(r30) <== NOT EXECUTED ffc11074: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc11078: 40 9e 00 10 bne- cr7,ffc11088 <== NOT EXECUTED ffc1107c: 71 2b 00 01 andi. r11,r9,1 <== NOT EXECUTED ffc11080: 3b 40 ff fa li r26,-6 <== NOT EXECUTED ffc11084: 40 a2 ff dc bne- ffc11060 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) ffc11088: 81 3e 00 14 lwz r9,20(r30) <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; ffc1108c: 81 7e 00 24 lwz r11,36(r30) <== NOT EXECUTED if (pipe->Writers ++ == 0) ffc11090: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; ffc11094: 39 6b 00 01 addi r11,r11,1 <== NOT EXECUTED if (pipe->Writers ++ == 0) ffc11098: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; ffc1109c: 91 7e 00 24 stw r11,36(r30) <== NOT EXECUTED if (pipe->Writers ++ == 0) ffc110a0: 91 3e 00 14 stw r9,20(r30) <== NOT EXECUTED ffc110a4: 41 9e 01 40 beq- cr7,ffc111e4 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0) { ffc110a8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc110ac: 40 be fd d0 bne- cr7,ffc10e7c <== NOT EXECUTED prevCounter = pipe->readerCounter; ffc110b0: 83 be 00 20 lwz r29,32(r30) <== NOT EXECUTED ffc110b4: 48 00 00 20 b ffc110d4 <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) ffc110b8: 80 7e 00 28 lwz r3,40(r30) <== NOT EXECUTED ffc110bc: 4b ff 76 55 bl ffc08710 <== NOT EXECUTED ffc110c0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc110c4: 40 be ff 98 bne- cr7,ffc1105c <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); ffc110c8: 80 1e 00 20 lwz r0,32(r30) <== NOT EXECUTED ffc110cc: 7f 80 e8 00 cmpw cr7,r0,r29 <== NOT EXECUTED ffc110d0: 40 be fd ac bne- cr7,ffc10e7c <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); ffc110d4: 80 7e 00 28 lwz r3,40(r30) <== NOT EXECUTED ffc110d8: 4b ff 77 99 bl ffc08870 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) ffc110dc: 80 7e 00 30 lwz r3,48(r30) <== NOT EXECUTED ffc110e0: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc110e4: 48 00 0d 0d bl ffc11df0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) ffc110e8: 38 80 00 00 li r4,0 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ffc110ec: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) ffc110f0: 38 a0 00 00 li r5,0 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ffc110f4: 41 9e ff c4 beq+ cr7,ffc110b8 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; ffc110f8: 3b 40 ff fc li r26,-4 <== NOT EXECUTED ffc110fc: 4b ff ff 64 b ffc11060 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) ffc11100: 81 3e 00 10 lwz r9,16(r30) <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc11104: 81 7e 00 20 lwz r11,32(r30) <== NOT EXECUTED if (pipe->Readers ++ == 0) ffc11108: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc1110c: 38 0b 00 01 addi r0,r11,1 <== NOT EXECUTED if (pipe->Readers ++ == 0) ffc11110: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc11114: 90 1e 00 20 stw r0,32(r30) <== NOT EXECUTED if (pipe->Readers ++ == 0) ffc11118: 91 3e 00 10 stw r9,16(r30) <== NOT EXECUTED ffc1111c: 41 9e 00 b8 beq- cr7,ffc111d4 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) ffc11120: 81 3e 00 14 lwz r9,20(r30) <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; ffc11124: 81 7e 00 24 lwz r11,36(r30) <== NOT EXECUTED if (pipe->Writers ++ == 0) ffc11128: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; ffc1112c: 38 0b 00 01 addi r0,r11,1 <== NOT EXECUTED if (pipe->Writers ++ == 0) ffc11130: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; ffc11134: 90 1e 00 24 stw r0,36(r30) <== NOT EXECUTED if (pipe->Writers ++ == 0) ffc11138: 91 3e 00 14 stw r9,20(r30) <== NOT EXECUTED ffc1113c: 40 9e fd 40 bne+ cr7,ffc10e7c <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); ffc11140: 80 7e 00 2c lwz r3,44(r30) <== NOT EXECUTED ffc11144: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED ffc11148: 48 00 0c 11 bl ffc11d58 <== NOT EXECUTED ffc1114c: 4b ff fd 30 b ffc10e7c <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) ffc11150: 2f 9a 00 00 cmpwi cr7,r26,0 <== NOT EXECUTED ffc11154: 40 9e 00 3c bne- cr7,ffc11190 <== NOT EXECUTED pipe_free(pipe); else *pipep = pipe; ffc11158: 93 bf 00 00 stw r29,0(r31) <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); ffc1115c: 80 7e 29 94 lwz r3,10644(r30) <== NOT EXECUTED ffc11160: 4b ff 77 11 bl ffc08870 <== NOT EXECUTED ffc11164: 4b ff fc f4 b ffc10e58 <== NOT EXECUTED if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); ffc11168: 80 7b 00 30 lwz r3,48(r27) <== NOT EXECUTED ffc1116c: 48 00 0b 65 bl ffc11cd0 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); ffc11170: 80 7b 00 2c lwz r3,44(r27) <== NOT EXECUTED ffc11174: 48 00 0b 5d bl ffc11cd0 <== NOT EXECUTED err_rbar: free(pipe->Buffer); ffc11178: 80 7b 00 00 lwz r3,0(r27) <== NOT EXECUTED ffc1117c: 3b 40 ff fc li r26,-4 <== NOT EXECUTED ffc11180: 4b ff 34 75 bl ffc045f4 <== NOT EXECUTED err_buf: free(pipe); ffc11184: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc11188: 4b ff 34 6d bl ffc045f4 <== NOT EXECUTED ffc1118c: 4b ff fc bc b ffc10e48 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); ffc11190: 80 7d 00 2c lwz r3,44(r29) <== NOT EXECUTED ffc11194: 48 00 0b 3d bl ffc11cd0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); ffc11198: 80 7d 00 30 lwz r3,48(r29) <== NOT EXECUTED ffc1119c: 48 00 0b 35 bl ffc11cd0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); ffc111a0: 80 7d 00 28 lwz r3,40(r29) <== NOT EXECUTED ffc111a4: 4b ff 74 91 bl ffc08634 <== NOT EXECUTED free(pipe->Buffer); ffc111a8: 80 7d 00 00 lwz r3,0(r29) <== NOT EXECUTED ffc111ac: 4b ff 34 49 bl ffc045f4 <== NOT EXECUTED free(pipe); ffc111b0: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc111b4: 4b ff 34 41 bl ffc045f4 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); ffc111b8: 80 7e 29 94 lwz r3,10644(r30) <== NOT EXECUTED ffc111bc: 4b ff 76 b5 bl ffc08870 <== NOT EXECUTED ffc111c0: 4b ff fc c8 b ffc10e88 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); ffc111c4: 80 7e 00 30 lwz r3,48(r30) <== NOT EXECUTED ffc111c8: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED ffc111cc: 48 00 0b 8d bl ffc11d58 <== NOT EXECUTED ffc111d0: 4b ff fe 2c b ffc10ffc <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); ffc111d4: 80 7e 00 30 lwz r3,48(r30) <== NOT EXECUTED ffc111d8: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED ffc111dc: 48 00 0b 7d bl ffc11d58 <== NOT EXECUTED ffc111e0: 4b ff ff 40 b ffc11120 <== NOT EXECUTED goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); ffc111e4: 80 7e 00 2c lwz r3,44(r30) <== NOT EXECUTED ffc111e8: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED ffc111ec: 48 00 0b 6d bl ffc11d58 <== NOT EXECUTED ffc111f0: 80 1e 00 10 lwz r0,16(r30) <== NOT EXECUTED ffc111f4: 4b ff fe b4 b ffc110a8 <== NOT EXECUTED =============================================================================== ffc0cf5c : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; ffc0cf5c: 3d 60 00 00 lis r11,0 <== NOT EXECUTED ffc0cf60: 81 2b 34 40 lwz r9,13376(r11) <== NOT EXECUTED ffc0cf64: 39 6b 34 40 addi r11,r11,13376 <== NOT EXECUTED ffc0cf68: 38 0b 00 04 addi r0,r11,4 <== NOT EXECUTED ffc0cf6c: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc0cf70: 41 9e 00 30 beq- cr7,ffc0cfa0 <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { ffc0cf74: 81 44 00 10 lwz r10,16(r4) <== NOT EXECUTED ffc0cf78: 81 69 00 18 lwz r11,24(r9) <== NOT EXECUTED ffc0cf7c: 7f 8b 50 00 cmpw cr7,r11,r10 <== NOT EXECUTED ffc0cf80: 40 be 00 14 bne+ cr7,ffc0cf94 <== NOT EXECUTED ffc0cf84: 48 00 00 24 b ffc0cfa8 <== NOT EXECUTED ffc0cf88: 81 69 00 18 lwz r11,24(r9) <== NOT EXECUTED ffc0cf8c: 7f 8b 50 00 cmpw cr7,r11,r10 <== NOT EXECUTED ffc0cf90: 41 9e 00 18 beq- cr7,ffc0cfa8 <== NOT EXECUTED * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { ffc0cf94: 81 29 00 00 lwz r9,0(r9) <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; ffc0cf98: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc0cf9c: 40 9e ff ec bne+ cr7,ffc0cf88 <== NOT EXECUTED ffc0cfa0: 38 60 00 00 li r3,0 <== NOT EXECUTED return true; } } return false; } ffc0cfa4: 4e 80 00 20 blr <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; ffc0cfa8: 38 60 00 01 li r3,1 <== NOT EXECUTED ffc0cfac: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc05e0c : long fpathconf( int fd, int name ) { ffc05e0c: 7c 08 02 a6 mflr r0 ffc05e10: 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); ffc05e14: 3d 20 00 00 lis r9,0 long fpathconf( int fd, int name ) { ffc05e18: 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); ffc05e1c: 80 09 26 8c lwz r0,9868(r9) ffc05e20: 7f 83 00 40 cmplw cr7,r3,r0 ffc05e24: 40 9c 00 d0 bge- cr7,ffc05ef4 iop = rtems_libio_iop(fd); ffc05e28: 3d 20 00 00 lis r9,0 ffc05e2c: 80 09 27 50 lwz r0,10064(r9) ffc05e30: 1c 63 00 48 mulli r3,r3,72 ffc05e34: 7c 60 1a 14 add r3,r0,r3 rtems_libio_check_is_open(iop); ffc05e38: 80 03 00 18 lwz r0,24(r3) ffc05e3c: 70 09 01 00 andi. r9,r0,256 ffc05e40: 41 82 00 b4 beq- ffc05ef4 <== NEVER TAKEN rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); ffc05e44: 70 09 00 02 andi. r9,r0,2 ffc05e48: 41 82 00 10 beq- ffc05e58 <== NEVER TAKEN * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { ffc05e4c: 2b 84 00 0b cmplwi cr7,r4,11 /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; ffc05e50: 81 23 00 2c lwz r9,44(r3) switch ( name ) { ffc05e54: 40 9d 00 24 ble- cr7,ffc05e78 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc05e58: 48 01 0a f1 bl ffc16948 <__errno> ffc05e5c: 38 00 00 16 li r0,22 ffc05e60: 90 03 00 00 stw r0,0(r3) ffc05e64: 38 60 ff ff li r3,-1 break; } return return_value; } ffc05e68: 80 01 00 0c lwz r0,12(r1) ffc05e6c: 38 21 00 08 addi r1,r1,8 ffc05e70: 7c 08 03 a6 mtlr r0 ffc05e74: 4e 80 00 20 blr * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { ffc05e78: 3d 60 ff c2 lis r11,-62 ffc05e7c: 39 6b 43 38 addi r11,r11,17208 ffc05e80: 54 84 10 3a rlwinm r4,r4,2,0,29 ffc05e84: 7c 0b 20 2e lwzx r0,r11,r4 ffc05e88: 7d 60 5a 14 add r11,r0,r11 ffc05e8c: 7d 69 03 a6 mtctr r11 ffc05e90: 4e 80 04 20 bctr break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; ffc05e94: 80 69 00 5c lwz r3,92(r9) break; ffc05e98: 4b ff ff d0 b ffc05e68 break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; ffc05e9c: 80 69 00 50 lwz r3,80(r9) break; ffc05ea0: 4b ff ff c8 b ffc05e68 break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; ffc05ea4: 80 69 00 64 lwz r3,100(r9) break; ffc05ea8: 4b ff ff c0 b ffc05e68 break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; ffc05eac: 80 69 00 58 lwz r3,88(r9) break; ffc05eb0: 4b ff ff b8 b ffc05e68 break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; ffc05eb4: 80 69 00 54 lwz r3,84(r9) break; ffc05eb8: 4b ff ff b0 b ffc05e68 break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; ffc05ebc: 80 69 00 4c lwz r3,76(r9) break; ffc05ec0: 4b ff ff a8 b ffc05e68 break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; ffc05ec4: 80 69 00 48 lwz r3,72(r9) break; ffc05ec8: 4b ff ff a0 b ffc05e68 break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; ffc05ecc: 80 69 00 44 lwz r3,68(r9) break; ffc05ed0: 4b ff ff 98 b ffc05e68 break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; ffc05ed4: 80 69 00 40 lwz r3,64(r9) break; ffc05ed8: 4b ff ff 90 b ffc05e68 switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; ffc05edc: 80 69 00 3c lwz r3,60(r9) break; ffc05ee0: 4b ff ff 88 b ffc05e68 the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; ffc05ee4: 80 69 00 38 lwz r3,56(r9) break; ffc05ee8: 4b ff ff 80 b ffc05e68 break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; ffc05eec: 80 69 00 60 lwz r3,96(r9) break; ffc05ef0: 4b ff ff 78 b ffc05e68 rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); ffc05ef4: 48 01 0a 55 bl ffc16948 <__errno> ffc05ef8: 38 00 00 09 li r0,9 ffc05efc: 90 03 00 00 stw r0,0(r3) ffc05f00: 38 60 ff ff li r3,-1 ffc05f04: 4b ff ff 64 b ffc05e68 =============================================================================== ffc045f4 : void free( void *ptr ) { MSBUMP(free_calls, 1); ffc045f4: 94 21 ff f0 stwu r1,-16(r1) ffc045f8: 7c 08 02 a6 mflr r0 ffc045fc: 3d 20 00 00 lis r9,0 ffc04600: 90 01 00 14 stw r0,20(r1) ffc04604: 39 29 2b 00 addi r9,r9,11008 ffc04608: 93 e1 00 0c stw r31,12(r1) if ( !ptr ) ffc0460c: 7c 7f 1b 79 mr. r31,r3 void free( void *ptr ) { MSBUMP(free_calls, 1); ffc04610: 81 69 00 0c lwz r11,12(r9) ffc04614: 93 c1 00 08 stw r30,8(r1) ffc04618: 38 0b 00 01 addi r0,r11,1 ffc0461c: 90 09 00 0c stw r0,12(r9) if ( !ptr ) ffc04620: 41 82 00 6c beq- ffc0468c /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && ffc04624: 3d 20 00 00 lis r9,0 ffc04628: 80 09 27 d4 lwz r0,10196(r9) ffc0462c: 2f 80 00 03 cmpwi cr7,r0,3 ffc04630: 41 9e 00 74 beq- cr7,ffc046a4 <== ALWAYS TAKEN #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) ffc04634: 3d 20 00 00 lis r9,0 ffc04638: 81 29 27 08 lwz r9,9992(r9) ffc0463c: 2f 89 00 00 cmpwi cr7,r9,0 ffc04640: 41 9e 00 14 beq- cr7,ffc04654 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_free)(ptr); ffc04644: 80 09 00 08 lwz r0,8(r9) <== NOT EXECUTED ffc04648: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0464c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc04650: 4e 80 04 21 bctrl <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { ffc04654: 3f c0 00 00 lis r30,0 ffc04658: 80 7e 26 9c lwz r3,9884(r30) ffc0465c: 7f e4 fb 78 mr r4,r31 ffc04660: 48 00 63 6d bl ffc0a9cc <_Protected_heap_Free> ffc04664: 2f 83 00 00 cmpwi cr7,r3,0 ffc04668: 40 be 00 24 bne+ cr7,ffc0468c <== ALWAYS TAKEN printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, ffc0466c: 81 3e 26 9c lwz r9,9884(r30) <== NOT EXECUTED */ 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", ffc04670: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc04674: 38 63 f6 58 addi r3,r3,-2472 <== NOT EXECUTED ffc04678: 80 c9 00 1c lwz r6,28(r9) <== NOT EXECUTED ffc0467c: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc04680: 80 a9 00 18 lwz r5,24(r9) <== NOT EXECUTED ffc04684: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc04688: 48 00 10 9d bl ffc05724 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } ffc0468c: 80 01 00 14 lwz r0,20(r1) ffc04690: 83 c1 00 08 lwz r30,8(r1) ffc04694: 7c 08 03 a6 mtlr r0 ffc04698: 83 e1 00 0c lwz r31,12(r1) ffc0469c: 38 21 00 10 addi r1,r1,16 ffc046a0: 4e 80 00 20 blr /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && ffc046a4: 48 00 00 fd bl ffc047a0 ffc046a8: 2f 83 00 00 cmpwi cr7,r3,0 ffc046ac: 40 9e ff 88 bne+ cr7,ffc04634 <== ALWAYS TAKEN !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); ffc046b0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc046b4: 48 00 01 35 bl ffc047e8 <== NOT EXECUTED return; ffc046b8: 4b ff ff d4 b ffc0468c <== NOT EXECUTED =============================================================================== ffc0648c : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { ffc0648c: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc06490: 7c 08 02 a6 mflr r0 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env ffc06494: 3d 20 00 00 lis r9,0 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { ffc06498: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env ffc0649c: 38 09 2b 1c addi r0,r9,11036 <== NOT EXECUTED ffc064a0: 7f 83 00 00 cmpw cr7,r3,r0 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { ffc064a4: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED ffc064a8: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env ffc064ac: 41 9e 00 54 beq- cr7,ffc06500 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); ffc064b0: 81 23 00 10 lwz r9,16(r3) <== NOT EXECUTED ffc064b4: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc064b8: 41 9e 00 1c beq- cr7,ffc064d4 <== NOT EXECUTED ffc064bc: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc064c0: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc064c4: 41 9e 00 10 beq- cr7,ffc064d4 <== NOT EXECUTED ffc064c8: 38 63 00 04 addi r3,r3,4 <== NOT EXECUTED ffc064cc: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc064d0: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); ffc064d4: 81 3f 00 24 lwz r9,36(r31) <== NOT EXECUTED ffc064d8: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc064dc: 41 9e 00 1c beq- cr7,ffc064f8 <== NOT EXECUTED ffc064e0: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc064e4: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc064e8: 41 9e 00 10 beq- cr7,ffc064f8 <== NOT EXECUTED ffc064ec: 38 7f 00 18 addi r3,r31,24 <== NOT EXECUTED ffc064f0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc064f4: 4e 80 04 21 bctrl <== NOT EXECUTED free(env); ffc064f8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc064fc: 4b ff e9 bd bl ffc04eb8 <== NOT EXECUTED } } ffc06500: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc06504: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc06508: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc0650c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc06510: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc1dd40 : int fstat( int fd, struct stat *sbuf ) { ffc1dd40: 94 21 ff f0 stwu r1,-16(r1) ffc1dd44: 7c 08 02 a6 mflr r0 ffc1dd48: 93 c1 00 08 stw r30,8(r1) /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) ffc1dd4c: 7c 9e 23 79 mr. r30,r4 int fstat( int fd, struct stat *sbuf ) { ffc1dd50: 90 01 00 14 stw r0,20(r1) ffc1dd54: 93 e1 00 0c stw r31,12(r1) /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) ffc1dd58: 41 82 00 b0 beq- ffc1de08 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); ffc1dd5c: 3d 20 00 00 lis r9,0 ffc1dd60: 80 09 26 8c lwz r0,9868(r9) ffc1dd64: 7f 83 00 40 cmplw cr7,r3,r0 ffc1dd68: 40 9c 00 78 bge- cr7,ffc1dde0 ffc1dd6c: 3d 20 00 00 lis r9,0 ffc1dd70: 83 e9 27 4c lwz r31,10060(r9) ffc1dd74: 1c 63 00 48 mulli r3,r3,72 ffc1dd78: 7f ff 1a 14 add r31,r31,r3 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); ffc1dd7c: 80 1f 00 18 lwz r0,24(r31) ffc1dd80: 70 09 01 00 andi. r9,r0,256 ffc1dd84: 41 82 00 5c beq- ffc1dde0 <== NEVER TAKEN if ( !iop->handlers ) ffc1dd88: 81 3f 00 40 lwz r9,64(r31) ffc1dd8c: 2f 89 00 00 cmpwi cr7,r9,0 ffc1dd90: 41 9e 00 50 beq- cr7,ffc1dde0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) ffc1dd94: 80 09 00 18 lwz r0,24(r9) ffc1dd98: 2f 80 00 00 cmpwi cr7,r0,0 ffc1dd9c: 41 9e 00 58 beq- cr7,ffc1ddf4 <== NEVER TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); ffc1dda0: 38 80 00 00 li r4,0 ffc1dda4: 38 a0 00 48 li r5,72 ffc1dda8: 7f c3 f3 78 mr r3,r30 ffc1ddac: 4b ff 61 b1 bl ffc13f5c return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); ffc1ddb0: 81 3f 00 40 lwz r9,64(r31) ffc1ddb4: 38 7f 00 1c addi r3,r31,28 ffc1ddb8: 80 09 00 18 lwz r0,24(r9) ffc1ddbc: 7f c4 f3 78 mr r4,r30 ffc1ddc0: 7c 09 03 a6 mtctr r0 ffc1ddc4: 4e 80 04 21 bctrl } ffc1ddc8: 80 01 00 14 lwz r0,20(r1) ffc1ddcc: 83 c1 00 08 lwz r30,8(r1) ffc1ddd0: 7c 08 03 a6 mtlr r0 ffc1ddd4: 83 e1 00 0c lwz r31,12(r1) ffc1ddd8: 38 21 00 10 addi r1,r1,16 ffc1dddc: 4e 80 00 20 blr iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); ffc1dde0: 4b ff 54 95 bl ffc13274 <__errno> ffc1dde4: 38 00 00 09 li r0,9 ffc1dde8: 90 03 00 00 stw r0,0(r3) ffc1ddec: 38 60 ff ff li r3,-1 ffc1ddf0: 4b ff ff d8 b ffc1ddc8 if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc1ddf4: 4b ff 54 81 bl ffc13274 <__errno> <== NOT EXECUTED ffc1ddf8: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc1ddfc: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc1de00: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc1de04: 4b ff ff c4 b ffc1ddc8 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); ffc1de08: 4b ff 54 6d bl ffc13274 <__errno> ffc1de0c: 38 00 00 0e li r0,14 ffc1de10: 90 03 00 00 stw r0,0(r3) ffc1de14: 38 60 ff ff li r3,-1 ffc1de18: 4b ff ff b0 b ffc1ddc8 =============================================================================== ffc060b8 : #include int fsync( int fd ) { ffc060b8: 7c 08 02 a6 mflr r0 ffc060bc: 94 21 ff f8 stwu r1,-8(r1) rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc060c0: 3d 20 00 00 lis r9,0 #include int fsync( int fd ) { ffc060c4: 90 01 00 0c stw r0,12(r1) rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc060c8: 80 09 26 8c lwz r0,9868(r9) ffc060cc: 7f 83 00 40 cmplw cr7,r3,r0 ffc060d0: 40 9c 00 58 bge- cr7,ffc06128 <== NEVER TAKEN iop = rtems_libio_iop( fd ); ffc060d4: 3d 20 00 00 lis r9,0 ffc060d8: 80 09 27 50 lwz r0,10064(r9) ffc060dc: 1c 63 00 48 mulli r3,r3,72 ffc060e0: 7c 60 1a 14 add r3,r0,r3 rtems_libio_check_is_open(iop); ffc060e4: 80 03 00 18 lwz r0,24(r3) ffc060e8: 70 09 01 00 andi. r9,r0,256 ffc060ec: 41 82 00 3c beq- ffc06128 <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); ffc060f0: 70 09 00 04 andi. r9,r0,4 ffc060f4: 41 82 00 48 beq- ffc0613c /* * Now process the fsync(). */ if ( !iop->handlers ) ffc060f8: 81 23 00 40 lwz r9,64(r3) ffc060fc: 2f 89 00 00 cmpwi cr7,r9,0 ffc06100: 41 9e 00 28 beq- cr7,ffc06128 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) ffc06104: 80 09 00 28 lwz r0,40(r9) ffc06108: 2f 80 00 00 cmpwi cr7,r0,0 ffc0610c: 41 9e 00 44 beq- cr7,ffc06150 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); ffc06110: 7c 09 03 a6 mtctr r0 ffc06114: 4e 80 04 21 bctrl } ffc06118: 80 01 00 0c lwz r0,12(r1) ffc0611c: 38 21 00 08 addi r1,r1,8 ffc06120: 7c 08 03 a6 mtlr r0 ffc06124: 4e 80 00 20 blr /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); ffc06128: 48 01 08 21 bl ffc16948 <__errno> <== NOT EXECUTED ffc0612c: 38 00 00 09 li r0,9 <== NOT EXECUTED ffc06130: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc06134: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc06138: 4b ff ff e0 b ffc06118 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); ffc0613c: 48 01 08 0d bl ffc16948 <__errno> ffc06140: 38 00 00 16 li r0,22 ffc06144: 90 03 00 00 stw r0,0(r3) ffc06148: 38 60 ff ff li r3,-1 ffc0614c: 4b ff ff cc b ffc06118 if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc06150: 48 01 07 f9 bl ffc16948 <__errno> ffc06154: 38 00 00 86 li r0,134 ffc06158: 90 03 00 00 stw r0,0(r3) ffc0615c: 38 60 ff ff li r3,-1 ffc06160: 4b ff ff b8 b ffc06118 =============================================================================== ffc0e218 : int ftruncate( int fd, off_t length ) { ffc0e218: 94 21 ff c8 stwu r1,-56(r1) ffc0e21c: 7c 08 02 a6 mflr r0 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); ffc0e220: 3d 20 00 00 lis r9,0 int ftruncate( int fd, off_t length ) { ffc0e224: 90 01 00 3c stw r0,60(r1) rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); ffc0e228: 80 09 26 8c lwz r0,9868(r9) int ftruncate( int fd, off_t length ) { ffc0e22c: 93 a1 00 2c stw r29,44(r1) ffc0e230: 7c bd 2b 78 mr r29,r5 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); ffc0e234: 7f 83 00 40 cmplw cr7,r3,r0 int ftruncate( int fd, off_t length ) { ffc0e238: 93 c1 00 30 stw r30,48(r1) ffc0e23c: 7c de 33 78 mr r30,r6 ffc0e240: 93 e1 00 34 stw r31,52(r1) rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); ffc0e244: 40 9c 00 b4 bge- cr7,ffc0e2f8 <== NEVER TAKEN iop = rtems_libio_iop( fd ); ffc0e248: 3d 20 00 00 lis r9,0 ffc0e24c: 83 e9 27 4c lwz r31,10060(r9) ffc0e250: 1c 63 00 48 mulli r3,r3,72 ffc0e254: 7f ff 1a 14 add r31,r31,r3 rtems_libio_check_is_open(iop); ffc0e258: 80 1f 00 18 lwz r0,24(r31) ffc0e25c: 70 09 01 00 andi. r9,r0,256 ffc0e260: 41 82 00 98 beq- ffc0e2f8 <== NEVER TAKEN /* * Make sure we are not working on a directory */ loc = iop->pathinfo; ffc0e264: 81 3f 00 28 lwz r9,40(r31) ffc0e268: 81 1f 00 1c lwz r8,28(r31) if ( !loc.ops->node_type_h ) ffc0e26c: 80 09 00 10 lwz r0,16(r9) /* * Make sure we are not working on a directory */ loc = iop->pathinfo; ffc0e270: 81 5f 00 20 lwz r10,32(r31) ffc0e274: 81 7f 00 24 lwz r11,36(r31) if ( !loc.ops->node_type_h ) ffc0e278: 2f 80 00 00 cmpwi cr7,r0,0 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; ffc0e27c: 91 01 00 08 stw r8,8(r1) ffc0e280: 91 41 00 0c stw r10,12(r1) ffc0e284: 91 61 00 10 stw r11,16(r1) ffc0e288: 91 21 00 14 stw r9,20(r1) ffc0e28c: 81 3f 00 2c lwz r9,44(r31) ffc0e290: 91 21 00 18 stw r9,24(r1) if ( !loc.ops->node_type_h ) ffc0e294: 41 9e 00 8c beq- cr7,ffc0e320 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) ffc0e298: 38 61 00 08 addi r3,r1,8 ffc0e29c: 7c 09 03 a6 mtctr r0 ffc0e2a0: 4e 80 04 21 bctrl ffc0e2a4: 2f 83 00 01 cmpwi cr7,r3,1 ffc0e2a8: 41 9e 00 8c beq- cr7,ffc0e334 rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); ffc0e2ac: 80 1f 00 18 lwz r0,24(r31) ffc0e2b0: 70 09 00 04 andi. r9,r0,4 ffc0e2b4: 41 82 00 58 beq- ffc0e30c <== NEVER TAKEN if ( !iop->handlers->ftruncate_h ) ffc0e2b8: 81 3f 00 40 lwz r9,64(r31) ffc0e2bc: 80 09 00 20 lwz r0,32(r9) ffc0e2c0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e2c4: 41 9e 00 5c beq- cr7,ffc0e320 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); ffc0e2c8: 7f e3 fb 78 mr r3,r31 ffc0e2cc: 7c 09 03 a6 mtctr r0 ffc0e2d0: 7f a5 eb 78 mr r5,r29 ffc0e2d4: 7f c6 f3 78 mr r6,r30 ffc0e2d8: 4e 80 04 21 bctrl } ffc0e2dc: 80 01 00 3c lwz r0,60(r1) ffc0e2e0: 83 a1 00 2c lwz r29,44(r1) ffc0e2e4: 7c 08 03 a6 mtlr r0 ffc0e2e8: 83 c1 00 30 lwz r30,48(r1) ffc0e2ec: 83 e1 00 34 lwz r31,52(r1) ffc0e2f0: 38 21 00 38 addi r1,r1,56 ffc0e2f4: 4e 80 00 20 blr rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); ffc0e2f8: 48 00 4f 7d bl ffc13274 <__errno> <== NOT EXECUTED ffc0e2fc: 38 00 00 09 li r0,9 <== NOT EXECUTED ffc0e300: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0e304: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0e308: 4b ff ff d4 b ffc0e2dc <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); ffc0e30c: 48 00 4f 69 bl ffc13274 <__errno> <== NOT EXECUTED ffc0e310: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc0e314: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0e318: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0e31c: 4b ff ff c0 b ffc0e2dc <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc0e320: 48 00 4f 55 bl ffc13274 <__errno> <== NOT EXECUTED ffc0e324: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc0e328: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0e32c: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0e330: 4b ff ff ac b ffc0e2dc <== NOT EXECUTED loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); ffc0e334: 48 00 4f 41 bl ffc13274 <__errno> ffc0e338: 38 00 00 15 li r0,21 ffc0e33c: 90 03 00 00 stw r0,0(r3) ffc0e340: 38 60 ff ff li r3,-1 ffc0e344: 4b ff ff 98 b ffc0e2dc =============================================================================== ffc22a64 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc22a64: 94 21 ff c8 stwu r1,-56(r1) ffc22a68: 7c 08 02 a6 mflr r0 /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); ffc22a6c: 3d 20 00 00 lis r9,0 int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc22a70: 90 01 00 3c stw r0,60(r1) /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); ffc22a74: 80 09 27 0c lwz r0,9996(r9) int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc22a78: 93 a1 00 2c stw r29,44(r1) /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); ffc22a7c: 3b a0 00 00 li r29,0 ffc22a80: 7f 83 00 40 cmplw cr7,r3,r0 int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc22a84: 93 c1 00 30 stw r30,48(r1) ffc22a88: 7c 9e 23 78 mr r30,r4 ffc22a8c: 93 e1 00 34 stw r31,52(r1) ffc22a90: 7c bf 2b 78 mr r31,r5 /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); ffc22a94: 40 9c 00 14 bge- cr7,ffc22aa8 <== NEVER TAKEN ffc22a98: 3d 20 00 00 lis r9,0 ffc22a9c: 1c 63 00 48 mulli r3,r3,72 ffc22aa0: 83 a9 27 dc lwz r29,10204(r9) ffc22aa4: 7f bd 1a 14 add r29,r29,r3 /* * Make sure we are working on a directory */ loc = iop->pathinfo; ffc22aa8: 81 3d 00 28 lwz r9,40(r29) ffc22aac: 81 1d 00 1c lwz r8,28(r29) if ( !loc.ops->node_type_h ) ffc22ab0: 80 09 00 10 lwz r0,16(r9) iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; ffc22ab4: 81 5d 00 20 lwz r10,32(r29) ffc22ab8: 81 7d 00 24 lwz r11,36(r29) if ( !loc.ops->node_type_h ) ffc22abc: 2f 80 00 00 cmpwi cr7,r0,0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; ffc22ac0: 91 01 00 08 stw r8,8(r1) ffc22ac4: 91 41 00 0c stw r10,12(r1) ffc22ac8: 91 61 00 10 stw r11,16(r1) ffc22acc: 91 21 00 14 stw r9,20(r1) ffc22ad0: 81 3d 00 2c lwz r9,44(r29) ffc22ad4: 91 21 00 18 stw r9,24(r1) if ( !loc.ops->node_type_h ) ffc22ad8: 41 9e 00 6c beq- cr7,ffc22b44 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) ffc22adc: 38 61 00 08 addi r3,r1,8 ffc22ae0: 7c 09 03 a6 mtctr r0 ffc22ae4: 4e 80 04 21 bctrl ffc22ae8: 2f 83 00 01 cmpwi cr7,r3,1 ffc22aec: 40 9e 00 44 bne- cr7,ffc22b30 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) ffc22af0: 81 3d 00 40 lwz r9,64(r29) ffc22af4: 80 09 00 08 lwz r0,8(r9) ffc22af8: 2f 80 00 00 cmpwi cr7,r0,0 ffc22afc: 41 9e 00 48 beq- cr7,ffc22b44 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); ffc22b00: 7f a3 eb 78 mr r3,r29 ffc22b04: 7c 09 03 a6 mtctr r0 ffc22b08: 7f c4 f3 78 mr r4,r30 ffc22b0c: 7f e5 fb 78 mr r5,r31 ffc22b10: 4e 80 04 21 bctrl } ffc22b14: 80 01 00 3c lwz r0,60(r1) ffc22b18: 83 a1 00 2c lwz r29,44(r1) ffc22b1c: 7c 08 03 a6 mtlr r0 ffc22b20: 83 c1 00 30 lwz r30,48(r1) ffc22b24: 83 e1 00 34 lwz r31,52(r1) ffc22b28: 38 21 00 38 addi r1,r1,56 ffc22b2c: 4e 80 00 20 blr loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc22b30: 4b ff 3c 89 bl ffc167b8 <__errno> ffc22b34: 38 00 00 14 li r0,20 ffc22b38: 90 03 00 00 stw r0,0(r3) ffc22b3c: 38 60 ff ff li r3,-1 ffc22b40: 4b ff ff d4 b ffc22b14 * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc22b44: 4b ff 3c 75 bl ffc167b8 <__errno> <== NOT EXECUTED ffc22b48: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc22b4c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc22b50: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc22b54: 4b ff ff c0 b ffc22b14 <== NOT EXECUTED =============================================================================== ffc0588c : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { ffc0588c: 94 21 ff d8 stwu r1,-40(r1) ffc05890: 7d 80 00 26 mfcr r12 ffc05894: 7c 08 02 a6 mflr r0 ffc05898: 93 21 00 0c stw r25,12(r1) ffc0589c: 7d 19 43 78 mr r25,r8 ffc058a0: 90 01 00 2c stw r0,44(r1) ffc058a4: 93 41 00 10 stw r26,16(r1) ffc058a8: 93 61 00 14 stw r27,20(r1) ffc058ac: 7c fb 3b 78 mr r27,r7 ffc058b0: 93 81 00 18 stw r28,24(r1) ffc058b4: 7c 9c 23 78 mr r28,r4 ffc058b8: 93 a1 00 1c stw r29,28(r1) ffc058bc: 7c dd 33 78 mr r29,r6 ffc058c0: 93 c1 00 20 stw r30,32(r1) ffc058c4: 7c 7e 1b 78 mr r30,r3 ffc058c8: 93 e1 00 24 stw r31,36(r1) ffc058cc: 7c bf 2b 78 mr r31,r5 ffc058d0: 91 81 00 08 stw r12,8(r1) FILE *fp; int match; init_etc_passwd_group(); ffc058d4: 4b ff fe 39 bl ffc0570c if ((fp = fopen("/etc/group", "r")) == NULL) { ffc058d8: 3c 60 ff c2 lis r3,-62 ffc058dc: 3c 80 ff c2 lis r4,-62 ffc058e0: 38 63 3a 6c addi r3,r3,14956 ffc058e4: 38 84 41 b4 addi r4,r4,16820 ffc058e8: 48 01 11 d9 bl ffc16ac0 ffc058ec: 7c 7a 1b 79 mr. r26,r3 ffc058f0: 41 82 00 f0 beq- ffc059e0 <== NEVER TAKEN if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; fclose(fp); return -1; } if (name) { ffc058f4: 2e 1e 00 00 cmpwi cr4,r30,0 ffc058f8: 48 00 00 1c b ffc05914 match = (strcmp(grp->gr_name, name) == 0); ffc058fc: 80 7f 00 00 lwz r3,0(r31) ffc05900: 48 01 25 55 bl ffc17e54 ffc05904: 7c 63 00 34 cntlzw r3,r3 ffc05908: 54 63 d9 7e rlwinm r3,r3,27,5,31 } else { match = (grp->gr_gid == gid); } if (match) { ffc0590c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05910: 40 9e 00 40 bne- cr7,ffc05950 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { ffc05914: 7f e4 fb 78 mr r4,r31 ffc05918: 7f a5 eb 78 mr r5,r29 ffc0591c: 7f 66 db 78 mr r6,r27 ffc05920: 7f 43 d3 78 mr r3,r26 ffc05924: 4b ff fa 21 bl ffc05344 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); ffc05928: 7f c4 f3 78 mr r4,r30 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { ffc0592c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05930: 41 9e 00 64 beq- cr7,ffc05994 <== NEVER TAKEN errno = EINVAL; fclose(fp); return -1; } if (name) { ffc05934: 40 92 ff c8 bne+ cr4,ffc058fc <== ALWAYS TAKEN match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); ffc05938: a0 7f 00 08 lhz r3,8(r31) <== NOT EXECUTED ffc0593c: 7c 63 e2 78 xor r3,r3,r28 <== NOT EXECUTED ffc05940: 7c 63 00 34 cntlzw r3,r3 <== NOT EXECUTED ffc05944: 54 63 d9 7e rlwinm r3,r3,27,5,31 <== NOT EXECUTED } if (match) { ffc05948: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc0594c: 41 9e ff c8 beq+ cr7,ffc05914 <== NOT EXECUTED fclose(fp); ffc05950: 7f 43 d3 78 mr r3,r26 ffc05954: 48 01 08 31 bl ffc16184 *result = grp; ffc05958: 93 f9 00 00 stw r31,0(r25) ffc0595c: 38 60 00 00 li r3,0 } } fclose(fp); errno = EINVAL; return -1; } ffc05960: 80 01 00 2c lwz r0,44(r1) ffc05964: 81 81 00 08 lwz r12,8(r1) ffc05968: 7c 08 03 a6 mtlr r0 ffc0596c: 83 21 00 0c lwz r25,12(r1) ffc05970: 83 41 00 10 lwz r26,16(r1) ffc05974: 7d 80 81 20 mtcrf 8,r12 ffc05978: 83 61 00 14 lwz r27,20(r1) ffc0597c: 83 81 00 18 lwz r28,24(r1) ffc05980: 83 a1 00 1c lwz r29,28(r1) ffc05984: 83 c1 00 20 lwz r30,32(r1) ffc05988: 83 e1 00 24 lwz r31,36(r1) ffc0598c: 38 21 00 28 addi r1,r1,40 ffc05990: 4e 80 00 20 blr errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; ffc05994: 48 01 06 51 bl ffc15fe4 <__errno> <== NOT EXECUTED ffc05998: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc0599c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED fclose(fp); ffc059a0: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED ffc059a4: 48 01 07 e1 bl ffc16184 <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } ffc059a8: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc059ac: 81 81 00 08 lwz r12,8(r1) <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; fclose(fp); ffc059b0: 38 60 ff ff li r3,-1 <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } ffc059b4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc059b8: 83 21 00 0c lwz r25,12(r1) <== NOT EXECUTED ffc059bc: 83 41 00 10 lwz r26,16(r1) <== NOT EXECUTED ffc059c0: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED ffc059c4: 83 61 00 14 lwz r27,20(r1) <== NOT EXECUTED ffc059c8: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc059cc: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc059d0: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc059d4: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc059d8: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc059dc: 4e 80 00 20 blr <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; ffc059e0: 48 01 06 05 bl ffc15fe4 <__errno> <== NOT EXECUTED ffc059e4: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc059e8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc059ec: 38 60 ff ff li r3,-1 <== NOT EXECUTED return -1; ffc059f0: 4b ff ff 70 b ffc05960 <== NOT EXECUTED =============================================================================== ffc054dc : return p; } struct group *getgrent(void) { if (group_fp == NULL) ffc054dc: 3c a0 00 00 lis r5,0 <== NOT EXECUTED return NULL; return p; } struct group *getgrent(void) { ffc054e0: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc054e4: 7c 08 02 a6 mflr r0 <== NOT EXECUTED if (group_fp == NULL) ffc054e8: 80 65 28 8c lwz r3,10380(r5) <== NOT EXECUTED ffc054ec: 38 a5 28 8c addi r5,r5,10380 <== NOT EXECUTED return NULL; return p; } struct group *getgrent(void) { ffc054f0: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED if (group_fp == NULL) ffc054f4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED return NULL; return p; } struct group *getgrent(void) { ffc054f8: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED if (group_fp == NULL) ffc054fc: 40 9e 00 1c bne- cr7,ffc05518 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) return NULL; return &grent; } ffc05500: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) ffc05504: 38 60 00 00 li r3,0 <== NOT EXECUTED return NULL; return &grent; } ffc05508: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc0550c: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc05510: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05514: 4e 80 00 20 blr <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) ffc05518: 3b e5 00 08 addi r31,r5,8 <== NOT EXECUTED ffc0551c: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc05520: 38 a5 00 18 addi r5,r5,24 <== NOT EXECUTED ffc05524: 38 c0 00 c8 li r6,200 <== NOT EXECUTED ffc05528: 4b ff fe 1d bl ffc05344 <== NOT EXECUTED ffc0552c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc05530: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc05534: 41 be ff cc beq- cr7,ffc05500 <== NOT EXECUTED return NULL; return &grent; } ffc05538: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc0553c: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc05540: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc05544: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05548: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc05a1c : } struct group *getgrgid( gid_t gid ) { ffc05a1c: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) ffc05a20: 3c 80 00 00 lis r4,0 <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { ffc05a24: 7c 08 02 a6 mflr r0 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) ffc05a28: 38 84 28 8c addi r4,r4,10380 <== NOT EXECUTED ffc05a2c: 38 a4 00 18 addi r5,r4,24 <== NOT EXECUTED ffc05a30: 38 c0 00 c8 li r6,200 <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { ffc05a34: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) ffc05a38: 38 84 00 08 addi r4,r4,8 <== NOT EXECUTED ffc05a3c: 38 e1 00 08 addi r7,r1,8 <== NOT EXECUTED ffc05a40: 4b ff ff b5 bl ffc059f4 <== NOT EXECUTED ffc05a44: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc05a48: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc05a4c: 40 9e 00 08 bne- cr7,ffc05a54 <== NOT EXECUTED return NULL; return p; ffc05a50: 80 61 00 08 lwz r3,8(r1) <== NOT EXECUTED } ffc05a54: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc05a58: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc05a5c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05a60: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc059f4 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { ffc059f4: 7c 8b 23 78 mr r11,r4 <== NOT EXECUTED ffc059f8: 7c a9 2b 78 mr r9,r5 <== NOT EXECUTED ffc059fc: 7c c0 33 78 mr r0,r6 <== NOT EXECUTED ffc05a00: 7c e8 3b 78 mr r8,r7 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); ffc05a04: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED ffc05a08: 7d 65 5b 78 mr r5,r11 <== NOT EXECUTED ffc05a0c: 7d 26 4b 78 mr r6,r9 <== NOT EXECUTED ffc05a10: 7c 07 03 78 mr r7,r0 <== NOT EXECUTED ffc05a14: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc05a18: 4b ff fe 74 b ffc0588c <== NOT EXECUTED =============================================================================== ffc05a84 : } struct group *getgrnam( const char *name ) { ffc05a84: 94 21 ff e8 stwu r1,-24(r1) struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) ffc05a88: 3c 80 00 00 lis r4,0 } struct group *getgrnam( const char *name ) { ffc05a8c: 7c 08 02 a6 mflr r0 struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) ffc05a90: 38 84 28 8c addi r4,r4,10380 ffc05a94: 38 a4 00 18 addi r5,r4,24 ffc05a98: 38 c0 00 c8 li r6,200 } struct group *getgrnam( const char *name ) { ffc05a9c: 90 01 00 1c stw r0,28(r1) struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) ffc05aa0: 38 84 00 08 addi r4,r4,8 ffc05aa4: 38 e1 00 08 addi r7,r1,8 ffc05aa8: 4b ff ff bd bl ffc05a64 ffc05aac: 2f 83 00 00 cmpwi cr7,r3,0 ffc05ab0: 38 60 00 00 li r3,0 ffc05ab4: 40 9e 00 08 bne- cr7,ffc05abc <== NEVER TAKEN return NULL; return p; ffc05ab8: 80 61 00 08 lwz r3,8(r1) } ffc05abc: 80 01 00 1c lwz r0,28(r1) ffc05ac0: 38 21 00 18 addi r1,r1,24 ffc05ac4: 7c 08 03 a6 mtlr r0 ffc05ac8: 4e 80 00 20 blr =============================================================================== ffc05b24 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { ffc05b24: 94 21 ff d8 stwu r1,-40(r1) ffc05b28: 7d 80 00 26 mfcr r12 ffc05b2c: 7c 08 02 a6 mflr r0 ffc05b30: 93 21 00 0c stw r25,12(r1) ffc05b34: 7d 19 43 78 mr r25,r8 ffc05b38: 90 01 00 2c stw r0,44(r1) ffc05b3c: 93 41 00 10 stw r26,16(r1) ffc05b40: 93 61 00 14 stw r27,20(r1) ffc05b44: 7c fb 3b 78 mr r27,r7 ffc05b48: 93 81 00 18 stw r28,24(r1) ffc05b4c: 7c 9c 23 78 mr r28,r4 ffc05b50: 93 a1 00 1c stw r29,28(r1) ffc05b54: 7c dd 33 78 mr r29,r6 ffc05b58: 93 c1 00 20 stw r30,32(r1) ffc05b5c: 7c 7e 1b 78 mr r30,r3 ffc05b60: 93 e1 00 24 stw r31,36(r1) ffc05b64: 7c bf 2b 78 mr r31,r5 ffc05b68: 91 81 00 08 stw r12,8(r1) FILE *fp; int match; init_etc_passwd_group(); ffc05b6c: 4b ff fb a1 bl ffc0570c if ((fp = fopen("/etc/passwd", "r")) == NULL) { ffc05b70: 3c 60 ff c2 lis r3,-62 ffc05b74: 3c 80 ff c2 lis r4,-62 ffc05b78: 38 63 39 f4 addi r3,r3,14836 ffc05b7c: 38 84 41 b4 addi r4,r4,16820 ffc05b80: 48 01 0f 41 bl ffc16ac0 ffc05b84: 7c 7a 1b 79 mr. r26,r3 ffc05b88: 41 82 00 f0 beq- ffc05c78 <== NEVER TAKEN if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; fclose(fp); return -1; } if (name) { ffc05b8c: 2e 1e 00 00 cmpwi cr4,r30,0 ffc05b90: 48 00 00 1c b ffc05bac match = (strcmp(pwd->pw_name, name) == 0); ffc05b94: 80 7f 00 00 lwz r3,0(r31) ffc05b98: 48 01 22 bd bl ffc17e54 ffc05b9c: 7c 63 00 34 cntlzw r3,r3 ffc05ba0: 54 63 d9 7e rlwinm r3,r3,27,5,31 } else { match = (pwd->pw_uid == uid); } if (match) { ffc05ba4: 2f 83 00 00 cmpwi cr7,r3,0 ffc05ba8: 40 9e 00 40 bne- cr7,ffc05be8 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { ffc05bac: 7f e4 fb 78 mr r4,r31 ffc05bb0: 7f a5 eb 78 mr r5,r29 ffc05bb4: 7f 66 db 78 mr r6,r27 ffc05bb8: 7f 43 d3 78 mr r3,r26 ffc05bbc: 4b ff f9 91 bl ffc0554c errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); ffc05bc0: 7f c4 f3 78 mr r4,r30 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { ffc05bc4: 2f 83 00 00 cmpwi cr7,r3,0 ffc05bc8: 41 9e 00 64 beq- cr7,ffc05c2c <== NEVER TAKEN errno = EINVAL; fclose(fp); return -1; } if (name) { ffc05bcc: 40 92 ff c8 bne+ cr4,ffc05b94 <== ALWAYS TAKEN match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); ffc05bd0: a0 7f 00 08 lhz r3,8(r31) <== NOT EXECUTED ffc05bd4: 7c 63 e2 78 xor r3,r3,r28 <== NOT EXECUTED ffc05bd8: 7c 63 00 34 cntlzw r3,r3 <== NOT EXECUTED ffc05bdc: 54 63 d9 7e rlwinm r3,r3,27,5,31 <== NOT EXECUTED } if (match) { ffc05be0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc05be4: 41 9e ff c8 beq+ cr7,ffc05bac <== NOT EXECUTED fclose(fp); ffc05be8: 7f 43 d3 78 mr r3,r26 ffc05bec: 48 01 05 99 bl ffc16184 *result = pwd; ffc05bf0: 93 f9 00 00 stw r31,0(r25) ffc05bf4: 38 60 00 00 li r3,0 } } fclose(fp); errno = EINVAL; return -1; } ffc05bf8: 80 01 00 2c lwz r0,44(r1) ffc05bfc: 81 81 00 08 lwz r12,8(r1) ffc05c00: 7c 08 03 a6 mtlr r0 ffc05c04: 83 21 00 0c lwz r25,12(r1) ffc05c08: 83 41 00 10 lwz r26,16(r1) ffc05c0c: 7d 80 81 20 mtcrf 8,r12 ffc05c10: 83 61 00 14 lwz r27,20(r1) ffc05c14: 83 81 00 18 lwz r28,24(r1) ffc05c18: 83 a1 00 1c lwz r29,28(r1) ffc05c1c: 83 c1 00 20 lwz r30,32(r1) ffc05c20: 83 e1 00 24 lwz r31,36(r1) ffc05c24: 38 21 00 28 addi r1,r1,40 ffc05c28: 4e 80 00 20 blr errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; ffc05c2c: 48 01 03 b9 bl ffc15fe4 <__errno> <== NOT EXECUTED ffc05c30: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc05c34: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED fclose(fp); ffc05c38: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED ffc05c3c: 48 01 05 49 bl ffc16184 <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } ffc05c40: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc05c44: 81 81 00 08 lwz r12,8(r1) <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; fclose(fp); ffc05c48: 38 60 ff ff li r3,-1 <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } ffc05c4c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05c50: 83 21 00 0c lwz r25,12(r1) <== NOT EXECUTED ffc05c54: 83 41 00 10 lwz r26,16(r1) <== NOT EXECUTED ffc05c58: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED ffc05c5c: 83 61 00 14 lwz r27,20(r1) <== NOT EXECUTED ffc05c60: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc05c64: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc05c68: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc05c6c: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc05c70: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc05c74: 4e 80 00 20 blr <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; ffc05c78: 48 01 03 6d bl ffc15fe4 <__errno> <== NOT EXECUTED ffc05c7c: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc05c80: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc05c84: 38 60 ff ff li r3,-1 <== NOT EXECUTED return -1; ffc05c88: 4b ff ff 70 b ffc05bf8 <== NOT EXECUTED =============================================================================== ffc0569c : return NULL; return p; } struct passwd *getpwent(void) { ffc0569c: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc056a0: 7c 08 02 a6 mflr r0 <== NOT EXECUTED if (passwd_fp == NULL) ffc056a4: 3c a0 00 00 lis r5,0 <== NOT EXECUTED return NULL; return p; } struct passwd *getpwent(void) { ffc056a8: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED if (passwd_fp == NULL) ffc056ac: 38 a5 28 8c addi r5,r5,10380 <== NOT EXECUTED ffc056b0: 80 65 00 04 lwz r3,4(r5) <== NOT EXECUTED return NULL; return p; } struct passwd *getpwent(void) { ffc056b4: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED if (passwd_fp == NULL) ffc056b8: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc056bc: 40 9e 00 1c bne- cr7,ffc056d8 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) return NULL; return &pwent; } ffc056c0: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) ffc056c4: 38 60 00 00 li r3,0 <== NOT EXECUTED return NULL; return &pwent; } ffc056c8: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc056cc: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc056d0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc056d4: 4e 80 00 20 blr <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) ffc056d8: 3b e5 00 e0 addi r31,r5,224 <== NOT EXECUTED ffc056dc: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc056e0: 38 a5 00 fc addi r5,r5,252 <== NOT EXECUTED ffc056e4: 38 c0 00 c8 li r6,200 <== NOT EXECUTED ffc056e8: 4b ff fe 65 bl ffc0554c <== NOT EXECUTED ffc056ec: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc056f0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc056f4: 41 be ff cc beq- cr7,ffc056c0 <== NOT EXECUTED return NULL; return &pwent; } ffc056f8: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc056fc: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc05700: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc05704: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05708: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc05d1c : } struct passwd *getpwnam( const char *name ) { ffc05d1c: 94 21 ff e8 stwu r1,-24(r1) struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) ffc05d20: 3c 80 00 00 lis r4,0 } struct passwd *getpwnam( const char *name ) { ffc05d24: 7c 08 02 a6 mflr r0 struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) ffc05d28: 38 84 28 8c addi r4,r4,10380 ffc05d2c: 38 a4 00 fc addi r5,r4,252 ffc05d30: 38 c0 00 c8 li r6,200 } struct passwd *getpwnam( const char *name ) { ffc05d34: 90 01 00 1c stw r0,28(r1) struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) ffc05d38: 38 84 00 e0 addi r4,r4,224 ffc05d3c: 38 e1 00 08 addi r7,r1,8 ffc05d40: 4b ff ff bd bl ffc05cfc ffc05d44: 2f 83 00 00 cmpwi cr7,r3,0 ffc05d48: 38 60 00 00 li r3,0 ffc05d4c: 40 9e 00 08 bne- cr7,ffc05d54 <== NEVER TAKEN return NULL; return p; ffc05d50: 80 61 00 08 lwz r3,8(r1) } ffc05d54: 80 01 00 1c lwz r0,28(r1) ffc05d58: 38 21 00 18 addi r1,r1,24 ffc05d5c: 7c 08 03 a6 mtlr r0 ffc05d60: 4e 80 00 20 blr =============================================================================== ffc05cb4 : } struct passwd *getpwuid( uid_t uid ) { ffc05cb4: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) ffc05cb8: 3c 80 00 00 lis r4,0 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { ffc05cbc: 7c 08 02 a6 mflr r0 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) ffc05cc0: 38 84 28 8c addi r4,r4,10380 <== NOT EXECUTED ffc05cc4: 38 a4 00 fc addi r5,r4,252 <== NOT EXECUTED ffc05cc8: 38 c0 00 c8 li r6,200 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { ffc05ccc: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) ffc05cd0: 38 84 00 e0 addi r4,r4,224 <== NOT EXECUTED ffc05cd4: 38 e1 00 08 addi r7,r1,8 <== NOT EXECUTED ffc05cd8: 4b ff ff b5 bl ffc05c8c <== NOT EXECUTED ffc05cdc: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc05ce0: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc05ce4: 40 9e 00 08 bne- cr7,ffc05cec <== NOT EXECUTED return NULL; return p; ffc05ce8: 80 61 00 08 lwz r3,8(r1) <== NOT EXECUTED } ffc05cec: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc05cf0: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc05cf4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05cf8: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc05c8c : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { ffc05c8c: 7c 8b 23 78 mr r11,r4 <== NOT EXECUTED ffc05c90: 7c a9 2b 78 mr r9,r5 <== NOT EXECUTED ffc05c94: 7c c0 33 78 mr r0,r6 <== NOT EXECUTED ffc05c98: 7c e8 3b 78 mr r8,r7 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); ffc05c9c: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED ffc05ca0: 7d 65 5b 78 mr r5,r11 <== NOT EXECUTED ffc05ca4: 7d 26 4b 78 mr r6,r9 <== NOT EXECUTED ffc05ca8: 7c 07 03 78 mr r7,r0 <== NOT EXECUTED ffc05cac: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc05cb0: 4b ff fe 74 b ffc05b24 <== NOT EXECUTED =============================================================================== ffc0e368 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { ffc0e368: 94 21 ff e0 stwu r1,-32(r1) ffc0e36c: 7c 08 02 a6 mflr r0 ffc0e370: 93 e1 00 1c stw r31,28(r1) /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { ffc0e374: 7c 7f 1b 79 mr. r31,r3 */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { ffc0e378: 90 01 00 24 stw r0,36(r1) ffc0e37c: 93 c1 00 18 stw r30,24(r1) /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { ffc0e380: 41 82 00 64 beq- ffc0e3e4 <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0e384: 7f c0 00 a6 mfmsr r30 ffc0e388: 7c 10 42 a6 mfsprg r0,0 ffc0e38c: 7f c0 00 78 andc r0,r30,r0 ffc0e390: 7c 00 01 24 mtmsr r0 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); ffc0e394: 38 61 00 08 addi r3,r1,8 ffc0e398: 48 00 15 89 bl ffc0f920 <_TOD_Get> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0e39c: 7f c0 01 24 mtmsr r30 useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; ffc0e3a0: 3d 60 10 62 lis r11,4194 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; ffc0e3a4: 80 01 00 0c lwz r0,12(r1) useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; ffc0e3a8: 61 6b 4d d3 ori r11,r11,19923 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; ffc0e3ac: 81 21 00 08 lwz r9,8(r1) time->tv_usec = useconds; ffc0e3b0: 7d 60 58 96 mulhw r11,r0,r11 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; ffc0e3b4: 91 3f 00 00 stw r9,0(r31) time->tv_usec = useconds; ffc0e3b8: 7c 00 fe 70 srawi r0,r0,31 ffc0e3bc: 7d 6b 36 70 srawi r11,r11,6 ffc0e3c0: 7c 00 58 50 subf r0,r0,r11 ffc0e3c4: 90 1f 00 04 stw r0,4(r31) ffc0e3c8: 38 60 00 00 li r3,0 * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } ffc0e3cc: 80 01 00 24 lwz r0,36(r1) ffc0e3d0: 83 c1 00 18 lwz r30,24(r1) ffc0e3d4: 7c 08 03 a6 mtlr r0 ffc0e3d8: 83 e1 00 1c lwz r31,28(r1) ffc0e3dc: 38 21 00 20 addi r1,r1,32 ffc0e3e0: 4e 80 00 20 blr void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; ffc0e3e4: 48 00 4e 91 bl ffc13274 <__errno> <== NOT EXECUTED ffc0e3e8: 38 00 00 0e li r0,14 <== NOT EXECUTED ffc0e3ec: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0e3f0: 38 60 ff ff li r3,-1 <== NOT EXECUTED return -1; ffc0e3f4: 4b ff ff d8 b ffc0e3cc <== NOT EXECUTED =============================================================================== ffc188a4 : ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; ffc188a4: 81 23 00 3c lwz r9,60(r3) ffc188a8: 38 00 ff ff li r0,-1 ffc188ac: 81 29 00 4c lwz r9,76(r9) ffc188b0: 2f 89 00 01 cmpwi cr7,r9,1 ffc188b4: 40 be 00 18 bne+ cr7,ffc188cc <== NEVER TAKEN if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; ffc188b8: 39 20 00 00 li r9,0 ffc188bc: 39 40 00 00 li r10,0 ffc188c0: 91 23 00 10 stw r9,16(r3) ffc188c4: 38 00 00 00 li r0,0 ffc188c8: 91 43 00 14 stw r10,20(r3) return 0; } ffc188cc: 7c 03 03 78 mr r3,r0 ffc188d0: 4e 80 00 20 blr =============================================================================== ffc18b60 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc18b60: 94 21 fe a8 stwu r1,-344(r1) ffc18b64: 7c 08 02 a6 mflr r0 ffc18b68: 90 01 01 5c stw r0,348(r1) ffc18b6c: 93 01 01 38 stw r24,312(r1) ffc18b70: 7c 98 23 78 mr r24,r4 ffc18b74: 93 21 01 3c stw r25,316(r1) ffc18b78: 7c 79 1b 78 mr r25,r3 ffc18b7c: 93 61 01 44 stw r27,324(r1) struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) ffc18b80: 3b 60 00 00 li r27,0 ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc18b84: 93 81 01 48 stw r28,328(r1) ffc18b88: 92 81 01 28 stw r20,296(r1) int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; ffc18b8c: 83 83 00 3c lwz r28,60(r3) ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc18b90: 92 a1 01 2c stw r21,300(r1) ffc18b94: 92 c1 01 30 stw r22,304(r1) ffc18b98: 92 e1 01 34 stw r23,308(r1) ffc18b9c: 93 41 01 40 stw r26,320(r1) ffc18ba0: 93 a1 01 4c stw r29,332(r1) ffc18ba4: 93 c1 01 50 stw r30,336(r1) ffc18ba8: 93 e1 01 54 stw r31,340(r1) */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc18bac: 83 dc 00 50 lwz r30,80(r28) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc18bb0: 3b 9c 00 54 addi r28,r28,84 struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) ffc18bb4: 7f 9e e0 00 cmpw cr7,r30,r28 ffc18bb8: 41 9e 00 d0 beq- cr7,ffc18c88 bytes_transferred = 0; first_entry = iop->offset; /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); ffc18bbc: 3f 40 0e a0 lis r26,3744 /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; ffc18bc0: 83 a3 00 14 lwz r29,20(r3) /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); ffc18bc4: 54 a5 e8 fe rlwinm r5,r5,29,3,31 ffc18bc8: 63 5a ea 0f ori r26,r26,59919 ffc18bcc: 7f 45 d0 16 mulhwu r26,r5,r26 /* The directory was not empty so try to move to the desired entry in chain*/ for ( ffc18bd0: 3b e0 00 00 li r31,0 bytes_transferred = 0; first_entry = iop->offset; /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); ffc18bd4: 57 5a f8 7e rlwinm r26,r26,31,1,31 ffc18bd8: 1f 5a 01 18 mulli r26,r26,280 /* The directory was not empty so try to move to the desired entry in chain*/ for ( ffc18bdc: 7f 5a ea 15 add. r26,r26,r29 ffc18be0: 40 81 00 a8 ble- ffc18c88 <== NEVER TAKEN } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); ffc18be4: 3a a0 01 18 li r21,280 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); ffc18be8: 3a c1 00 1c addi r22,r1,28 memcpy( ffc18bec: 3a e1 00 08 addi r23,r1,8 ffc18bf0: 48 00 00 1c b ffc18c0c * to the end of the exisiting file, the remaining entries will be placed in * the buffer and the returned value will be equal to -m actual- times the * size of a directory entry. */ ssize_t imfs_dir_read( ffc18bf4: 3b ff 01 18 addi r31,r31,280 ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; ffc18bf8: 83 de 00 00 lwz r30,0(r30) /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( ffc18bfc: 7f 9f d0 00 cmpw cr7,r31,r26 current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ ffc18c00: 7f 1e e0 00 cmpw cr6,r30,r28 /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( ffc18c04: 40 9c 00 84 bge- cr7,ffc18c88 <== NEVER TAKEN current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ ffc18c08: 41 9a 00 80 beq- cr6,ffc18c88 /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { ffc18c0c: 7f 9d f8 00 cmpw cr7,r29,r31 ffc18c10: 41 9d ff e4 bgt+ cr7,ffc18bf4 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; ffc18c14: 80 1e 00 38 lwz r0,56(r30) tmp_dirent.d_namlen = strlen( the_jnode->name ); ffc18c18: 3a 9e 00 0c addi r20,r30,12 /* entries to return */ } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; ffc18c1c: 7f e9 fe 70 srawi r9,r31,31 ffc18c20: 93 e1 00 14 stw r31,20(r1) tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); ffc18c24: 7e 83 a3 78 mr r3,r20 /* entries to return */ } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; ffc18c28: 91 21 00 10 stw r9,16(r1) * to the end of the exisiting file, the remaining entries will be placed in * the buffer and the returned value will be equal to -m actual- times the * size of a directory entry. */ ssize_t imfs_dir_read( ffc18c2c: 3b ff 01 18 addi r31,r31,280 if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; ffc18c30: 90 01 00 08 stw r0,8(r1) } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); ffc18c34: b2 a1 00 18 sth r21,24(r1) the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); ffc18c38: 48 00 25 e9 bl ffc1b220 strcpy( tmp_dirent.d_name, the_jnode->name ); ffc18c3c: 7e 84 a3 78 mr r4,r20 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); ffc18c40: b0 61 00 1a sth r3,26(r1) strcpy( tmp_dirent.d_name, the_jnode->name ); ffc18c44: 7e c3 b3 78 mr r3,r22 ffc18c48: 48 00 24 c9 bl ffc1b110 memcpy( ffc18c4c: 7c 78 da 14 add r3,r24,r27 ffc18c50: 7e e4 bb 78 mr r4,r23 ffc18c54: 38 a0 01 18 li r5,280 ffc18c58: 48 00 1e f1 bl ffc1ab48 /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( ffc18c5c: 7f 9f d0 00 cmpw cr7,r31,r26 memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); ffc18c60: 81 79 00 10 lwz r11,16(r25) bytes_transferred = bytes_transferred + sizeof( struct dirent ); ffc18c64: 3b 7b 01 18 addi r27,r27,280 memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); ffc18c68: 81 99 00 14 lwz r12,20(r25) bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; ffc18c6c: 83 de 00 00 lwz r30,0(r30) memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); ffc18c70: 31 4c 01 18 addic r10,r12,280 ffc18c74: 7d 2b 01 94 addze r9,r11 ffc18c78: 91 39 00 10 stw r9,16(r25) for ( current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ ffc18c7c: 7f 1e e0 00 cmpw cr6,r30,r28 memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); ffc18c80: 91 59 00 14 stw r10,20(r25) /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( ffc18c84: 41 9c ff 84 blt+ cr7,ffc18c08 <== NEVER TAKEN the_node = the_node->next; } /* Success */ return bytes_transferred; } ffc18c88: 80 01 01 5c lwz r0,348(r1) ffc18c8c: 7f 63 db 78 mr r3,r27 ffc18c90: 82 81 01 28 lwz r20,296(r1) ffc18c94: 7c 08 03 a6 mtlr r0 ffc18c98: 82 a1 01 2c lwz r21,300(r1) ffc18c9c: 82 c1 01 30 lwz r22,304(r1) ffc18ca0: 82 e1 01 34 lwz r23,308(r1) ffc18ca4: 83 01 01 38 lwz r24,312(r1) ffc18ca8: 83 21 01 3c lwz r25,316(r1) ffc18cac: 83 41 01 40 lwz r26,320(r1) ffc18cb0: 83 61 01 44 lwz r27,324(r1) ffc18cb4: 83 81 01 48 lwz r28,328(r1) ffc18cb8: 83 a1 01 4c lwz r29,332(r1) ffc18cbc: 83 c1 01 50 lwz r30,336(r1) ffc18cc0: 83 e1 01 54 lwz r31,340(r1) ffc18cc4: 38 21 01 58 addi r1,r1,344 ffc18cc8: 4e 80 00 20 blr =============================================================================== ffc18a30 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { ffc18a30: 94 21 ff d8 stwu r1,-40(r1) ffc18a34: 7c 08 02 a6 mflr r0 ffc18a38: 90 01 00 2c stw r0,44(r1) ffc18a3c: 93 c1 00 20 stw r30,32(r1) ffc18a40: 7c 9e 23 78 mr r30,r4 ffc18a44: 93 e1 00 24 stw r31,36(r1) ffc18a48: 93 a1 00 1c stw r29,28(r1) IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; ffc18a4c: 83 e4 00 00 lwz r31,0(r4) ffc18a50: 81 3f 00 50 lwz r9,80(r31) ffc18a54: 38 1f 00 54 addi r0,r31,84 ffc18a58: 7f 89 00 00 cmpw cr7,r9,r0 ffc18a5c: 40 9e 00 d4 bne- cr7,ffc18b30 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) ffc18a60: 81 24 00 10 lwz r9,16(r4) ffc18a64: 80 09 00 1c lwz r0,28(r9) ffc18a68: 7f 9f 00 00 cmpw cr7,r31,r0 ffc18a6c: 41 9e 00 d8 beq- cr7,ffc18b44 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) ffc18a70: 83 bf 00 5c lwz r29,92(r31) ffc18a74: 2f 9d 00 00 cmpwi cr7,r29,0 ffc18a78: 40 9e 00 cc bne- cr7,ffc18b44 <== NEVER TAKEN /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { ffc18a7c: 80 1f 00 08 lwz r0,8(r31) ffc18a80: 2f 80 00 00 cmpwi cr7,r0,0 ffc18a84: 41 9e 00 10 beq- cr7,ffc18a94 ffc18a88: 7f e3 fb 78 mr r3,r31 ffc18a8c: 4b ff 2c a1 bl ffc0b72c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; ffc18a90: 93 bf 00 08 stw r29,8(r31) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; ffc18a94: a1 3f 00 34 lhz r9,52(r31) IMFS_update_ctime( the_jnode ); ffc18a98: 38 80 00 00 li r4,0 ffc18a9c: 38 61 00 08 addi r3,r1,8 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; ffc18aa0: 38 09 ff ff addi r0,r9,-1 ffc18aa4: b0 1f 00 34 sth r0,52(r31) IMFS_update_ctime( the_jnode ); ffc18aa8: 4b fe d7 4d bl ffc061f4 ffc18aac: 80 01 00 08 lwz r0,8(r1) /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { ffc18ab0: 7f e3 fb 78 mr r3,r31 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; IMFS_update_ctime( the_jnode ); ffc18ab4: 90 1f 00 48 stw r0,72(r31) /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { ffc18ab8: 4b ff bd e5 bl ffc1489c ffc18abc: 2f 83 00 00 cmpwi cr7,r3,0 ffc18ac0: 40 9e 00 50 bne- cr7,ffc18b10 ffc18ac4: a0 1f 00 34 lhz r0,52(r31) ffc18ac8: 2f 80 00 00 cmpwi cr7,r0,0 ffc18acc: 40 9e 00 44 bne- cr7,ffc18b10 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) ffc18ad0: 3d 20 00 00 lis r9,0 ffc18ad4: 81 7e 00 00 lwz r11,0(r30) ffc18ad8: 81 29 26 f4 lwz r9,9972(r9) ffc18adc: 81 49 00 04 lwz r10,4(r9) ffc18ae0: 7f 8a 58 00 cmpw cr7,r10,r11 ffc18ae4: 41 9e 00 74 beq- cr7,ffc18b58 <== NEVER TAKEN /* * Free memory associated with a memory file. */ free( the_jnode ); ffc18ae8: 7f e3 fb 78 mr r3,r31 ffc18aec: 4b fe d6 41 bl ffc0612c } return 0; } ffc18af0: 80 01 00 2c lwz r0,44(r1) /* * Free memory associated with a memory file. */ free( the_jnode ); ffc18af4: 38 60 00 00 li r3,0 } return 0; } ffc18af8: 83 a1 00 1c lwz r29,28(r1) ffc18afc: 7c 08 03 a6 mtlr r0 ffc18b00: 83 c1 00 20 lwz r30,32(r1) ffc18b04: 83 e1 00 24 lwz r31,36(r1) ffc18b08: 38 21 00 28 addi r1,r1,40 ffc18b0c: 4e 80 00 20 blr /* * Free memory associated with a memory file. */ free( the_jnode ); ffc18b10: 38 60 00 00 li r3,0 } return 0; } ffc18b14: 80 01 00 2c lwz r0,44(r1) ffc18b18: 83 a1 00 1c lwz r29,28(r1) ffc18b1c: 7c 08 03 a6 mtlr r0 ffc18b20: 83 c1 00 20 lwz r30,32(r1) ffc18b24: 83 e1 00 24 lwz r31,36(r1) ffc18b28: 38 21 00 28 addi r1,r1,40 ffc18b2c: 4e 80 00 20 blr /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); ffc18b30: 48 00 14 31 bl ffc19f60 <__errno> ffc18b34: 38 00 00 5a li r0,90 ffc18b38: 90 03 00 00 stw r0,0(r3) ffc18b3c: 38 60 ff ff li r3,-1 ffc18b40: 4b ff ff d4 b ffc18b14 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); ffc18b44: 48 00 14 1d bl ffc19f60 <__errno> ffc18b48: 38 00 00 10 li r0,16 ffc18b4c: 90 03 00 00 stw r0,0(r3) ffc18b50: 38 60 ff ff li r3,-1 ffc18b54: 4b ff ff c0 b ffc18b14 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; ffc18b58: 90 09 00 04 stw r0,4(r9) <== NOT EXECUTED ffc18b5c: 4b ff ff 8c b ffc18ae8 <== NOT EXECUTED =============================================================================== ffc0570c : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc0570c: 94 21 ff f0 stwu r1,-16(r1) ffc05710: 7c 08 02 a6 mflr r0 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc05714: 3d 20 00 00 lis r9,0 /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc05718: 90 01 00 14 stw r0,20(r1) FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc0571c: 39 29 28 8c addi r9,r9,10380 /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc05720: 93 c1 00 08 stw r30,8(r1) ffc05724: 93 e1 00 0c stw r31,12(r1) FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc05728: 88 09 01 c4 lbz r0,452(r9) ffc0572c: 2f 80 00 00 cmpwi cr7,r0,0 ffc05730: 41 9e 00 1c beq- cr7,ffc0574c fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } ffc05734: 80 01 00 14 lwz r0,20(r1) ffc05738: 83 c1 00 08 lwz r30,8(r1) ffc0573c: 7c 08 03 a6 mtlr r0 ffc05740: 83 e1 00 0c lwz r31,12(r1) ffc05744: 38 21 00 10 addi r1,r1,16 ffc05748: 4e 80 00 20 blr FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; ffc0574c: 38 00 00 01 li r0,1 ffc05750: 98 09 01 c4 stb r0,452(r9) mkdir("/etc", 0777); ffc05754: 3c 60 ff c2 lis r3,-62 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc05758: 3f c0 ff c2 lis r30,-62 ffc0575c: 3f e0 ff c2 lis r31,-62 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); ffc05760: 38 80 01 ff li r4,511 ffc05764: 38 63 39 ec addi r3,r3,14828 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc05768: 3b de 39 f4 addi r30,r30,14836 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); ffc0576c: 48 00 0a 95 bl ffc06200 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc05770: 3b ff 41 b4 addi r31,r31,16820 ffc05774: 7f c3 f3 78 mr r3,r30 ffc05778: 7f e4 fb 78 mr r4,r31 ffc0577c: 48 01 13 45 bl ffc16ac0 ffc05780: 2f 83 00 00 cmpwi cr7,r3,0 ffc05784: 41 9e 00 7c beq- cr7,ffc05800 <== ALWAYS TAKEN } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); ffc05788: 48 01 09 fd bl ffc16184 } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { ffc0578c: 3f c0 ff c2 lis r30,-62 ffc05790: 3b de 3a 6c addi r30,r30,14956 ffc05794: 7f e4 fb 78 mr r4,r31 ffc05798: 7f c3 f3 78 mr r3,r30 ffc0579c: 48 01 13 25 bl ffc16ac0 ffc057a0: 2f 83 00 00 cmpwi cr7,r3,0 ffc057a4: 41 9e 00 20 beq- cr7,ffc057c4 <== ALWAYS TAKEN } else if ((fp = fopen("/etc/group", "w")) != NULL) { fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); ffc057a8: 48 01 09 dd bl ffc16184 <== NOT EXECUTED } } ffc057ac: 80 01 00 14 lwz r0,20(r1) ffc057b0: 83 c1 00 08 lwz r30,8(r1) ffc057b4: 7c 08 03 a6 mtlr r0 ffc057b8: 83 e1 00 0c lwz r31,12(r1) ffc057bc: 38 21 00 10 addi r1,r1,16 ffc057c0: 4e 80 00 20 blr * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { ffc057c4: 3c 80 ff c2 lis r4,-62 ffc057c8: 7f c3 f3 78 mr r3,r30 ffc057cc: 38 84 3a 00 addi r4,r4,14848 ffc057d0: 48 01 12 f1 bl ffc16ac0 ffc057d4: 7c 7f 1b 79 mr. r31,r3 ffc057d8: 41 a2 ff 5c beq- ffc05734 <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" ffc057dc: 3c 60 ff c2 lis r3,-62 ffc057e0: 38 80 00 01 li r4,1 ffc057e4: 38 a0 00 2a li r5,42 ffc057e8: 7f e6 fb 78 mr r6,r31 ffc057ec: 38 63 3a 78 addi r3,r3,14968 ffc057f0: 48 01 1b a9 bl ffc17398 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); ffc057f4: 7f e3 fb 78 mr r3,r31 ffc057f8: 48 01 09 8d bl ffc16184 ffc057fc: 4b ff ff b0 b ffc057ac * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { ffc05800: 3c 80 ff c2 lis r4,-62 ffc05804: 7f c3 f3 78 mr r3,r30 ffc05808: 38 84 3a 00 addi r4,r4,14848 ffc0580c: 48 01 12 b5 bl ffc16ac0 ffc05810: 7c 7e 1b 79 mr. r30,r3 ffc05814: 41 a2 ff 78 beq- ffc0578c <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" ffc05818: 3c 60 ff c2 lis r3,-62 ffc0581c: 38 63 3a 04 addi r3,r3,14852 ffc05820: 38 80 00 01 li r4,1 ffc05824: 38 a0 00 66 li r5,102 ffc05828: 7f c6 f3 78 mr r6,r30 ffc0582c: 48 01 1b 6d bl ffc17398 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); ffc05830: 7f c3 f3 78 mr r3,r30 ffc05834: 4b ff ff 54 b ffc05788 =============================================================================== ffc09050 : int ioctl( int fd, ioctl_command_t command, ... ) { ffc09050: 94 21 ff e0 stwu r1,-32(r1) ffc09054: 7c 08 02 a6 mflr r0 va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); ffc09058: 3d 20 00 00 lis r9,0 int ioctl( int fd, ioctl_command_t command, ... ) { ffc0905c: 90 01 00 24 stw r0,36(r1) va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); ffc09060: 80 09 26 ac lwz r0,9900(r9) int ioctl( int fd, ioctl_command_t command, ... ) { ffc09064: 90 a1 00 18 stw r5,24(r1) va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); ffc09068: 7f 83 00 40 cmplw cr7,r3,r0 ffc0906c: 40 9c 00 6c bge- cr7,ffc090d8 iop = rtems_libio_iop( fd ); ffc09070: 3d 20 00 00 lis r9,0 ffc09074: 80 09 27 6c lwz r0,10092(r9) ffc09078: 1c 63 00 48 mulli r3,r3,72 ffc0907c: 7c 60 1a 14 add r3,r0,r3 rtems_libio_check_is_open(iop); ffc09080: 80 03 00 18 lwz r0,24(r3) ffc09084: 70 09 01 00 andi. r9,r0,256 ffc09088: 41 82 00 50 beq- ffc090d8 <== NEVER TAKEN va_start(ap, command); buffer = va_arg(ap, void *); ffc0908c: 38 00 00 03 li r0,3 ffc09090: 98 01 00 08 stb r0,8(r1) rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); ffc09094: 39 21 00 10 addi r9,r1,16 ffc09098: 38 01 00 28 addi r0,r1,40 /* * Now process the ioctl(). */ if ( !iop->handlers ) ffc0909c: 81 63 00 40 lwz r11,64(r3) rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); ffc090a0: 90 01 00 0c stw r0,12(r1) /* * Now process the ioctl(). */ if ( !iop->handlers ) ffc090a4: 2f 8b 00 00 cmpwi cr7,r11,0 rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); ffc090a8: 91 21 00 10 stw r9,16(r1) buffer = va_arg(ap, void *); ffc090ac: 80 a9 00 08 lwz r5,8(r9) /* * Now process the ioctl(). */ if ( !iop->handlers ) ffc090b0: 41 9e 00 28 beq- cr7,ffc090d8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) ffc090b4: 80 0b 00 10 lwz r0,16(r11) ffc090b8: 2f 80 00 00 cmpwi cr7,r0,0 ffc090bc: 41 9e 00 30 beq- cr7,ffc090ec <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); ffc090c0: 7c 09 03 a6 mtctr r0 ffc090c4: 4e 80 04 21 bctrl return rc; } ffc090c8: 80 01 00 24 lwz r0,36(r1) ffc090cc: 38 21 00 20 addi r1,r1,32 ffc090d0: 7c 08 03 a6 mtlr r0 ffc090d4: 4e 80 00 20 blr /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); ffc090d8: 48 01 11 a5 bl ffc1a27c <__errno> ffc090dc: 38 00 00 09 li r0,9 ffc090e0: 90 03 00 00 stw r0,0(r3) ffc090e4: 38 60 ff ff li r3,-1 ffc090e8: 4b ff ff e0 b ffc090c8 if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc090ec: 48 01 11 91 bl ffc1a27c <__errno> <== NOT EXECUTED ffc090f0: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc090f4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc090f8: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc090fc: 4b ff ff cc b ffc090c8 <== NOT EXECUTED =============================================================================== ffc06588 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { ffc06588: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc0658c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc06590: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) ffc06594: 80 04 00 30 lwz r0,48(r4) <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { ffc06598: 93 c1 00 08 stw r30,8(r1) <== NOT EXECUTED ffc0659c: 7c 9e 23 78 mr r30,r4 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) ffc065a0: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { ffc065a4: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED ffc065a8: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) ffc065ac: 41 82 00 08 beq- ffc065b4 <== NOT EXECUTED c &= 0x7f; ffc065b0: 54 7f 06 7e clrlwi r31,r3,25 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) ffc065b4: 70 0b 02 00 andi. r11,r0,512 <== NOT EXECUTED ffc065b8: 41 82 00 28 beq- ffc065e0 <== NOT EXECUTED c = tolower (c); ffc065bc: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc065c0: 81 69 26 e0 lwz r11,9952(r9) <== NOT EXECUTED ffc065c4: 7f e9 fb 78 mr r9,r31 <== NOT EXECUTED ffc065c8: 7f eb fa 14 add r31,r11,r31 <== NOT EXECUTED ffc065cc: 89 7f 00 01 lbz r11,1(r31) <== NOT EXECUTED ffc065d0: 55 6b 07 be clrlwi r11,r11,30 <== NOT EXECUTED ffc065d4: 2f 8b 00 01 cmpwi cr7,r11,1 <== NOT EXECUTED ffc065d8: 41 9e 01 28 beq- cr7,ffc06700 <== NOT EXECUTED ffc065dc: 55 3f 06 3e clrlwi r31,r9,24 <== NOT EXECUTED if (c == '\r') { ffc065e0: 2f 9f 00 0d cmpwi cr7,r31,13 <== NOT EXECUTED ffc065e4: 41 9e 00 64 beq- cr7,ffc06648 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { ffc065e8: 2f 9f 00 0a cmpwi cr7,r31,10 <== NOT EXECUTED ffc065ec: 41 9e 01 04 beq- cr7,ffc066f0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { ffc065f0: 2f 9f 00 00 cmpwi cr7,r31,0 <== NOT EXECUTED ffc065f4: 40 9e 00 84 bne- cr7,ffc06678 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { ffc065f8: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc065fc: 81 69 21 68 lwz r11,8552(r9) <== NOT EXECUTED ffc06600: 81 3e 00 20 lwz r9,32(r30) <== NOT EXECUTED ffc06604: 38 0b ff ff addi r0,r11,-1 <== NOT EXECUTED ffc06608: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc0660c: 40 9c 00 44 bge- cr7,ffc06650 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) ffc06610: 80 1e 00 3c lwz r0,60(r30) <== NOT EXECUTED ffc06614: 70 0b 00 08 andi. r11,r0,8 <== NOT EXECUTED ffc06618: 40 82 00 f0 bne- ffc06708 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; ffc0661c: 81 7e 00 1c lwz r11,28(r30) <== NOT EXECUTED ffc06620: 38 09 00 01 addi r0,r9,1 <== NOT EXECUTED ffc06624: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc06628: 7f eb 49 ae stbx r31,r11,r9 <== NOT EXECUTED ffc0662c: 90 1e 00 20 stw r0,32(r30) <== NOT EXECUTED } return 0; } ffc06630: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc06634: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc06638: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0663c: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc06640: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc06644: 4e 80 00 20 blr <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) ffc06648: 70 09 00 80 andi. r9,r0,128 <== NOT EXECUTED ffc0664c: 41 a2 00 20 beq+ ffc0666c <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } ffc06650: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; ffc06654: 38 60 00 00 li r3,0 <== NOT EXECUTED } return 0; } ffc06658: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc0665c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc06660: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc06664: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc06668: 4e 80 00 20 blr <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) ffc0666c: 70 0b 01 00 andi. r11,r0,256 <== NOT EXECUTED ffc06670: 41 82 00 08 beq- ffc06678 <== NOT EXECUTED ffc06674: 3b e0 00 0a li r31,10 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { ffc06678: 80 1e 00 3c lwz r0,60(r30) <== NOT EXECUTED ffc0667c: 70 0b 00 02 andi. r11,r0,2 <== NOT EXECUTED ffc06680: 41 a2 ff 78 beq- ffc065f8 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { ffc06684: 89 3e 00 43 lbz r9,67(r30) <== NOT EXECUTED ffc06688: 7f 89 f8 00 cmpw cr7,r9,r31 <== NOT EXECUTED ffc0668c: 41 9e 00 e8 beq- cr7,ffc06774 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { ffc06690: 89 3e 00 44 lbz r9,68(r30) <== NOT EXECUTED ffc06694: 7f 89 f8 00 cmpw cr7,r9,r31 <== NOT EXECUTED ffc06698: 41 9e 00 94 beq- cr7,ffc0672c <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { ffc0669c: 89 3e 00 45 lbz r9,69(r30) <== NOT EXECUTED ffc066a0: 38 60 00 01 li r3,1 <== NOT EXECUTED ffc066a4: 7f 89 f8 00 cmpw cr7,r9,r31 <== NOT EXECUTED ffc066a8: 41 be ff 88 beq- cr7,ffc06630 <== NOT EXECUTED return 1; } else if (c == '\n') { ffc066ac: 2f 9f 00 0a cmpwi cr7,r31,10 <== NOT EXECUTED ffc066b0: 41 9e 00 90 beq- cr7,ffc06740 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) ffc066b4: 89 3e 00 4c lbz r9,76(r30) <== NOT EXECUTED ffc066b8: 7f 89 f8 00 cmpw cr7,r9,r31 <== NOT EXECUTED ffc066bc: 41 9e 00 10 beq- cr7,ffc066cc <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { ffc066c0: 89 3e 00 51 lbz r9,81(r30) <== NOT EXECUTED ffc066c4: 7f 89 f8 00 cmpw cr7,r9,r31 <== NOT EXECUTED ffc066c8: 40 9e ff 30 bne+ cr7,ffc065f8 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) ffc066cc: 70 0b 00 08 andi. r11,r0,8 <== NOT EXECUTED ffc066d0: 40 82 00 4c bne- ffc0671c <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; ffc066d4: 81 3e 00 20 lwz r9,32(r30) <== NOT EXECUTED ffc066d8: 38 60 00 01 li r3,1 <== NOT EXECUTED ffc066dc: 81 7e 00 1c lwz r11,28(r30) <== NOT EXECUTED ffc066e0: 38 09 00 01 addi r0,r9,1 <== NOT EXECUTED ffc066e4: 7f eb 49 ae stbx r31,r11,r9 <== NOT EXECUTED ffc066e8: 90 1e 00 20 stw r0,32(r30) <== NOT EXECUTED return 1; ffc066ec: 4b ff ff 44 b ffc06630 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { ffc066f0: 70 09 00 40 andi. r9,r0,64 <== NOT EXECUTED ffc066f4: 41 a2 ff 84 beq- ffc06678 <== NOT EXECUTED ffc066f8: 3b e0 00 0d li r31,13 <== NOT EXECUTED ffc066fc: 4b ff ff 7c b ffc06678 <== NOT EXECUTED iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); ffc06700: 39 29 00 20 addi r9,r9,32 <== NOT EXECUTED ffc06704: 4b ff fe d8 b ffc065dc <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); ffc06708: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0670c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc06710: 4b ff fb 4d bl ffc0625c <== NOT EXECUTED ffc06714: 81 3e 00 20 lwz r9,32(r30) <== NOT EXECUTED ffc06718: 4b ff ff 04 b ffc0661c <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); ffc0671c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc06720: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc06724: 4b ff fb 39 bl ffc0625c <== NOT EXECUTED ffc06728: 4b ff ff ac b ffc066d4 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); ffc0672c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc06730: 38 80 00 01 li r4,1 <== NOT EXECUTED ffc06734: 4b ff fb cd bl ffc06300 <== NOT EXECUTED ffc06738: 38 60 00 00 li r3,0 <== NOT EXECUTED return 0; ffc0673c: 4b ff fe f4 b ffc06630 <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) ffc06740: 70 09 00 48 andi. r9,r0,72 <== NOT EXECUTED ffc06744: 41 a2 00 10 beq+ ffc06754 <== NOT EXECUTED echo (c, tty); ffc06748: 38 60 00 0a li r3,10 <== NOT EXECUTED ffc0674c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc06750: 4b ff fb 0d bl ffc0625c <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; ffc06754: 81 3e 00 20 lwz r9,32(r30) <== NOT EXECUTED ffc06758: 39 40 00 0a li r10,10 <== NOT EXECUTED ffc0675c: 81 7e 00 1c lwz r11,28(r30) <== NOT EXECUTED ffc06760: 38 60 00 01 li r3,1 <== NOT EXECUTED ffc06764: 38 09 00 01 addi r0,r9,1 <== NOT EXECUTED ffc06768: 7d 4b 49 ae stbx r10,r11,r9 <== NOT EXECUTED ffc0676c: 90 1e 00 20 stw r0,32(r30) <== NOT EXECUTED return 1; ffc06770: 4b ff fe c0 b ffc06630 <== NOT EXECUTED 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]) { erase (tty, 0); ffc06774: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc06778: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc0677c: 4b ff fb 85 bl ffc06300 <== NOT EXECUTED ffc06780: 38 60 00 00 li r3,0 <== NOT EXECUTED return 0; ffc06784: 4b ff fe ac b ffc06630 <== NOT EXECUTED =============================================================================== ffc12b14 : int killinfo( pid_t pid, int sig, const union sigval *value ) { ffc12b14: 94 21 ff d0 stwu r1,-48(r1) ffc12b18: 7c 08 02 a6 mflr r0 ffc12b1c: 93 61 00 1c stw r27,28(r1) ffc12b20: 7c bb 2b 78 mr r27,r5 ffc12b24: 93 81 00 20 stw r28,32(r1) ffc12b28: 7c 9c 23 78 mr r28,r4 ffc12b2c: 93 e1 00 2c stw r31,44(r1) ffc12b30: 7c 7f 1b 78 mr r31,r3 ffc12b34: 90 01 00 34 stw r0,52(r1) ffc12b38: 93 41 00 18 stw r26,24(r1) ffc12b3c: 93 a1 00 24 stw r29,36(r1) ffc12b40: 93 c1 00 28 stw r30,40(r1) POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) ffc12b44: 4b ff eb 69 bl ffc116ac ffc12b48: 7f 83 f8 00 cmpw cr7,r3,r31 ffc12b4c: 40 9e 02 a0 bne- cr7,ffc12dec rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) ffc12b50: 2f 9c 00 00 cmpwi cr7,r28,0 ffc12b54: 41 9e 02 ac beq- cr7,ffc12e00 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); ffc12b58: 38 1c ff ff addi r0,r28,-1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) ffc12b5c: 2b 80 00 1f cmplwi cr7,r0,31 ffc12b60: 41 9d 02 a0 bgt- cr7,ffc12e00 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) ffc12b64: 1f dc 00 0c mulli r30,r28,12 ffc12b68: 3f a0 00 00 lis r29,0 ffc12b6c: 3b bd 31 70 addi r29,r29,12656 ffc12b70: 7d 3d f2 14 add r9,r29,r30 ffc12b74: 81 29 00 08 lwz r9,8(r9) ffc12b78: 38 60 00 00 li r3,0 ffc12b7c: 2f 89 00 01 cmpwi cr7,r9,1 ffc12b80: 41 9e 01 c8 beq- cr7,ffc12d48 /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) ffc12b84: 2f 9c 00 08 cmpwi cr7,r28,8 ffc12b88: 41 9e 01 e8 beq- cr7,ffc12d70 ffc12b8c: 2f 9c 00 04 cmpwi cr7,r28,4 ffc12b90: 41 9e 01 e0 beq- cr7,ffc12d70 ffc12b94: 2f 9c 00 0b cmpwi cr7,r28,11 ffc12b98: 41 9e 01 d8 beq- cr7,ffc12d70 * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { ffc12b9c: 2f 9b 00 00 cmpwi cr7,r27,0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; ffc12ba0: 93 81 00 08 stw r28,8(r1) static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); ffc12ba4: 3b e0 00 01 li r31,1 siginfo->si_code = SI_USER; ffc12ba8: 93 e1 00 0c stw r31,12(r1) ffc12bac: 7f ff 00 30 slw r31,r31,r0 if ( !value ) { ffc12bb0: 41 9e 02 34 beq- cr7,ffc12de4 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; ffc12bb4: 80 1b 00 00 lwz r0,0(r27) ffc12bb8: 90 01 00 10 stw r0,16(r1) ffc12bbc: 3d 20 00 00 lis r9,0 ffc12bc0: 81 69 27 70 lwz r11,10096(r9) ffc12bc4: 38 0b 00 01 addi r0,r11,1 ffc12bc8: 90 09 27 70 stw r0,10096(r9) /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; ffc12bcc: 3d 20 00 00 lis r9,0 ffc12bd0: 80 69 27 b0 lwz r3,10160(r9) api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc12bd4: 81 23 01 48 lwz r9,328(r3) ffc12bd8: 80 09 00 cc lwz r0,204(r9) ffc12bdc: 7f e6 00 79 andc. r6,r31,r0 ffc12be0: 40 82 01 30 bne- ffc12d10 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; ffc12be4: 3d 40 00 00 lis r10,0 ffc12be8: 81 2a 32 fc lwz r9,13052(r10) ffc12bec: 39 4a 32 fc addi r10,r10,13052 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc12bf0: 39 4a 00 04 addi r10,r10,4 ffc12bf4: 7f 89 50 00 cmpw cr7,r9,r10 ffc12bf8: 41 9e 00 54 beq- cr7,ffc12c4c #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) ffc12bfc: 80 09 00 30 lwz r0,48(r9) for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; ffc12c00: 7d 23 4b 78 mr r3,r9 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc12c04: 81 69 01 48 lwz r11,328(r9) #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) ffc12c08: 7f e8 00 39 and. r8,r31,r0 ffc12c0c: 40 82 01 04 bne- ffc12d10 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) ffc12c10: 80 0b 00 cc lwz r0,204(r11) ffc12c14: 7f eb 00 79 andc. r11,r31,r0 ffc12c18: 41 a2 00 24 beq+ ffc12c3c ffc12c1c: 48 00 00 f4 b ffc12d10 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) ffc12c20: 80 09 00 30 lwz r0,48(r9) <== NOT EXECUTED for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc12c24: 81 69 01 48 lwz r11,328(r9) <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) ffc12c28: 7f fa 00 39 and. r26,r31,r0 <== NOT EXECUTED ffc12c2c: 40 82 00 e4 bne- ffc12d10 <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) ffc12c30: 80 0b 00 cc lwz r0,204(r11) <== NOT EXECUTED ffc12c34: 7f fb 00 79 andc. r27,r31,r0 <== NOT EXECUTED ffc12c38: 40 82 00 d8 bne- ffc12d10 <== NOT EXECUTED the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { ffc12c3c: 81 29 00 00 lwz r9,0(r9) /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; ffc12c40: 7f 89 50 00 cmpw cr7,r9,r10 !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; ffc12c44: 7d 23 4b 78 mr r3,r9 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; ffc12c48: 40 9e ff d8 bne+ cr7,ffc12c20 <== NEVER TAKEN * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; ffc12c4c: 3d 20 00 00 lis r9,0 ffc12c50: 88 e9 26 a4 lbz r7,9892(r9) ffc12c54: 3c a0 00 00 lis r5,0 ffc12c58: 38 a5 2c 28 addi r5,r5,11304 ffc12c5c: 38 e7 00 01 addi r7,r7,1 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( ffc12c60: 38 85 00 0c addi r4,r5,12 ffc12c64: 38 60 00 00 li r3,0 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) ffc12c68: 81 25 00 00 lwz r9,0(r5) ffc12c6c: 2f 89 00 00 cmpwi cr7,r9,0 ffc12c70: 41 9e 00 8c beq- cr7,ffc12cfc continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; ffc12c74: 81 29 00 04 lwz r9,4(r9) */ if ( !the_info ) continue; #endif maximum = the_info->maximum; ffc12c78: a1 49 00 10 lhz r10,16(r9) object_table = the_info->local_table; ffc12c7c: 81 09 00 1c lwz r8,28(r9) for ( index = 1 ; index <= maximum ; index++ ) { ffc12c80: 2f 8a 00 00 cmpwi cr7,r10,0 ffc12c84: 41 9e 00 78 beq- cr7,ffc12cfc ffc12c88: 39 20 00 01 li r9,1 the_thread = (Thread_Control *) object_table[ index ]; ffc12c8c: 55 20 10 3a rlwinm r0,r9,2,0,29 ffc12c90: 7d 68 00 2e lwzx r11,r8,r0 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { ffc12c94: 39 29 00 01 addi r9,r9,1 ffc12c98: 7f 8a 48 40 cmplw cr7,r10,r9 the_thread = (Thread_Control *) object_table[ index ]; if ( !the_thread ) ffc12c9c: 2f 0b 00 00 cmpwi cr6,r11,0 ffc12ca0: 41 9a 00 58 beq- cr6,ffc12cf8 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) ffc12ca4: 80 0b 00 14 lwz r0,20(r11) ffc12ca8: 7f 00 38 40 cmplw cr6,r0,r7 ffc12cac: 41 99 00 4c bgt- cr6,ffc12cf8 DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc12cb0: 80 cb 01 48 lwz r6,328(r11) ffc12cb4: 80 c6 00 cc lwz r6,204(r6) ffc12cb8: 7f fa 30 79 andc. r26,r31,r6 ffc12cbc: 41 82 00 3c beq- ffc12cf8 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { ffc12cc0: 41 98 00 30 blt- cr6,ffc12cf0 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { ffc12cc4: 80 c3 00 10 lwz r6,16(r3) ffc12cc8: 2f 06 00 00 cmpwi cr6,r6,0 ffc12ccc: 41 9a 00 2c beq- cr6,ffc12cf8 /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { ffc12cd0: 83 6b 00 10 lwz r27,16(r11) continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { ffc12cd4: 74 da 10 00 andis. r26,r6,4096 */ if ( !_States_Is_ready( interested->current_state ) ) { /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { ffc12cd8: 2f 1b 00 00 cmpwi cr6,r27,0 ffc12cdc: 41 9a 00 14 beq- cr6,ffc12cf0 DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { ffc12ce0: 57 66 27 fe rlwinm r6,r27,4,31,31 ffc12ce4: 2f 06 00 00 cmpwi cr6,r6,0 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { ffc12ce8: 40 82 00 10 bne- ffc12cf8 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { ffc12cec: 41 9a 00 0c beq- cr6,ffc12cf8 ffc12cf0: 7c 07 03 78 mr r7,r0 ffc12cf4: 7d 63 5b 78 mr r3,r11 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { ffc12cf8: 40 9c ff 94 bge+ cr7,ffc12c8c ffc12cfc: 38 a5 00 04 addi r5,r5,4 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { ffc12d00: 7f 85 20 00 cmpw cr7,r5,r4 ffc12d04: 40 9e ff 64 bne+ cr7,ffc12c68 } } } } if ( interested ) { ffc12d08: 2f 83 00 00 cmpwi cr7,r3,0 ffc12d0c: 41 9e 00 20 beq- cr7,ffc12d2c * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; ffc12d10: 38 00 00 01 li r0,1 ffc12d14: 98 03 00 74 stb r0,116(r3) /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { ffc12d18: 7f 84 e3 78 mr r4,r28 ffc12d1c: 38 a1 00 08 addi r5,r1,8 ffc12d20: 48 00 01 d5 bl ffc12ef4 <_POSIX_signals_Unblock_thread> ffc12d24: 2f 83 00 00 cmpwi cr7,r3,0 ffc12d28: 40 9e 00 18 bne- cr7,ffc12d40 /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); ffc12d2c: 7f e3 fb 78 mr r3,r31 ffc12d30: 48 00 01 85 bl ffc12eb4 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { ffc12d34: 7c 1d f0 2e lwzx r0,r29,r30 ffc12d38: 2f 80 00 02 cmpwi cr7,r0,2 ffc12d3c: 41 9e 00 68 beq- cr7,ffc12da4 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); ffc12d40: 4b ff 84 61 bl ffc0b1a0 <_Thread_Enable_dispatch> ffc12d44: 38 60 00 00 li r3,0 return 0; } ffc12d48: 80 01 00 34 lwz r0,52(r1) ffc12d4c: 83 41 00 18 lwz r26,24(r1) ffc12d50: 7c 08 03 a6 mtlr r0 ffc12d54: 83 61 00 1c lwz r27,28(r1) ffc12d58: 83 81 00 20 lwz r28,32(r1) ffc12d5c: 83 a1 00 24 lwz r29,36(r1) ffc12d60: 83 c1 00 28 lwz r30,40(r1) ffc12d64: 83 e1 00 2c lwz r31,44(r1) ffc12d68: 38 21 00 30 addi r1,r1,48 ffc12d6c: 4e 80 00 20 blr * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); ffc12d70: 48 00 04 09 bl ffc13178 ffc12d74: 7f 84 e3 78 mr r4,r28 ffc12d78: 48 00 02 ed bl ffc13064 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } ffc12d7c: 80 01 00 34 lwz r0,52(r1) ffc12d80: 83 41 00 18 lwz r26,24(r1) ffc12d84: 7c 08 03 a6 mtlr r0 ffc12d88: 83 61 00 1c lwz r27,28(r1) ffc12d8c: 83 81 00 20 lwz r28,32(r1) ffc12d90: 83 a1 00 24 lwz r29,36(r1) ffc12d94: 83 c1 00 28 lwz r30,40(r1) ffc12d98: 83 e1 00 2c lwz r31,44(r1) ffc12d9c: 38 21 00 30 addi r1,r1,48 ffc12da0: 4e 80 00 20 blr */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) ffc12da4: 3c 60 00 00 lis r3,0 ffc12da8: 38 63 32 f0 addi r3,r3,13040 ffc12dac: 4b ff 67 75 bl ffc09520 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { ffc12db0: 7c 64 1b 79 mr. r4,r3 ffc12db4: 41 82 00 60 beq- ffc12e14 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; ffc12db8: 81 21 00 0c lwz r9,12(r1) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); ffc12dbc: 3c 60 00 00 lis r3,0 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; ffc12dc0: 80 01 00 10 lwz r0,16(r1) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); ffc12dc4: 38 63 33 64 addi r3,r3,13156 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; ffc12dc8: 81 61 00 08 lwz r11,8(r1) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); ffc12dcc: 7c 63 f2 14 add r3,r3,r30 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; ffc12dd0: 91 24 00 0c stw r9,12(r4) ffc12dd4: 91 64 00 08 stw r11,8(r4) ffc12dd8: 90 04 00 10 stw r0,16(r4) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); ffc12ddc: 4b ff 67 15 bl ffc094f0 <_Chain_Append> ffc12de0: 4b ff ff 60 b ffc12d40 */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; ffc12de4: 93 61 00 10 stw r27,16(r1) ffc12de8: 4b ff fd d4 b ffc12bbc /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); ffc12dec: 48 00 04 89 bl ffc13274 <__errno> ffc12df0: 38 00 00 03 li r0,3 ffc12df4: 90 03 00 00 stw r0,0(r3) ffc12df8: 38 60 ff ff li r3,-1 ffc12dfc: 4b ff ff 4c b ffc12d48 */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc12e00: 48 00 04 75 bl ffc13274 <__errno> ffc12e04: 38 00 00 16 li r0,22 ffc12e08: 90 03 00 00 stw r0,0(r3) ffc12e0c: 38 60 ff ff li r3,-1 ffc12e10: 4b ff ff 38 b ffc12d48 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); ffc12e14: 4b ff 83 8d bl ffc0b1a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); ffc12e18: 48 00 04 5d bl ffc13274 <__errno> ffc12e1c: 38 00 00 0b li r0,11 ffc12e20: 90 03 00 00 stw r0,0(r3) ffc12e24: 38 60 ff ff li r3,-1 ffc12e28: 4b ff ff 20 b ffc12d48 =============================================================================== ffc06550 : int link( const char *existing, const char *new ) { ffc06550: 94 21 ff b8 stwu r1,-72(r1) ffc06554: 7c 08 02 a6 mflr r0 ffc06558: 93 81 00 38 stw r28,56(r1) * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 0, &existing_loc, true ); if ( result != 0 ) ffc0655c: 3b 80 ff ff li r28,-1 int link( const char *existing, const char *new ) { ffc06560: 90 01 00 4c stw r0,76(r1) ffc06564: 93 a1 00 3c stw r29,60(r1) ffc06568: 7c 7d 1b 78 mr r29,r3 ffc0656c: 93 c1 00 40 stw r30,64(r1) ffc06570: 7c 9e 23 78 mr r30,r4 ffc06574: 93 e1 00 44 stw r31,68(r1) /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), ffc06578: 48 01 1a 05 bl ffc17f7c ffc0657c: 3b e1 00 0c addi r31,r1,12 ffc06580: 7c 64 1b 78 mr r4,r3 ffc06584: 38 a0 00 00 li r5,0 ffc06588: 7f a3 eb 78 mr r3,r29 ffc0658c: 7f e6 fb 78 mr r6,r31 ffc06590: 38 e0 00 01 li r7,1 ffc06594: 4b ff f8 e9 bl ffc05e7c 0, &existing_loc, true ); if ( result != 0 ) ffc06598: 2f 83 00 00 cmpwi cr7,r3,0 ffc0659c: 40 9e 01 04 bne- cr7,ffc066a0 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); ffc065a0: 88 1e 00 00 lbz r0,0(r30) ffc065a4: 2f 80 00 2f cmpwi cr7,r0,47 ffc065a8: 41 9e 00 14 beq- cr7,ffc065bc ffc065ac: 2f 80 00 5c cmpwi cr7,r0,92 ffc065b0: 41 9e 00 0c beq- cr7,ffc065bc <== NEVER TAKEN ffc065b4: 2f 80 00 00 cmpwi cr7,r0,0 ffc065b8: 40 9e 01 0c bne- cr7,ffc066c4 <== ALWAYS TAKEN ffc065bc: 3d 20 00 00 lis r9,0 ffc065c0: 81 29 27 54 lwz r9,10068(r9) ffc065c4: 38 60 00 01 li r3,1 ffc065c8: 80 09 00 24 lwz r0,36(r9) ffc065cc: 81 09 00 18 lwz r8,24(r9) ffc065d0: 81 49 00 1c lwz r10,28(r9) ffc065d4: 81 69 00 20 lwz r11,32(r9) ffc065d8: 91 01 00 20 stw r8,32(r1) ffc065dc: 91 41 00 24 stw r10,36(r1) ffc065e0: 91 61 00 28 stw r11,40(r1) ffc065e4: 90 01 00 2c stw r0,44(r1) ffc065e8: 80 09 00 28 lwz r0,40(r9) ffc065ec: 90 01 00 30 stw r0,48(r1) if ( !parent_loc.ops->evalformake_h ) { ffc065f0: 81 21 00 2c lwz r9,44(r1) ffc065f4: 80 09 00 04 lwz r0,4(r9) ffc065f8: 2f 80 00 00 cmpwi cr7,r0,0 ffc065fc: 41 9e 01 b0 beq- cr7,ffc067ac <== NEVER TAKEN rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); ffc06600: 3b a1 00 20 addi r29,r1,32 ffc06604: 7c 09 03 a6 mtctr r0 ffc06608: 7c 7e 1a 14 add r3,r30,r3 ffc0660c: 7f a4 eb 78 mr r4,r29 ffc06610: 38 a1 00 08 addi r5,r1,8 ffc06614: 4e 80 04 21 bctrl if ( result != 0 ) { ffc06618: 7c 7e 1b 79 mr. r30,r3 ffc0661c: 40 82 01 5c bne- ffc06778 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { ffc06620: 80 01 00 1c lwz r0,28(r1) ffc06624: 81 21 00 30 lwz r9,48(r1) ffc06628: 7f 89 00 00 cmpw cr7,r9,r0 ffc0662c: 40 9e 00 d0 bne- cr7,ffc066fc rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { ffc06630: 81 21 00 2c lwz r9,44(r1) ffc06634: 80 09 00 08 lwz r0,8(r9) ffc06638: 2f 80 00 00 cmpwi cr7,r0,0 ffc0663c: 41 9e 01 a8 beq- cr7,ffc067e4 <== NEVER TAKEN rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); ffc06640: 7f e3 fb 78 mr r3,r31 ffc06644: 80 a1 00 08 lwz r5,8(r1) ffc06648: 7f a4 eb 78 mr r4,r29 ffc0664c: 7c 09 03 a6 mtctr r0 ffc06650: 4e 80 04 21 bctrl rtems_filesystem_freenode( &existing_loc ); ffc06654: 81 21 00 18 lwz r9,24(r1) rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); ffc06658: 7c 7c 1b 78 mr r28,r3 rtems_filesystem_freenode( &existing_loc ); ffc0665c: 2f 89 00 00 cmpwi cr7,r9,0 ffc06660: 41 9e 00 1c beq- cr7,ffc0667c <== NEVER TAKEN ffc06664: 80 09 00 1c lwz r0,28(r9) ffc06668: 2f 80 00 00 cmpwi cr7,r0,0 ffc0666c: 41 9e 00 10 beq- cr7,ffc0667c <== NEVER TAKEN ffc06670: 7f e3 fb 78 mr r3,r31 ffc06674: 7c 09 03 a6 mtctr r0 ffc06678: 4e 80 04 21 bctrl rtems_filesystem_freenode( &parent_loc ); ffc0667c: 81 21 00 2c lwz r9,44(r1) ffc06680: 2f 89 00 00 cmpwi cr7,r9,0 ffc06684: 41 9e 00 1c beq- cr7,ffc066a0 <== NEVER TAKEN ffc06688: 80 09 00 1c lwz r0,28(r9) ffc0668c: 2f 80 00 00 cmpwi cr7,r0,0 ffc06690: 41 9e 00 10 beq- cr7,ffc066a0 <== NEVER TAKEN ffc06694: 7f a3 eb 78 mr r3,r29 ffc06698: 7c 09 03 a6 mtctr r0 ffc0669c: 4e 80 04 21 bctrl return result; } ffc066a0: 80 01 00 4c lwz r0,76(r1) ffc066a4: 7f 83 e3 78 mr r3,r28 ffc066a8: 83 a1 00 3c lwz r29,60(r1) ffc066ac: 7c 08 03 a6 mtlr r0 ffc066b0: 83 81 00 38 lwz r28,56(r1) ffc066b4: 83 c1 00 40 lwz r30,64(r1) ffc066b8: 83 e1 00 44 lwz r31,68(r1) ffc066bc: 38 21 00 48 addi r1,r1,72 ffc066c0: 4e 80 00 20 blr /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); ffc066c4: 3d 20 00 00 lis r9,0 ffc066c8: 81 29 27 54 lwz r9,10068(r9) ffc066cc: 38 60 00 00 li r3,0 ffc066d0: 80 09 00 10 lwz r0,16(r9) ffc066d4: 81 09 00 04 lwz r8,4(r9) ffc066d8: 81 49 00 08 lwz r10,8(r9) ffc066dc: 81 69 00 0c lwz r11,12(r9) ffc066e0: 91 01 00 20 stw r8,32(r1) ffc066e4: 91 41 00 24 stw r10,36(r1) ffc066e8: 91 61 00 28 stw r11,40(r1) ffc066ec: 90 01 00 2c stw r0,44(r1) ffc066f0: 80 09 00 14 lwz r0,20(r9) ffc066f4: 90 01 00 30 stw r0,48(r1) ffc066f8: 4b ff fe f8 b ffc065f0 * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { rtems_filesystem_freenode( &existing_loc ); ffc066fc: 81 21 00 18 lwz r9,24(r1) ffc06700: 2f 89 00 00 cmpwi cr7,r9,0 ffc06704: 41 9e 00 1c beq- cr7,ffc06720 <== NEVER TAKEN ffc06708: 80 09 00 1c lwz r0,28(r9) ffc0670c: 2f 80 00 00 cmpwi cr7,r0,0 ffc06710: 41 9e 00 10 beq- cr7,ffc06720 <== NEVER TAKEN ffc06714: 7f e3 fb 78 mr r3,r31 ffc06718: 7c 09 03 a6 mtctr r0 ffc0671c: 4e 80 04 21 bctrl rtems_filesystem_freenode( &parent_loc ); ffc06720: 81 21 00 2c lwz r9,44(r1) ffc06724: 2f 89 00 00 cmpwi cr7,r9,0 ffc06728: 41 9e 00 1c beq- cr7,ffc06744 <== NEVER TAKEN ffc0672c: 80 09 00 1c lwz r0,28(r9) ffc06730: 2f 80 00 00 cmpwi cr7,r0,0 ffc06734: 41 9e 00 10 beq- cr7,ffc06744 <== NEVER TAKEN ffc06738: 7f a3 eb 78 mr r3,r29 ffc0673c: 7c 09 03 a6 mtctr r0 ffc06740: 4e 80 04 21 bctrl rtems_set_errno_and_return_minus_one( EXDEV ); ffc06744: 48 01 00 75 bl ffc167b8 <__errno> ffc06748: 38 00 00 12 li r0,18 ffc0674c: 90 03 00 00 stw r0,0(r3) ffc06750: 3b 80 ff ff li r28,-1 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } ffc06754: 7f 83 e3 78 mr r3,r28 ffc06758: 80 01 00 4c lwz r0,76(r1) ffc0675c: 83 81 00 38 lwz r28,56(r1) ffc06760: 7c 08 03 a6 mtlr r0 ffc06764: 83 a1 00 3c lwz r29,60(r1) ffc06768: 83 c1 00 40 lwz r30,64(r1) ffc0676c: 83 e1 00 44 lwz r31,68(r1) ffc06770: 38 21 00 48 addi r1,r1,72 ffc06774: 4e 80 00 20 blr rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); ffc06778: 81 21 00 18 lwz r9,24(r1) ffc0677c: 2f 89 00 00 cmpwi cr7,r9,0 ffc06780: 41 9e 00 1c beq- cr7,ffc0679c <== NEVER TAKEN ffc06784: 80 09 00 1c lwz r0,28(r9) ffc06788: 2f 80 00 00 cmpwi cr7,r0,0 ffc0678c: 41 9e 00 10 beq- cr7,ffc0679c <== NEVER TAKEN ffc06790: 7f e3 fb 78 mr r3,r31 ffc06794: 7c 09 03 a6 mtctr r0 ffc06798: 4e 80 04 21 bctrl rtems_set_errno_and_return_minus_one( result ); ffc0679c: 48 01 00 1d bl ffc167b8 <__errno> ffc067a0: 3b 80 ff ff li r28,-1 ffc067a4: 93 c3 00 00 stw r30,0(r3) ffc067a8: 4b ff fe f8 b ffc066a0 */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); ffc067ac: 81 21 00 18 lwz r9,24(r1) <== NOT EXECUTED ffc067b0: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc067b4: 41 9e 00 1c beq- cr7,ffc067d0 <== NOT EXECUTED ffc067b8: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc067bc: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc067c0: 41 9e 00 10 beq- cr7,ffc067d0 <== NOT EXECUTED ffc067c4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc067c8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc067cc: 4e 80 04 21 bctrl <== NOT EXECUTED } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc067d0: 48 00 ff e9 bl ffc167b8 <__errno> <== NOT EXECUTED ffc067d4: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc067d8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc067dc: 3b 80 ff ff li r28,-1 <== NOT EXECUTED ffc067e0: 4b ff fe c0 b ffc066a0 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); ffc067e4: 81 61 00 18 lwz r11,24(r1) <== NOT EXECUTED ffc067e8: 2f 8b 00 00 cmpwi cr7,r11,0 <== NOT EXECUTED ffc067ec: 41 9e 00 20 beq- cr7,ffc0680c <== NOT EXECUTED ffc067f0: 80 0b 00 1c lwz r0,28(r11) <== NOT EXECUTED ffc067f4: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc067f8: 41 9e 00 14 beq- cr7,ffc0680c <== NOT EXECUTED ffc067fc: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc06800: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06804: 4e 80 04 21 bctrl <== NOT EXECUTED ffc06808: 81 21 00 2c lwz r9,44(r1) <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); ffc0680c: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc06810: 41 be ff c0 beq- cr7,ffc067d0 <== NOT EXECUTED ffc06814: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc06818: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0681c: 41 be ff b4 beq- cr7,ffc067d0 <== NOT EXECUTED ffc06820: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc06824: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06828: 4e 80 04 21 bctrl <== NOT EXECUTED ffc0682c: 4b ff ff a4 b ffc067d0 <== NOT EXECUTED =============================================================================== ffc1de4c : off_t lseek( int fd, off_t offset, int whence ) { ffc1de4c: 94 21 ff e8 stwu r1,-24(r1) ffc1de50: 7c 08 02 a6 mflr r0 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); ffc1de54: 3d 20 00 00 lis r9,0 off_t lseek( int fd, off_t offset, int whence ) { ffc1de58: 90 01 00 1c stw r0,28(r1) rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); ffc1de5c: 80 09 26 8c lwz r0,9868(r9) off_t lseek( int fd, off_t offset, int whence ) { ffc1de60: 93 a1 00 0c stw r29,12(r1) rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); ffc1de64: 7f 83 00 40 cmplw cr7,r3,r0 off_t lseek( int fd, off_t offset, int whence ) { ffc1de68: 93 c1 00 10 stw r30,16(r1) ffc1de6c: 93 e1 00 14 stw r31,20(r1) rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); ffc1de70: 40 9c 01 54 bge- cr7,ffc1dfc4 <== NEVER TAKEN iop = rtems_libio_iop( fd ); ffc1de74: 3d 20 00 00 lis r9,0 ffc1de78: 83 e9 27 4c lwz r31,10060(r9) ffc1de7c: 1c 63 00 48 mulli r3,r3,72 ffc1de80: 7f ff 1a 14 add r31,r31,r3 rtems_libio_check_is_open(iop); ffc1de84: 80 1f 00 18 lwz r0,24(r31) ffc1de88: 70 09 01 00 andi. r9,r0,256 ffc1de8c: 41 82 01 38 beq- ffc1dfc4 <== NEVER TAKEN /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) ffc1de90: 81 3f 00 40 lwz r9,64(r31) ffc1de94: 80 09 00 14 lwz r0,20(r9) ffc1de98: 2f 80 00 00 cmpwi cr7,r0,0 ffc1de9c: 41 9e 01 40 beq- cr7,ffc1dfdc <== NEVER TAKEN /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { ffc1dea0: 2f 87 00 01 cmpwi cr7,r7,1 /* * Now process the lseek(). */ old_offset = iop->offset; ffc1dea4: 83 bf 00 10 lwz r29,16(r31) ffc1dea8: 83 df 00 14 lwz r30,20(r31) switch ( whence ) { ffc1deac: 41 9e 01 04 beq- cr7,ffc1dfb0 ffc1deb0: 2f 87 00 02 cmpwi cr7,r7,2 ffc1deb4: 41 9e 00 58 beq- cr7,ffc1df0c ffc1deb8: 2f 87 00 00 cmpwi cr7,r7,0 ffc1debc: 40 9e 00 bc bne- cr7,ffc1df78 case SEEK_SET: iop->offset = offset; ffc1dec0: 90 bf 00 10 stw r5,16(r31) ffc1dec4: 90 df 00 14 stw r6,20(r31) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); ffc1dec8: 80 09 00 14 lwz r0,20(r9) ffc1decc: 7f e3 fb 78 mr r3,r31 ffc1ded0: 7c 09 03 a6 mtctr r0 ffc1ded4: 4e 80 04 21 bctrl ffc1ded8: 7c 69 1b 78 mr r9,r3 if ( status == (off_t) -1 ) ffc1dedc: 2f 89 ff ff cmpwi cr7,r9,-1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); ffc1dee0: 7c 8a 23 78 mr r10,r4 if ( status == (off_t) -1 ) ffc1dee4: 41 9e 00 60 beq- cr7,ffc1df44 <== NEVER TAKEN /* * So if the operation failed, we have to restore iop->offset. */ return status; } ffc1dee8: 80 01 00 1c lwz r0,28(r1) ffc1deec: 7d 44 53 78 mr r4,r10 ffc1def0: 7d 23 4b 78 mr r3,r9 ffc1def4: 83 a1 00 0c lwz r29,12(r1) ffc1def8: 7c 08 03 a6 mtlr r0 ffc1defc: 83 c1 00 10 lwz r30,16(r1) ffc1df00: 83 e1 00 14 lwz r31,20(r1) ffc1df04: 38 21 00 18 addi r1,r1,24 ffc1df08: 4e 80 00 20 blr case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; ffc1df0c: 80 7f 00 08 lwz r3,8(r31) ffc1df10: 80 9f 00 0c lwz r4,12(r31) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); ffc1df14: 80 09 00 14 lwz r0,20(r9) case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; ffc1df18: 7d 86 20 14 addc r12,r6,r4 ffc1df1c: 7d 65 19 14 adde r11,r5,r3 ffc1df20: 91 7f 00 10 stw r11,16(r31) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); ffc1df24: 7c 09 03 a6 mtctr r0 ffc1df28: 7f e3 fb 78 mr r3,r31 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; ffc1df2c: 91 9f 00 14 stw r12,20(r31) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); ffc1df30: 4e 80 04 21 bctrl ffc1df34: 7c 69 1b 78 mr r9,r3 if ( status == (off_t) -1 ) ffc1df38: 2f 89 ff ff cmpwi cr7,r9,-1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); ffc1df3c: 7c 8a 23 78 mr r10,r4 if ( status == (off_t) -1 ) ffc1df40: 40 9e ff a8 bne+ cr7,ffc1dee8 ffc1df44: 2f 84 ff ff cmpwi cr7,r4,-1 ffc1df48: 40 9e ff a0 bne+ cr7,ffc1dee8 <== NEVER TAKEN /* * So if the operation failed, we have to restore iop->offset. */ return status; } ffc1df4c: 80 01 00 1c lwz r0,28(r1) ffc1df50: 7d 44 53 78 mr r4,r10 * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); if ( status == (off_t) -1 ) iop->offset = old_offset; ffc1df54: 93 bf 00 10 stw r29,16(r31) /* * So if the operation failed, we have to restore iop->offset. */ return status; } ffc1df58: 7d 23 4b 78 mr r3,r9 ffc1df5c: 7c 08 03 a6 mtlr r0 * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); if ( status == (off_t) -1 ) iop->offset = old_offset; ffc1df60: 93 df 00 14 stw r30,20(r31) /* * So if the operation failed, we have to restore iop->offset. */ return status; } ffc1df64: 83 a1 00 0c lwz r29,12(r1) ffc1df68: 83 c1 00 10 lwz r30,16(r1) ffc1df6c: 83 e1 00 14 lwz r31,20(r1) ffc1df70: 38 21 00 18 addi r1,r1,24 ffc1df74: 4e 80 00 20 blr case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc1df78: 4b ff 52 fd bl ffc13274 <__errno> ffc1df7c: 38 00 00 16 li r0,22 ffc1df80: 90 03 00 00 stw r0,0(r3) ffc1df84: 39 20 ff ff li r9,-1 ffc1df88: 39 40 ff ff li r10,-1 /* * So if the operation failed, we have to restore iop->offset. */ return status; } ffc1df8c: 80 01 00 1c lwz r0,28(r1) ffc1df90: 7d 44 53 78 mr r4,r10 ffc1df94: 7d 23 4b 78 mr r3,r9 ffc1df98: 83 a1 00 0c lwz r29,12(r1) ffc1df9c: 7c 08 03 a6 mtlr r0 ffc1dfa0: 83 c1 00 10 lwz r30,16(r1) ffc1dfa4: 83 e1 00 14 lwz r31,20(r1) ffc1dfa8: 38 21 00 18 addi r1,r1,24 ffc1dfac: 4e 80 00 20 blr case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; ffc1dfb0: 7d 86 f0 14 addc r12,r6,r30 ffc1dfb4: 7d 65 e9 14 adde r11,r5,r29 ffc1dfb8: 91 7f 00 10 stw r11,16(r31) ffc1dfbc: 91 9f 00 14 stw r12,20(r31) break; ffc1dfc0: 4b ff ff 08 b ffc1dec8 off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); ffc1dfc4: 4b ff 52 b1 bl ffc13274 <__errno> <== NOT EXECUTED ffc1dfc8: 38 00 00 09 li r0,9 <== NOT EXECUTED ffc1dfcc: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc1dfd0: 39 20 ff ff li r9,-1 <== NOT EXECUTED ffc1dfd4: 39 40 ff ff li r10,-1 <== NOT EXECUTED ffc1dfd8: 4b ff ff 10 b ffc1dee8 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc1dfdc: 4b ff 52 99 bl ffc13274 <__errno> <== NOT EXECUTED ffc1dfe0: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc1dfe4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc1dfe8: 39 20 ff ff li r9,-1 <== NOT EXECUTED ffc1dfec: 39 40 ff ff li r10,-1 <== NOT EXECUTED ffc1dff0: 4b ff fe f8 b ffc1dee8 <== NOT EXECUTED =============================================================================== ffc04974 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); ffc04974: 94 21 ff e8 stwu r1,-24(r1) ffc04978: 7c 08 02 a6 mflr r0 ffc0497c: 3d 20 00 00 lis r9,0 ffc04980: 90 01 00 1c stw r0,28(r1) ffc04984: 39 29 2b 00 addi r9,r9,11008 ffc04988: 81 69 00 04 lwz r11,4(r9) ffc0498c: 93 e1 00 14 stw r31,20(r1) ffc04990: 7c 7f 1b 78 mr r31,r3 ffc04994: 39 6b 00 01 addi r11,r11,1 ffc04998: 91 69 00 04 stw r11,4(r9) ffc0499c: 93 a1 00 0c stw r29,12(r1) ffc049a0: 93 c1 00 10 stw r30,16(r1) /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); ffc049a4: 4b ff fe 71 bl ffc04814 /* * Validate the parameters */ if ( !size ) ffc049a8: 2f 9f 00 00 cmpwi cr7,r31,0 ffc049ac: 41 9e 00 b0 beq- cr7,ffc04a5c <== NEVER TAKEN return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc049b0: 3d 20 00 00 lis r9,0 ffc049b4: 80 09 27 d4 lwz r0,10196(r9) ffc049b8: 2f 80 00 03 cmpwi cr7,r0,3 ffc049bc: 41 9e 00 94 beq- cr7,ffc04a50 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); ffc049c0: 3d 20 00 00 lis r9,0 ffc049c4: 80 69 26 9c lwz r3,9884(r9) ffc049c8: 7f e4 fb 78 mr r4,r31 ffc049cc: 38 a0 00 00 li r5,0 ffc049d0: 38 c0 00 00 li r6,0 ffc049d4: 48 00 5f 8d bl ffc0a960 <_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 ) { ffc049d8: 2f 83 00 00 cmpwi cr7,r3,0 ffc049dc: 7c 7d 1b 78 mr r29,r3 if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; ffc049e0: 7c 7e 1b 78 mr r30,r3 * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { ffc049e4: 41 9e 00 9c beq- cr7,ffc04a80 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) ffc049e8: 3d 20 00 00 lis r9,0 ffc049ec: 81 29 27 10 lwz r9,10000(r9) ffc049f0: 2f 89 00 00 cmpwi cr7,r9,0 ffc049f4: 41 9e 00 18 beq- cr7,ffc04a0c <== ALWAYS TAKEN (*rtems_malloc_dirty_helper)( return_this, size ); ffc049f8: 80 09 00 00 lwz r0,0(r9) <== NOT EXECUTED ffc049fc: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc04a00: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc04a04: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc04a08: 4e 80 04 21 bctrl <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) ffc04a0c: 3d 20 00 00 lis r9,0 ffc04a10: 81 29 27 08 lwz r9,9992(r9) ffc04a14: 7f dd f3 78 mr r29,r30 ffc04a18: 2f 89 00 00 cmpwi cr7,r9,0 ffc04a1c: 41 9e 00 14 beq- cr7,ffc04a30 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(return_this); ffc04a20: 80 09 00 04 lwz r0,4(r9) <== NOT EXECUTED ffc04a24: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc04a28: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc04a2c: 4e 80 04 21 bctrl <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } ffc04a30: 80 01 00 1c lwz r0,28(r1) ffc04a34: 7f a3 eb 78 mr r3,r29 ffc04a38: 83 c1 00 10 lwz r30,16(r1) ffc04a3c: 7c 08 03 a6 mtlr r0 ffc04a40: 83 a1 00 0c lwz r29,12(r1) ffc04a44: 83 e1 00 14 lwz r31,20(r1) ffc04a48: 38 21 00 18 addi r1,r1,24 ffc04a4c: 4e 80 00 20 blr return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc04a50: 4b ff fd 51 bl ffc047a0 ffc04a54: 2f 83 00 00 cmpwi cr7,r3,0 ffc04a58: 40 9e ff 68 bne+ cr7,ffc049c0 <== ALWAYS TAKEN if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } ffc04a5c: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); ffc04a60: 3b a0 00 00 li r29,0 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } ffc04a64: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc04a68: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc04a6c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc04a70: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc04a74: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc04a78: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc04a7c: 4e 80 00 20 blr <== NOT EXECUTED */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) ffc04a80: 3d 20 00 00 lis r9,0 ffc04a84: 81 29 27 0c lwz r9,9996(r9) ffc04a88: 2f 89 00 00 cmpwi cr7,r9,0 ffc04a8c: 41 9e 00 1c beq- cr7,ffc04aa8 <== ALWAYS TAKEN return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); ffc04a90: 80 09 00 04 lwz r0,4(r9) <== NOT EXECUTED ffc04a94: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc04a98: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc04a9c: 4e 80 04 21 bctrl <== NOT EXECUTED if ( !return_this ) { ffc04aa0: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED ffc04aa4: 40 82 ff 44 bne+ ffc049e8 <== NOT EXECUTED errno = ENOMEM; ffc04aa8: 48 00 e7 cd bl ffc13274 <__errno> ffc04aac: 38 00 00 0c li r0,12 ffc04ab0: 90 03 00 00 stw r0,0(r3) return (void *) 0; ffc04ab4: 4b ff ff 7c b ffc04a30 =============================================================================== ffc047e8 : } void malloc_deferred_free( void *pointer ) { ffc047e8: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED ffc047ec: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc047f0: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); ffc047f4: 3c 60 00 00 lis r3,0 <== NOT EXECUTED ffc047f8: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc047fc: 38 63 2a f4 addi r3,r3,10996 <== NOT EXECUTED ffc04800: 48 00 4c f1 bl ffc094f0 <_Chain_Append> <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } ffc04804: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc04808: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc0480c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc04810: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc04814 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { ffc04814: 94 21 ff f0 stwu r1,-16(r1) ffc04818: 7c 08 02 a6 mflr r0 ffc0481c: 93 e1 00 0c stw r31,12(r1) ffc04820: 3f e0 00 00 lis r31,0 ffc04824: 3b ff 2a f4 addi r31,r31,10996 ffc04828: 90 01 00 14 stw r0,20(r1) rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) ffc0482c: 48 00 00 08 b ffc04834 free(to_be_freed); ffc04830: 4b ff fd c5 bl ffc045f4 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); ffc04834: 7f e3 fb 78 mr r3,r31 ffc04838: 48 00 4c e9 bl ffc09520 <_Chain_Get> rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) ffc0483c: 2f 83 00 00 cmpwi cr7,r3,0 ffc04840: 40 9e ff f0 bne+ cr7,ffc04830 <== NEVER TAKEN free(to_be_freed); } ffc04844: 80 01 00 14 lwz r0,20(r1) ffc04848: 83 e1 00 0c lwz r31,12(r1) ffc0484c: 38 21 00 10 addi r1,r1,16 ffc04850: 7c 08 03 a6 mtlr r0 ffc04854: 4e 80 00 20 blr =============================================================================== ffc170ec : void *memfile_alloc_block(void) { void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); ffc170ec: 3d 20 00 00 lis r9,0 */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { ffc170f0: 94 21 ff f8 stwu r1,-8(r1) ffc170f4: 7c 08 02 a6 mflr r0 void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); ffc170f8: 38 60 00 01 li r3,1 ffc170fc: 80 89 27 68 lwz r4,10088(r9) */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { ffc17100: 90 01 00 0c stw r0,12(r1) void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); ffc17104: 4b fe ec a5 bl ffc05da8 if ( memory ) ffc17108: 2c 03 00 00 cmpwi r3,0 ffc1710c: 41 82 00 14 beq- ffc17120 <== NEVER TAKEN memfile_blocks_allocated++; ffc17110: 3d 20 00 00 lis r9,0 ffc17114: 81 69 28 10 lwz r11,10256(r9) ffc17118: 38 0b 00 01 addi r0,r11,1 ffc1711c: 90 09 28 10 stw r0,10256(r9) return memory; } ffc17120: 80 01 00 0c lwz r0,12(r1) ffc17124: 38 21 00 08 addi r1,r1,8 ffc17128: 7c 08 03 a6 mtlr r0 ffc1712c: 4e 80 00 20 blr =============================================================================== ffc176f8 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ ffc176f8: 94 21 ff f0 stwu r1,-16(r1) ffc176fc: 7c 08 02 a6 mflr r0 ffc17700: 93 e1 00 0c stw r31,12(r1) ffc17704: 7c 7f 1b 78 mr r31,r3 ffc17708: 90 01 00 14 stw r0,20(r1) /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { ffc1770c: 4b ff d1 91 bl ffc1489c ffc17710: 2f 83 00 00 cmpwi cr7,r3,0 ffc17714: 40 9e 00 40 bne- cr7,ffc17754 ffc17718: a0 1f 00 34 lhz r0,52(r31) ffc1771c: 2f 80 00 00 cmpwi cr7,r0,0 ffc17720: 40 9e 00 34 bne- cr7,ffc17754 <== NEVER TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) ffc17724: 3d 20 00 00 lis r9,0 ffc17728: 81 29 26 f4 lwz r9,9972(r9) ffc1772c: 81 69 00 04 lwz r11,4(r9) ffc17730: 7f 8b f8 00 cmpw cr7,r11,r31 ffc17734: 41 9e 00 38 beq- cr7,ffc1776c <== NEVER TAKEN rtems_filesystem_current.node_access = NULL; /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) ffc17738: 80 1f 00 4c lwz r0,76(r31) ffc1773c: 2f 80 00 06 cmpwi cr7,r0,6 ffc17740: 41 9e 00 0c beq- cr7,ffc1774c <== NEVER TAKEN IMFS_memfile_remove( the_jnode ); ffc17744: 7f e3 fb 78 mr r3,r31 ffc17748: 4b ff fd ad bl ffc174f4 free( the_jnode ); ffc1774c: 7f e3 fb 78 mr r3,r31 ffc17750: 4b fe e9 dd bl ffc0612c } return 0; } ffc17754: 80 01 00 14 lwz r0,20(r1) ffc17758: 38 60 00 00 li r3,0 ffc1775c: 83 e1 00 0c lwz r31,12(r1) ffc17760: 38 21 00 10 addi r1,r1,16 ffc17764: 7c 08 03 a6 mtlr r0 ffc17768: 4e 80 00 20 blr /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) rtems_filesystem_current.node_access = NULL; ffc1776c: 90 09 00 04 stw r0,4(r9) <== NOT EXECUTED ffc17770: 4b ff ff c8 b ffc17738 <== NOT EXECUTED =============================================================================== ffc173d0 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { ffc173d0: 94 21 ff e0 stwu r1,-32(r1) ffc173d4: 7c 08 02 a6 mflr r0 ffc173d8: 93 e1 00 1c stw r31,28(r1) /* * Perform internal consistency checks */ assert( block_table ); ffc173dc: 7c 7f 1b 79 mr. r31,r3 void memfile_free_blocks_in_table( block_p **block_table, int entries ) { ffc173e0: 93 81 00 10 stw r28,16(r1) ffc173e4: 7c 9c 23 78 mr r28,r4 ffc173e8: 90 01 00 24 stw r0,36(r1) ffc173ec: 93 61 00 0c stw r27,12(r1) ffc173f0: 93 a1 00 14 stw r29,20(r1) ffc173f4: 93 c1 00 18 stw r30,24(r1) /* * Perform internal consistency checks */ assert( block_table ); ffc173f8: 41 82 00 74 beq- ffc1746c <== NEVER TAKEN * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i<== NEVER TAKEN ffc17408: 7c 7e 1b 78 mr r30,r3 ffc1740c: 3b a0 00 00 li r29,0 if ( b[i] ) { memfile_free_block( b[i] ); b[i] = 0; ffc17410: 3b 60 00 00 li r27,0 */ b = *block_table; for ( i=0 ; i memfile_free_block( b[i] ); ffc17420: 4b ff fc 9d bl ffc170bc b[i] = 0; ffc17424: 93 7e 00 00 stw r27,0(r30) * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i ffc17438: 80 7f 00 00 lwz r3,0(r31) /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); ffc1743c: 4b ff fc 81 bl ffc170bc *block_table = 0; ffc17440: 38 00 00 00 li r0,0 ffc17444: 90 1f 00 00 stw r0,0(r31) } ffc17448: 80 01 00 24 lwz r0,36(r1) ffc1744c: 83 61 00 0c lwz r27,12(r1) ffc17450: 7c 08 03 a6 mtlr r0 ffc17454: 83 81 00 10 lwz r28,16(r1) ffc17458: 83 a1 00 14 lwz r29,20(r1) ffc1745c: 83 c1 00 18 lwz r30,24(r1) ffc17460: 83 e1 00 1c lwz r31,28(r1) ffc17464: 38 21 00 20 addi r1,r1,32 ffc17468: 4e 80 00 20 blr /* * Perform internal consistency checks */ assert( block_table ); ffc1746c: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc17470: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc17474: 38 a5 6f 4c addi r5,r5,28492 <== NOT EXECUTED ffc17478: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc1747c: 38 63 70 10 addi r3,r3,28688 <== NOT EXECUTED ffc17480: 38 a5 00 20 addi r5,r5,32 <== NOT EXECUTED ffc17484: 38 c6 70 88 addi r6,r6,28808 <== NOT EXECUTED ffc17488: 38 80 01 b3 li r4,435 <== NOT EXECUTED ffc1748c: 4b fe e7 41 bl ffc05bcc <__assert_func> <== NOT EXECUTED =============================================================================== ffc17b0c : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { ffc17b0c: 94 21 ff e0 stwu r1,-32(r1) ffc17b10: 7c 08 02 a6 mflr r0 ffc17b14: 7c 69 1b 78 mr r9,r3 ffc17b18: 90 01 00 24 stw r0,36(r1) ffc17b1c: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; ffc17b20: 83 e3 00 3c lwz r31,60(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 ) ffc17b24: 80 1f 00 50 lwz r0,80(r31) ffc17b28: 7f 80 28 00 cmpw cr7,r0,r5 ffc17b2c: 41 9c 00 50 blt- cr7,ffc17b7c <== NEVER TAKEN ffc17b30: 41 9e 00 40 beq- cr7,ffc17b70 <== ALWAYS TAKEN * The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; ffc17b34: 90 bf 00 50 stw r5,80(r31) iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); ffc17b38: 38 61 00 08 addi r3,r1,8 ffc17b3c: 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; ffc17b40: 90 df 00 54 stw r6,84(r31) iop->size = the_jnode->info.file.size; ffc17b44: 90 c9 00 0c stw r6,12(r9) ffc17b48: 90 a9 00 08 stw r5,8(r9) IMFS_update_atime( the_jnode ); ffc17b4c: 4b fe e6 a9 bl ffc061f4 ffc17b50: 80 01 00 08 lwz r0,8(r1) ffc17b54: 38 60 00 00 li r3,0 ffc17b58: 90 1f 00 40 stw r0,64(r31) return 0; } ffc17b5c: 80 01 00 24 lwz r0,36(r1) ffc17b60: 83 e1 00 1c lwz r31,28(r1) ffc17b64: 38 21 00 20 addi r1,r1,32 ffc17b68: 7c 08 03 a6 mtlr r0 ffc17b6c: 4e 80 00 20 blr * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) ffc17b70: 80 1f 00 54 lwz r0,84(r31) ffc17b74: 7f 80 30 40 cmplw cr7,r0,r6 ffc17b78: 40 9c ff bc bge+ cr7,ffc17b34 <== ALWAYS TAKEN return IMFS_memfile_extend( the_jnode, length ); ffc17b7c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc17b80: 4b ff fd 61 bl ffc178e0 <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } ffc17b84: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED ffc17b88: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc17b8c: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc17b90: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc17b94: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc17b98 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { ffc17b98: 94 21 ff f0 stwu r1,-16(r1) ffc17b9c: 7c 08 02 a6 mflr r0 ffc17ba0: 90 01 00 14 stw r0,20(r1) ffc17ba4: 93 c1 00 08 stw r30,8(r1) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; ffc17ba8: 83 c3 00 3c lwz r30,60(r3) rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { ffc17bac: 93 e1 00 0c stw r31,12(r1) ffc17bb0: 7c 7f 1b 78 mr r31,r3 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { ffc17bb4: 80 1e 00 4c lwz r0,76(r30) ffc17bb8: 2f 80 00 06 cmpwi cr7,r0,6 ffc17bbc: 41 9e 00 54 beq- cr7,ffc17c10 <== NEVER TAKEN if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) ffc17bc0: 80 a3 00 10 lwz r5,16(r3) ffc17bc4: 80 c3 00 14 lwz r6,20(r3) ffc17bc8: 7f c3 f3 78 mr r3,r30 ffc17bcc: 4b ff fd 15 bl ffc178e0 ffc17bd0: 2f 83 00 00 cmpwi cr7,r3,0 ffc17bd4: 40 9e 00 b0 bne- cr7,ffc17c84 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; ffc17bd8: 81 3e 00 50 lwz r9,80(r30) ffc17bdc: 81 5e 00 54 lwz r10,84(r30) ffc17be0: 91 3f 00 08 stw r9,8(r31) ffc17be4: 91 5f 00 0c stw r10,12(r31) ffc17be8: 81 3f 00 10 lwz r9,16(r31) ffc17bec: 81 5f 00 14 lwz r10,20(r31) } return iop->offset; } ffc17bf0: 80 01 00 14 lwz r0,20(r1) ffc17bf4: 7d 44 53 78 mr r4,r10 ffc17bf8: 7d 23 4b 78 mr r3,r9 ffc17bfc: 83 c1 00 08 lwz r30,8(r1) ffc17c00: 7c 08 03 a6 mtlr r0 ffc17c04: 83 e1 00 0c lwz r31,12(r1) ffc17c08: 38 21 00 10 addi r1,r1,16 ffc17c0c: 4e 80 00 20 blr IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) ffc17c10: 81 3e 00 50 lwz r9,80(r30) <== NOT EXECUTED ffc17c14: 80 03 00 10 lwz r0,16(r3) <== NOT EXECUTED ffc17c18: 81 5e 00 54 lwz r10,84(r30) <== NOT EXECUTED ffc17c1c: 7f 80 48 00 cmpw cr7,r0,r9 <== NOT EXECUTED ffc17c20: 81 63 00 14 lwz r11,20(r3) <== NOT EXECUTED ffc17c24: 41 9d 00 38 bgt- cr7,ffc17c5c <== NOT EXECUTED ffc17c28: 41 9e 00 2c beq- cr7,ffc17c54 <== NOT EXECUTED ffc17c2c: 7c 09 03 78 mr r9,r0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } ffc17c30: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) ffc17c34: 7d 6a 5b 78 mr r10,r11 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } ffc17c38: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc17c3c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc17c40: 7d 44 53 78 mr r4,r10 <== NOT EXECUTED ffc17c44: 7d 23 4b 78 mr r3,r9 <== NOT EXECUTED ffc17c48: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc17c4c: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc17c50: 4e 80 00 20 blr <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) ffc17c54: 7f 8b 50 40 cmplw cr7,r11,r10 <== NOT EXECUTED ffc17c58: 40 bd ff d4 ble- cr7,ffc17c2c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } ffc17c5c: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc17c60: 7d 44 53 78 mr r4,r10 <== NOT EXECUTED the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; ffc17c64: 91 3f 00 10 stw r9,16(r31) <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } ffc17c68: 7d 23 4b 78 mr r3,r9 <== NOT EXECUTED ffc17c6c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; ffc17c70: 91 5f 00 14 stw r10,20(r31) <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } ffc17c74: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc17c78: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc17c7c: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc17c80: 4e 80 00 20 blr <== NOT EXECUTED if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); ffc17c84: 48 00 22 dd bl ffc19f60 <__errno> <== NOT EXECUTED ffc17c88: 38 00 00 1c li r0,28 <== NOT EXECUTED ffc17c8c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc17c90: 39 20 ff ff li r9,-1 <== NOT EXECUTED ffc17c94: 39 40 ff ff li r10,-1 <== NOT EXECUTED ffc17c98: 4b ff ff 58 b ffc17bf0 <== NOT EXECUTED =============================================================================== ffc18020 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc18020: 94 21 ff f0 stwu r1,-16(r1) ffc18024: 7c 08 02 a6 mflr r0 ffc18028: 90 01 00 14 stw r0,20(r1) the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) ffc1802c: 80 03 00 18 lwz r0,24(r3) rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc18030: 93 c1 00 08 stw r30,8(r1) the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) ffc18034: 70 09 02 04 andi. r9,r0,516 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc18038: 93 e1 00 0c stw r31,12(r1) ffc1803c: 7c 7f 1b 78 mr r31,r3 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; ffc18040: 83 c3 00 3c lwz r30,60(r3) /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) ffc18044: 41 82 00 10 beq- ffc18054 && (the_jnode->type == IMFS_LINEAR_FILE)) { ffc18048: 81 3e 00 4c lwz r9,76(r30) ffc1804c: 2f 89 00 06 cmpwi cr7,r9,6 ffc18050: 41 9e 00 4c beq- cr7,ffc1809c <== NEVER TAKEN the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) ffc18054: 81 3e 00 50 lwz r9,80(r30) ffc18058: 81 5e 00 54 lwz r10,84(r30) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) ffc1805c: 70 0b 02 00 andi. r11,r0,512 ffc18060: 40 82 00 28 bne- ffc18088 iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; ffc18064: 91 3f 00 08 stw r9,8(r31) ffc18068: 38 60 00 00 li r3,0 ffc1806c: 91 5f 00 0c stw r10,12(r31) return 0; } ffc18070: 80 01 00 14 lwz r0,20(r1) ffc18074: 83 c1 00 08 lwz r30,8(r1) ffc18078: 7c 08 03 a6 mtlr r0 ffc1807c: 83 e1 00 0c lwz r31,12(r1) ffc18080: 38 21 00 10 addi r1,r1,16 ffc18084: 4e 80 00 20 blr if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) iop->offset = the_jnode->info.file.size; ffc18088: 91 3f 00 10 stw r9,16(r31) ffc1808c: 91 5f 00 14 stw r10,20(r31) ffc18090: 81 3e 00 50 lwz r9,80(r30) ffc18094: 81 5e 00 54 lwz r10,84(r30) ffc18098: 4b ff ff cc b ffc18064 /* * 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; ffc1809c: 81 1e 00 54 lwz r8,84(r30) <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; ffc180a0: 39 20 00 05 li r9,5 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; ffc180a4: 38 00 00 00 li r0,0 <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; ffc180a8: 91 3e 00 4c stw r9,76(r30) <== 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) ffc180ac: 2f 88 00 00 cmpwi cr7,r8,0 <== NOT EXECUTED && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; ffc180b0: 39 20 00 00 li r9,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; ffc180b4: 80 fe 00 58 lwz r7,88(r30) <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; ffc180b8: 39 40 00 00 li r10,0 <== NOT EXECUTED ffc180bc: 91 3e 00 50 stw r9,80(r30) <== NOT EXECUTED ffc180c0: 91 5e 00 54 stw r10,84(r30) <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; ffc180c4: 90 1e 00 60 stw r0,96(r30) <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; ffc180c8: 90 1e 00 5c stw r0,92(r30) <== 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; ffc180cc: 90 1e 00 58 stw r0,88(r30) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) ffc180d0: 40 9e 00 0c bne- cr7,ffc180dc <== NOT EXECUTED ffc180d4: 80 03 00 18 lwz r0,24(r3) <== NOT EXECUTED ffc180d8: 4b ff ff 84 b ffc1805c <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) ffc180dc: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc180e0: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc180e4: 38 c0 00 00 li r6,0 <== NOT EXECUTED ffc180e8: 4b ff fb b5 bl ffc17c9c <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) ffc180ec: 2f 83 ff ff cmpwi cr7,r3,-1 <== NOT EXECUTED ffc180f0: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc180f4: 41 be ff 7c beq- cr7,ffc18070 <== NOT EXECUTED ffc180f8: 80 1f 00 18 lwz r0,24(r31) <== NOT EXECUTED ffc180fc: 4b ff ff 58 b ffc18054 <== NOT EXECUTED =============================================================================== ffc17774 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { ffc17774: 94 21 ff e0 stwu r1,-32(r1) ffc17778: 7c 08 02 a6 mflr r0 ffc1777c: 90 01 00 24 stw r0,36(r1) ffc17780: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; ffc17784: 83 e4 00 00 lwz r31,0(r4) /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { ffc17788: 80 1f 00 08 lwz r0,8(r31) ffc1778c: 2f 80 00 00 cmpwi cr7,r0,0 ffc17790: 41 9e 00 14 beq- cr7,ffc177a4 <== NEVER TAKEN ffc17794: 7f e3 fb 78 mr r3,r31 ffc17798: 4b ff 3f 95 bl ffc0b72c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; ffc1779c: 38 00 00 00 li r0,0 ffc177a0: 90 1f 00 08 stw r0,8(r31) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; ffc177a4: a1 3f 00 34 lhz r9,52(r31) IMFS_update_ctime( the_jnode ); ffc177a8: 38 61 00 08 addi r3,r1,8 ffc177ac: 38 80 00 00 li r4,0 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; ffc177b0: 38 09 ff ff addi r0,r9,-1 ffc177b4: b0 1f 00 34 sth r0,52(r31) IMFS_update_ctime( the_jnode ); ffc177b8: 4b fe ea 3d bl ffc061f4 ffc177bc: 80 01 00 08 lwz r0,8(r1) return memfile_check_rmnod( the_jnode ); ffc177c0: 7f e3 fb 78 mr r3,r31 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; IMFS_update_ctime( the_jnode ); ffc177c4: 90 1f 00 48 stw r0,72(r31) return memfile_check_rmnod( the_jnode ); ffc177c8: 4b ff ff 31 bl ffc176f8 } ffc177cc: 80 01 00 24 lwz r0,36(r1) ffc177d0: 83 e1 00 1c lwz r31,28(r1) ffc177d4: 38 21 00 20 addi r1,r1,32 ffc177d8: 7c 08 03 a6 mtlr r0 ffc177dc: 4e 80 00 20 blr =============================================================================== ffc04ae4 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { ffc04ae4: 94 21 ff c0 stwu r1,-64(r1) ffc04ae8: 7c 08 02 a6 mflr r0 ffc04aec: 90 01 00 44 stw r0,68(r1) rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) ffc04af0: 70 80 f0 00 andi. r0,r4,61440 int mknod( const char *pathname, mode_t mode, dev_t dev ) { ffc04af4: 93 61 00 2c stw r27,44(r1) ffc04af8: 7c bb 2b 78 mr r27,r5 ffc04afc: 93 81 00 30 stw r28,48(r1) ffc04b00: 7c dc 33 78 mr r28,r6 ffc04b04: 93 c1 00 38 stw r30,56(r1) ffc04b08: 7c 9e 23 78 mr r30,r4 ffc04b0c: 93 a1 00 34 stw r29,52(r1) ffc04b10: 93 e1 00 3c stw r31,60(r1) rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) ffc04b14: 41 82 01 80 beq- ffc04c94 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); ffc04b18: 88 03 00 00 lbz r0,0(r3) ffc04b1c: 2f 80 00 2f cmpwi cr7,r0,47 ffc04b20: 41 9e 00 14 beq- cr7,ffc04b34 ffc04b24: 2f 80 00 5c cmpwi cr7,r0,92 ffc04b28: 41 9e 00 0c beq- cr7,ffc04b34 <== NEVER TAKEN ffc04b2c: 2f 80 00 00 cmpwi cr7,r0,0 ffc04b30: 40 9e 00 e8 bne- cr7,ffc04c18 <== ALWAYS TAKEN ffc04b34: 3d 20 00 00 lis r9,0 ffc04b38: 81 29 26 dc lwz r9,9948(r9) ffc04b3c: 39 60 00 01 li r11,1 ffc04b40: 80 09 00 24 lwz r0,36(r9) ffc04b44: 80 e9 00 18 lwz r7,24(r9) ffc04b48: 81 09 00 1c lwz r8,28(r9) ffc04b4c: 81 49 00 20 lwz r10,32(r9) ffc04b50: 90 01 00 18 stw r0,24(r1) ffc04b54: 90 e1 00 0c stw r7,12(r1) ffc04b58: 91 01 00 10 stw r8,16(r1) ffc04b5c: 91 41 00 14 stw r10,20(r1) ffc04b60: 80 09 00 28 lwz r0,40(r9) if ( !temp_loc.ops->evalformake_h ) { ffc04b64: 81 21 00 18 lwz r9,24(r1) int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); ffc04b68: 90 01 00 1c stw r0,28(r1) if ( !temp_loc.ops->evalformake_h ) { ffc04b6c: 80 09 00 04 lwz r0,4(r9) ffc04b70: 2f 80 00 00 cmpwi cr7,r0,0 ffc04b74: 41 9e 00 e8 beq- cr7,ffc04c5c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( ffc04b78: 3b e1 00 0c addi r31,r1,12 ffc04b7c: 7c 09 03 a6 mtctr r0 ffc04b80: 7c 63 5a 14 add r3,r3,r11 ffc04b84: 7f e4 fb 78 mr r4,r31 ffc04b88: 38 a1 00 08 addi r5,r1,8 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) ffc04b8c: 3b a0 ff ff li r29,-1 if ( !temp_loc.ops->evalformake_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( ffc04b90: 4e 80 04 21 bctrl &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) ffc04b94: 2f 83 00 00 cmpwi cr7,r3,0 ffc04b98: 40 9e 00 58 bne- cr7,ffc04bf0 return -1; if ( !temp_loc.ops->mknod_h ) { ffc04b9c: 81 21 00 18 lwz r9,24(r1) ffc04ba0: 80 09 00 14 lwz r0,20(r9) ffc04ba4: 2f 80 00 00 cmpwi cr7,r0,0 ffc04ba8: 41 9e 01 00 beq- cr7,ffc04ca8 <== NEVER TAKEN rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); ffc04bac: 7f c4 f3 78 mr r4,r30 ffc04bb0: 80 61 00 08 lwz r3,8(r1) ffc04bb4: 7f 65 db 78 mr r5,r27 ffc04bb8: 7c 09 03 a6 mtctr r0 ffc04bbc: 7f 86 e3 78 mr r6,r28 ffc04bc0: 7f e7 fb 78 mr r7,r31 ffc04bc4: 4e 80 04 21 bctrl rtems_filesystem_freenode( &temp_loc ); ffc04bc8: 81 21 00 18 lwz r9,24(r1) if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); ffc04bcc: 7c 7d 1b 78 mr r29,r3 rtems_filesystem_freenode( &temp_loc ); ffc04bd0: 2f 89 00 00 cmpwi cr7,r9,0 ffc04bd4: 41 9e 00 1c beq- cr7,ffc04bf0 <== NEVER TAKEN ffc04bd8: 80 09 00 1c lwz r0,28(r9) ffc04bdc: 2f 80 00 00 cmpwi cr7,r0,0 ffc04be0: 41 9e 00 10 beq- cr7,ffc04bf0 ffc04be4: 7f e3 fb 78 mr r3,r31 ffc04be8: 7c 09 03 a6 mtctr r0 ffc04bec: 4e 80 04 21 bctrl return result; } ffc04bf0: 80 01 00 44 lwz r0,68(r1) ffc04bf4: 7f a3 eb 78 mr r3,r29 ffc04bf8: 83 61 00 2c lwz r27,44(r1) ffc04bfc: 7c 08 03 a6 mtlr r0 ffc04c00: 83 81 00 30 lwz r28,48(r1) ffc04c04: 83 a1 00 34 lwz r29,52(r1) ffc04c08: 83 c1 00 38 lwz r30,56(r1) ffc04c0c: 83 e1 00 3c lwz r31,60(r1) ffc04c10: 38 21 00 40 addi r1,r1,64 ffc04c14: 4e 80 00 20 blr int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); ffc04c18: 3d 20 00 00 lis r9,0 ffc04c1c: 81 29 26 dc lwz r9,9948(r9) ffc04c20: 39 60 00 00 li r11,0 ffc04c24: 80 09 00 10 lwz r0,16(r9) ffc04c28: 80 e9 00 04 lwz r7,4(r9) ffc04c2c: 81 09 00 08 lwz r8,8(r9) ffc04c30: 81 49 00 0c lwz r10,12(r9) ffc04c34: 90 01 00 18 stw r0,24(r1) ffc04c38: 90 e1 00 0c stw r7,12(r1) ffc04c3c: 91 01 00 10 stw r8,16(r1) ffc04c40: 91 41 00 14 stw r10,20(r1) ffc04c44: 80 09 00 14 lwz r0,20(r9) if ( !temp_loc.ops->evalformake_h ) { ffc04c48: 81 21 00 18 lwz r9,24(r1) int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); ffc04c4c: 90 01 00 1c stw r0,28(r1) if ( !temp_loc.ops->evalformake_h ) { ffc04c50: 80 09 00 04 lwz r0,4(r9) ffc04c54: 2f 80 00 00 cmpwi cr7,r0,0 ffc04c58: 40 9e ff 20 bne+ cr7,ffc04b78 <== ALWAYS TAKEN if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc04c5c: 48 00 e6 19 bl ffc13274 <__errno> <== NOT EXECUTED ffc04c60: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc04c64: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc04c68: 3b a0 ff ff li r29,-1 <== NOT EXECUTED result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } ffc04c6c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc04c70: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED ffc04c74: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc04c78: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc04c7c: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc04c80: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc04c84: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc04c88: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc04c8c: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc04c90: 4e 80 00 20 blr <== NOT EXECUTED int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc04c94: 48 00 e5 e1 bl ffc13274 <__errno> <== NOT EXECUTED ffc04c98: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc04c9c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc04ca0: 3b a0 ff ff li r29,-1 <== NOT EXECUTED ffc04ca4: 4b ff ff 4c b ffc04bf0 <== NOT EXECUTED ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); ffc04ca8: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc04cac: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc04cb0: 41 be ff ac beq- cr7,ffc04c5c <== NOT EXECUTED ffc04cb4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc04cb8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc04cbc: 4e 80 04 21 bctrl <== NOT EXECUTED ffc04cc0: 4b ff ff 9c b ffc04c5c <== NOT EXECUTED =============================================================================== ffc04ce8 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { ffc04ce8: 94 21 ff b8 stwu r1,-72(r1) ffc04cec: 7d 80 00 26 mfcr r12 ffc04cf0: 7c 08 02 a6 mflr r0 ffc04cf4: 93 a1 00 3c stw r29,60(r1) /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { ffc04cf8: 7c 9d 23 79 mr. r29,r4 const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { ffc04cfc: 93 21 00 2c stw r25,44(r1) ffc04d00: 7c d9 33 78 mr r25,r6 ffc04d04: 93 41 00 30 stw r26,48(r1) ffc04d08: 7c fa 3b 78 mr r26,r7 ffc04d0c: 93 81 00 38 stw r28,56(r1) ffc04d10: 7c 7c 1b 78 mr r28,r3 ffc04d14: 93 c1 00 40 stw r30,64(r1) ffc04d18: 7c be 2b 78 mr r30,r5 ffc04d1c: 90 01 00 4c stw r0,76(r1) ffc04d20: 93 61 00 34 stw r27,52(r1) ffc04d24: 93 e1 00 44 stw r31,68(r1) ffc04d28: 91 81 00 28 stw r12,40(r1) /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { ffc04d2c: 41 82 02 9c beq- ffc04fc8 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && ffc04d30: 2b 85 00 01 cmplwi cr7,r5,1 ffc04d34: 41 9d 02 94 bgt- cr7,ffc04fc8 errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { ffc04d38: 80 1d 00 24 lwz r0,36(r29) ffc04d3c: 2f 80 00 00 cmpwi cr7,r0,0 ffc04d40: 41 9e 02 b4 beq- cr7,ffc04ff4 <== NEVER TAKEN /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) ffc04d44: 2e 06 00 00 cmpwi cr4,r6,0 ffc04d48: 41 92 02 24 beq- cr4,ffc04f6c <== ALWAYS TAKEN size += strlen( device ) + 1; ffc04d4c: 7c c3 33 78 mr r3,r6 <== NOT EXECUTED ffc04d50: 48 00 f8 21 bl ffc14570 <== NOT EXECUTED ffc04d54: 38 63 00 6d addi r3,r3,109 <== NOT EXECUTED temp_mt_entry = malloc( size ); ffc04d58: 4b ff fc 1d bl ffc04974 if ( !temp_mt_entry ) { ffc04d5c: 2f 83 00 00 cmpwi cr7,r3,0 */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); ffc04d60: 7c 7f 1b 78 mr r31,r3 ffc04d64: 7c 7b 1b 78 mr r27,r3 if ( !temp_mt_entry ) { ffc04d68: 41 9e 02 ac beq- cr7,ffc05014 <== NEVER TAKEN errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; ffc04d6c: 93 c3 00 30 stw r30,48(r3) if ( !temp_mt_entry ) { errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; ffc04d70: 90 7f 00 2c stw r3,44(r31) temp_mt_entry->options = options; if ( device ) { ffc04d74: 41 92 01 f0 beq- cr4,ffc04f64 <== ALWAYS TAKEN temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); ffc04d78: 38 03 00 6c addi r0,r3,108 <== NOT EXECUTED } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = ffc04d7c: 90 1f 00 68 stw r0,104(r31) <== NOT EXECUTED (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); ffc04d80: 7c 03 03 78 mr r3,r0 <== NOT EXECUTED ffc04d84: 7f 24 cb 78 mr r4,r25 <== NOT EXECUTED ffc04d88: 48 00 f7 71 bl ffc144f8 <== NOT EXECUTED /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { ffc04d8c: 2f 9a 00 00 cmpwi cr7,r26,0 ffc04d90: 41 9e 01 b0 beq- cr7,ffc04f40 if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) ffc04d94: 7f 43 d3 78 mr r3,r26 ffc04d98: 48 00 f7 d9 bl ffc14570 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( ffc04d9c: 3b c1 00 08 addi r30,r1,8 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) ffc04da0: 7c 64 1b 78 mr r4,r3 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( ffc04da4: 38 a0 00 07 li r5,7 ffc04da8: 7f 43 d3 78 mr r3,r26 ffc04dac: 7f c6 f3 78 mr r6,r30 ffc04db0: 38 e0 00 01 li r7,1 ffc04db4: 4b ff f7 39 bl ffc044ec ffc04db8: 2f 83 ff ff cmpwi cr7,r3,-1 ffc04dbc: 41 9e 02 48 beq- cr7,ffc05004 <== NEVER TAKEN /* * Test for node_type_h */ if (!loc.ops->node_type_h) { ffc04dc0: 81 21 00 14 lwz r9,20(r1) ffc04dc4: 80 09 00 10 lwz r0,16(r9) ffc04dc8: 2f 80 00 00 cmpwi cr7,r0,0 ffc04dcc: 41 9e 01 08 beq- cr7,ffc04ed4 <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { ffc04dd0: 7f c3 f3 78 mr r3,r30 ffc04dd4: 7c 09 03 a6 mtctr r0 ffc04dd8: 4e 80 04 21 bctrl ffc04ddc: 2f 83 00 01 cmpwi cr7,r3,1 ffc04de0: 40 9e 02 04 bne- cr7,ffc04fe4 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; ffc04de4: 3d 40 00 00 lis r10,0 ffc04de8: 81 2a 2b 30 lwz r9,11056(r10) ffc04dec: 39 4a 2b 30 addi r10,r10,11056 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc04df0: 39 4a 00 04 addi r10,r10,4 ffc04df4: 7f 89 50 00 cmpw cr7,r9,r10 ffc04df8: 41 9e 01 e4 beq- cr7,ffc04fdc <== NEVER TAKEN !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) ffc04dfc: 81 61 00 08 lwz r11,8(r1) ffc04e00: 80 09 00 1c lwz r0,28(r9) ffc04e04: 7f 80 58 00 cmpw cr7,r0,r11 ffc04e08: 40 be 00 14 bne+ cr7,ffc04e1c <== ALWAYS TAKEN ffc04e0c: 48 00 01 24 b ffc04f30 <== NOT EXECUTED ffc04e10: 80 09 00 1c lwz r0,28(r9) ffc04e14: 7f 80 58 00 cmpw cr7,r0,r11 ffc04e18: 41 9e 01 18 beq- cr7,ffc04f30 * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { ffc04e1c: 81 29 00 00 lwz r9,0(r9) /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; ffc04e20: 7f 89 50 00 cmpw cr7,r9,r10 ffc04e24: 40 9e ff ec bne+ cr7,ffc04e10 * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; ffc04e28: 81 21 00 14 lwz r9,20(r1) * 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. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; ffc04e2c: 91 7f 00 08 stw r11,8(r31) /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ ffc04e30: 80 09 00 20 lwz r0,32(r9) * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; ffc04e34: 81 61 00 10 lwz r11,16(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 ){ ffc04e38: 2f 80 00 00 cmpwi cr7,r0,0 * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; ffc04e3c: 91 3f 00 14 stw r9,20(r31) * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; ffc04e40: 91 7f 00 10 stw r11,16(r31) temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; ffc04e44: 81 61 00 18 lwz r11,24(r1) ffc04e48: 91 7f 00 18 stw r11,24(r31) /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ ffc04e4c: 41 9e 00 88 beq- cr7,ffc04ed4 <== NEVER TAKEN errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { ffc04e50: 7f e3 fb 78 mr r3,r31 ffc04e54: 7c 09 03 a6 mtctr r0 ffc04e58: 7f db f3 78 mr r27,r30 ffc04e5c: 4e 80 04 21 bctrl ffc04e60: 2f 83 00 00 cmpwi cr7,r3,0 ffc04e64: 40 9e 00 7c bne- cr7,ffc04ee0 <== NEVER TAKEN temp_mt_entry->mt_point_node.handlers = NULL; temp_mt_entry->mt_point_node.ops = NULL; temp_mt_entry->mt_point_node.mt_entry = NULL; } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { ffc04e68: 80 1d 00 24 lwz r0,36(r29) ffc04e6c: 7f e3 fb 78 mr r3,r31 ffc04e70: 7c 09 03 a6 mtctr r0 ffc04e74: 4e 80 04 21 bctrl ffc04e78: 2f 83 00 00 cmpwi cr7,r3,0 ffc04e7c: 40 9e 00 f8 bne- cr7,ffc04f74 <== NEVER TAKEN RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); ffc04e80: 3c 60 00 00 lis r3,0 ffc04e84: 38 63 2b 30 addi r3,r3,11056 ffc04e88: 7f e4 fb 78 mr r4,r31 ffc04e8c: 48 00 46 65 bl ffc094f0 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) ffc04e90: 2f 9c 00 00 cmpwi cr7,r28,0 ffc04e94: 38 60 00 00 li r3,0 ffc04e98: 41 9e 00 08 beq- cr7,ffc04ea0 <== NEVER TAKEN *mt_entry = temp_mt_entry; ffc04e9c: 93 fc 00 00 stw r31,0(r28) if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } ffc04ea0: 80 01 00 4c lwz r0,76(r1) ffc04ea4: 81 81 00 28 lwz r12,40(r1) ffc04ea8: 7c 08 03 a6 mtlr r0 ffc04eac: 83 21 00 2c lwz r25,44(r1) ffc04eb0: 83 41 00 30 lwz r26,48(r1) ffc04eb4: 7d 80 81 20 mtcrf 8,r12 ffc04eb8: 83 61 00 34 lwz r27,52(r1) ffc04ebc: 83 81 00 38 lwz r28,56(r1) ffc04ec0: 83 a1 00 3c lwz r29,60(r1) ffc04ec4: 83 c1 00 40 lwz r30,64(r1) ffc04ec8: 83 e1 00 44 lwz r31,68(r1) ffc04ecc: 38 21 00 48 addi r1,r1,72 ffc04ed0: 4e 80 00 20 blr * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ errno = ENOTSUP; ffc04ed4: 48 00 e3 a1 bl ffc13274 <__errno> <== NOT EXECUTED ffc04ed8: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc04edc: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); ffc04ee0: 7f e3 fb 78 mr r3,r31 ffc04ee4: 4b ff f7 11 bl ffc045f4 ffc04ee8: 7f db f3 78 mr r27,r30 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); ffc04eec: 81 3b 00 0c lwz r9,12(r27) ffc04ef0: 2f 89 00 00 cmpwi cr7,r9,0 ffc04ef4: 40 9e 00 b4 bne- cr7,ffc04fa8 <== ALWAYS TAKEN ffc04ef8: 38 60 ff ff li r3,-1 <== NOT EXECUTED return -1; } ffc04efc: 80 01 00 4c lwz r0,76(r1) <== NOT EXECUTED ffc04f00: 81 81 00 28 lwz r12,40(r1) <== NOT EXECUTED ffc04f04: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc04f08: 83 21 00 2c lwz r25,44(r1) <== NOT EXECUTED ffc04f0c: 83 41 00 30 lwz r26,48(r1) <== NOT EXECUTED ffc04f10: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED ffc04f14: 83 61 00 34 lwz r27,52(r1) <== NOT EXECUTED ffc04f18: 83 81 00 38 lwz r28,56(r1) <== NOT EXECUTED ffc04f1c: 83 a1 00 3c lwz r29,60(r1) <== NOT EXECUTED ffc04f20: 83 c1 00 40 lwz r30,64(r1) <== NOT EXECUTED ffc04f24: 83 e1 00 44 lwz r31,68(r1) <== NOT EXECUTED ffc04f28: 38 21 00 48 addi r1,r1,72 <== NOT EXECUTED ffc04f2c: 4e 80 00 20 blr <== NOT EXECUTED /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; ffc04f30: 48 00 e3 45 bl ffc13274 <__errno> ffc04f34: 38 00 00 10 li r0,16 ffc04f38: 90 03 00 00 stw r0,0(r3) goto cleanup_and_bail; ffc04f3c: 4b ff ff a4 b ffc04ee0 temp_mt_entry->mt_fs_root.ops = NULL; temp_mt_entry->mt_point_node.node_access = NULL; temp_mt_entry->mt_point_node.handlers = NULL; temp_mt_entry->mt_point_node.ops = NULL; temp_mt_entry->mt_point_node.mt_entry = NULL; ffc04f40: 93 5f 00 18 stw r26,24(r31) ffc04f44: 3b 60 00 00 li r27,0 * This is a mount of the base file system --> The * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; ffc04f48: 93 5f 00 1c stw r26,28(r31) temp_mt_entry->mt_fs_root.handlers = NULL; ffc04f4c: 93 5f 00 24 stw r26,36(r31) temp_mt_entry->mt_fs_root.ops = NULL; ffc04f50: 93 5f 00 28 stw r26,40(r31) temp_mt_entry->mt_point_node.node_access = NULL; ffc04f54: 93 5f 00 08 stw r26,8(r31) temp_mt_entry->mt_point_node.handlers = NULL; ffc04f58: 93 5f 00 10 stw r26,16(r31) temp_mt_entry->mt_point_node.ops = NULL; ffc04f5c: 93 5f 00 14 stw r26,20(r31) ffc04f60: 4b ff ff 08 b ffc04e68 if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); } else temp_mt_entry->dev = 0; ffc04f64: 93 23 00 68 stw r25,104(r3) ffc04f68: 4b ff fe 24 b ffc04d8c /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) ffc04f6c: 38 60 00 6c li r3,108 ffc04f70: 4b ff fd e8 b ffc04d58 temp_mt_entry->mt_point_node.mt_entry = NULL; } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { ffc04f74: 81 21 00 14 lwz r9,20(r1) <== NOT EXECUTED ffc04f78: 80 09 00 28 lwz r0,40(r9) <== NOT EXECUTED ffc04f7c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc04f80: 41 9e 00 10 beq- cr7,ffc04f90 <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); ffc04f84: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc04f88: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc04f8c: 4e 80 04 21 bctrl <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); ffc04f90: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc04f94: 4b ff f6 61 bl ffc045f4 <== NOT EXECUTED if ( loc_to_free ) ffc04f98: 2f 9b 00 00 cmpwi cr7,r27,0 <== NOT EXECUTED ffc04f9c: 40 be ff 50 bne- cr7,ffc04eec <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); ffc04fa0: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc04fa4: 4b ff ff 58 b ffc04efc <== NOT EXECUTED ffc04fa8: 80 09 00 1c lwz r0,28(r9) ffc04fac: 2f 80 00 00 cmpwi cr7,r0,0 ffc04fb0: 41 9e ff 48 beq+ cr7,ffc04ef8 <== NEVER TAKEN ffc04fb4: 7f 63 db 78 mr r3,r27 ffc04fb8: 7c 09 03 a6 mtctr r0 ffc04fbc: 4e 80 04 21 bctrl ffc04fc0: 38 60 ff ff li r3,-1 ffc04fc4: 4b ff fe dc b ffc04ea0 * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; ffc04fc8: 48 00 e2 ad bl ffc13274 <__errno> ffc04fcc: 38 00 00 16 li r0,22 ffc04fd0: 90 03 00 00 stw r0,0(r3) ffc04fd4: 38 60 ff ff li r3,-1 return -1; ffc04fd8: 4b ff fe c8 b ffc04ea0 cleanup_and_bail: free( temp_mt_entry ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); ffc04fdc: 81 61 00 08 lwz r11,8(r1) <== NOT EXECUTED ffc04fe0: 4b ff fe 48 b ffc04e28 <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; ffc04fe4: 48 00 e2 91 bl ffc13274 <__errno> ffc04fe8: 38 00 00 14 li r0,20 ffc04fec: 90 03 00 00 stw r0,0(r3) goto cleanup_and_bail; ffc04ff0: 4b ff fe f0 b ffc04ee0 return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; ffc04ff4: 48 00 e2 81 bl ffc13274 <__errno> <== NOT EXECUTED ffc04ff8: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc04ffc: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc05000: 3b 60 00 00 li r27,0 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); ffc05004: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc05008: 4b ff f5 ed bl ffc045f4 <== NOT EXECUTED ffc0500c: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc05010: 4b ff fe 90 b ffc04ea0 <== NOT EXECUTED if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); if ( !temp_mt_entry ) { errno = ENOMEM; ffc05014: 48 00 e2 61 bl ffc13274 <__errno> <== NOT EXECUTED ffc05018: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc0501c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc05020: 38 60 ff ff li r3,-1 <== NOT EXECUTED return -1; ffc05024: 4b ff fe 7c b ffc04ea0 <== NOT EXECUTED =============================================================================== ffc0e320 : rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0e320: 3d 20 00 00 lis r9,0 int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { ffc0e324: 94 21 ff b0 stwu r1,-80(r1) ffc0e328: 7c 08 02 a6 mflr r0 ffc0e32c: 81 69 29 f8 lwz r11,10744(r9) ffc0e330: 7d 80 00 26 mfcr r12 ffc0e334: 93 61 00 3c stw r27,60(r1) ffc0e338: 7c 9b 23 78 mr r27,r4 ffc0e33c: 39 6b 00 01 addi r11,r11,1 ffc0e340: 93 a1 00 44 stw r29,68(r1) ffc0e344: 7c 7d 1b 78 mr r29,r3 ffc0e348: 90 01 00 54 stw r0,84(r1) ffc0e34c: 93 41 00 38 stw r26,56(r1) ffc0e350: 93 81 00 40 stw r28,64(r1) ffc0e354: 93 c1 00 48 stw r30,72(r1) ffc0e358: 93 e1 00 4c stw r31,76(r1) ffc0e35c: 91 81 00 34 stw r12,52(r1) ffc0e360: 90 a1 00 28 stw r5,40(r1) ffc0e364: 91 69 29 f8 stw r11,10744(r9) ffc0e368: 90 c1 00 2c stw r6,44(r1) POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { ffc0e36c: 54 80 bf fe rlwinm r0,r4,23,31,31 ffc0e370: 2e 00 00 00 cmpwi cr4,r0,0 ffc0e374: 40 92 01 10 bne- cr4,ffc0e484 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) ffc0e378: 3f c0 00 00 lis r30,0 ffc0e37c: 3b de 36 44 addi r30,r30,13892 ffc0e380: 7f c3 f3 78 mr r3,r30 ffc0e384: 48 00 3c ed bl ffc12070 <_Objects_Allocate> ffc0e388: 3b 40 00 00 li r26,0 attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { ffc0e38c: 7c 7f 1b 79 mr. r31,r3 ffc0e390: 41 82 01 28 beq- ffc0e4b8 <== NEVER TAKEN _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; ffc0e394: 93 7f 00 14 stw r27,20(r31) status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); ffc0e398: 7f a3 eb 78 mr r3,r29 ffc0e39c: 38 81 00 08 addi r4,r1,8 ffc0e3a0: 48 00 89 f9 bl ffc16d98 <_POSIX_Message_queue_Name_to_id> * If the name to id translation worked, then the message queue exists * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ if ( status ) { ffc0e3a4: 7c 7c 1b 79 mr. r28,r3 ffc0e3a8: 40 82 00 88 bne- ffc0e430 } else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { ffc0e3ac: 73 7b 0a 00 andi. r27,r27,2560 ffc0e3b0: 2f 9b 0a 00 cmpwi cr7,r27,2560 ffc0e3b4: 41 9e 01 48 beq- cr7,ffc0e4fc RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) ffc0e3b8: 80 81 00 08 lwz r4,8(r1) ffc0e3bc: 3c 60 00 00 lis r3,0 ffc0e3c0: 38 a1 00 10 addi r5,r1,16 ffc0e3c4: 38 63 34 b8 addi r3,r3,13496 ffc0e3c8: 48 00 42 a9 bl ffc12670 <_Objects_Get> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0e3cc: 81 3e 00 1c lwz r9,28(r30) /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); the_mq->open_count += 1; ffc0e3d0: 81 63 00 18 lwz r11,24(r3) /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); ffc0e3d4: 90 61 00 0c stw r3,12(r1) the_mq->open_count += 1; ffc0e3d8: 38 0b 00 01 addi r0,r11,1 ffc0e3dc: 90 03 00 18 stw r0,24(r3) ffc0e3e0: a0 1f 00 0a lhz r0,10(r31) the_mq_fd->Queue = the_mq; ffc0e3e4: 90 7f 00 10 stw r3,16(r31) ffc0e3e8: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0e3ec: 7f e9 01 2e stwx r31,r9,r0 the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; ffc0e3f0: 93 9f 00 0c stw r28,12(r31) _Objects_Open_string( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); ffc0e3f4: 48 00 4e c9 bl ffc132bc <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); ffc0e3f8: 48 00 4e c5 bl ffc132bc <_Thread_Enable_dispatch> return (mqd_t)the_mq_fd->Object.id; ffc0e3fc: 80 7f 00 08 lwz r3,8(r31) ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc0e400: 80 01 00 54 lwz r0,84(r1) ffc0e404: 81 81 00 34 lwz r12,52(r1) ffc0e408: 7c 08 03 a6 mtlr r0 ffc0e40c: 83 41 00 38 lwz r26,56(r1) ffc0e410: 83 61 00 3c lwz r27,60(r1) ffc0e414: 7d 80 81 20 mtcrf 8,r12 ffc0e418: 83 81 00 40 lwz r28,64(r1) ffc0e41c: 83 a1 00 44 lwz r29,68(r1) ffc0e420: 83 c1 00 48 lwz r30,72(r1) ffc0e424: 83 e1 00 4c lwz r31,76(r1) ffc0e428: 38 21 00 50 addi r1,r1,80 ffc0e42c: 4e 80 00 20 blr if ( status ) { /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { ffc0e430: 2f 9c 00 02 cmpwi cr7,r28,2 ffc0e434: 41 9e 01 18 beq- cr7,ffc0e54c RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); ffc0e438: 7f c3 f3 78 mr r3,r30 ffc0e43c: 7f e4 fb 78 mr r4,r31 ffc0e440: 48 00 40 51 bl ffc12490 <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); ffc0e444: 48 00 4e 79 bl ffc132bc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); ffc0e448: 48 00 d2 09 bl ffc1b650 <__errno> ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc0e44c: 80 01 00 54 lwz r0,84(r1) ffc0e450: 81 81 00 34 lwz r12,52(r1) ffc0e454: 7c 08 03 a6 mtlr r0 * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); ffc0e458: 93 83 00 00 stw r28,0(r3) ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc0e45c: 7d 80 81 20 mtcrf 8,r12 * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); ffc0e460: 38 60 ff ff li r3,-1 ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc0e464: 83 41 00 38 lwz r26,56(r1) ffc0e468: 83 61 00 3c lwz r27,60(r1) ffc0e46c: 83 81 00 40 lwz r28,64(r1) ffc0e470: 83 a1 00 44 lwz r29,68(r1) ffc0e474: 83 c1 00 48 lwz r30,72(r1) ffc0e478: 83 e1 00 4c lwz r31,76(r1) ffc0e47c: 38 21 00 50 addi r1,r1,80 ffc0e480: 4e 80 00 20 blr Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); ffc0e484: 38 01 00 58 addi r0,r1,88 mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); ffc0e488: 83 41 00 2c lwz r26,44(r1) */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) ffc0e48c: 3f c0 00 00 lis r30,0 Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); ffc0e490: 90 01 00 18 stw r0,24(r1) ffc0e494: 3b de 36 44 addi r30,r30,13892 ffc0e498: 38 01 00 20 addi r0,r1,32 ffc0e49c: 90 01 00 1c stw r0,28(r1) ffc0e4a0: 7f c3 f3 78 mr r3,r30 mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); ffc0e4a4: 38 00 00 04 li r0,4 ffc0e4a8: 98 01 00 14 stb r0,20(r1) ffc0e4ac: 48 00 3b c5 bl ffc12070 <_Objects_Allocate> va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { ffc0e4b0: 7c 7f 1b 79 mr. r31,r3 ffc0e4b4: 40 82 fe e0 bne+ ffc0e394 _Thread_Enable_dispatch(); ffc0e4b8: 48 00 4e 05 bl ffc132bc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); ffc0e4bc: 48 00 d1 95 bl ffc1b650 <__errno> ffc0e4c0: 38 00 00 17 li r0,23 ffc0e4c4: 90 03 00 00 stw r0,0(r3) ffc0e4c8: 38 60 ff ff li r3,-1 ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc0e4cc: 80 01 00 54 lwz r0,84(r1) ffc0e4d0: 81 81 00 34 lwz r12,52(r1) ffc0e4d4: 7c 08 03 a6 mtlr r0 ffc0e4d8: 83 41 00 38 lwz r26,56(r1) ffc0e4dc: 83 61 00 3c lwz r27,60(r1) ffc0e4e0: 7d 80 81 20 mtcrf 8,r12 ffc0e4e4: 83 81 00 40 lwz r28,64(r1) ffc0e4e8: 83 a1 00 44 lwz r29,68(r1) ffc0e4ec: 83 c1 00 48 lwz r30,72(r1) ffc0e4f0: 83 e1 00 4c lwz r31,76(r1) ffc0e4f4: 38 21 00 50 addi r1,r1,80 ffc0e4f8: 4e 80 00 20 blr RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); ffc0e4fc: 7f c3 f3 78 mr r3,r30 ffc0e500: 7f e4 fb 78 mr r4,r31 ffc0e504: 48 00 3f 8d bl ffc12490 <_Objects_Free> /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); ffc0e508: 48 00 4d b5 bl ffc132bc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); ffc0e50c: 48 00 d1 45 bl ffc1b650 <__errno> ffc0e510: 38 00 00 11 li r0,17 ffc0e514: 90 03 00 00 stw r0,0(r3) ffc0e518: 38 60 ff ff li r3,-1 ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } ffc0e51c: 80 01 00 54 lwz r0,84(r1) ffc0e520: 81 81 00 34 lwz r12,52(r1) ffc0e524: 7c 08 03 a6 mtlr r0 ffc0e528: 83 41 00 38 lwz r26,56(r1) ffc0e52c: 83 61 00 3c lwz r27,60(r1) ffc0e530: 7d 80 81 20 mtcrf 8,r12 ffc0e534: 83 81 00 40 lwz r28,64(r1) ffc0e538: 83 a1 00 44 lwz r29,68(r1) ffc0e53c: 83 c1 00 48 lwz r30,72(r1) ffc0e540: 83 e1 00 4c lwz r31,76(r1) ffc0e544: 38 21 00 50 addi r1,r1,80 ffc0e548: 4e 80 00 20 blr if ( status ) { /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { ffc0e54c: 41 92 fe ec beq+ cr4,ffc0e438 /* * At this point, the message queue does not exist and everything has been * checked. We should go ahead and create a message queue. */ status = _POSIX_Message_queue_Create_support( ffc0e550: 7f a3 eb 78 mr r3,r29 ffc0e554: 7f 45 d3 78 mr r5,r26 ffc0e558: 38 80 00 01 li r4,1 ffc0e55c: 38 c1 00 0c addi r6,r1,12 ffc0e560: 48 00 86 55 bl ffc16bb4 <_POSIX_Message_queue_Create_support> ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { ffc0e564: 2f 83 ff ff cmpwi cr7,r3,-1 ffc0e568: 41 9e 00 30 beq- cr7,ffc0e598 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0e56c: a0 1f 00 0a lhz r0,10(r31) ffc0e570: 81 3e 00 1c lwz r9,28(r30) ffc0e574: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0e578: 7f e9 01 2e stwx r31,r9,r0 _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return (mqd_t) -1; } the_mq_fd->Queue = the_mq; ffc0e57c: 80 01 00 0c lwz r0,12(r1) ffc0e580: 90 1f 00 10 stw r0,16(r31) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; ffc0e584: 38 00 00 00 li r0,0 ffc0e588: 90 1f 00 0c stw r0,12(r31) &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); ffc0e58c: 48 00 4d 31 bl ffc132bc <_Thread_Enable_dispatch> return (mqd_t) the_mq_fd->Object.id; ffc0e590: 80 7f 00 08 lwz r3,8(r31) ffc0e594: 4b ff fe 6c b ffc0e400 ffc0e598: 7f c3 f3 78 mr r3,r30 ffc0e59c: 7f e4 fb 78 mr r4,r31 ffc0e5a0: 48 00 3e f1 bl ffc12490 <_Objects_Free> /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); ffc0e5a4: 48 00 4d 19 bl ffc132bc <_Thread_Enable_dispatch> ffc0e5a8: 38 60 ff ff li r3,-1 return (mqd_t) -1; ffc0e5ac: 4b ff fe 54 b ffc0e400 =============================================================================== ffc1f1cc : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { ffc1f1cc: 94 21 ff e8 stwu r1,-24(r1) ffc1f1d0: 7c 08 02 a6 mflr r0 ffc1f1d4: 93 c1 00 10 stw r30,16(r1) ffc1f1d8: 7c 7e 1b 78 mr r30,r3 ffc1f1dc: 93 e1 00 14 stw r31,20(r1) ffc1f1e0: 7c 9f 23 78 mr r31,r4 ffc1f1e4: 90 01 00 1c stw r0,28(r1) ffc1f1e8: 93 a1 00 0c stw r29,12(r1) Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) ffc1f1ec: 48 00 01 e1 bl ffc1f3cc <_Timespec_Is_valid> ffc1f1f0: 2f 83 00 00 cmpwi cr7,r3,0 ffc1f1f4: 41 9e 01 24 beq- cr7,ffc1f318 * Return EINVAL if the delay interval is negative. * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) ffc1f1f8: 80 1e 00 00 lwz r0,0(r30) ffc1f1fc: 2f 80 00 00 cmpwi cr7,r0,0 ffc1f200: 41 9c 01 18 blt- cr7,ffc1f318 <== NEVER TAKEN ffc1f204: 80 1e 00 04 lwz r0,4(r30) ffc1f208: 2f 80 00 00 cmpwi cr7,r0,0 ffc1f20c: 41 9c 01 0c blt- cr7,ffc1f318 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ticks = _Timespec_To_ticks( rqtp ); ffc1f210: 7f c3 f3 78 mr r3,r30 ffc1f214: 4b ff 17 dd bl ffc109f0 <_Timespec_To_ticks> * A nanosleep for zero time is implemented as a yield. * This behavior is also beyond the POSIX specification but is * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { ffc1f218: 7c 7e 1b 79 mr. r30,r3 ffc1f21c: 40 82 00 4c bne- ffc1f268 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc1f220: 3d 20 00 00 lis r9,0 ffc1f224: 81 69 27 d0 lwz r11,10192(r9) ffc1f228: 38 0b 00 01 addi r0,r11,1 ffc1f22c: 90 09 27 d0 stw r0,10192(r9) _Thread_Disable_dispatch(); _Thread_Yield_processor(); ffc1f230: 4b fe d6 b9 bl ffc0c8e8 <_Thread_Yield_processor> _Thread_Enable_dispatch(); ffc1f234: 4b fe c5 b1 bl ffc0b7e4 <_Thread_Enable_dispatch> if ( rmtp ) { ffc1f238: 2f 9f 00 00 cmpwi cr7,r31,0 ffc1f23c: 41 9e 00 bc beq- cr7,ffc1f2f8 rmtp->tv_sec = 0; rmtp->tv_nsec = 0; ffc1f240: 93 df 00 04 stw r30,4(r31) ffc1f244: 38 60 00 00 li r3,0 if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { rmtp->tv_sec = 0; ffc1f248: 93 df 00 00 stw r30,0(r31) rtems_set_errno_and_return_minus_one( EINTR ); #endif } return 0; } ffc1f24c: 80 01 00 1c lwz r0,28(r1) ffc1f250: 83 a1 00 0c lwz r29,12(r1) ffc1f254: 7c 08 03 a6 mtlr r0 ffc1f258: 83 c1 00 10 lwz r30,16(r1) ffc1f25c: 83 e1 00 14 lwz r31,20(r1) ffc1f260: 38 21 00 18 addi r1,r1,24 ffc1f264: 4e 80 00 20 blr ffc1f268: 3d 20 00 00 lis r9,0 ffc1f26c: 81 69 27 d0 lwz r11,10192(r9) ffc1f270: 38 0b 00 01 addi r0,r11,1 ffc1f274: 90 09 27 d0 stw r0,10192(r9) /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( ffc1f278: 3f a0 00 00 lis r29,0 ffc1f27c: 80 7d 28 10 lwz r3,10256(r29) ffc1f280: 3c 80 10 00 lis r4,4096 ffc1f284: 60 84 00 08 ori r4,r4,8 ffc1f288: 4b fe d0 e5 bl ffc0c36c <_Thread_Set_state> _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( &_Thread_Executing->Timer, ffc1f28c: 81 3d 28 10 lwz r9,10256(r29) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc1f290: 3d 40 ff c1 lis r10,-63 _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( ffc1f294: 81 69 00 08 lwz r11,8(r9) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc1f298: 38 00 00 00 li r0,0 the_watchdog->routine = routine; ffc1f29c: 39 4a b5 90 addi r10,r10,-19056 the_watchdog->id = id; the_watchdog->user_data = user_data; ffc1f2a0: 90 09 00 6c stw r0,108(r9) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc1f2a4: 3c 60 00 00 lis r3,0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc1f2a8: 91 49 00 64 stw r10,100(r9) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc1f2ac: 38 63 2d c8 addi r3,r3,11720 ffc1f2b0: 38 89 00 48 addi r4,r9,72 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc1f2b4: 91 69 00 68 stw r11,104(r9) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc1f2b8: 90 09 00 50 stw r0,80(r9) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc1f2bc: 93 c9 00 54 stw r30,84(r9) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc1f2c0: 4b fe dd 3d bl ffc0cffc <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); ffc1f2c4: 4b fe c5 21 bl ffc0b7e4 <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { ffc1f2c8: 2f 9f 00 00 cmpwi cr7,r31,0 ffc1f2cc: 41 9e 00 2c beq- cr7,ffc1f2f8 ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; ffc1f2d0: 81 3d 28 10 lwz r9,10256(r29) _Timespec_From_ticks( ticks, rmtp ); ffc1f2d4: 7f e4 fb 78 mr r4,r31 _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= ffc1f2d8: 80 09 00 60 lwz r0,96(r9) ffc1f2dc: 81 29 00 5c lwz r9,92(r9) ffc1f2e0: 7c 00 48 50 subf r0,r0,r9 ffc1f2e4: 7f c0 f2 14 add r30,r0,r30 _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); ffc1f2e8: 7f c3 f3 78 mr r3,r30 ffc1f2ec: 48 00 00 95 bl ffc1f380 <_Timespec_From_ticks> */ #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) ffc1f2f0: 2f 9e 00 00 cmpwi cr7,r30,0 ffc1f2f4: 40 9e 00 38 bne- cr7,ffc1f32c rtems_set_errno_and_return_minus_one( EINTR ); #endif } return 0; } ffc1f2f8: 80 01 00 1c lwz r0,28(r1) #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) rtems_set_errno_and_return_minus_one( EINTR ); ffc1f2fc: 38 60 00 00 li r3,0 #endif } return 0; } ffc1f300: 83 a1 00 0c lwz r29,12(r1) ffc1f304: 7c 08 03 a6 mtlr r0 ffc1f308: 83 c1 00 10 lwz r30,16(r1) ffc1f30c: 83 e1 00 14 lwz r31,20(r1) ffc1f310: 38 21 00 18 addi r1,r1,24 ffc1f314: 4e 80 00 20 blr * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc1f318: 4b ff 46 55 bl ffc1396c <__errno> ffc1f31c: 38 00 00 16 li r0,22 ffc1f320: 90 03 00 00 stw r0,0(r3) ffc1f324: 38 60 ff ff li r3,-1 ffc1f328: 4b ff ff 24 b ffc1f24c #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) rtems_set_errno_and_return_minus_one( EINTR ); ffc1f32c: 4b ff 46 41 bl ffc1396c <__errno> ffc1f330: 38 00 00 04 li r0,4 ffc1f334: 90 03 00 00 stw r0,0(r3) ffc1f338: 38 60 ff ff li r3,-1 ffc1f33c: 4b ff ff 10 b ffc1f24c =============================================================================== ffc0502c : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { ffc0502c: 7d 80 00 26 mfcr r12 /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ffc05030: 7e 03 20 00 cmpw cr4,r3,r4 void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { ffc05034: 94 21 ff e8 stwu r1,-24(r1) ffc05038: 7c 08 02 a6 mflr r0 ffc0503c: 93 c1 00 10 stw r30,16(r1) ffc05040: 7c 9e 23 78 mr r30,r4 ffc05044: 90 01 00 1c stw r0,28(r1) ffc05048: 93 e1 00 14 stw r31,20(r1) ffc0504c: 91 81 00 0c stw r12,12(r1) /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ffc05050: 41 92 00 8c beq- cr4,ffc050dc ptr = _REENT; } else { ptr = deleted_task->libc_reent; ffc05054: 83 e4 01 40 lwz r31,320(r4) } if (ptr && ptr != _global_impure_ptr) { ffc05058: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0505c: 41 9e 00 2c beq- cr7,ffc05088 <== NEVER TAKEN ffc05060: 3d 20 00 00 lis r9,0 ffc05064: 80 09 26 e8 lwz r0,9960(r9) ffc05068: 7f 9f 00 00 cmpw cr7,r31,r0 ffc0506c: 41 9e 00 1c beq- cr7,ffc05088 _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); ffc05070: 3c 80 ff c0 lis r4,-64 ffc05074: 38 84 50 e8 addi r4,r4,20712 ffc05078: 7f e3 fb 78 mr r3,r31 ffc0507c: 48 00 ec 8d bl ffc13d08 <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); ffc05080: 7f e3 fb 78 mr r3,r31 ffc05084: 48 00 7c 01 bl ffc0cc84 <_Workspace_Free> #endif } deleted_task->libc_reent = NULL; ffc05088: 38 00 00 00 li r0,0 ffc0508c: 90 1e 01 40 stw r0,320(r30) /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { ffc05090: 41 92 00 24 beq- cr4,ffc050b4 _REENT = 0; } } ffc05094: 80 01 00 1c lwz r0,28(r1) ffc05098: 81 81 00 0c lwz r12,12(r1) ffc0509c: 7c 08 03 a6 mtlr r0 ffc050a0: 83 c1 00 10 lwz r30,16(r1) ffc050a4: 83 e1 00 14 lwz r31,20(r1) ffc050a8: 7d 80 81 20 mtcrf 8,r12 ffc050ac: 38 21 00 18 addi r1,r1,24 ffc050b0: 4e 80 00 20 blr /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { _REENT = 0; ffc050b4: 3d 20 00 00 lis r9,0 } } ffc050b8: 81 81 00 0c lwz r12,12(r1) /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { _REENT = 0; ffc050bc: 90 09 26 e4 stw r0,9956(r9) } } ffc050c0: 7d 80 81 20 mtcrf 8,r12 ffc050c4: 80 01 00 1c lwz r0,28(r1) ffc050c8: 83 c1 00 10 lwz r30,16(r1) ffc050cc: 7c 08 03 a6 mtlr r0 ffc050d0: 83 e1 00 14 lwz r31,20(r1) ffc050d4: 38 21 00 18 addi r1,r1,24 ffc050d8: 4e 80 00 20 blr /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ptr = _REENT; ffc050dc: 3d 20 00 00 lis r9,0 ffc050e0: 83 e9 26 e4 lwz r31,9956(r9) ffc050e4: 4b ff ff 74 b ffc05058 =============================================================================== ffc050e8 : */ int newlib_free_buffers( FILE *fp ) { ffc050e8: 94 21 ff f0 stwu r1,-16(r1) ffc050ec: 7c 08 02 a6 mflr r0 ffc050f0: 93 e1 00 0c stw r31,12(r1) ffc050f4: 7c 7f 1b 78 mr r31,r3 ffc050f8: 90 01 00 14 stw r0,20(r1) switch ( fileno(fp) ) { ffc050fc: 48 00 e6 4d bl ffc13748 ffc05100: 2b 83 00 02 cmplwi cr7,r3,2 ffc05104: 40 9d 00 24 ble- cr7,ffc05128 <== ALWAYS TAKEN fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); ffc05108: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0510c: 48 00 e3 09 bl ffc13414 <== NOT EXECUTED } return 0; } ffc05110: 80 01 00 14 lwz r0,20(r1) ffc05114: 38 60 00 00 li r3,0 ffc05118: 83 e1 00 0c lwz r31,12(r1) ffc0511c: 38 21 00 10 addi r1,r1,16 ffc05120: 7c 08 03 a6 mtlr r0 ffc05124: 4e 80 00 20 blr { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { ffc05128: a0 1f 00 0c lhz r0,12(r31) ffc0512c: 70 09 00 80 andi. r9,r0,128 ffc05130: 41 82 ff e0 beq+ ffc05110 <== ALWAYS TAKEN free( fp->_bf._base ); ffc05134: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc05138: 4b ff f4 bd bl ffc045f4 <== NOT EXECUTED fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; ffc0513c: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc05140: 90 1f 00 10 stw r0,16(r31) <== NOT EXECUTED break; default: fclose(fp); } return 0; } ffc05144: 38 60 00 00 li r3,0 <== NOT EXECUTED case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; ffc05148: 90 1f 00 00 stw r0,0(r31) <== NOT EXECUTED break; default: fclose(fp); } return 0; } ffc0514c: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; ffc05150: a1 3f 00 0c lhz r9,12(r31) <== NOT EXECUTED break; default: fclose(fp); } return 0; } ffc05154: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; ffc05158: 55 29 06 6e rlwinm r9,r9,0,25,23 <== NOT EXECUTED ffc0515c: b1 3f 00 0c sth r9,12(r31) <== NOT EXECUTED break; default: fclose(fp); } return 0; } ffc05160: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc05164: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc05168: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc04ee8 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { ffc04ee8: 94 21 ff f0 stwu r1,-16(r1) ffc04eec: 7c 08 02 a6 mflr r0 rtems_device_driver status; if ( !initialized ) { ffc04ef0: 3d 20 00 00 lis r9,0 rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { ffc04ef4: 90 01 00 14 stw r0,20(r1) rtems_device_driver status; if ( !initialized ) { ffc04ef8: 88 09 29 20 lbz r0,10528(r9) rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { ffc04efc: 93 e1 00 0c stw r31,12(r1) ffc04f00: 7c 7f 1b 78 mr r31,r3 rtems_device_driver status; if ( !initialized ) { ffc04f04: 2f 80 00 00 cmpwi cr7,r0,0 ffc04f08: 41 9e 00 1c beq- cr7,ffc04f24 NULL_major = major; } return RTEMS_SUCCESSFUL; } ffc04f0c: 80 01 00 14 lwz r0,20(r1) ffc04f10: 38 60 00 00 li r3,0 ffc04f14: 83 e1 00 0c lwz r31,12(r1) ffc04f18: 38 21 00 10 addi r1,r1,16 ffc04f1c: 7c 08 03 a6 mtlr r0 ffc04f20: 4e 80 00 20 blr rtems_device_driver status; if ( !initialized ) { initialized = 1; status = rtems_io_register_name( ffc04f24: 3c 60 ff c2 lis r3,-62 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; ffc04f28: 38 00 00 01 li r0,1 status = rtems_io_register_name( ffc04f2c: 38 63 3e 38 addi r3,r3,15928 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; ffc04f30: 98 09 29 20 stb r0,10528(r9) status = rtems_io_register_name( ffc04f34: 7f e4 fb 78 mr r4,r31 ffc04f38: 38 a0 00 00 li r5,0 ffc04f3c: 48 00 01 c1 bl ffc050fc "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) ffc04f40: 2f 83 00 00 cmpwi cr7,r3,0 ffc04f44: 40 9e 00 24 bne- cr7,ffc04f68 <== NEVER TAKEN NULL_major = major; } return RTEMS_SUCCESSFUL; } ffc04f48: 80 01 00 14 lwz r0,20(r1) ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); NULL_major = major; ffc04f4c: 3d 20 00 00 lis r9,0 ffc04f50: 93 e9 27 cc stw r31,10188(r9) } return RTEMS_SUCCESSFUL; } ffc04f54: 38 60 00 00 li r3,0 ffc04f58: 7c 08 03 a6 mtlr r0 ffc04f5c: 83 e1 00 0c lwz r31,12(r1) ffc04f60: 38 21 00 10 addi r1,r1,16 ffc04f64: 4e 80 00 20 blr major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); ffc04f68: 48 00 55 3d bl ffc0a4a4 <== NOT EXECUTED =============================================================================== ffc04ec8 : void *pargp ) { rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) ffc04ec8: 2c 05 00 00 cmpwi r5,0 ffc04ecc: 41 82 00 0c beq- ffc04ed8 <== ALWAYS TAKEN rw_args->bytes_moved = rw_args->count; ffc04ed0: 80 05 00 14 lwz r0,20(r5) <== NOT EXECUTED ffc04ed4: 90 05 00 1c stw r0,28(r5) <== NOT EXECUTED return NULL_SUCCESSFUL; } ffc04ed8: 38 60 00 00 li r3,0 ffc04edc: 4e 80 00 20 blr =============================================================================== ffc053ec : int open( const char *pathname, int flags, ... ) { ffc053ec: 94 21 ff b0 stwu r1,-80(r1) ffc053f0: 7c 08 02 a6 mflr r0 ffc053f4: 7d 80 00 26 mfcr r12 ffc053f8: 90 01 00 54 stw r0,84(r1) /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; ffc053fc: 38 04 00 01 addi r0,r4,1 if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) ffc05400: 70 09 00 02 andi. r9,r0,2 int open( const char *pathname, int flags, ... ) { ffc05404: 93 41 00 38 stw r26,56(r1) * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) ffc05408: 54 1a 17 7a rlwinm r26,r0,2,29,29 int open( const char *pathname, int flags, ... ) { ffc0540c: 93 a1 00 44 stw r29,68(r1) ffc05410: 7c 7d 1b 78 mr r29,r3 ffc05414: 93 c1 00 48 stw r30,72(r1) ffc05418: 7c 9e 23 78 mr r30,r4 ffc0541c: 93 21 00 34 stw r25,52(r1) ffc05420: 93 61 00 3c stw r27,60(r1) ffc05424: 93 81 00 40 stw r28,64(r1) ffc05428: 93 e1 00 4c stw r31,76(r1) ffc0542c: 91 81 00 30 stw r12,48(r1) ffc05430: 90 a1 00 28 stw r5,40(r1) eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) ffc05434: 41 82 00 08 beq- ffc0543c eval_flags |= RTEMS_LIBIO_PERMS_WRITE; ffc05438: 63 5a 00 02 ori r26,r26,2 va_start(ap, flags); ffc0543c: 38 01 00 58 addi r0,r1,88 ffc05440: 39 21 00 20 addi r9,r1,32 ffc05444: 90 01 00 0c stw r0,12(r1) mode = va_arg( ap, int ); ffc05448: 38 00 00 03 li r0,3 ffc0544c: 98 01 00 08 stb r0,8(r1) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); ffc05450: 91 21 00 10 stw r9,16(r1) mode = va_arg( ap, int ); ffc05454: 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(); ffc05458: 48 00 91 f1 bl ffc0e648 if ( iop == 0 ) { ffc0545c: 2e 03 00 00 cmpwi cr4,r3,0 ffc05460: 7c 7f 1b 78 mr r31,r3 ffc05464: 41 92 01 20 beq- cr4,ffc05584 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); ffc05468: 7f a3 eb 78 mr r3,r29 ffc0546c: 48 00 f1 05 bl ffc14570 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( ffc05470: 3b 81 00 14 addi r28,r1,20 pathname, strlen( pathname ), eval_flags, &loc, true ); ffc05474: 7c 64 1b 78 mr r4,r3 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( ffc05478: 7f 45 d3 78 mr r5,r26 ffc0547c: 7f a3 eb 78 mr r3,r29 ffc05480: 7f 86 e3 78 mr r6,r28 ffc05484: 38 e0 00 01 li r7,1 ffc05488: 4b ff f0 65 bl ffc044ec pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { ffc0548c: 2f 83 ff ff cmpwi cr7,r3,-1 ffc05490: 41 9e 01 6c beq- cr7,ffc055fc if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { ffc05494: 73 c0 0a 00 andi. r0,r30,2560 ffc05498: 7f 99 e3 78 mr r25,r28 ffc0549c: 3b 40 00 11 li r26,17 ffc054a0: 2f 80 0a 00 cmpwi cr7,r0,2560 ffc054a4: 41 9e 00 e8 beq- cr7,ffc0558c /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; ffc054a8: 80 01 00 1c lwz r0,28(r1) iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); ffc054ac: 7f c3 f3 78 mr r3,r30 ffc054b0: 83 5f 00 18 lwz r26,24(r31) /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; ffc054b4: 90 1f 00 40 stw r0,64(r31) iop->file_info = loc.node_access; ffc054b8: 80 01 00 14 lwz r0,20(r1) ffc054bc: 90 1f 00 3c stw r0,60(r31) iop->flags |= rtems_libio_fcntl_flags( flags ); ffc054c0: 48 00 92 69 bl ffc0e728 iop->pathinfo = loc; if ( !iop->handlers || !iop->handlers->open_h ) { ffc054c4: 81 3f 00 40 lwz r9,64(r31) */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; ffc054c8: 80 01 00 20 lwz r0,32(r1) * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); ffc054cc: 7c 63 d3 78 or r3,r3,r26 iop->pathinfo = loc; ffc054d0: 81 41 00 18 lwz r10,24(r1) if ( !iop->handlers || !iop->handlers->open_h ) { ffc054d4: 2f 89 00 00 cmpwi cr7,r9,0 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; ffc054d8: 81 61 00 1c lwz r11,28(r1) ffc054dc: 81 01 00 14 lwz r8,20(r1) ffc054e0: 91 5f 00 20 stw r10,32(r31) ffc054e4: 91 1f 00 1c stw r8,28(r31) ffc054e8: 91 7f 00 24 stw r11,36(r31) ffc054ec: 90 1f 00 28 stw r0,40(r31) ffc054f0: 80 01 00 24 lwz r0,36(r1) * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); ffc054f4: 90 7f 00 18 stw r3,24(r31) iop->pathinfo = loc; ffc054f8: 90 1f 00 2c stw r0,44(r31) if ( !iop->handlers || !iop->handlers->open_h ) { ffc054fc: 41 9e 00 f4 beq- cr7,ffc055f0 <== NEVER TAKEN ffc05500: 80 09 00 00 lwz r0,0(r9) ffc05504: 2f 80 00 00 cmpwi cr7,r0,0 ffc05508: 41 9e 00 e8 beq- cr7,ffc055f0 <== NEVER TAKEN rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); ffc0550c: 7f a4 eb 78 mr r4,r29 ffc05510: 7c 09 03 a6 mtctr r0 ffc05514: 7f 66 db 78 mr r6,r27 ffc05518: 7f e3 fb 78 mr r3,r31 ffc0551c: 7f c5 f3 78 mr r5,r30 ffc05520: 4e 80 04 21 bctrl if ( rc ) { ffc05524: 2f 83 00 00 cmpwi cr7,r3,0 ffc05528: 40 9e 00 ac bne- cr7,ffc055d4 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { ffc0552c: 73 c0 04 00 andi. r0,r30,1024 ffc05530: 3f c0 00 00 lis r30,0 ffc05534: 40 82 00 ec bne- ffc05620 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; ffc05538: 80 7e 27 4c lwz r3,10060(r30) ffc0553c: 3c 00 38 e3 lis r0,14563 ffc05540: 60 00 8e 39 ori r0,r0,36409 ffc05544: 7c 63 f8 50 subf r3,r3,r31 ffc05548: 7c 63 1e 70 srawi r3,r3,3 ffc0554c: 7c 63 01 d6 mullw r3,r3,r0 } ffc05550: 80 01 00 54 lwz r0,84(r1) ffc05554: 81 81 00 30 lwz r12,48(r1) ffc05558: 7c 08 03 a6 mtlr r0 ffc0555c: 83 21 00 34 lwz r25,52(r1) ffc05560: 83 41 00 38 lwz r26,56(r1) ffc05564: 7d 80 81 20 mtcrf 8,r12 ffc05568: 83 61 00 3c lwz r27,60(r1) ffc0556c: 83 81 00 40 lwz r28,64(r1) ffc05570: 83 a1 00 44 lwz r29,68(r1) ffc05574: 83 c1 00 48 lwz r30,72(r1) ffc05578: 83 e1 00 4c lwz r31,76(r1) ffc0557c: 38 21 00 50 addi r1,r1,80 ffc05580: 4e 80 00 20 blr * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { ffc05584: 3b 20 00 00 li r25,0 ffc05588: 3b 40 00 17 li r26,23 done: va_end(ap); if ( rc ) { if ( iop ) ffc0558c: 41 92 00 0c beq- cr4,ffc05598 rtems_libio_free( iop ); ffc05590: 7f e3 fb 78 mr r3,r31 ffc05594: 48 00 90 3d bl ffc0e5d0 if ( loc_to_free ) ffc05598: 2f 99 00 00 cmpwi cr7,r25,0 ffc0559c: 41 9e 00 28 beq- cr7,ffc055c4 rtems_filesystem_freenode( loc_to_free ); ffc055a0: 81 39 00 0c lwz r9,12(r25) ffc055a4: 2f 89 00 00 cmpwi cr7,r9,0 ffc055a8: 41 9e 00 1c beq- cr7,ffc055c4 <== NEVER TAKEN ffc055ac: 80 09 00 1c lwz r0,28(r9) ffc055b0: 2f 80 00 00 cmpwi cr7,r0,0 ffc055b4: 41 9e 00 10 beq- cr7,ffc055c4 <== NEVER TAKEN ffc055b8: 7f 23 cb 78 mr r3,r25 ffc055bc: 7c 09 03 a6 mtctr r0 ffc055c0: 4e 80 04 21 bctrl rtems_set_errno_and_return_minus_one( rc ); ffc055c4: 48 00 dc b1 bl ffc13274 <__errno> ffc055c8: 93 43 00 00 stw r26,0(r3) ffc055cc: 38 60 ff ff li r3,-1 ffc055d0: 4b ff ff 80 b ffc05550 goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; ffc055d4: 48 00 dc a1 bl ffc13274 <__errno> ffc055d8: 7f 99 e3 78 mr r25,r28 ffc055dc: 83 43 00 00 lwz r26,0(r3) ffc055e0: 2e 1a 00 00 cmpwi cr4,r26,0 */ done: va_end(ap); if ( rc ) { ffc055e4: 40 92 01 24 bne- cr4,ffc05708 <== ALWAYS TAKEN ffc055e8: 3f c0 00 00 lis r30,0 <== NOT EXECUTED ffc055ec: 4b ff ff 4c b ffc05538 <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; ffc055f0: 7f 99 e3 78 mr r25,r28 <== NOT EXECUTED ffc055f4: 3b 40 00 86 li r26,134 <== NOT EXECUTED ffc055f8: 4b ff ff 94 b ffc0558c <== NOT EXECUTED status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { ffc055fc: 48 00 dc 79 bl ffc13274 <__errno> ffc05600: 80 03 00 00 lwz r0,0(r3) ffc05604: 2f 80 00 02 cmpwi cr7,r0,2 ffc05608: 41 9e 00 80 beq- cr7,ffc05688 rc = errno; ffc0560c: 48 00 dc 69 bl ffc13274 <__errno> ffc05610: 3b 20 00 00 li r25,0 ffc05614: 83 43 00 00 lwz r26,0(r3) ffc05618: 2e 1a 00 00 cmpwi cr4,r26,0 goto done; ffc0561c: 4b ff ff c8 b ffc055e4 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); ffc05620: 80 7e 27 4c lwz r3,10060(r30) ffc05624: 3c 00 38 e3 lis r0,14563 ffc05628: 60 00 8e 39 ori r0,r0,36409 ffc0562c: 7c 63 f8 50 subf r3,r3,r31 ffc05630: 7c 63 1e 70 srawi r3,r3,3 ffc05634: 7c 63 01 d6 mullw r3,r3,r0 ffc05638: 38 a0 00 00 li r5,0 ffc0563c: 38 c0 00 00 li r6,0 ffc05640: 48 00 8b d9 bl ffc0e218 if ( rc ) { ffc05644: 2e 03 00 00 cmpwi cr4,r3,0 ffc05648: 7c 7a 1b 78 mr r26,r3 ffc0564c: 41 92 fe ec beq+ cr4,ffc05538 <== ALWAYS TAKEN if(errno) rc = errno; ffc05650: 48 00 dc 25 bl ffc13274 <__errno> <== NOT EXECUTED ffc05654: 80 03 00 00 lwz r0,0(r3) <== NOT EXECUTED ffc05658: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0565c: 40 9e 00 9c bne- cr7,ffc056f8 <== NOT EXECUTED close( iop - rtems_libio_iops ); ffc05660: 80 7e 27 4c lwz r3,10060(r30) <== NOT EXECUTED ffc05664: 3c 00 38 e3 lis r0,14563 <== NOT EXECUTED ffc05668: 60 00 8e 39 ori r0,r0,36409 <== NOT EXECUTED ffc0566c: 7c 63 f8 50 subf r3,r3,r31 <== NOT EXECUTED ffc05670: 7c 63 1e 70 srawi r3,r3,3 <== NOT EXECUTED ffc05674: 7c 63 01 d6 mullw r3,r3,r0 <== NOT EXECUTED ffc05678: 3b 20 00 00 li r25,0 <== NOT EXECUTED ffc0567c: 48 00 8a d5 bl ffc0e150 <== NOT EXECUTED ffc05680: 3b e0 00 00 li r31,0 <== NOT EXECUTED ffc05684: 4b ff ff 60 b ffc055e4 <== NOT EXECUTED rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { ffc05688: 73 c0 02 00 andi. r0,r30,512 ffc0568c: 3b 20 00 00 li r25,0 ffc05690: 3b 40 00 02 li r26,2 ffc05694: 41 82 fe f8 beq+ ffc0558c rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); ffc05698: 7f a3 eb 78 mr r3,r29 ffc0569c: 63 64 80 00 ori r4,r27,32768 ffc056a0: 38 a0 00 00 li r5,0 ffc056a4: 38 c0 00 00 li r6,0 ffc056a8: 4b ff f4 3d bl ffc04ae4 if ( rc ) { ffc056ac: 2f 83 00 00 cmpwi cr7,r3,0 ffc056b0: 41 9e 00 14 beq- cr7,ffc056c4 <== ALWAYS TAKEN rc = errno; ffc056b4: 48 00 db c1 bl ffc13274 <__errno> <== NOT EXECUTED ffc056b8: 83 43 00 00 lwz r26,0(r3) <== NOT EXECUTED ffc056bc: 2e 1a 00 00 cmpwi cr4,r26,0 <== NOT EXECUTED goto done; ffc056c0: 4b ff ff 24 b ffc055e4 <== NOT EXECUTED } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); ffc056c4: 7f a3 eb 78 mr r3,r29 ffc056c8: 48 00 ee a9 bl ffc14570 ffc056cc: 38 a0 00 00 li r5,0 ffc056d0: 7c 64 1b 78 mr r4,r3 ffc056d4: 7f 86 e3 78 mr r6,r28 ffc056d8: 7f a3 eb 78 mr r3,r29 ffc056dc: 38 e0 00 01 li r7,1 ffc056e0: 4b ff ee 0d bl ffc044ec if ( status != 0 ) { /* The file did not exist */ ffc056e4: 3b 20 00 00 li r25,0 ffc056e8: 2f 83 00 00 cmpwi cr7,r3,0 ffc056ec: 3b 40 00 0d li r26,13 ffc056f0: 40 be fe 9c bne- cr7,ffc0558c <== NEVER TAKEN ffc056f4: 4b ff fd b4 b ffc054a8 */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; ffc056f8: 48 00 db 7d bl ffc13274 <__errno> <== NOT EXECUTED ffc056fc: 83 43 00 00 lwz r26,0(r3) <== NOT EXECUTED ffc05700: 2e 1a 00 00 cmpwi cr4,r26,0 <== NOT EXECUTED ffc05704: 4b ff ff 5c b ffc05660 <== NOT EXECUTED ffc05708: 2e 1f 00 00 cmpwi cr4,r31,0 ffc0570c: 4b ff fe 80 b ffc0558c =============================================================================== ffc05354 : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { ffc05354: 94 21 ff f0 stwu r1,-16(r1) ffc05358: 7c 08 02 a6 mflr r0 int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { ffc0535c: 38 80 00 00 li r4,0 /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { ffc05360: 93 e1 00 0c stw r31,12(r1) int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { ffc05364: 3f e0 ff c2 lis r31,-62 ffc05368: 3b ff ed e8 addi r31,r31,-4632 ffc0536c: 7f e3 fb 78 mr r3,r31 /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { ffc05370: 90 01 00 14 stw r0,20(r1) int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { ffc05374: 38 a0 00 00 li r5,0 ffc05378: 4c c6 31 82 crclr 4*cr1+eq ffc0537c: 48 00 00 71 bl ffc053ec ffc05380: 2f 83 ff ff cmpwi cr7,r3,-1 ffc05384: 41 9e 00 3c beq- cr7,ffc053c0 /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) ffc05388: 7f e3 fb 78 mr r3,r31 ffc0538c: 38 80 00 01 li r4,1 ffc05390: 38 a0 00 00 li r5,0 ffc05394: 4c c6 31 82 crclr 4*cr1+eq ffc05398: 48 00 00 55 bl ffc053ec ffc0539c: 2f 83 ff ff cmpwi cr7,r3,-1 ffc053a0: 41 9e 00 34 beq- cr7,ffc053d4 <== NEVER TAKEN rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) ffc053a4: 7f e3 fb 78 mr r3,r31 ffc053a8: 38 80 00 01 li r4,1 ffc053ac: 38 a0 00 00 li r5,0 ffc053b0: 4c c6 31 82 crclr 4*cr1+eq ffc053b4: 48 00 00 39 bl ffc053ec ffc053b8: 2f 83 ff ff cmpwi cr7,r3,-1 ffc053bc: 41 9e 00 24 beq- cr7,ffc053e0 <== NEVER TAKEN rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ } ffc053c0: 80 01 00 14 lwz r0,20(r1) ffc053c4: 83 e1 00 0c lwz r31,12(r1) ffc053c8: 38 21 00 10 addi r1,r1,16 ffc053cc: 7c 08 03 a6 mtlr r0 ffc053d0: 4e 80 00 20 blr /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ ffc053d4: 3c 60 55 54 lis r3,21844 <== NOT EXECUTED ffc053d8: 60 63 44 31 ori r3,r3,17457 <== NOT EXECUTED ffc053dc: 48 00 3c 5d bl ffc09038 <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ ffc053e0: 3c 60 55 54 lis r3,21844 <== NOT EXECUTED ffc053e4: 60 63 44 32 ori r3,r3,17458 <== NOT EXECUTED ffc053e8: 48 00 3c 51 bl ffc09038 <== NOT EXECUTED =============================================================================== ffc060c4 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { ffc060c4: 94 21 ff e8 stwu r1,-24(r1) ffc060c8: 7c 08 02 a6 mflr r0 ffc060cc: 90 01 00 1c stw r0,28(r1) int i; if (tty->termios.c_oflag & OPOST) { ffc060d0: 80 04 00 34 lwz r0,52(r4) /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { ffc060d4: 93 e1 00 14 stw r31,20(r1) ffc060d8: 7c 9f 23 78 mr r31,r4 int i; if (tty->termios.c_oflag & OPOST) { ffc060dc: 70 09 00 01 andi. r9,r0,1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { ffc060e0: 98 61 00 08 stb r3,8(r1) int i; if (tty->termios.c_oflag & OPOST) { ffc060e4: 41 82 00 50 beq- ffc06134 <== NEVER TAKEN switch (c) { ffc060e8: 2f 83 00 09 cmpwi cr7,r3,9 ffc060ec: 41 9e 00 fc beq- cr7,ffc061e8 ffc060f0: 2b 83 00 09 cmplwi cr7,r3,9 ffc060f4: 40 9d 00 64 ble- cr7,ffc06158 <== NEVER TAKEN ffc060f8: 2f 83 00 0a cmpwi cr7,r3,10 ffc060fc: 41 9e 00 7c beq- cr7,ffc06178 ffc06100: 2f 83 00 0d cmpwi cr7,r3,13 ffc06104: 41 9e 00 ac beq- cr7,ffc061b0 <== NEVER TAKEN if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) ffc06108: 70 09 00 02 andi. r9,r0,2 ffc0610c: 40 82 01 00 bne- ffc0620c <== NEVER TAKEN ffc06110: 3d 20 00 00 lis r9,0 ffc06114: 80 09 26 e0 lwz r0,9952(r9) c = toupper(c); if (!iscntrl(c)) ffc06118: 7c 60 1a 14 add r3,r0,r3 ffc0611c: 88 03 00 01 lbz r0,1(r3) ffc06120: 70 09 00 20 andi. r9,r0,32 ffc06124: 40 82 00 10 bne- ffc06134 <== NEVER TAKEN tty->column++; ffc06128: 81 3f 00 28 lwz r9,40(r31) ffc0612c: 38 09 00 01 addi r0,r9,1 ffc06130: 90 1f 00 28 stw r0,40(r31) break; } } rtems_termios_puts (&c, 1, tty); ffc06134: 7f e5 fb 78 mr r5,r31 ffc06138: 38 61 00 08 addi r3,r1,8 ffc0613c: 38 80 00 01 li r4,1 ffc06140: 4b ff fd f9 bl ffc05f38 } ffc06144: 80 01 00 1c lwz r0,28(r1) ffc06148: 83 e1 00 14 lwz r31,20(r1) ffc0614c: 38 21 00 18 addi r1,r1,24 ffc06150: 7c 08 03 a6 mtlr r0 ffc06154: 4e 80 00 20 blr oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { ffc06158: 2f 83 00 08 cmpwi cr7,r3,8 <== NOT EXECUTED ffc0615c: 40 9e ff ac bne+ cr7,ffc06108 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) ffc06160: 81 24 00 28 lwz r9,40(r4) <== NOT EXECUTED ffc06164: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc06168: 40 bd ff cc ble- cr7,ffc06134 <== NOT EXECUTED tty->column--; ffc0616c: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED ffc06170: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED ffc06174: 4b ff ff c0 b ffc06134 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) ffc06178: 70 09 00 20 andi. r9,r0,32 ffc0617c: 41 82 00 0c beq- ffc06188 <== ALWAYS TAKEN tty->column = 0; ffc06180: 39 20 00 00 li r9,0 <== NOT EXECUTED ffc06184: 91 24 00 28 stw r9,40(r4) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { ffc06188: 70 09 00 04 andi. r9,r0,4 ffc0618c: 41 82 ff a8 beq+ ffc06134 <== NEVER TAKEN rtems_termios_puts ("\r", 1, tty); ffc06190: 3c 60 ff c2 lis r3,-62 ffc06194: 38 63 f6 94 addi r3,r3,-2412 ffc06198: 38 80 00 01 li r4,1 ffc0619c: 7f e5 fb 78 mr r5,r31 ffc061a0: 4b ff fd 99 bl ffc05f38 tty->column = 0; ffc061a4: 38 00 00 00 li r0,0 ffc061a8: 90 1f 00 28 stw r0,40(r31) ffc061ac: 4b ff ff 88 b ffc06134 } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) ffc061b0: 70 09 00 10 andi. r9,r0,16 <== NOT EXECUTED ffc061b4: 41 82 00 10 beq- ffc061c4 <== NOT EXECUTED ffc061b8: 81 24 00 28 lwz r9,40(r4) <== NOT EXECUTED ffc061bc: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc061c0: 41 be ff 84 beq- cr7,ffc06144 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { ffc061c4: 70 09 00 08 andi. r9,r0,8 <== NOT EXECUTED ffc061c8: 41 a2 ff a8 beq- ffc06170 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) ffc061cc: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) return; if (tty->termios.c_oflag & OCRNL) { c = '\n'; ffc061d0: 38 00 00 0a li r0,10 <== NOT EXECUTED ffc061d4: 98 01 00 08 stb r0,8(r1) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) ffc061d8: 41 a2 ff 5c beq- ffc06134 <== NOT EXECUTED tty->column = 0; ffc061dc: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc061e0: 90 1f 00 28 stw r0,40(r31) <== NOT EXECUTED ffc061e4: 4b ff ff 50 b ffc06134 <== NOT EXECUTED tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { ffc061e8: 54 00 04 e8 rlwinm r0,r0,0,19,20 ffc061ec: 2f 80 18 00 cmpwi cr7,r0,6144 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); ffc061f0: 80 04 00 28 lwz r0,40(r4) ffc061f4: 54 04 07 7e clrlwi r4,r0,29 ffc061f8: 20 84 00 08 subfic r4,r4,8 if ((tty->termios.c_oflag & TABDLY) == XTABS) { ffc061fc: 41 9e 00 44 beq- cr7,ffc06240 <== ALWAYS TAKEN tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; ffc06200: 7c 84 02 14 add r4,r4,r0 <== NOT EXECUTED ffc06204: 90 9f 00 28 stw r4,40(r31) <== NOT EXECUTED break; ffc06208: 4b ff ff 2c b ffc06134 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); ffc0620c: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc06210: 80 09 26 e0 lwz r0,9952(r9) <== NOT EXECUTED ffc06214: 7c 69 1b 78 mr r9,r3 <== NOT EXECUTED ffc06218: 7c 60 1a 14 add r3,r0,r3 <== NOT EXECUTED ffc0621c: 89 63 00 01 lbz r11,1(r3) <== NOT EXECUTED ffc06220: 55 6b 07 be clrlwi r11,r11,30 <== NOT EXECUTED ffc06224: 2f 8b 00 02 cmpwi cr7,r11,2 <== NOT EXECUTED ffc06228: 41 9e 00 10 beq- cr7,ffc06238 <== NOT EXECUTED ffc0622c: 55 23 06 3e clrlwi r3,r9,24 <== NOT EXECUTED ffc06230: 98 61 00 08 stb r3,8(r1) <== NOT EXECUTED ffc06234: 4b ff fe e4 b ffc06118 <== NOT EXECUTED ffc06238: 39 29 ff e0 addi r9,r9,-32 <== NOT EXECUTED ffc0623c: 4b ff ff f0 b ffc0622c <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; ffc06240: 7c 04 02 14 add r0,r4,r0 ffc06244: 90 1f 00 28 stw r0,40(r31) rtems_termios_puts ( " ", i, tty); ffc06248: 3c 60 ff c2 lis r3,-62 ffc0624c: 38 63 f6 98 addi r3,r3,-2408 ffc06250: 7f e5 fb 78 mr r5,r31 ffc06254: 4b ff fc e5 bl ffc05f38 return; ffc06258: 4b ff fe ec b ffc06144 =============================================================================== ffc12584 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc12584: 94 21 ff b8 stwu r1,-72(r1) ffc12588: 7c 08 02 a6 mflr r0 rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) ffc1258c: 38 80 00 03 li r4,3 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc12590: 93 c1 00 40 stw r30,64(r1) rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) ffc12594: 3f c0 ff c2 lis r30,-62 ffc12598: 3b de fc 6c addi r30,r30,-916 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc1259c: 93 e1 00 44 stw r31,68(r1) rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) ffc125a0: 3b e1 00 18 addi r31,r1,24 ffc125a4: 38 a0 00 07 li r5,7 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc125a8: 93 a1 00 3c stw r29,60(r1) rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) ffc125ac: 7f e6 fb 78 mr r6,r31 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc125b0: 7c 7d 1b 78 mr r29,r3 rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) ffc125b4: 38 e0 00 01 li r7,1 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc125b8: 90 01 00 4c stw r0,76(r1) rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) ffc125bc: 7f c3 f3 78 mr r3,r30 ffc125c0: 4b ff 1f 2d bl ffc044ec ffc125c4: 2f 83 00 00 cmpwi cr7,r3,0 ffc125c8: 40 9e 01 38 bne- cr7,ffc12700 <== ALWAYS TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) return -1; } else rtems_filesystem_freenode(&loc); ffc125cc: 81 21 00 24 lwz r9,36(r1) <== NOT EXECUTED ffc125d0: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc125d4: 41 9e 00 1c beq- cr7,ffc125f0 <== NOT EXECUTED ffc125d8: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc125dc: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc125e0: 41 9e 00 10 beq- cr7,ffc125f0 <== NOT EXECUTED ffc125e4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc125e8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc125ec: 4e 80 04 21 bctrl <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc125f0: 3d 20 00 00 lis r9,0 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); ffc125f4: 3d 40 ff c2 lis r10,-62 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc125f8: a1 09 27 f8 lhz r8,10232(r9) else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); ffc125fc: 39 6a fc 74 addi r11,r10,-908 ffc12600: 81 4a fc 74 lwz r10,-908(r10) ffc12604: a0 0b 00 08 lhz r0,8(r11) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc12608: 3c 80 ff c2 lis r4,-62 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); ffc1260c: 81 6b 00 04 lwz r11,4(r11) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc12610: 7d 05 43 78 mr r5,r8 ffc12614: 38 84 fc 80 addi r4,r4,-896 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); ffc12618: 91 41 00 08 stw r10,8(r1) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc1261c: 39 08 00 01 addi r8,r8,1 ffc12620: 38 61 00 12 addi r3,r1,18 ffc12624: b1 09 27 f8 sth r8,10232(r9) /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { ffc12628: 3b e1 00 08 addi r31,r1,8 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); ffc1262c: 91 61 00 0c stw r11,12(r1) ffc12630: b0 01 00 10 sth r0,16(r1) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc12634: 4c c6 31 82 crclr 4*cr1+eq ffc12638: 48 00 1b 05 bl ffc1413c /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { ffc1263c: 7f e3 fb 78 mr r3,r31 ffc12640: 38 80 01 80 li r4,384 ffc12644: 48 00 01 99 bl ffc127dc ffc12648: 2f 83 00 00 cmpwi cr7,r3,0 ffc1264c: 40 9e 00 90 bne- cr7,ffc126dc <== NEVER TAKEN 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); ffc12650: 7f e3 fb 78 mr r3,r31 ffc12654: 38 80 40 00 li r4,16384 ffc12658: 4c c6 31 82 crclr 4*cr1+eq ffc1265c: 4b ff 2d 91 bl ffc053ec if (filsdes[0] < 0) { ffc12660: 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); ffc12664: 90 7d 00 00 stw r3,0(r29) if (filsdes[0] < 0) { ffc12668: 41 9c 00 d4 blt- cr7,ffc1273c <== ALWAYS TAKEN the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); ffc1266c: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc12670: 80 09 26 8c lwz r0,9868(r9) <== NOT EXECUTED ffc12674: 39 20 00 00 li r9,0 <== NOT EXECUTED ffc12678: 7f 83 00 40 cmplw cr7,r3,r0 <== NOT EXECUTED ffc1267c: 41 9c 00 ac blt- cr7,ffc12728 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; ffc12680: 80 09 00 18 lwz r0,24(r9) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); ffc12684: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc12688: 38 80 00 01 li r4,1 <== NOT EXECUTED unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; ffc1268c: 54 00 00 3c rlwinm r0,r0,0,0,30 <== NOT EXECUTED ffc12690: 90 09 00 18 stw r0,24(r9) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { ffc12694: 3b c0 00 00 li r30,0 <== NOT EXECUTED 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); ffc12698: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc1269c: 4b ff 2d 51 bl ffc053ec <== NOT EXECUTED if (filsdes[1] < 0) { ffc126a0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED 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); ffc126a4: 90 7d 00 04 stw r3,4(r29) <== NOT EXECUTED if (filsdes[1] < 0) { ffc126a8: 41 9c 00 a8 blt- cr7,ffc12750 <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); ffc126ac: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc126b0: 48 00 01 59 bl ffc12808 <== NOT EXECUTED } rtems_set_errno_and_return_minus_one(err); ffc126b4: 48 00 0b c1 bl ffc13274 <__errno> } ffc126b8: 80 01 00 4c lwz r0,76(r1) close(filsdes[0]); } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); ffc126bc: 93 c3 00 00 stw r30,0(r3) } ffc126c0: 38 60 ff ff li r3,-1 ffc126c4: 7c 08 03 a6 mtlr r0 ffc126c8: 83 a1 00 3c lwz r29,60(r1) ffc126cc: 83 c1 00 40 lwz r30,64(r1) ffc126d0: 83 e1 00 44 lwz r31,68(r1) ffc126d4: 38 21 00 48 addi r1,r1,72 ffc126d8: 4e 80 00 20 blr memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { if (errno != EEXIST){ ffc126dc: 48 00 0b 99 bl ffc13274 <__errno> <== NOT EXECUTED } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); } ffc126e0: 80 01 00 4c lwz r0,76(r1) <== NOT EXECUTED ffc126e4: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc126e8: 83 a1 00 3c lwz r29,60(r1) <== NOT EXECUTED ffc126ec: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc126f0: 83 c1 00 40 lwz r30,64(r1) <== NOT EXECUTED ffc126f4: 83 e1 00 44 lwz r31,68(r1) <== NOT EXECUTED ffc126f8: 38 21 00 48 addi r1,r1,72 <== NOT EXECUTED ffc126fc: 4e 80 00 20 blr <== NOT EXECUTED rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) != 0) { if (errno != ENOENT) ffc12700: 48 00 0b 75 bl ffc13274 <__errno> ffc12704: 80 03 00 00 lwz r0,0(r3) ffc12708: 2f 80 00 02 cmpwi cr7,r0,2 ffc1270c: 40 9e ff d4 bne+ cr7,ffc126e0 <== NEVER TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) ffc12710: 7f c3 f3 78 mr r3,r30 ffc12714: 38 80 03 ff li r4,1023 ffc12718: 4b ff 23 a1 bl ffc04ab8 ffc1271c: 2f 83 00 00 cmpwi cr7,r3,0 ffc12720: 41 9e fe d0 beq+ cr7,ffc125f0 <== ALWAYS TAKEN ffc12724: 4b ff ff bc b ffc126e0 <== NOT EXECUTED the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); ffc12728: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc1272c: 1c 63 00 48 mulli r3,r3,72 <== NOT EXECUTED ffc12730: 81 29 27 4c lwz r9,10060(r9) <== NOT EXECUTED ffc12734: 7d 29 1a 14 add r9,r9,r3 <== NOT EXECUTED ffc12738: 4b ff ff 48 b ffc12680 <== NOT EXECUTED } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); if (filsdes[0] < 0) { err = errno; ffc1273c: 48 00 0b 39 bl ffc13274 <__errno> ffc12740: 83 c3 00 00 lwz r30,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); ffc12744: 7f e3 fb 78 mr r3,r31 ffc12748: 48 00 00 c1 bl ffc12808 ffc1274c: 4b ff ff 68 b ffc126b4 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { err = errno; ffc12750: 48 00 0b 25 bl ffc13274 <__errno> <== NOT EXECUTED ffc12754: 83 c3 00 00 lwz r30,0(r3) <== NOT EXECUTED close(filsdes[0]); ffc12758: 80 7d 00 00 lwz r3,0(r29) <== NOT EXECUTED ffc1275c: 4b ff b9 f5 bl ffc0e150 <== NOT EXECUTED ffc12760: 4b ff ff 4c b ffc126ac <== NOT EXECUTED =============================================================================== ffc106b4 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { ffc106b4: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc106b8: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc106bc: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED if (cmd == FIONREAD) { ffc106c0: 3c 00 40 04 lis r0,16388 <== NOT EXECUTED ffc106c4: 60 00 66 7f ori r0,r0,26239 <== NOT EXECUTED ffc106c8: 7f 84 00 00 cmpw cr7,r4,r0 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { ffc106cc: 93 c1 00 08 stw r30,8(r1) <== NOT EXECUTED ffc106d0: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED ffc106d4: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED if (cmd == FIONREAD) { ffc106d8: 38 60 ff ea li r3,-22 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { ffc106dc: 7c bf 2b 78 mr r31,r5 <== NOT EXECUTED if (cmd == FIONREAD) { ffc106e0: 41 9e 00 1c beq- cr7,ffc106fc <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } ffc106e4: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc106e8: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc106ec: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc106f0: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc106f4: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc106f8: 4e 80 00 20 blr <== NOT EXECUTED void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) ffc106fc: 2f 85 00 00 cmpwi cr7,r5,0 <== NOT EXECUTED ffc10700: 38 60 ff f2 li r3,-14 <== NOT EXECUTED ffc10704: 41 9e ff e0 beq+ cr7,ffc106e4 <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) ffc10708: 80 7e 00 28 lwz r3,40(r30) <== NOT EXECUTED ffc1070c: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc10710: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc10714: 4b ff 7f fd bl ffc08710 <== NOT EXECUTED ffc10718: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc1071c: 38 60 ff fc li r3,-4 <== NOT EXECUTED ffc10720: 40 9e ff c4 bne+ cr7,ffc106e4 <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; ffc10724: 80 1e 00 0c lwz r0,12(r30) <== NOT EXECUTED PIPE_UNLOCK(pipe); ffc10728: 80 7e 00 28 lwz r3,40(r30) <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; ffc1072c: 90 1f 00 00 stw r0,0(r31) <== NOT EXECUTED PIPE_UNLOCK(pipe); ffc10730: 4b ff 81 41 bl ffc08870 <== NOT EXECUTED ffc10734: 38 60 00 00 li r3,0 <== NOT EXECUTED return 0; ffc10738: 4b ff ff ac b ffc106e4 <== NOT EXECUTED =============================================================================== ffc1062c : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } ffc1062c: 38 60 ff e3 li r3,-29 <== NOT EXECUTED ffc10630: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc1073c : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc1073c: 94 21 ff c0 stwu r1,-64(r1) <== NOT EXECUTED ffc10740: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc10744: 90 01 00 44 stw r0,68(r1) <== NOT EXECUTED ffc10748: 93 e1 00 3c stw r31,60(r1) <== NOT EXECUTED ffc1074c: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc10750: 80 63 00 28 lwz r3,40(r3) <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc10754: 93 a1 00 34 stw r29,52(r1) <== NOT EXECUTED ffc10758: 7c 9d 23 78 mr r29,r4 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc1075c: 38 80 00 00 li r4,0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc10760: 93 c1 00 38 stw r30,56(r1) <== NOT EXECUTED ffc10764: 7c be 2b 78 mr r30,r5 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc10768: 38 a0 00 00 li r5,0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc1076c: 93 41 00 28 stw r26,40(r1) <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc10770: 3b 40 ff fc li r26,-4 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc10774: 93 61 00 2c stw r27,44(r1) <== NOT EXECUTED ffc10778: 7c db 33 78 mr r27,r6 <== NOT EXECUTED ffc1077c: 92 e1 00 1c stw r23,28(r1) <== NOT EXECUTED ffc10780: 93 01 00 20 stw r24,32(r1) <== NOT EXECUTED ffc10784: 93 21 00 24 stw r25,36(r1) <== NOT EXECUTED ffc10788: 93 81 00 30 stw r28,48(r1) <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc1078c: 4b ff 7f 85 bl ffc08710 <== NOT EXECUTED ffc10790: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc10794: 40 9e 00 ac bne- cr7,ffc10840 <== NOT EXECUTED return -EINTR; while (read < count) { ffc10798: 2f 9e 00 00 cmpwi cr7,r30,0 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) ffc1079c: 3b 20 00 00 li r25,0 <== NOT EXECUTED ffc107a0: 3b 40 00 00 li r26,0 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { ffc107a4: 3b 80 00 00 li r28,0 <== NOT EXECUTED ffc107a8: 41 9e 00 88 beq- cr7,ffc10830 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); ffc107ac: 3b 01 00 08 addi r24,r1,8 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { ffc107b0: 83 9f 00 0c lwz r28,12(r31) <== NOT EXECUTED ffc107b4: 2f 9c 00 00 cmpwi cr7,r28,0 <== NOT EXECUTED ffc107b8: 40 9e 00 fc bne- cr7,ffc108b4 <== NOT EXECUTED /* Not an error */ if (pipe->Writers == 0) ffc107bc: 80 1f 00 14 lwz r0,20(r31) <== NOT EXECUTED ffc107c0: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc107c4: 41 9e 01 78 beq- cr7,ffc1093c <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { ffc107c8: 80 1b 00 18 lwz r0,24(r27) <== NOT EXECUTED ffc107cc: 70 09 00 01 andi. r9,r0,1 <== NOT EXECUTED ffc107d0: 40 82 01 74 bne- ffc10944 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; ffc107d4: 81 3f 00 18 lwz r9,24(r31) <== NOT EXECUTED PIPE_UNLOCK(pipe); ffc107d8: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; ffc107dc: 38 09 00 01 addi r0,r9,1 <== NOT EXECUTED ffc107e0: 90 1f 00 18 stw r0,24(r31) <== NOT EXECUTED PIPE_UNLOCK(pipe); ffc107e4: 4b ff 80 8d bl ffc08870 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) ffc107e8: 80 7f 00 2c lwz r3,44(r31) <== NOT EXECUTED ffc107ec: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc107f0: 48 00 16 01 bl ffc11df0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ffc107f4: 38 80 00 00 li r4,0 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ffc107f8: 33 83 ff ff addic r28,r3,-1 <== NOT EXECUTED ffc107fc: 7f 9c e1 10 subfe r28,r28,r28 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ffc10800: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED ffc10804: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc10808: 4b ff 7f 09 bl ffc08710 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ffc1080c: 57 9c 07 7a rlwinm r28,r28,0,29,29 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ffc10810: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ffc10814: 3b 9c ff fc addi r28,r28,-4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ffc10818: 40 9e 01 34 bne- cr7,ffc1094c <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) ffc1081c: 2f 9c 00 00 cmpwi cr7,r28,0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; ffc10820: 81 3f 00 18 lwz r9,24(r31) <== NOT EXECUTED ffc10824: 38 09 ff ff addi r0,r9,-1 <== NOT EXECUTED ffc10828: 90 1f 00 18 stw r0,24(r31) <== NOT EXECUTED if (ret != 0) ffc1082c: 41 9e ff 84 beq+ cr7,ffc107b0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); ffc10830: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED ffc10834: 4b ff 80 3d bl ffc08870 <== NOT EXECUTED out_nolock: if (read > 0) ffc10838: 2f 9a 00 00 cmpwi cr7,r26,0 <== NOT EXECUTED ffc1083c: 40 9d 00 3c ble- cr7,ffc10878 <== NOT EXECUTED return read; return ret; } ffc10840: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED ffc10844: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED ffc10848: 82 e1 00 1c lwz r23,28(r1) <== NOT EXECUTED ffc1084c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc10850: 83 01 00 20 lwz r24,32(r1) <== NOT EXECUTED ffc10854: 83 21 00 24 lwz r25,36(r1) <== NOT EXECUTED ffc10858: 83 41 00 28 lwz r26,40(r1) <== NOT EXECUTED ffc1085c: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc10860: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc10864: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc10868: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc1086c: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc10870: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc10874: 4e 80 00 20 blr <== NOT EXECUTED ffc10878: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) ffc1087c: 7f 9a e3 78 mr r26,r28 <== NOT EXECUTED return read; return ret; } ffc10880: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED ffc10884: 82 e1 00 1c lwz r23,28(r1) <== NOT EXECUTED ffc10888: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc1088c: 83 01 00 20 lwz r24,32(r1) <== NOT EXECUTED ffc10890: 83 21 00 24 lwz r25,36(r1) <== NOT EXECUTED ffc10894: 83 41 00 28 lwz r26,40(r1) <== NOT EXECUTED ffc10898: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc1089c: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc108a0: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc108a4: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc108a8: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc108ac: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc108b0: 4e 80 00 20 blr <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); ffc108b4: 7c 19 f0 50 subf r0,r25,r30 <== NOT EXECUTED ffc108b8: 7f 9c 00 40 cmplw cr7,r28,r0 <== NOT EXECUTED ffc108bc: 40 9d 00 08 ble- cr7,ffc108c4 <== NOT EXECUTED ffc108c0: 7c 1c 03 78 mr r28,r0 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; ffc108c4: 80 1f 00 08 lwz r0,8(r31) <== NOT EXECUTED ffc108c8: 82 ff 00 04 lwz r23,4(r31) <== NOT EXECUTED ffc108cc: 7e e0 b8 50 subf r23,r0,r23 <== NOT EXECUTED if (chunk > chunk1) { ffc108d0: 7f 9c b8 00 cmpw cr7,r28,r23 <== NOT EXECUTED ffc108d4: 41 9d 00 80 bgt- cr7,ffc10954 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); ffc108d8: 80 9f 00 00 lwz r4,0(r31) <== NOT EXECUTED ffc108dc: 7c 7d ca 14 add r3,r29,r25 <== NOT EXECUTED ffc108e0: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED ffc108e4: 7c 84 02 14 add r4,r4,r0 <== NOT EXECUTED ffc108e8: 48 00 35 75 bl ffc13e5c <== NOT EXECUTED pipe->Start += chunk; ffc108ec: 81 3f 00 08 lwz r9,8(r31) <== NOT EXECUTED pipe->Start %= pipe->Size; ffc108f0: 81 7f 00 04 lwz r11,4(r31) <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; ffc108f4: 7d 3c 4a 14 add r9,r28,r9 <== NOT EXECUTED pipe->Start %= pipe->Size; pipe->Length -= chunk; ffc108f8: 80 1f 00 0c lwz r0,12(r31) <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; ffc108fc: 7d 49 5b 96 divwu r10,r9,r11 <== NOT EXECUTED pipe->Length -= chunk; ffc10900: 7c 1c 00 50 subf r0,r28,r0 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) ffc10904: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; pipe->Length -= chunk; ffc10908: 90 1f 00 0c stw r0,12(r31) <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; ffc1090c: 7d 6a 59 d6 mullw r11,r10,r11 <== NOT EXECUTED ffc10910: 7d 2b 48 50 subf r9,r11,r9 <== NOT EXECUTED ffc10914: 91 3f 00 08 stw r9,8(r31) <== NOT EXECUTED pipe->Length -= chunk; /* For buffering optimization */ if (PIPE_EMPTY(pipe)) ffc10918: 40 9e 00 08 bne- cr7,ffc10920 <== NOT EXECUTED pipe->Start = 0; ffc1091c: 90 1f 00 08 stw r0,8(r31) <== NOT EXECUTED if (pipe->waitingWriters > 0) ffc10920: 80 1f 00 1c lwz r0,28(r31) <== NOT EXECUTED ffc10924: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc10928: 40 9e 00 58 bne- cr7,ffc10980 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; ffc1092c: 7f 5a e2 14 add r26,r26,r28 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { ffc10930: 7f 9a f0 40 cmplw cr7,r26,r30 <== NOT EXECUTED ffc10934: 7f 59 d3 78 mr r25,r26 <== NOT EXECUTED ffc10938: 41 9c fe 78 blt+ cr7,ffc107b0 <== NOT EXECUTED ffc1093c: 3b 80 00 00 li r28,0 <== NOT EXECUTED ffc10940: 4b ff fe f0 b ffc10830 <== NOT EXECUTED while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { ffc10944: 3b 80 ff f5 li r28,-11 <== NOT EXECUTED ffc10948: 4b ff fe e8 b ffc10830 <== NOT EXECUTED /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { ffc1094c: 3b 80 ff fc li r28,-4 <== NOT EXECUTED ffc10950: 4b ff fe e8 b ffc10838 <== NOT EXECUTED /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); ffc10954: 80 9f 00 00 lwz r4,0(r31) <== NOT EXECUTED ffc10958: 7e e5 bb 78 mr r5,r23 <== NOT EXECUTED ffc1095c: 7c 7d ca 14 add r3,r29,r25 <== NOT EXECUTED ffc10960: 7c 84 02 14 add r4,r4,r0 <== NOT EXECUTED ffc10964: 48 00 34 f9 bl ffc13e5c <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); ffc10968: 7c 79 ba 14 add r3,r25,r23 <== NOT EXECUTED ffc1096c: 80 9f 00 00 lwz r4,0(r31) <== NOT EXECUTED ffc10970: 7c 7d 1a 14 add r3,r29,r3 <== NOT EXECUTED ffc10974: 7c b7 e0 50 subf r5,r23,r28 <== NOT EXECUTED ffc10978: 48 00 34 e5 bl ffc13e5c <== NOT EXECUTED ffc1097c: 4b ff ff 70 b ffc108ec <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); ffc10980: 80 7f 00 30 lwz r3,48(r31) <== NOT EXECUTED ffc10984: 7f 04 c3 78 mr r4,r24 <== NOT EXECUTED ffc10988: 48 00 13 d1 bl ffc11d58 <== NOT EXECUTED ffc1098c: 4b ff ff a0 b ffc1092c <== NOT EXECUTED =============================================================================== ffc10c18 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc10c18: 94 21 ff d0 stwu r1,-48(r1) <== NOT EXECUTED ffc10c1c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, ffc10c20: 38 a0 00 00 li r5,0 <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc10c24: 90 01 00 34 stw r0,52(r1) <== NOT EXECUTED ffc10c28: 93 e1 00 2c stw r31,44(r1) <== NOT EXECUTED pipe_control_t *pipe = *pipep; ffc10c2c: 83 e3 00 00 lwz r31,0(r3) <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc10c30: 93 81 00 20 stw r28,32(r1) <== NOT EXECUTED ffc10c34: 7c 7c 1b 78 mr r28,r3 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, ffc10c38: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc10c3c: 93 c1 00 28 stw r30,40(r1) <== NOT EXECUTED ffc10c40: 7c 9e 23 78 mr r30,r4 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, ffc10c44: 38 80 00 00 li r4,0 <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc10c48: 93 61 00 1c stw r27,28(r1) <== NOT EXECUTED ffc10c4c: 93 a1 00 24 stw r29,36(r1) <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, ffc10c50: 4b ff 7a c1 bl ffc08710 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) ffc10c54: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc10c58: 40 9e 01 64 bne- cr7,ffc10dbc <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); ffc10c5c: 83 be 00 18 lwz r29,24(r30) <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) ffc10c60: 73 a0 00 02 andi. r0,r29,2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); ffc10c64: 57 bd 07 7c rlwinm r29,r29,0,29,30 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) ffc10c68: 41 82 00 10 beq- ffc10c78 <== NOT EXECUTED pipe->Readers --; ffc10c6c: 81 3f 00 10 lwz r9,16(r31) <== NOT EXECUTED ffc10c70: 38 09 ff ff addi r0,r9,-1 <== NOT EXECUTED ffc10c74: 90 1f 00 10 stw r0,16(r31) <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) ffc10c78: 73 a0 00 04 andi. r0,r29,4 <== NOT EXECUTED ffc10c7c: 40 82 00 84 bne- ffc10d00 <== NOT EXECUTED pipe->Writers --; sc = rtems_semaphore_obtain(rtems_pipe_semaphore, ffc10c80: 3f c0 00 00 lis r30,0 <== NOT EXECUTED ffc10c84: 80 7e 29 94 lwz r3,10644(r30) <== NOT EXECUTED ffc10c88: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc10c8c: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc10c90: 4b ff 7a 81 bl ffc08710 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) ffc10c94: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc10c98: 40 9e 01 24 bne- cr7,ffc10dbc <== NOT EXECUTED rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); ffc10c9c: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED ffc10ca0: 4b ff 7b d1 bl ffc08870 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { ffc10ca4: 80 1f 00 10 lwz r0,16(r31) <== NOT EXECUTED ffc10ca8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc10cac: 40 9e 00 64 bne- cr7,ffc10d10 <== NOT EXECUTED ffc10cb0: 83 7f 00 14 lwz r27,20(r31) <== NOT EXECUTED ffc10cb4: 2f 9b 00 00 cmpwi cr7,r27,0 <== NOT EXECUTED ffc10cb8: 41 9e 00 a8 beq- cr7,ffc10d60 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) ffc10cbc: 2f 9d 00 04 cmpwi cr7,r29,4 <== NOT EXECUTED ffc10cc0: 41 be 00 10 beq+ cr7,ffc10cd0 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); ffc10cc4: 80 7f 00 30 lwz r3,48(r31) <== NOT EXECUTED ffc10cc8: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED ffc10ccc: 48 00 10 8d bl ffc11d58 <== NOT EXECUTED else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) PIPE_WAKEUPREADERS(pipe); rtems_semaphore_release(rtems_pipe_semaphore); ffc10cd0: 80 7e 29 94 lwz r3,10644(r30) <== NOT EXECUTED ffc10cd4: 4b ff 7b 9d bl ffc08870 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } ffc10cd8: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED ffc10cdc: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc10ce0: 83 61 00 1c lwz r27,28(r1) <== NOT EXECUTED ffc10ce4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc10ce8: 83 81 00 20 lwz r28,32(r1) <== NOT EXECUTED ffc10cec: 83 a1 00 24 lwz r29,36(r1) <== NOT EXECUTED ffc10cf0: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc10cf4: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc10cf8: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc10cfc: 4e 80 00 20 blr <== NOT EXECUTED mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; ffc10d00: 81 3f 00 14 lwz r9,20(r31) <== NOT EXECUTED ffc10d04: 38 09 ff ff addi r0,r9,-1 <== NOT EXECUTED ffc10d08: 90 1f 00 14 stw r0,20(r31) <== NOT EXECUTED ffc10d0c: 4b ff ff 74 b ffc10c80 <== NOT EXECUTED *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) ffc10d10: 80 1f 00 14 lwz r0,20(r31) <== NOT EXECUTED ffc10d14: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc10d18: 40 be ff b8 bne- cr7,ffc10cd0 <== NOT EXECUTED ffc10d1c: 2f 9d 00 02 cmpwi cr7,r29,2 <== NOT EXECUTED ffc10d20: 41 be ff b0 beq- cr7,ffc10cd0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); ffc10d24: 80 7f 00 2c lwz r3,44(r31) <== NOT EXECUTED ffc10d28: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED ffc10d2c: 48 00 10 2d bl ffc11d58 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); ffc10d30: 80 7e 29 94 lwz r3,10644(r30) <== NOT EXECUTED ffc10d34: 4b ff 7b 3d bl ffc08870 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } ffc10d38: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED ffc10d3c: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc10d40: 83 61 00 1c lwz r27,28(r1) <== NOT EXECUTED ffc10d44: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc10d48: 83 81 00 20 lwz r28,32(r1) <== NOT EXECUTED ffc10d4c: 83 a1 00 24 lwz r29,36(r1) <== NOT EXECUTED ffc10d50: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc10d54: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc10d58: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc10d5c: 4e 80 00 20 blr <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); ffc10d60: 80 7f 00 2c lwz r3,44(r31) <== NOT EXECUTED ffc10d64: 48 00 0f 6d bl ffc11cd0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); ffc10d68: 80 7f 00 30 lwz r3,48(r31) <== NOT EXECUTED ffc10d6c: 48 00 0f 65 bl ffc11cd0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); ffc10d70: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED ffc10d74: 4b ff 78 c1 bl ffc08634 <== NOT EXECUTED free(pipe->Buffer); ffc10d78: 80 7f 00 00 lwz r3,0(r31) <== NOT EXECUTED ffc10d7c: 4b ff 38 79 bl ffc045f4 <== NOT EXECUTED free(pipe); ffc10d80: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc10d84: 4b ff 38 71 bl ffc045f4 <== NOT EXECUTED /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; ffc10d88: 93 7c 00 00 stw r27,0(r28) <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) PIPE_WAKEUPREADERS(pipe); rtems_semaphore_release(rtems_pipe_semaphore); ffc10d8c: 80 7e 29 94 lwz r3,10644(r30) <== NOT EXECUTED ffc10d90: 4b ff 7a e1 bl ffc08870 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } ffc10d94: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED ffc10d98: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc10d9c: 83 61 00 1c lwz r27,28(r1) <== NOT EXECUTED ffc10da0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc10da4: 83 81 00 20 lwz r28,32(r1) <== NOT EXECUTED ffc10da8: 83 a1 00 24 lwz r29,36(r1) <== NOT EXECUTED ffc10dac: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc10db0: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc10db4: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc10db8: 4e 80 00 20 blr <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); ffc10dbc: 4b ff 82 7d bl ffc09038 <== NOT EXECUTED =============================================================================== ffc10990 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { ffc10990: 94 21 ff c0 stwu r1,-64(r1) <== NOT EXECUTED ffc10994: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc10998: 93 c1 00 38 stw r30,56(r1) <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) ffc1099c: 7c be 2b 79 mr. r30,r5 <== NOT EXECUTED pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { ffc109a0: 93 81 00 30 stw r28,48(r1) <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) ffc109a4: 3b 80 00 00 li r28,0 <== NOT EXECUTED pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { ffc109a8: 93 a1 00 34 stw r29,52(r1) <== NOT EXECUTED ffc109ac: 7c 9d 23 78 mr r29,r4 <== NOT EXECUTED ffc109b0: 93 e1 00 3c stw r31,60(r1) <== NOT EXECUTED ffc109b4: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED ffc109b8: 90 01 00 44 stw r0,68(r1) <== NOT EXECUTED ffc109bc: 93 01 00 20 stw r24,32(r1) <== NOT EXECUTED ffc109c0: 93 21 00 24 stw r25,36(r1) <== NOT EXECUTED ffc109c4: 93 41 00 28 stw r26,40(r1) <== NOT EXECUTED ffc109c8: 93 61 00 2c stw r27,44(r1) <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) ffc109cc: 40 82 00 38 bne- ffc10a04 <== NOT EXECUTED #endif if (written > 0) return written; return ret; } ffc109d0: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED ffc109d4: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc109d8: 83 01 00 20 lwz r24,32(r1) <== NOT EXECUTED ffc109dc: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc109e0: 83 21 00 24 lwz r25,36(r1) <== NOT EXECUTED ffc109e4: 83 41 00 28 lwz r26,40(r1) <== NOT EXECUTED ffc109e8: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc109ec: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc109f0: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc109f4: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc109f8: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc109fc: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc10a00: 4e 80 00 20 blr <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) ffc10a04: 80 63 00 28 lwz r3,40(r3) <== NOT EXECUTED ffc10a08: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc10a0c: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc10a10: 90 c1 00 18 stw r6,24(r1) <== NOT EXECUTED ffc10a14: 4b ff 7c fd bl ffc08710 <== NOT EXECUTED ffc10a18: 3b 80 ff fc li r28,-4 <== NOT EXECUTED ffc10a1c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc10a20: 80 c1 00 18 lwz r6,24(r1) <== NOT EXECUTED ffc10a24: 40 be ff ac bne- cr7,ffc109d0 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { ffc10a28: 80 1f 00 10 lwz r0,16(r31) <== NOT EXECUTED ffc10a2c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc10a30: 41 9e 01 58 beq- cr7,ffc10b88 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; ffc10a34: 81 3f 00 04 lwz r9,4(r31) <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ffc10a38: 3b 40 00 01 li r26,1 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; ffc10a3c: 7f 9e 48 40 cmplw cr7,r30,r9 <== NOT EXECUTED ffc10a40: 41 9d 00 08 bgt- cr7,ffc10a48 <== NOT EXECUTED ffc10a44: 7f da f3 78 mr r26,r30 <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ffc10a48: 3b 20 00 00 li r25,0 <== NOT EXECUTED ffc10a4c: 3b 80 00 00 li r28,0 <== NOT EXECUTED else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); ffc10a50: 3b 01 00 08 addi r24,r1,8 <== NOT EXECUTED /* 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) { ffc10a54: 80 1f 00 0c lwz r0,12(r31) <== NOT EXECUTED ffc10a58: 7f 60 48 50 subf r27,r0,r9 <== NOT EXECUTED ffc10a5c: 7f 9b d0 40 cmplw cr7,r27,r26 <== NOT EXECUTED ffc10a60: 40 9c 00 94 bge- cr7,ffc10af4 <== NOT EXECUTED if (LIBIO_NODELAY(iop)) { ffc10a64: 80 06 00 18 lwz r0,24(r6) <== NOT EXECUTED ffc10a68: 70 09 00 01 andi. r9,r0,1 <== NOT EXECUTED ffc10a6c: 40 82 01 64 bne- ffc10bd0 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; ffc10a70: 81 3f 00 1c lwz r9,28(r31) <== NOT EXECUTED PIPE_UNLOCK(pipe); ffc10a74: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; ffc10a78: 38 09 00 01 addi r0,r9,1 <== NOT EXECUTED PIPE_UNLOCK(pipe); ffc10a7c: 90 c1 00 18 stw r6,24(r1) <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; ffc10a80: 90 1f 00 1c stw r0,28(r31) <== NOT EXECUTED PIPE_UNLOCK(pipe); ffc10a84: 4b ff 7d ed bl ffc08870 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) ffc10a88: 80 7f 00 30 lwz r3,48(r31) <== NOT EXECUTED ffc10a8c: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc10a90: 48 00 13 61 bl ffc11df0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ffc10a94: 38 80 00 00 li r4,0 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ffc10a98: 33 63 ff ff addic r27,r3,-1 <== NOT EXECUTED ffc10a9c: 7f 7b d9 10 subfe r27,r27,r27 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ffc10aa0: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED ffc10aa4: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc10aa8: 4b ff 7c 69 bl ffc08710 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ffc10aac: 57 7b 07 7a rlwinm r27,r27,0,29,29 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ffc10ab0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc10ab4: 80 c1 00 18 lwz r6,24(r1) <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ffc10ab8: 3b 7b ff fc addi r27,r27,-4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ffc10abc: 40 9e 01 0c bne- cr7,ffc10bc8 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; if (ret != 0) ffc10ac0: 2f 9b 00 00 cmpwi cr7,r27,0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; ffc10ac4: 81 3f 00 1c lwz r9,28(r31) <== NOT EXECUTED ffc10ac8: 38 09 ff ff addi r0,r9,-1 <== NOT EXECUTED ffc10acc: 90 1f 00 1c stw r0,28(r31) <== NOT EXECUTED if (ret != 0) ffc10ad0: 40 9e 00 c0 bne- cr7,ffc10b90 <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { ffc10ad4: 80 1f 00 10 lwz r0,16(r31) <== NOT EXECUTED ffc10ad8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc10adc: 41 9e 00 d4 beq- cr7,ffc10bb0 <== NOT EXECUTED ffc10ae0: 81 3f 00 04 lwz r9,4(r31) <== NOT EXECUTED /* 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) { ffc10ae4: 80 1f 00 0c lwz r0,12(r31) <== NOT EXECUTED ffc10ae8: 7f 60 48 50 subf r27,r0,r9 <== NOT EXECUTED ffc10aec: 7f 9b d0 40 cmplw cr7,r27,r26 <== NOT EXECUTED ffc10af0: 41 9c ff 74 blt+ cr7,ffc10a64 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); ffc10af4: 7d 79 f0 50 subf r11,r25,r30 <== NOT EXECUTED ffc10af8: 7f 9b 58 40 cmplw cr7,r27,r11 <== NOT EXECUTED ffc10afc: 40 9d 00 08 ble- cr7,ffc10b04 <== NOT EXECUTED ffc10b00: 7d 7b 5b 78 mr r27,r11 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); ffc10b04: 81 7f 00 08 lwz r11,8(r31) <== NOT EXECUTED ffc10b08: 7c 00 5a 14 add r0,r0,r11 <== NOT EXECUTED ffc10b0c: 7d 60 4b 96 divwu r11,r0,r9 <== NOT EXECUTED ffc10b10: 7d 6b 49 d6 mullw r11,r11,r9 <== NOT EXECUTED ffc10b14: 7c 0b 00 50 subf r0,r11,r0 <== NOT EXECUTED ffc10b18: 7f 40 48 50 subf r26,r0,r9 <== NOT EXECUTED if (chunk > chunk1) { ffc10b1c: 7f 9b d0 00 cmpw cr7,r27,r26 <== NOT EXECUTED ffc10b20: 40 9d 00 b8 ble- cr7,ffc10bd8 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); ffc10b24: 80 7f 00 00 lwz r3,0(r31) <== NOT EXECUTED ffc10b28: 7c 9d ca 14 add r4,r29,r25 <== NOT EXECUTED ffc10b2c: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED ffc10b30: 90 c1 00 18 stw r6,24(r1) <== NOT EXECUTED ffc10b34: 7c 63 02 14 add r3,r3,r0 <== NOT EXECUTED ffc10b38: 48 00 33 25 bl ffc13e5c <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); ffc10b3c: 7c 9a ca 14 add r4,r26,r25 <== NOT EXECUTED ffc10b40: 80 7f 00 00 lwz r3,0(r31) <== NOT EXECUTED ffc10b44: 7c 9d 22 14 add r4,r29,r4 <== NOT EXECUTED ffc10b48: 7c ba d8 50 subf r5,r26,r27 <== NOT EXECUTED ffc10b4c: 48 00 33 11 bl ffc13e5c <== NOT EXECUTED ffc10b50: 80 c1 00 18 lwz r6,24(r1) <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) ffc10b54: 81 3f 00 18 lwz r9,24(r31) <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; ffc10b58: 80 1f 00 0c lwz r0,12(r31) <== NOT EXECUTED if (pipe->waitingReaders > 0) ffc10b5c: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; ffc10b60: 7c 00 da 14 add r0,r0,r27 <== NOT EXECUTED ffc10b64: 90 1f 00 0c stw r0,12(r31) <== NOT EXECUTED if (pipe->waitingReaders > 0) ffc10b68: 40 9e 00 90 bne- cr7,ffc10bf8 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); written += chunk; ffc10b6c: 7f 9c da 14 add r28,r28,r27 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { ffc10b70: 7f 9e e0 40 cmplw cr7,r30,r28 <== NOT EXECUTED ffc10b74: 7f 99 e3 78 mr r25,r28 <== NOT EXECUTED ffc10b78: 40 9d 00 98 ble- cr7,ffc10c10 <== NOT EXECUTED ffc10b7c: 81 3f 00 04 lwz r9,4(r31) <== NOT EXECUTED ffc10b80: 3b 40 00 01 li r26,1 <== NOT EXECUTED ffc10b84: 4b ff fe d0 b ffc10a54 <== NOT EXECUTED ffc10b88: 3b 60 ff e0 li r27,-32 <== NOT EXECUTED ffc10b8c: 3b 80 00 00 li r28,0 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); ffc10b90: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED ffc10b94: 4b ff 7c dd bl ffc08870 <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) ffc10b98: 2f 9b ff e0 cmpwi cr7,r27,-32 <== NOT EXECUTED ffc10b9c: 41 9e 00 1c beq- cr7,ffc10bb8 <== NOT EXECUTED kill(getpid(), SIGPIPE); #endif if (written > 0) ffc10ba0: 2f 9c 00 00 cmpwi cr7,r28,0 <== NOT EXECUTED ffc10ba4: 41 9d fe 2c bgt+ cr7,ffc109d0 <== NOT EXECUTED ffc10ba8: 7f 7c db 78 mr r28,r27 <== NOT EXECUTED ffc10bac: 4b ff fe 24 b ffc109d0 <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ffc10bb0: 3b 60 ff e0 li r27,-32 <== NOT EXECUTED ffc10bb4: 4b ff ff dc b ffc10b90 <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); ffc10bb8: 48 00 0a f5 bl ffc116ac <== NOT EXECUTED ffc10bbc: 38 80 00 0d li r4,13 <== NOT EXECUTED ffc10bc0: 48 00 0c 95 bl ffc11854 <== NOT EXECUTED ffc10bc4: 4b ff ff dc b ffc10ba0 <== NOT EXECUTED /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { ffc10bc8: 3b 60 ff fc li r27,-4 <== NOT EXECUTED ffc10bcc: 4b ff ff d4 b ffc10ba0 <== NOT EXECUTED /* 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)) { ffc10bd0: 3b 60 ff f5 li r27,-11 <== NOT EXECUTED ffc10bd4: 4b ff ff bc b ffc10b90 <== NOT EXECUTED if (chunk > chunk1) { memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); ffc10bd8: 80 7f 00 00 lwz r3,0(r31) <== NOT EXECUTED ffc10bdc: 7c 9d ca 14 add r4,r29,r25 <== NOT EXECUTED ffc10be0: 7f 65 db 78 mr r5,r27 <== NOT EXECUTED ffc10be4: 90 c1 00 18 stw r6,24(r1) <== NOT EXECUTED ffc10be8: 7c 63 02 14 add r3,r3,r0 <== NOT EXECUTED ffc10bec: 48 00 32 71 bl ffc13e5c <== NOT EXECUTED ffc10bf0: 80 c1 00 18 lwz r6,24(r1) <== NOT EXECUTED ffc10bf4: 4b ff ff 60 b ffc10b54 <== NOT EXECUTED pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); ffc10bf8: 80 7f 00 2c lwz r3,44(r31) <== NOT EXECUTED ffc10bfc: 7f 04 c3 78 mr r4,r24 <== NOT EXECUTED ffc10c00: 90 c1 00 18 stw r6,24(r1) <== NOT EXECUTED ffc10c04: 48 00 11 55 bl ffc11d58 <== NOT EXECUTED ffc10c08: 80 c1 00 18 lwz r6,24(r1) <== NOT EXECUTED ffc10c0c: 4b ff ff 60 b ffc10b6c <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { ffc10c10: 3b 60 00 00 li r27,0 <== NOT EXECUTED ffc10c14: 4b ff ff 7c b ffc10b90 <== NOT EXECUTED =============================================================================== ffc090b0 : int posix_memalign( void **pointer, size_t alignment, size_t size ) { ffc090b0: 7c 08 02 a6 mflr r0 ffc090b4: 94 21 ff f8 stwu r1,-8(r1) ffc090b8: 90 01 00 0c stw r0,12(r1) /* * Update call statistics */ MSBUMP(memalign_calls, 1); if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) ffc090bc: 38 04 ff ff addi r0,r4,-1 ffc090c0: 7c 0b 20 39 and. r11,r0,r4 ) { /* * Update call statistics */ MSBUMP(memalign_calls, 1); ffc090c4: 3d 60 00 00 lis r11,0 ffc090c8: 39 6b 34 28 addi r11,r11,13352 ffc090cc: 81 4b 00 08 lwz r10,8(r11) ffc090d0: 38 0a 00 01 addi r0,r10,1 ffc090d4: 90 0b 00 08 stw r0,8(r11) if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) ffc090d8: 40 82 00 0c bne- ffc090e4 <== NEVER TAKEN ffc090dc: 2b 84 00 03 cmplwi cr7,r4,3 ffc090e0: 41 9d 00 18 bgt- cr7,ffc090f8 /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } ffc090e4: 80 01 00 0c lwz r0,12(r1) /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); ffc090e8: 38 60 00 16 li r3,22 } ffc090ec: 38 21 00 08 addi r1,r1,8 ffc090f0: 7c 08 03 a6 mtlr r0 ffc090f4: 4e 80 00 20 blr /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); ffc090f8: 48 00 02 81 bl ffc09378 } ffc090fc: 80 01 00 0c lwz r0,12(r1) ffc09100: 38 21 00 08 addi r1,r1,8 ffc09104: 7c 08 03 a6 mtlr r0 ffc09108: 4e 80 00 20 blr =============================================================================== ffc05724 : * printk * * Kernel printf function requiring minimal infrastrure. */ void printk(const char *fmt, ...) { ffc05724: 94 21 ff 88 stwu r1,-120(r1) ffc05728: 7c 08 02 a6 mflr r0 ffc0572c: 90 81 00 1c stw r4,28(r1) ffc05730: 90 01 00 7c stw r0,124(r1) ffc05734: 90 a1 00 20 stw r5,32(r1) ffc05738: 90 c1 00 24 stw r6,36(r1) ffc0573c: 90 e1 00 28 stw r7,40(r1) ffc05740: 91 01 00 2c stw r8,44(r1) ffc05744: 91 21 00 30 stw r9,48(r1) ffc05748: 91 41 00 34 stw r10,52(r1) ffc0574c: 40 86 00 24 bne- cr1,ffc05770 <== ALWAYS TAKEN ffc05750: d8 21 00 38 stfd f1,56(r1) <== NOT EXECUTED ffc05754: d8 41 00 40 stfd f2,64(r1) <== NOT EXECUTED ffc05758: d8 61 00 48 stfd f3,72(r1) <== NOT EXECUTED ffc0575c: d8 81 00 50 stfd f4,80(r1) <== NOT EXECUTED ffc05760: d8 a1 00 58 stfd f5,88(r1) <== NOT EXECUTED ffc05764: d8 c1 00 60 stfd f6,96(r1) <== NOT EXECUTED ffc05768: d8 e1 00 68 stfd f7,104(r1) <== NOT EXECUTED ffc0576c: 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 */ ffc05770: 38 00 00 01 li r0,1 ffc05774: 98 01 00 08 stb r0,8(r1) ffc05778: 38 00 00 00 li r0,0 vprintk(fmt, ap); ffc0577c: 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 */ ffc05780: 98 01 00 09 stb r0,9(r1) ffc05784: 38 01 00 80 addi r0,r1,128 ffc05788: 90 01 00 0c stw r0,12(r1) ffc0578c: 38 01 00 18 addi r0,r1,24 ffc05790: 90 01 00 10 stw r0,16(r1) vprintk(fmt, ap); ffc05794: 48 00 22 c5 bl ffc07a58 va_end(ap); /* clean up when done */ } ffc05798: 80 01 00 7c lwz r0,124(r1) ffc0579c: 38 21 00 78 addi r1,r1,120 ffc057a0: 7c 08 03 a6 mtlr r0 ffc057a4: 4e 80 00 20 blr =============================================================================== ffc06fcc : int printk_plugin( void *ignored __attribute__((unused)), const char *format, ... ) { ffc06fcc: 94 21 ff 90 stwu r1,-112(r1) ffc06fd0: 7c 08 02 a6 mflr r0 ffc06fd4: 90 a1 00 18 stw r5,24(r1) ffc06fd8: 90 01 00 74 stw r0,116(r1) ffc06fdc: 90 c1 00 1c stw r6,28(r1) ffc06fe0: 90 e1 00 20 stw r7,32(r1) ffc06fe4: 91 01 00 24 stw r8,36(r1) ffc06fe8: 91 21 00 28 stw r9,40(r1) ffc06fec: 91 41 00 2c stw r10,44(r1) ffc06ff0: 40 86 00 24 bne- cr1,ffc07014 <== ALWAYS TAKEN ffc06ff4: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc06ff8: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc06ffc: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc07000: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc07004: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc07008: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc0700c: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc07010: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list arg_pointer; va_start (arg_pointer, format); ffc07014: 38 00 00 02 li r0,2 ffc07018: 98 01 00 08 stb r0,8(r1) ffc0701c: 38 00 00 00 li r0,0 vprintk( format, arg_pointer ); ffc07020: 7c 83 23 78 mr r3,r4 ... ) { va_list arg_pointer; va_start (arg_pointer, format); ffc07024: 98 01 00 09 stb r0,9(r1) ffc07028: 38 01 00 78 addi r0,r1,120 vprintk( format, arg_pointer ); ffc0702c: 38 81 00 08 addi r4,r1,8 ... ) { va_list arg_pointer; va_start (arg_pointer, format); ffc07030: 90 01 00 0c stw r0,12(r1) ffc07034: 38 01 00 10 addi r0,r1,16 ffc07038: 90 01 00 10 stw r0,16(r1) vprintk( format, arg_pointer ); ffc0703c: 48 00 22 c9 bl ffc09304 va_end(arg_pointer); /* clean up when done */ return 0; } ffc07040: 38 60 00 00 li r3,0 ffc07044: 80 01 00 74 lwz r0,116(r1) ffc07048: 38 21 00 70 addi r1,r1,112 ffc0704c: 7c 08 03 a6 mtlr r0 ffc07050: 4e 80 00 20 blr =============================================================================== ffc0d668 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) ffc0d668: 2c 03 00 00 cmpwi r3,0 ffc0d66c: 41 82 00 3c beq- ffc0d6a8 ffc0d670: 80 03 00 00 lwz r0,0(r3) ffc0d674: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d678: 41 9e 00 30 beq- cr7,ffc0d6a8 return EINVAL; switch ( policy ) { ffc0d67c: 2b 84 00 04 cmplwi cr7,r4,4 ffc0d680: 40 9d 00 0c ble- cr7,ffc0d68c ffc0d684: 38 60 00 86 li r3,134 ffc0d688: 4e 80 00 20 blr ffc0d68c: 38 00 00 01 li r0,1 ffc0d690: 7c 00 20 30 slw r0,r0,r4 ffc0d694: 70 09 00 17 andi. r9,r0,23 ffc0d698: 41 a2 ff ec beq- ffc0d684 <== NEVER TAKEN case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; ffc0d69c: 90 83 00 14 stw r4,20(r3) ffc0d6a0: 38 60 00 00 li r3,0 return 0; ffc0d6a4: 4e 80 00 20 blr ffc0d6a8: 38 60 00 16 li r3,22 default: return ENOTSUP; } } ffc0d6ac: 4e 80 00 20 blr =============================================================================== ffc08f74 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { ffc08f74: 94 21 ff d0 stwu r1,-48(r1) ffc08f78: 7c 08 02 a6 mflr r0 ffc08f7c: 93 e1 00 2c stw r31,44(r1) const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) ffc08f80: 7c 7f 1b 79 mr. r31,r3 int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { ffc08f84: 90 01 00 34 stw r0,52(r1) ffc08f88: 93 81 00 20 stw r28,32(r1) ffc08f8c: 93 a1 00 24 stw r29,36(r1) ffc08f90: 93 c1 00 28 stw r30,40(r1) const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) ffc08f94: 41 82 00 a8 beq- ffc0903c return EINVAL; if ( count == 0 ) ffc08f98: 2f 85 00 00 cmpwi cr7,r5,0 ffc08f9c: 41 9e 00 a0 beq- cr7,ffc0903c return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { ffc08fa0: 2f 84 00 00 cmpwi cr7,r4,0 ffc08fa4: 41 9e 00 c8 beq- cr7,ffc0906c } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) ffc08fa8: 80 04 00 00 lwz r0,0(r4) ffc08fac: 2f 80 00 00 cmpwi cr7,r0,0 ffc08fb0: 41 9e 00 8c beq- cr7,ffc0903c return EINVAL; switch ( the_attr->process_shared ) { ffc08fb4: 83 c4 00 04 lwz r30,4(r4) ffc08fb8: 2f 9e 00 00 cmpwi cr7,r30,0 ffc08fbc: 40 9e 00 80 bne- cr7,ffc0903c <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc08fc0: 3d 20 00 00 lis r9,0 /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; the_attributes.maximum_count = count; ffc08fc4: 90 a1 00 0c stw r5,12(r1) ffc08fc8: 81 69 27 bc lwz r11,10172(r9) } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; ffc08fcc: 93 c1 00 08 stw r30,8(r1) ffc08fd0: 38 0b 00 01 addi r0,r11,1 ffc08fd4: 90 09 27 bc stw r0,10172(r9) * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *) ffc08fd8: 3f 80 00 00 lis r28,0 ffc08fdc: 3b 9c 2f f8 addi r28,r28,12280 ffc08fe0: 7f 83 e3 78 mr r3,r28 ffc08fe4: 48 00 2a 49 bl ffc0ba2c <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { ffc08fe8: 7c 7d 1b 79 mr. r29,r3 ffc08fec: 41 82 00 74 beq- ffc09060 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); ffc08ff0: 38 7d 00 10 addi r3,r29,16 ffc08ff4: 38 81 00 08 addi r4,r1,8 ffc08ff8: 48 00 1e e5 bl ffc0aedc <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc08ffc: 80 1d 00 08 lwz r0,8(r29) ffc09000: 81 7c 00 1c lwz r11,28(r28) ffc09004: 54 09 13 ba rlwinm r9,r0,2,14,29 ffc09008: 7f ab 49 2e stwx r29,r11,r9 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; ffc0900c: 93 dd 00 0c stw r30,12(r29) ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; ffc09010: 90 1f 00 00 stw r0,0(r31) _Thread_Enable_dispatch(); ffc09014: 48 00 3b e5 bl ffc0cbf8 <_Thread_Enable_dispatch> return 0; } ffc09018: 80 01 00 34 lwz r0,52(r1) /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); ffc0901c: 38 60 00 00 li r3,0 return 0; } ffc09020: 83 81 00 20 lwz r28,32(r1) ffc09024: 7c 08 03 a6 mtlr r0 ffc09028: 83 a1 00 24 lwz r29,36(r1) ffc0902c: 83 c1 00 28 lwz r30,40(r1) ffc09030: 83 e1 00 2c lwz r31,44(r1) ffc09034: 38 21 00 30 addi r1,r1,48 ffc09038: 4e 80 00 20 blr /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; ffc0903c: 38 60 00 16 li r3,22 } ffc09040: 80 01 00 34 lwz r0,52(r1) ffc09044: 83 81 00 20 lwz r28,32(r1) ffc09048: 7c 08 03 a6 mtlr r0 ffc0904c: 83 a1 00 24 lwz r29,36(r1) ffc09050: 83 c1 00 28 lwz r30,40(r1) ffc09054: 83 e1 00 2c lwz r31,44(r1) ffc09058: 38 21 00 30 addi r1,r1,48 ffc0905c: 4e 80 00 20 blr _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); ffc09060: 48 00 3b 99 bl ffc0cbf8 <_Thread_Enable_dispatch> ffc09064: 38 60 00 0b li r3,11 return EAGAIN; ffc09068: 4b ff ff d8 b ffc09040 * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); ffc0906c: 3b c1 00 10 addi r30,r1,16 ffc09070: 90 a1 00 18 stw r5,24(r1) ffc09074: 7f c3 f3 78 mr r3,r30 ffc09078: 4b ff fd e5 bl ffc08e5c ffc0907c: 7f c4 f3 78 mr r4,r30 ffc09080: 80 a1 00 18 lwz r5,24(r1) ffc09084: 4b ff ff 24 b ffc08fa8 =============================================================================== ffc083a4 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { ffc083a4: 94 21 ff f0 stwu r1,-16(r1) ffc083a8: 7c 08 02 a6 mflr r0 ffc083ac: 93 c1 00 08 stw r30,8(r1) /* * The POSIX standard does not address what to do when the routine * is NULL. It also does not address what happens when we cannot * allocate memory or anything else bad happens. */ if ( !routine ) ffc083b0: 7c 7e 1b 79 mr. r30,r3 void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { ffc083b4: 93 e1 00 0c stw r31,12(r1) ffc083b8: 7c 9f 23 78 mr r31,r4 ffc083bc: 90 01 00 14 stw r0,20(r1) /* * The POSIX standard does not address what to do when the routine * is NULL. It also does not address what happens when we cannot * allocate memory or anything else bad happens. */ if ( !routine ) ffc083c0: 41 82 00 48 beq- ffc08408 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc083c4: 3d 20 00 00 lis r9,0 ffc083c8: 81 69 27 94 lwz r11,10132(r9) ffc083cc: 38 0b 00 01 addi r0,r11,1 ffc083d0: 90 09 27 94 stw r0,10132(r9) return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); ffc083d4: 38 60 00 10 li r3,16 ffc083d8: 48 00 58 79 bl ffc0dc50 <_Workspace_Allocate> if ( handler ) { ffc083dc: 2c 03 00 00 cmpwi r3,0 ffc083e0: 41 82 00 24 beq- ffc08404 <== NEVER TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; ffc083e4: 3d 20 00 00 lis r9,0 handler->routine = routine; ffc083e8: 93 c3 00 08 stw r30,8(r3) handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); ffc083ec: 7c 64 1b 78 mr r4,r3 handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); if ( handler ) { thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; ffc083f0: 81 29 27 d4 lwz r9,10196(r9) ffc083f4: 81 29 01 48 lwz r9,328(r9) handler->routine = routine; handler->arg = arg; ffc083f8: 93 e3 00 0c stw r31,12(r3) _Chain_Append( handler_stack, &handler->Node ); ffc083fc: 38 69 00 e0 addi r3,r9,224 ffc08400: 48 00 20 0d bl ffc0a40c <_Chain_Append> } _Thread_Enable_dispatch(); ffc08404: 48 00 3c b9 bl ffc0c0bc <_Thread_Enable_dispatch> } ffc08408: 80 01 00 14 lwz r0,20(r1) ffc0840c: 83 c1 00 08 lwz r30,8(r1) ffc08410: 7c 08 03 a6 mtlr r0 ffc08414: 83 e1 00 0c lwz r31,12(r1) ffc08418: 38 21 00 10 addi r1,r1,16 ffc0841c: 4e 80 00 20 blr =============================================================================== ffc09a80 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { ffc09a80: 94 21 ff e8 stwu r1,-24(r1) ffc09a84: 7c 08 02 a6 mflr r0 ffc09a88: 93 81 00 08 stw r28,8(r1) POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; ffc09a8c: 7c 9c 23 79 mr. r28,r4 int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { ffc09a90: 93 c1 00 10 stw r30,16(r1) ffc09a94: 7c 7e 1b 78 mr r30,r3 ffc09a98: 90 01 00 1c stw r0,28(r1) ffc09a9c: 93 a1 00 0c stw r29,12(r1) ffc09aa0: 93 e1 00 14 stw r31,20(r1) POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; ffc09aa4: 41 82 00 cc beq- ffc09b70 /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) ffc09aa8: 80 1c 00 04 lwz r0,4(r28) ffc09aac: 2f 80 00 01 cmpwi cr7,r0,1 ffc09ab0: 41 9e 00 10 beq- cr7,ffc09ac0 <== NEVER TAKEN return EINVAL; if ( !the_attr->is_initialized ) ffc09ab4: 80 1c 00 00 lwz r0,0(r28) ffc09ab8: 2f 80 00 00 cmpwi cr7,r0,0 ffc09abc: 40 9e 00 28 bne- cr7,ffc09ae4 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; ffc09ac0: 38 60 00 16 li r3,22 } ffc09ac4: 80 01 00 1c lwz r0,28(r1) ffc09ac8: 83 81 00 08 lwz r28,8(r1) ffc09acc: 7c 08 03 a6 mtlr r0 ffc09ad0: 83 a1 00 0c lwz r29,12(r1) ffc09ad4: 83 c1 00 10 lwz r30,16(r1) ffc09ad8: 83 e1 00 14 lwz r31,20(r1) ffc09adc: 38 21 00 18 addi r1,r1,24 ffc09ae0: 4e 80 00 20 blr rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc09ae4: 3d 20 00 00 lis r9,0 ffc09ae8: 81 69 27 c8 lwz r11,10184(r9) ffc09aec: 38 0b 00 01 addi r0,r11,1 ffc09af0: 90 09 27 c8 stw r0,10184(r9) */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) ffc09af4: 3f a0 00 00 lis r29,0 ffc09af8: 3b bd 30 90 addi r29,r29,12432 ffc09afc: 7f a3 eb 78 mr r3,r29 ffc09b00: 48 00 32 c9 bl ffc0cdc8 <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { ffc09b04: 7c 7f 1b 79 mr. r31,r3 ffc09b08: 41 82 00 74 beq- ffc09b7c _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; ffc09b0c: 80 1c 00 04 lwz r0,4(r28) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; ffc09b10: 3b 80 00 00 li r28,0 ffc09b14: 93 9f 00 14 stw r28,20(r31) /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( ffc09b18: 38 7f 00 18 addi r3,r31,24 ffc09b1c: 38 80 00 00 li r4,0 if ( !the_cond ) { _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; ffc09b20: 90 1f 00 10 stw r0,16(r31) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( ffc09b24: 38 a0 08 00 li r5,2048 ffc09b28: 38 c0 00 74 li r6,116 ffc09b2c: 48 00 4e dd bl ffc0ea08 <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc09b30: 80 1f 00 08 lwz r0,8(r31) ffc09b34: 81 7d 00 1c lwz r11,28(r29) ffc09b38: 54 09 13 ba rlwinm r9,r0,2,14,29 ffc09b3c: 7f eb 49 2e stwx r31,r11,r9 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; ffc09b40: 93 9f 00 0c stw r28,12(r31) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; ffc09b44: 90 1e 00 00 stw r0,0(r30) _Thread_Enable_dispatch(); ffc09b48: 48 00 44 4d bl ffc0df94 <_Thread_Enable_dispatch> return 0; } ffc09b4c: 80 01 00 1c lwz r0,28(r1) 0 ); *cond = the_cond->Object.id; _Thread_Enable_dispatch(); ffc09b50: 38 60 00 00 li r3,0 return 0; } ffc09b54: 83 81 00 08 lwz r28,8(r1) ffc09b58: 7c 08 03 a6 mtlr r0 ffc09b5c: 83 a1 00 0c lwz r29,12(r1) ffc09b60: 83 c1 00 10 lwz r30,16(r1) ffc09b64: 83 e1 00 14 lwz r31,20(r1) ffc09b68: 38 21 00 18 addi r1,r1,24 ffc09b6c: 4e 80 00 20 blr ) { POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; ffc09b70: 3f 80 00 00 lis r28,0 ffc09b74: 3b 9c 27 08 addi r28,r28,9992 ffc09b78: 4b ff ff 30 b ffc09aa8 _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); ffc09b7c: 48 00 44 19 bl ffc0df94 <_Thread_Enable_dispatch> ffc09b80: 38 60 00 0c li r3,12 return ENOMEM; ffc09b84: 4b ff ff 40 b ffc09ac4 =============================================================================== ffc098b4 : int pthread_condattr_destroy( pthread_condattr_t *attr ) { if ( !attr || attr->is_initialized == false ) ffc098b4: 2c 03 00 00 cmpwi r3,0 ffc098b8: 41 82 00 20 beq- ffc098d8 ffc098bc: 80 03 00 00 lwz r0,0(r3) ffc098c0: 2f 80 00 00 cmpwi cr7,r0,0 ffc098c4: 41 9e 00 14 beq- cr7,ffc098d8 <== NEVER TAKEN return EINVAL; attr->is_initialized = false; ffc098c8: 38 00 00 00 li r0,0 ffc098cc: 90 03 00 00 stw r0,0(r3) ffc098d0: 38 60 00 00 li r3,0 return 0; ffc098d4: 4e 80 00 20 blr ffc098d8: 38 60 00 16 li r3,22 } ffc098dc: 4e 80 00 20 blr =============================================================================== ffc08aa8 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { ffc08aa8: 94 21 ff 80 stwu r1,-128(r1) ffc08aac: 7c 08 02 a6 mflr r0 ffc08ab0: 93 61 00 6c stw r27,108(r1) int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) ffc08ab4: 7c bb 2b 79 mr. r27,r5 pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { ffc08ab8: 93 81 00 70 stw r28,112(r1) ffc08abc: 7c dc 33 78 mr r28,r6 ffc08ac0: 93 a1 00 74 stw r29,116(r1) ffc08ac4: 7c 7d 1b 78 mr r29,r3 ffc08ac8: 93 c1 00 78 stw r30,120(r1) int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) ffc08acc: 3b c0 00 0e li r30,14 pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { ffc08ad0: 90 01 00 84 stw r0,132(r1) ffc08ad4: 92 a1 00 54 stw r21,84(r1) ffc08ad8: 92 c1 00 58 stw r22,88(r1) ffc08adc: 92 e1 00 5c stw r23,92(r1) ffc08ae0: 93 01 00 60 stw r24,96(r1) ffc08ae4: 93 21 00 64 stw r25,100(r1) ffc08ae8: 93 41 00 68 stw r26,104(r1) ffc08aec: 93 e1 00 7c stw r31,124(r1) int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) ffc08af0: 41 82 00 54 beq- ffc08b44 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; ffc08af4: 2f 84 00 00 cmpwi cr7,r4,0 ffc08af8: 7c 9f 23 78 mr r31,r4 ffc08afc: 41 9e 01 ac beq- cr7,ffc08ca8 if ( !the_attr->is_initialized ) ffc08b00: 80 1f 00 00 lwz r0,0(r31) ffc08b04: 2f 80 00 00 cmpwi cr7,r0,0 ffc08b08: 41 9e 00 38 beq- cr7,ffc08b40 * stack space if it is allowed to allocate it itself. * * NOTE: If the user provides the stack we will let it drop below * twice the minimum. */ if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) ) ffc08b0c: 80 1f 00 04 lwz r0,4(r31) ffc08b10: 2f 80 00 00 cmpwi cr7,r0,0 ffc08b14: 41 9e 00 18 beq- cr7,ffc08b2c ffc08b18: 3d 20 00 00 lis r9,0 ffc08b1c: 80 09 26 c8 lwz r0,9928(r9) ffc08b20: 81 3f 00 08 lwz r9,8(r31) ffc08b24: 7f 89 00 40 cmplw cr7,r9,r0 ffc08b28: 41 9c 00 18 blt- cr7,ffc08b40 * If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread * inherits scheduling attributes from the creating thread. If it is * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { ffc08b2c: 80 1f 00 10 lwz r0,16(r31) ffc08b30: 2f 80 00 01 cmpwi cr7,r0,1 ffc08b34: 41 9e 01 80 beq- cr7,ffc08cb4 ffc08b38: 2f 80 00 02 cmpwi cr7,r0,2 ffc08b3c: 41 9e 00 48 beq- cr7,ffc08b84 * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; ffc08b40: 3b c0 00 16 li r30,22 } ffc08b44: 80 01 00 84 lwz r0,132(r1) ffc08b48: 7f c3 f3 78 mr r3,r30 ffc08b4c: 82 a1 00 54 lwz r21,84(r1) ffc08b50: 7c 08 03 a6 mtlr r0 ffc08b54: 82 c1 00 58 lwz r22,88(r1) ffc08b58: 82 e1 00 5c lwz r23,92(r1) ffc08b5c: 83 01 00 60 lwz r24,96(r1) ffc08b60: 83 21 00 64 lwz r25,100(r1) ffc08b64: 83 41 00 68 lwz r26,104(r1) ffc08b68: 83 61 00 6c lwz r27,108(r1) ffc08b6c: 83 81 00 70 lwz r28,112(r1) ffc08b70: 83 a1 00 74 lwz r29,116(r1) ffc08b74: 83 c1 00 78 lwz r30,120(r1) ffc08b78: 83 e1 00 7c lwz r31,124(r1) ffc08b7c: 38 21 00 80 addi r1,r1,128 ffc08b80: 4e 80 00 20 blr schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; schedparam = the_attr->schedparam; ffc08b84: 81 7f 00 1c lwz r11,28(r31) ffc08b88: 81 3f 00 20 lwz r9,32(r31) ffc08b8c: 80 1f 00 24 lwz r0,36(r31) ffc08b90: 81 5f 00 18 lwz r10,24(r31) schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; ffc08b94: 83 5f 00 14 lwz r26,20(r31) schedparam = the_attr->schedparam; ffc08b98: 91 41 00 20 stw r10,32(r1) ffc08b9c: 91 61 00 24 stw r11,36(r1) ffc08ba0: 91 21 00 28 stw r9,40(r1) ffc08ba4: 90 01 00 2c stw r0,44(r1) ffc08ba8: 81 7f 00 28 lwz r11,40(r31) ffc08bac: 81 3f 00 2c lwz r9,44(r31) ffc08bb0: 80 1f 00 30 lwz r0,48(r31) ffc08bb4: 91 61 00 30 stw r11,48(r1) ffc08bb8: 91 21 00 34 stw r9,52(r1) ffc08bbc: 90 01 00 38 stw r0,56(r1) /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) ffc08bc0: 80 1f 00 0c lwz r0,12(r31) ffc08bc4: 3b c0 00 86 li r30,134 ffc08bc8: 2f 80 00 00 cmpwi cr7,r0,0 ffc08bcc: 40 be ff 78 bne- cr7,ffc08b44 return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) ffc08bd0: 80 61 00 20 lwz r3,32(r1) ffc08bd4: 48 00 7b 55 bl ffc10728 <_POSIX_Priority_Is_valid> ffc08bd8: 2f 83 00 00 cmpwi cr7,r3,0 ffc08bdc: 41 9e ff 64 beq+ cr7,ffc08b40 <== NEVER TAKEN return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); ffc08be0: 7c 24 0b 78 mr r4,r1 ffc08be4: 86 c4 00 20 lwzu r22,32(r4) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); ffc08be8: 3d 20 00 00 lis r9,0 /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( ffc08bec: 7f 43 d3 78 mr r3,r26 ffc08bf0: 8a a9 26 cc lbz r21,9932(r9) ffc08bf4: 38 a1 00 18 addi r5,r1,24 ffc08bf8: 38 c1 00 1c addi r6,r1,28 ffc08bfc: 48 00 7b 51 bl ffc1074c <_POSIX_Thread_Translate_sched_param> schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) ffc08c00: 7c 7e 1b 79 mr. r30,r3 ffc08c04: 40 82 ff 40 bne+ ffc08b44 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); ffc08c08: 3e e0 00 00 lis r23,0 ffc08c0c: 80 77 27 d0 lwz r3,10192(r23) * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); ffc08c10: 3f 00 00 00 lis r24,0 ffc08c14: 3b 18 2e 58 addi r24,r24,11864 ffc08c18: 48 00 20 3d bl ffc0ac54 <_API_Mutex_Lock> ffc08c1c: 7f 03 c3 78 mr r3,r24 ffc08c20: 48 00 2b d9 bl ffc0b7f8 <_Objects_Allocate> * Allocate the thread control block. * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { ffc08c24: 7c 79 1b 79 mr. r25,r3 ffc08c28: 7f 03 c3 78 mr r3,r24 ffc08c2c: 41 82 00 6c beq- ffc08c98 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( ffc08c30: 3d 20 00 00 lis r9,0 ffc08c34: 80 1f 00 08 lwz r0,8(r31) ffc08c38: 80 c9 26 c8 lwz r6,9928(r9) ffc08c3c: 93 c1 00 48 stw r30,72(r1) ffc08c40: 54 c6 08 3c rlwinm r6,r6,1,0,30 ffc08c44: 7f 86 00 40 cmplw cr7,r6,r0 ffc08c48: 80 bf 00 04 lwz r5,4(r31) ffc08c4c: 40 9c 00 08 bge- cr7,ffc08c54 ffc08c50: 7c 06 03 78 mr r6,r0 ffc08c54: 80 01 00 1c lwz r0,28(r1) ffc08c58: 7d 16 a8 50 subf r8,r22,r21 ffc08c5c: 81 41 00 18 lwz r10,24(r1) ffc08c60: 7f 24 cb 78 mr r4,r25 ffc08c64: 90 01 00 08 stw r0,8(r1) ffc08c68: 38 00 00 00 li r0,0 ffc08c6c: 38 e0 00 01 li r7,1 ffc08c70: 90 01 00 0c stw r0,12(r1) ffc08c74: 39 20 00 01 li r9,1 ffc08c78: 38 01 00 48 addi r0,r1,72 ffc08c7c: 90 01 00 10 stw r0,16(r1) ffc08c80: 48 00 3e 7d bl ffc0cafc <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { ffc08c84: 2f 83 00 00 cmpwi cr7,r3,0 ffc08c88: 40 9e 00 78 bne- cr7,ffc08d00 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); ffc08c8c: 7f 03 c3 78 mr r3,r24 ffc08c90: 7f 24 cb 78 mr r4,r25 ffc08c94: 48 00 2f 85 bl ffc0bc18 <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); ffc08c98: 80 77 27 d0 lwz r3,10192(r23) ffc08c9c: 3b c0 00 0b li r30,11 ffc08ca0: 48 00 20 35 bl ffc0acd4 <_API_Mutex_Unlock> return EAGAIN; ffc08ca4: 4b ff fe a0 b ffc08b44 int rc; if ( !start_routine ) return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; ffc08ca8: 3f e0 ff c2 lis r31,-62 ffc08cac: 3b ff 0f 10 addi r31,r31,3856 ffc08cb0: 4b ff fe 50 b ffc08b00 * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; ffc08cb4: 3d 20 00 00 lis r9,0 ffc08cb8: 81 29 27 d8 lwz r9,10200(r9) ffc08cbc: 81 29 01 48 lwz r9,328(r9) schedpolicy = api->schedpolicy; schedparam = api->schedparam; ffc08cc0: 81 69 00 8c lwz r11,140(r9) ffc08cc4: 80 09 00 90 lwz r0,144(r9) ffc08cc8: 81 09 00 84 lwz r8,132(r9) ffc08ccc: 81 49 00 88 lwz r10,136(r9) * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; ffc08cd0: 83 49 00 80 lwz r26,128(r9) schedparam = api->schedparam; ffc08cd4: 91 01 00 20 stw r8,32(r1) ffc08cd8: 91 41 00 24 stw r10,36(r1) ffc08cdc: 91 61 00 28 stw r11,40(r1) ffc08ce0: 90 01 00 2c stw r0,44(r1) ffc08ce4: 80 09 00 9c lwz r0,156(r9) ffc08ce8: 81 69 00 94 lwz r11,148(r9) ffc08cec: 81 29 00 98 lwz r9,152(r9) ffc08cf0: 91 61 00 30 stw r11,48(r1) ffc08cf4: 91 21 00 34 stw r9,52(r1) ffc08cf8: 90 01 00 38 stw r0,56(r1) break; ffc08cfc: 4b ff fe c4 b ffc08bc0 } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc08d00: 83 19 01 48 lwz r24,328(r25) api->Attributes = *the_attr; ffc08d04: 7f e4 fb 78 mr r4,r31 ffc08d08: 38 a0 00 3c li r5,60 ffc08d0c: 7f 03 c3 78 mr r3,r24 ffc08d10: 48 00 c4 f5 bl ffc15204 api->detachstate = the_attr->detachstate; ffc08d14: 80 1f 00 38 lwz r0,56(r31) api->schedpolicy = schedpolicy; ffc08d18: 93 58 00 80 stw r26,128(r24) the_thread->do_post_task_switch_extension = true; /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( ffc08d1c: 7f 65 db 78 mr r5,r27 ffc08d20: 7f 86 e3 78 mr r6,r28 * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; ffc08d24: 90 18 00 3c stw r0,60(r24) the_thread->do_post_task_switch_extension = true; /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( ffc08d28: 7f 23 cb 78 mr r3,r25 ffc08d2c: 38 80 00 01 li r4,1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; ffc08d30: 81 61 00 24 lwz r11,36(r1) the_thread->do_post_task_switch_extension = true; /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( ffc08d34: 38 e0 00 00 li r7,0 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; ffc08d38: 81 21 00 28 lwz r9,40(r1) ffc08d3c: 80 01 00 2c lwz r0,44(r1) ffc08d40: 81 41 00 20 lwz r10,32(r1) ffc08d44: 91 78 00 88 stw r11,136(r24) * This insures we evaluate the process-wide signals pending when we * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; ffc08d48: 39 60 00 01 li r11,1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; ffc08d4c: 91 58 00 84 stw r10,132(r24) ffc08d50: 91 38 00 8c stw r9,140(r24) ffc08d54: 90 18 00 90 stw r0,144(r24) * This insures we evaluate the process-wide signals pending when we * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; ffc08d58: 99 79 00 74 stb r11,116(r25) api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; ffc08d5c: 81 21 00 34 lwz r9,52(r1) ffc08d60: 80 01 00 38 lwz r0,56(r1) ffc08d64: 81 61 00 30 lwz r11,48(r1) ffc08d68: 91 38 00 98 stw r9,152(r24) ffc08d6c: 91 78 00 94 stw r11,148(r24) ffc08d70: 90 18 00 9c stw r0,156(r24) the_thread->do_post_task_switch_extension = true; /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( ffc08d74: 48 00 4b 65 bl ffc0d8d8 <_Thread_Start> _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { ffc08d78: 2f 9a 00 04 cmpwi cr7,r26,4 ffc08d7c: 41 9e 00 18 beq- cr7,ffc08d94 } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; ffc08d80: 80 19 00 08 lwz r0,8(r25) _RTEMS_Unlock_allocator(); ffc08d84: 80 77 27 d0 lwz r3,10192(r23) } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; ffc08d88: 90 1d 00 00 stw r0,0(r29) _RTEMS_Unlock_allocator(); ffc08d8c: 48 00 1f 49 bl ffc0acd4 <_API_Mutex_Unlock> return 0; ffc08d90: 4b ff fd b4 b ffc08b44 return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( ffc08d94: 38 78 00 8c addi r3,r24,140 ffc08d98: 48 00 4f 1d bl ffc0dcb4 <_Timespec_To_ticks> ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc08d9c: 38 98 00 a4 addi r4,r24,164 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc08da0: 90 78 00 b0 stw r3,176(r24) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc08da4: 3c 60 00 00 lis r3,0 ffc08da8: 38 63 2d 28 addi r3,r3,11560 ffc08dac: 48 00 54 8d bl ffc0e238 <_Watchdog_Insert> ffc08db0: 4b ff ff d0 b ffc08d80 =============================================================================== ffc07f68 : int pthread_mutexattr_gettype( const pthread_mutexattr_t *attr, int *type ) { if ( !attr ) ffc07f68: 2c 03 00 00 cmpwi r3,0 ffc07f6c: 41 82 00 28 beq- ffc07f94 return EINVAL; if ( !attr->is_initialized ) ffc07f70: 80 03 00 00 lwz r0,0(r3) ffc07f74: 2f 80 00 00 cmpwi cr7,r0,0 ffc07f78: 41 9e 00 1c beq- cr7,ffc07f94 return EINVAL; if ( !type ) ffc07f7c: 2f 84 00 00 cmpwi cr7,r4,0 ffc07f80: 41 9e 00 14 beq- cr7,ffc07f94 <== NEVER TAKEN return EINVAL; *type = attr->type; ffc07f84: 80 03 00 10 lwz r0,16(r3) ffc07f88: 38 60 00 00 li r3,0 ffc07f8c: 90 04 00 00 stw r0,0(r4) return 0; ffc07f90: 4e 80 00 20 blr ffc07f94: 38 60 00 16 li r3,22 } ffc07f98: 4e 80 00 20 blr =============================================================================== ffc0b22c : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) ffc0b22c: 2c 03 00 00 cmpwi r3,0 ffc0b230: 41 82 00 18 beq- ffc0b248 ffc0b234: 80 03 00 00 lwz r0,0(r3) ffc0b238: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b23c: 41 9e 00 0c beq- cr7,ffc0b248 return EINVAL; switch ( pshared ) { ffc0b240: 2b 84 00 01 cmplwi cr7,r4,1 ffc0b244: 40 9d 00 0c ble- cr7,ffc0b250 <== ALWAYS TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; ffc0b248: 38 60 00 16 li r3,22 default: return EINVAL; } } ffc0b24c: 4e 80 00 20 blr return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; ffc0b250: 90 83 00 04 stw r4,4(r3) ffc0b254: 38 60 00 00 li r3,0 return 0; ffc0b258: 4e 80 00 20 blr =============================================================================== ffc07fe8 : int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { if ( !attr || !attr->is_initialized ) ffc07fe8: 2c 03 00 00 cmpwi r3,0 ffc07fec: 41 82 00 18 beq- ffc08004 ffc07ff0: 80 03 00 00 lwz r0,0(r3) ffc07ff4: 2f 80 00 00 cmpwi cr7,r0,0 ffc07ff8: 41 9e 00 0c beq- cr7,ffc08004 <== NEVER TAKEN return EINVAL; switch ( type ) { ffc07ffc: 2b 84 00 03 cmplwi cr7,r4,3 ffc08000: 40 9d 00 0c ble- cr7,ffc0800c case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; return 0; ffc08004: 38 60 00 16 li r3,22 default: return EINVAL; } } ffc08008: 4e 80 00 20 blr switch ( type ) { case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; ffc0800c: 90 83 00 10 stw r4,16(r3) ffc08010: 38 60 00 00 li r3,0 return 0; ffc08014: 4e 80 00 20 blr =============================================================================== ffc09378 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { ffc09378: 94 21 ff d8 stwu r1,-40(r1) ffc0937c: 7c 08 02 a6 mflr r0 ffc09380: 93 e1 00 24 stw r31,36(r1) if ( !once_control || !init_routine ) ffc09384: 7c 7f 1b 79 mr. r31,r3 int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { ffc09388: 93 c1 00 20 stw r30,32(r1) ffc0938c: 7c 9e 23 78 mr r30,r4 ffc09390: 90 01 00 2c stw r0,44(r1) ffc09394: 93 a1 00 1c stw r29,28(r1) if ( !once_control || !init_routine ) ffc09398: 41 82 00 88 beq- ffc09420 ffc0939c: 2f 84 00 00 cmpwi cr7,r4,0 ffc093a0: 41 9e 00 80 beq- cr7,ffc09420 return EINVAL; if ( !once_control->init_executed ) { ffc093a4: 80 1f 00 04 lwz r0,4(r31) ffc093a8: 38 60 00 00 li r3,0 ffc093ac: 2f 80 00 00 cmpwi cr7,r0,0 ffc093b0: 41 9e 00 20 beq- cr7,ffc093d0 (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; } ffc093b4: 80 01 00 2c lwz r0,44(r1) ffc093b8: 83 a1 00 1c lwz r29,28(r1) ffc093bc: 7c 08 03 a6 mtlr r0 ffc093c0: 83 c1 00 20 lwz r30,32(r1) ffc093c4: 83 e1 00 24 lwz r31,36(r1) ffc093c8: 38 21 00 28 addi r1,r1,40 ffc093cc: 4e 80 00 20 blr if ( !once_control || !init_routine ) return EINVAL; if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); ffc093d0: 3b a1 00 08 addi r29,r1,8 ffc093d4: 38 60 01 00 li r3,256 ffc093d8: 38 80 01 00 li r4,256 ffc093dc: 7f a5 eb 78 mr r5,r29 ffc093e0: 48 00 0f 61 bl ffc0a340 if ( !once_control->init_executed ) { ffc093e4: 80 1f 00 04 lwz r0,4(r31) ffc093e8: 2f 80 00 00 cmpwi cr7,r0,0 ffc093ec: 41 9e 00 54 beq- cr7,ffc09440 <== ALWAYS TAKEN once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); ffc093f0: 80 61 00 08 lwz r3,8(r1) ffc093f4: 7f a5 eb 78 mr r5,r29 ffc093f8: 38 80 01 00 li r4,256 ffc093fc: 48 00 0f 45 bl ffc0a340 } return 0; } ffc09400: 80 01 00 2c lwz r0,44(r1) if ( !once_control->init_executed ) { once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); ffc09404: 38 60 00 00 li r3,0 } return 0; } ffc09408: 83 a1 00 1c lwz r29,28(r1) ffc0940c: 7c 08 03 a6 mtlr r0 ffc09410: 83 c1 00 20 lwz r30,32(r1) ffc09414: 83 e1 00 24 lwz r31,36(r1) ffc09418: 38 21 00 28 addi r1,r1,40 ffc0941c: 4e 80 00 20 blr ffc09420: 80 01 00 2c lwz r0,44(r1) if ( !once_control->init_executed ) { once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); ffc09424: 38 60 00 16 li r3,22 } return 0; } ffc09428: 83 a1 00 1c lwz r29,28(r1) ffc0942c: 7c 08 03 a6 mtlr r0 ffc09430: 83 c1 00 20 lwz r30,32(r1) ffc09434: 83 e1 00 24 lwz r31,36(r1) ffc09438: 38 21 00 28 addi r1,r1,40 ffc0943c: 4e 80 00 20 blr if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = true; ffc09440: 38 00 00 01 li r0,1 once_control->init_executed = true; (*init_routine)(); ffc09444: 7f c9 03 a6 mtctr r30 if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = true; once_control->init_executed = true; ffc09448: 90 1f 00 04 stw r0,4(r31) if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = true; ffc0944c: 90 1f 00 00 stw r0,0(r31) once_control->init_executed = true; (*init_routine)(); ffc09450: 4e 80 04 21 bctrl ffc09454: 4b ff ff 9c b ffc093f0 =============================================================================== ffc09e64 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { ffc09e64: 94 21 ff d8 stwu r1,-40(r1) ffc09e68: 7c 08 02 a6 mflr r0 ffc09e6c: 93 c1 00 20 stw r30,32(r1) const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) ffc09e70: 7c 7e 1b 79 mr. r30,r3 int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { ffc09e74: 90 01 00 2c stw r0,44(r1) ffc09e78: 93 81 00 18 stw r28,24(r1) ffc09e7c: 93 a1 00 1c stw r29,28(r1) ffc09e80: 93 e1 00 24 stw r31,36(r1) const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) ffc09e84: 41 82 00 24 beq- ffc09ea8 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { ffc09e88: 2f 84 00 00 cmpwi cr7,r4,0 ffc09e8c: 41 9e 00 c0 beq- cr7,ffc09f4c } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) ffc09e90: 80 04 00 00 lwz r0,0(r4) ffc09e94: 2f 80 00 00 cmpwi cr7,r0,0 ffc09e98: 41 9e 00 10 beq- cr7,ffc09ea8 <== NEVER TAKEN return EINVAL; switch ( the_attr->process_shared ) { ffc09e9c: 83 e4 00 04 lwz r31,4(r4) ffc09ea0: 2f 9f 00 00 cmpwi cr7,r31,0 ffc09ea4: 41 9e 00 28 beq- cr7,ffc09ecc <== ALWAYS TAKEN ); *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; ffc09ea8: 38 60 00 16 li r3,22 } ffc09eac: 80 01 00 2c lwz r0,44(r1) ffc09eb0: 83 81 00 18 lwz r28,24(r1) ffc09eb4: 7c 08 03 a6 mtlr r0 ffc09eb8: 83 a1 00 1c lwz r29,28(r1) ffc09ebc: 83 c1 00 20 lwz r30,32(r1) ffc09ec0: 83 e1 00 24 lwz r31,36(r1) ffc09ec4: 38 21 00 28 addi r1,r1,40 ffc09ec8: 4e 80 00 20 blr rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc09ecc: 3d 20 00 00 lis r9,0 ffc09ed0: 81 69 27 bc lwz r11,10172(r9) ffc09ed4: 38 0b 00 01 addi r0,r11,1 ffc09ed8: 90 09 27 bc stw r0,10172(r9) * This function allocates a RWLock control block from * the inactive chain of free RWLock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void ) { return (POSIX_RWLock_Control *) ffc09edc: 3f 80 00 00 lis r28,0 ffc09ee0: 3b 9c 2e 38 addi r28,r28,11832 ffc09ee4: 7f 83 e3 78 mr r3,r28 ffc09ee8: 48 00 32 bd bl ffc0d1a4 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { ffc09eec: 7c 7d 1b 79 mr. r29,r3 ffc09ef0: 41 82 00 50 beq- ffc09f40 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); ffc09ef4: 38 7d 00 10 addi r3,r29,16 ffc09ef8: 38 81 00 08 addi r4,r1,8 ffc09efc: 48 00 27 ed bl ffc0c6e8 <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc09f00: 80 1d 00 08 lwz r0,8(r29) ffc09f04: 81 7c 00 1c lwz r11,28(r28) ffc09f08: 54 09 13 ba rlwinm r9,r0,2,14,29 ffc09f0c: 7f ab 49 2e stwx r29,r11,r9 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; ffc09f10: 93 fd 00 0c stw r31,12(r29) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; ffc09f14: 90 1e 00 00 stw r0,0(r30) _Thread_Enable_dispatch(); ffc09f18: 48 00 44 59 bl ffc0e370 <_Thread_Enable_dispatch> return 0; } ffc09f1c: 80 01 00 2c lwz r0,44(r1) 0 ); *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); ffc09f20: 38 60 00 00 li r3,0 return 0; } ffc09f24: 83 81 00 18 lwz r28,24(r1) ffc09f28: 7c 08 03 a6 mtlr r0 ffc09f2c: 83 a1 00 1c lwz r29,28(r1) ffc09f30: 83 c1 00 20 lwz r30,32(r1) ffc09f34: 83 e1 00 24 lwz r31,36(r1) ffc09f38: 38 21 00 28 addi r1,r1,40 ffc09f3c: 4e 80 00 20 blr _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); ffc09f40: 48 00 44 31 bl ffc0e370 <_Thread_Enable_dispatch> ffc09f44: 38 60 00 0b li r3,11 return EAGAIN; ffc09f48: 4b ff ff 64 b ffc09eac * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); ffc09f4c: 3b e1 00 0c addi r31,r1,12 ffc09f50: 7f e3 fb 78 mr r3,r31 ffc09f54: 48 00 0c 75 bl ffc0abc8 ffc09f58: 7f e4 fb 78 mr r4,r31 ffc09f5c: 4b ff ff 34 b ffc09e90 =============================================================================== ffc09ff0 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { ffc09ff0: 94 21 ff d8 stwu r1,-40(r1) ffc09ff4: 7c 08 02 a6 mflr r0 ffc09ff8: 93 a1 00 1c stw r29,28(r1) Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) ffc09ffc: 7c 7d 1b 79 mr. r29,r3 int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { ffc0a000: 90 01 00 2c stw r0,44(r1) ffc0a004: 93 c1 00 20 stw r30,32(r1) ffc0a008: 93 e1 00 24 stw r31,36(r1) Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) ffc0a00c: 41 82 00 9c beq- ffc0a0a8 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); ffc0a010: 7c 83 23 78 mr r3,r4 ffc0a014: 38 81 00 0c addi r4,r1,12 ffc0a018: 48 00 7f d9 bl ffc11ff0 <_POSIX_Absolute_timeout_to_ticks> ffc0a01c: 80 9d 00 00 lwz r4,0(r29) ffc0a020: 7c 7e 1b 78 mr r30,r3 ffc0a024: 3c 60 00 00 lis r3,0 ffc0a028: 38 63 2e 38 addi r3,r3,11832 ffc0a02c: 38 a1 00 08 addi r5,r1,8 ffc0a030: 48 00 37 75 bl ffc0d7a4 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { ffc0a034: 80 01 00 08 lwz r0,8(r1) ffc0a038: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a03c: 40 9e 00 6c bne- cr7,ffc0a0a8 int _EXFUN(pthread_rwlock_init, (pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr)); int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedrdlock, ffc0a040: 6b df 00 03 xori r31,r30,3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( ffc0a044: 80 9d 00 00 lwz r4,0(r29) ffc0a048: 7f ff 00 34 cntlzw r31,r31 ffc0a04c: 80 c1 00 0c lwz r6,12(r1) ffc0a050: 57 ff d9 7e rlwinm r31,r31,27,5,31 ffc0a054: 38 63 00 10 addi r3,r3,16 ffc0a058: 7f e5 fb 78 mr r5,r31 ffc0a05c: 38 e0 00 00 li r7,0 ffc0a060: 48 00 26 c9 bl ffc0c728 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); ffc0a064: 48 00 43 0d bl ffc0e370 <_Thread_Enable_dispatch> if ( !do_wait ) { ffc0a068: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0a06c: 40 9e 00 74 bne- cr7,ffc0a0e0 if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { ffc0a070: 3d 20 00 00 lis r9,0 ffc0a074: 81 29 27 fc lwz r9,10236(r9) ffc0a078: 80 09 00 34 lwz r0,52(r9) ffc0a07c: 2f 80 00 02 cmpwi cr7,r0,2 ffc0a080: 41 9e 00 48 beq- cr7,ffc0a0c8 break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( ffc0a084: 7c 03 03 78 mr r3,r0 ffc0a088: 48 00 01 69 bl ffc0a1f0 <_POSIX_RWLock_Translate_core_RWLock_return_code> case OBJECTS_ERROR: break; } return EINVAL; } ffc0a08c: 80 01 00 2c lwz r0,44(r1) ffc0a090: 83 a1 00 1c lwz r29,28(r1) ffc0a094: 7c 08 03 a6 mtlr r0 ffc0a098: 83 c1 00 20 lwz r30,32(r1) ffc0a09c: 83 e1 00 24 lwz r31,36(r1) ffc0a0a0: 38 21 00 28 addi r1,r1,40 ffc0a0a4: 4e 80 00 20 blr break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( ffc0a0a8: 38 60 00 16 li r3,22 case OBJECTS_ERROR: break; } return EINVAL; } ffc0a0ac: 80 01 00 2c lwz r0,44(r1) ffc0a0b0: 83 a1 00 1c lwz r29,28(r1) ffc0a0b4: 7c 08 03 a6 mtlr r0 ffc0a0b8: 83 c1 00 20 lwz r30,32(r1) ffc0a0bc: 83 e1 00 24 lwz r31,36(r1) ffc0a0c0: 38 21 00 28 addi r1,r1,40 ffc0a0c4: 4e 80 00 20 blr ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { switch (status) { ffc0a0c8: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0a0cc: 41 be ff dc beq- cr7,ffc0a0a8 <== NEVER TAKEN ffc0a0d0: 2b 9e 00 02 cmplwi cr7,r30,2 ffc0a0d4: 38 60 00 74 li r3,116 ffc0a0d8: 40 bd ff d4 ble- cr7,ffc0a0ac <== ALWAYS TAKEN ffc0a0dc: 4b ff ff a8 b ffc0a084 <== NOT EXECUTED ffc0a0e0: 3d 20 00 00 lis r9,0 ffc0a0e4: 81 29 27 fc lwz r9,10236(r9) ffc0a0e8: 80 09 00 34 lwz r0,52(r9) ffc0a0ec: 4b ff ff 98 b ffc0a084 =============================================================================== ffc0a0f0 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { ffc0a0f0: 94 21 ff d8 stwu r1,-40(r1) ffc0a0f4: 7c 08 02 a6 mflr r0 ffc0a0f8: 93 a1 00 1c stw r29,28(r1) Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) ffc0a0fc: 7c 7d 1b 79 mr. r29,r3 int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { ffc0a100: 90 01 00 2c stw r0,44(r1) ffc0a104: 93 c1 00 20 stw r30,32(r1) ffc0a108: 93 e1 00 24 stw r31,36(r1) Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) ffc0a10c: 41 82 00 9c beq- ffc0a1a8 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); ffc0a110: 7c 83 23 78 mr r3,r4 ffc0a114: 38 81 00 0c addi r4,r1,12 ffc0a118: 48 00 7e d9 bl ffc11ff0 <_POSIX_Absolute_timeout_to_ticks> ffc0a11c: 80 9d 00 00 lwz r4,0(r29) ffc0a120: 7c 7e 1b 78 mr r30,r3 ffc0a124: 3c 60 00 00 lis r3,0 ffc0a128: 38 63 2e 38 addi r3,r3,11832 ffc0a12c: 38 a1 00 08 addi r5,r1,8 ffc0a130: 48 00 36 75 bl ffc0d7a4 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { ffc0a134: 80 01 00 08 lwz r0,8(r1) ffc0a138: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a13c: 40 9e 00 6c bne- cr7,ffc0a1a8 (pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime)); int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedwrlock, ffc0a140: 6b df 00 03 xori r31,r30,3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( ffc0a144: 80 9d 00 00 lwz r4,0(r29) ffc0a148: 7f ff 00 34 cntlzw r31,r31 ffc0a14c: 80 c1 00 0c lwz r6,12(r1) ffc0a150: 57 ff d9 7e rlwinm r31,r31,27,5,31 ffc0a154: 38 63 00 10 addi r3,r3,16 ffc0a158: 7f e5 fb 78 mr r5,r31 ffc0a15c: 38 e0 00 00 li r7,0 ffc0a160: 48 00 27 0d bl ffc0c86c <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); ffc0a164: 48 00 42 0d bl ffc0e370 <_Thread_Enable_dispatch> if ( !do_wait && ffc0a168: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0a16c: 40 9e 00 74 bne- cr7,ffc0a1e0 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { ffc0a170: 3d 20 00 00 lis r9,0 ffc0a174: 81 29 27 fc lwz r9,10236(r9) ffc0a178: 80 09 00 34 lwz r0,52(r9) ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && ffc0a17c: 2f 80 00 02 cmpwi cr7,r0,2 ffc0a180: 41 9e 00 48 beq- cr7,ffc0a1c8 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( ffc0a184: 7c 03 03 78 mr r3,r0 ffc0a188: 48 00 00 69 bl ffc0a1f0 <_POSIX_RWLock_Translate_core_RWLock_return_code> case OBJECTS_ERROR: break; } return EINVAL; } ffc0a18c: 80 01 00 2c lwz r0,44(r1) ffc0a190: 83 a1 00 1c lwz r29,28(r1) ffc0a194: 7c 08 03 a6 mtlr r0 ffc0a198: 83 c1 00 20 lwz r30,32(r1) ffc0a19c: 83 e1 00 24 lwz r31,36(r1) ffc0a1a0: 38 21 00 28 addi r1,r1,40 ffc0a1a4: 4e 80 00 20 blr case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( ffc0a1a8: 38 60 00 16 li r3,22 case OBJECTS_ERROR: break; } return EINVAL; } ffc0a1ac: 80 01 00 2c lwz r0,44(r1) ffc0a1b0: 83 a1 00 1c lwz r29,28(r1) ffc0a1b4: 7c 08 03 a6 mtlr r0 ffc0a1b8: 83 c1 00 20 lwz r30,32(r1) ffc0a1bc: 83 e1 00 24 lwz r31,36(r1) ffc0a1c0: 38 21 00 28 addi r1,r1,40 ffc0a1c4: 4e 80 00 20 blr ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { ffc0a1c8: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0a1cc: 41 be ff dc beq- cr7,ffc0a1a8 <== NEVER TAKEN ffc0a1d0: 2b 9e 00 02 cmplwi cr7,r30,2 ffc0a1d4: 38 60 00 74 li r3,116 ffc0a1d8: 40 bd ff d4 ble- cr7,ffc0a1ac <== ALWAYS TAKEN ffc0a1dc: 4b ff ff a8 b ffc0a184 <== NOT EXECUTED ffc0a1e0: 3d 20 00 00 lis r9,0 ffc0a1e4: 81 29 27 fc lwz r9,10236(r9) ffc0a1e8: 80 09 00 34 lwz r0,52(r9) ffc0a1ec: 4b ff ff 98 b ffc0a184 =============================================================================== ffc0abec : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { if ( !attr ) ffc0abec: 2c 03 00 00 cmpwi r3,0 ffc0abf0: 41 82 00 18 beq- ffc0ac08 return EINVAL; if ( !attr->is_initialized ) ffc0abf4: 80 03 00 00 lwz r0,0(r3) ffc0abf8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0abfc: 41 9e 00 0c beq- cr7,ffc0ac08 return EINVAL; switch ( pshared ) { ffc0ac00: 2b 84 00 01 cmplwi cr7,r4,1 ffc0ac04: 40 9d 00 0c ble- cr7,ffc0ac10 <== ALWAYS TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; ffc0ac08: 38 60 00 16 li r3,22 default: return EINVAL; } } ffc0ac0c: 4e 80 00 20 blr return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; ffc0ac10: 90 83 00 04 stw r4,4(r3) ffc0ac14: 38 60 00 00 li r3,0 return 0; ffc0ac18: 4e 80 00 20 blr =============================================================================== ffc0c36c : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { ffc0c36c: 94 21 ff d0 stwu r1,-48(r1) ffc0c370: 7c 08 02 a6 mflr r0 ffc0c374: 93 e1 00 2c stw r31,44(r1) int rc; /* * Check all the parameters */ if ( !param ) ffc0c378: 7c bf 2b 79 mr. r31,r5 int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { ffc0c37c: 93 81 00 20 stw r28,32(r1) int rc; /* * Check all the parameters */ if ( !param ) ffc0c380: 3b 80 00 16 li r28,22 int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { ffc0c384: 93 a1 00 24 stw r29,36(r1) ffc0c388: 7c 7d 1b 78 mr r29,r3 ffc0c38c: 93 c1 00 28 stw r30,40(r1) ffc0c390: 7c 9e 23 78 mr r30,r4 ffc0c394: 90 01 00 34 stw r0,52(r1) ffc0c398: 93 61 00 1c stw r27,28(r1) int rc; /* * Check all the parameters */ if ( !param ) ffc0c39c: 41 82 00 20 beq- ffc0c3bc return EINVAL; rc = _POSIX_Thread_Translate_sched_param( ffc0c3a0: 7c 83 23 78 mr r3,r4 ffc0c3a4: 38 a1 00 08 addi r5,r1,8 ffc0c3a8: 7f e4 fb 78 mr r4,r31 ffc0c3ac: 38 c1 00 0c addi r6,r1,12 ffc0c3b0: 48 00 73 21 bl ffc136d0 <_POSIX_Thread_Translate_sched_param> policy, param, &budget_algorithm, &budget_callout ); if ( rc ) ffc0c3b4: 7c 7c 1b 79 mr. r28,r3 ffc0c3b8: 41 82 00 2c beq- ffc0c3e4 case OBJECTS_ERROR: break; } return ESRCH; } ffc0c3bc: 80 01 00 34 lwz r0,52(r1) ffc0c3c0: 7f 83 e3 78 mr r3,r28 ffc0c3c4: 83 61 00 1c lwz r27,28(r1) ffc0c3c8: 7c 08 03 a6 mtlr r0 ffc0c3cc: 83 81 00 20 lwz r28,32(r1) ffc0c3d0: 83 a1 00 24 lwz r29,36(r1) ffc0c3d4: 83 c1 00 28 lwz r30,40(r1) ffc0c3d8: 83 e1 00 2c lwz r31,44(r1) ffc0c3dc: 38 21 00 30 addi r1,r1,48 ffc0c3e0: 4e 80 00 20 blr ffc0c3e4: 3c 60 00 00 lis r3,0 ffc0c3e8: 38 63 2e d8 addi r3,r3,11992 ffc0c3ec: 7f a4 eb 78 mr r4,r29 ffc0c3f0: 38 a1 00 10 addi r5,r1,16 ffc0c3f4: 48 00 29 4d bl ffc0ed40 <_Objects_Get> /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { ffc0c3f8: 80 01 00 10 lwz r0,16(r1) ffc0c3fc: 7c 7b 1b 78 mr r27,r3 ffc0c400: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c404: 40 9e 00 c8 bne- cr7,ffc0c4cc case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0c408: 83 a3 01 48 lwz r29,328(r3) if ( api->schedpolicy == SCHED_SPORADIC ) ffc0c40c: 80 1d 00 80 lwz r0,128(r29) ffc0c410: 2f 80 00 04 cmpwi cr7,r0,4 ffc0c414: 41 9e 01 0c beq- cr7,ffc0c520 (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; ffc0c418: 93 dd 00 80 stw r30,128(r29) api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { ffc0c41c: 2f 9e 00 00 cmpwi cr7,r30,0 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; ffc0c420: 81 5f 00 04 lwz r10,4(r31) ffc0c424: 81 7f 00 08 lwz r11,8(r31) ffc0c428: 81 3f 00 0c lwz r9,12(r31) ffc0c42c: 80 1f 00 00 lwz r0,0(r31) ffc0c430: 91 5d 00 88 stw r10,136(r29) ffc0c434: 91 7d 00 8c stw r11,140(r29) ffc0c438: 91 3d 00 90 stw r9,144(r29) ffc0c43c: 90 1d 00 84 stw r0,132(r29) ffc0c440: 81 3f 00 18 lwz r9,24(r31) ffc0c444: 81 5f 00 10 lwz r10,16(r31) ffc0c448: 81 7f 00 14 lwz r11,20(r31) ffc0c44c: 91 3d 00 9c stw r9,156(r29) the_thread->budget_algorithm = budget_algorithm; ffc0c450: 81 21 00 08 lwz r9,8(r1) if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; ffc0c454: 91 5d 00 94 stw r10,148(r29) the_thread->budget_algorithm = budget_algorithm; ffc0c458: 91 3b 00 7c stw r9,124(r27) the_thread->budget_callout = budget_callout; ffc0c45c: 81 21 00 0c lwz r9,12(r1) if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; ffc0c460: 91 7d 00 98 stw r11,152(r29) the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; ffc0c464: 91 3b 00 80 stw r9,128(r27) switch ( api->schedpolicy ) { ffc0c468: 41 9c 00 38 blt- cr7,ffc0c4a0 <== NEVER TAKEN ffc0c46c: 2f 9e 00 02 cmpwi cr7,r30,2 ffc0c470: 41 9d 00 88 bgt- cr7,ffc0c4f8 ffc0c474: 3d 20 00 00 lis r9,0 ffc0c478: 88 89 27 0c lbz r4,9996(r9) case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0c47c: 3d 60 00 00 lis r11,0 ffc0c480: 81 3d 00 84 lwz r9,132(r29) the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( ffc0c484: 7f 63 db 78 mr r3,r27 switch ( api->schedpolicy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0c488: 80 0b 28 08 lwz r0,10248(r11) the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( ffc0c48c: 38 a0 00 01 li r5,1 ffc0c490: 7c 89 20 50 subf r4,r9,r4 switch ( api->schedpolicy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0c494: 90 1b 00 78 stw r0,120(r27) the_thread->real_priority = ffc0c498: 90 9b 00 18 stw r4,24(r27) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( ffc0c49c: 48 00 2d 65 bl ffc0f200 <_Thread_Change_priority> _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); ffc0c4a0: 48 00 34 6d bl ffc0f90c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } ffc0c4a4: 80 01 00 34 lwz r0,52(r1) ffc0c4a8: 7f 83 e3 78 mr r3,r28 ffc0c4ac: 83 61 00 1c lwz r27,28(r1) ffc0c4b0: 7c 08 03 a6 mtlr r0 ffc0c4b4: 83 81 00 20 lwz r28,32(r1) ffc0c4b8: 83 a1 00 24 lwz r29,36(r1) ffc0c4bc: 83 c1 00 28 lwz r30,40(r1) ffc0c4c0: 83 e1 00 2c lwz r31,44(r1) ffc0c4c4: 38 21 00 30 addi r1,r1,48 ffc0c4c8: 4e 80 00 20 blr ffc0c4cc: 80 01 00 34 lwz r0,52(r1) /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { ffc0c4d0: 3b 80 00 03 li r28,3 case OBJECTS_ERROR: break; } return ESRCH; } ffc0c4d4: 7f 83 e3 78 mr r3,r28 ffc0c4d8: 83 61 00 1c lwz r27,28(r1) ffc0c4dc: 7c 08 03 a6 mtlr r0 ffc0c4e0: 83 81 00 20 lwz r28,32(r1) ffc0c4e4: 83 a1 00 24 lwz r29,36(r1) ffc0c4e8: 83 c1 00 28 lwz r30,40(r1) ffc0c4ec: 83 e1 00 2c lwz r31,44(r1) ffc0c4f0: 38 21 00 30 addi r1,r1,48 ffc0c4f4: 4e 80 00 20 blr api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { ffc0c4f8: 2f 9e 00 04 cmpwi cr7,r30,4 ffc0c4fc: 40 9e ff a4 bne+ cr7,ffc0c4a0 <== NEVER TAKEN true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; ffc0c500: 90 1d 00 a0 stw r0,160(r29) _Watchdog_Remove( &api->Sporadic_timer ); ffc0c504: 38 7d 00 a4 addi r3,r29,164 ffc0c508: 48 00 4f 41 bl ffc11448 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); ffc0c50c: 7f 64 db 78 mr r4,r27 ffc0c510: 38 60 00 00 li r3,0 ffc0c514: 4b ff fd 81 bl ffc0c294 <_POSIX_Threads_Sporadic_budget_TSR> break; } _Thread_Enable_dispatch(); ffc0c518: 48 00 33 f5 bl ffc0f90c <_Thread_Enable_dispatch> ffc0c51c: 4b ff ff 88 b ffc0c4a4 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); ffc0c520: 38 7d 00 a4 addi r3,r29,164 ffc0c524: 48 00 4f 25 bl ffc11448 <_Watchdog_Remove> ffc0c528: 4b ff fe f0 b ffc0c418 =============================================================================== ffc08e2c : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { ffc08e2c: 94 21 ff f0 stwu r1,-16(r1) ffc08e30: 7c 08 02 a6 mflr r0 * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) ffc08e34: 3d 20 00 00 lis r9,0 * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { ffc08e38: 90 01 00 14 stw r0,20(r1) * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) ffc08e3c: 80 09 27 bc lwz r0,10172(r9) * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { ffc08e40: 93 e1 00 0c stw r31,12(r1) * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) ffc08e44: 2f 80 00 00 cmpwi cr7,r0,0 ffc08e48: 40 9e 00 48 bne- cr7,ffc08e90 <== NEVER TAKEN ffc08e4c: 3d 20 00 00 lis r9,0 ffc08e50: 81 49 27 94 lwz r10,10132(r9) return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; ffc08e54: 3f e0 00 00 lis r31,0 ffc08e58: 81 7f 27 d4 lwz r11,10196(r31) ffc08e5c: 38 0a 00 01 addi r0,r10,1 ffc08e60: 90 09 27 94 stw r0,10132(r9) ffc08e64: 81 2b 01 48 lwz r9,328(r11) _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && ffc08e68: 80 09 00 d4 lwz r0,212(r9) ffc08e6c: 2f 80 00 00 cmpwi cr7,r0,0 ffc08e70: 40 9e 00 34 bne- cr7,ffc08ea4 <== NEVER TAKEN thread_support->cancelation_requested ) ffc08e74: 80 09 00 dc lwz r0,220(r9) ffc08e78: 2f 80 00 00 cmpwi cr7,r0,0 ffc08e7c: 41 9e 00 28 beq- cr7,ffc08ea4 cancel = true; _Thread_Enable_dispatch(); ffc08e80: 48 00 32 3d bl ffc0c0bc <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); ffc08e84: 80 7f 27 d4 lwz r3,10196(r31) ffc08e88: 38 80 ff ff li r4,-1 ffc08e8c: 48 00 71 8d bl ffc10018 <_POSIX_Thread_Exit> } ffc08e90: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc08e94: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc08e98: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc08e9c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc08ea0: 4e 80 00 20 blr <== NOT EXECUTED _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); ffc08ea4: 48 00 32 19 bl ffc0c0bc <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); } ffc08ea8: 80 01 00 14 lwz r0,20(r1) ffc08eac: 83 e1 00 0c lwz r31,12(r1) ffc08eb0: 38 21 00 10 addi r1,r1,16 ffc08eb4: 7c 08 03 a6 mtlr r0 ffc08eb8: 4e 80 00 20 blr =============================================================================== ffc0511c : * putk * * Kernel putk (e.g. puts) function requiring minimal infrastrure. */ void putk(const char *s) { ffc0511c: 94 21 ff e8 stwu r1,-24(r1) ffc05120: 7c 08 02 a6 mflr r0 ffc05124: 93 a1 00 0c stw r29,12(r1) ffc05128: 3f a0 00 00 lis r29,0 ffc0512c: 93 e1 00 14 stw r31,20(r1) ffc05130: 7c 7f 1b 78 mr r31,r3 ffc05134: 90 01 00 1c stw r0,28(r1) ffc05138: 93 c1 00 10 stw r30,16(r1) const char *p = s; for (p=s ; *p ; p++ ) ffc0513c: 88 63 00 00 lbz r3,0(r3) ffc05140: 2f 83 00 00 cmpwi cr7,r3,0 ffc05144: 41 9e 00 20 beq- cr7,ffc05164 <== NEVER TAKEN ffc05148: 3b dd 26 9c addi r30,r29,9884 BSP_output_char(*p); ffc0514c: 80 1e 00 00 lwz r0,0(r30) ffc05150: 7c 09 03 a6 mtctr r0 ffc05154: 4e 80 04 21 bctrl */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) ffc05158: 8c 7f 00 01 lbzu r3,1(r31) ffc0515c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05160: 40 9e ff ec bne+ cr7,ffc0514c BSP_output_char(*p); BSP_output_char('\n'); ffc05164: 80 1d 26 9c lwz r0,9884(r29) ffc05168: 38 60 00 0a li r3,10 ffc0516c: 7c 09 03 a6 mtctr r0 ffc05170: 4e 80 04 21 bctrl } ffc05174: 80 01 00 1c lwz r0,28(r1) ffc05178: 83 a1 00 0c lwz r29,12(r1) ffc0517c: 7c 08 03 a6 mtlr r0 ffc05180: 83 c1 00 10 lwz r30,16(r1) ffc05184: 83 e1 00 14 lwz r31,20(r1) ffc05188: 38 21 00 18 addi r1,r1,24 ffc0518c: 4e 80 00 20 blr =============================================================================== ffc1e0dc : ssize_t read( int fd, void *buffer, size_t count ) { ffc1e0dc: 94 21 ff f0 stwu r1,-16(r1) ffc1e0e0: 7c 08 02 a6 mflr r0 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc1e0e4: 3d 20 00 00 lis r9,0 ssize_t read( int fd, void *buffer, size_t count ) { ffc1e0e8: 90 01 00 14 stw r0,20(r1) ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc1e0ec: 80 09 26 8c lwz r0,9868(r9) ssize_t read( int fd, void *buffer, size_t count ) { ffc1e0f0: 93 e1 00 0c stw r31,12(r1) ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc1e0f4: 7f 83 00 40 cmplw cr7,r3,r0 ffc1e0f8: 40 9c 00 94 bge- cr7,ffc1e18c <== NEVER TAKEN iop = rtems_libio_iop( fd ); ffc1e0fc: 3d 60 00 00 lis r11,0 ffc1e100: 83 eb 27 4c lwz r31,10060(r11) ffc1e104: 1c 63 00 48 mulli r3,r3,72 ffc1e108: 7f ff 1a 14 add r31,r31,r3 rtems_libio_check_is_open( iop ); ffc1e10c: 81 7f 00 18 lwz r11,24(r31) ffc1e110: 71 6a 01 00 andi. r10,r11,256 ffc1e114: 41 82 00 78 beq- ffc1e18c rtems_libio_check_buffer( buffer ); ffc1e118: 2f 84 00 00 cmpwi cr7,r4,0 ffc1e11c: 41 9e 00 84 beq- cr7,ffc1e1a0 <== NEVER TAKEN rtems_libio_check_count( count ); ffc1e120: 2f 85 00 00 cmpwi cr7,r5,0 ffc1e124: 38 60 00 00 li r3,0 ffc1e128: 41 9e 00 50 beq- cr7,ffc1e178 <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); ffc1e12c: 71 60 00 02 andi. r0,r11,2 ffc1e130: 41 82 00 70 beq- ffc1e1a0 <== NEVER TAKEN /* * Now process the read(). */ if ( !iop->handlers->read_h ) ffc1e134: 81 3f 00 40 lwz r9,64(r31) ffc1e138: 80 09 00 08 lwz r0,8(r9) ffc1e13c: 2f 80 00 00 cmpwi cr7,r0,0 ffc1e140: 41 9e 00 74 beq- cr7,ffc1e1b4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); ffc1e144: 7f e3 fb 78 mr r3,r31 ffc1e148: 7c 09 03 a6 mtctr r0 ffc1e14c: 4e 80 04 21 bctrl if ( rc > 0 ) ffc1e150: 2c 03 00 00 cmpwi r3,0 ffc1e154: 40 81 00 24 ble- ffc1e178 iop->offset += rc; ffc1e158: 80 ff 00 10 lwz r7,16(r31) ffc1e15c: 7c 6a 1b 78 mr r10,r3 ffc1e160: 81 1f 00 14 lwz r8,20(r31) ffc1e164: 7c 69 fe 70 srawi r9,r3,31 ffc1e168: 7d 88 50 14 addc r12,r8,r10 ffc1e16c: 7d 67 49 14 adde r11,r7,r9 ffc1e170: 91 7f 00 10 stw r11,16(r31) ffc1e174: 91 9f 00 14 stw r12,20(r31) return rc; } ffc1e178: 80 01 00 14 lwz r0,20(r1) ffc1e17c: 83 e1 00 0c lwz r31,12(r1) ffc1e180: 38 21 00 10 addi r1,r1,16 ffc1e184: 7c 08 03 a6 mtlr r0 ffc1e188: 4e 80 00 20 blr ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); ffc1e18c: 4b ff 50 e9 bl ffc13274 <__errno> ffc1e190: 38 00 00 09 li r0,9 ffc1e194: 90 03 00 00 stw r0,0(r3) ffc1e198: 38 60 ff ff li r3,-1 ffc1e19c: 4b ff ff dc b ffc1e178 rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); ffc1e1a0: 4b ff 50 d5 bl ffc13274 <__errno> <== NOT EXECUTED ffc1e1a4: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc1e1a8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc1e1ac: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc1e1b0: 4b ff ff c8 b ffc1e178 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc1e1b4: 4b ff 50 c1 bl ffc13274 <__errno> <== NOT EXECUTED ffc1e1b8: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc1e1bc: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc1e1c0: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc1e1c4: 4b ff ff b4 b ffc1e178 <== NOT EXECUTED =============================================================================== ffc08eec : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { ffc08eec: 94 21 ff c8 stwu r1,-56(r1) ffc08ef0: 7c 08 02 a6 mflr r0 ffc08ef4: 93 a1 00 2c stw r29,44(r1) rtems_filesystem_location_info_t loc; int result; if (!buf) ffc08ef8: 7c 9d 23 79 mr. r29,r4 ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { ffc08efc: 93 81 00 28 stw r28,40(r1) ffc08f00: 7c 7c 1b 78 mr r28,r3 ffc08f04: 93 c1 00 30 stw r30,48(r1) ffc08f08: 7c be 2b 78 mr r30,r5 ffc08f0c: 90 01 00 3c stw r0,60(r1) ffc08f10: 93 e1 00 34 stw r31,52(r1) rtems_filesystem_location_info_t loc; int result; if (!buf) ffc08f14: 41 82 00 c4 beq- ffc08fd8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), ffc08f18: 48 01 1f 39 bl ffc1ae50 ffc08f1c: 3b e1 00 08 addi r31,r1,8 ffc08f20: 7c 64 1b 78 mr r4,r3 ffc08f24: 38 a0 00 00 li r5,0 ffc08f28: 7f 83 e3 78 mr r3,r28 ffc08f2c: 7f e6 fb 78 mr r6,r31 ffc08f30: 38 e0 00 00 li r7,0 ffc08f34: 4b ff e8 69 bl ffc0779c 0, &loc, false ); if ( result != 0 ) ffc08f38: 3b 80 ff ff li r28,-1 ffc08f3c: 2f 83 00 00 cmpwi cr7,r3,0 ffc08f40: 40 9e 00 74 bne- cr7,ffc08fb4 <== NEVER TAKEN return -1; if ( !loc.ops->node_type_h ){ ffc08f44: 81 21 00 14 lwz r9,20(r1) ffc08f48: 80 09 00 10 lwz r0,16(r9) ffc08f4c: 2f 80 00 00 cmpwi cr7,r0,0 ffc08f50: 41 9e 00 f4 beq- cr7,ffc09044 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ ffc08f54: 7f e3 fb 78 mr r3,r31 ffc08f58: 7c 09 03 a6 mtctr r0 ffc08f5c: 4e 80 04 21 bctrl ffc08f60: 2f 83 00 04 cmpwi cr7,r3,4 ffc08f64: 40 9e 00 a8 bne- cr7,ffc0900c rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ ffc08f68: 81 21 00 14 lwz r9,20(r1) ffc08f6c: 80 09 00 3c lwz r0,60(r9) ffc08f70: 2f 80 00 00 cmpwi cr7,r0,0 ffc08f74: 41 9e 00 d0 beq- cr7,ffc09044 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); ffc08f78: 7f a4 eb 78 mr r4,r29 ffc08f7c: 7c 09 03 a6 mtctr r0 ffc08f80: 7f c5 f3 78 mr r5,r30 ffc08f84: 7f e3 fb 78 mr r3,r31 ffc08f88: 4e 80 04 21 bctrl rtems_filesystem_freenode( &loc ); ffc08f8c: 81 21 00 14 lwz r9,20(r1) if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); ffc08f90: 7c 7c 1b 78 mr r28,r3 rtems_filesystem_freenode( &loc ); ffc08f94: 2f 89 00 00 cmpwi cr7,r9,0 ffc08f98: 41 9e 00 1c beq- cr7,ffc08fb4 <== NEVER TAKEN ffc08f9c: 80 09 00 1c lwz r0,28(r9) ffc08fa0: 2f 80 00 00 cmpwi cr7,r0,0 ffc08fa4: 41 9e 00 10 beq- cr7,ffc08fb4 <== NEVER TAKEN ffc08fa8: 7f e3 fb 78 mr r3,r31 ffc08fac: 7c 09 03 a6 mtctr r0 ffc08fb0: 4e 80 04 21 bctrl return result; } ffc08fb4: 80 01 00 3c lwz r0,60(r1) ffc08fb8: 7f 83 e3 78 mr r3,r28 ffc08fbc: 83 a1 00 2c lwz r29,44(r1) ffc08fc0: 7c 08 03 a6 mtlr r0 ffc08fc4: 83 81 00 28 lwz r28,40(r1) ffc08fc8: 83 c1 00 30 lwz r30,48(r1) ffc08fcc: 83 e1 00 34 lwz r31,52(r1) ffc08fd0: 38 21 00 38 addi r1,r1,56 ffc08fd4: 4e 80 00 20 blr { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); ffc08fd8: 48 00 ff 11 bl ffc18ee8 <__errno> <== NOT EXECUTED ffc08fdc: 38 00 00 0e li r0,14 <== NOT EXECUTED ffc08fe0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc08fe4: 3b 80 ff ff li r28,-1 <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } ffc08fe8: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc08fec: 80 01 00 3c lwz r0,60(r1) <== NOT EXECUTED ffc08ff0: 83 81 00 28 lwz r28,40(r1) <== NOT EXECUTED ffc08ff4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc08ff8: 83 a1 00 2c lwz r29,44(r1) <== NOT EXECUTED ffc08ffc: 83 c1 00 30 lwz r30,48(r1) <== NOT EXECUTED ffc09000: 83 e1 00 34 lwz r31,52(r1) <== NOT EXECUTED ffc09004: 38 21 00 38 addi r1,r1,56 <== NOT EXECUTED ffc09008: 4e 80 00 20 blr <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ rtems_filesystem_freenode( &loc ); ffc0900c: 81 21 00 14 lwz r9,20(r1) ffc09010: 2f 89 00 00 cmpwi cr7,r9,0 ffc09014: 41 9e 00 1c beq- cr7,ffc09030 <== NEVER TAKEN ffc09018: 80 09 00 1c lwz r0,28(r9) ffc0901c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09020: 41 9e 00 10 beq- cr7,ffc09030 <== NEVER TAKEN ffc09024: 7f e3 fb 78 mr r3,r31 ffc09028: 7c 09 03 a6 mtctr r0 ffc0902c: 4e 80 04 21 bctrl rtems_set_errno_and_return_minus_one( EINVAL ); ffc09030: 48 00 fe b9 bl ffc18ee8 <__errno> ffc09034: 38 00 00 16 li r0,22 ffc09038: 90 03 00 00 stw r0,0(r3) ffc0903c: 3b 80 ff ff li r28,-1 ffc09040: 4b ff ff 74 b ffc08fb4 } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); ffc09044: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc09048: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0904c: 41 9e 00 10 beq- cr7,ffc0905c <== NOT EXECUTED ffc09050: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc09054: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc09058: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc0905c: 48 00 fe 8d bl ffc18ee8 <__errno> <== NOT EXECUTED ffc09060: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc09064: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc09068: 3b 80 ff ff li r28,-1 <== NOT EXECUTED ffc0906c: 4b ff ff 48 b ffc08fb4 <== NOT EXECUTED =============================================================================== ffc06ddc : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { ffc06ddc: 94 21 ff d8 stwu r1,-40(r1) ffc06de0: 7c 08 02 a6 mflr r0 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); ffc06de4: 3d 20 00 00 lis r9,0 ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { ffc06de8: 90 01 00 2c stw r0,44(r1) int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); ffc06dec: 80 09 26 8c lwz r0,9868(r9) ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { ffc06df0: 93 81 00 18 stw r28,24(r1) ffc06df4: 7c bc 2b 78 mr r28,r5 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); ffc06df8: 7f 83 00 40 cmplw cr7,r3,r0 ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { ffc06dfc: 93 21 00 0c stw r25,12(r1) ffc06e00: 93 41 00 10 stw r26,16(r1) ffc06e04: 93 61 00 14 stw r27,20(r1) ffc06e08: 93 a1 00 1c stw r29,28(r1) ffc06e0c: 93 c1 00 20 stw r30,32(r1) ffc06e10: 93 e1 00 24 stw r31,36(r1) int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); ffc06e14: 40 9c 01 7c bge- cr7,ffc06f90 <== NEVER TAKEN iop = rtems_libio_iop( fd ); ffc06e18: 3d 20 00 00 lis r9,0 ffc06e1c: 83 c9 27 50 lwz r30,10064(r9) ffc06e20: 1c 63 00 48 mulli r3,r3,72 ffc06e24: 7f de 1a 14 add r30,r30,r3 rtems_libio_check_is_open( iop ); ffc06e28: 80 1e 00 18 lwz r0,24(r30) ffc06e2c: 70 09 01 00 andi. r9,r0,256 ffc06e30: 41 82 01 60 beq- ffc06f90 <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); ffc06e34: 70 09 00 02 andi. r9,r0,2 ffc06e38: 41 82 01 18 beq- ffc06f50 <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) ffc06e3c: 2f 84 00 00 cmpwi cr7,r4,0 ffc06e40: 41 9e 01 10 beq- cr7,ffc06f50 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) ffc06e44: 2f 85 00 00 cmpwi cr7,r5,0 ffc06e48: 40 9d 01 08 ble- cr7,ffc06f50 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) ffc06e4c: 2f 85 04 00 cmpwi cr7,r5,1024 ffc06e50: 41 9d 01 00 bgt- cr7,ffc06f50 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) ffc06e54: 81 3e 00 40 lwz r9,64(r30) ffc06e58: 80 09 00 08 lwz r0,8(r9) ffc06e5c: 2f 80 00 00 cmpwi cr7,r0,0 ffc06e60: 41 9e 01 44 beq- cr7,ffc06fa4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc06e64: 7c a9 03 a6 mtctr r5 ffc06e68: 7c 9f 23 78 mr r31,r4 ffc06e6c: 7c 89 23 78 mr r9,r4 ffc06e70: 38 e0 00 01 li r7,1 ffc06e74: 39 60 00 00 li r11,0 all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) ffc06e78: 81 49 00 00 lwz r10,0(r9) ffc06e7c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc06e80: 41 9e 00 d0 beq- cr7,ffc06f50 if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; ffc06e84: 81 09 00 04 lwz r8,4(r9) * 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++ ) { ffc06e88: 39 29 00 08 addi r9,r9,8 if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; ffc06e8c: 7d 4b 42 14 add r10,r11,r8 if ( total < old ) ffc06e90: 7f 8a 58 00 cmpw cr7,r10,r11 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) ffc06e94: 31 08 ff ff addic r8,r8,-1 ffc06e98: 7d 08 41 10 subfe r8,r8,r8 ffc06e9c: 7c e7 40 38 and r7,r7,r8 * 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++ ) { ffc06ea0: 7d 4b 53 78 mr r11,r10 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) ffc06ea4: 41 9c 00 ac blt- cr7,ffc06f50 * 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++ ) { ffc06ea8: 42 00 ff d0 bdnz+ ffc06e78 /* * 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 ) { ffc06eac: 2f 87 00 00 cmpwi cr7,r7,0 ffc06eb0: 3b a0 00 00 li r29,0 ffc06eb4: 3b 60 00 00 li r27,0 ffc06eb8: 40 9e 00 a8 bne- cr7,ffc06f60 /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); ffc06ebc: 80 9f 00 00 lwz r4,0(r31) ffc06ec0: 7f c3 f3 78 mr r3,r30 ffc06ec4: 80 bf 00 04 lwz r5,4(r31) ffc06ec8: 7c 09 03 a6 mtctr r0 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc06ecc: 3b bd 00 01 addi r29,r29,1 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); ffc06ed0: 4e 80 04 21 bctrl } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc06ed4: 7f 9c e8 00 cmpw cr7,r28,r29 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) ffc06ed8: 2c 03 00 00 cmpwi r3,0 ffc06edc: 41 80 00 6c blt- ffc06f48 <== NEVER TAKEN return -1; if ( bytes > 0 ) { ffc06ee0: 41 82 00 28 beq- ffc06f08 <== NEVER TAKEN iop->offset += bytes; ffc06ee4: 81 7e 00 10 lwz r11,16(r30) ffc06ee8: 7c 7a 1b 78 mr r26,r3 ffc06eec: 81 9e 00 14 lwz r12,20(r30) ffc06ef0: 7c 79 fe 70 srawi r25,r3,31 total += bytes; ffc06ef4: 7f 7b 1a 14 add r27,r27,r3 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; ffc06ef8: 7d 4c d0 14 addc r10,r12,r26 ffc06efc: 7d 2b c9 14 adde r9,r11,r25 ffc06f00: 91 3e 00 10 stw r9,16(r30) ffc06f04: 91 5e 00 14 stw r10,20(r30) total += bytes; } if (bytes != iov[ v ].iov_len) ffc06f08: 80 1f 00 04 lwz r0,4(r31) } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc06f0c: 3b ff 00 08 addi r31,r31,8 if ( bytes > 0 ) { iop->offset += bytes; total += bytes; } if (bytes != iov[ v ].iov_len) ffc06f10: 7f 03 00 00 cmpw cr6,r3,r0 ffc06f14: 40 9a 00 4c bne- cr6,ffc06f60 <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc06f18: 40 9d 00 48 ble- cr7,ffc06f60 ffc06f1c: 81 3e 00 40 lwz r9,64(r30) bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); ffc06f20: 7f c3 f3 78 mr r3,r30 ffc06f24: 80 9f 00 00 lwz r4,0(r31) } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc06f28: 3b bd 00 01 addi r29,r29,1 ffc06f2c: 80 09 00 08 lwz r0,8(r9) bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); ffc06f30: 80 bf 00 04 lwz r5,4(r31) ffc06f34: 7c 09 03 a6 mtctr r0 ffc06f38: 4e 80 04 21 bctrl } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc06f3c: 7f 9c e8 00 cmpw cr7,r28,r29 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) ffc06f40: 2c 03 00 00 cmpwi r3,0 ffc06f44: 40 80 ff 9c bge+ ffc06ee0 <== ALWAYS TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc06f48: 3b 60 ff ff li r27,-1 <== NOT EXECUTED ffc06f4c: 48 00 00 14 b ffc06f60 <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc06f50: 48 00 f3 3d bl ffc1628c <__errno> ffc06f54: 38 00 00 16 li r0,22 ffc06f58: 90 03 00 00 stw r0,0(r3) ffc06f5c: 3b 60 ff ff li r27,-1 if (bytes != iov[ v ].iov_len) break; } return total; } ffc06f60: 80 01 00 2c lwz r0,44(r1) ffc06f64: 7f 63 db 78 mr r3,r27 ffc06f68: 83 21 00 0c lwz r25,12(r1) ffc06f6c: 7c 08 03 a6 mtlr r0 ffc06f70: 83 41 00 10 lwz r26,16(r1) ffc06f74: 83 61 00 14 lwz r27,20(r1) ffc06f78: 83 81 00 18 lwz r28,24(r1) ffc06f7c: 83 a1 00 1c lwz r29,28(r1) ffc06f80: 83 c1 00 20 lwz r30,32(r1) ffc06f84: 83 e1 00 24 lwz r31,36(r1) ffc06f88: 38 21 00 28 addi r1,r1,40 ffc06f8c: 4e 80 00 20 blr rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); ffc06f90: 48 00 f2 fd bl ffc1628c <__errno> <== NOT EXECUTED ffc06f94: 38 00 00 09 li r0,9 <== NOT EXECUTED ffc06f98: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc06f9c: 3b 60 ff ff li r27,-1 <== NOT EXECUTED ffc06fa0: 4b ff ff c0 b ffc06f60 <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc06fa4: 48 00 f2 e9 bl ffc1628c <__errno> <== NOT EXECUTED ffc06fa8: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc06fac: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc06fb0: 3b 60 ff ff li r27,-1 <== NOT EXECUTED ffc06fb4: 4b ff ff ac b ffc06f60 <== NOT EXECUTED =============================================================================== ffc1e26c : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); ffc1e26c: 94 21 ff d8 stwu r1,-40(r1) ffc1e270: 7c 08 02 a6 mflr r0 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { ffc1e274: 3d 20 00 00 lis r9,0 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); ffc1e278: 90 01 00 2c stw r0,44(r1) /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { ffc1e27c: 80 09 27 d4 lwz r0,10196(r9) { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); ffc1e280: 93 c1 00 20 stw r30,32(r1) ffc1e284: 3f c0 00 00 lis r30,0 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { ffc1e288: 2f 80 00 03 cmpwi cr7,r0,3 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); ffc1e28c: 3b de 2b 00 addi r30,r30,11008 ffc1e290: 93 a1 00 1c stw r29,28(r1) ffc1e294: 7c 9d 23 78 mr r29,r4 ffc1e298: 81 3e 00 10 lwz r9,16(r30) ffc1e29c: 93 e1 00 24 stw r31,36(r1) ffc1e2a0: 7c 7f 1b 78 mr r31,r3 ffc1e2a4: 39 29 00 01 addi r9,r9,1 ffc1e2a8: 93 81 00 18 stw r28,24(r1) ffc1e2ac: 91 3e 00 10 stw r9,16(r30) /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { ffc1e2b0: 41 9e 00 a0 beq- cr7,ffc1e350 <== ALWAYS TAKEN } /* * Continue with realloc(). */ if ( !ptr ) ffc1e2b4: 2f 9f 00 00 cmpwi cr7,r31,0 ffc1e2b8: 41 9e 00 88 beq- cr7,ffc1e340 return malloc( size ); if ( !size ) { ffc1e2bc: 2f 9d 00 00 cmpwi cr7,r29,0 ffc1e2c0: 41 9e 00 5c beq- cr7,ffc1e31c <== NEVER TAKEN free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { ffc1e2c4: 3f 80 00 00 lis r28,0 ffc1e2c8: 80 7c 26 9c lwz r3,9884(r28) ffc1e2cc: 7f e4 fb 78 mr r4,r31 ffc1e2d0: 38 a1 00 08 addi r5,r1,8 ffc1e2d4: 48 00 01 e5 bl ffc1e4b8 <_Protected_heap_Get_block_size> ffc1e2d8: 2f 83 00 00 cmpwi cr7,r3,0 ffc1e2dc: 41 9e 00 50 beq- cr7,ffc1e32c #if defined(RTEMS_MALLOC_BOUNDARY_HELPERS) if (rtems_malloc_boundary_helpers) resize += (*rtems_malloc_boundary_helpers->overhead)(); #endif if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, resize ) ) { ffc1e2e0: 80 7c 26 9c lwz r3,9884(r28) ffc1e2e4: 7f e4 fb 78 mr r4,r31 ffc1e2e8: 7f a5 eb 78 mr r5,r29 ffc1e2ec: 48 00 02 31 bl ffc1e51c <_Protected_heap_Resize_block> ffc1e2f0: 2f 83 00 00 cmpwi cr7,r3,0 ffc1e2f4: 41 9e 00 8c beq- cr7,ffc1e380 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } ffc1e2f8: 80 01 00 2c lwz r0,44(r1) ffc1e2fc: 7f e3 fb 78 mr r3,r31 ffc1e300: 83 81 00 18 lwz r28,24(r1) ffc1e304: 7c 08 03 a6 mtlr r0 ffc1e308: 83 a1 00 1c lwz r29,28(r1) ffc1e30c: 83 c1 00 20 lwz r30,32(r1) ffc1e310: 83 e1 00 24 lwz r31,36(r1) ffc1e314: 38 21 00 28 addi r1,r1,40 ffc1e318: 4e 80 00 20 blr */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); ffc1e31c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc1e320: 4b fe 62 d5 bl ffc045f4 <== NOT EXECUTED ffc1e324: 3b e0 00 00 li r31,0 <== NOT EXECUTED return (void *) 0; ffc1e328: 4b ff ff d0 b ffc1e2f8 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; ffc1e32c: 4b ff 4f 49 bl ffc13274 <__errno> ffc1e330: 38 00 00 16 li r0,22 ffc1e334: 90 03 00 00 stw r0,0(r3) ffc1e338: 3b e0 00 00 li r31,0 return (void *) 0; ffc1e33c: 4b ff ff bc b ffc1e2f8 /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); ffc1e340: 7f a3 eb 78 mr r3,r29 ffc1e344: 4b fe 66 31 bl ffc04974 ffc1e348: 7c 7f 1b 78 mr r31,r3 ffc1e34c: 4b ff ff ac b ffc1e2f8 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) ffc1e350: 3d 20 00 00 lis r9,0 ffc1e354: 80 09 27 70 lwz r0,10096(r9) ffc1e358: 2f 80 00 00 cmpwi cr7,r0,0 ffc1e35c: 41 9e 00 0c beq- cr7,ffc1e368 <== ALWAYS TAKEN } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; ffc1e360: 3b e0 00 00 li r31,0 ffc1e364: 4b ff ff 94 b ffc1e2f8 if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) ffc1e368: 3d 20 00 00 lis r9,0 ffc1e36c: 80 09 27 98 lwz r0,10136(r9) ffc1e370: 2f 80 00 00 cmpwi cr7,r0,0 ffc1e374: 41 9e ff 40 beq+ cr7,ffc1e2b4 <== ALWAYS TAKEN } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; ffc1e378: 3b e0 00 00 li r31,0 <== NOT EXECUTED ffc1e37c: 4b ff ff 7c b ffc1e2f8 <== NOT EXECUTED * 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 ); ffc1e380: 7f a3 eb 78 mr r3,r29 ffc1e384: 4b fe 65 f1 bl ffc04974 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ ffc1e388: 81 3e 00 04 lwz r9,4(r30) if ( !new_area ) { ffc1e38c: 7c 7c 1b 79 mr. r28,r3 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ ffc1e390: 38 09 ff ff addi r0,r9,-1 ffc1e394: 90 1e 00 04 stw r0,4(r30) if ( !new_area ) { ffc1e398: 41 a2 ff c8 beq- ffc1e360 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); ffc1e39c: 80 01 00 08 lwz r0,8(r1) ffc1e3a0: 7f a5 eb 78 mr r5,r29 ffc1e3a4: 7f 9d 00 40 cmplw cr7,r29,r0 ffc1e3a8: 40 9d 00 08 ble- cr7,ffc1e3b0 <== NEVER TAKEN ffc1e3ac: 7c 05 03 78 mr r5,r0 ffc1e3b0: 7f e4 fb 78 mr r4,r31 ffc1e3b4: 7f 83 e3 78 mr r3,r28 ffc1e3b8: 4b ff 5a a5 bl ffc13e5c free( ptr ); ffc1e3bc: 7f e3 fb 78 mr r3,r31 ffc1e3c0: 4b fe 62 35 bl ffc045f4 ffc1e3c4: 7f 9f e3 78 mr r31,r28 return new_area; ffc1e3c8: 4b ff ff 30 b ffc1e2f8 =============================================================================== ffc0a48c : #include int rmdir( const char *pathname ) { ffc0a48c: 94 21 ff b8 stwu r1,-72(r1) ffc0a490: 7c 08 02 a6 mflr r0 ffc0a494: 93 c1 00 40 stw r30,64(r1) ffc0a498: 93 e1 00 44 stw r31,68(r1) ffc0a49c: 7c 7f 1b 78 mr r31,r3 ffc0a4a0: 90 01 00 4c stw r0,76(r1) ffc0a4a4: 93 81 00 38 stw r28,56(r1) ffc0a4a8: 93 a1 00 3c stw r29,60(r1) /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); ffc0a4ac: 4b ff df a1 bl ffc0844c if ( parentpathlen == 0 ) ffc0a4b0: 7c 7e 1b 79 mr. r30,r3 ffc0a4b4: 40 82 02 c0 bne- ffc0a774 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); ffc0a4b8: 88 1f 00 00 lbz r0,0(r31) ffc0a4bc: 2f 80 00 2f cmpwi cr7,r0,47 ffc0a4c0: 41 9e 00 14 beq- cr7,ffc0a4d4 <== ALWAYS TAKEN ffc0a4c4: 2f 80 00 5c cmpwi cr7,r0,92 <== NOT EXECUTED ffc0a4c8: 41 9e 00 0c beq- cr7,ffc0a4d4 <== NOT EXECUTED ffc0a4cc: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0a4d0: 40 9e 01 68 bne- cr7,ffc0a638 <== NOT EXECUTED ffc0a4d4: 3d 20 00 00 lis r9,0 ffc0a4d8: 81 29 27 3c lwz r9,10044(r9) ffc0a4dc: 3b a0 00 00 li r29,0 ffc0a4e0: 80 09 00 24 lwz r0,36(r9) ffc0a4e4: 81 09 00 18 lwz r8,24(r9) ffc0a4e8: 81 49 00 1c lwz r10,28(r9) ffc0a4ec: 81 69 00 20 lwz r11,32(r9) ffc0a4f0: 91 01 00 08 stw r8,8(r1) ffc0a4f4: 91 41 00 0c stw r10,12(r1) ffc0a4f8: 91 61 00 10 stw r11,16(r1) ffc0a4fc: 90 01 00 14 stw r0,20(r1) ffc0a500: 80 09 00 28 lwz r0,40(r9) ffc0a504: 90 01 00 18 stw r0,24(r1) /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc0a508: 80 01 00 08 lwz r0,8(r1) name = pathname + parentpathlen; ffc0a50c: 7f df f2 14 add r30,r31,r30 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc0a510: 7f c3 f3 78 mr r3,r30 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc0a514: 90 01 00 1c stw r0,28(r1) name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc0a518: 3b e1 00 1c addi r31,r1,28 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc0a51c: 80 01 00 0c lwz r0,12(r1) ffc0a520: 90 01 00 20 stw r0,32(r1) ffc0a524: 80 01 00 10 lwz r0,16(r1) ffc0a528: 90 01 00 24 stw r0,36(r1) ffc0a52c: 80 01 00 14 lwz r0,20(r1) ffc0a530: 90 01 00 28 stw r0,40(r1) ffc0a534: 80 01 00 18 lwz r0,24(r1) ffc0a538: 90 01 00 2c stw r0,44(r1) name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc0a53c: 48 01 33 85 bl ffc1d8c0 ffc0a540: 7c 64 1b 78 mr r4,r3 ffc0a544: 7f c3 f3 78 mr r3,r30 ffc0a548: 4b ff de b5 bl ffc083fc ffc0a54c: 7f de 1a 14 add r30,r30,r3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc0a550: 7f c3 f3 78 mr r3,r30 ffc0a554: 48 01 33 6d bl ffc1d8c0 ffc0a558: 38 a0 00 00 li r5,0 ffc0a55c: 7c 64 1b 78 mr r4,r3 ffc0a560: 7f e6 fb 78 mr r6,r31 ffc0a564: 7f c3 f3 78 mr r3,r30 ffc0a568: 38 e0 00 00 li r7,0 ffc0a56c: 4b ff df 6d bl ffc084d8 0, &loc, false ); if ( result != 0 ) { ffc0a570: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a574: 40 9e 01 60 bne- cr7,ffc0a6d4 /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ ffc0a578: 81 21 00 28 lwz r9,40(r1) ffc0a57c: 80 09 00 10 lwz r0,16(r9) ffc0a580: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a584: 41 9e 01 98 beq- cr7,ffc0a71c <== NEVER TAKEN if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ ffc0a588: 7f e3 fb 78 mr r3,r31 ffc0a58c: 7c 09 03 a6 mtctr r0 ffc0a590: 4e 80 04 21 bctrl ffc0a594: 2f 83 00 01 cmpwi cr7,r3,1 ffc0a598: 40 9e 00 d8 bne- cr7,ffc0a670 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ ffc0a59c: 81 21 00 24 lwz r9,36(r1) ffc0a5a0: 80 09 00 34 lwz r0,52(r9) ffc0a5a4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a5a8: 41 9e 01 68 beq- cr7,ffc0a710 <== NEVER TAKEN if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); ffc0a5ac: 3b c1 00 08 addi r30,r1,8 ffc0a5b0: 7c 09 03 a6 mtctr r0 ffc0a5b4: 7f c3 f3 78 mr r3,r30 ffc0a5b8: 7f e4 fb 78 mr r4,r31 ffc0a5bc: 4e 80 04 21 bctrl rtems_filesystem_freenode( &loc ); ffc0a5c0: 81 21 00 28 lwz r9,40(r1) if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); ffc0a5c4: 7c 7c 1b 78 mr r28,r3 rtems_filesystem_freenode( &loc ); ffc0a5c8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a5cc: 41 9e 00 1c beq- cr7,ffc0a5e8 <== NEVER TAKEN ffc0a5d0: 80 09 00 1c lwz r0,28(r9) ffc0a5d4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a5d8: 41 9e 00 10 beq- cr7,ffc0a5e8 <== NEVER TAKEN ffc0a5dc: 7f e3 fb 78 mr r3,r31 ffc0a5e0: 7c 09 03 a6 mtctr r0 ffc0a5e4: 4e 80 04 21 bctrl if ( free_parentloc ) ffc0a5e8: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0a5ec: 41 9e 00 28 beq- cr7,ffc0a614 rtems_filesystem_freenode( &parentloc ); ffc0a5f0: 81 21 00 14 lwz r9,20(r1) ffc0a5f4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a5f8: 41 9e 00 1c beq- cr7,ffc0a614 <== NEVER TAKEN ffc0a5fc: 80 09 00 1c lwz r0,28(r9) ffc0a600: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a604: 41 9e 00 10 beq- cr7,ffc0a614 <== NEVER TAKEN ffc0a608: 7f c3 f3 78 mr r3,r30 ffc0a60c: 7c 09 03 a6 mtctr r0 ffc0a610: 4e 80 04 21 bctrl return result; } ffc0a614: 80 01 00 4c lwz r0,76(r1) ffc0a618: 7f 83 e3 78 mr r3,r28 ffc0a61c: 83 a1 00 3c lwz r29,60(r1) ffc0a620: 7c 08 03 a6 mtlr r0 ffc0a624: 83 81 00 38 lwz r28,56(r1) ffc0a628: 83 c1 00 40 lwz r30,64(r1) ffc0a62c: 83 e1 00 44 lwz r31,68(r1) ffc0a630: 38 21 00 48 addi r1,r1,72 ffc0a634: 4e 80 00 20 blr */ parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); ffc0a638: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0a63c: 81 29 27 3c lwz r9,10044(r9) <== NOT EXECUTED ffc0a640: 3b a0 00 00 li r29,0 <== NOT EXECUTED ffc0a644: 80 09 00 10 lwz r0,16(r9) <== NOT EXECUTED ffc0a648: 81 09 00 04 lwz r8,4(r9) <== NOT EXECUTED ffc0a64c: 81 49 00 08 lwz r10,8(r9) <== NOT EXECUTED ffc0a650: 81 69 00 0c lwz r11,12(r9) <== NOT EXECUTED ffc0a654: 91 01 00 08 stw r8,8(r1) <== NOT EXECUTED ffc0a658: 91 41 00 0c stw r10,12(r1) <== NOT EXECUTED ffc0a65c: 91 61 00 10 stw r11,16(r1) <== NOT EXECUTED ffc0a660: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED ffc0a664: 80 09 00 14 lwz r0,20(r9) <== NOT EXECUTED ffc0a668: 90 01 00 18 stw r0,24(r1) <== NOT EXECUTED ffc0a66c: 4b ff fe 9c b ffc0a508 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ rtems_filesystem_freenode( &loc ); ffc0a670: 81 21 00 28 lwz r9,40(r1) ffc0a674: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a678: 41 9e 00 1c beq- cr7,ffc0a694 <== NEVER TAKEN ffc0a67c: 80 09 00 1c lwz r0,28(r9) ffc0a680: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a684: 41 9e 00 10 beq- cr7,ffc0a694 <== NEVER TAKEN ffc0a688: 7f e3 fb 78 mr r3,r31 ffc0a68c: 7c 09 03 a6 mtctr r0 ffc0a690: 4e 80 04 21 bctrl if ( free_parentloc ) ffc0a694: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0a698: 41 9e 00 28 beq- cr7,ffc0a6c0 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); ffc0a69c: 81 21 00 14 lwz r9,20(r1) ffc0a6a0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a6a4: 41 9e 00 1c beq- cr7,ffc0a6c0 <== NEVER TAKEN ffc0a6a8: 80 09 00 1c lwz r0,28(r9) ffc0a6ac: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a6b0: 41 9e 00 10 beq- cr7,ffc0a6c0 <== NEVER TAKEN ffc0a6b4: 38 61 00 08 addi r3,r1,8 ffc0a6b8: 7c 09 03 a6 mtctr r0 ffc0a6bc: 4e 80 04 21 bctrl rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc0a6c0: 48 00 f6 a9 bl ffc19d68 <__errno> ffc0a6c4: 38 00 00 14 li r0,20 ffc0a6c8: 90 03 00 00 stw r0,0(r3) ffc0a6cc: 3b 80 ff ff li r28,-1 ffc0a6d0: 4b ff ff 44 b ffc0a614 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 ) ffc0a6d4: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0a6d8: 40 9e 00 0c bne- cr7,ffc0a6e4 <== NEVER TAKEN result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); ffc0a6dc: 3b 80 ff ff li r28,-1 ffc0a6e0: 4b ff ff 34 b ffc0a614 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); ffc0a6e4: 81 21 00 14 lwz r9,20(r1) <== NOT EXECUTED ffc0a6e8: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc0a6ec: 41 9e ff f0 beq+ cr7,ffc0a6dc <== NOT EXECUTED ffc0a6f0: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc0a6f4: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0a6f8: 41 9e ff e4 beq+ cr7,ffc0a6dc <== NOT EXECUTED ffc0a6fc: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED ffc0a700: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0a704: 3b 80 ff ff li r28,-1 <== NOT EXECUTED ffc0a708: 4e 80 04 21 bctrl <== NOT EXECUTED ffc0a70c: 4b ff ff 08 b ffc0a614 <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); ffc0a710: 81 21 00 28 lwz r9,40(r1) <== NOT EXECUTED ffc0a714: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc0a718: 41 9e 00 1c beq- cr7,ffc0a734 <== NOT EXECUTED ffc0a71c: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc0a720: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0a724: 41 9e 00 10 beq- cr7,ffc0a734 <== NOT EXECUTED ffc0a728: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0a72c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0a730: 4e 80 04 21 bctrl <== NOT EXECUTED if ( free_parentloc ) ffc0a734: 2f 9d 00 00 cmpwi cr7,r29,0 <== NOT EXECUTED ffc0a738: 41 9e 00 28 beq- cr7,ffc0a760 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); ffc0a73c: 81 21 00 14 lwz r9,20(r1) <== NOT EXECUTED ffc0a740: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc0a744: 41 9e 00 1c beq- cr7,ffc0a760 <== NOT EXECUTED ffc0a748: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc0a74c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0a750: 41 9e 00 10 beq- cr7,ffc0a760 <== NOT EXECUTED ffc0a754: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED ffc0a758: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0a75c: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc0a760: 48 00 f6 09 bl ffc19d68 <__errno> <== NOT EXECUTED ffc0a764: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc0a768: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0a76c: 3b 80 ff ff li r28,-1 <== NOT EXECUTED ffc0a770: 4b ff fe a4 b ffc0a614 <== NOT EXECUTED parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, ffc0a774: 7f e3 fb 78 mr r3,r31 ffc0a778: 7f c4 f3 78 mr r4,r30 ffc0a77c: 38 a0 00 02 li r5,2 ffc0a780: 38 c1 00 08 addi r6,r1,8 ffc0a784: 38 e0 00 00 li r7,0 ffc0a788: 4b ff de 79 bl ffc08600 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) ffc0a78c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a790: 40 be ff 4c bne- cr7,ffc0a6dc <== NEVER TAKEN ffc0a794: 3b a0 00 01 li r29,1 ffc0a798: 4b ff fd 70 b ffc0a508 =============================================================================== ffc1150c : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { ffc1150c: 94 21 ff e0 stwu r1,-32(r1) ffc11510: 7c 08 02 a6 mflr r0 ffc11514: 93 61 00 0c stw r27,12(r1) ffc11518: 7c 7b 1b 78 mr r27,r3 ffc1151c: 93 81 00 10 stw r28,16(r1) ffc11520: 3b 80 00 00 li r28,0 ffc11524: 93 a1 00 14 stw r29,20(r1) ffc11528: 7c 9d 23 78 mr r29,r4 ffc1152c: 93 c1 00 18 stw r30,24(r1) ffc11530: 3b c0 00 00 li r30,0 ffc11534: 93 e1 00 1c stw r31,28(r1) ffc11538: 3b e0 00 01 li r31,1 ffc1153c: 90 01 00 24 stw r0,36(r1) ffc11540: 48 00 00 14 b ffc11554 uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { ffc11544: 2f 9e 00 1f cmpwi cr7,r30,31 ffc11548: 57 ff 08 3c rlwinm r31,r31,1,0,30 ffc1154c: 3b de 00 01 addi r30,r30,1 ffc11550: 41 9e 00 2c beq- cr7,ffc1157c if (b & remote_value) ffc11554: 7f e0 e8 39 and. r0,r31,r29 ffc11558: 41 82 ff ec beq+ ffc11544 local_value |= rtems_assoc_local_by_remote(ap, b); ffc1155c: 7f e4 fb 78 mr r4,r31 ffc11560: 7f 63 db 78 mr r3,r27 ffc11564: 48 00 00 41 bl ffc115a4 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { ffc11568: 2f 9e 00 1f cmpwi cr7,r30,31 if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); ffc1156c: 7f 9c 1b 78 or r28,r28,r3 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { ffc11570: 57 ff 08 3c rlwinm r31,r31,1,0,30 ffc11574: 3b de 00 01 addi r30,r30,1 ffc11578: 40 9e ff dc bne+ cr7,ffc11554 <== ALWAYS TAKEN if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; } ffc1157c: 80 01 00 24 lwz r0,36(r1) ffc11580: 7f 83 e3 78 mr r3,r28 ffc11584: 83 61 00 0c lwz r27,12(r1) ffc11588: 7c 08 03 a6 mtlr r0 ffc1158c: 83 81 00 10 lwz r28,16(r1) ffc11590: 83 a1 00 14 lwz r29,20(r1) ffc11594: 83 c1 00 18 lwz r30,24(r1) ffc11598: 83 e1 00 1c lwz r31,28(r1) ffc1159c: 38 21 00 20 addi r1,r1,32 ffc115a0: 4e 80 00 20 blr =============================================================================== ffc1af94 : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { ffc1af94: 3c 60 00 00 lis r3,0 <== NOT EXECUTED sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } ffc1af98: 38 63 22 50 addi r3,r3,8784 <== NOT EXECUTED ffc1af9c: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc1697c : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { ffc1697c: 94 21 ff f0 stwu r1,-16(r1) ffc16980: 7c 08 02 a6 mflr r0 ffc16984: 93 e1 00 0c stw r31,12(r1) ffc16988: 7c 9f 23 78 mr r31,r4 ffc1698c: 90 01 00 14 stw r0,20(r1) const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); ffc16990: 48 00 00 41 bl ffc169d0 if (nap) ffc16994: 2c 03 00 00 cmpwi r3,0 ffc16998: 41 82 00 1c beq- ffc169b4 <== NEVER TAKEN return nap->name; return rtems_assoc_name_bad(local_value); } ffc1699c: 80 01 00 14 lwz r0,20(r1) { const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; ffc169a0: 80 63 00 00 lwz r3,0(r3) return rtems_assoc_name_bad(local_value); } ffc169a4: 7c 08 03 a6 mtlr r0 ffc169a8: 83 e1 00 0c lwz r31,12(r1) ffc169ac: 38 21 00 10 addi r1,r1,16 ffc169b0: 4e 80 00 20 blr nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); ffc169b4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc169b8: 48 00 45 dd bl ffc1af94 <== NOT EXECUTED } ffc169bc: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc169c0: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc169c4: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc169c8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc169cc: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc1319c : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { ffc1319c: 94 21 ff f0 stwu r1,-16(r1) ffc131a0: 7c 08 02 a6 mflr r0 ffc131a4: 90 01 00 14 stw r0,20(r1) ffc131a8: 93 e1 00 0c stw r31,12(r1) ffc131ac: 7c 7f 1b 78 mr r31,r3 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc131b0: 80 63 00 00 lwz r3,0(r3) const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { ffc131b4: 93 c1 00 08 stw r30,8(r1) ffc131b8: 7c 9e 23 78 mr r30,r4 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc131bc: 2f 83 00 00 cmpwi cr7,r3,0 ffc131c0: 41 9e 00 94 beq- cr7,ffc13254 <== NEVER TAKEN ffc131c4: 3c 80 ff c2 lis r4,-62 ffc131c8: 38 84 fc 60 addi r4,r4,-928 ffc131cc: 48 00 12 85 bl ffc14450 ffc131d0: 39 20 00 00 li r9,0 ffc131d4: 2f 83 00 00 cmpwi cr7,r3,0 ffc131d8: 40 9e 00 34 bne- cr7,ffc1320c <== ALWAYS TAKEN default_ap = ap++; for ( ; ap->name; ap++) ffc131dc: 81 3f 00 0c lwz r9,12(r31) <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; ffc131e0: 38 1f 00 0c addi r0,r31,12 <== NOT EXECUTED for ( ; ap->name; ap++) ffc131e4: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc131e8: 41 9e 00 30 beq- cr7,ffc13218 <== NOT EXECUTED ffc131ec: 7f e9 fb 78 mr r9,r31 <== NOT EXECUTED ffc131f0: 7c 1f 03 78 mr r31,r0 <== NOT EXECUTED if (ap->local_value == local_value) ffc131f4: 80 1f 00 04 lwz r0,4(r31) <== NOT EXECUTED ffc131f8: 7f 80 f0 00 cmpw cr7,r0,r30 <== NOT EXECUTED ffc131fc: 41 9e 00 1c beq- cr7,ffc13218 <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc13200: 84 1f 00 0c lwzu r0,12(r31) ffc13204: 2f 80 00 00 cmpwi cr7,r0,0 ffc13208: 41 9e 00 2c beq- cr7,ffc13234 if (ap->local_value == local_value) ffc1320c: 80 1f 00 04 lwz r0,4(r31) ffc13210: 7f 80 f0 00 cmpw cr7,r0,r30 ffc13214: 40 9e ff ec bne+ cr7,ffc13200 return ap; return default_ap; } ffc13218: 80 01 00 14 lwz r0,20(r1) ffc1321c: 7f e3 fb 78 mr r3,r31 ffc13220: 83 c1 00 08 lwz r30,8(r1) ffc13224: 7c 08 03 a6 mtlr r0 ffc13228: 83 e1 00 0c lwz r31,12(r1) ffc1322c: 38 21 00 10 addi r1,r1,16 ffc13230: 4e 80 00 20 blr ffc13234: 80 01 00 14 lwz r0,20(r1) const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc13238: 7d 3f 4b 78 mr r31,r9 if (ap->local_value == local_value) return ap; return default_ap; } ffc1323c: 7f e3 fb 78 mr r3,r31 ffc13240: 83 c1 00 08 lwz r30,8(r1) ffc13244: 7c 08 03 a6 mtlr r0 ffc13248: 83 e1 00 0c lwz r31,12(r1) ffc1324c: 38 21 00 10 addi r1,r1,16 ffc13250: 4e 80 00 20 blr ffc13254: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc13258: 3b e0 00 00 li r31,0 <== NOT EXECUTED for ( ; ap->name; ap++) if (ap->local_value == local_value) return ap; return default_ap; } ffc1325c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc13260: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc13264: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc13268: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc1326c: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc13270: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc115d4 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { ffc115d4: 94 21 ff f0 stwu r1,-16(r1) ffc115d8: 7c 08 02 a6 mflr r0 ffc115dc: 90 01 00 14 stw r0,20(r1) ffc115e0: 93 e1 00 0c stw r31,12(r1) ffc115e4: 7c 7f 1b 78 mr r31,r3 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc115e8: 80 63 00 00 lwz r3,0(r3) const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { ffc115ec: 93 c1 00 08 stw r30,8(r1) ffc115f0: 7c 9e 23 78 mr r30,r4 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc115f4: 2f 83 00 00 cmpwi cr7,r3,0 ffc115f8: 41 9e 00 94 beq- cr7,ffc1168c <== NEVER TAKEN ffc115fc: 3c 80 ff c2 lis r4,-62 ffc11600: 38 84 fc 60 addi r4,r4,-928 ffc11604: 48 00 2e 4d bl ffc14450 ffc11608: 39 20 00 00 li r9,0 ffc1160c: 2f 83 00 00 cmpwi cr7,r3,0 ffc11610: 40 9e 00 34 bne- cr7,ffc11644 <== ALWAYS TAKEN default_ap = ap++; for ( ; ap->name; ap++) ffc11614: 81 3f 00 0c lwz r9,12(r31) <== NOT EXECUTED ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; ffc11618: 38 1f 00 0c addi r0,r31,12 <== NOT EXECUTED for ( ; ap->name; ap++) ffc1161c: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc11620: 41 9e 00 30 beq- cr7,ffc11650 <== NOT EXECUTED ffc11624: 7f e9 fb 78 mr r9,r31 <== NOT EXECUTED ffc11628: 7c 1f 03 78 mr r31,r0 <== NOT EXECUTED if (ap->remote_value == remote_value) ffc1162c: 80 1f 00 08 lwz r0,8(r31) <== NOT EXECUTED ffc11630: 7f 80 f0 00 cmpw cr7,r0,r30 <== NOT EXECUTED ffc11634: 41 9e 00 1c beq- cr7,ffc11650 <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc11638: 84 1f 00 0c lwzu r0,12(r31) ffc1163c: 2f 80 00 00 cmpwi cr7,r0,0 ffc11640: 41 9e 00 2c beq- cr7,ffc1166c if (ap->remote_value == remote_value) ffc11644: 80 1f 00 08 lwz r0,8(r31) ffc11648: 7f 80 f0 00 cmpw cr7,r0,r30 ffc1164c: 40 9e ff ec bne+ cr7,ffc11638 return ap; return default_ap; } ffc11650: 80 01 00 14 lwz r0,20(r1) ffc11654: 7f e3 fb 78 mr r3,r31 ffc11658: 83 c1 00 08 lwz r30,8(r1) ffc1165c: 7c 08 03 a6 mtlr r0 ffc11660: 83 e1 00 0c lwz r31,12(r1) ffc11664: 38 21 00 10 addi r1,r1,16 ffc11668: 4e 80 00 20 blr ffc1166c: 80 01 00 14 lwz r0,20(r1) const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc11670: 7d 3f 4b 78 mr r31,r9 if (ap->remote_value == remote_value) return ap; return default_ap; } ffc11674: 7f e3 fb 78 mr r3,r31 ffc11678: 83 c1 00 08 lwz r30,8(r1) ffc1167c: 7c 08 03 a6 mtlr r0 ffc11680: 83 e1 00 0c lwz r31,12(r1) ffc11684: 38 21 00 10 addi r1,r1,16 ffc11688: 4e 80 00 20 blr ffc1168c: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc11690: 3b e0 00 00 li r31,0 <== NOT EXECUTED for ( ; ap->name; ap++) if (ap->remote_value == remote_value) return ap; return default_ap; } ffc11694: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc11698: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc1169c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc116a0: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc116a4: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc116a8: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc127ac : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { ffc127ac: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED ffc127b0: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc127b4: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); ffc127b8: 48 00 09 e5 bl ffc1319c <== NOT EXECUTED if (nap) ffc127bc: 7c 69 1b 79 mr. r9,r3 <== NOT EXECUTED ffc127c0: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc127c4: 41 82 00 08 beq- ffc127cc <== NOT EXECUTED return nap->remote_value; ffc127c8: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED return 0; } ffc127cc: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc127d0: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc127d4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc127d8: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc11b94 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { ffc11b94: 94 21 ff d0 stwu r1,-48(r1) ffc11b98: 7c 08 02 a6 mflr r0 ffc11b9c: 93 e1 00 2c stw r31,44(r1) Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) ffc11ba0: 7c 7f 1b 79 mr. r31,r3 ffc11ba4: 38 60 00 03 li r3,3 rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { ffc11ba8: 93 a1 00 24 stw r29,36(r1) ffc11bac: 7c dd 33 78 mr r29,r6 ffc11bb0: 90 01 00 34 stw r0,52(r1) ffc11bb4: 93 81 00 20 stw r28,32(r1) ffc11bb8: 93 c1 00 28 stw r30,40(r1) Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) ffc11bbc: 41 82 00 90 beq- ffc11c4c return RTEMS_INVALID_NAME; if ( !id ) ffc11bc0: 2f 86 00 00 cmpwi cr7,r6,0 ffc11bc4: 38 60 00 09 li r3,9 ffc11bc8: 41 9e 00 84 beq- cr7,ffc11c4c return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { ffc11bcc: 70 80 00 10 andi. r0,r4,16 ffc11bd0: 41 82 00 9c beq- ffc11c6c the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) ffc11bd4: 2f 85 00 00 cmpwi cr7,r5,0 ffc11bd8: 38 60 00 0a li r3,10 ffc11bdc: 41 9e 00 70 beq- cr7,ffc11c4c ffc11be0: 3d 20 00 00 lis r9,0 return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; ffc11be4: 90 a1 00 0c stw r5,12(r1) if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; ffc11be8: 38 00 00 00 li r0,0 ffc11bec: 81 69 27 70 lwz r11,10096(r9) ffc11bf0: 90 01 00 08 stw r0,8(r1) ffc11bf4: 38 0b 00 01 addi r0,r11,1 ffc11bf8: 90 09 27 70 stw r0,10096(r9) * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); ffc11bfc: 3f 80 00 00 lis r28,0 ffc11c00: 90 81 00 18 stw r4,24(r1) ffc11c04: 3b 9c 35 4c addi r28,r28,13644 ffc11c08: 7f 83 e3 78 mr r3,r28 ffc11c0c: 4b ff 83 c9 bl ffc09fd4 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { ffc11c10: 80 81 00 18 lwz r4,24(r1) ffc11c14: 7c 7e 1b 79 mr. r30,r3 ffc11c18: 41 82 00 90 beq- ffc11ca8 <== NEVER TAKEN _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; ffc11c1c: 90 9e 00 10 stw r4,16(r30) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); ffc11c20: 38 7e 00 14 addi r3,r30,20 ffc11c24: 38 81 00 08 addi r4,r1,8 ffc11c28: 48 00 06 1d bl ffc12244 <_CORE_barrier_Initialize> ffc11c2c: 80 1e 00 08 lwz r0,8(r30) ffc11c30: 81 7c 00 1c lwz r11,28(r28) ffc11c34: 54 09 13 ba rlwinm r9,r0,2,14,29 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc11c38: 93 fe 00 0c stw r31,12(r30) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc11c3c: 7f cb 49 2e stwx r30,r11,r9 &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; ffc11c40: 90 1d 00 00 stw r0,0(r29) _Thread_Enable_dispatch(); ffc11c44: 4b ff 95 5d bl ffc0b1a0 <_Thread_Enable_dispatch> ffc11c48: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; } ffc11c4c: 80 01 00 34 lwz r0,52(r1) ffc11c50: 83 81 00 20 lwz r28,32(r1) ffc11c54: 7c 08 03 a6 mtlr r0 ffc11c58: 83 a1 00 24 lwz r29,36(r1) ffc11c5c: 83 c1 00 28 lwz r30,40(r1) ffc11c60: 83 e1 00 2c lwz r31,44(r1) ffc11c64: 38 21 00 30 addi r1,r1,48 ffc11c68: 4e 80 00 20 blr ffc11c6c: 3d 20 00 00 lis r9,0 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; ffc11c70: 90 a1 00 0c stw r5,12(r1) if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; ffc11c74: 38 00 00 01 li r0,1 ffc11c78: 81 69 27 70 lwz r11,10096(r9) ffc11c7c: 90 01 00 08 stw r0,8(r1) ffc11c80: 38 0b 00 01 addi r0,r11,1 ffc11c84: 90 09 27 70 stw r0,10096(r9) ffc11c88: 3f 80 00 00 lis r28,0 ffc11c8c: 90 81 00 18 stw r4,24(r1) ffc11c90: 3b 9c 35 4c addi r28,r28,13644 ffc11c94: 7f 83 e3 78 mr r3,r28 ffc11c98: 4b ff 83 3d bl ffc09fd4 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { ffc11c9c: 80 81 00 18 lwz r4,24(r1) ffc11ca0: 7c 7e 1b 79 mr. r30,r3 ffc11ca4: 40 82 ff 78 bne+ ffc11c1c _Thread_Enable_dispatch(); ffc11ca8: 4b ff 94 f9 bl ffc0b1a0 <_Thread_Enable_dispatch> *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } ffc11cac: 80 01 00 34 lwz r0,52(r1) _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); ffc11cb0: 38 60 00 05 li r3,5 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } ffc11cb4: 83 81 00 20 lwz r28,32(r1) ffc11cb8: 7c 08 03 a6 mtlr r0 ffc11cbc: 83 a1 00 24 lwz r29,36(r1) ffc11cc0: 83 c1 00 28 lwz r30,40(r1) ffc11cc4: 83 e1 00 2c lwz r31,44(r1) ffc11cc8: 38 21 00 30 addi r1,r1,48 ffc11ccc: 4e 80 00 20 blr =============================================================================== ffc04264 : size_t length ) { const char *p; if ( !name ) ffc04264: 2f 83 00 00 cmpwi cr7,r3,0 const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { ffc04268: 94 21 ff f0 stwu r1,-16(r1) ffc0426c: 7c 08 02 a6 mflr r0 ffc04270: 90 01 00 14 stw r0,20(r1) const char *p; if ( !name ) ffc04274: 40 9e 00 1c bne- cr7,ffc04290 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i return NULL; if ( !length ) ffc04298: 2f 85 00 00 cmpwi cr7,r5,0 ffc0429c: 41 9e ff dc beq+ cr7,ffc04278 return NULL; value[0] = '\0'; ffc042a0: 38 00 00 00 li r0,0 ffc042a4: 98 04 00 00 stb r0,0(r4) p = rtems_bsp_cmdline_get_param_raw( name ); ffc042a8: 90 81 00 08 stw r4,8(r1) ffc042ac: 90 a1 00 0c stw r5,12(r1) ffc042b0: 48 00 00 81 bl ffc04330 if ( !p ) ffc042b4: 2c 03 00 00 cmpwi r3,0 ffc042b8: 80 81 00 08 lwz r4,8(r1) ffc042bc: 80 a1 00 0c lwz r5,12(r1) ffc042c0: 41 a2 ff b8 beq- ffc04278 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i<== NEVER TAKEN ffc042d0: 34 a5 ff ff addic. r5,r5,-1 ffc042d4: 41 a2 ff a8 beq- ffc0427c <== NEVER TAKEN if ( *p == '\"' ) { quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) break; value[i++] = *p++; value[i] = '\0'; ffc042d8: 7c a9 03 a6 mtctr r5 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i quotes=0; for (i=0 ; *p && i ffc042f8: 41 be ff 84 beq- cr7,ffc0427c break; value[i++] = *p++; ffc042fc: 39 29 00 01 addi r9,r9,1 ffc04300: 7c 04 59 ae stbx r0,r4,r11 ffc04304: 7d 2b 4b 78 mr r11,r9 value[i] = '\0'; ffc04308: 7d 04 49 ae stbx r8,r4,r9 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i ffc04318: 42 40 ff 64 bdz+ ffc0427c if ( *p == '\"' ) { ffc0431c: 2f 80 00 22 cmpwi cr7,r0,34 quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) ffc04320: 71 47 00 01 andi. r7,r10,1 int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i quotes++; ffc04328: 39 4a 00 01 addi r10,r10,1 ffc0432c: 4b ff ff d0 b ffc042fc =============================================================================== ffc0437c : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { ffc0437c: 94 21 ff e8 stwu r1,-24(r1) ffc04380: 7c 08 02 a6 mflr r0 ffc04384: 93 a1 00 0c stw r29,12(r1) ffc04388: 93 c1 00 10 stw r30,16(r1) ffc0438c: 7c 7e 1b 78 mr r30,r3 ffc04390: 93 e1 00 14 stw r31,20(r1) ffc04394: 7c 9f 23 78 mr r31,r4 ffc04398: 90 01 00 1c stw r0,28(r1) const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); ffc0439c: 4b ff fe c9 bl ffc04264 if ( !p ) ffc043a0: 7c 7d 1b 79 mr. r29,r3 ffc043a4: 40 82 00 28 bne- ffc043cc if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; } ffc043a8: 80 01 00 1c lwz r0,28(r1) *d++ = *rhs++; if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; ffc043ac: 3b e0 00 00 li r31,0 } ffc043b0: 7f e3 fb 78 mr r3,r31 ffc043b4: 83 a1 00 0c lwz r29,12(r1) ffc043b8: 7c 08 03 a6 mtlr r0 ffc043bc: 83 c1 00 10 lwz r30,16(r1) ffc043c0: 83 e1 00 14 lwz r31,20(r1) ffc043c4: 38 21 00 18 addi r1,r1,24 ffc043c8: 4e 80 00 20 blr p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; ffc043cc: 7f c3 f3 78 mr r3,r30 ffc043d0: 48 01 02 95 bl ffc14664 if ( *rhs != '=' ) ffc043d4: 7c 1d 18 ae lbzx r0,r29,r3 p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; ffc043d8: 7f bd 1a 14 add r29,r29,r3 if ( *rhs != '=' ) ffc043dc: 2f 80 00 3d cmpwi cr7,r0,61 ffc043e0: 40 9e ff c8 bne+ cr7,ffc043a8 <== NEVER TAKEN return NULL; rhs++; if ( *rhs == '\"' ) ffc043e4: 88 1d 00 01 lbz r0,1(r29) rhs = &p[strlen(name)]; if ( *rhs != '=' ) return NULL; rhs++; ffc043e8: 3b bd 00 01 addi r29,r29,1 if ( *rhs == '\"' ) ffc043ec: 2f 80 00 22 cmpwi cr7,r0,34 ffc043f0: 41 9e 00 60 beq- cr7,ffc04450 rhs++; for ( d=value ; *rhs ; ) ffc043f4: 2f 80 00 00 cmpwi cr7,r0,0 ffc043f8: 7f e9 fb 78 mr r9,r31 ffc043fc: 41 9e 00 18 beq- cr7,ffc04414 *d++ = *rhs++; ffc04400: 98 09 00 00 stb r0,0(r9) ffc04404: 39 29 00 01 addi r9,r9,1 return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) ffc04408: 8c 1d 00 01 lbzu r0,1(r29) ffc0440c: 2f 80 00 00 cmpwi cr7,r0,0 ffc04410: 40 9e ff f0 bne+ cr7,ffc04400 *d++ = *rhs++; if ( *(d-1) == '\"' ) ffc04414: 88 09 ff ff lbz r0,-1(r9) ffc04418: 39 69 ff ff addi r11,r9,-1 ffc0441c: 2f 80 00 22 cmpwi cr7,r0,34 ffc04420: 41 9e 00 08 beq- cr7,ffc04428 ffc04424: 7d 2b 4b 78 mr r11,r9 d--; *d = '\0'; ffc04428: 38 00 00 00 li r0,0 ffc0442c: 98 0b 00 00 stb r0,0(r11) return value; } ffc04430: 7f e3 fb 78 mr r3,r31 ffc04434: 80 01 00 1c lwz r0,28(r1) ffc04438: 83 a1 00 0c lwz r29,12(r1) ffc0443c: 7c 08 03 a6 mtlr r0 ffc04440: 83 c1 00 10 lwz r30,16(r1) ffc04444: 83 e1 00 14 lwz r31,20(r1) ffc04448: 38 21 00 18 addi r1,r1,24 ffc0444c: 4e 80 00 20 blr if ( *rhs != '=' ) return NULL; rhs++; if ( *rhs == '\"' ) rhs++; ffc04450: 8c 1d 00 01 lbzu r0,1(r29) ffc04454: 4b ff ff a0 b ffc043f4 =============================================================================== ffc0505c : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc0505c: 94 21 ff 68 stwu r1,-152(r1) ffc05060: 7c 08 02 a6 mflr r0 ffc05064: 90 01 00 9c stw r0,156(r1) Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) ffc05068: 7c 80 23 79 mr. r0,r4 void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc0506c: 93 81 00 88 stw r28,136(r1) ffc05070: 7c 7c 1b 78 mr r28,r3 ffc05074: 91 c1 00 50 stw r14,80(r1) ffc05078: 91 e1 00 54 stw r15,84(r1) ffc0507c: 92 01 00 58 stw r16,88(r1) ffc05080: 92 21 00 5c stw r17,92(r1) ffc05084: 92 41 00 60 stw r18,96(r1) ffc05088: 92 61 00 64 stw r19,100(r1) ffc0508c: 92 81 00 68 stw r20,104(r1) ffc05090: 92 a1 00 6c stw r21,108(r1) ffc05094: 92 c1 00 70 stw r22,112(r1) ffc05098: 92 e1 00 74 stw r23,116(r1) ffc0509c: 93 01 00 78 stw r24,120(r1) ffc050a0: 93 21 00 7c stw r25,124(r1) ffc050a4: 93 41 00 80 stw r26,128(r1) ffc050a8: 93 61 00 84 stw r27,132(r1) ffc050ac: 93 a1 00 8c stw r29,140(r1) ffc050b0: 93 c1 00 90 stw r30,144(r1) ffc050b4: 93 e1 00 94 stw r31,148(r1) Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) ffc050b8: 90 01 00 48 stw r0,72(r1) ffc050bc: 41 82 01 d8 beq- ffc05294 <== 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__ _TOD_Get_uptime( &uptime ); ffc050c0: 3a 21 00 10 addi r17,r1,16 ffc050c4: 7e 23 8b 78 mr r3,r17 ffc050c8: 48 00 6a 0d bl ffc0bad4 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); ffc050cc: 3b 41 00 18 addi r26,r1,24 ffc050d0: 3c 60 00 00 lis r3,0 ffc050d4: 38 63 28 ac addi r3,r3,10412 ffc050d8: 7e 24 8b 78 mr r4,r17 ffc050dc: 7f 45 d3 78 mr r5,r26 ffc050e0: 48 00 98 b1 bl ffc0e990 <_Timespec_Subtract> } } } #endif (*print)( ffc050e4: 80 01 00 48 lwz r0,72(r1) ffc050e8: 3c 80 ff c2 lis r4,-62 ffc050ec: 38 84 50 04 addi r4,r4,20484 ffc050f0: 7c 09 03 a6 mtctr r0 ffc050f4: 7f 83 e3 78 mr r3,r28 ffc050f8: 3e 60 00 01 lis r19,1 ffc050fc: 3a 73 aa 44 addi r19,r19,-21948 /* * 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 ) { ffc05100: 3e a0 00 00 lis r21,0 /* * Print the information */ (*print)( context, ffc05104: 3e c0 10 62 lis r22,4194 } } } #endif (*print)( ffc05108: 4c c6 31 82 crclr 4*cr1+eq ffc0510c: 4e 80 04 21 bctrl if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( ffc05110: 3e e0 ff c2 lis r23,-62 /* * Print the information */ (*print)( context, ffc05114: 3f 00 ff c2 lis r24,-62 * 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( ffc05118: 3d e0 00 00 lis r15,0 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); ffc0511c: 3b a1 00 30 addi r29,r1,48 ffc05120: 3b 61 00 20 addi r27,r1,32 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); ffc05124: 3a 81 00 0c addi r20,r1,12 /* * 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 ) { ffc05128: 3a b5 28 7c addi r21,r21,10364 /* * Print the information */ (*print)( context, ffc0512c: 62 d6 4d d3 ori r22,r22,19923 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( ffc05130: 3a f7 51 78 addi r23,r23,20856 /* * Print the information */ (*print)( context, ffc05134: 3b 18 51 8c addi r24,r24,20876 * 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( ffc05138: 39 ef 28 84 addi r15,r15,10372 /*PAGE * * rtems_cpu_usage_report */ void rtems_cpu_usage_report_with_plugin( ffc0513c: 3a 13 00 10 addi r16,r19,16 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); ffc05140: 3b 21 00 08 addi r25,r1,8 * 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( ffc05144: 3a 41 00 28 addi r18,r1,40 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) ffc05148: 81 33 00 00 lwz r9,0(r19) ffc0514c: 2f 89 00 00 cmpwi cr7,r9,0 ffc05150: 41 9e 01 04 beq- cr7,ffc05254 continue; information = _Objects_Information_table[ api_index ][ 1 ]; ffc05154: 83 c9 00 04 lwz r30,4(r9) if ( information ) { ffc05158: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0515c: 41 9e 00 f8 beq- cr7,ffc05254 <== NEVER TAKEN for ( i=1 ; i <= information->maximum ; i++ ) { ffc05160: a1 7e 00 10 lhz r11,16(r30) ffc05164: 2f 8b 00 00 cmpwi cr7,r11,0 ffc05168: 41 9e 00 ec beq- cr7,ffc05254 ffc0516c: 3b e0 00 01 li r31,1 ffc05170: 48 00 00 58 b ffc051c8 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); ffc05174: 7f 63 db 78 mr r3,r27 ffc05178: 7f 44 d3 78 mr r4,r26 ffc0517c: 7f 25 cb 78 mr r5,r25 ffc05180: 7e 86 a3 78 mr r6,r20 ffc05184: 48 00 97 01 bl ffc0e884 <_Timespec_Divide> /* * Print the information */ (*print)( context, ffc05188: 80 c1 00 24 lwz r6,36(r1) ffc0518c: 80 01 00 48 lwz r0,72(r1) ffc05190: 7f 83 e3 78 mr r3,r28 ffc05194: 7c c6 b0 16 mulhwu r6,r6,r22 ffc05198: 80 a1 00 20 lwz r5,32(r1) ffc0519c: 80 e1 00 08 lwz r7,8(r1) ffc051a0: 7c 09 03 a6 mtctr r0 ffc051a4: 7f 04 c3 78 mr r4,r24 ffc051a8: 81 01 00 0c lwz r8,12(r1) ffc051ac: 54 c6 d1 be rlwinm r6,r6,26,6,31 ffc051b0: 4c c6 31 82 crclr 4*cr1+eq ffc051b4: 4e 80 04 21 bctrl ffc051b8: a1 7e 00 10 lhz r11,16(r30) api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { ffc051bc: 55 60 04 3e clrlwi r0,r11,16 ffc051c0: 7f 80 f8 40 cmplw cr7,r0,r31 ffc051c4: 41 9c 00 90 blt- cr7,ffc05254 the_thread = (Thread_Control *)information->local_table[ i ]; ffc051c8: 81 3e 00 1c lwz r9,28(r30) ffc051cc: 57 e0 10 3a rlwinm r0,r31,2,0,29 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); ffc051d0: 7f a5 eb 78 mr r5,r29 if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; ffc051d4: 7d c9 00 2e lwzx r14,r9,r0 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); ffc051d8: 38 80 00 0d li r4,13 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { ffc051dc: 3b ff 00 01 addi r31,r31,1 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) ffc051e0: 2f 8e 00 00 cmpwi cr7,r14,0 ffc051e4: 41 be ff d8 beq- cr7,ffc051bc <== NEVER TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); ffc051e8: 80 6e 00 08 lwz r3,8(r14) ffc051ec: 48 00 4d e1 bl ffc09fcc (*print)( ffc051f0: 80 01 00 48 lwz r0,72(r1) ffc051f4: 7f 83 e3 78 mr r3,r28 ffc051f8: 80 ae 00 08 lwz r5,8(r14) ffc051fc: 7c 09 03 a6 mtctr r0 ffc05200: 7e e4 bb 78 mr r4,r23 ffc05204: 7f a6 eb 78 mr r6,r29 ffc05208: 4c c6 31 82 crclr 4*cr1+eq ffc0520c: 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; ffc05210: 81 2e 00 84 lwz r9,132(r14) ffc05214: 81 4e 00 88 lwz r10,136(r14) ffc05218: 91 21 00 20 stw r9,32(r1) ffc0521c: 91 41 00 24 stw r10,36(r1) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { ffc05220: 81 35 00 00 lwz r9,0(r21) ffc05224: 80 0e 00 08 lwz r0,8(r14) ffc05228: 81 29 00 08 lwz r9,8(r9) ffc0522c: 7f 89 00 00 cmpw cr7,r9,r0 ffc05230: 40 9e ff 44 bne+ cr7,ffc05174 Timestamp_Control used; _Timestamp_Subtract( ffc05234: 7d e3 7b 78 mr r3,r15 ffc05238: 7e 24 8b 78 mr r4,r17 ffc0523c: 7e 45 93 78 mr r5,r18 ffc05240: 48 00 97 51 bl ffc0e990 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); ffc05244: 7f 63 db 78 mr r3,r27 ffc05248: 7e 44 93 78 mr r4,r18 ffc0524c: 48 00 95 dd bl ffc0e828 <_Timespec_Add_to> ffc05250: 4b ff ff 24 b ffc05174 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { ffc05254: 3a 73 00 04 addi r19,r19,4 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; ffc05258: 7f 93 80 00 cmpw cr7,r19,r16 ffc0525c: 40 9e fe ec bne+ cr7,ffc05148 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( ffc05260: 3c 00 10 62 lis r0,4194 ffc05264: 80 c1 00 1c lwz r6,28(r1) ffc05268: 60 00 4d d3 ori r0,r0,19923 ffc0526c: 80 a1 00 18 lwz r5,24(r1) ffc05270: 7c c6 00 16 mulhwu r6,r6,r0 ffc05274: 80 01 00 48 lwz r0,72(r1) ffc05278: 3c 80 ff c2 lis r4,-62 ffc0527c: 7c 09 03 a6 mtctr r0 ffc05280: 7f 83 e3 78 mr r3,r28 ffc05284: 38 84 51 a4 addi r4,r4,20900 ffc05288: 54 c6 d1 be rlwinm r6,r6,26,6,31 ffc0528c: 4c c6 31 82 crclr 4*cr1+eq ffc05290: 4e 80 04 21 bctrl "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } ffc05294: 80 01 00 9c lwz r0,156(r1) ffc05298: 81 c1 00 50 lwz r14,80(r1) ffc0529c: 7c 08 03 a6 mtlr r0 ffc052a0: 81 e1 00 54 lwz r15,84(r1) ffc052a4: 82 01 00 58 lwz r16,88(r1) ffc052a8: 82 21 00 5c lwz r17,92(r1) ffc052ac: 82 41 00 60 lwz r18,96(r1) ffc052b0: 82 61 00 64 lwz r19,100(r1) ffc052b4: 82 81 00 68 lwz r20,104(r1) ffc052b8: 82 a1 00 6c lwz r21,108(r1) ffc052bc: 82 c1 00 70 lwz r22,112(r1) ffc052c0: 82 e1 00 74 lwz r23,116(r1) ffc052c4: 83 01 00 78 lwz r24,120(r1) ffc052c8: 83 21 00 7c lwz r25,124(r1) ffc052cc: 83 41 00 80 lwz r26,128(r1) ffc052d0: 83 61 00 84 lwz r27,132(r1) ffc052d4: 83 81 00 88 lwz r28,136(r1) ffc052d8: 83 a1 00 8c lwz r29,140(r1) ffc052dc: 83 c1 00 90 lwz r30,144(r1) ffc052e0: 83 e1 00 94 lwz r31,148(r1) ffc052e4: 38 21 00 98 addi r1,r1,152 ffc052e8: 4e 80 00 20 blr =============================================================================== ffc12764 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { ffc12764: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc12768: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc1276c: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) ffc12770: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { ffc12774: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) ffc12778: 38 63 fc 88 addi r3,r3,-888 <== NOT EXECUTED { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { ffc1277c: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) ffc12780: 48 00 00 2d bl ffc127ac <== NOT EXECUTED ffc12784: 7c 7f 1b 79 mr. r31,r3 <== NOT EXECUTED ffc12788: 41 a2 00 0c beq+ ffc12794 <== NOT EXECUTED { errno = rc; ffc1278c: 48 00 0a e9 bl ffc13274 <__errno> <== NOT EXECUTED ffc12790: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED return -1; } return -1; } ffc12794: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc12798: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc1279c: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc127a0: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc127a4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc127a8: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0afb0 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { ffc0afb0: 94 21 ff 90 stwu r1,-112(r1) <== NOT EXECUTED ffc0afb4: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc0afb8: 90 a1 00 18 stw r5,24(r1) <== NOT EXECUTED ffc0afbc: 90 01 00 74 stw r0,116(r1) <== NOT EXECUTED ffc0afc0: 90 c1 00 1c stw r6,28(r1) <== NOT EXECUTED ffc0afc4: 90 e1 00 20 stw r7,32(r1) <== NOT EXECUTED ffc0afc8: 91 01 00 24 stw r8,36(r1) <== NOT EXECUTED ffc0afcc: 91 21 00 28 stw r9,40(r1) <== NOT EXECUTED ffc0afd0: 91 41 00 2c stw r10,44(r1) <== NOT EXECUTED ffc0afd4: 40 86 00 24 bne- cr1,ffc0aff8 <== NOT EXECUTED ffc0afd8: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc0afdc: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc0afe0: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc0afe4: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc0afe8: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc0afec: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc0aff0: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc0aff4: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); ffc0aff8: 38 00 00 02 li r0,2 <== NOT EXECUTED ffc0affc: 98 01 00 08 stb r0,8(r1) <== NOT EXECUTED ffc0b000: 38 00 00 00 li r0,0 <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); ffc0b004: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED ) { va_list arglist; int chars_written; va_start(arglist, printf_format); ffc0b008: 98 01 00 09 stb r0,9(r1) <== NOT EXECUTED ffc0b00c: 38 01 00 78 addi r0,r1,120 <== NOT EXECUTED ffc0b010: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc0b014: 38 01 00 10 addi r0,r1,16 <== NOT EXECUTED ffc0b018: 90 01 00 10 stw r0,16(r1) <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); ffc0b01c: 4b ff fd 01 bl ffc0ad1c <== NOT EXECUTED va_end(arglist); return chars_written; } ffc0b020: 80 01 00 74 lwz r0,116(r1) <== NOT EXECUTED ffc0b024: 38 21 00 70 addi r1,r1,112 <== NOT EXECUTED ffc0b028: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0b02c: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc04338 : } int rtems_filesystem_dirname( const char *pathname ) { ffc04338: 94 21 ff f0 stwu r1,-16(r1) ffc0433c: 7c 08 02 a6 mflr r0 ffc04340: 93 e1 00 0c stw r31,12(r1) ffc04344: 7c 7f 1b 78 mr r31,r3 ffc04348: 90 01 00 14 stw r0,20(r1) int len = strlen( pathname ); ffc0434c: 48 01 02 25 bl ffc14570 while ( len ) { ffc04350: 2f 83 00 00 cmpwi cr7,r3,0 int rtems_filesystem_dirname( const char *pathname ) { int len = strlen( pathname ); ffc04354: 7c 69 1b 78 mr r9,r3 while ( len ) { ffc04358: 41 9e 00 58 beq- cr7,ffc043b0 <== NEVER TAKEN len--; ffc0435c: 38 63 ff ff addi r3,r3,-1 if ( rtems_filesystem_is_separator( pathname[len] ) ) ffc04360: 7c 1f 18 ae lbzx r0,r31,r3 ffc04364: 2f 80 00 2f cmpwi cr7,r0,47 ffc04368: 41 9e 00 48 beq- cr7,ffc043b0 <== NEVER TAKEN ffc0436c: 2f 80 00 5c cmpwi cr7,r0,92 ffc04370: 41 9e 00 40 beq- cr7,ffc043b0 <== NEVER TAKEN ffc04374: 2f 80 00 00 cmpwi cr7,r0,0 ffc04378: 38 03 00 01 addi r0,r3,1 ffc0437c: 7f ff 4a 14 add r31,r31,r9 ffc04380: 7c 09 03 a6 mtctr r0 ffc04384: 41 9e 00 2c beq- cr7,ffc043b0 <== NEVER TAKEN const char *pathname ) { int len = strlen( pathname ); while ( len ) { ffc04388: 42 40 00 28 bdz- ffc043b0 len--; if ( rtems_filesystem_is_separator( pathname[len] ) ) ffc0438c: 88 1f ff fe lbz r0,-2(r31) ) { int len = strlen( pathname ); while ( len ) { len--; ffc04390: 38 63 ff ff addi r3,r3,-1 if ( rtems_filesystem_is_separator( pathname[len] ) ) ffc04394: 3b ff ff ff addi r31,r31,-1 ffc04398: 2f 80 00 2f cmpwi cr7,r0,47 ffc0439c: 2c 80 00 00 cmpwi cr1,r0,0 ffc043a0: 2f 00 00 5c cmpwi cr6,r0,92 ffc043a4: 41 9e 00 0c beq- cr7,ffc043b0 ffc043a8: 41 9a 00 08 beq- cr6,ffc043b0 <== NEVER TAKEN ffc043ac: 40 86 ff dc bne+ cr1,ffc04388 <== ALWAYS TAKEN break; } return len; } ffc043b0: 80 01 00 14 lwz r0,20(r1) ffc043b4: 83 e1 00 0c lwz r31,12(r1) ffc043b8: 38 21 00 10 addi r1,r1,16 ffc043bc: 7c 08 03 a6 mtlr r0 ffc043c0: 4e 80 00 20 blr =============================================================================== ffc044ec : /* * Verify Input parameters. */ if ( !pathname ) ffc044ec: 2c 03 00 00 cmpwi r3,0 int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { ffc044f0: 94 21 ff f8 stwu r1,-8(r1) ffc044f4: 7c 08 02 a6 mflr r0 ffc044f8: 90 01 00 0c stw r0,12(r1) /* * Verify Input parameters. */ if ( !pathname ) ffc044fc: 41 82 00 e8 beq- ffc045e4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) ffc04500: 2f 86 00 00 cmpwi cr7,r6,0 ffc04504: 41 9e 00 c0 beq- cr7,ffc045c4 <== NEVER TAKEN /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); ffc04508: 88 03 00 00 lbz r0,0(r3) ffc0450c: 2f 80 00 2f cmpwi cr7,r0,47 ffc04510: 41 9e 00 14 beq- cr7,ffc04524 ffc04514: 2f 80 00 5c cmpwi cr7,r0,92 ffc04518: 41 9e 00 0c beq- cr7,ffc04524 <== NEVER TAKEN ffc0451c: 2f 80 00 00 cmpwi cr7,r0,0 ffc04520: 40 9e 00 54 bne- cr7,ffc04574 <== ALWAYS TAKEN ffc04524: 3d 20 00 00 lis r9,0 ffc04528: 81 29 26 dc lwz r9,9948(r9) ffc0452c: 39 60 00 01 li r11,1 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], ffc04530: 7c 63 5a 14 add r3,r3,r11 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); ffc04534: 80 09 00 18 lwz r0,24(r9) ffc04538: 81 89 00 1c lwz r12,28(r9) ffc0453c: 81 09 00 20 lwz r8,32(r9) ffc04540: 81 49 00 24 lwz r10,36(r9) ffc04544: 90 06 00 00 stw r0,0(r6) ffc04548: 38 00 00 01 li r0,1 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], ffc0454c: 7c 80 20 50 subf r4,r0,r4 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); ffc04550: 91 86 00 04 stw r12,4(r6) return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } ffc04554: 80 01 00 0c lwz r0,12(r1) ffc04558: 38 21 00 08 addi r1,r1,8 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); ffc0455c: 91 06 00 08 stw r8,8(r6) return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } ffc04560: 7c 08 03 a6 mtlr r0 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); ffc04564: 91 46 00 0c stw r10,12(r6) ffc04568: 81 29 00 28 lwz r9,40(r9) ffc0456c: 91 26 00 10 stw r9,16(r6) /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], ffc04570: 4b ff fe 54 b ffc043c4 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); ffc04574: 3d 20 00 00 lis r9,0 ffc04578: 81 29 26 dc lwz r9,9948(r9) ffc0457c: 39 60 00 00 li r11,0 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], ffc04580: 7c 63 5a 14 add r3,r3,r11 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); ffc04584: 80 09 00 04 lwz r0,4(r9) ffc04588: 81 89 00 08 lwz r12,8(r9) ffc0458c: 81 09 00 0c lwz r8,12(r9) ffc04590: 81 49 00 10 lwz r10,16(r9) ffc04594: 90 06 00 00 stw r0,0(r6) ffc04598: 38 00 00 00 li r0,0 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], ffc0459c: 7c 80 20 50 subf r4,r0,r4 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); ffc045a0: 91 86 00 04 stw r12,4(r6) return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } ffc045a4: 80 01 00 0c lwz r0,12(r1) ffc045a8: 38 21 00 08 addi r1,r1,8 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); ffc045ac: 91 06 00 08 stw r8,8(r6) return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } ffc045b0: 7c 08 03 a6 mtlr r0 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); ffc045b4: 91 46 00 0c stw r10,12(r6) ffc045b8: 81 29 00 14 lwz r9,20(r9) ffc045bc: 91 26 00 10 stw r9,16(r6) /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], ffc045c0: 4b ff fe 04 b ffc043c4 if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ ffc045c4: 48 00 ec b1 bl ffc13274 <__errno> <== NOT EXECUTED ffc045c8: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc045cc: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } ffc045d0: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc045d4: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc045d8: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc045dc: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc045e0: 4e 80 00 20 blr <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); ffc045e4: 48 00 ec 91 bl ffc13274 <__errno> <== NOT EXECUTED ffc045e8: 38 00 00 0e li r0,14 <== NOT EXECUTED ffc045ec: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc045f0: 4b ff ff e0 b ffc045d0 <== NOT EXECUTED =============================================================================== ffc043c4 : /* * Verify Input parameters. */ if ( !pathname ) ffc043c4: 2f 83 00 00 cmpwi cr7,r3,0 int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { ffc043c8: 94 21 ff e8 stwu r1,-24(r1) ffc043cc: 7c 08 02 a6 mflr r0 ffc043d0: 93 a1 00 0c stw r29,12(r1) ffc043d4: 7c bd 2b 78 mr r29,r5 ffc043d8: 93 c1 00 10 stw r30,16(r1) ffc043dc: 7c fe 3b 78 mr r30,r7 ffc043e0: 93 e1 00 14 stw r31,20(r1) ffc043e4: 7c df 33 78 mr r31,r6 ffc043e8: 90 01 00 1c stw r0,28(r1) ffc043ec: 93 81 00 08 stw r28,8(r1) /* * Verify Input parameters. */ if ( !pathname ) ffc043f0: 41 9e 00 d4 beq- cr7,ffc044c4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) ffc043f4: 2f 86 00 00 cmpwi cr7,r6,0 ffc043f8: 41 9e 00 e0 beq- cr7,ffc044d8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) ffc043fc: 81 26 00 0c lwz r9,12(r6) ffc04400: 80 09 00 00 lwz r0,0(r9) ffc04404: 2f 80 00 00 cmpwi cr7,r0,0 ffc04408: 41 9e 00 a8 beq- cr7,ffc044b0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); ffc0440c: 7c 09 03 a6 mtctr r0 ffc04410: 4e 80 04 21 bctrl /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { ffc04414: 7c 7c 1b 79 mr. r28,r3 ffc04418: 40 82 00 34 bne- ffc0444c ffc0441c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc04420: 41 9e 00 2c beq- cr7,ffc0444c if ( !pathloc->ops->node_type_h ){ ffc04424: 81 3f 00 0c lwz r9,12(r31) ffc04428: 80 09 00 10 lwz r0,16(r9) ffc0442c: 2f 80 00 00 cmpwi cr7,r0,0 ffc04430: 41 9e 00 68 beq- cr7,ffc04498 <== NEVER TAKEN rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); ffc04434: 7f e3 fb 78 mr r3,r31 ffc04438: 7c 09 03 a6 mtctr r0 ffc0443c: 4e 80 04 21 bctrl if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ffc04440: 38 63 ff fd addi r3,r3,-3 ffc04444: 2b 83 00 01 cmplwi cr7,r3,1 ffc04448: 40 9d 00 28 ble- cr7,ffc04470 result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } ffc0444c: 80 01 00 1c lwz r0,28(r1) ffc04450: 7f 83 e3 78 mr r3,r28 ffc04454: 83 a1 00 0c lwz r29,12(r1) ffc04458: 7c 08 03 a6 mtlr r0 ffc0445c: 83 81 00 08 lwz r28,8(r1) ffc04460: 83 c1 00 10 lwz r30,16(r1) ffc04464: 83 e1 00 14 lwz r31,20(r1) ffc04468: 38 21 00 18 addi r1,r1,24 ffc0446c: 4e 80 00 20 blr type = (*pathloc->ops->node_type_h)( pathloc ); if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ ffc04470: 81 3f 00 0c lwz r9,12(r31) ffc04474: 80 09 00 34 lwz r0,52(r9) ffc04478: 2f 80 00 00 cmpwi cr7,r0,0 ffc0447c: 41 9e 00 1c beq- cr7,ffc04498 <== NEVER TAKEN * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); ffc04480: 7f e3 fb 78 mr r3,r31 ffc04484: 7c 09 03 a6 mtctr r0 ffc04488: 7f a4 eb 78 mr r4,r29 ffc0448c: 4e 80 04 21 bctrl ffc04490: 7c 7c 1b 78 mr r28,r3 ffc04494: 4b ff ff b8 b ffc0444c if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); ffc04498: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc0449c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc044a0: 41 9e 00 10 beq- cr7,ffc044b0 <== NOT EXECUTED ffc044a4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc044a8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc044ac: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc044b0: 48 00 ed c5 bl ffc13274 <__errno> <== NOT EXECUTED ffc044b4: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc044b8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc044bc: 3b 80 ff ff li r28,-1 <== NOT EXECUTED ffc044c0: 4b ff ff 8c b ffc0444c <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); ffc044c4: 48 00 ed b1 bl ffc13274 <__errno> <== NOT EXECUTED ffc044c8: 38 00 00 0e li r0,14 <== NOT EXECUTED ffc044cc: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc044d0: 3b 80 ff ff li r28,-1 <== NOT EXECUTED ffc044d4: 4b ff ff 78 b ffc0444c <== NOT EXECUTED if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ ffc044d8: 48 00 ed 9d bl ffc13274 <__errno> <== NOT EXECUTED ffc044dc: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc044e0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc044e4: 3b 80 ff ff li r28,-1 <== NOT EXECUTED ffc044e8: 4b ff ff 64 b ffc0444c <== NOT EXECUTED =============================================================================== ffc04160 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { ffc04160: 94 21 ff c8 stwu r1,-56(r1) ffc04164: 7c 08 02 a6 mflr r0 ffc04168: 93 e1 00 34 stw r31,52(r1) /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; ffc0416c: 3f e0 00 00 lis r31,0 ffc04170: 81 3f 26 dc lwz r9,9948(r31) * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { ffc04174: 90 01 00 3c stw r0,60(r1) /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; ffc04178: 38 00 00 12 li r0,18 ffc0417c: 90 09 00 2c stw r0,44(r9) * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { ffc04180: 93 a1 00 2c stw r29,44(r1) ffc04184: 93 c1 00 30 stw r30,48(r1) */ rtems_filesystem_umask = 022; init_fs_mount_table(); ffc04188: 48 00 0b 3d bl ffc04cc4 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) ffc0418c: 3d 20 00 00 lis r9,0 ffc04190: 80 09 26 98 lwz r0,9880(r9) ffc04194: 2f 80 00 00 cmpwi cr7,r0,0 ffc04198: 41 9e 01 2c beq- cr7,ffc042c4 <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; ffc0419c: 3d 20 00 00 lis r9,0 ffc041a0: 81 29 26 94 lwz r9,9876(r9) status = mount( ffc041a4: 38 61 00 08 addi r3,r1,8 ffc041a8: 80 e9 00 0c lwz r7,12(r9) ffc041ac: 80 89 00 00 lwz r4,0(r9) ffc041b0: 80 a9 00 04 lwz r5,4(r9) ffc041b4: 80 c9 00 08 lwz r6,8(r9) ffc041b8: 48 00 0b 31 bl ffc04ce8 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) ffc041bc: 2f 83 ff ff cmpwi cr7,r3,-1 ffc041c0: 41 9e 01 1c beq- cr7,ffc042dc <== NEVER TAKEN * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; ffc041c4: 81 61 00 08 lwz r11,8(r1) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc041c8: 3f c0 ff c2 lis r30,-62 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; ffc041cc: 81 3f 26 dc lwz r9,9948(r31) * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc041d0: 3b de f6 4c addi r30,r30,-2484 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; ffc041d4: 80 eb 00 1c lwz r7,28(r11) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc041d8: 3b a1 00 0c addi r29,r1,12 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; ffc041dc: 81 0b 00 20 lwz r8,32(r11) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc041e0: 38 80 00 01 li r4,1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; ffc041e4: 81 4b 00 24 lwz r10,36(r11) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc041e8: 38 a0 00 00 li r5,0 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; ffc041ec: 80 0b 00 28 lwz r0,40(r11) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc041f0: 7f a6 eb 78 mr r6,r29 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; ffc041f4: 90 e9 00 18 stw r7,24(r9) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc041f8: 7f c3 f3 78 mr r3,r30 ffc041fc: 38 e0 00 00 li r7,0 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; ffc04200: 91 09 00 1c stw r8,28(r9) ffc04204: 91 49 00 20 stw r10,32(r9) ffc04208: 90 09 00 24 stw r0,36(r9) ffc0420c: 80 0b 00 2c lwz r0,44(r11) &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; ffc04210: 39 60 00 00 li r11,0 ffc04214: b1 69 00 30 sth r11,48(r9) * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; ffc04218: 90 09 00 28 stw r0,40(r9) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc0421c: 48 00 02 d1 bl ffc044ec rtems_filesystem_root = loc; ffc04220: 81 3f 26 dc lwz r9,9948(r31) ffc04224: 81 41 00 10 lwz r10,16(r1) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc04228: 7f a6 eb 78 mr r6,r29 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; ffc0422c: 81 61 00 14 lwz r11,20(r1) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc04230: 38 80 00 01 li r4,1 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; ffc04234: 80 01 00 18 lwz r0,24(r1) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc04238: 38 a0 00 00 li r5,0 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; ffc0423c: 81 01 00 0c lwz r8,12(r1) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc04240: 38 e0 00 00 li r7,0 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; ffc04244: 91 49 00 1c stw r10,28(r9) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc04248: 7f c3 f3 78 mr r3,r30 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; ffc0424c: 91 09 00 18 stw r8,24(r9) ffc04250: 91 69 00 20 stw r11,32(r9) ffc04254: 90 09 00 24 stw r0,36(r9) ffc04258: 80 01 00 1c lwz r0,28(r1) ffc0425c: 90 09 00 28 stw r0,40(r9) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc04260: 48 00 02 8d bl ffc044ec rtems_filesystem_current = loc; ffc04264: 80 01 00 18 lwz r0,24(r1) ffc04268: 81 3f 26 dc lwz r9,9948(r31) * * 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); ffc0426c: 3c 60 ff c2 lis r3,-62 /* 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; ffc04270: 81 41 00 10 lwz r10,16(r1) * * 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); ffc04274: 38 63 f6 50 addi r3,r3,-2480 /* 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; ffc04278: 81 61 00 14 lwz r11,20(r1) * * 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); ffc0427c: 38 80 01 ff li r4,511 /* 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; ffc04280: 81 01 00 0c lwz r8,12(r1) ffc04284: 91 49 00 08 stw r10,8(r9) ffc04288: 91 09 00 04 stw r8,4(r9) ffc0428c: 91 69 00 0c stw r11,12(r9) ffc04290: 90 09 00 10 stw r0,16(r9) ffc04294: 80 01 00 1c lwz r0,28(r1) ffc04298: 90 09 00 14 stw r0,20(r9) * * 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); ffc0429c: 48 00 08 1d bl ffc04ab8 if ( status != 0 ) ffc042a0: 2f 83 00 00 cmpwi cr7,r3,0 ffc042a4: 40 9e 00 2c bne- cr7,ffc042d0 <== NEVER TAKEN * 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. */ } ffc042a8: 80 01 00 3c lwz r0,60(r1) ffc042ac: 83 a1 00 2c lwz r29,44(r1) ffc042b0: 7c 08 03 a6 mtlr r0 ffc042b4: 83 c1 00 30 lwz r30,48(r1) ffc042b8: 83 e1 00 34 lwz r31,52(r1) ffc042bc: 38 21 00 38 addi r1,r1,56 ffc042c0: 4e 80 00 20 blr /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); ffc042c4: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED ffc042c8: 60 63 00 01 ori r3,r3,1 <== NOT EXECUTED ffc042cc: 48 00 4d 6d bl ffc09038 <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); ffc042d0: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED ffc042d4: 60 63 00 03 ori r3,r3,3 <== NOT EXECUTED ffc042d8: 48 00 4d 61 bl ffc09038 <== NOT EXECUTED status = mount( &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); ffc042dc: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED ffc042e0: 60 63 00 02 ori r3,r3,2 <== NOT EXECUTED ffc042e4: 48 00 4d 55 bl ffc09038 <== NOT EXECUTED =============================================================================== ffc0cf44 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ ffc0cf44: 80 03 00 00 lwz r0,0(r3) <== NOT EXECUTED ffc0cf48: 80 64 00 00 lwz r3,0(r4) <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } ffc0cf4c: 7c 03 1a 78 xor r3,r0,r3 <== NOT EXECUTED ffc0cf50: 7c 63 00 34 cntlzw r3,r3 <== NOT EXECUTED ffc0cf54: 54 63 d9 7e rlwinm r3,r3,27,5,31 <== NOT EXECUTED ffc0cf58: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc042e8 : { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) ffc042e8: 88 03 00 00 lbz r0,0(r3) int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { ffc042ec: 7c 69 1b 78 mr r9,r3 /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) ffc042f0: 2f 80 00 00 cmpwi cr7,r0,0 ffc042f4: 41 9e 00 3c beq- cr7,ffc04330 <== NEVER TAKEN ffc042f8: 2f 84 00 00 cmpwi cr7,r4,0 ffc042fc: 7c 89 03 a6 mtctr r4 ffc04300: 38 60 00 00 li r3,0 ffc04304: 41 9e 00 2c beq- cr7,ffc04330 <== NEVER TAKEN ffc04308: 2f 80 00 2f cmpwi cr7,r0,47 ffc0430c: 2f 00 00 5c cmpwi cr6,r0,92 ffc04310: 41 9e 00 08 beq- cr7,ffc04318 ffc04314: 4c ba 00 20 bnelr+ cr6 { pathname++; pathnamelen--; stripped++; ffc04318: 38 63 00 01 addi r3,r3,1 { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) ffc0431c: 7c 09 18 ae lbzx r0,r9,r3 ffc04320: 2f 80 00 00 cmpwi cr7,r0,0 ffc04324: 4d 9e 00 20 beqlr cr7 ffc04328: 42 00 ff e0 bdnz+ ffc04308 pathname++; pathnamelen--; stripped++; } return stripped; } ffc0432c: 4e 80 00 20 blr <== NOT EXECUTED { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) ffc04330: 38 60 00 00 li r3,0 <== NOT EXECUTED pathname++; pathnamelen--; stripped++; } return stripped; } ffc04334: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc03f3c : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { ffc03f3c: 94 21 ff c0 stwu r1,-64(r1) <== NOT EXECUTED ffc03f40: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc03f44: 93 61 00 2c stw r27,44(r1) <== NOT EXECUTED ffc03f48: 90 01 00 44 stw r0,68(r1) <== NOT EXECUTED ffc03f4c: 93 81 00 30 stw r28,48(r1) <== NOT EXECUTED ffc03f50: 93 a1 00 34 stw r29,52(r1) <== NOT EXECUTED ffc03f54: 7c 9d 23 78 mr r29,r4 <== NOT EXECUTED ffc03f58: 93 c1 00 38 stw r30,56(r1) <== NOT EXECUTED ffc03f5c: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED ffc03f60: 93 e1 00 3c stw r31,60(r1) <== NOT EXECUTED 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( name, strlen( name ), 0x00, &loc, true ); ffc03f64: 48 01 06 0d bl ffc14570 <== NOT EXECUTED ffc03f68: 3b e1 00 08 addi r31,r1,8 <== NOT EXECUTED ffc03f6c: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED ffc03f70: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc03f74: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc03f78: 7f e6 fb 78 mr r6,r31 <== NOT EXECUTED ffc03f7c: 38 e0 00 01 li r7,1 <== NOT EXECUTED ffc03f80: 48 00 05 6d bl ffc044ec <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { ffc03f84: 81 21 00 14 lwz r9,20(r1) <== NOT EXECUTED 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( name, strlen( name ), 0x00, &loc, true ); ffc03f88: 7c 7c 1b 78 mr r28,r3 <== NOT EXECUTED the_jnode = loc.node_access; ffc03f8c: 83 61 00 08 lwz r27,8(r1) <== NOT EXECUTED if ( !loc.ops->node_type_h ) { ffc03f90: 80 09 00 10 lwz r0,16(r9) <== NOT EXECUTED ffc03f94: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc03f98: 41 9e 00 64 beq- cr7,ffc03ffc <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); ffc03f9c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc03fa0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc03fa4: 4e 80 04 21 bctrl <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { ffc03fa8: 2f 9c 00 00 cmpwi cr7,r28,0 <== NOT EXECUTED ffc03fac: 41 9e 00 9c beq- cr7,ffc04048 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); ffc03fb0: 81 21 00 14 lwz r9,20(r1) <== NOT EXECUTED ffc03fb4: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc03fb8: 41 9e 00 e4 beq- cr7,ffc0409c <== NOT EXECUTED ffc03fbc: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc03fc0: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc03fc4: 41 9e 00 d8 beq- cr7,ffc0409c <== NOT EXECUTED ffc03fc8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc03fcc: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc03fd0: 4e 80 04 21 bctrl <== NOT EXECUTED ffc03fd4: 38 60 00 0d li r3,13 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } ffc03fd8: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED ffc03fdc: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc03fe0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc03fe4: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc03fe8: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc03fec: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc03ff0: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc03ff4: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc03ff8: 4e 80 00 20 blr <== NOT EXECUTED result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); ffc03ffc: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc04000: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc04004: 41 9e 00 10 beq- cr7,ffc04014 <== NOT EXECUTED ffc04008: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0400c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc04010: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc04014: 48 00 f2 61 bl ffc13274 <__errno> <== NOT EXECUTED ffc04018: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc0401c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc04020: 38 60 ff ff li r3,-1 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } ffc04024: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED ffc04028: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc0402c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc04030: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc04034: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc04038: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc0403c: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc04040: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc04044: 4e 80 00 20 blr <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { ffc04048: 2f 83 00 02 cmpwi cr7,r3,2 <== NOT EXECUTED ffc0404c: 40 9e ff 64 bne+ cr7,ffc03fb0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; ffc04050: 93 dd 00 00 stw r30,0(r29) <== NOT EXECUTED device_info->device_name_length = strlen( name ); ffc04054: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc04058: 48 01 05 19 bl ffc14570 <== NOT EXECUTED device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); ffc0405c: 81 21 00 14 lwz r9,20(r1) <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); ffc04060: 90 7d 00 04 stw r3,4(r29) <== NOT EXECUTED device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); ffc04064: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; ffc04068: 80 1b 00 50 lwz r0,80(r27) <== NOT EXECUTED ffc0406c: 90 1d 00 08 stw r0,8(r29) <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; ffc04070: 80 1b 00 54 lwz r0,84(r27) <== NOT EXECUTED ffc04074: 90 1d 00 0c stw r0,12(r29) <== NOT EXECUTED rtems_filesystem_freenode( &loc ); ffc04078: 41 9e 00 4c beq- cr7,ffc040c4 <== NOT EXECUTED ffc0407c: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc04080: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc04084: 41 9e 00 40 beq- cr7,ffc040c4 <== NOT EXECUTED ffc04088: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0408c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc04090: 4e 80 04 21 bctrl <== NOT EXECUTED ffc04094: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc04098: 4b ff ff 40 b ffc03fd8 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } ffc0409c: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); ffc040a0: 38 60 00 0d li r3,13 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } ffc040a4: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc040a8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc040ac: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc040b0: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc040b4: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc040b8: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc040bc: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc040c0: 4e 80 00 20 blr <== NOT EXECUTED device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); ffc040c4: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc040c8: 4b ff ff 10 b ffc03fd8 <== NOT EXECUTED =============================================================================== ffc0b184 : 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 ) { ffc0b184: 94 21 ff f0 stwu r1,-16(r1) ffc0b188: 7c 08 02 a6 mflr r0 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0b18c: 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 ) { ffc0b190: 90 01 00 14 stw r0,20(r1) rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0b194: 80 09 27 b8 lwz r0,10168(r9) rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; ffc0b198: 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 ) { ffc0b19c: 93 e1 00 0c stw r31,12(r1) ffc0b1a0: 7c 7f 1b 78 mr r31,r3 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0b1a4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b1a8: 38 60 00 12 li r3,18 rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; ffc0b1ac: 80 09 28 08 lwz r0,10248(r9) if ( rtems_interrupt_is_in_progress() ) ffc0b1b0: 40 9e 00 e8 bne- cr7,ffc0b298 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) ffc0b1b4: 2f 85 00 00 cmpwi cr7,r5,0 ffc0b1b8: 41 9e 01 38 beq- cr7,ffc0b2f0 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) ffc0b1bc: 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; ffc0b1c0: 90 05 00 00 stw r0,0(r5) if ( driver_table == NULL ) ffc0b1c4: 41 9e 01 2c beq- cr7,ffc0b2f0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0b1c8: 81 64 00 00 lwz r11,0(r4) ffc0b1cc: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0b1d0: 41 9e 01 14 beq- cr7,ffc0b2e4 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) ffc0b1d4: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0b1d8: 38 60 00 0a li r3,10 ffc0b1dc: 40 9d 00 bc ble- cr7,ffc0b298 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0b1e0: 3d 60 00 00 lis r11,0 ffc0b1e4: 81 4b 27 90 lwz r10,10128(r11) ffc0b1e8: 38 0a 00 01 addi r0,r10,1 ffc0b1ec: 90 0b 27 90 stw r0,10128(r11) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { ffc0b1f0: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0b1f4: 40 9e 00 b8 bne- cr7,ffc0b2ac static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; ffc0b1f8: 81 69 28 08 lwz r11,10248(r9) rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { ffc0b1fc: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0b200: 41 9e 01 08 beq- cr7,ffc0b308 <== NEVER TAKEN ffc0b204: 3d 20 00 00 lis r9,0 ffc0b208: 7d 69 03 a6 mtctr r11 ffc0b20c: 81 49 28 0c lwz r10,10252(r9) ffc0b210: 7d 49 53 78 mr r9,r10 ffc0b214: 40 be 00 14 bne+ cr7,ffc0b228 <== ALWAYS TAKEN ffc0b218: 48 00 01 14 b ffc0b32c <== NOT EXECUTED ffc0b21c: 3b ff 00 01 addi r31,r31,1 ffc0b220: 39 29 00 18 addi r9,r9,24 ffc0b224: 42 40 00 1c bdz- ffc0b240 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0b228: 80 09 00 00 lwz r0,0(r9) ffc0b22c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b230: 40 9e ff ec bne+ cr7,ffc0b21c ffc0b234: 80 09 00 04 lwz r0,4(r9) ffc0b238: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b23c: 40 9e ff e0 bne+ cr7,ffc0b21c } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) ffc0b240: 7f 8b f8 00 cmpw cr7,r11,r31 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; ffc0b244: 93 e5 00 00 stw r31,0(r5) if ( m != n ) ffc0b248: 41 9e 00 c4 beq- cr7,ffc0b30c ffc0b24c: 1d 3f 00 18 mulli r9,r31,24 ffc0b250: 7d 2a 4a 14 add r9,r10,r9 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; ffc0b254: 81 64 00 08 lwz r11,8(r4) ffc0b258: 80 04 00 0c lwz r0,12(r4) ffc0b25c: 81 04 00 00 lwz r8,0(r4) ffc0b260: 81 44 00 04 lwz r10,4(r4) ffc0b264: 91 09 00 00 stw r8,0(r9) ffc0b268: 91 49 00 04 stw r10,4(r9) ffc0b26c: 91 69 00 08 stw r11,8(r9) ffc0b270: 90 09 00 0c stw r0,12(r9) ffc0b274: 81 64 00 14 lwz r11,20(r4) ffc0b278: 80 04 00 10 lwz r0,16(r4) ffc0b27c: 91 69 00 14 stw r11,20(r9) ffc0b280: 90 09 00 10 stw r0,16(r9) _Thread_Enable_dispatch(); ffc0b284: 48 00 22 2d bl ffc0d4b0 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); ffc0b288: 7f e3 fb 78 mr r3,r31 ffc0b28c: 38 80 00 00 li r4,0 ffc0b290: 38 a0 00 00 li r5,0 ffc0b294: 48 00 ae e1 bl ffc16174 } ffc0b298: 80 01 00 14 lwz r0,20(r1) ffc0b29c: 83 e1 00 0c lwz r31,12(r1) ffc0b2a0: 38 21 00 10 addi r1,r1,16 ffc0b2a4: 7c 08 03 a6 mtlr r0 ffc0b2a8: 4e 80 00 20 blr _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; ffc0b2ac: 3d 20 00 00 lis r9,0 ffc0b2b0: 81 29 28 0c lwz r9,10252(r9) ffc0b2b4: 1c 1f 00 18 mulli r0,r31,24 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0b2b8: 7d 69 00 2e lwzx r11,r9,r0 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; ffc0b2bc: 7d 29 02 14 add r9,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; ffc0b2c0: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0b2c4: 41 9e 00 54 beq- cr7,ffc0b318 major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); ffc0b2c8: 48 00 21 e9 bl ffc0d4b0 <_Thread_Enable_dispatch> _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } ffc0b2cc: 80 01 00 14 lwz r0,20(r1) major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); ffc0b2d0: 38 60 00 0c li r3,12 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } ffc0b2d4: 83 e1 00 0c lwz r31,12(r1) ffc0b2d8: 7c 08 03 a6 mtlr r0 ffc0b2dc: 38 21 00 10 addi r1,r1,16 ffc0b2e0: 4e 80 00 20 blr static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0b2e4: 81 64 00 04 lwz r11,4(r4) ffc0b2e8: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0b2ec: 40 9e fe e8 bne+ cr7,ffc0b1d4 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } ffc0b2f0: 80 01 00 14 lwz r0,20(r1) _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); ffc0b2f4: 38 60 00 09 li r3,9 } ffc0b2f8: 83 e1 00 0c lwz r31,12(r1) ffc0b2fc: 38 21 00 10 addi r1,r1,16 ffc0b300: 7c 08 03 a6 mtlr r0 ffc0b304: 4e 80 00 20 blr if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; ffc0b308: 93 e5 00 00 stw r31,0(r5) <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); ffc0b30c: 48 00 21 a5 bl ffc0d4b0 <_Thread_Enable_dispatch> ffc0b310: 38 60 00 05 li r3,5 return sc; ffc0b314: 4b ff ff 84 b ffc0b298 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0b318: 80 09 00 04 lwz r0,4(r9) ffc0b31c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b320: 40 9e ff a8 bne+ cr7,ffc0b2c8 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; ffc0b324: 93 e5 00 00 stw r31,0(r5) ffc0b328: 4b ff ff 2c b ffc0b254 ffc0b32c: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0b330: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0b334: 4b ff fe f4 b ffc0b228 <== NOT EXECUTED =============================================================================== ffc0c188 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { ffc0c188: 94 21 ff e0 stwu r1,-32(r1) ffc0c18c: 7c 08 02 a6 mflr r0 ffc0c190: 90 01 00 24 stw r0,36(r1) uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) ffc0c194: 7c 60 1b 79 mr. r0,r3 #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { ffc0c198: 93 81 00 10 stw r28,16(r1) ffc0c19c: 93 a1 00 14 stw r29,20(r1) ffc0c1a0: 93 c1 00 18 stw r30,24(r1) ffc0c1a4: 93 e1 00 1c stw r31,28(r1) uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) ffc0c1a8: 90 01 00 08 stw r0,8(r1) ffc0c1ac: 41 82 00 7c beq- ffc0c228 <== NEVER TAKEN ffc0c1b0: 3f a0 00 01 lis r29,1 ffc0c1b4: 3b bd aa 44 addi r29,r29,-21948 #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) ffc0c1b8: 3b 9d 00 10 addi r28,r29,16 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) ffc0c1bc: 81 3d 00 00 lwz r9,0(r29) ffc0c1c0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c1c4: 41 9e 00 58 beq- cr7,ffc0c21c continue; information = _Objects_Information_table[ api_index ][ 1 ]; ffc0c1c8: 83 c9 00 04 lwz r30,4(r9) if ( !information ) ffc0c1cc: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0c1d0: 41 9e 00 4c beq- cr7,ffc0c21c continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0c1d4: a1 3e 00 10 lhz r9,16(r30) ffc0c1d8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c1dc: 41 9e 00 40 beq- cr7,ffc0c21c ffc0c1e0: 3b e0 00 01 li r31,1 the_thread = (Thread_Control *)information->local_table[ i ]; ffc0c1e4: 81 7e 00 1c lwz r11,28(r30) ffc0c1e8: 57 e0 10 3a rlwinm r0,r31,2,0,29 information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0c1ec: 3b ff 00 01 addi r31,r31,1 the_thread = (Thread_Control *)information->local_table[ i ]; ffc0c1f0: 7c 0b 00 2e lwzx r0,r11,r0 if ( !the_thread ) ffc0c1f4: 2f 80 00 00 cmpwi cr7,r0,0 continue; (*routine)(the_thread); ffc0c1f8: 7c 03 03 78 mr r3,r0 continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) ffc0c1fc: 41 9e 00 14 beq- cr7,ffc0c210 <== NEVER TAKEN continue; (*routine)(the_thread); ffc0c200: 80 01 00 08 lwz r0,8(r1) ffc0c204: 7c 09 03 a6 mtctr r0 ffc0c208: 4e 80 04 21 bctrl ffc0c20c: a1 3e 00 10 lhz r9,16(r30) information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0c210: 55 20 04 3e clrlwi r0,r9,16 ffc0c214: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0c218: 40 9c ff cc bge+ cr7,ffc0c1e4 ffc0c21c: 3b bd 00 04 addi r29,r29,4 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { ffc0c220: 7f 9d e0 00 cmpw cr7,r29,r28 ffc0c224: 40 9e ff 98 bne+ cr7,ffc0c1bc (*routine)(the_thread); } } } ffc0c228: 80 01 00 24 lwz r0,36(r1) ffc0c22c: 83 81 00 10 lwz r28,16(r1) ffc0c230: 7c 08 03 a6 mtlr r0 ffc0c234: 83 a1 00 14 lwz r29,20(r1) ffc0c238: 83 c1 00 18 lwz r30,24(r1) ffc0c23c: 83 e1 00 1c lwz r31,28(r1) ffc0c240: 38 21 00 20 addi r1,r1,32 ffc0c244: 4e 80 00 20 blr =============================================================================== ffc0e648 : * This routine searches the IOP Table for an unused entry. If it * finds one, it returns it. Otherwise, it returns NULL. */ rtems_libio_t *rtems_libio_allocate( void ) { ffc0e648: 94 21 ff d8 stwu r1,-40(r1) ffc0e64c: 7c 08 02 a6 mflr r0 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 ); ffc0e650: 38 80 00 00 li r4,0 ffc0e654: 93 e1 00 24 stw r31,36(r1) ffc0e658: 3f e0 00 00 lis r31,0 ffc0e65c: 38 a0 00 00 li r5,0 ffc0e660: 80 7f 27 54 lwz r3,10068(r31) ffc0e664: 93 c1 00 20 stw r30,32(r1) rtems_status_code rc; rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) { ffc0e668: 3f c0 00 00 lis r30,0 * This routine searches the IOP Table for an unused entry. If it * finds one, it returns it. Otherwise, it returns NULL. */ rtems_libio_t *rtems_libio_allocate( void ) { ffc0e66c: 90 01 00 2c stw r0,44(r1) ffc0e670: 93 81 00 18 stw r28,24(r1) ffc0e674: 93 a1 00 1c stw r29,28(r1) ffc0e678: 4b ff a0 99 bl ffc08710 rtems_status_code rc; rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) { ffc0e67c: 80 1e 27 50 lwz r0,10064(r30) ffc0e680: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e684: 40 9e 00 34 bne- cr7,ffc0e6b8 next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; rtems_libio_iop_freelist = next; goto done; ffc0e688: 3b a0 00 00 li r29,0 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc0e68c: 80 7f 27 54 lwz r3,10068(r31) ffc0e690: 4b ff a1 e1 bl ffc08870 iop = 0; done: rtems_libio_unlock(); return iop; } ffc0e694: 80 01 00 2c lwz r0,44(r1) ffc0e698: 7f a3 eb 78 mr r3,r29 ffc0e69c: 83 81 00 18 lwz r28,24(r1) ffc0e6a0: 7c 08 03 a6 mtlr r0 ffc0e6a4: 83 a1 00 1c lwz r29,28(r1) ffc0e6a8: 83 c1 00 20 lwz r30,32(r1) ffc0e6ac: 83 e1 00 24 lwz r31,36(r1) ffc0e6b0: 38 21 00 28 addi r1,r1,40 ffc0e6b4: 4e 80 00 20 blr rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) { rc = rtems_semaphore_create( ffc0e6b8: 3d 20 00 00 lis r9,0 ffc0e6bc: 80 69 27 4c lwz r3,10060(r9) ffc0e6c0: 3d 20 38 e3 lis r9,14563 ffc0e6c4: 61 29 8e 39 ori r9,r9,36409 ffc0e6c8: 7c 63 00 50 subf r3,r3,r0 ffc0e6cc: 7c 63 1e 70 srawi r3,r3,3 ffc0e6d0: 7c 63 49 d6 mullw r3,r3,r9 ffc0e6d4: 38 80 00 01 li r4,1 ffc0e6d8: 64 63 4c 42 oris r3,r3,19522 ffc0e6dc: 60 63 49 00 ori r3,r3,18688 ffc0e6e0: 38 a0 00 54 li r5,84 ffc0e6e4: 38 c0 00 00 li r6,0 ffc0e6e8: 38 e1 00 08 addi r7,r1,8 ffc0e6ec: 4b ff 9d 29 bl ffc08414 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 0, &sema ); if (rc != RTEMS_SUCCESSFUL) ffc0e6f0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e6f4: 40 9e ff 94 bne+ cr7,ffc0e688 <== NEVER TAKEN goto failed; iop = rtems_libio_iop_freelist; ffc0e6f8: 83 be 27 50 lwz r29,10064(r30) next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); ffc0e6fc: 38 80 00 00 li r4,0 ffc0e700: 38 a0 00 48 li r5,72 ffc0e704: 7f a3 eb 78 mr r3,r29 &sema ); if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; ffc0e708: 83 9d 00 38 lwz r28,56(r29) (void) memset( iop, 0, sizeof(rtems_libio_t) ); ffc0e70c: 48 00 58 51 bl ffc13f5c iop->flags = LIBIO_FLAGS_OPEN; ffc0e710: 38 00 01 00 li r0,256 ffc0e714: 90 1d 00 18 stw r0,24(r29) iop->sem = sema; ffc0e718: 80 01 00 08 lwz r0,8(r1) rtems_libio_iop_freelist = next; ffc0e71c: 93 9e 27 50 stw r28,10064(r30) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; ffc0e720: 90 1d 00 30 stw r0,48(r29) rtems_libio_iop_freelist = next; goto done; ffc0e724: 4b ff ff 68 b ffc0e68c =============================================================================== ffc0e5d0 : */ void rtems_libio_free( rtems_libio_t *iop ) { ffc0e5d0: 94 21 ff f0 stwu r1,-16(r1) ffc0e5d4: 7c 08 02 a6 mflr r0 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 ); ffc0e5d8: 38 80 00 00 li r4,0 ffc0e5dc: 93 c1 00 08 stw r30,8(r1) ffc0e5e0: 3f c0 00 00 lis r30,0 ffc0e5e4: 38 a0 00 00 li r5,0 ffc0e5e8: 93 e1 00 0c stw r31,12(r1) ffc0e5ec: 7c 7f 1b 78 mr r31,r3 ffc0e5f0: 80 7e 27 54 lwz r3,10068(r30) ffc0e5f4: 90 01 00 14 stw r0,20(r1) ffc0e5f8: 4b ff a1 19 bl ffc08710 rtems_libio_lock(); if (iop->sem) ffc0e5fc: 80 7f 00 30 lwz r3,48(r31) ffc0e600: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e604: 41 be 00 08 beq+ cr7,ffc0e60c <== NEVER TAKEN rtems_semaphore_delete(iop->sem); ffc0e608: 4b ff a0 2d bl ffc08634 iop->flags &= ~LIBIO_FLAGS_OPEN; ffc0e60c: 81 7f 00 18 lwz r11,24(r31) iop->data1 = rtems_libio_iop_freelist; ffc0e610: 3d 20 00 00 lis r9,0 ffc0e614: 80 09 27 50 lwz r0,10064(r9) rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; ffc0e618: 55 6b 06 2c rlwinm r11,r11,0,24,22 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc0e61c: 80 7e 27 54 lwz r3,10068(r30) iop->data1 = rtems_libio_iop_freelist; ffc0e620: 90 1f 00 38 stw r0,56(r31) rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; ffc0e624: 91 7f 00 18 stw r11,24(r31) iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; ffc0e628: 93 e9 27 50 stw r31,10064(r9) ffc0e62c: 4b ff a2 45 bl ffc08870 rtems_libio_unlock(); } ffc0e630: 80 01 00 14 lwz r0,20(r1) ffc0e634: 83 c1 00 08 lwz r30,8(r1) ffc0e638: 7c 08 03 a6 mtlr r0 ffc0e63c: 83 e1 00 0c lwz r31,12(r1) ffc0e640: 38 21 00 10 addi r1,r1,16 ffc0e644: 4e 80 00 20 blr =============================================================================== ffc046bc : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { ffc046bc: 94 21 ff f0 stwu r1,-16(r1) ffc046c0: 7c 08 02 a6 mflr r0 ffc046c4: 93 e1 00 0c stw r31,12(r1) rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) ffc046c8: 3f e0 00 00 lis r31,0 ffc046cc: 80 7f 26 8c lwz r3,9868(r31) * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { ffc046d0: 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) ffc046d4: 2f 83 00 00 cmpwi cr7,r3,0 ffc046d8: 41 9e 00 68 beq- cr7,ffc04740 <== NEVER TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, ffc046dc: 38 80 00 48 li r4,72 ffc046e0: 48 00 99 f9 bl ffc0e0d8 ffc046e4: 3d 20 00 00 lis r9,0 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) ffc046e8: 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, ffc046ec: 90 69 27 4c stw r3,10060(r9) ffc046f0: 7c 6b 1b 78 mr r11,r3 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) ffc046f4: 41 9e 00 a4 beq- cr7,ffc04798 <== NEVER TAKEN 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++) ffc046f8: 81 3f 26 8c lwz r9,9868(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; ffc046fc: 3d 40 00 00 lis r10,0 ffc04700: 90 6a 27 50 stw r3,10064(r10) for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) ffc04704: 2b 89 00 01 cmplwi cr7,r9,1 ffc04708: 40 9d 00 30 ble- cr7,ffc04738 <== NEVER TAKEN ffc0470c: 39 29 ff ff addi r9,r9,-1 ffc04710: 7d 29 03 a6 mtctr r9 ffc04714: 39 60 00 01 li r11,1 ffc04718: 39 23 00 48 addi r9,r3,72 iop->data1 = iop + 1; ffc0471c: 91 29 ff f0 stw r9,-16(r9) ffc04720: 39 6b 00 01 addi r11,r11,1 ffc04724: 39 29 00 48 addi r9,r9,72 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++) ffc04728: 42 00 ff f4 bdnz+ ffc0471c ffc0472c: 39 6b ff ff addi r11,r11,-1 ffc04730: 1d 6b 00 48 mulli r11,r11,72 ffc04734: 7d 63 5a 14 add r11,r3,r11 iop->data1 = iop + 1; iop->data1 = NULL; ffc04738: 38 00 00 00 li r0,0 ffc0473c: 90 0b 00 38 stw r0,56(r11) /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( ffc04740: 3c 60 4c 42 lis r3,19522 ffc04744: 3c e0 00 00 lis r7,0 ffc04748: 60 63 49 4f ori r3,r3,18767 ffc0474c: 38 e7 27 54 addi r7,r7,10068 ffc04750: 38 80 00 01 li r4,1 ffc04754: 38 a0 00 54 li r5,84 ffc04758: 38 c0 00 00 li r6,0 ffc0475c: 48 00 3c b9 bl ffc08414 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) ffc04760: 2f 83 00 00 cmpwi cr7,r3,0 ffc04764: 40 9e 00 30 bne- cr7,ffc04794 <== NEVER TAKEN /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) ffc04768: 3d 20 00 00 lis r9,0 ffc0476c: 80 09 26 88 lwz r0,9864(r9) ffc04770: 2f 80 00 00 cmpwi cr7,r0,0 ffc04774: 41 9e 00 0c beq- cr7,ffc04780 <== NEVER TAKEN (* rtems_fs_init_helper)(); ffc04778: 7c 09 03 a6 mtctr r0 ffc0477c: 4e 80 04 21 bctrl } ffc04780: 80 01 00 14 lwz r0,20(r1) ffc04784: 83 e1 00 0c lwz r31,12(r1) ffc04788: 38 21 00 10 addi r1,r1,16 ffc0478c: 7c 08 03 a6 mtlr r0 ffc04790: 4e 80 00 20 blr RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) rtems_fatal_error_occurred( rc ); ffc04794: 48 00 48 a5 bl ffc09038 <== NOT EXECUTED if (rtems_libio_number_iops > 0) { 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); ffc04798: 38 60 00 1a li r3,26 <== NOT EXECUTED ffc0479c: 48 00 48 9d bl ffc09038 <== NOT EXECUTED =============================================================================== ffc0e458 : */ int rtems_libio_is_file_open( void *node_access ) { ffc0e458: 94 21 ff f0 stwu r1,-16(r1) ffc0e45c: 7c 08 02 a6 mflr r0 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 ); ffc0e460: 38 80 00 00 li r4,0 ffc0e464: 93 c1 00 08 stw r30,8(r1) ffc0e468: 3f c0 00 00 lis r30,0 ffc0e46c: 38 a0 00 00 li r5,0 ffc0e470: 93 e1 00 0c stw r31,12(r1) ffc0e474: 7c 7f 1b 78 mr r31,r3 ffc0e478: 80 7e 27 54 lwz r3,10068(r30) ffc0e47c: 90 01 00 14 stw r0,20(r1) ffc0e480: 4b ff a2 91 bl ffc08710 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc0e484: 3d 20 00 00 lis r9,0 ffc0e488: 80 09 26 8c lwz r0,9868(r9) ffc0e48c: 3d 20 00 00 lis r9,0 ffc0e490: 81 29 27 4c lwz r9,10060(r9) ffc0e494: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e498: 41 9e 00 2c beq- cr7,ffc0e4c4 <== NEVER TAKEN ffc0e49c: 7c 09 03 a6 mtctr r0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { ffc0e4a0: 80 09 00 18 lwz r0,24(r9) ffc0e4a4: 70 0b 01 00 andi. r11,r0,256 ffc0e4a8: 41 82 00 10 beq- ffc0e4b8 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { ffc0e4ac: 80 09 00 1c lwz r0,28(r9) ffc0e4b0: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0e4b4: 41 9e 00 38 beq- cr7,ffc0e4ec /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc0e4b8: 42 40 00 0c bdz- ffc0e4c4 ffc0e4bc: 39 29 00 48 addi r9,r9,72 ffc0e4c0: 4b ff ff e0 b ffc0e4a0 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc0e4c4: 80 7e 27 54 lwz r3,10068(r30) ffc0e4c8: 3b e0 00 00 li r31,0 ffc0e4cc: 4b ff a3 a5 bl ffc08870 } rtems_libio_unlock(); return result; } ffc0e4d0: 80 01 00 14 lwz r0,20(r1) ffc0e4d4: 7f e3 fb 78 mr r3,r31 ffc0e4d8: 83 c1 00 08 lwz r30,8(r1) ffc0e4dc: 7c 08 03 a6 mtlr r0 ffc0e4e0: 83 e1 00 0c lwz r31,12(r1) ffc0e4e4: 38 21 00 10 addi r1,r1,16 ffc0e4e8: 4e 80 00 20 blr ffc0e4ec: 80 7e 27 54 lwz r3,10068(r30) /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc0e4f0: 3b e0 00 01 li r31,1 ffc0e4f4: 4b ff a3 7d bl ffc08870 } rtems_libio_unlock(); return result; } ffc0e4f8: 80 01 00 14 lwz r0,20(r1) ffc0e4fc: 7f e3 fb 78 mr r3,r31 ffc0e500: 83 c1 00 08 lwz r30,8(r1) ffc0e504: 7c 08 03 a6 mtlr r0 ffc0e508: 83 e1 00 0c lwz r31,12(r1) ffc0e50c: 38 21 00 10 addi r1,r1,16 ffc0e510: 4e 80 00 20 blr =============================================================================== ffc0e514 : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { ffc0e514: 94 21 ff f0 stwu r1,-16(r1) ffc0e518: 7c 08 02 a6 mflr r0 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 ); ffc0e51c: 38 80 00 00 li r4,0 ffc0e520: 93 c1 00 08 stw r30,8(r1) ffc0e524: 3f c0 00 00 lis r30,0 ffc0e528: 38 a0 00 00 li r5,0 ffc0e52c: 93 e1 00 0c stw r31,12(r1) ffc0e530: 7c 7f 1b 78 mr r31,r3 ffc0e534: 80 7e 27 54 lwz r3,10068(r30) ffc0e538: 90 01 00 14 stw r0,20(r1) ffc0e53c: 4b ff a1 d5 bl ffc08710 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc0e540: 3d 20 00 00 lis r9,0 ffc0e544: 80 09 26 8c lwz r0,9868(r9) ffc0e548: 3d 20 00 00 lis r9,0 ffc0e54c: 81 29 27 4c lwz r9,10060(r9) ffc0e550: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e554: 41 9e 00 2c beq- cr7,ffc0e580 <== NEVER TAKEN ffc0e558: 7c 09 03 a6 mtctr r0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { ffc0e55c: 80 09 00 18 lwz r0,24(r9) ffc0e560: 70 0b 01 00 andi. r11,r0,256 ffc0e564: 41 82 00 10 beq- ffc0e574 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { ffc0e568: 80 09 00 2c lwz r0,44(r9) ffc0e56c: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0e570: 41 9e 00 38 beq- cr7,ffc0e5a8 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc0e574: 42 40 00 0c bdz- ffc0e580 ffc0e578: 39 29 00 48 addi r9,r9,72 ffc0e57c: 4b ff ff e0 b ffc0e55c } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc0e580: 80 7e 27 54 lwz r3,10068(r30) ffc0e584: 3b e0 00 00 li r31,0 ffc0e588: 4b ff a2 e9 bl ffc08870 } rtems_libio_unlock(); return result; } ffc0e58c: 80 01 00 14 lwz r0,20(r1) ffc0e590: 7f e3 fb 78 mr r3,r31 ffc0e594: 83 c1 00 08 lwz r30,8(r1) ffc0e598: 7c 08 03 a6 mtlr r0 ffc0e59c: 83 e1 00 0c lwz r31,12(r1) ffc0e5a0: 38 21 00 10 addi r1,r1,16 ffc0e5a4: 4e 80 00 20 blr ffc0e5a8: 80 7e 27 54 lwz r3,10068(r30) /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc0e5ac: 3b e0 00 01 li r31,1 ffc0e5b0: 4b ff a2 c1 bl ffc08870 } rtems_libio_unlock(); return result; } ffc0e5b4: 80 01 00 14 lwz r0,20(r1) ffc0e5b8: 7f e3 fb 78 mr r3,r31 ffc0e5bc: 83 c1 00 08 lwz r30,8(r1) ffc0e5c0: 7c 08 03 a6 mtlr r0 ffc0e5c4: 83 e1 00 0c lwz r31,12(r1) ffc0e5c8: 38 21 00 10 addi r1,r1,16 ffc0e5cc: 4e 80 00 20 blr =============================================================================== ffc065f4 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { ffc065f4: 94 21 ff c0 stwu r1,-64(r1) ffc065f8: 7c 08 02 a6 mflr r0 rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); ffc065fc: 38 60 00 00 li r3,0 ffc06600: 38 80 00 00 li r4,0 rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { ffc06604: 93 c1 00 38 stw r30,56(r1) rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); ffc06608: 38 a1 00 08 addi r5,r1,8 rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { ffc0660c: 90 01 00 44 stw r0,68(r1) ffc06610: 93 61 00 2c stw r27,44(r1) ffc06614: 93 81 00 30 stw r28,48(r1) ffc06618: 93 a1 00 34 stw r29,52(r1) ffc0661c: 93 e1 00 3c stw r31,60(r1) rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); ffc06620: 48 00 36 55 bl ffc09c74 if (sc != RTEMS_SUCCESSFUL) return sc; ffc06624: 7c 7e 1b 79 mr. r30,r3 ffc06628: 40 82 01 00 bne- ffc06728 <== NEVER TAKEN /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { ffc0662c: 3f e0 00 00 lis r31,0 ffc06630: 83 9f 26 b4 lwz r28,9908(r31) ffc06634: 3f a0 00 00 lis r29,0 ffc06638: 3b bd 2b 1c addi r29,r29,11036 ffc0663c: 7f 9c e8 00 cmpw cr7,r28,r29 ffc06640: 3b 7f 26 b4 addi r27,r31,9908 ffc06644: 41 9e 01 0c beq- cr7,ffc06750 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ ffc06648: 7f a4 eb 78 mr r4,r29 ffc0664c: 38 a0 00 48 li r5,72 ffc06650: 7f 83 e3 78 mr r3,r28 ffc06654: 48 00 fb f1 bl ffc16244 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; ffc06658: 3d 20 00 00 lis r9,0 ffc0665c: 81 29 2b 10 lwz r9,11024(r9) * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc06660: 3f a0 ff c2 lis r29,-62 ffc06664: 3b c1 00 0c addi r30,r1,12 *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; ffc06668: 81 09 00 1c lwz r8,28(r9) * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc0666c: 3b bd 23 0c addi r29,r29,8972 *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; ffc06670: 81 49 00 20 lwz r10,32(r9) * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc06674: 7f c6 f3 78 mr r6,r30 *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; ffc06678: 81 69 00 24 lwz r11,36(r9) * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc0667c: 38 80 00 01 li r4,1 *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; ffc06680: 80 09 00 28 lwz r0,40(r9) * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc06684: 38 a0 00 00 li r5,0 *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; ffc06688: 91 1c 00 18 stw r8,24(r28) * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc0668c: 38 e0 00 00 li r7,0 ffc06690: 7f a3 eb 78 mr r3,r29 *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; ffc06694: 91 5c 00 1c stw r10,28(r28) ffc06698: 91 7c 00 20 stw r11,32(r28) ffc0669c: 90 1c 00 24 stw r0,36(r28) ffc066a0: 80 09 00 2c lwz r0,44(r9) } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ ffc066a4: 81 21 00 08 lwz r9,8(r1) /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; ffc066a8: 90 1c 00 28 stw r0,40(r28) } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ ffc066ac: 91 3c 00 00 stw r9,0(r28) * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc066b0: 4b ff e7 01 bl ffc04db0 rtems_filesystem_root = loc; ffc066b4: 81 3f 26 b4 lwz r9,9908(r31) ffc066b8: 81 41 00 10 lwz r10,16(r1) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc066bc: 7f c6 f3 78 mr r6,r30 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; ffc066c0: 81 61 00 14 lwz r11,20(r1) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc066c4: 7f a3 eb 78 mr r3,r29 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; ffc066c8: 80 01 00 18 lwz r0,24(r1) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc066cc: 38 80 00 01 li r4,1 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; ffc066d0: 81 01 00 0c lwz r8,12(r1) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc066d4: 38 a0 00 00 li r5,0 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; ffc066d8: 91 49 00 1c stw r10,28(r9) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc066dc: 38 e0 00 00 li r7,0 rtems_filesystem_current = loc; ffc066e0: 3b c0 00 00 li r30,0 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; ffc066e4: 91 09 00 18 stw r8,24(r9) ffc066e8: 91 69 00 20 stw r11,32(r9) ffc066ec: 90 09 00 24 stw r0,36(r9) ffc066f0: 80 01 00 1c lwz r0,28(r1) ffc066f4: 90 09 00 28 stw r0,40(r9) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc066f8: 4b ff e6 b9 bl ffc04db0 rtems_filesystem_current = loc; ffc066fc: 80 01 00 18 lwz r0,24(r1) ffc06700: 81 3f 26 b4 lwz r9,9908(r31) ffc06704: 81 41 00 10 lwz r10,16(r1) ffc06708: 81 61 00 14 lwz r11,20(r1) ffc0670c: 81 01 00 0c lwz r8,12(r1) ffc06710: 91 49 00 08 stw r10,8(r9) ffc06714: 91 09 00 04 stw r8,4(r9) ffc06718: 91 69 00 0c stw r11,12(r9) ffc0671c: 90 09 00 10 stw r0,16(r9) ffc06720: 80 01 00 1c lwz r0,28(r1) ffc06724: 90 09 00 14 stw r0,20(r9) return RTEMS_SUCCESSFUL; } ffc06728: 80 01 00 44 lwz r0,68(r1) ffc0672c: 7f c3 f3 78 mr r3,r30 ffc06730: 83 61 00 2c lwz r27,44(r1) ffc06734: 7c 08 03 a6 mtlr r0 ffc06738: 83 81 00 30 lwz r28,48(r1) ffc0673c: 83 a1 00 34 lwz r29,52(r1) ffc06740: 83 c1 00 38 lwz r30,56(r1) ffc06744: 83 e1 00 3c lwz r31,60(r1) ffc06748: 38 21 00 40 addi r1,r1,64 ffc0674c: 4e 80 00 20 blr sc=rtems_task_ident(RTEMS_SELF,0,&task_id); if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); ffc06750: 38 60 00 48 li r3,72 ffc06754: 4b ff ef 05 bl ffc05658 if (!tmp) ffc06758: 3b c0 00 1a li r30,26 ffc0675c: 7c 7c 1b 79 mr. r28,r3 ffc06760: 41 a2 ff c8 beq- ffc06728 <== NEVER TAKEN #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); ffc06764: 3c a0 ff c0 lis r5,-64 ffc06768: 7f 64 db 78 mr r4,r27 ffc0676c: 38 a5 64 8c addi r5,r5,25740 ffc06770: 38 60 00 00 li r3,0 ffc06774: 48 00 37 49 bl ffc09ebc if (sc != RTEMS_SUCCESSFUL) { ffc06778: 7c 7e 1b 79 mr. r30,r3 ffc0677c: 40 82 00 0c bne- ffc06788 <== NEVER TAKEN * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; ffc06780: 93 9f 26 b4 stw r28,9908(r31) ffc06784: 4b ff fe c4 b ffc06648 sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); if (sc != RTEMS_SUCCESSFUL) { /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); ffc06788: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc0678c: 4b ff e7 2d bl ffc04eb8 <== NOT EXECUTED return sc; ffc06790: 4b ff ff 98 b ffc06728 <== NOT EXECUTED =============================================================================== ffc06514 : * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { ffc06514: 94 21 ff d8 stwu r1,-40(r1) <== NOT EXECUTED ffc06518: 7c 08 02 a6 mflr r0 <== NOT EXECUTED rtems_status_code sc; rtems_user_env_t * shared_user_env; rtems_id current_task_id; sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id); ffc0651c: 38 80 00 00 li r4,0 <== NOT EXECUTED * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { ffc06520: 93 a1 00 1c stw r29,28(r1) <== NOT EXECUTED rtems_status_code sc; rtems_user_env_t * shared_user_env; rtems_id current_task_id; sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id); ffc06524: 38 a1 00 0c addi r5,r1,12 <== NOT EXECUTED * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { ffc06528: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED rtems_status_code sc; rtems_user_env_t * shared_user_env; rtems_id current_task_id; sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id); ffc0652c: 38 60 00 00 li r3,0 <== NOT EXECUTED * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { ffc06530: 90 01 00 2c stw r0,44(r1) <== NOT EXECUTED ffc06534: 93 81 00 18 stw r28,24(r1) <== NOT EXECUTED ffc06538: 93 c1 00 20 stw r30,32(r1) <== NOT EXECUTED ffc0653c: 93 e1 00 24 stw r31,36(r1) <== NOT EXECUTED rtems_status_code sc; rtems_user_env_t * shared_user_env; rtems_id current_task_id; sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id); ffc06540: 48 00 37 35 bl ffc09c74 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; ffc06544: 7c 60 1b 79 mr. r0,r3 <== NOT EXECUTED ffc06548: 40 82 00 48 bne- ffc06590 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { ffc0654c: 3f e0 00 00 lis r31,0 <== NOT EXECUTED ffc06550: 81 21 00 0c lwz r9,12(r1) <== NOT EXECUTED ffc06554: 83 9f 26 b4 lwz r28,9908(r31) <== NOT EXECUTED ffc06558: 38 1f 26 b4 addi r0,r31,9908 <== NOT EXECUTED ffc0655c: 7c 1e 03 78 mr r30,r0 <== NOT EXECUTED ffc06560: 81 7c 00 00 lwz r11,0(r28) <== NOT EXECUTED ffc06564: 7f 8b 48 00 cmpw cr7,r11,r9 <== NOT EXECUTED ffc06568: 41 9e 00 4c beq- cr7,ffc065b4 <== NOT EXECUTED free_user_env(tmp); }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, ffc0656c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc06570: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc06574: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED ffc06578: 48 00 3b 35 bl ffc0a0ac <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) ffc0657c: 7c 60 1b 79 mr. r0,r3 <== NOT EXECUTED ffc06580: 41 82 00 50 beq- ffc065d0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; ffc06584: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc06588: 39 29 2b 1c addi r9,r9,11036 <== NOT EXECUTED ffc0658c: 91 3f 26 b4 stw r9,9908(r31) <== NOT EXECUTED return sc; } ffc06590: 7c 03 03 78 mr r3,r0 <== NOT EXECUTED ffc06594: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc06598: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc0659c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc065a0: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc065a4: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc065a8: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc065ac: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc065b0: 4e 80 00 20 blr <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_current_user_env->task_id==current_task_id) { /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); ffc065b4: 7c 04 03 78 mr r4,r0 <== NOT EXECUTED ffc065b8: 48 00 3a 19 bl ffc09fd0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; ffc065bc: 7c 60 1b 79 mr. r0,r3 <== NOT EXECUTED ffc065c0: 40 82 ff d0 bne+ ffc06590 <== NOT EXECUTED free_user_env(tmp); ffc065c4: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc065c8: 4b ff fe c5 bl ffc0648c <== NOT EXECUTED ffc065cc: 4b ff ff a0 b ffc0656c <== NOT EXECUTED sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); ffc065d0: 3c a0 ff c0 lis r5,-64 <== NOT EXECUTED ffc065d4: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc065d8: 38 a5 64 8c addi r5,r5,25740 <== NOT EXECUTED ffc065dc: 48 00 38 e1 bl ffc09ebc <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) ffc065e0: 7c 60 1b 79 mr. r0,r3 <== NOT EXECUTED ffc065e4: 40 82 ff a0 bne+ ffc06584 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; ffc065e8: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED ffc065ec: 91 3f 26 b4 stw r9,9908(r31) <== NOT EXECUTED /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; ffc065f0: 4b ff ff a0 b ffc06590 <== NOT EXECUTED =============================================================================== ffc0e408 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { ffc0e408: 54 60 07 7c rlwinm r0,r3,0,29,30 ffc0e40c: 2f 80 00 06 cmpwi cr7,r0,6 ffc0e410: 38 00 00 02 li r0,2 ffc0e414: 41 9e 00 18 beq- cr7,ffc0e42c <== NEVER TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { ffc0e418: 54 69 ff fe rlwinm r9,r3,31,31,31 ffc0e41c: 31 29 ff ff addic r9,r9,-1 ffc0e420: 7d 29 49 10 subfe r9,r9,r9 ffc0e424: 54 60 f7 fe rlwinm r0,r3,30,31,31 ffc0e428: 7c 00 48 38 and r0,r0,r9 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 ) { ffc0e42c: 70 69 00 01 andi. r9,r3,1 ffc0e430: 41 82 00 08 beq- ffc0e438 fcntl_flags |= O_NONBLOCK; ffc0e434: 60 00 40 00 ori r0,r0,16384 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { ffc0e438: 70 69 02 00 andi. r9,r3,512 ffc0e43c: 41 82 00 08 beq- ffc0e444 fcntl_flags |= O_APPEND; ffc0e440: 60 00 00 08 ori r0,r0,8 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { ffc0e444: 70 69 04 00 andi. r9,r3,1024 ffc0e448: 41 82 00 08 beq- ffc0e450 fcntl_flags |= O_CREAT; ffc0e44c: 60 00 02 00 ori r0,r0,512 } return fcntl_flags; } ffc0e450: 7c 03 03 78 mr r3,r0 ffc0e454: 4e 80 00 20 blr =============================================================================== ffc14bcc : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { ffc14bcc: 94 21 ff e8 stwu r1,-24(r1) ffc14bd0: 7c 08 02 a6 mflr r0 ffc14bd4: 93 e1 00 14 stw r31,20(r1) void *return_this; /* * Parameter error checks */ if ( !pointer ) ffc14bd8: 7c 7f 1b 79 mr. r31,r3 int rtems_memalign( void **pointer, size_t alignment, size_t size ) { ffc14bdc: 93 a1 00 0c stw r29,12(r1) ffc14be0: 7c bd 2b 78 mr r29,r5 ffc14be4: 93 c1 00 10 stw r30,16(r1) ffc14be8: 7c 9e 23 78 mr r30,r4 ffc14bec: 90 01 00 1c stw r0,28(r1) void *return_this; /* * Parameter error checks */ if ( !pointer ) ffc14bf0: 41 82 00 94 beq- ffc14c84 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc14bf4: 3d 20 00 00 lis r9,0 ffc14bf8: 80 09 27 f4 lwz r0,10228(r9) ffc14bfc: 2f 80 00 03 cmpwi cr7,r0,3 * Parameter error checks */ if ( !pointer ) return EINVAL; *pointer = NULL; ffc14c00: 38 00 00 00 li r0,0 ffc14c04: 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()) && ffc14c08: 41 9e 00 70 beq- cr7,ffc14c78 <== ALWAYS TAKEN /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); ffc14c0c: 4b ff 17 e1 bl ffc063ec uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); ffc14c10: 3d 20 00 00 lis r9,0 ffc14c14: 80 69 26 bc lwz r3,9916(r9) ffc14c18: 7f c5 f3 78 mr r5,r30 ffc14c1c: 7f a4 eb 78 mr r4,r29 ffc14c20: 38 c0 00 00 li r6,0 ffc14c24: 4b ff 7f 79 bl ffc0cb9c <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) ffc14c28: 7c 7e 1b 79 mr. r30,r3 ffc14c2c: 38 60 00 0c li r3,12 ffc14c30: 41 82 00 2c beq- ffc14c5c return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) ffc14c34: 3d 20 00 00 lis r9,0 ffc14c38: 81 29 27 28 lwz r9,10024(r9) ffc14c3c: 2f 89 00 00 cmpwi cr7,r9,0 ffc14c40: 41 9e 00 14 beq- cr7,ffc14c54 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(pointer); ffc14c44: 80 09 00 04 lwz r0,4(r9) <== NOT EXECUTED ffc14c48: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc14c4c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc14c50: 4e 80 04 21 bctrl <== NOT EXECUTED */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; ffc14c54: 93 df 00 00 stw r30,0(r31) ffc14c58: 38 60 00 00 li r3,0 return 0; } ffc14c5c: 80 01 00 1c lwz r0,28(r1) ffc14c60: 83 a1 00 0c lwz r29,12(r1) ffc14c64: 7c 08 03 a6 mtlr r0 ffc14c68: 83 c1 00 10 lwz r30,16(r1) ffc14c6c: 83 e1 00 14 lwz r31,20(r1) ffc14c70: 38 21 00 18 addi r1,r1,24 ffc14c74: 4e 80 00 20 blr *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc14c78: 4b ff 17 01 bl ffc06378 ffc14c7c: 2f 83 00 00 cmpwi cr7,r3,0 ffc14c80: 40 9e ff 8c bne+ cr7,ffc14c0c <== ALWAYS TAKEN (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; } ffc14c84: 80 01 00 1c lwz r0,28(r1) if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; ffc14c88: 38 60 00 16 li r3,22 } ffc14c8c: 83 a1 00 0c lwz r29,12(r1) ffc14c90: 7c 08 03 a6 mtlr r0 ffc14c94: 83 c1 00 10 lwz r30,16(r1) ffc14c98: 83 e1 00 14 lwz r31,20(r1) ffc14c9c: 38 21 00 18 addi r1,r1,24 ffc14ca0: 4e 80 00 20 blr =============================================================================== ffc0a83c : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { ffc0a83c: 94 21 ff f0 stwu r1,-16(r1) ffc0a840: 7c 08 02 a6 mflr r0 ffc0a844: 93 e1 00 0c stw r31,12(r1) int i; /* * Validate parameters and look up information structure. */ if ( !info ) ffc0a848: 7c bf 2b 79 mr. r31,r5 rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { ffc0a84c: 90 01 00 14 stw r0,20(r1) int i; /* * Validate parameters and look up information structure. */ if ( !info ) ffc0a850: 38 00 00 09 li r0,9 ffc0a854: 41 82 00 78 beq- ffc0a8cc return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); ffc0a858: 48 00 23 ad bl ffc0cc04 <_Objects_Get_information> if ( !obj_info ) ffc0a85c: 38 00 00 0a li r0,10 ffc0a860: 2c 03 00 00 cmpwi r3,0 ffc0a864: 41 82 00 68 beq- ffc0a8cc * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; ffc0a868: a1 03 00 10 lhz r8,16(r3) return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; ffc0a86c: 80 03 00 08 lwz r0,8(r3) info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) ffc0a870: 2f 88 00 00 cmpwi cr7,r8,0 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; ffc0a874: 89 23 00 12 lbz r9,18(r3) return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; ffc0a878: 90 1f 00 00 stw r0,0(r31) info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) ffc0a87c: 38 00 00 00 li r0,0 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; ffc0a880: 81 63 00 0c lwz r11,12(r3) info->auto_extend = obj_info->auto_extend; ffc0a884: 99 3f 00 0c stb r9,12(r31) /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; ffc0a888: 91 7f 00 04 stw r11,4(r31) info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; ffc0a88c: 91 1f 00 08 stw r8,8(r31) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) ffc0a890: 41 9e 00 34 beq- cr7,ffc0a8c4 <== NEVER TAKEN ffc0a894: 80 e3 00 1c lwz r7,28(r3) ffc0a898: 39 60 00 01 li r11,1 ffc0a89c: 39 20 00 01 li r9,1 ffc0a8a0: 39 29 00 01 addi r9,r9,1 ffc0a8a4: 7f 88 48 40 cmplw cr7,r8,r9 if ( !obj_info->local_table[i] ) ffc0a8a8: 55 6b 10 3a rlwinm r11,r11,2,0,29 ffc0a8ac: 7d 47 58 2e lwzx r10,r7,r11 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) ffc0a8b0: 7d 2b 4b 78 mr r11,r9 if ( !obj_info->local_table[i] ) unallocated++; ffc0a8b4: 20 ca 00 00 subfic r6,r10,0 ffc0a8b8: 7c c0 01 94 addze r6,r0 ffc0a8bc: 7c c0 33 78 mr r0,r6 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) ffc0a8c0: 40 9c ff e0 bge+ cr7,ffc0a8a0 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; ffc0a8c4: 90 1f 00 10 stw r0,16(r31) ffc0a8c8: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; } ffc0a8cc: 7c 03 03 78 mr r3,r0 ffc0a8d0: 80 01 00 14 lwz r0,20(r1) ffc0a8d4: 83 e1 00 0c lwz r31,12(r1) ffc0a8d8: 38 21 00 10 addi r1,r1,16 ffc0a8dc: 7c 08 03 a6 mtlr r0 ffc0a8e0: 4e 80 00 20 blr =============================================================================== ffc0af24 : void rtems_panic( const char *printf_format, ... ) { ffc0af24: 94 21 ff 88 stwu r1,-120(r1) <== NOT EXECUTED ffc0af28: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc0af2c: 90 81 00 1c stw r4,28(r1) <== NOT EXECUTED ffc0af30: 90 01 00 7c stw r0,124(r1) <== NOT EXECUTED ffc0af34: 90 a1 00 20 stw r5,32(r1) <== NOT EXECUTED ffc0af38: 90 c1 00 24 stw r6,36(r1) <== NOT EXECUTED ffc0af3c: 90 e1 00 28 stw r7,40(r1) <== NOT EXECUTED ffc0af40: 91 01 00 2c stw r8,44(r1) <== NOT EXECUTED ffc0af44: 91 21 00 30 stw r9,48(r1) <== NOT EXECUTED ffc0af48: 91 41 00 34 stw r10,52(r1) <== NOT EXECUTED ffc0af4c: 40 86 00 24 bne- cr1,ffc0af70 <== NOT EXECUTED ffc0af50: d8 21 00 38 stfd f1,56(r1) <== NOT EXECUTED ffc0af54: d8 41 00 40 stfd f2,64(r1) <== NOT EXECUTED ffc0af58: d8 61 00 48 stfd f3,72(r1) <== NOT EXECUTED ffc0af5c: d8 81 00 50 stfd f4,80(r1) <== NOT EXECUTED ffc0af60: d8 a1 00 58 stfd f5,88(r1) <== NOT EXECUTED ffc0af64: d8 c1 00 60 stfd f6,96(r1) <== NOT EXECUTED ffc0af68: d8 e1 00 68 stfd f7,104(r1) <== NOT EXECUTED ffc0af6c: d9 01 00 70 stfd f8,112(r1) <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); ffc0af70: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0af74: 98 01 00 08 stb r0,8(r1) <== NOT EXECUTED ffc0af78: 38 00 00 00 li r0,0 <== NOT EXECUTED void rtems_panic( const char *printf_format, ... ) { ffc0af7c: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); ffc0af80: 98 01 00 09 stb r0,9(r1) <== NOT EXECUTED ffc0af84: 38 01 00 80 addi r0,r1,128 <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); ffc0af88: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); ffc0af8c: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); ffc0af90: 3c 60 20 00 lis r3,8192 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); ffc0af94: 38 01 00 18 addi r0,r1,24 <== NOT EXECUTED ffc0af98: 90 01 00 10 stw r0,16(r1) <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); ffc0af9c: 4b ff fd 81 bl ffc0ad1c <== NOT EXECUTED va_end(arglist); } ffc0afa0: 80 01 00 7c lwz r0,124(r1) <== NOT EXECUTED ffc0afa4: 38 21 00 78 addi r1,r1,120 <== NOT EXECUTED ffc0afa8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0afac: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc184c8 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { ffc184c8: 94 21 ff d0 stwu r1,-48(r1) ffc184cc: 7c 08 02 a6 mflr r0 ffc184d0: 93 e1 00 2c stw r31,44(r1) register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) ffc184d4: 7c 7f 1b 79 mr. r31,r3 ffc184d8: 38 60 00 03 li r3,3 uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { ffc184dc: 93 c1 00 28 stw r30,40(r1) ffc184e0: 7c be 2b 78 mr r30,r5 ffc184e4: 90 01 00 34 stw r0,52(r1) ffc184e8: 93 61 00 1c stw r27,28(r1) ffc184ec: 93 81 00 20 stw r28,32(r1) ffc184f0: 93 a1 00 24 stw r29,36(r1) register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) ffc184f4: 41 82 00 40 beq- ffc18534 return RTEMS_INVALID_NAME; if ( !starting_address ) ffc184f8: 2f 84 00 00 cmpwi cr7,r4,0 ffc184fc: 41 9e 00 34 beq- cr7,ffc18530 return RTEMS_INVALID_ADDRESS; if ( !id ) ffc18500: 2f 88 00 00 cmpwi cr7,r8,0 ffc18504: 41 9e 00 2c beq- cr7,ffc18530 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || ffc18508: 2f 85 00 00 cmpwi cr7,r5,0 ffc1850c: 41 9e 00 4c beq- cr7,ffc18558 ffc18510: 2f 86 00 00 cmpwi cr7,r6,0 ffc18514: 41 9e 00 44 beq- cr7,ffc18558 ffc18518: 7f 85 30 40 cmplw cr7,r5,r6 ffc1851c: 41 9c 00 3c blt- cr7,ffc18558 ffc18520: 70 c0 00 07 andi. r0,r6,7 ffc18524: 40 82 00 34 bne- ffc18558 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) ffc18528: 70 9b 00 07 andi. r27,r4,7 ffc1852c: 41 82 00 54 beq- ffc18580 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc18530: 38 60 00 09 li r3,9 } ffc18534: 80 01 00 34 lwz r0,52(r1) ffc18538: 83 61 00 1c lwz r27,28(r1) ffc1853c: 7c 08 03 a6 mtlr r0 ffc18540: 83 81 00 20 lwz r28,32(r1) ffc18544: 83 a1 00 24 lwz r29,36(r1) ffc18548: 83 c1 00 28 lwz r30,40(r1) ffc1854c: 83 e1 00 2c lwz r31,44(r1) ffc18550: 38 21 00 30 addi r1,r1,48 ffc18554: 4e 80 00 20 blr ffc18558: 80 01 00 34 lwz r0,52(r1) 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc1855c: 38 60 00 08 li r3,8 } ffc18560: 83 61 00 1c lwz r27,28(r1) ffc18564: 7c 08 03 a6 mtlr r0 ffc18568: 83 81 00 20 lwz r28,32(r1) ffc1856c: 83 a1 00 24 lwz r29,36(r1) ffc18570: 83 c1 00 28 lwz r30,40(r1) ffc18574: 83 e1 00 2c lwz r31,44(r1) ffc18578: 38 21 00 30 addi r1,r1,48 ffc1857c: 4e 80 00 20 blr ffc18580: 3d 20 00 00 lis r9,0 ffc18584: 81 69 28 68 lwz r11,10344(r9) ffc18588: 38 0b 00 01 addi r0,r11,1 ffc1858c: 90 09 28 68 stw r0,10344(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 ); ffc18590: 3f 80 00 00 lis r28,0 ffc18594: 90 81 00 08 stw r4,8(r1) ffc18598: 3b 9c 6e ec addi r28,r28,28396 ffc1859c: 7f 83 e3 78 mr r3,r28 ffc185a0: 90 c1 00 0c stw r6,12(r1) ffc185a4: 90 e1 00 10 stw r7,16(r1) ffc185a8: 91 01 00 14 stw r8,20(r1) ffc185ac: 48 00 5d 21 bl ffc1e2cc <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { ffc185b0: 7c 7d 1b 79 mr. r29,r3 ffc185b4: 80 81 00 08 lwz r4,8(r1) ffc185b8: 80 c1 00 0c lwz r6,12(r1) ffc185bc: 80 e1 00 10 lwz r7,16(r1) ffc185c0: 81 01 00 14 lwz r8,20(r1) ffc185c4: 41 82 00 50 beq- ffc18614 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, ffc185c8: 7c be 33 96 divwu r5,r30,r6 #endif the_partition->starting_address = starting_address; the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; ffc185cc: 90 fd 00 1c stw r7,28(r29) _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; ffc185d0: 90 9d 00 10 stw r4,16(r29) the_partition->length = length; the_partition->buffer_size = buffer_size; ffc185d4: 90 dd 00 18 stw r6,24(r29) the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; ffc185d8: 93 7d 00 20 stw r27,32(r29) return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; ffc185dc: 93 dd 00 14 stw r30,20(r29) 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, ffc185e0: 91 01 00 14 stw r8,20(r1) ffc185e4: 38 7d 00 24 addi r3,r29,36 ffc185e8: 48 00 42 55 bl ffc1c83c <_Chain_Initialize> ffc185ec: 80 1d 00 08 lwz r0,8(r29) ffc185f0: 81 7c 00 1c lwz r11,28(r28) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; ffc185f4: 81 01 00 14 lwz r8,20(r1) ffc185f8: 54 09 13 ba rlwinm r9,r0,2,14,29 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc185fc: 93 fd 00 0c stw r31,12(r29) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc18600: 7f ab 49 2e stwx r29,r11,r9 ffc18604: 90 08 00 00 stw r0,0(r8) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); ffc18608: 48 00 6f 99 bl ffc1f5a0 <_Thread_Enable_dispatch> ffc1860c: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc18610: 4b ff ff 24 b ffc18534 _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); ffc18614: 48 00 6f 8d bl ffc1f5a0 <_Thread_Enable_dispatch> ffc18618: 38 60 00 05 li r3,5 return RTEMS_TOO_MANY; ffc1861c: 4b ff ff 18 b ffc18534 =============================================================================== ffc187ac : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { ffc187ac: 94 21 ff e0 stwu r1,-32(r1) ffc187b0: 7c 08 02 a6 mflr r0 ffc187b4: 90 01 00 24 stw r0,36(r1) ffc187b8: 7c 60 1b 78 mr r0,r3 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) ffc187bc: 3c 60 00 00 lis r3,0 ffc187c0: 93 e1 00 1c stw r31,28(r1) ffc187c4: 38 63 6e ec addi r3,r3,28396 ffc187c8: 7c 9f 23 78 mr r31,r4 ffc187cc: 38 a1 00 08 addi r5,r1,8 ffc187d0: 93 c1 00 18 stw r30,24(r1) ffc187d4: 7c 04 03 78 mr r4,r0 ffc187d8: 48 00 61 3d bl ffc1e914 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { ffc187dc: 80 01 00 08 lwz r0,8(r1) ffc187e0: 7c 7e 1b 78 mr r30,r3 ffc187e4: 2f 80 00 00 cmpwi cr7,r0,0 ffc187e8: 38 60 00 04 li r3,4 ffc187ec: 40 9e 00 58 bne- cr7,ffc18844 ) { void *starting; void *ending; starting = the_partition->starting_address; ffc187f0: 80 1e 00 10 lwz r0,16(r30) ending = _Addresses_Add_offset( starting, the_partition->length ); ffc187f4: 81 3e 00 14 lwz r9,20(r30) const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); ffc187f8: 7f 9f 00 40 cmplw cr7,r31,r0 ffc187fc: 41 9c 00 60 blt- cr7,ffc1885c ffc18800: 7d 20 4a 14 add r9,r0,r9 ffc18804: 7f 9f 48 40 cmplw cr7,r31,r9 ffc18808: 41 9d 00 54 bgt- cr7,ffc1885c <== NEVER TAKEN return ( ffc1880c: 81 3e 00 18 lwz r9,24(r30) ffc18810: 7c 00 f8 50 subf r0,r0,r31 ffc18814: 7d 60 4b 96 divwu r11,r0,r9 ffc18818: 7d 2b 49 d6 mullw r9,r11,r9 ffc1881c: 7f 80 48 00 cmpw cr7,r0,r9 ffc18820: 40 9e 00 3c bne- cr7,ffc1885c RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); ffc18824: 38 7e 00 24 addi r3,r30,36 ffc18828: 7f e4 fb 78 mr r4,r31 ffc1882c: 48 00 3f 9d bl ffc1c7c8 <_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; ffc18830: 81 3e 00 20 lwz r9,32(r30) ffc18834: 38 09 ff ff addi r0,r9,-1 ffc18838: 90 1e 00 20 stw r0,32(r30) _Thread_Enable_dispatch(); ffc1883c: 48 00 6d 65 bl ffc1f5a0 <_Thread_Enable_dispatch> ffc18840: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc18844: 80 01 00 24 lwz r0,36(r1) ffc18848: 83 c1 00 18 lwz r30,24(r1) ffc1884c: 7c 08 03 a6 mtlr r0 ffc18850: 83 e1 00 1c lwz r31,28(r1) ffc18854: 38 21 00 20 addi r1,r1,32 ffc18858: 4e 80 00 20 blr _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc1885c: 48 00 6d 45 bl ffc1f5a0 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc18860: 80 01 00 24 lwz r0,36(r1) _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc18864: 38 60 00 09 li r3,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc18868: 83 c1 00 18 lwz r30,24(r1) ffc1886c: 7c 08 03 a6 mtlr r0 ffc18870: 83 e1 00 1c lwz r31,28(r1) ffc18874: 38 21 00 20 addi r1,r1,32 ffc18878: 4e 80 00 20 blr =============================================================================== ffc10634 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { ffc10634: 7c 08 02 a6 mflr r0 ffc10638: 94 21 ff f8 stwu r1,-8(r1) if (!rtems_pipe_configured) ffc1063c: 3d 20 00 00 lis r9,0 /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { ffc10640: 90 01 00 0c stw r0,12(r1) if (!rtems_pipe_configured) ffc10644: 88 09 27 04 lbz r0,9988(r9) ffc10648: 2f 80 00 00 cmpwi cr7,r0,0 ffc1064c: 41 9e 00 18 beq- cr7,ffc10664 <== ALWAYS TAKEN return; if (rtems_pipe_semaphore) ffc10650: 3c e0 00 00 lis r7,0 <== NOT EXECUTED ffc10654: 80 07 29 94 lwz r0,10644(r7) <== NOT EXECUTED ffc10658: 38 e7 29 94 addi r7,r7,10644 <== NOT EXECUTED ffc1065c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc10660: 41 9e 00 14 beq- cr7,ffc10674 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); rtems_pipe_no = now; } ffc10664: 80 01 00 0c lwz r0,12(r1) ffc10668: 38 21 00 08 addi r1,r1,8 ffc1066c: 7c 08 03 a6 mtlr r0 ffc10670: 4e 80 00 20 blr if (rtems_pipe_semaphore) return; rtems_status_code sc; sc = rtems_semaphore_create( ffc10674: 3c 60 50 49 lis r3,20553 <== NOT EXECUTED ffc10678: 60 63 50 45 ori r3,r3,20549 <== NOT EXECUTED ffc1067c: 38 80 00 01 li r4,1 <== NOT EXECUTED ffc10680: 38 a0 00 54 li r5,84 <== NOT EXECUTED ffc10684: 38 c0 00 00 li r6,0 <== NOT EXECUTED ffc10688: 4b ff 7d 8d bl ffc08414 <== NOT EXECUTED rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) ffc1068c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc10690: 40 9e 00 20 bne- cr7,ffc106b0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); ffc10694: 4b ff 78 65 bl ffc07ef8 <== NOT EXECUTED rtems_pipe_no = now; } ffc10698: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); rtems_pipe_no = now; ffc1069c: 3d 20 00 00 lis r9,0 <== NOT EXECUTED } ffc106a0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); rtems_pipe_no = now; ffc106a4: b0 69 27 f8 sth r3,10232(r9) <== NOT EXECUTED } ffc106a8: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc106ac: 4e 80 00 20 blr <== NOT EXECUTED sc = rtems_semaphore_create( rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); ffc106b0: 4b ff 89 89 bl ffc09038 <== NOT EXECUTED =============================================================================== ffc09c64 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { ffc09c64: 94 21 ff d0 stwu r1,-48(r1) ffc09c68: 7c 08 02 a6 mflr r0 ffc09c6c: 93 e1 00 2c stw r31,44(r1) ffc09c70: 7c 7f 1b 78 mr r31,r3 RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) ffc09c74: 3c 60 00 00 lis r3,0 ffc09c78: 93 c1 00 28 stw r30,40(r1) ffc09c7c: 38 63 2c 64 addi r3,r3,11364 ffc09c80: 7c 9e 23 78 mr r30,r4 ffc09c84: 38 a1 00 08 addi r5,r1,8 ffc09c88: 90 01 00 34 stw r0,52(r1) ffc09c8c: 7f e4 fb 78 mr r4,r31 ffc09c90: 93 a1 00 24 stw r29,36(r1) ffc09c94: 93 61 00 1c stw r27,28(r1) ffc09c98: 93 81 00 20 stw r28,32(r1) ffc09c9c: 48 00 2c 99 bl ffc0c934 <_Objects_Get> ffc09ca0: 7c 7d 1b 78 mr r29,r3 rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { ffc09ca4: 80 01 00 08 lwz r0,8(r1) ffc09ca8: 2f 80 00 00 cmpwi cr7,r0,0 ffc09cac: 40 9e 00 48 bne- cr7,ffc09cf4 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { ffc09cb0: 3f 80 00 00 lis r28,0 ffc09cb4: 81 23 00 40 lwz r9,64(r3) ffc09cb8: 80 1c 28 34 lwz r0,10292(r28) ffc09cbc: 7f 89 00 00 cmpw cr7,r9,r0 ffc09cc0: 41 9e 00 60 beq- cr7,ffc09d20 _Thread_Enable_dispatch(); ffc09cc4: 48 00 38 3d bl ffc0d500 <_Thread_Enable_dispatch> ffc09cc8: 3b e0 00 17 li r31,23 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc09ccc: 80 01 00 34 lwz r0,52(r1) ffc09cd0: 7f e3 fb 78 mr r3,r31 ffc09cd4: 83 61 00 1c lwz r27,28(r1) ffc09cd8: 7c 08 03 a6 mtlr r0 ffc09cdc: 83 81 00 20 lwz r28,32(r1) ffc09ce0: 83 a1 00 24 lwz r29,36(r1) ffc09ce4: 83 c1 00 28 lwz r30,40(r1) ffc09ce8: 83 e1 00 2c lwz r31,44(r1) ffc09cec: 38 21 00 30 addi r1,r1,48 ffc09cf0: 4e 80 00 20 blr ffc09cf4: 80 01 00 34 lwz r0,52(r1) the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; ffc09cf8: 3b e0 00 04 li r31,4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc09cfc: 7f e3 fb 78 mr r3,r31 ffc09d00: 83 61 00 1c lwz r27,28(r1) ffc09d04: 7c 08 03 a6 mtlr r0 ffc09d08: 83 81 00 20 lwz r28,32(r1) ffc09d0c: 83 a1 00 24 lwz r29,36(r1) ffc09d10: 83 c1 00 28 lwz r30,40(r1) ffc09d14: 83 e1 00 2c lwz r31,44(r1) ffc09d18: 38 21 00 30 addi r1,r1,48 ffc09d1c: 4e 80 00 20 blr if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { ffc09d20: 2f 9e 00 00 cmpwi cr7,r30,0 ffc09d24: 41 9e 00 b4 beq- cr7,ffc09dd8 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc09d28: 7f 60 00 a6 mfmsr r27 ffc09d2c: 7c 10 42 a6 mfsprg r0,0 ffc09d30: 7f 60 00 78 andc r0,r27,r0 ffc09d34: 7c 00 01 24 mtmsr r0 _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); switch ( the_period->state ) { ffc09d38: 80 03 00 38 lwz r0,56(r3) ffc09d3c: 2f 80 00 02 cmpwi cr7,r0,2 ffc09d40: 41 9e 00 c0 beq- cr7,ffc09e00 ffc09d44: 2f 80 00 04 cmpwi cr7,r0,4 ffc09d48: 41 9e 00 5c beq- cr7,ffc09da4 ffc09d4c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09d50: 40 be ff a4 bne- cr7,ffc09cf4 <== NEVER TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09d54: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); ffc09d58: 4b ff fc 1d bl ffc09974 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; ffc09d5c: 39 20 00 02 li r9,2 ffc09d60: 91 3d 00 38 stw r9,56(r29) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc09d64: 3d 20 ff c1 lis r9,-63 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc09d68: 38 00 00 00 li r0,0 the_watchdog->routine = routine; ffc09d6c: 39 29 a2 68 addi r9,r9,-23960 the_watchdog->id = id; ffc09d70: 93 fd 00 30 stw r31,48(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc09d74: 3c 60 00 00 lis r3,0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc09d78: 91 3d 00 2c stw r9,44(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc09d7c: 38 63 2e 68 addi r3,r3,11880 ffc09d80: 38 9d 00 10 addi r4,r29,16 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; ffc09d84: 90 1d 00 34 stw r0,52(r29) ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc09d88: 3b e0 00 00 li r31,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc09d8c: 93 dd 00 1c stw r30,28(r29) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc09d90: 90 1d 00 18 stw r0,24(r29) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; ffc09d94: 93 dd 00 3c stw r30,60(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc09d98: 48 00 4f d1 bl ffc0ed68 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc09d9c: 48 00 37 65 bl ffc0d500 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc09da0: 4b ff ff 2c b ffc09ccc case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); ffc09da4: 4b ff fd 79 bl ffc09b1c <_Rate_monotonic_Update_statistics> ffc09da8: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; ffc09dac: 38 00 00 02 li r0,2 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc09db0: 93 dd 00 1c stw r30,28(r29) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc09db4: 3c 60 00 00 lis r3,0 ffc09db8: 90 1d 00 38 stw r0,56(r29) ffc09dbc: 38 63 2e 68 addi r3,r3,11880 ffc09dc0: 38 9d 00 10 addi r4,r29,16 the_period->next_length = length; ffc09dc4: 93 dd 00 3c stw r30,60(r29) _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc09dc8: 3b e0 00 06 li r31,6 ffc09dcc: 48 00 4f 9d bl ffc0ed68 <_Watchdog_Insert> ffc09dd0: 48 00 37 31 bl ffc0d500 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; ffc09dd4: 4b ff fe f8 b ffc09ccc _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { ffc09dd8: 80 03 00 38 lwz r0,56(r3) ffc09ddc: 3b e0 00 00 li r31,0 ffc09de0: 2b 80 00 04 cmplwi cr7,r0,4 ffc09de4: 41 bd ff b8 bgt- cr7,ffc09d9c <== NEVER TAKEN ffc09de8: 3d 20 ff c2 lis r9,-62 ffc09dec: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc09df0: 39 29 4d 54 addi r9,r9,19796 ffc09df4: 7f e9 00 2e lwzx r31,r9,r0 ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc09df8: 48 00 37 09 bl ffc0d500 <_Thread_Enable_dispatch> ffc09dfc: 4b ff fe d0 b ffc09ccc case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); ffc09e00: 4b ff fd 1d bl ffc09b1c <_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; ffc09e04: 38 00 00 01 li r0,1 the_period->next_length = length; ffc09e08: 93 dd 00 3c stw r30,60(r29) /* * 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; ffc09e0c: 90 1d 00 38 stw r0,56(r29) ffc09e10: 7f 60 01 24 mtmsr r27 the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; ffc09e14: 81 3c 28 34 lwz r9,10292(r28) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc09e18: 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; ffc09e1c: 80 1d 00 08 lwz r0,8(r29) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc09e20: 7d 23 4b 78 mr r3,r9 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; ffc09e24: 90 09 00 20 stw r0,32(r9) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc09e28: 48 00 42 ad bl ffc0e0d4 <_Thread_Set_state> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc09e2c: 7d 20 00 a6 mfmsr r9 ffc09e30: 7c 10 42 a6 mfsprg r0,0 ffc09e34: 7d 20 00 78 andc r0,r9,r0 ffc09e38: 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; ffc09e3c: 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; ffc09e40: 80 1d 00 38 lwz r0,56(r29) the_period->state = RATE_MONOTONIC_ACTIVE; ffc09e44: 91 7d 00 38 stw r11,56(r29) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09e48: 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 ) ffc09e4c: 2f 80 00 03 cmpwi cr7,r0,3 ffc09e50: 41 9e 00 10 beq- cr7,ffc09e60 <== NEVER TAKEN _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); ffc09e54: 48 00 36 ad bl ffc0d500 <_Thread_Enable_dispatch> ffc09e58: 3b e0 00 00 li r31,0 return RTEMS_SUCCESSFUL; ffc09e5c: 4b ff fe 70 b ffc09ccc /* * 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 ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc09e60: 80 7c 28 34 lwz r3,10292(r28) <== NOT EXECUTED ffc09e64: 38 80 40 00 li r4,16384 <== NOT EXECUTED ffc09e68: 48 00 31 85 bl ffc0cfec <_Thread_Clear_state> <== NOT EXECUTED ffc09e6c: 4b ff ff e8 b ffc09e54 <== NOT EXECUTED =============================================================================== ffc09e70 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc09e70: 94 21 ff 58 stwu r1,-168(r1) ffc09e74: 7c 08 02 a6 mflr r0 ffc09e78: 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 ) ffc09e7c: 7c 80 23 79 mr. r0,r4 */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc09e80: 93 a1 00 9c stw r29,156(r1) ffc09e84: 7c 7d 1b 78 mr r29,r3 ffc09e88: 92 41 00 70 stw r18,112(r1) ffc09e8c: 92 61 00 74 stw r19,116(r1) ffc09e90: 92 81 00 78 stw r20,120(r1) ffc09e94: 92 a1 00 7c stw r21,124(r1) ffc09e98: 92 c1 00 80 stw r22,128(r1) ffc09e9c: 92 e1 00 84 stw r23,132(r1) ffc09ea0: 93 01 00 88 stw r24,136(r1) ffc09ea4: 93 21 00 8c stw r25,140(r1) ffc09ea8: 93 41 00 90 stw r26,144(r1) ffc09eac: 93 61 00 94 stw r27,148(r1) ffc09eb0: 93 81 00 98 stw r28,152(r1) ffc09eb4: 93 c1 00 a0 stw r30,160(r1) ffc09eb8: 93 e1 00 a4 stw r31,164(r1) rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) ffc09ebc: 90 01 00 68 stw r0,104(r1) ffc09ec0: 41 82 01 88 beq- ffc0a048 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); ffc09ec4: 3c 80 ff c2 lis r4,-62 ffc09ec8: 7c 09 03 a6 mtctr r0 ffc09ecc: 38 84 4d 68 addi r4,r4,19816 /* * 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 ; ffc09ed0: 3f c0 00 00 lis r30,0 ffc09ed4: 3b de 2c 64 addi r30,r30,11364 char name[5]; if ( !print ) return; (*print)( context, "Period information by period\n" ); ffc09ed8: 4c c6 31 82 crclr 4*cr1+eq ffc09edc: 4e 80 04 21 bctrl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); ffc09ee0: 80 01 00 68 lwz r0,104(r1) ffc09ee4: 3c 80 ff c2 lis r4,-62 ffc09ee8: 7c 09 03 a6 mtctr r0 ffc09eec: 38 84 4d 88 addi r4,r4,19848 ffc09ef0: 7f a3 eb 78 mr r3,r29 ffc09ef4: 4c c6 31 82 crclr 4*cr1+eq ffc09ef8: 4e 80 04 21 bctrl (*print)( context, "--- Wall times are in seconds ---\n" ); ffc09efc: 80 01 00 68 lwz r0,104(r1) ffc09f00: 3c 80 ff c2 lis r4,-62 ffc09f04: 7c 09 03 a6 mtctr r0 ffc09f08: 38 84 4d ac addi r4,r4,19884 ffc09f0c: 7f a3 eb 78 mr r3,r29 ffc09f10: 4c c6 31 82 crclr 4*cr1+eq ffc09f14: 4e 80 04 21 bctrl Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " ffc09f18: 80 01 00 68 lwz r0,104(r1) ffc09f1c: 3c 80 ff c2 lis r4,-62 ffc09f20: 7c 09 03 a6 mtctr r0 ffc09f24: 38 84 4d d0 addi r4,r4,19920 ffc09f28: 7f a3 eb 78 mr r3,r29 ffc09f2c: 4c c6 31 82 crclr 4*cr1+eq ffc09f30: 4e 80 04 21 bctrl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " ffc09f34: 80 01 00 68 lwz r0,104(r1) ffc09f38: 3c 80 ff c2 lis r4,-62 ffc09f3c: 7c 09 03 a6 mtctr r0 ffc09f40: 38 84 4e 1c addi r4,r4,19996 ffc09f44: 7f a3 eb 78 mr r3,r29 ffc09f48: 4c c6 31 82 crclr 4*cr1+eq ffc09f4c: 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 ; ffc09f50: 83 fe 00 08 lwz r31,8(r30) ffc09f54: 80 1e 00 0c lwz r0,12(r30) ffc09f58: 7f 9f 00 40 cmplw cr7,r31,r0 ffc09f5c: 41 9d 00 ec bgt- cr7,ffc0a048 <== NEVER TAKEN rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc09f60: 3e a0 ff c2 lis r21,-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, ffc09f64: 3e 60 ff c2 lis r19,-62 ffc09f68: 3f 60 10 62 lis r27,4194 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, ffc09f6c: 3e 80 ff c2 lis r20,-62 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc09f70: 3e c0 ff c2 lis r22,-62 rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc09f74: 3a b5 4e 68 addi r21,r21,20072 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, ffc09f78: 3a 73 4e 80 addi r19,r19,20096 ffc09f7c: 63 7b 4d d3 ori r27,r27,19923 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, ffc09f80: 3a 94 4e a0 addi r20,r20,20128 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc09f84: 3a d6 3a f0 addi r22,r22,15088 ffc09f88: 3b 81 00 30 addi r28,r1,48 status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); ffc09f8c: 3a e1 00 18 addi r23,r1,24 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); ffc09f90: 3b 41 00 08 addi r26,r1,8 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 ); ffc09f94: 3b 01 00 48 addi r24,r1,72 ffc09f98: 3b 21 00 10 addi r25,r1,16 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); ffc09f9c: 3a 41 00 60 addi r18,r1,96 ffc09fa0: 48 00 00 14 b ffc09fb4 /* * 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 ; ffc09fa4: 80 1e 00 0c lwz r0,12(r30) id <= _Rate_monotonic_Information.maximum_id ; id++ ) { ffc09fa8: 3b ff 00 01 addi r31,r31,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 ; ffc09fac: 7f 80 f8 40 cmplw cr7,r0,r31 ffc09fb0: 41 9c 00 98 blt- cr7,ffc0a048 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); ffc09fb4: 7f e3 fb 78 mr r3,r31 ffc09fb8: 7f 84 e3 78 mr r4,r28 ffc09fbc: 48 00 78 e5 bl ffc118a0 if ( status != RTEMS_SUCCESSFUL ) ffc09fc0: 2f 83 00 00 cmpwi cr7,r3,0 ffc09fc4: 40 9e ff e0 bne+ cr7,ffc09fa4 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); ffc09fc8: 7e e4 bb 78 mr r4,r23 ffc09fcc: 7f e3 fb 78 mr r3,r31 ffc09fd0: 48 00 79 b5 bl ffc11984 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); ffc09fd4: 80 61 00 18 lwz r3,24(r1) ffc09fd8: 7f 45 d3 78 mr r5,r26 ffc09fdc: 38 80 00 05 li r4,5 ffc09fe0: 48 00 03 51 bl ffc0a330 /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc09fe4: 80 01 00 68 lwz r0,104(r1) ffc09fe8: 7e a4 ab 78 mr r4,r21 ffc09fec: 80 e1 00 30 lwz r7,48(r1) ffc09ff0: 7f e5 fb 78 mr r5,r31 ffc09ff4: 7c 09 03 a6 mtctr r0 ffc09ff8: 7f a3 eb 78 mr r3,r29 ffc09ffc: 81 01 00 34 lwz r8,52(r1) ffc0a000: 7f 46 d3 78 mr r6,r26 ffc0a004: 4c c6 31 82 crclr 4*cr1+eq ffc0a008: 4e 80 04 21 bctrl ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc0a00c: 80 01 00 30 lwz r0,48(r1) 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 ); ffc0a010: 7f 03 c3 78 mr r3,r24 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc0a014: 2f 80 00 00 cmpwi cr7,r0,0 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 ); ffc0a018: 7f 25 cb 78 mr r5,r25 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc0a01c: 7e c4 b3 78 mr r4,r22 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc0a020: 40 9e 00 70 bne- cr7,ffc0a090 (*print)( context, "\n" ); ffc0a024: 80 01 00 68 lwz r0,104(r1) ffc0a028: 7f a3 eb 78 mr r3,r29 * 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++ ) { ffc0a02c: 3b ff 00 01 addi r31,r31,1 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc0a030: 7c 09 03 a6 mtctr r0 ffc0a034: 4c c6 31 82 crclr 4*cr1+eq ffc0a038: 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 ; ffc0a03c: 80 1e 00 0c lwz r0,12(r30) ffc0a040: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0a044: 40 9c ff 70 bge+ cr7,ffc09fb4 <== ALWAYS TAKEN the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } ffc0a048: 80 01 00 ac lwz r0,172(r1) ffc0a04c: 82 41 00 70 lwz r18,112(r1) ffc0a050: 7c 08 03 a6 mtlr r0 ffc0a054: 82 61 00 74 lwz r19,116(r1) ffc0a058: 82 81 00 78 lwz r20,120(r1) ffc0a05c: 82 a1 00 7c lwz r21,124(r1) ffc0a060: 82 c1 00 80 lwz r22,128(r1) ffc0a064: 82 e1 00 84 lwz r23,132(r1) ffc0a068: 83 01 00 88 lwz r24,136(r1) ffc0a06c: 83 21 00 8c lwz r25,140(r1) ffc0a070: 83 41 00 90 lwz r26,144(r1) ffc0a074: 83 61 00 94 lwz r27,148(r1) ffc0a078: 83 81 00 98 lwz r28,152(r1) ffc0a07c: 83 a1 00 9c lwz r29,156(r1) ffc0a080: 83 c1 00 a0 lwz r30,160(r1) ffc0a084: 83 e1 00 a4 lwz r31,164(r1) ffc0a088: 38 21 00 a8 addi r1,r1,168 ffc0a08c: 4e 80 00 20 blr 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 ); ffc0a090: 7c 04 03 78 mr r4,r0 ffc0a094: 48 00 46 bd bl ffc0e750 <_Timespec_Divide_by_integer> (*print)( context, ffc0a098: 80 01 00 14 lwz r0,20(r1) ffc0a09c: 80 81 00 3c lwz r4,60(r1) ffc0a0a0: 7f a3 eb 78 mr r3,r29 ffc0a0a4: 81 61 00 44 lwz r11,68(r1) ffc0a0a8: 7d 40 d8 96 mulhw r10,r0,r27 ffc0a0ac: 80 e1 00 40 lwz r7,64(r1) ffc0a0b0: 7c c4 d8 96 mulhw r6,r4,r27 ffc0a0b4: 81 21 00 10 lwz r9,16(r1) ffc0a0b8: 80 a1 00 38 lwz r5,56(r1) ffc0a0bc: 7d 0b d8 96 mulhw r8,r11,r27 ffc0a0c0: 7c 00 fe 70 srawi r0,r0,31 ffc0a0c4: 7d 4a 36 70 srawi r10,r10,6 ffc0a0c8: 7d 40 50 50 subf r10,r0,r10 ffc0a0cc: 80 01 00 68 lwz r0,104(r1) ffc0a0d0: 7d 6b fe 70 srawi r11,r11,31 ffc0a0d4: 7c 84 fe 70 srawi r4,r4,31 ffc0a0d8: 7c 09 03 a6 mtctr r0 ffc0a0dc: 7c c6 36 70 srawi r6,r6,6 ffc0a0e0: 7d 08 36 70 srawi r8,r8,6 ffc0a0e4: 7c c4 30 50 subf r6,r4,r6 ffc0a0e8: 7d 0b 40 50 subf r8,r11,r8 ffc0a0ec: 7e 64 9b 78 mr r4,r19 ffc0a0f0: 4c c6 31 82 crclr 4*cr1+eq ffc0a0f4: 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); ffc0a0f8: 80 81 00 30 lwz r4,48(r1) ffc0a0fc: 7e 43 93 78 mr r3,r18 ffc0a100: 7f 25 cb 78 mr r5,r25 ffc0a104: 48 00 46 4d bl ffc0e750 <_Timespec_Divide_by_integer> (*print)( context, ffc0a108: 80 01 00 14 lwz r0,20(r1) ffc0a10c: 80 81 00 54 lwz r4,84(r1) ffc0a110: 7f a3 eb 78 mr r3,r29 ffc0a114: 81 61 00 5c lwz r11,92(r1) ffc0a118: 7d 40 d8 96 mulhw r10,r0,r27 ffc0a11c: 80 a1 00 50 lwz r5,80(r1) ffc0a120: 7c c4 d8 96 mulhw r6,r4,r27 ffc0a124: 80 e1 00 58 lwz r7,88(r1) ffc0a128: 81 21 00 10 lwz r9,16(r1) ffc0a12c: 7d 0b d8 96 mulhw r8,r11,r27 ffc0a130: 7c 00 fe 70 srawi r0,r0,31 ffc0a134: 7d 4a 36 70 srawi r10,r10,6 ffc0a138: 7d 40 50 50 subf r10,r0,r10 ffc0a13c: 80 01 00 68 lwz r0,104(r1) ffc0a140: 7c 84 fe 70 srawi r4,r4,31 ffc0a144: 7d 6b fe 70 srawi r11,r11,31 ffc0a148: 7c 09 03 a6 mtctr r0 ffc0a14c: 7c c6 36 70 srawi r6,r6,6 ffc0a150: 7d 08 36 70 srawi r8,r8,6 ffc0a154: 7c c4 30 50 subf r6,r4,r6 ffc0a158: 7d 0b 40 50 subf r8,r11,r8 ffc0a15c: 7e 84 a3 78 mr r4,r20 ffc0a160: 4c c6 31 82 crclr 4*cr1+eq ffc0a164: 4e 80 04 21 bctrl ffc0a168: 4b ff fe 3c b ffc09fa4 =============================================================================== ffc0a17c : ffc0a17c: 3d 20 00 00 lis r9,0 /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { ffc0a180: 94 21 ff f0 stwu r1,-16(r1) ffc0a184: 7c 08 02 a6 mflr r0 ffc0a188: 81 69 27 f4 lwz r11,10228(r9) ffc0a18c: 90 01 00 14 stw r0,20(r1) ffc0a190: 38 0b 00 01 addi r0,r11,1 ffc0a194: 93 c1 00 08 stw r30,8(r1) ffc0a198: 93 e1 00 0c stw r31,12(r1) ffc0a19c: 90 09 27 f4 stw r0,10228(r9) /* * Cycle through all possible ids and try to reset 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 ; ffc0a1a0: 3f c0 00 00 lis r30,0 ffc0a1a4: 3b de 2c 64 addi r30,r30,11364 ffc0a1a8: 83 fe 00 08 lwz r31,8(r30) ffc0a1ac: 80 1e 00 0c lwz r0,12(r30) ffc0a1b0: 7f 9f 00 40 cmplw cr7,r31,r0 ffc0a1b4: 41 9d 00 1c bgt- cr7,ffc0a1d0 <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); ffc0a1b8: 7f e3 fb 78 mr r3,r31 ffc0a1bc: 48 00 00 31 bl ffc0a1ec /* * Cycle through all possible ids and try to reset 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 ; ffc0a1c0: 80 1e 00 0c lwz r0,12(r30) id <= _Rate_monotonic_Information.maximum_id ; id++ ) { ffc0a1c4: 3b ff 00 01 addi r31,r31,1 /* * Cycle through all possible ids and try to reset 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 ; ffc0a1c8: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0a1cc: 40 9c ff ec bge+ cr7,ffc0a1b8 } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); ffc0a1d0: 48 00 33 31 bl ffc0d500 <_Thread_Enable_dispatch> } ffc0a1d4: 80 01 00 14 lwz r0,20(r1) ffc0a1d8: 83 c1 00 08 lwz r30,8(r1) ffc0a1dc: 7c 08 03 a6 mtlr r0 ffc0a1e0: 83 e1 00 0c lwz r31,12(r1) ffc0a1e4: 38 21 00 10 addi r1,r1,16 ffc0a1e8: 4e 80 00 20 blr =============================================================================== ffc198dc : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { ffc198dc: 94 21 ff d8 stwu r1,-40(r1) ffc198e0: 7c 08 02 a6 mflr r0 ffc198e4: 93 a1 00 1c stw r29,28(r1) Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) ffc198e8: 7c 9d 23 79 mr. r29,r4 rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { ffc198ec: 93 81 00 18 stw r28,24(r1) ffc198f0: 7c 7c 1b 78 mr r28,r3 ffc198f4: 93 c1 00 20 stw r30,32(r1) ffc198f8: 7c be 2b 78 mr r30,r5 ffc198fc: 90 01 00 2c stw r0,44(r1) ffc19900: 93 e1 00 24 stw r31,36(r1) Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) ffc19904: 41 82 00 94 beq- ffc19998 return RTEMS_INVALID_ADDRESS; if ( !size ) ffc19908: 2f 85 00 00 cmpwi cr7,r5,0 ffc1990c: 41 9e 00 8c beq- cr7,ffc19998 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); ffc19910: 3f e0 00 00 lis r31,0 ffc19914: 80 7f 28 a0 lwz r3,10400(r31) ffc19918: 48 00 2d f1 bl ffc1c708 <_API_Mutex_Lock> ffc1991c: 3c 60 00 00 lis r3,0 ffc19920: 38 63 6f 6c addi r3,r3,28524 ffc19924: 7f 84 e3 78 mr r4,r28 ffc19928: 38 a1 00 08 addi r5,r1,8 ffc1992c: 48 00 4f a1 bl ffc1e8cc <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { ffc19930: 80 01 00 08 lwz r0,8(r1) ffc19934: 2f 80 00 00 cmpwi cr7,r0,0 ffc19938: 40 9e 00 50 bne- cr7,ffc19988 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) ffc1993c: 7f c5 f3 78 mr r5,r30 ffc19940: 38 63 00 68 addi r3,r3,104 ffc19944: 7f a4 eb 78 mr r4,r29 ffc19948: 48 00 48 b9 bl ffc1e200 <_Heap_Size_of_alloc_area> ffc1994c: 3b c0 00 09 li r30,9 ffc19950: 2f 83 00 00 cmpwi cr7,r3,0 ffc19954: 41 9e 00 08 beq- cr7,ffc1995c <== NEVER TAKEN ffc19958: 3b c0 00 00 li r30,0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); ffc1995c: 80 7f 28 a0 lwz r3,10400(r31) ffc19960: 48 00 2e 29 bl ffc1c788 <_API_Mutex_Unlock> return return_status; } ffc19964: 80 01 00 2c lwz r0,44(r1) ffc19968: 7f c3 f3 78 mr r3,r30 ffc1996c: 83 81 00 18 lwz r28,24(r1) ffc19970: 7c 08 03 a6 mtlr r0 ffc19974: 83 a1 00 1c lwz r29,28(r1) ffc19978: 83 c1 00 20 lwz r30,32(r1) ffc1997c: 83 e1 00 24 lwz r31,36(r1) ffc19980: 38 21 00 28 addi r1,r1,40 ffc19984: 4e 80 00 20 blr return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { ffc19988: 2f 80 00 01 cmpwi cr7,r0,1 ffc1998c: 3b c0 00 04 li r30,4 ffc19990: 40 9e ff c8 bne+ cr7,ffc19958 <== NEVER TAKEN ffc19994: 4b ff ff c8 b ffc1995c break; } _RTEMS_Unlock_allocator(); return return_status; } ffc19998: 80 01 00 2c lwz r0,44(r1) return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; ffc1999c: 3b c0 00 09 li r30,9 } ffc199a0: 7f c3 f3 78 mr r3,r30 ffc199a4: 83 81 00 18 lwz r28,24(r1) ffc199a8: 7c 08 03 a6 mtlr r0 ffc199ac: 83 a1 00 1c lwz r29,28(r1) ffc199b0: 83 c1 00 20 lwz r30,32(r1) ffc199b4: 83 e1 00 24 lwz r31,36(r1) ffc199b8: 38 21 00 28 addi r1,r1,40 ffc199bc: 4e 80 00 20 blr =============================================================================== ffc1a260 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { ffc1a260: 94 21 ff e0 stwu r1,-32(r1) ffc1a264: 7c 08 02 a6 mflr r0 ffc1a268: 93 e1 00 1c stw r31,28(r1) register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) ffc1a26c: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { ffc1a270: 90 01 00 24 stw r0,36(r1) register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) ffc1a274: 38 00 00 0a li r0,10 ffc1a278: 40 82 00 1c bne- ffc1a294 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1a27c: 7c 03 03 78 mr r3,r0 ffc1a280: 80 01 00 24 lwz r0,36(r1) ffc1a284: 83 e1 00 1c lwz r31,28(r1) ffc1a288: 38 21 00 20 addi r1,r1,32 ffc1a28c: 7c 08 03 a6 mtlr r0 ffc1a290: 4e 80 00 20 blr ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); ffc1a294: 38 81 00 08 addi r4,r1,8 ffc1a298: 48 00 53 75 bl ffc1f60c <_Thread_Get> switch ( location ) { ffc1a29c: 81 21 00 08 lwz r9,8(r1) ffc1a2a0: 38 00 00 04 li r0,4 ffc1a2a4: 2f 89 00 00 cmpwi cr7,r9,0 ffc1a2a8: 40 be ff d4 bne- cr7,ffc1a27c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; ffc1a2ac: 81 23 01 44 lwz r9,324(r3) asr = &api->Signal; ffc1a2b0: 80 09 00 0c lwz r0,12(r9) ffc1a2b4: 2f 80 00 00 cmpwi cr7,r0,0 ffc1a2b8: 41 9e 00 a4 beq- cr7,ffc1a35c if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { ffc1a2bc: 88 09 00 08 lbz r0,8(r9) ffc1a2c0: 2f 80 00 00 cmpwi cr7,r0,0 ffc1a2c4: 41 9e 00 58 beq- cr7,ffc1a31c static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1a2c8: 7c 00 00 a6 mfmsr r0 ffc1a2cc: 7d 70 42 a6 mfsprg r11,0 ffc1a2d0: 7c 0b 58 78 andc r11,r0,r11 ffc1a2d4: 7d 60 01 24 mtmsr r11 ) { ISR_Level _level; _ISR_Disable( _level ); *signal_set |= signals; ffc1a2d8: 81 69 00 14 lwz r11,20(r9) ffc1a2dc: 7d 7f fb 78 or r31,r11,r31 ffc1a2e0: 93 e9 00 14 stw r31,20(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1a2e4: 7c 00 01 24 mtmsr r0 _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) ffc1a2e8: 3d 20 00 00 lis r9,0 ffc1a2ec: 81 29 28 90 lwz r9,10384(r9) if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; ffc1a2f0: 38 00 00 01 li r0,1 ffc1a2f4: 98 03 00 74 stb r0,116(r3) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) ffc1a2f8: 2f 89 00 00 cmpwi cr7,r9,0 ffc1a2fc: 41 9e 00 40 beq- cr7,ffc1a33c ffc1a300: 3d 20 00 00 lis r9,0 ffc1a304: 81 29 28 a8 lwz r9,10408(r9) ffc1a308: 7f 83 48 00 cmpw cr7,r3,r9 ffc1a30c: 40 be 00 30 bne+ cr7,ffc1a33c <== NEVER TAKEN _ISR_Signals_to_thread_executing = true; ffc1a310: 3d 20 00 00 lis r9,0 ffc1a314: 98 09 28 c4 stb r0,10436(r9) ffc1a318: 48 00 00 24 b ffc1a33c static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1a31c: 7c 00 00 a6 mfmsr r0 ffc1a320: 7d 70 42 a6 mfsprg r11,0 ffc1a324: 7c 0b 58 78 andc r11,r0,r11 ffc1a328: 7d 60 01 24 mtmsr r11 ffc1a32c: 81 69 00 18 lwz r11,24(r9) ffc1a330: 7d 7f fb 78 or r31,r11,r31 ffc1a334: 93 e9 00 18 stw r31,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1a338: 7c 00 01 24 mtmsr r0 } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); ffc1a33c: 48 00 52 65 bl ffc1f5a0 <_Thread_Enable_dispatch> ffc1a340: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1a344: 7c 03 03 78 mr r3,r0 ffc1a348: 80 01 00 24 lwz r0,36(r1) ffc1a34c: 83 e1 00 1c lwz r31,28(r1) ffc1a350: 38 21 00 20 addi r1,r1,32 ffc1a354: 7c 08 03 a6 mtlr r0 ffc1a358: 4e 80 00 20 blr _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc1a35c: 48 00 52 45 bl ffc1f5a0 <_Thread_Enable_dispatch> ffc1a360: 38 00 00 0b li r0,11 return RTEMS_NOT_DEFINED; ffc1a364: 4b ff ff 18 b ffc1a27c =============================================================================== ffc03ba8 : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { ffc03ba8: 7c 08 02 a6 mflr r0 ffc03bac: 94 21 ff f8 stwu r1,-8(r1) ffc03bb0: 90 01 00 0c stw r0,12(r1) Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ ffc03bb4: 80 03 00 08 lwz r0,8(r3) ffc03bb8: 2f 80 00 00 cmpwi cr7,r0,0 ffc03bbc: 41 9e 00 1c beq- cr7,ffc03bd8 <== NEVER TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; ffc03bc0: 80 63 00 d0 lwz r3,208(r3) ffc03bc4: 3c 80 00 00 lis r4,0 ffc03bc8: 38 84 2a fc addi r4,r4,11004 ffc03bcc: 38 63 00 08 addi r3,r3,8 ffc03bd0: 38 a0 00 80 li r5,128 ffc03bd4: 48 01 04 6d bl ffc14040 } ffc03bd8: 80 01 00 0c lwz r0,12(r1) ffc03bdc: 38 21 00 08 addi r1,r1,8 ffc03be0: 7c 08 03 a6 mtlr r0 ffc03be4: 4e 80 00 20 blr =============================================================================== ffc04170 : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { ffc04170: 94 21 ff f0 stwu r1,-16(r1) ffc04174: 7c 08 02 a6 mflr r0 ffc04178: 93 e1 00 0c stw r31,12(r1) ffc0417c: 7c 9f 23 78 mr r31,r4 ffc04180: 90 01 00 14 stw r0,20(r1) Stack_check_Initialize(); ffc04184: 4b ff f9 d5 bl ffc03b58 if (the_thread) ffc04188: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0418c: 41 9e 00 14 beq- cr7,ffc041a0 <== NEVER TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); ffc04190: 80 bf 00 cc lwz r5,204(r31) ffc04194: 38 80 00 a5 li r4,165 ffc04198: 80 7f 00 d0 lwz r3,208(r31) ffc0419c: 48 00 ff a5 bl ffc14140 return true; } ffc041a0: 80 01 00 14 lwz r0,20(r1) ffc041a4: 38 60 00 01 li r3,1 ffc041a8: 83 e1 00 0c lwz r31,12(r1) ffc041ac: 38 21 00 10 addi r1,r1,16 ffc041b0: 7c 08 03 a6 mtlr r0 ffc041b4: 4e 80 00 20 blr =============================================================================== ffc0400c : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { ffc0400c: 94 21 ff e8 stwu r1,-24(r1) ffc04010: 7c 08 02 a6 mflr r0 ffc04014: 93 c1 00 10 stw r30,16(r1) Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; ffc04018: 3f c0 00 00 lis r30,0 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { ffc0401c: 90 01 00 1c stw r0,28(r1) Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; ffc04020: 81 3e 27 b4 lwz r9,10164(r30) /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { ffc04024: 93 e1 00 14 stw r31,20(r1) ffc04028: 7c 3f 0b 78 mr r31,r1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { ffc0402c: 80 69 00 d0 lwz r3,208(r9) /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { ffc04030: 93 a1 00 0c stw r29,12(r1) ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { ffc04034: 3b a0 00 00 li r29,0 ffc04038: 7f 9f 18 40 cmplw cr7,r31,r3 ffc0403c: 41 9c 00 18 blt- cr7,ffc04054 <== NEVER TAKEN } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) ffc04040: 83 a9 00 cc lwz r29,204(r9) ffc04044: 7f a3 ea 14 add r29,r3,r29 ffc04048: 7f bf e8 10 subfc r29,r31,r29 ffc0404c: 3b a0 00 00 li r29,0 ffc04050: 7f bd e9 14 adde r29,r29,r29 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { ffc04054: 3d 20 00 00 lis r9,0 ffc04058: 80 09 28 84 lwz r0,10372(r9) ffc0405c: 38 80 00 01 li r4,1 ffc04060: 2f 80 00 00 cmpwi cr7,r0,0 ffc04064: 41 9e 00 20 beq- cr7,ffc04084 <== NEVER TAKEN pattern_ok = (!memcmp( ffc04068: 3c 80 00 00 lis r4,0 ffc0406c: 38 84 2a fc addi r4,r4,11004 ffc04070: 38 63 00 08 addi r3,r3,8 ffc04074: 38 a0 00 80 li r5,128 ffc04078: 48 00 ff 25 bl ffc13f9c ffc0407c: 7c 64 00 34 cntlzw r4,r3 ffc04080: 54 84 d9 7e rlwinm r4,r4,27,5,31 } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) ffc04084: 2f 9d 00 00 cmpwi cr7,r29,0 ffc04088: 41 9e 00 10 beq- cr7,ffc04098 <== NEVER TAKEN ffc0408c: 2f 84 00 00 cmpwi cr7,r4,0 ffc04090: 38 60 00 00 li r3,0 ffc04094: 40 9e 00 10 bne- cr7,ffc040a4 <== ALWAYS TAKEN return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); ffc04098: 80 7e 27 b4 lwz r3,10164(r30) <== NOT EXECUTED ffc0409c: 4b ff fe 91 bl ffc03f2c <== NOT EXECUTED ffc040a0: 38 60 00 01 li r3,1 <== NOT EXECUTED return true; } ffc040a4: 39 7f 00 18 addi r11,r31,24 ffc040a8: 80 0b 00 04 lwz r0,4(r11) ffc040ac: 83 ab ff f4 lwz r29,-12(r11) ffc040b0: 7c 08 03 a6 mtlr r0 ffc040b4: 83 cb ff f8 lwz r30,-8(r11) ffc040b8: 83 eb ff fc lwz r31,-4(r11) ffc040bc: 7d 61 5b 78 mr r1,r11 ffc040c0: 4e 80 00 20 blr =============================================================================== ffc03f1c : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); ffc03f1c: 3c 80 ff c0 lis r4,-64 <== NOT EXECUTED ffc03f20: 38 84 5a 24 addi r4,r4,23076 <== NOT EXECUTED ffc03f24: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc03f28: 4b ff ff 5c b ffc03e84 <== NOT EXECUTED =============================================================================== ffc03e84 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc03e84: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED ffc03e88: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc03e8c: 93 e1 00 14 stw r31,20(r1) <== NOT EXECUTED print_context = context; ffc03e90: 3f e0 00 00 lis r31,0 <== NOT EXECUTED ffc03e94: 3b ff 28 84 addi r31,r31,10372 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc03e98: 93 c1 00 10 stw r30,16(r1) <== NOT EXECUTED ffc03e9c: 7c 9e 23 78 mr r30,r4 <== NOT EXECUTED print_context = context; print_handler = print; (*print)( context, "Stack usage by thread\n"); ffc03ea0: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc03ea4: 7f c9 03 a6 mtctr r30 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc03ea8: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED print_context = context; print_handler = print; (*print)( context, "Stack usage by thread\n"); ffc03eac: 38 84 f7 04 addi r4,r4,-2300 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc03eb0: 93 a1 00 0c stw r29,12(r1) <== NOT EXECUTED ffc03eb4: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED print_context = context; print_handler = print; ffc03eb8: 93 df 00 04 stw r30,4(r31) <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; ffc03ebc: 90 7f 00 08 stw r3,8(r31) <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); ffc03ec0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc03ec4: 4e 80 04 21 bctrl <== NOT EXECUTED (*print)( context, ffc03ec8: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc03ecc: 7f c9 03 a6 mtctr r30 <== NOT EXECUTED ffc03ed0: 38 84 f7 1c addi r4,r4,-2276 <== NOT EXECUTED ffc03ed4: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc03ed8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc03edc: 4e 80 04 21 bctrl <== NOT EXECUTED " 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 ); ffc03ee0: 3c 60 ff c0 lis r3,-64 <== NOT EXECUTED ffc03ee4: 38 63 3c 38 addi r3,r3,15416 <== NOT EXECUTED ffc03ee8: 48 00 62 ed bl ffc0a1d4 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); ffc03eec: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc03ef0: 4b ff fd 49 bl ffc03c38 <== NOT EXECUTED print_context = NULL; ffc03ef4: 38 00 00 00 li r0,0 <== NOT EXECUTED print_handler = NULL; ffc03ef8: 90 1f 00 04 stw r0,4(r31) <== NOT EXECUTED rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); print_context = NULL; ffc03efc: 90 1f 00 08 stw r0,8(r31) <== NOT EXECUTED print_handler = NULL; } ffc03f00: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc03f04: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc03f08: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc03f0c: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc03f10: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc03f14: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc03f18: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc040c4 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { ffc040c4: 94 21 ff f0 stwu r1,-16(r1) ffc040c8: 7c 08 02 a6 mflr r0 ffc040cc: 90 01 00 14 stw r0,20(r1) Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; ffc040d0: 81 23 00 d0 lwz r9,208(r3) */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { ffc040d4: 93 e1 00 0c stw r31,12(r1) ffc040d8: 7c 3f 0b 78 mr r31,r1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { ffc040dc: 7f 9f 48 40 cmplw cr7,r31,r9 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { ffc040e0: 93 c1 00 08 stw r30,8(r1) ffc040e4: 7c 7e 1b 78 mr r30,r3 Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; ffc040e8: 38 69 00 08 addi r3,r9,8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { ffc040ec: 41 9c 00 14 blt- cr7,ffc04100 <== NEVER TAKEN void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { Stack_Control *the_stack = &running->Start.Initial_stack; ffc040f0: 80 1e 00 cc lwz r0,204(r30) ffc040f4: 7d 29 02 14 add r9,r9,r0 ffc040f8: 7f 9f 48 40 cmplw cr7,r31,r9 ffc040fc: 40 9d 00 3c ble- cr7,ffc04138 <== ALWAYS TAKEN /* * 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, ffc04100: 3c 80 00 00 lis r4,0 <== NOT EXECUTED ffc04104: 38 84 2a fc addi r4,r4,11004 <== NOT EXECUTED ffc04108: 38 a0 00 80 li r5,128 <== NOT EXECUTED ffc0410c: 48 00 fe 91 bl ffc13f9c <== NOT EXECUTED ffc04110: 7c 64 00 34 cntlzw r4,r3 <== NOT EXECUTED ffc04114: 54 84 d9 7e rlwinm r4,r4,27,5,31 <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); } } ffc04118: 39 7f 00 10 addi r11,r31,16 ffc0411c: 80 0b 00 04 lwz r0,4(r11) pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); ffc04120: 7f c3 f3 78 mr r3,r30 } } ffc04124: 83 eb ff fc lwz r31,-4(r11) ffc04128: 7c 08 03 a6 mtlr r0 ffc0412c: 83 cb ff f8 lwz r30,-8(r11) ffc04130: 7d 61 5b 78 mr r1,r11 pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); ffc04134: 4b ff fd f8 b ffc03f2c /* * 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, ffc04138: 3c 80 00 00 lis r4,0 ffc0413c: 38 84 2a fc addi r4,r4,11004 ffc04140: 38 a0 00 80 li r5,128 ffc04144: 48 00 fe 59 bl ffc13f9c (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { ffc04148: 38 80 00 00 li r4,0 ffc0414c: 2f 83 00 00 cmpwi cr7,r3,0 ffc04150: 40 9e ff c8 bne+ cr7,ffc04118 Stack_check_report_blown_task( running, pattern_ok ); } } ffc04154: 39 7f 00 10 addi r11,r31,16 ffc04158: 80 0b 00 04 lwz r0,4(r11) ffc0415c: 83 cb ff f8 lwz r30,-8(r11) ffc04160: 7c 08 03 a6 mtlr r0 ffc04164: 83 eb ff fc lwz r31,-4(r11) ffc04168: 7d 61 5b 78 mr r1,r11 ffc0416c: 4e 80 00 20 blr =============================================================================== ffc10394 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc10394: 94 21 ff d0 stwu r1,-48(r1) ffc10398: 7c 08 02 a6 mflr r0 ffc1039c: 93 c1 00 28 stw r30,40(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc103a0: 7c 9e 23 79 mr. r30,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc103a4: 93 a1 00 24 stw r29,36(r1) ffc103a8: 7c bd 2b 78 mr r29,r5 ffc103ac: 93 e1 00 2c stw r31,44(r1) ffc103b0: 7c 7f 1b 78 mr r31,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc103b4: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc103b8: 90 01 00 34 stw r0,52(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc103bc: 41 82 00 5c beq- ffc10418 return RTEMS_INVALID_ADDRESS; errno = 0; ffc103c0: 48 00 37 b5 bl ffc13b74 <__errno> *n = 0; ffc103c4: 3d 20 ff c2 lis r9,-62 ffc103c8: c8 09 12 b8 lfd f0,4792(r9) char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; ffc103cc: 38 00 00 00 li r0,0 ffc103d0: 90 03 00 00 stw r0,0(r3) *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ffc103d4: 38 81 00 08 addi r4,r1,8 ffc103d8: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc103dc: d8 1e 00 00 stfd f0,0(r30) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ffc103e0: 48 00 64 c9 bl ffc168a8 #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 ) ffc103e4: 2f 9d 00 00 cmpwi cr7,r29,0 ffc103e8: 41 9e 00 6c beq- cr7,ffc10454 *endptr = end; ffc103ec: 80 01 00 08 lwz r0,8(r1) ffc103f0: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc103f4: 7f 80 f8 00 cmpw cr7,r0,r31 ffc103f8: 38 60 00 0b li r3,11 ffc103fc: 41 9e 00 1c beq- cr7,ffc10418 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc10400: 3d 20 ff c2 lis r9,-62 ffc10404: c8 09 37 00 lfd f0,14080(r9) ffc10408: ff 81 00 00 fcmpu cr7,f1,f0 ffc1040c: 41 9d 00 28 bgt- cr7,ffc10434 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc10410: d8 3e 00 00 stfd f1,0(r30) ffc10414: 38 60 00 00 li r3,0 #endif return RTEMS_SUCCESSFUL; } ffc10418: 80 01 00 34 lwz r0,52(r1) ffc1041c: 83 a1 00 24 lwz r29,36(r1) ffc10420: 7c 08 03 a6 mtlr r0 ffc10424: 83 c1 00 28 lwz r30,40(r1) ffc10428: 83 e1 00 2c lwz r31,44(r1) ffc1042c: 38 21 00 30 addi r1,r1,48 ffc10430: 4e 80 00 20 blr return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc10434: d8 21 00 18 stfd f1,24(r1) ffc10438: 48 00 37 3d bl ffc13b74 <__errno> ffc1043c: 80 03 00 00 lwz r0,0(r3) ffc10440: 38 60 00 0a li r3,10 ffc10444: c8 21 00 18 lfd f1,24(r1) ffc10448: 2f 80 00 22 cmpwi cr7,r0,34 ffc1044c: 40 9e ff c4 bne+ cr7,ffc10410 <== NEVER TAKEN ffc10450: 4b ff ff c8 b ffc10418 ffc10454: 80 01 00 08 lwz r0,8(r1) ffc10458: 4b ff ff 9c b ffc103f4 =============================================================================== ffc1045c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc1045c: 94 21 ff d0 stwu r1,-48(r1) ffc10460: 7c 08 02 a6 mflr r0 ffc10464: 93 c1 00 28 stw r30,40(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc10468: 7c 9e 23 79 mr. r30,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc1046c: 93 a1 00 24 stw r29,36(r1) ffc10470: 7c bd 2b 78 mr r29,r5 ffc10474: 93 e1 00 2c stw r31,44(r1) ffc10478: 7c 7f 1b 78 mr r31,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc1047c: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc10480: 90 01 00 34 stw r0,52(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc10484: 41 82 00 58 beq- ffc104dc return RTEMS_INVALID_ADDRESS; errno = 0; ffc10488: 48 00 36 ed bl ffc13b74 <__errno> ffc1048c: 38 00 00 00 li r0,0 ffc10490: 90 03 00 00 stw r0,0(r3) *n = 0; ffc10494: 38 00 00 00 li r0,0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ffc10498: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc1049c: 90 1e 00 00 stw r0,0(r30) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ffc104a0: 38 81 00 08 addi r4,r1,8 ffc104a4: 48 00 63 9d bl ffc16840 #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 ) ffc104a8: 2f 9d 00 00 cmpwi cr7,r29,0 ffc104ac: 41 9e 00 6c beq- cr7,ffc10518 *endptr = end; ffc104b0: 80 01 00 08 lwz r0,8(r1) ffc104b4: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc104b8: 7f 80 f8 00 cmpw cr7,r0,r31 ffc104bc: 38 60 00 0b li r3,11 ffc104c0: 41 9e 00 1c beq- cr7,ffc104dc return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc104c4: 3d 20 ff c2 lis r9,-62 ffc104c8: c0 09 37 08 lfs f0,14088(r9) ffc104cc: ff 81 00 00 fcmpu cr7,f1,f0 ffc104d0: 41 9d 00 28 bgt- cr7,ffc104f8 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc104d4: d0 3e 00 00 stfs f1,0(r30) ffc104d8: 38 60 00 00 li r3,0 #endif return RTEMS_SUCCESSFUL; } ffc104dc: 80 01 00 34 lwz r0,52(r1) ffc104e0: 83 a1 00 24 lwz r29,36(r1) ffc104e4: 7c 08 03 a6 mtlr r0 ffc104e8: 83 c1 00 28 lwz r30,40(r1) ffc104ec: 83 e1 00 2c lwz r31,44(r1) ffc104f0: 38 21 00 30 addi r1,r1,48 ffc104f4: 4e 80 00 20 blr return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc104f8: d8 21 00 18 stfd f1,24(r1) ffc104fc: 48 00 36 79 bl ffc13b74 <__errno> ffc10500: 80 03 00 00 lwz r0,0(r3) ffc10504: 38 60 00 0a li r3,10 ffc10508: c8 21 00 18 lfd f1,24(r1) ffc1050c: 2f 80 00 22 cmpwi cr7,r0,34 ffc10510: 40 9e ff c4 bne+ cr7,ffc104d4 <== NEVER TAKEN ffc10514: 4b ff ff c8 b ffc104dc ffc10518: 80 01 00 08 lwz r0,8(r1) ffc1051c: 4b ff ff 9c b ffc104b8 =============================================================================== ffc10520 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc10520: 94 21 ff d8 stwu r1,-40(r1) ffc10524: 7c 08 02 a6 mflr r0 ffc10528: 93 c1 00 20 stw r30,32(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc1052c: 7c 9e 23 79 mr. r30,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc10530: 93 81 00 18 stw r28,24(r1) ffc10534: 7c dc 33 78 mr r28,r6 ffc10538: 93 a1 00 1c stw r29,28(r1) ffc1053c: 7c bd 2b 78 mr r29,r5 ffc10540: 93 e1 00 24 stw r31,36(r1) ffc10544: 7c 7f 1b 78 mr r31,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc10548: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc1054c: 90 01 00 2c stw r0,44(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc10550: 41 82 00 58 beq- ffc105a8 return RTEMS_INVALID_ADDRESS; errno = 0; ffc10554: 48 00 36 21 bl ffc13b74 <__errno> ffc10558: 38 00 00 00 li r0,0 ffc1055c: 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 ); ffc10560: 7f 85 e3 78 mr r5,r28 ffc10564: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc10568: 90 1e 00 00 stw r0,0(r30) #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 ); ffc1056c: 38 81 00 08 addi r4,r1,8 ffc10570: 48 00 65 51 bl ffc16ac0 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc10574: 2f 9d 00 00 cmpwi cr7,r29,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 ); ffc10578: 7c 7c 1b 78 mr r28,r3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc1057c: 41 9e 00 64 beq- cr7,ffc105e0 *endptr = end; ffc10580: 80 01 00 08 lwz r0,8(r1) ffc10584: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc10588: 7f 80 f8 00 cmpw cr7,r0,r31 ffc1058c: 38 60 00 0b li r3,11 ffc10590: 41 9e 00 18 beq- cr7,ffc105a8 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc10594: 6f 80 80 00 xoris r0,r28,32768 ffc10598: 2f 80 ff ff cmpwi cr7,r0,-1 ffc1059c: 41 9e 00 2c beq- cr7,ffc105c8 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc105a0: 93 9e 00 00 stw r28,0(r30) ffc105a4: 38 60 00 00 li r3,0 #endif return RTEMS_SUCCESSFUL; } ffc105a8: 80 01 00 2c lwz r0,44(r1) ffc105ac: 83 81 00 18 lwz r28,24(r1) ffc105b0: 7c 08 03 a6 mtlr r0 ffc105b4: 83 a1 00 1c lwz r29,28(r1) ffc105b8: 83 c1 00 20 lwz r30,32(r1) ffc105bc: 83 e1 00 24 lwz r31,36(r1) ffc105c0: 38 21 00 28 addi r1,r1,40 ffc105c4: 4e 80 00 20 blr return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc105c8: 48 00 35 ad bl ffc13b74 <__errno> ffc105cc: 80 03 00 00 lwz r0,0(r3) ffc105d0: 38 60 00 0a li r3,10 ffc105d4: 2f 80 00 22 cmpwi cr7,r0,34 ffc105d8: 40 9e ff c8 bne+ cr7,ffc105a0 <== NEVER TAKEN ffc105dc: 4b ff ff cc b ffc105a8 ffc105e0: 80 01 00 08 lwz r0,8(r1) ffc105e4: 4b ff ff a4 b ffc10588 =============================================================================== ffc106e8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc106e8: 94 21 ff d8 stwu r1,-40(r1) ffc106ec: 7c 08 02 a6 mflr r0 ffc106f0: 93 a1 00 1c stw r29,28(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc106f4: 7c 9d 23 79 mr. r29,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc106f8: 93 81 00 18 stw r28,24(r1) ffc106fc: 7c dc 33 78 mr r28,r6 ffc10700: 93 c1 00 20 stw r30,32(r1) ffc10704: 7c be 2b 78 mr r30,r5 ffc10708: 93 e1 00 24 stw r31,36(r1) ffc1070c: 7c 7f 1b 78 mr r31,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc10710: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc10714: 90 01 00 2c stw r0,44(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc10718: 41 82 00 64 beq- ffc1077c return RTEMS_INVALID_ADDRESS; errno = 0; ffc1071c: 48 00 34 59 bl ffc13b74 <__errno> ffc10720: 38 00 00 00 li r0,0 ffc10724: 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 ); ffc10728: 7f 85 e3 78 mr r5,r28 ffc1072c: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc10730: 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 ); ffc10734: 38 81 00 08 addi r4,r1,8 ffc10738: 48 00 63 89 bl ffc16ac0 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc1073c: 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 ); ffc10740: 7c 7c 1b 78 mr r28,r3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc10744: 41 9e 00 70 beq- cr7,ffc107b4 *endptr = end; ffc10748: 80 01 00 08 lwz r0,8(r1) ffc1074c: 90 1e 00 00 stw r0,0(r30) /* nothing was converted */ if ( end == s ) ffc10750: 7f 80 f8 00 cmpw cr7,r0,r31 ffc10754: 38 60 00 0b li r3,11 ffc10758: 41 9e 00 24 beq- cr7,ffc1077c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc1075c: 6f 80 80 00 xoris r0,r28,32768 ffc10760: 2f 80 ff ff cmpwi cr7,r0,-1 ffc10764: 41 9e 00 38 beq- cr7,ffc1079c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) ffc10768: 3c 00 80 00 lis r0,-32768 ffc1076c: 7f 9c 00 00 cmpw cr7,r28,r0 ffc10770: 41 9e 00 2c beq- cr7,ffc1079c #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc10774: 93 9d 00 00 stw r28,0(r29) ffc10778: 38 60 00 00 li r3,0 #endif return RTEMS_SUCCESSFUL; } ffc1077c: 80 01 00 2c lwz r0,44(r1) ffc10780: 83 81 00 18 lwz r28,24(r1) ffc10784: 7c 08 03 a6 mtlr r0 ffc10788: 83 a1 00 1c lwz r29,28(r1) ffc1078c: 83 c1 00 20 lwz r30,32(r1) ffc10790: 83 e1 00 24 lwz r31,36(r1) ffc10794: 38 21 00 28 addi r1,r1,40 ffc10798: 4e 80 00 20 blr return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) ffc1079c: 48 00 33 d9 bl ffc13b74 <__errno> ffc107a0: 80 03 00 00 lwz r0,0(r3) #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; ffc107a4: 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)) ffc107a8: 2f 80 00 22 cmpwi cr7,r0,34 ffc107ac: 40 9e ff c8 bne+ cr7,ffc10774 <== NEVER TAKEN ffc107b0: 4b ff ff cc b ffc1077c ffc107b4: 80 01 00 08 lwz r0,8(r1) ffc107b8: 4b ff ff 98 b ffc10750 =============================================================================== ffc105e8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc105e8: 94 21 ff d0 stwu r1,-48(r1) ffc105ec: 7c 08 02 a6 mflr r0 ffc105f0: 93 e1 00 2c stw r31,44(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc105f4: 7c 9f 23 79 mr. r31,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc105f8: 93 81 00 20 stw r28,32(r1) ffc105fc: 7c dc 33 78 mr r28,r6 ffc10600: 93 a1 00 24 stw r29,36(r1) ffc10604: 7c bd 2b 78 mr r29,r5 ffc10608: 93 c1 00 28 stw r30,40(r1) ffc1060c: 7c 7e 1b 78 mr r30,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc10610: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc10614: 90 01 00 34 stw r0,52(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc10618: 41 82 00 74 beq- ffc1068c return RTEMS_INVALID_ADDRESS; errno = 0; ffc1061c: 48 00 35 59 bl ffc13b74 <__errno> ffc10620: 38 00 00 00 li r0,0 *n = 0; ffc10624: 39 20 00 00 li r9,0 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; ffc10628: 90 03 00 00 stw r0,0(r3) *n = 0; ffc1062c: 39 40 00 00 li r10,0 ffc10630: 91 3f 00 00 stw r9,0(r31) #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 ); ffc10634: 7f 85 e3 78 mr r5,r28 ffc10638: 7f c3 f3 78 mr r3,r30 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc1063c: 91 5f 00 04 stw r10,4(r31) #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 ); ffc10640: 38 81 00 08 addi r4,r1,8 ffc10644: 48 00 64 9d bl ffc16ae0 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc10648: 2f 9d 00 00 cmpwi cr7,r29,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 ); ffc1064c: 7c 7c 1b 78 mr r28,r3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc10650: 41 9e 00 90 beq- cr7,ffc106e0 *endptr = end; ffc10654: 80 01 00 08 lwz r0,8(r1) ffc10658: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc1065c: 7f 80 f0 00 cmpw cr7,r0,r30 ffc10660: 38 60 00 0b li r3,11 ffc10664: 41 9e 00 28 beq- cr7,ffc1068c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc10668: 6f 80 80 00 xoris r0,r28,32768 ffc1066c: 2f 80 ff ff cmpwi cr7,r0,-1 ffc10670: 41 9e 00 64 beq- cr7,ffc106d4 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) ffc10674: 3c 00 80 00 lis r0,-32768 ffc10678: 7f 9c 00 00 cmpw cr7,r28,r0 ffc1067c: 41 9e 00 30 beq- cr7,ffc106ac #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc10680: 90 9f 00 04 stw r4,4(r31) ffc10684: 38 60 00 00 li r3,0 ffc10688: 93 9f 00 00 stw r28,0(r31) #endif return RTEMS_SUCCESSFUL; } ffc1068c: 80 01 00 34 lwz r0,52(r1) ffc10690: 83 81 00 20 lwz r28,32(r1) ffc10694: 7c 08 03 a6 mtlr r0 ffc10698: 83 a1 00 24 lwz r29,36(r1) ffc1069c: 83 c1 00 28 lwz r30,40(r1) ffc106a0: 83 e1 00 2c lwz r31,44(r1) ffc106a4: 38 21 00 30 addi r1,r1,48 ffc106a8: 4e 80 00 20 blr return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) ffc106ac: 2f 84 00 00 cmpwi cr7,r4,0 ffc106b0: 40 9e ff d0 bne+ cr7,ffc10680 <== NEVER TAKEN ffc106b4: 90 81 00 18 stw r4,24(r1) ffc106b8: 48 00 34 bd bl ffc13b74 <__errno> ffc106bc: 80 03 00 00 lwz r0,0(r3) #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; ffc106c0: 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)) ffc106c4: 80 81 00 18 lwz r4,24(r1) ffc106c8: 2f 80 00 22 cmpwi cr7,r0,34 ffc106cc: 40 9e ff b4 bne+ cr7,ffc10680 <== NEVER TAKEN ffc106d0: 4b ff ff bc b ffc1068c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc106d4: 2f 84 ff ff cmpwi cr7,r4,-1 ffc106d8: 40 9e ff 9c bne+ cr7,ffc10674 <== NEVER TAKEN ffc106dc: 4b ff ff d8 b ffc106b4 ffc106e0: 80 01 00 08 lwz r0,8(r1) ffc106e4: 4b ff ff 78 b ffc1065c =============================================================================== ffc107bc : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc107bc: 94 21 ff d8 stwu r1,-40(r1) ffc107c0: 7c 08 02 a6 mflr r0 ffc107c4: 93 c1 00 20 stw r30,32(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc107c8: 7c 9e 23 79 mr. r30,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc107cc: 93 a1 00 1c stw r29,28(r1) ffc107d0: 7c bd 2b 78 mr r29,r5 ffc107d4: 93 e1 00 24 stw r31,36(r1) ffc107d8: 7c 7f 1b 78 mr r31,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc107dc: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc107e0: 90 01 00 2c stw r0,44(r1) ffc107e4: 93 81 00 18 stw r28,24(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc107e8: 41 82 00 54 beq- ffc1083c return RTEMS_INVALID_ADDRESS; errno = 0; ffc107ec: 48 00 33 89 bl ffc13b74 <__errno> ffc107f0: 38 00 00 00 li r0,0 ffc107f4: 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 ); ffc107f8: 38 81 00 08 addi r4,r1,8 ffc107fc: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc10800: 90 1e 00 00 stw r0,0(r30) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); ffc10804: 38 a0 00 10 li r5,16 ffc10808: 48 00 68 05 bl ffc1700c #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 ) ffc1080c: 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 ); ffc10810: 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 ) ffc10814: 41 9e 00 60 beq- cr7,ffc10874 *endptr = end; ffc10818: 80 01 00 08 lwz r0,8(r1) ffc1081c: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc10820: 7f 80 f8 00 cmpw cr7,r0,r31 ffc10824: 38 60 00 0b li r3,11 ffc10828: 41 9e 00 14 beq- cr7,ffc1083c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc1082c: 2f 9c ff ff cmpwi cr7,r28,-1 ffc10830: 41 9e 00 2c beq- cr7,ffc1085c <== NEVER TAKEN if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; ffc10834: 93 9e 00 00 stw r28,0(r30) ffc10838: 38 60 00 00 li r3,0 #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } ffc1083c: 80 01 00 2c lwz r0,44(r1) ffc10840: 83 81 00 18 lwz r28,24(r1) ffc10844: 7c 08 03 a6 mtlr r0 ffc10848: 83 a1 00 1c lwz r29,28(r1) ffc1084c: 83 c1 00 20 lwz r30,32(r1) ffc10850: 83 e1 00 24 lwz r31,36(r1) ffc10854: 38 21 00 28 addi r1,r1,40 ffc10858: 4e 80 00 20 blr return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc1085c: 48 00 33 19 bl ffc13b74 <__errno> <== NOT EXECUTED ffc10860: 80 03 00 00 lwz r0,0(r3) <== NOT EXECUTED ffc10864: 38 60 00 0a li r3,10 <== NOT EXECUTED ffc10868: 2f 80 00 22 cmpwi cr7,r0,34 <== NOT EXECUTED ffc1086c: 40 9e ff c8 bne+ cr7,ffc10834 <== NOT EXECUTED ffc10870: 4b ff ff cc b ffc1083c <== NOT EXECUTED ffc10874: 80 01 00 08 lwz r0,8(r1) ffc10878: 4b ff ff a8 b ffc10820 =============================================================================== ffc10920 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc10920: 94 21 ff d8 stwu r1,-40(r1) ffc10924: 7c 08 02 a6 mflr r0 ffc10928: 93 c1 00 20 stw r30,32(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc1092c: 7c 9e 23 79 mr. r30,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc10930: 93 81 00 18 stw r28,24(r1) ffc10934: 7c dc 33 78 mr r28,r6 ffc10938: 93 a1 00 1c stw r29,28(r1) ffc1093c: 7c bd 2b 78 mr r29,r5 ffc10940: 93 e1 00 24 stw r31,36(r1) ffc10944: 7c 7f 1b 78 mr r31,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc10948: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc1094c: 90 01 00 2c stw r0,44(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc10950: 41 82 00 54 beq- ffc109a4 return RTEMS_INVALID_ADDRESS; errno = 0; ffc10954: 48 00 32 21 bl ffc13b74 <__errno> ffc10958: 38 00 00 00 li r0,0 ffc1095c: 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 ); ffc10960: 7f 85 e3 78 mr r5,r28 ffc10964: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc10968: 90 1e 00 00 stw r0,0(r30) #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 ); ffc1096c: 38 81 00 08 addi r4,r1,8 ffc10970: 48 00 66 9d bl ffc1700c #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc10974: 2f 9d 00 00 cmpwi cr7,r29,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 ); ffc10978: 7c 7c 1b 78 mr r28,r3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc1097c: 41 9e 00 60 beq- cr7,ffc109dc *endptr = end; ffc10980: 80 01 00 08 lwz r0,8(r1) ffc10984: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc10988: 7f 80 f8 00 cmpw cr7,r0,r31 ffc1098c: 38 60 00 0b li r3,11 ffc10990: 41 9e 00 14 beq- cr7,ffc109a4 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc10994: 2f 9c ff ff cmpwi cr7,r28,-1 ffc10998: 41 9e 00 2c beq- cr7,ffc109c4 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc1099c: 93 9e 00 00 stw r28,0(r30) ffc109a0: 38 60 00 00 li r3,0 #endif return RTEMS_SUCCESSFUL; } ffc109a4: 80 01 00 2c lwz r0,44(r1) ffc109a8: 83 81 00 18 lwz r28,24(r1) ffc109ac: 7c 08 03 a6 mtlr r0 ffc109b0: 83 a1 00 1c lwz r29,28(r1) ffc109b4: 83 c1 00 20 lwz r30,32(r1) ffc109b8: 83 e1 00 24 lwz r31,36(r1) ffc109bc: 38 21 00 28 addi r1,r1,40 ffc109c0: 4e 80 00 20 blr return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc109c4: 48 00 31 b1 bl ffc13b74 <__errno> ffc109c8: 80 03 00 00 lwz r0,0(r3) ffc109cc: 38 60 00 0a li r3,10 ffc109d0: 2f 80 00 22 cmpwi cr7,r0,34 ffc109d4: 40 9e ff c8 bne+ cr7,ffc1099c <== NEVER TAKEN ffc109d8: 4b ff ff cc b ffc109a4 ffc109dc: 80 01 00 08 lwz r0,8(r1) ffc109e0: 4b ff ff a8 b ffc10988 =============================================================================== ffc10ac8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc10ac8: 94 21 ff d8 stwu r1,-40(r1) ffc10acc: 7c 08 02 a6 mflr r0 ffc10ad0: 93 c1 00 20 stw r30,32(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc10ad4: 7c 9e 23 79 mr. r30,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc10ad8: 93 81 00 18 stw r28,24(r1) ffc10adc: 7c dc 33 78 mr r28,r6 ffc10ae0: 93 a1 00 1c stw r29,28(r1) ffc10ae4: 7c bd 2b 78 mr r29,r5 ffc10ae8: 93 e1 00 24 stw r31,36(r1) ffc10aec: 7c 7f 1b 78 mr r31,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc10af0: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc10af4: 90 01 00 2c stw r0,44(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc10af8: 41 82 00 54 beq- ffc10b4c return RTEMS_INVALID_ADDRESS; errno = 0; ffc10afc: 48 00 30 79 bl ffc13b74 <__errno> ffc10b00: 38 00 00 00 li r0,0 ffc10b04: 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 ); ffc10b08: 7f 85 e3 78 mr r5,r28 ffc10b0c: 7f e3 fb 78 mr r3,r31 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc10b10: 90 1e 00 00 stw r0,0(r30) #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 ); ffc10b14: 38 81 00 08 addi r4,r1,8 ffc10b18: 48 00 64 f5 bl ffc1700c #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc10b1c: 2f 9d 00 00 cmpwi cr7,r29,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 ); ffc10b20: 7c 7c 1b 78 mr r28,r3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc10b24: 41 9e 00 60 beq- cr7,ffc10b84 *endptr = end; ffc10b28: 80 01 00 08 lwz r0,8(r1) ffc10b2c: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc10b30: 7f 80 f8 00 cmpw cr7,r0,r31 ffc10b34: 38 60 00 0b li r3,11 ffc10b38: 41 9e 00 14 beq- cr7,ffc10b4c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc10b3c: 2f 9c ff ff cmpwi cr7,r28,-1 ffc10b40: 41 9e 00 2c beq- cr7,ffc10b6c #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc10b44: 93 9e 00 00 stw r28,0(r30) ffc10b48: 38 60 00 00 li r3,0 #endif return RTEMS_SUCCESSFUL; } ffc10b4c: 80 01 00 2c lwz r0,44(r1) ffc10b50: 83 81 00 18 lwz r28,24(r1) ffc10b54: 7c 08 03 a6 mtlr r0 ffc10b58: 83 a1 00 1c lwz r29,28(r1) ffc10b5c: 83 c1 00 20 lwz r30,32(r1) ffc10b60: 83 e1 00 24 lwz r31,36(r1) ffc10b64: 38 21 00 28 addi r1,r1,40 ffc10b68: 4e 80 00 20 blr return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc10b6c: 48 00 30 09 bl ffc13b74 <__errno> ffc10b70: 80 03 00 00 lwz r0,0(r3) ffc10b74: 38 60 00 0a li r3,10 ffc10b78: 2f 80 00 22 cmpwi cr7,r0,34 ffc10b7c: 40 9e ff c8 bne+ cr7,ffc10b44 <== NEVER TAKEN ffc10b80: 4b ff ff cc b ffc10b4c ffc10b84: 80 01 00 08 lwz r0,8(r1) ffc10b88: 4b ff ff a8 b ffc10b30 =============================================================================== ffc109e4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc109e4: 94 21 ff d0 stwu r1,-48(r1) ffc109e8: 7c 08 02 a6 mflr r0 ffc109ec: 93 e1 00 2c stw r31,44(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc109f0: 7c 9f 23 79 mr. r31,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc109f4: 93 81 00 20 stw r28,32(r1) ffc109f8: 7c dc 33 78 mr r28,r6 ffc109fc: 93 a1 00 24 stw r29,36(r1) ffc10a00: 7c bd 2b 78 mr r29,r5 ffc10a04: 93 c1 00 28 stw r30,40(r1) ffc10a08: 7c 7e 1b 78 mr r30,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc10a0c: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc10a10: 90 01 00 34 stw r0,52(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc10a14: 41 82 00 64 beq- ffc10a78 return RTEMS_INVALID_ADDRESS; errno = 0; ffc10a18: 48 00 31 5d bl ffc13b74 <__errno> ffc10a1c: 38 00 00 00 li r0,0 *n = 0; ffc10a20: 39 20 00 00 li r9,0 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; ffc10a24: 90 03 00 00 stw r0,0(r3) *n = 0; ffc10a28: 39 40 00 00 li r10,0 ffc10a2c: 91 3f 00 00 stw r9,0(r31) #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 ); ffc10a30: 7f 85 e3 78 mr r5,r28 ffc10a34: 7f c3 f3 78 mr r3,r30 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc10a38: 91 5f 00 04 stw r10,4(r31) #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 ); ffc10a3c: 38 81 00 08 addi r4,r1,8 ffc10a40: 48 00 65 ed bl ffc1702c #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc10a44: 2f 9d 00 00 cmpwi cr7,r29,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 ); ffc10a48: 7c 7c 1b 78 mr r28,r3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc10a4c: 41 9e 00 74 beq- cr7,ffc10ac0 *endptr = end; ffc10a50: 80 01 00 08 lwz r0,8(r1) ffc10a54: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc10a58: 7f 80 f0 00 cmpw cr7,r0,r30 ffc10a5c: 38 60 00 0b li r3,11 ffc10a60: 41 9e 00 18 beq- cr7,ffc10a78 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc10a64: 2f 9c ff ff cmpwi cr7,r28,-1 ffc10a68: 41 9e 00 30 beq- cr7,ffc10a98 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc10a6c: 90 9f 00 04 stw r4,4(r31) ffc10a70: 38 60 00 00 li r3,0 ffc10a74: 93 9f 00 00 stw r28,0(r31) #endif return RTEMS_SUCCESSFUL; } ffc10a78: 80 01 00 34 lwz r0,52(r1) ffc10a7c: 83 81 00 20 lwz r28,32(r1) ffc10a80: 7c 08 03 a6 mtlr r0 ffc10a84: 83 a1 00 24 lwz r29,36(r1) ffc10a88: 83 c1 00 28 lwz r30,40(r1) ffc10a8c: 83 e1 00 2c lwz r31,44(r1) ffc10a90: 38 21 00 30 addi r1,r1,48 ffc10a94: 4e 80 00 20 blr return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc10a98: 2f 84 ff ff cmpwi cr7,r4,-1 ffc10a9c: 40 9e ff d0 bne+ cr7,ffc10a6c <== NEVER TAKEN ffc10aa0: 90 81 00 18 stw r4,24(r1) ffc10aa4: 48 00 30 d1 bl ffc13b74 <__errno> ffc10aa8: 80 03 00 00 lwz r0,0(r3) ffc10aac: 38 60 00 0a li r3,10 ffc10ab0: 80 81 00 18 lwz r4,24(r1) ffc10ab4: 2f 80 00 22 cmpwi cr7,r0,34 ffc10ab8: 40 9e ff b4 bne+ cr7,ffc10a6c <== NEVER TAKEN ffc10abc: 4b ff ff bc b ffc10a78 ffc10ac0: 80 01 00 08 lwz r0,8(r1) ffc10ac4: 4b ff ff 94 b ffc10a58 =============================================================================== ffc11e78 : ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) ffc11e78: 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 ) { ffc11e7c: 94 21 ff f0 stwu r1,-16(r1) ffc11e80: 7c 08 02 a6 mflr r0 ffc11e84: 93 e1 00 0c stw r31,12(r1) ffc11e88: 90 01 00 14 stw r0,20(r1) ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) ffc11e8c: 38 00 00 09 li r0,9 ffc11e90: 41 82 01 1c beq- ffc11fac return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; ffc11e94: 3d 20 00 00 lis r9,0 ffc11e98: 81 29 27 b0 lwz r9,10160(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 ) ffc11e9c: 80 09 00 7c lwz r0,124(r9) executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; ffc11ea0: 89 49 00 75 lbz r10,117(r9) if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc11ea4: 2f 80 00 00 cmpwi cr7,r0,0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc11ea8: 81 69 01 44 lwz r11,324(r9) asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; ffc11eac: 7d 4a 00 34 cntlzw r10,r10 ffc11eb0: 55 4a d9 7e rlwinm r10,r10,27,5,31 ffc11eb4: 55 48 40 2e rlwinm r8,r10,8,0,23 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc11eb8: 40 9e 01 0c bne- cr7,ffc11fc4 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; ffc11ebc: 89 4b 00 08 lbz r10,8(r11) #ifndef ASM static inline uint32_t _CPU_ISR_Get_level( void ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc11ec0: 38 00 00 00 li r0,0 ffc11ec4: 7d 4a 00 34 cntlzw r10,r10 ffc11ec8: 55 4a d9 7e rlwinm r10,r10,27,5,31 ffc11ecc: 55 4a 50 2a rlwinm r10,r10,10,0,21 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; ffc11ed0: 7d 48 43 78 or r8,r10,r8 ffc11ed4: 7c 00 00 a6 mfmsr r0 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc11ed8: 70 8a 01 00 andi. r10,r4,256 old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; ffc11edc: 68 00 80 00 xori r0,r0,32768 ffc11ee0: 54 00 8f fe rlwinm r0,r0,17,31,31 ffc11ee4: 7d 08 03 78 or r8,r8,r0 ffc11ee8: 91 05 00 00 stw r8,0(r5) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc11eec: 41 82 00 10 beq- ffc11efc executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; ffc11ef0: 68 60 01 00 xori r0,r3,256 ffc11ef4: 54 00 c7 fe rlwinm r0,r0,24,31,31 ffc11ef8: 98 09 00 75 stb r0,117(r9) if ( mask & RTEMS_TIMESLICE_MASK ) { ffc11efc: 70 80 02 00 andi. r0,r4,512 ffc11f00: 41 82 00 20 beq- ffc11f20 if ( _Modes_Is_timeslice(mode_set) ) { ffc11f04: 70 60 02 00 andi. r0,r3,512 ffc11f08: 41 82 01 08 beq- ffc12010 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc11f0c: 3d 40 00 00 lis r10,0 ffc11f10: 80 0a 27 68 lwz r0,10088(r10) if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; ffc11f14: 39 40 00 01 li r10,1 ffc11f18: 91 49 00 7c stw r10,124(r9) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc11f1c: 90 09 00 78 stw r0,120(r9) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc11f20: 70 8a 00 01 andi. r10,r4,1 ffc11f24: 41 82 00 20 beq- ffc11f44 } static inline void _CPU_ISR_Set_level( uint32_t level ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc11f28: 38 00 00 00 li r0,0 ffc11f2c: 7c 00 00 a6 mfmsr r0 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc11f30: 70 6a 00 01 andi. r10,r3,1 ffc11f34: 40 82 00 cc bne- ffc12000 static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; asm volatile ( ffc11f38: 7d 50 42 a6 mfsprg r10,0 msr |= ppc_interrupt_get_disable_mask(); ffc11f3c: 7d 40 03 78 or r0,r10,r0 } else { msr &= ~ppc_interrupt_get_disable_mask(); } _CPU_MSR_SET(msr); ffc11f40: 7c 00 01 24 mtmsr r0 */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { ffc11f44: 70 80 04 00 andi. r0,r4,1024 ffc11f48: 41 82 00 4c beq- ffc11f94 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( ffc11f4c: 68 63 04 00 xori r3,r3,1024 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; ffc11f50: 88 0b 00 08 lbz r0,8(r11) * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( ffc11f54: 54 63 b7 fe rlwinm r3,r3,22,31,31 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; ffc11f58: 7f 80 18 00 cmpw cr7,r0,r3 ffc11f5c: 41 9e 00 38 beq- cr7,ffc11f94 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 ) { asr->is_enabled = is_asr_enabled; ffc11f60: 98 6b 00 08 stb r3,8(r11) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc11f64: 7c 00 00 a6 mfmsr r0 ffc11f68: 7d 50 42 a6 mfsprg r10,0 ffc11f6c: 7c 0a 50 78 andc r10,r0,r10 ffc11f70: 7d 40 01 24 mtmsr r10 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; ffc11f74: 81 0b 00 18 lwz r8,24(r11) information->signals_pending = information->signals_posted; ffc11f78: 81 4b 00 14 lwz r10,20(r11) information->signals_posted = _signals; ffc11f7c: 91 0b 00 14 stw r8,20(r11) rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; ffc11f80: 91 4b 00 18 stw r10,24(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc11f84: 7c 00 01 24 mtmsr r0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; ffc11f88: 80 0b 00 14 lwz r0,20(r11) ffc11f8c: 2f 80 00 00 cmpwi cr7,r0,0 ffc11f90: 40 9e 00 c4 bne- cr7,ffc12054 if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; ffc11f94: 3b e0 00 00 li r31,0 } } } if ( _System_state_Is_up( _System_state_Get() ) ) ffc11f98: 3d 20 00 00 lis r9,0 ffc11f9c: 80 09 27 d4 lwz r0,10196(r9) ffc11fa0: 2f 80 00 03 cmpwi cr7,r0,3 ffc11fa4: 41 9e 00 7c beq- cr7,ffc12020 <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); ffc11fa8: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; } ffc11fac: 7c 03 03 78 mr r3,r0 ffc11fb0: 80 01 00 14 lwz r0,20(r1) ffc11fb4: 83 e1 00 0c lwz r31,12(r1) ffc11fb8: 38 21 00 10 addi r1,r1,16 ffc11fbc: 7c 08 03 a6 mtlr r0 ffc11fc0: 4e 80 00 20 blr if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; ffc11fc4: 89 4b 00 08 lbz r10,8(r11) old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; ffc11fc8: 61 08 02 00 ori r8,r8,512 #ifndef ASM static inline uint32_t _CPU_ISR_Get_level( void ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc11fcc: 38 00 00 00 li r0,0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; ffc11fd0: 7d 4a 00 34 cntlzw r10,r10 ffc11fd4: 55 4a d9 7e rlwinm r10,r10,27,5,31 ffc11fd8: 55 4a 50 2a rlwinm r10,r10,10,0,21 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; ffc11fdc: 7d 48 43 78 or r8,r10,r8 ffc11fe0: 7c 00 00 a6 mfmsr r0 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc11fe4: 70 8a 01 00 andi. r10,r4,256 old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; ffc11fe8: 68 00 80 00 xori r0,r0,32768 ffc11fec: 54 00 8f fe rlwinm r0,r0,17,31,31 ffc11ff0: 7d 08 03 78 or r8,r8,r0 ffc11ff4: 91 05 00 00 stw r8,0(r5) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc11ff8: 41 a2 ff 04 beq- ffc11efc ffc11ffc: 4b ff fe f4 b ffc11ef0 static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; asm volatile ( ffc12000: 7d 50 42 a6 mfsprg r10,0 _CPU_MSR_GET(msr); if (!(level & CPU_MODES_INTERRUPT_MASK)) { msr |= ppc_interrupt_get_disable_mask(); } else { msr &= ~ppc_interrupt_get_disable_mask(); ffc12004: 7c 00 50 78 andc r0,r0,r10 } _CPU_MSR_SET(msr); ffc12008: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); ffc1200c: 4b ff ff 38 b ffc11f44 /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc12010: 70 8a 00 01 andi. r10,r4,1 if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; ffc12014: 90 09 00 7c stw r0,124(r9) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc12018: 41 a2 ff 2c beq- ffc11f44 ffc1201c: 4b ff ff 0c b ffc11f28 } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) ffc12020: 48 00 03 71 bl ffc12390 <_Thread_Evaluate_mode> ffc12024: 2f 83 00 00 cmpwi cr7,r3,0 ffc12028: 40 9e 00 0c bne- cr7,ffc12034 ffc1202c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc12030: 41 be ff 78 beq- cr7,ffc11fa8 _Thread_Dispatch(); ffc12034: 4b ff 8f 65 bl ffc0af98 <_Thread_Dispatch> ffc12038: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; } ffc1203c: 7c 03 03 78 mr r3,r0 ffc12040: 80 01 00 14 lwz r0,20(r1) ffc12044: 83 e1 00 0c lwz r31,12(r1) ffc12048: 38 21 00 10 addi r1,r1,16 ffc1204c: 7c 08 03 a6 mtlr r0 ffc12050: 4e 80 00 20 blr if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; ffc12054: 38 00 00 01 li r0,1 ffc12058: 98 09 00 74 stb r0,116(r9) ffc1205c: 3b e0 00 01 li r31,1 ffc12060: 4b ff ff 38 b ffc11f98 =============================================================================== ffc0edb4 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { ffc0edb4: 7d 80 00 26 mfcr r12 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0edb8: 2e 04 00 00 cmpwi cr4,r4,0 rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { ffc0edbc: 94 21 ff d8 stwu r1,-40(r1) ffc0edc0: 7c 08 02 a6 mflr r0 ffc0edc4: 93 c1 00 20 stw r30,32(r1) ffc0edc8: 7c be 2b 78 mr r30,r5 ffc0edcc: 93 e1 00 24 stw r31,36(r1) register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0edd0: 7c 9f 23 78 mr r31,r4 rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { ffc0edd4: 90 01 00 2c stw r0,44(r1) ffc0edd8: 91 81 00 1c stw r12,28(r1) register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0eddc: 41 92 00 18 beq- cr4,ffc0edf4 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ffc0ede0: 3d 20 00 00 lis r9,0 ffc0ede4: 89 29 26 e4 lbz r9,9956(r9) ffc0ede8: 38 00 00 13 li r0,19 ffc0edec: 7f 84 48 40 cmplw cr7,r4,r9 ffc0edf0: 41 9d 00 64 bgt- cr7,ffc0ee54 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) ffc0edf4: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0edf8: 38 00 00 09 li r0,9 ffc0edfc: 41 9e 00 58 beq- cr7,ffc0ee54 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); ffc0ee00: 38 81 00 08 addi r4,r1,8 ffc0ee04: 48 00 28 f9 bl ffc116fc <_Thread_Get> switch ( location ) { ffc0ee08: 81 21 00 08 lwz r9,8(r1) ffc0ee0c: 38 00 00 04 li r0,4 ffc0ee10: 2f 89 00 00 cmpwi cr7,r9,0 ffc0ee14: 40 9e 00 40 bne- cr7,ffc0ee54 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; ffc0ee18: 80 03 00 14 lwz r0,20(r3) ffc0ee1c: 90 1e 00 00 stw r0,0(r30) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { ffc0ee20: 41 92 00 2c beq- cr4,ffc0ee4c the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || ffc0ee24: 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; ffc0ee28: 93 e3 00 18 stw r31,24(r3) if ( the_thread->resource_count == 0 || ffc0ee2c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ee30: 41 9e 00 10 beq- cr7,ffc0ee40 the_thread->current_priority > new_priority ) ffc0ee34: 80 03 00 14 lwz r0,20(r3) ffc0ee38: 7f 9f 00 40 cmplw cr7,r31,r0 ffc0ee3c: 40 9c 00 10 bge- cr7,ffc0ee4c <== ALWAYS TAKEN _Thread_Change_priority( the_thread, new_priority, false ); ffc0ee40: 7f e4 fb 78 mr r4,r31 ffc0ee44: 38 a0 00 00 li r5,0 ffc0ee48: 48 00 21 3d bl ffc10f84 <_Thread_Change_priority> } _Thread_Enable_dispatch(); ffc0ee4c: 48 00 28 45 bl ffc11690 <_Thread_Enable_dispatch> ffc0ee50: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0ee54: 7c 03 03 78 mr r3,r0 ffc0ee58: 80 01 00 2c lwz r0,44(r1) ffc0ee5c: 81 81 00 1c lwz r12,28(r1) ffc0ee60: 7c 08 03 a6 mtlr r0 ffc0ee64: 83 c1 00 20 lwz r30,32(r1) ffc0ee68: 83 e1 00 24 lwz r31,36(r1) ffc0ee6c: 7d 80 81 20 mtcrf 8,r12 ffc0ee70: 38 21 00 28 addi r1,r1,40 ffc0ee74: 4e 80 00 20 blr =============================================================================== ffc09fd0 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { ffc09fd0: 94 21 ff e0 stwu r1,-32(r1) ffc09fd4: 7c 08 02 a6 mflr r0 ffc09fd8: 93 e1 00 1c stw r31,28(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) ffc09fdc: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { ffc09fe0: 90 01 00 24 stw r0,36(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) ffc09fe4: 38 00 00 09 li r0,9 ffc09fe8: 41 82 00 1c beq- ffc0a004 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); ffc09fec: 38 81 00 08 addi r4,r1,8 ffc09ff0: 48 00 25 d5 bl ffc0c5c4 <_Thread_Get> switch (location) { ffc09ff4: 81 21 00 08 lwz r9,8(r1) ffc09ff8: 38 00 00 04 li r0,4 ffc09ffc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a000: 41 9e 00 1c beq- cr7,ffc0a01c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a004: 7c 03 03 78 mr r3,r0 ffc0a008: 80 01 00 24 lwz r0,36(r1) ffc0a00c: 83 e1 00 1c lwz r31,28(r1) ffc0a010: 38 21 00 20 addi r1,r1,32 ffc0a014: 7c 08 03 a6 mtlr r0 ffc0a018: 4e 80 00 20 blr the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; ffc0a01c: 80 83 01 54 lwz r4,340(r3) while (tvp) { ffc0a020: 2f 84 00 00 cmpwi cr7,r4,0 ffc0a024: 41 9e 00 30 beq- cr7,ffc0a054 if (tvp->ptr == ptr) { ffc0a028: 80 04 00 04 lwz r0,4(r4) ffc0a02c: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0a030: 40 be 00 14 bne+ cr7,ffc0a044 ffc0a034: 48 00 00 6c b ffc0a0a0 ffc0a038: 80 04 00 04 lwz r0,4(r4) ffc0a03c: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0a040: 41 9e 00 34 beq- cr7,ffc0a074 else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc0a044: 7c 89 23 78 mr r9,r4 } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; ffc0a048: 80 84 00 00 lwz r4,0(r4) the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { ffc0a04c: 2f 84 00 00 cmpwi cr7,r4,0 ffc0a050: 40 9e ff e8 bne+ cr7,ffc0a038 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); ffc0a054: 48 00 25 51 bl ffc0c5a4 <_Thread_Enable_dispatch> ffc0a058: 38 00 00 09 li r0,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a05c: 7c 03 03 78 mr r3,r0 ffc0a060: 80 01 00 24 lwz r0,36(r1) ffc0a064: 83 e1 00 1c lwz r31,28(r1) ffc0a068: 38 21 00 20 addi r1,r1,32 ffc0a06c: 7c 08 03 a6 mtlr r0 ffc0a070: 4e 80 00 20 blr case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; ffc0a074: 80 04 00 00 lwz r0,0(r4) ffc0a078: 90 09 00 00 stw r0,0(r9) else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); ffc0a07c: 48 00 01 01 bl ffc0a17c <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); ffc0a080: 48 00 25 25 bl ffc0c5a4 <_Thread_Enable_dispatch> ffc0a084: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a088: 7c 03 03 78 mr r3,r0 ffc0a08c: 80 01 00 24 lwz r0,36(r1) ffc0a090: 83 e1 00 1c lwz r31,28(r1) ffc0a094: 38 21 00 20 addi r1,r1,32 ffc0a098: 7c 08 03 a6 mtlr r0 ffc0a09c: 4e 80 00 20 blr while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; ffc0a0a0: 80 04 00 00 lwz r0,0(r4) ffc0a0a4: 90 03 01 54 stw r0,340(r3) ffc0a0a8: 4b ff ff d4 b ffc0a07c =============================================================================== ffc0a0ac : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { ffc0a0ac: 94 21 ff e0 stwu r1,-32(r1) ffc0a0b0: 7c 08 02 a6 mflr r0 ffc0a0b4: 93 e1 00 1c stw r31,28(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) ffc0a0b8: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { ffc0a0bc: 93 c1 00 18 stw r30,24(r1) ffc0a0c0: 7c be 2b 78 mr r30,r5 ffc0a0c4: 90 01 00 24 stw r0,36(r1) Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) ffc0a0c8: 41 82 00 78 beq- ffc0a140 return RTEMS_INVALID_ADDRESS; if ( !result ) ffc0a0cc: 2f 85 00 00 cmpwi cr7,r5,0 ffc0a0d0: 41 9e 00 70 beq- cr7,ffc0a140 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); ffc0a0d4: 38 81 00 08 addi r4,r1,8 ffc0a0d8: 48 00 24 ed bl ffc0c5c4 <_Thread_Get> switch (location) { ffc0a0dc: 80 01 00 08 lwz r0,8(r1) return RTEMS_INVALID_ADDRESS; if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); ffc0a0e0: 7c 69 1b 78 mr r9,r3 switch (location) { ffc0a0e4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a0e8: 38 60 00 04 li r3,4 ffc0a0ec: 40 9e 00 3c bne- cr7,ffc0a128 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; ffc0a0f0: 81 29 01 54 lwz r9,340(r9) while (tvp) { ffc0a0f4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a0f8: 40 be 00 14 bne+ cr7,ffc0a10c ffc0a0fc: 48 00 00 60 b ffc0a15c */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; ffc0a100: 81 29 00 00 lwz r9,0(r9) case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { ffc0a104: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a108: 41 9e 00 54 beq- cr7,ffc0a15c <== NEVER TAKEN if (tvp->ptr == ptr) { ffc0a10c: 80 09 00 04 lwz r0,4(r9) ffc0a110: 7f 80 f8 00 cmpw cr7,r0,r31 ffc0a114: 40 9e ff ec bne+ cr7,ffc0a100 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; ffc0a118: 80 09 00 0c lwz r0,12(r9) ffc0a11c: 90 1e 00 00 stw r0,0(r30) _Thread_Enable_dispatch(); ffc0a120: 48 00 24 85 bl ffc0c5a4 <_Thread_Enable_dispatch> ffc0a124: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a128: 80 01 00 24 lwz r0,36(r1) ffc0a12c: 83 c1 00 18 lwz r30,24(r1) ffc0a130: 7c 08 03 a6 mtlr r0 ffc0a134: 83 e1 00 1c lwz r31,28(r1) ffc0a138: 38 21 00 20 addi r1,r1,32 ffc0a13c: 4e 80 00 20 blr ffc0a140: 80 01 00 24 lwz r0,36(r1) return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; ffc0a144: 38 60 00 09 li r3,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a148: 83 c1 00 18 lwz r30,24(r1) ffc0a14c: 7c 08 03 a6 mtlr r0 ffc0a150: 83 e1 00 1c lwz r31,28(r1) ffc0a154: 38 21 00 20 addi r1,r1,32 ffc0a158: 4e 80 00 20 blr _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); ffc0a15c: 48 00 24 49 bl ffc0c5a4 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a160: 80 01 00 24 lwz r0,36(r1) _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); ffc0a164: 38 60 00 09 li r3,9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0a168: 83 c1 00 18 lwz r30,24(r1) ffc0a16c: 7c 08 03 a6 mtlr r0 ffc0a170: 83 e1 00 1c lwz r31,28(r1) ffc0a174: 38 21 00 20 addi r1,r1,32 ffc0a178: 4e 80 00 20 blr =============================================================================== ffc0739c : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc0739c: 2f 83 00 09 cmpwi cr7,r3,9 case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; ffc073a0: 38 00 00 09 li r0,9 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc073a4: 41 9e 00 44 beq- cr7,ffc073e8 <== NEVER TAKEN ffc073a8: 40 9d 00 48 ble- cr7,ffc073f0 <== ALWAYS TAKEN ffc073ac: 2f 83 00 0e cmpwi cr7,r3,14 <== NOT EXECUTED case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; ffc073b0: 38 00 00 0e li r0,14 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc073b4: 41 9e 00 34 beq- cr7,ffc073e8 <== NOT EXECUTED ffc073b8: 40 9d 00 78 ble- cr7,ffc07430 <== NOT EXECUTED ffc073bc: 2f 83 10 02 cmpwi cr7,r3,4098 <== NOT EXECUTED case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; ffc073c0: 38 00 00 11 li r0,17 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc073c4: 41 9e 00 24 beq- cr7,ffc073e8 <== NOT EXECUTED ffc073c8: 40 9d 00 d4 ble- cr7,ffc0749c <== NOT EXECUTED ffc073cc: 2f 83 10 03 cmpwi cr7,r3,4099 <== NOT EXECUTED case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; ffc073d0: 38 00 00 12 li r0,18 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc073d4: 41 9e 00 14 beq- cr7,ffc073e8 <== NOT EXECUTED ffc073d8: 2f 83 10 04 cmpwi cr7,r3,4100 <== NOT EXECUTED case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; ffc073dc: 38 00 00 13 li r0,19 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc073e0: 41 9e 00 08 beq- cr7,ffc073e8 <== NOT EXECUTED case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; ffc073e4: 38 00 ff ff li r0,-1 default: baud_index = -1; break; } return baud_index; } ffc073e8: 7c 03 03 78 mr r3,r0 ffc073ec: 4e 80 00 20 blr rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc073f0: 2f 83 00 04 cmpwi cr7,r3,4 case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; ffc073f4: 38 00 00 04 li r0,4 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc073f8: 41 be ff f0 beq- cr7,ffc073e8 <== NEVER TAKEN ffc073fc: 41 9d 00 64 bgt- cr7,ffc07460 <== NEVER TAKEN ffc07400: 2f 83 00 01 cmpwi cr7,r3,1 ffc07404: 38 00 00 01 li r0,1 ffc07408: 41 be ff e0 beq- cr7,ffc073e8 <== NEVER TAKEN ffc0740c: 40 9d 00 ac ble- cr7,ffc074b8 <== ALWAYS TAKEN ffc07410: 2f 83 00 02 cmpwi cr7,r3,2 <== NOT EXECUTED ffc07414: 38 00 00 02 li r0,2 <== NOT EXECUTED ffc07418: 41 be ff d0 beq- cr7,ffc073e8 <== NOT EXECUTED ffc0741c: 2f 83 00 03 cmpwi cr7,r3,3 <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; ffc07420: 38 00 00 03 li r0,3 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc07424: 41 be ff c4 beq- cr7,ffc073e8 <== NOT EXECUTED case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; ffc07428: 38 00 ff ff li r0,-1 <== NOT EXECUTED ffc0742c: 4b ff ff bc b ffc073e8 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc07430: 2f 83 00 0b cmpwi cr7,r3,11 <== NOT EXECUTED case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; ffc07434: 38 00 00 0b li r0,11 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc07438: 41 be ff b0 beq- cr7,ffc073e8 <== NOT EXECUTED ffc0743c: 41 9c 00 58 blt- cr7,ffc07494 <== NOT EXECUTED ffc07440: 2f 83 00 0c cmpwi cr7,r3,12 <== NOT EXECUTED case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; ffc07444: 38 00 00 0c li r0,12 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc07448: 41 be ff a0 beq- cr7,ffc073e8 <== NOT EXECUTED ffc0744c: 2f 83 00 0d cmpwi cr7,r3,13 <== NOT EXECUTED case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; ffc07450: 38 00 00 0d li r0,13 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc07454: 41 be ff 94 beq- cr7,ffc073e8 <== NOT EXECUTED case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; ffc07458: 38 00 ff ff li r0,-1 <== NOT EXECUTED ffc0745c: 4b ff ff 8c b ffc073e8 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc07460: 2f 83 00 06 cmpwi cr7,r3,6 <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; ffc07464: 38 00 00 06 li r0,6 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc07468: 41 be ff 80 beq- cr7,ffc073e8 <== NOT EXECUTED ffc0746c: 41 9c 00 20 blt- cr7,ffc0748c <== NOT EXECUTED ffc07470: 2f 83 00 07 cmpwi cr7,r3,7 <== NOT EXECUTED case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; ffc07474: 38 00 00 07 li r0,7 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc07478: 41 be ff 70 beq- cr7,ffc073e8 <== NOT EXECUTED ffc0747c: 2f 83 00 08 cmpwi cr7,r3,8 <== NOT EXECUTED case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; ffc07480: 38 00 00 08 li r0,8 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc07484: 40 9e ff 60 bne+ cr7,ffc073e4 <== NOT EXECUTED ffc07488: 4b ff ff 60 b ffc073e8 <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; ffc0748c: 38 00 00 05 li r0,5 <== NOT EXECUTED case B150: baud_index = 5; break; ffc07490: 4b ff ff 58 b ffc073e8 <== NOT EXECUTED case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; ffc07494: 38 00 00 0a li r0,10 <== NOT EXECUTED case B1800: baud_index = 10; break; ffc07498: 4b ff ff 50 b ffc073e8 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc0749c: 2f 83 00 0f cmpwi cr7,r3,15 <== NOT EXECUTED case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; ffc074a0: 38 00 00 0f li r0,15 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc074a4: 41 be ff 44 beq- cr7,ffc073e8 <== NOT EXECUTED ffc074a8: 2f 83 10 01 cmpwi cr7,r3,4097 <== NOT EXECUTED case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; ffc074ac: 38 00 00 10 li r0,16 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc074b0: 40 9e ff 34 bne+ cr7,ffc073e4 <== NOT EXECUTED ffc074b4: 4b ff ff 34 b ffc073e8 <== NOT EXECUTED ffc074b8: 2f 83 00 00 cmpwi cr7,r3,0 ffc074bc: 38 00 00 00 li r0,0 ffc074c0: 41 be ff 28 beq- cr7,ffc073e8 <== NEVER TAKEN ffc074c4: 4b ff ff 20 b ffc073e4 =============================================================================== ffc074c8 : int termios_baud ) { int32_t baud; switch (termios_baud) { ffc074c8: 2f 83 00 09 cmpwi cr7,r3,9 case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; ffc074cc: 38 00 04 b0 li r0,1200 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc074d0: 41 9e 00 50 beq- cr7,ffc07520 ffc074d4: 40 9d 00 54 ble- cr7,ffc07528 ffc074d8: 2f 83 00 0e cmpwi cr7,r3,14 case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; ffc074dc: 38 00 4b 00 li r0,19200 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc074e0: 41 9e 00 40 beq- cr7,ffc07520 ffc074e4: 40 9d 00 84 ble- cr7,ffc07568 ffc074e8: 2f 83 10 02 cmpwi cr7,r3,4098 case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; ffc074ec: 3c 00 00 01 lis r0,1 ffc074f0: 60 00 c2 00 ori r0,r0,49664 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc074f4: 41 9e 00 2c beq- cr7,ffc07520 ffc074f8: 40 9d 00 dc ble- cr7,ffc075d4 ffc074fc: 2f 83 10 03 cmpwi cr7,r3,4099 case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; ffc07500: 3c 00 00 03 lis r0,3 ffc07504: 60 00 84 00 ori r0,r0,33792 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc07508: 41 9e 00 18 beq- cr7,ffc07520 ffc0750c: 2f 83 10 04 cmpwi cr7,r3,4100 case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; ffc07510: 3c 00 00 07 lis r0,7 ffc07514: 60 00 08 00 ori r0,r0,2048 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc07518: 41 9e 00 08 beq- cr7,ffc07520 <== ALWAYS TAKEN case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; ffc0751c: 38 00 ff ff li r0,-1 default: baud = -1; break; } return baud; } ffc07520: 7c 03 03 78 mr r3,r0 ffc07524: 4e 80 00 20 blr int termios_baud ) { int32_t baud; switch (termios_baud) { ffc07528: 2f 83 00 04 cmpwi cr7,r3,4 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; ffc0752c: 38 00 00 86 li r0,134 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc07530: 41 be ff f0 beq- cr7,ffc07520 ffc07534: 41 9d 00 64 bgt- cr7,ffc07598 ffc07538: 2f 83 00 01 cmpwi cr7,r3,1 ffc0753c: 38 00 00 32 li r0,50 ffc07540: 41 be ff e0 beq- cr7,ffc07520 ffc07544: 40 9d 00 b4 ble- cr7,ffc075f8 ffc07548: 2f 83 00 02 cmpwi cr7,r3,2 ffc0754c: 38 00 00 4b li r0,75 ffc07550: 41 be ff d0 beq- cr7,ffc07520 ffc07554: 2f 83 00 03 cmpwi cr7,r3,3 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; ffc07558: 38 00 00 6e li r0,110 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc0755c: 41 be ff c4 beq- cr7,ffc07520 <== ALWAYS TAKEN case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; ffc07560: 38 00 ff ff li r0,-1 <== NOT EXECUTED ffc07564: 4b ff ff bc b ffc07520 <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { ffc07568: 2f 83 00 0b cmpwi cr7,r3,11 case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; ffc0756c: 38 00 09 60 li r0,2400 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc07570: 41 be ff b0 beq- cr7,ffc07520 ffc07574: 41 9c 00 58 blt- cr7,ffc075cc ffc07578: 2f 83 00 0c cmpwi cr7,r3,12 case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; ffc0757c: 38 00 12 c0 li r0,4800 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc07580: 41 be ff a0 beq- cr7,ffc07520 ffc07584: 2f 83 00 0d cmpwi cr7,r3,13 case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; ffc07588: 38 00 25 80 li r0,9600 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc0758c: 41 be ff 94 beq- cr7,ffc07520 <== ALWAYS TAKEN case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; ffc07590: 38 00 ff ff li r0,-1 <== NOT EXECUTED ffc07594: 4b ff ff 8c b ffc07520 <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { ffc07598: 2f 83 00 06 cmpwi cr7,r3,6 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; ffc0759c: 38 00 00 c8 li r0,200 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc075a0: 41 be ff 80 beq- cr7,ffc07520 ffc075a4: 41 9c 00 20 blt- cr7,ffc075c4 ffc075a8: 2f 83 00 07 cmpwi cr7,r3,7 case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; ffc075ac: 38 00 01 2c li r0,300 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc075b0: 41 be ff 70 beq- cr7,ffc07520 ffc075b4: 2f 83 00 08 cmpwi cr7,r3,8 case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; ffc075b8: 38 00 02 58 li r0,600 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc075bc: 40 9e ff 60 bne+ cr7,ffc0751c <== NEVER TAKEN ffc075c0: 4b ff ff 60 b ffc07520 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; ffc075c4: 38 00 00 96 li r0,150 case B150: baud = 150; break; ffc075c8: 4b ff ff 58 b ffc07520 case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; ffc075cc: 38 00 07 08 li r0,1800 case B1800: baud = 1800; break; ffc075d0: 4b ff ff 50 b ffc07520 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc075d4: 2f 83 00 0f cmpwi cr7,r3,15 case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; ffc075d8: 38 00 00 00 li r0,0 ffc075dc: 60 00 96 00 ori r0,r0,38400 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc075e0: 41 be ff 40 beq- cr7,ffc07520 ffc075e4: 2f 83 10 01 cmpwi cr7,r3,4097 case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; ffc075e8: 38 00 00 00 li r0,0 ffc075ec: 60 00 e1 00 ori r0,r0,57600 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc075f0: 40 9e ff 2c bne+ cr7,ffc0751c <== NEVER TAKEN ffc075f4: 4b ff ff 2c b ffc07520 ffc075f8: 2f 83 00 00 cmpwi cr7,r3,0 ffc075fc: 38 00 00 00 li r0,0 ffc07600: 41 be ff 20 beq- cr7,ffc07520 ffc07604: 4b ff ff 18 b ffc0751c =============================================================================== ffc057fc : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; ffc057fc: 3d 60 00 00 lis r11,0 <== NOT EXECUTED ffc05800: 39 2b 21 68 addi r9,r11,8552 <== NOT EXECUTED ffc05804: 90 6b 21 68 stw r3,8552(r11) <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } ffc05808: 38 60 00 00 li r3,0 <== NOT EXECUTED int raw_output ) { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; rtems_termios_raw_output_size = raw_output; ffc0580c: 90 a9 00 08 stw r5,8(r9) <== NOT EXECUTED int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; ffc05810: 90 89 00 04 stw r4,4(r9) <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } ffc05814: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc07260 : } } rtems_status_code rtems_termios_close (void *arg) { ffc07260: 94 21 ff e8 stwu r1,-24(r1) ffc07264: 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 (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc07268: 38 80 00 00 li r4,0 } } rtems_status_code rtems_termios_close (void *arg) { ffc0726c: 90 01 00 1c stw r0,28(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 (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc07270: 38 a0 00 00 li r5,0 } } rtems_status_code rtems_termios_close (void *arg) { ffc07274: 93 c1 00 10 stw r30,16(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 (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc07278: 3f c0 00 00 lis r30,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; ffc0727c: 81 23 00 00 lwz r9,0(r3) } } rtems_status_code rtems_termios_close (void *arg) { ffc07280: 93 a1 00 0c stw r29,12(r1) ffc07284: 7c 7d 1b 78 mr r29,r3 rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc07288: 80 7e 27 58 lwz r3,10072(r30) } } rtems_status_code rtems_termios_close (void *arg) { ffc0728c: 93 e1 00 14 stw r31,20(r1) rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc07290: 83 e9 00 38 lwz r31,56(r9) rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc07294: 48 00 14 7d bl ffc08710 if (sc != RTEMS_SUCCESSFUL) ffc07298: 2f 83 00 00 cmpwi cr7,r3,0 ffc0729c: 40 9e 01 ac bne- cr7,ffc07448 <== NEVER TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { ffc072a0: 81 3f 00 08 lwz r9,8(r31) ffc072a4: 38 09 ff ff addi r0,r9,-1 ffc072a8: 2f 80 00 00 cmpwi cr7,r0,0 ffc072ac: 90 1f 00 08 stw r0,8(r31) ffc072b0: 40 9e 00 d0 bne- cr7,ffc07380 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { ffc072b4: 80 1f 00 cc lwz r0,204(r31) ffc072b8: 3d 20 00 00 lis r9,0 ffc072bc: 39 29 28 88 addi r9,r9,10376 ffc072c0: 54 00 28 34 rlwinm r0,r0,5,0,26 ffc072c4: 7d 29 02 14 add r9,r9,r0 ffc072c8: 80 09 00 04 lwz r0,4(r9) ffc072cc: 2f 80 00 00 cmpwi cr7,r0,0 ffc072d0: 41 9e 01 24 beq- cr7,ffc073f4 <== ALWAYS TAKEN /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); ffc072d4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc072d8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc072dc: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_fatal_error_occurred (sc); } drainOutput (tty); } if (tty->device.outputUsesInterrupts ffc072e0: 80 1f 00 b4 lwz r0,180(r31) <== NOT EXECUTED ffc072e4: 2f 80 00 02 cmpwi cr7,r0,2 <== NOT EXECUTED ffc072e8: 41 9e 01 38 beq- cr7,ffc07420 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) ffc072ec: 80 1f 00 9c lwz r0,156(r31) ffc072f0: 2f 80 00 00 cmpwi cr7,r0,0 ffc072f4: 41 9e 00 18 beq- cr7,ffc0730c <== ALWAYS TAKEN (*tty->device.lastClose)(tty->major, tty->minor, arg); ffc072f8: 7f a5 eb 78 mr r5,r29 <== NOT EXECUTED ffc072fc: 80 7f 00 0c lwz r3,12(r31) <== NOT EXECUTED ffc07300: 80 9f 00 10 lwz r4,16(r31) <== NOT EXECUTED ffc07304: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07308: 4e 80 04 21 bctrl <== NOT EXECUTED if (tty->forw == NULL) { ffc0730c: 81 3f 00 00 lwz r9,0(r31) ffc07310: 2f 89 00 00 cmpwi cr7,r9,0 ffc07314: 41 9e 00 a0 beq- cr7,ffc073b4 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; ffc07318: 80 1f 00 04 lwz r0,4(r31) ffc0731c: 90 09 00 04 stw r0,4(r9) } if (tty->back == NULL) { ffc07320: 81 7f 00 04 lwz r11,4(r31) ffc07324: 2f 8b 00 00 cmpwi cr7,r11,0 ffc07328: 41 9e 00 b4 beq- cr7,ffc073dc <== ALWAYS TAKEN if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; ffc0732c: 91 2b 00 00 stw r9,0(r11) <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); ffc07330: 80 7f 00 14 lwz r3,20(r31) ffc07334: 48 00 13 01 bl ffc08634 rtems_semaphore_delete (tty->osem); ffc07338: 80 7f 00 18 lwz r3,24(r31) ffc0733c: 48 00 12 f9 bl ffc08634 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); ffc07340: 80 7f 00 8c lwz r3,140(r31) ffc07344: 48 00 12 f1 bl ffc08634 if ((tty->device.pollRead == NULL) || ffc07348: 80 1f 00 a0 lwz r0,160(r31) ffc0734c: 2f 80 00 00 cmpwi cr7,r0,0 ffc07350: 41 9e 00 58 beq- cr7,ffc073a8 <== NEVER TAKEN (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) ffc07354: 80 1f 00 b4 lwz r0,180(r31) ffc07358: 2f 80 00 02 cmpwi cr7,r0,2 ffc0735c: 41 9e 00 4c beq- cr7,ffc073a8 <== NEVER TAKEN rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); ffc07360: 80 7f 00 58 lwz r3,88(r31) ffc07364: 4b ff d2 91 bl ffc045f4 free (tty->rawOutBuf.theBuf); ffc07368: 80 7f 00 7c lwz r3,124(r31) ffc0736c: 4b ff d2 89 bl ffc045f4 free (tty->cbuf); ffc07370: 80 7f 00 1c lwz r3,28(r31) ffc07374: 4b ff d2 81 bl ffc045f4 free (tty); ffc07378: 7f e3 fb 78 mr r3,r31 ffc0737c: 4b ff d2 79 bl ffc045f4 } rtems_semaphore_release (rtems_termios_ttyMutex); ffc07380: 80 7e 27 58 lwz r3,10072(r30) ffc07384: 48 00 14 ed bl ffc08870 return RTEMS_SUCCESSFUL; } ffc07388: 80 01 00 1c lwz r0,28(r1) ffc0738c: 38 60 00 00 li r3,0 ffc07390: 83 a1 00 0c lwz r29,12(r1) ffc07394: 7c 08 03 a6 mtlr r0 ffc07398: 83 c1 00 10 lwz r30,16(r1) ffc0739c: 83 e1 00 14 lwz r31,20(r1) ffc073a0: 38 21 00 18 addi r1,r1,24 ffc073a4: 4e 80 00 20 blr rtems_semaphore_delete (tty->isem); rtems_semaphore_delete (tty->osem); rtems_semaphore_delete (tty->rawOutBuf.Semaphore); if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); ffc073a8: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED ffc073ac: 48 00 12 89 bl ffc08634 <== NOT EXECUTED ffc073b0: 4b ff ff b0 b ffc07360 <== NOT EXECUTED 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; ffc073b4: 81 7f 00 04 lwz r11,4(r31) ffc073b8: 3d 40 00 00 lis r10,0 if ( rtems_termios_ttyTail != NULL ) { ffc073bc: 2f 8b 00 00 cmpwi cr7,r11,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; ffc073c0: 91 6a 27 5c stw r11,10076(r10) if ( rtems_termios_ttyTail != NULL ) { ffc073c4: 41 9e 00 88 beq- cr7,ffc0744c <== ALWAYS TAKEN rtems_termios_ttyTail->forw = NULL; ffc073c8: 91 2b 00 00 stw r9,0(r11) <== NOT EXECUTED } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { ffc073cc: 81 7f 00 04 lwz r11,4(r31) <== NOT EXECUTED ffc073d0: 81 3f 00 00 lwz r9,0(r31) <== NOT EXECUTED ffc073d4: 2f 8b 00 00 cmpwi cr7,r11,0 <== NOT EXECUTED ffc073d8: 40 9e ff 54 bne+ cr7,ffc0732c <== NOT EXECUTED rtems_termios_ttyHead = tty->forw; if ( rtems_termios_ttyHead != NULL ) { ffc073dc: 2f 89 00 00 cmpwi cr7,r9,0 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; ffc073e0: 3d 40 00 00 lis r10,0 ffc073e4: 91 2a 27 60 stw r9,10080(r10) if ( rtems_termios_ttyHead != NULL ) { ffc073e8: 41 be ff 48 beq- cr7,ffc07330 <== NEVER TAKEN rtems_termios_ttyHead->back = NULL; ffc073ec: 91 69 00 04 stw r11,4(r9) ffc073f0: 4b ff ff 40 b ffc07330 } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc073f4: 80 7f 00 18 lwz r3,24(r31) ffc073f8: 38 80 00 00 li r4,0 ffc073fc: 38 a0 00 00 li r5,0 ffc07400: 48 00 13 11 bl ffc08710 if (sc != RTEMS_SUCCESSFUL) { ffc07404: 2f 83 00 00 cmpwi cr7,r3,0 ffc07408: 40 9e 00 40 bne- cr7,ffc07448 <== NEVER TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); ffc0740c: 7f e3 fb 78 mr r3,r31 ffc07410: 4b ff f5 39 bl ffc06948 } if (tty->device.outputUsesInterrupts ffc07414: 80 1f 00 b4 lwz r0,180(r31) ffc07418: 2f 80 00 02 cmpwi cr7,r0,2 ffc0741c: 40 9e fe d0 bne+ cr7,ffc072ec <== ALWAYS TAKEN == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( ffc07420: 80 7f 00 c4 lwz r3,196(r31) <== NOT EXECUTED ffc07424: 38 80 00 01 li r4,1 <== NOT EXECUTED ffc07428: 48 00 0d 65 bl ffc0818c <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) ffc0742c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc07430: 40 9e 00 18 bne- cr7,ffc07448 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( ffc07434: 80 7f 00 c8 lwz r3,200(r31) <== NOT EXECUTED ffc07438: 38 80 00 01 li r4,1 <== NOT EXECUTED ffc0743c: 48 00 0d 51 bl ffc0818c <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) ffc07440: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc07444: 41 9e fe a8 beq+ cr7,ffc072ec <== NOT EXECUTED rtems_fatal_error_occurred (sc); ffc07448: 48 00 1b f1 bl ffc09038 <== NOT EXECUTED } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; ffc0744c: 3d 20 00 00 lis r9,0 ffc07450: 91 69 27 60 stw r11,10080(r9) ffc07454: 4b ff fe dc b ffc07330 =============================================================================== ffc05ac8 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { ffc05ac8: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc05acc: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED ffc05ad0: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED /* * sum up character count already sent */ tty->t_dqlen += len; if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc05ad4: 81 63 00 b4 lwz r11,180(r3) <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; ffc05ad8: 80 03 00 90 lwz r0,144(r3) <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc05adc: 2f 8b 00 02 cmpwi cr7,r11,2 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; ffc05ae0: 7c 00 22 14 add r0,r0,r4 <== NOT EXECUTED ffc05ae4: 90 03 00 90 stw r0,144(r3) <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc05ae8: 41 9e 00 4c beq- cr7,ffc05b34 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { ffc05aec: 80 03 00 cc lwz r0,204(r3) <== NOT EXECUTED ffc05af0: 2f 80 00 05 cmpwi cr7,r0,5 <== NOT EXECUTED ffc05af4: 41 9e 00 14 beq- cr7,ffc05b08 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } ffc05af8: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc05afc: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc05b00: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); ffc05b04: 4b ff fd 3c b ffc05840 <== NOT EXECUTED } else if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { ffc05b08: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc05b0c: 80 09 29 3c lwz r0,10556(r9) <== NOT EXECUTED ffc05b10: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc05b14: 41 9e 00 0c beq- cr7,ffc05b20 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); ffc05b18: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc05b1c: 4e 80 04 21 bctrl <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } ffc05b20: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc05b24: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc05b28: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc05b2c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05b30: 4e 80 00 20 blr <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, ffc05b34: 80 63 00 c8 lwz r3,200(r3) <== NOT EXECUTED ffc05b38: 38 80 00 02 li r4,2 <== NOT EXECUTED ffc05b3c: 48 00 26 51 bl ffc0818c <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) ffc05b40: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc05b44: 41 9e ff dc beq+ cr7,ffc05b20 <== NOT EXECUTED rtems_fatal_error_occurred (sc); ffc05b48: 48 00 34 f1 bl ffc09038 <== NOT EXECUTED =============================================================================== ffc05b4c : * 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) { ffc05b4c: 94 21 ff d0 stwu r1,-48(r1) <== NOT EXECUTED ffc05b50: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc05b54: 90 01 00 34 stw r0,52(r1) <== NOT EXECUTED 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) { ffc05b58: 81 23 00 cc lwz r9,204(r3) <== NOT EXECUTED * 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) { ffc05b5c: 93 a1 00 24 stw r29,36(r1) <== NOT EXECUTED 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) { ffc05b60: 3f a0 00 00 lis r29,0 <== NOT EXECUTED ffc05b64: 55 29 28 34 rlwinm r9,r9,5,0,26 <== NOT EXECUTED ffc05b68: 3b bd 28 88 addi r29,r29,10376 <== NOT EXECUTED * 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) { ffc05b6c: 93 61 00 1c stw r27,28(r1) <== NOT EXECUTED 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) { ffc05b70: 38 09 00 10 addi r0,r9,16 <== NOT EXECUTED ffc05b74: 7c 1d 00 2e lwzx r0,r29,r0 <== NOT EXECUTED * 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) { ffc05b78: 7c bb 2b 78 mr r27,r5 <== NOT EXECUTED ffc05b7c: 93 c1 00 28 stw r30,40(r1) <== NOT EXECUTED ffc05b80: 7c 9e 23 78 mr r30,r4 <== NOT EXECUTED 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) { ffc05b84: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED * 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) { ffc05b88: 93 e1 00 2c stw r31,44(r1) <== NOT EXECUTED ffc05b8c: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED ffc05b90: 92 c1 00 08 stw r22,8(r1) <== NOT EXECUTED ffc05b94: 92 e1 00 0c stw r23,12(r1) <== NOT EXECUTED ffc05b98: 93 01 00 10 stw r24,16(r1) <== NOT EXECUTED ffc05b9c: 93 21 00 14 stw r25,20(r1) <== NOT EXECUTED ffc05ba0: 93 41 00 18 stw r26,24(r1) <== NOT EXECUTED ffc05ba4: 93 81 00 20 stw r28,32(r1) <== NOT EXECUTED 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) { ffc05ba8: 41 9e 00 f0 beq- cr7,ffc05c98 <== NOT EXECUTED while (len--) { ffc05bac: 2f 85 00 00 cmpwi cr7,r5,0 <== NOT EXECUTED ffc05bb0: 41 9e 00 38 beq- cr7,ffc05be8 <== NOT EXECUTED ffc05bb4: 3b 80 00 00 li r28,0 <== NOT EXECUTED ffc05bb8: 48 00 00 14 b ffc05bcc <== NOT EXECUTED ffc05bbc: 81 3f 00 cc lwz r9,204(r31) <== NOT EXECUTED ffc05bc0: 55 29 28 34 rlwinm r9,r9,5,0,26 <== NOT EXECUTED ffc05bc4: 38 09 00 10 addi r0,r9,16 <== NOT EXECUTED ffc05bc8: 7c 1d 00 2e lwzx r0,r29,r0 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); ffc05bcc: 7c 7e e0 ae lbzx r3,r30,r28 <== NOT EXECUTED ffc05bd0: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc05bd4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc05bd8: 3b 9c 00 01 addi r28,r28,1 <== NOT EXECUTED ffc05bdc: 4e 80 04 21 bctrl <== NOT EXECUTED 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--) { ffc05be0: 7f 9b e0 00 cmpw cr7,r27,r28 <== NOT EXECUTED ffc05be4: 40 9e ff d8 bne+ cr7,ffc05bbc <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { ffc05be8: 80 1f 00 e4 lwz r0,228(r31) <== NOT EXECUTED ffc05bec: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc05bf0: 40 9e 00 68 bne- cr7,ffc05c58 <== NOT EXECUTED ffc05bf4: 80 1f 00 dc lwz r0,220(r31) <== NOT EXECUTED ffc05bf8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc05bfc: 41 9e 00 5c beq- cr7,ffc05c58 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); ffc05c00: 38 7f 00 30 addi r3,r31,48 <== NOT EXECUTED ffc05c04: 80 9f 00 e0 lwz r4,224(r31) <== NOT EXECUTED ffc05c08: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; ffc05c0c: 3b 40 00 00 li r26,0 <== NOT EXECUTED /* * 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); ffc05c10: 4e 80 04 21 bctrl <== NOT EXECUTED tty->tty_rcvwakeup = 1; ffc05c14: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc05c18: 90 1f 00 e4 stw r0,228(r31) <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } ffc05c1c: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED ffc05c20: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED ffc05c24: 82 c1 00 08 lwz r22,8(r1) <== NOT EXECUTED ffc05c28: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05c2c: 82 e1 00 0c lwz r23,12(r1) <== NOT EXECUTED ffc05c30: 83 01 00 10 lwz r24,16(r1) <== NOT EXECUTED ffc05c34: 83 21 00 14 lwz r25,20(r1) <== NOT EXECUTED ffc05c38: 83 41 00 18 lwz r26,24(r1) <== NOT EXECUTED ffc05c3c: 83 61 00 1c lwz r27,28(r1) <== NOT EXECUTED ffc05c40: 83 81 00 20 lwz r28,32(r1) <== NOT EXECUTED ffc05c44: 83 a1 00 24 lwz r29,36(r1) <== NOT EXECUTED ffc05c48: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc05c4c: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc05c50: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc05c54: 4e 80 00 20 blr <== NOT EXECUTED ffc05c58: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; ffc05c5c: 3b 40 00 00 li r26,0 <== NOT EXECUTED } ffc05c60: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED ffc05c64: 82 c1 00 08 lwz r22,8(r1) <== NOT EXECUTED ffc05c68: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05c6c: 82 e1 00 0c lwz r23,12(r1) <== NOT EXECUTED ffc05c70: 83 01 00 10 lwz r24,16(r1) <== NOT EXECUTED ffc05c74: 83 21 00 14 lwz r25,20(r1) <== NOT EXECUTED ffc05c78: 83 41 00 18 lwz r26,24(r1) <== NOT EXECUTED ffc05c7c: 83 61 00 1c lwz r27,28(r1) <== NOT EXECUTED ffc05c80: 83 81 00 20 lwz r28,32(r1) <== NOT EXECUTED ffc05c84: 83 a1 00 24 lwz r29,36(r1) <== NOT EXECUTED ffc05c88: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc05c8c: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc05c90: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc05c94: 4e 80 00 20 blr <== NOT EXECUTED /* * 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); ffc05c98: 7c bd 2b 78 mr r29,r5 <== NOT EXECUTED 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, ffc05c9c: 3a c3 00 4a addi r22,r3,74 <== NOT EXECUTED /* * 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); ffc05ca0: 3a e3 00 30 addi r23,r3,48 <== NOT EXECUTED ffc05ca4: 3b 20 00 00 li r25,0 <== NOT EXECUTED ffc05ca8: 3b 40 00 00 li r26,0 <== NOT EXECUTED ffc05cac: 48 00 00 e4 b ffc05d90 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; ffc05cb0: 83 9f 00 60 lwz r28,96(r31) <== NOT EXECUTED ffc05cb4: 81 3f 00 64 lwz r9,100(r31) <== NOT EXECUTED ffc05cb8: 38 1c 00 01 addi r0,r28,1 <== NOT EXECUTED ffc05cbc: 7f 80 4b 96 divwu r28,r0,r9 <== NOT EXECUTED ffc05cc0: 7f 9c 49 d6 mullw r28,r28,r9 <== NOT EXECUTED ffc05cc4: 7f 9c 00 50 subf r28,r28,r0 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc05cc8: 7f 00 00 a6 mfmsr r24 <== NOT EXECUTED ffc05ccc: 7c 10 42 a6 mfsprg r0,0 <== NOT EXECUTED ffc05cd0: 7f 00 00 78 andc r0,r24,r0 <== NOT EXECUTED ffc05cd4: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) ffc05cd8: 80 1f 00 5c lwz r0,92(r31) <== NOT EXECUTED ffc05cdc: 81 7f 00 64 lwz r11,100(r31) <== NOT EXECUTED ffc05ce0: 81 3f 00 64 lwz r9,100(r31) <== NOT EXECUTED ffc05ce4: 7c 00 58 50 subf r0,r0,r11 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && ffc05ce8: 81 7f 00 c0 lwz r11,192(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) ffc05cec: 7c 00 e2 14 add r0,r0,r28 <== NOT EXECUTED ffc05cf0: 7d 40 4b 96 divwu r10,r0,r9 <== NOT EXECUTED ffc05cf4: 7d 2a 49 d6 mullw r9,r10,r9 <== NOT EXECUTED ffc05cf8: 7c 09 00 50 subf r0,r9,r0 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && ffc05cfc: 7f 80 58 40 cmplw cr7,r0,r11 <== NOT EXECUTED ffc05d00: 40 9d 00 3c ble- cr7,ffc05d3c <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { ffc05d04: 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) ffc05d08: 70 09 00 01 andi. r9,r0,1 <== NOT EXECUTED ffc05d0c: 40 82 00 30 bne- ffc05d3c <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; ffc05d10: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc05d14: 60 00 00 01 ori r0,r0,1 <== NOT EXECUTED ffc05d18: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) ffc05d1c: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc05d20: 70 00 04 02 andi. r0,r0,1026 <== NOT EXECUTED ffc05d24: 2f 80 04 00 cmpwi cr7,r0,1024 <== NOT EXECUTED ffc05d28: 41 9e 01 a8 beq- cr7,ffc05ed0 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) ffc05d2c: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc05d30: 70 00 01 04 andi. r0,r0,260 <== NOT EXECUTED ffc05d34: 2f 80 01 00 cmpwi cr7,r0,256 <== NOT EXECUTED ffc05d38: 41 9e 01 d8 beq- cr7,ffc05f10 <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc05d3c: 7f 00 01 24 mtmsr r24 <== NOT EXECUTED } } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { ffc05d40: 80 1f 00 5c lwz r0,92(r31) <== NOT EXECUTED ffc05d44: 7f 80 e0 00 cmpw cr7,r0,r28 <== NOT EXECUTED ffc05d48: 41 9e 00 e8 beq- cr7,ffc05e30 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; ffc05d4c: 81 3f 00 58 lwz r9,88(r31) <== NOT EXECUTED ffc05d50: 7f 69 e1 ae stbx r27,r9,r28 <== NOT EXECUTED tty->rawInBuf.Tail = newTail; /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { ffc05d54: 80 1f 00 e4 lwz r0,228(r31) <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; ffc05d58: 93 9f 00 60 stw r28,96(r31) <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { ffc05d5c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc05d60: 40 9e 00 28 bne- cr7,ffc05d88 <== NOT EXECUTED ffc05d64: 80 1f 00 dc lwz r0,220(r31) <== NOT EXECUTED ffc05d68: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc05d6c: 41 9e 00 1c beq- cr7,ffc05d88 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); ffc05d70: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc05d74: 7e e3 bb 78 mr r3,r23 <== NOT EXECUTED ffc05d78: 80 9f 00 e0 lwz r4,224(r31) <== NOT EXECUTED ffc05d7c: 4e 80 04 21 bctrl <== NOT EXECUTED tty->tty_rcvwakeup = 1; ffc05d80: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc05d84: 90 1f 00 e4 stw r0,228(r31) <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; ffc05d88: 3b de 00 01 addi r30,r30,1 <== NOT EXECUTED ffc05d8c: 3b bd ff ff addi r29,r29,-1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { ffc05d90: 2f 9d 00 00 cmpwi cr7,r29,0 <== NOT EXECUTED ffc05d94: 41 9e 00 d8 beq- cr7,ffc05e6c <== NOT EXECUTED c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { ffc05d98: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; ffc05d9c: 8b 7e 00 00 lbz r27,0(r30) <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { ffc05da0: 70 09 02 00 andi. r9,r0,512 <== NOT EXECUTED ffc05da4: 41 82 00 1c beq- ffc05dc0 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { ffc05da8: 88 1f 00 4a lbz r0,74(r31) <== NOT EXECUTED ffc05dac: 7f 80 d8 00 cmpw cr7,r0,r27 <== NOT EXECUTED ffc05db0: 41 9e 00 88 beq- cr7,ffc05e38 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { ffc05db4: 88 1f 00 49 lbz r0,73(r31) <== NOT EXECUTED ffc05db8: 7f 80 d8 00 cmpw cr7,r0,r27 <== NOT EXECUTED ffc05dbc: 41 9e 00 9c beq- cr7,ffc05e58 <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { ffc05dc0: 2f 99 00 00 cmpwi cr7,r25,0 <== NOT EXECUTED ffc05dc4: 41 9e fe ec beq+ cr7,ffc05cb0 <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { ffc05dc8: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc05dcc: 54 00 06 b6 rlwinm r0,r0,0,26,27 <== NOT EXECUTED ffc05dd0: 2f 80 00 20 cmpwi cr7,r0,32 <== NOT EXECUTED ffc05dd4: 40 9e ff b4 bne+ cr7,ffc05d88 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc05dd8: 7f 80 00 a6 mfmsr r28 <== NOT EXECUTED ffc05ddc: 7c 10 42 a6 mfsprg r0,0 <== NOT EXECUTED ffc05de0: 7f 80 00 78 andc r0,r28,r0 <== NOT EXECUTED ffc05de4: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { ffc05de8: 81 3f 00 94 lwz r9,148(r31) <== NOT EXECUTED if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; ffc05dec: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { ffc05df0: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; ffc05df4: 54 00 06 f2 rlwinm r0,r0,0,27,25 <== NOT EXECUTED ffc05df8: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { ffc05dfc: 40 9e 00 0c bne- cr7,ffc05e08 <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc05e00: 7f 80 01 24 mtmsr r28 <== NOT EXECUTED ffc05e04: 4b ff ff 84 b ffc05d88 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); ffc05e08: 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)(tty->minor, ffc05e0c: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc05e10: 80 9f 00 7c lwz r4,124(r31) <== NOT EXECUTED ffc05e14: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED ffc05e18: 7c 84 4a 14 add r4,r4,r9 <== NOT EXECUTED ffc05e1c: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc05e20: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc05e24: 4e 80 04 21 bctrl <== NOT EXECUTED ffc05e28: 7f 80 01 24 mtmsr r28 <== NOT EXECUTED ffc05e2c: 4b ff ff 5c b ffc05d88 <== NOT EXECUTED } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { dropped++; ffc05e30: 3b 5a 00 01 addi r26,r26,1 <== NOT EXECUTED ffc05e34: 4b ff ff 54 b ffc05d88 <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { ffc05e38: 89 3f 00 49 lbz r9,73(r31) <== NOT EXECUTED ffc05e3c: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc05e40: 41 9e 00 7c beq- cr7,ffc05ebc <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; ffc05e44: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; ffc05e48: 3b 20 00 01 li r25,1 <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; ffc05e4c: 60 00 00 10 ori r0,r0,16 <== NOT EXECUTED ffc05e50: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED ffc05e54: 4b ff ff 74 b ffc05dc8 <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; ffc05e58: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; ffc05e5c: 3b 20 00 01 li r25,1 <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; ffc05e60: 54 00 07 34 rlwinm r0,r0,0,28,26 <== NOT EXECUTED ffc05e64: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED ffc05e68: 4b ff ff 60 b ffc05dc8 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; ffc05e6c: 80 1f 00 78 lwz r0,120(r31) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); ffc05e70: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; ffc05e74: 7c 00 d2 14 add r0,r0,r26 <== NOT EXECUTED ffc05e78: 90 1f 00 78 stw r0,120(r31) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); ffc05e7c: 48 00 29 f5 bl ffc08870 <== NOT EXECUTED return dropped; } ffc05e80: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED ffc05e84: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED ffc05e88: 82 c1 00 08 lwz r22,8(r1) <== NOT EXECUTED ffc05e8c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05e90: 82 e1 00 0c lwz r23,12(r1) <== NOT EXECUTED ffc05e94: 83 01 00 10 lwz r24,16(r1) <== NOT EXECUTED ffc05e98: 83 21 00 14 lwz r25,20(r1) <== NOT EXECUTED ffc05e9c: 83 41 00 18 lwz r26,24(r1) <== NOT EXECUTED ffc05ea0: 83 61 00 1c lwz r27,28(r1) <== NOT EXECUTED ffc05ea4: 83 81 00 20 lwz r28,32(r1) <== NOT EXECUTED ffc05ea8: 83 a1 00 24 lwz r29,36(r1) <== NOT EXECUTED ffc05eac: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc05eb0: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc05eb4: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc05eb8: 4e 80 00 20 blr <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; ffc05ebc: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; ffc05ec0: 3b 20 00 01 li r25,1 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; ffc05ec4: 68 00 00 10 xori r0,r0,16 <== NOT EXECUTED ffc05ec8: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED ffc05ecc: 4b ff fe fc b ffc05dc8 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || ffc05ed0: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc05ed4: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED ffc05ed8: 40 82 00 10 bne- ffc05ee8 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { ffc05edc: 80 1f 00 94 lwz r0,148(r31) <== NOT EXECUTED ffc05ee0: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc05ee4: 40 be fe 58 bne- cr7,ffc05d3c <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; ffc05ee8: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED (*tty->device.write)(tty->minor, ffc05eec: 7e c4 b3 78 mr r4,r22 <== NOT EXECUTED ffc05ef0: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED ffc05ef4: 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; ffc05ef8: 61 29 00 02 ori r9,r9,2 <== NOT EXECUTED (*tty->device.write)(tty->minor, ffc05efc: 80 7f 00 10 lwz r3,16(r31) <== 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; ffc05f00: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED (*tty->device.write)(tty->minor, ffc05f04: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc05f08: 4e 80 04 21 bctrl <== NOT EXECUTED ffc05f0c: 4b ff fe 30 b ffc05d3c <== NOT EXECUTED } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { ffc05f10: 80 1f 00 ac lwz r0,172(r31) <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; ffc05f14: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { ffc05f18: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; ffc05f1c: 61 29 00 04 ori r9,r9,4 <== NOT EXECUTED ffc05f20: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { ffc05f24: 41 be fe 18 beq- cr7,ffc05d3c <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); ffc05f28: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc05f2c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc05f30: 4e 80 04 21 bctrl <== NOT EXECUTED ffc05f34: 4b ff fe 08 b ffc05d3c <== NOT EXECUTED =============================================================================== ffc057a8 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { ffc057a8: 7c 08 02 a6 mflr r0 ffc057ac: 94 21 ff f8 stwu r1,-8(r1) rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { ffc057b0: 3c e0 00 00 lis r7,0 struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { ffc057b4: 90 01 00 0c stw r0,12(r1) rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { ffc057b8: 80 07 27 58 lwz r0,10072(r7) ffc057bc: 38 e7 27 58 addi r7,r7,10072 ffc057c0: 2f 80 00 00 cmpwi cr7,r0,0 ffc057c4: 41 9e 00 14 beq- cr7,ffc057d8 RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } ffc057c8: 80 01 00 0c lwz r0,12(r1) ffc057cc: 38 21 00 08 addi r1,r1,8 ffc057d0: 7c 08 03 a6 mtlr r0 ffc057d4: 4e 80 00 20 blr /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { sc = rtems_semaphore_create ( ffc057d8: 3c 60 54 52 lis r3,21586 ffc057dc: 60 63 6d 69 ori r3,r3,28009 ffc057e0: 38 80 00 01 li r4,1 ffc057e4: 38 a0 00 54 li r5,84 ffc057e8: 38 c0 00 00 li r6,0 ffc057ec: 48 00 2c 29 bl ffc08414 rtems_build_name ('T', 'R', 'm', 'i'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) ffc057f0: 2f 83 00 00 cmpwi cr7,r3,0 ffc057f4: 41 9e ff d4 beq+ cr7,ffc057c8 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); ffc057f8: 48 00 38 41 bl ffc09038 <== NOT EXECUTED =============================================================================== ffc06e1c : } } rtems_status_code rtems_termios_ioctl (void *arg) { ffc06e1c: 94 21 ff e0 stwu r1,-32(r1) ffc06e20: 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); ffc06e24: 38 80 00 00 li r4,0 } } rtems_status_code rtems_termios_ioctl (void *arg) { ffc06e28: 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; ffc06e2c: 38 00 00 00 li r0,0 sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc06e30: 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; ffc06e34: 81 23 00 00 lwz r9,0(r3) } } rtems_status_code rtems_termios_ioctl (void *arg) { ffc06e38: 93 c1 00 18 stw r30,24(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; ffc06e3c: 90 03 00 0c stw r0,12(r3) rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc06e40: 83 c9 00 38 lwz r30,56(r9) } } rtems_status_code rtems_termios_ioctl (void *arg) { ffc06e44: 93 e1 00 1c stw r31,28(r1) ffc06e48: 7c 7f 1b 78 mr r31,r3 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); ffc06e4c: 80 7e 00 18 lwz r3,24(r30) } } rtems_status_code rtems_termios_ioctl (void *arg) { ffc06e50: 93 81 00 10 stw r28,16(r1) ffc06e54: 93 a1 00 14 stw r29,20(r1) ffc06e58: 93 41 00 08 stw r26,8(r1) ffc06e5c: 93 61 00 0c stw r27,12(r1) rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; ffc06e60: 83 9f 00 08 lwz r28,8(r31) rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc06e64: 48 00 18 ad bl ffc08710 if (sc != RTEMS_SUCCESSFUL) { ffc06e68: 7c 7d 1b 79 mr. r29,r3 ffc06e6c: 40 82 00 4c bne- ffc06eb8 <== NEVER TAKEN args->ioctl_return = sc; return sc; } switch (args->command) { ffc06e70: 80 1f 00 04 lwz r0,4(r31) ffc06e74: 2f 80 00 04 cmpwi cr7,r0,4 ffc06e78: 41 9e 00 28 beq- cr7,ffc06ea0 <== NEVER TAKEN ffc06e7c: 2b 80 00 04 cmplwi cr7,r0,4 ffc06e80: 41 9d 00 68 bgt- cr7,ffc06ee8 <== NEVER TAKEN ffc06e84: 2f 80 00 02 cmpwi cr7,r0,2 ffc06e88: 41 9e 00 bc beq- cr7,ffc06f44 ffc06e8c: 2b 80 00 02 cmplwi cr7,r0,2 ffc06e90: 40 9d 02 04 ble- cr7,ffc07094 if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); ffc06e94: 7f c3 f3 78 mr r3,r30 ffc06e98: 4b ff fa b1 bl ffc06948 break; ffc06e9c: 48 00 00 14 b ffc06eb0 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; ffc06ea0: 81 3c 00 00 lwz r9,0(r28) <== NOT EXECUTED ffc06ea4: 81 5c 00 04 lwz r10,4(r28) <== NOT EXECUTED ffc06ea8: 91 3e 00 dc stw r9,220(r30) <== NOT EXECUTED ffc06eac: 91 5e 00 e0 stw r10,224(r30) <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); ffc06eb0: 80 7e 00 18 lwz r3,24(r30) ffc06eb4: 48 00 19 bd bl ffc08870 args->ioctl_return = sc; return sc; } ffc06eb8: 80 01 00 24 lwz r0,36(r1) ffc06ebc: 7f a3 eb 78 mr r3,r29 *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; ffc06ec0: 93 bf 00 0c stw r29,12(r31) return sc; } ffc06ec4: 7c 08 03 a6 mtlr r0 ffc06ec8: 83 41 00 08 lwz r26,8(r1) ffc06ecc: 83 61 00 0c lwz r27,12(r1) ffc06ed0: 83 81 00 10 lwz r28,16(r1) ffc06ed4: 83 a1 00 14 lwz r29,20(r1) ffc06ed8: 83 c1 00 18 lwz r30,24(r1) ffc06edc: 83 e1 00 1c lwz r31,28(r1) ffc06ee0: 38 21 00 20 addi r1,r1,32 ffc06ee4: 4e 80 00 20 blr sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { ffc06ee8: 3d 20 40 04 lis r9,16388 <== NOT EXECUTED ffc06eec: 61 29 66 7f ori r9,r9,26239 <== NOT EXECUTED ffc06ef0: 7f 80 48 00 cmpw cr7,r0,r9 <== NOT EXECUTED ffc06ef4: 41 9e 01 74 beq- cr7,ffc07068 <== NOT EXECUTED ffc06ef8: 7f 80 48 40 cmplw cr7,r0,r9 <== NOT EXECUTED ffc06efc: 41 9d 01 b4 bgt- cr7,ffc070b0 <== NOT EXECUTED ffc06f00: 2f 80 00 05 cmpwi cr7,r0,5 <== NOT EXECUTED ffc06f04: 41 9e 02 3c beq- cr7,ffc07140 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { ffc06f08: 80 1e 00 cc lwz r0,204(r30) <== NOT EXECUTED ffc06f0c: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc06f10: 39 29 28 88 addi r9,r9,10376 <== NOT EXECUTED ffc06f14: 54 00 28 34 rlwinm r0,r0,5,0,26 <== NOT EXECUTED ffc06f18: 7d 29 02 14 add r9,r9,r0 <== NOT EXECUTED ffc06f1c: 80 09 00 18 lwz r0,24(r9) <== NOT EXECUTED ffc06f20: 3b a0 00 0a li r29,10 <== NOT EXECUTED ffc06f24: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc06f28: 41 be ff 88 beq- cr7,ffc06eb0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); ffc06f2c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc06f30: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06f34: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc06f38: 4e 80 04 21 bctrl <== NOT EXECUTED ffc06f3c: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED ffc06f40: 4b ff ff 70 b ffc06eb0 <== NOT EXECUTED case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; ffc06f44: 3b 9e 00 30 addi r28,r30,48 ffc06f48: 80 9f 00 08 lwz r4,8(r31) ffc06f4c: 7f 83 e3 78 mr r3,r28 ffc06f50: 38 a0 00 24 li r5,36 ffc06f54: 48 00 cf 09 bl ffc13e5c /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && ffc06f58: 80 1e 00 b8 lwz r0,184(r30) ffc06f5c: 70 09 02 00 andi. r9,r0,512 ffc06f60: 41 82 00 58 beq- ffc06fb8 ffc06f64: 80 1e 00 30 lwz r0,48(r30) ffc06f68: 70 0b 04 00 andi. r11,r0,1024 ffc06f6c: 40 82 00 4c bne- ffc06fb8 <== ALWAYS TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); ffc06f70: 81 3e 00 b8 lwz r9,184(r30) <== NOT EXECUTED ffc06f74: 38 00 fd ef li r0,-529 <== NOT EXECUTED ffc06f78: 7d 20 00 38 and r0,r9,r0 <== NOT EXECUTED ffc06f7c: 90 1e 00 b8 stw r0,184(r30) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { ffc06f80: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED ffc06f84: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED ffc06f88: 41 82 00 30 beq- ffc06fb8 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc06f8c: 7f 60 00 a6 mfmsr r27 <== NOT EXECUTED ffc06f90: 7c 10 42 a6 mfsprg r0,0 <== NOT EXECUTED ffc06f94: 7f 60 00 78 andc r0,r27,r0 <== NOT EXECUTED ffc06f98: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { ffc06f9c: 81 3e 00 94 lwz r9,148(r30) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; ffc06fa0: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { ffc06fa4: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; ffc06fa8: 54 00 06 f2 rlwinm r0,r0,0,27,25 <== NOT EXECUTED ffc06fac: 90 1e 00 b8 stw r0,184(r30) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { ffc06fb0: 40 9e 02 00 bne- cr7,ffc071b0 <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc06fb4: 7f 60 01 24 mtmsr r27 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && ffc06fb8: 80 1e 00 b8 lwz r0,184(r30) ffc06fbc: 70 09 04 00 andi. r9,r0,1024 ffc06fc0: 41 82 00 28 beq- ffc06fe8 <== ALWAYS TAKEN ffc06fc4: 80 1e 00 30 lwz r0,48(r30) <== NOT EXECUTED ffc06fc8: 70 0b 10 00 andi. r11,r0,4096 <== NOT EXECUTED ffc06fcc: 40 82 00 1c bne- ffc06fe8 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); ffc06fd0: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED ffc06fd4: 54 00 05 a8 rlwinm r0,r0,0,22,20 <== NOT EXECUTED ffc06fd8: 90 1e 00 b8 stw r0,184(r30) <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); ffc06fdc: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED ffc06fe0: 54 00 07 fa rlwinm r0,r0,0,31,29 <== NOT EXECUTED ffc06fe4: 90 1e 00 b8 stw r0,184(r30) <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && ffc06fe8: 80 1e 00 b8 lwz r0,184(r30) ffc06fec: 70 09 01 00 andi. r9,r0,256 ffc06ff0: 40 82 01 64 bne- ffc07154 <== NEVER TAKEN ffc06ff4: 81 3e 00 38 lwz r9,56(r30) /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { ffc06ff8: 2f 89 00 00 cmpwi cr7,r9,0 ffc06ffc: 41 9c 02 24 blt- cr7,ffc07220 <== NEVER TAKEN tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { ffc07000: 80 1e 00 30 lwz r0,48(r30) ffc07004: 70 09 10 00 andi. r9,r0,4096 ffc07008: 41 82 00 10 beq- ffc07018 <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDXOF; ffc0700c: 81 3e 00 b8 lwz r9,184(r30) <== NOT EXECUTED ffc07010: 61 29 04 00 ori r9,r9,1024 <== NOT EXECUTED ffc07014: 91 3e 00 b8 stw r9,184(r30) <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { ffc07018: 70 0b 04 00 andi. r11,r0,1024 ffc0701c: 41 82 00 10 beq- ffc0702c <== NEVER TAKEN tty->flow_ctrl |= FL_MDXON; ffc07020: 80 1e 00 b8 lwz r0,184(r30) ffc07024: 60 00 02 00 ori r0,r0,512 ffc07028: 90 1e 00 b8 stw r0,184(r30) 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) { ffc0702c: 83 7e 00 3c lwz r27,60(r30) ffc07030: 73 7b 00 02 andi. r27,r27,2 ffc07034: 41 82 01 a4 beq- ffc071d8 <== NEVER TAKEN tty->rawInBufSemaphoreOptions = RTEMS_WAIT; ffc07038: 38 00 00 00 li r0,0 tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; ffc0703c: 90 1e 00 74 stw r0,116(r30) /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; ffc07040: 90 1e 00 6c stw r0,108(r30) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; ffc07044: 90 1e 00 70 stw r0,112(r30) else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) ffc07048: 80 1e 00 a8 lwz r0,168(r30) ffc0704c: 2f 80 00 00 cmpwi cr7,r0,0 ffc07050: 41 be fe 60 beq- cr7,ffc06eb0 <== NEVER TAKEN (*tty->device.setAttributes)(tty->minor, &tty->termios); ffc07054: 7f 84 e3 78 mr r4,r28 ffc07058: 80 7e 00 10 lwz r3,16(r30) ffc0705c: 7c 09 03 a6 mtctr r0 ffc07060: 4e 80 04 21 bctrl ffc07064: 4b ff fe 4c b ffc06eb0 *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; ffc07068: 81 3e 00 60 lwz r9,96(r30) <== NOT EXECUTED ffc0706c: 80 1e 00 5c lwz r0,92(r30) <== NOT EXECUTED if ( rawnc < 0 ) ffc07070: 7c 00 48 51 subf. r0,r0,r9 <== NOT EXECUTED ffc07074: 41 80 01 30 blt- ffc071a4 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; ffc07078: 81 5e 00 20 lwz r10,32(r30) <== NOT EXECUTED ffc0707c: 81 3e 00 24 lwz r9,36(r30) <== NOT EXECUTED ffc07080: 81 7f 00 08 lwz r11,8(r31) <== NOT EXECUTED ffc07084: 7d 29 50 50 subf r9,r9,r10 <== NOT EXECUTED ffc07088: 7c 09 02 14 add r0,r9,r0 <== NOT EXECUTED ffc0708c: 90 0b 00 00 stw r0,0(r11) <== NOT EXECUTED ffc07090: 4b ff fe 20 b ffc06eb0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { ffc07094: 2f 80 00 01 cmpwi cr7,r0,1 ffc07098: 40 9e fe 70 bne+ cr7,ffc06f08 <== NEVER TAKEN sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; ffc0709c: 80 7f 00 08 lwz r3,8(r31) ffc070a0: 38 9e 00 30 addi r4,r30,48 ffc070a4: 38 a0 00 24 li r5,36 ffc070a8: 48 00 cd b5 bl ffc13e5c break; ffc070ac: 4b ff fe 04 b ffc06eb0 sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { ffc070b0: 6c 09 40 04 xoris r9,r0,16388 <== NOT EXECUTED ffc070b4: 2f 89 74 1a cmpwi cr7,r9,29722 <== NOT EXECUTED ffc070b8: 41 9e 00 78 beq- cr7,ffc07130 <== NOT EXECUTED ffc070bc: 6c 09 80 04 xoris r9,r0,32772 <== NOT EXECUTED ffc070c0: 2f 89 74 1b cmpwi cr7,r9,29723 <== NOT EXECUTED ffc070c4: 40 9e fe 44 bne+ cr7,ffc06f08 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { ffc070c8: 81 3e 00 cc lwz r9,204(r30) <== NOT EXECUTED ffc070cc: 3f 80 00 00 lis r28,0 <== NOT EXECUTED ffc070d0: 3b 9c 28 88 addi r28,r28,10376 <== NOT EXECUTED ffc070d4: 55 29 28 34 rlwinm r9,r9,5,0,26 <== NOT EXECUTED ffc070d8: 7d 3c 4a 14 add r9,r28,r9 <== NOT EXECUTED ffc070dc: 80 09 00 04 lwz r0,4(r9) <== NOT EXECUTED ffc070e0: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc070e4: 41 9e 00 14 beq- cr7,ffc070f8 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); ffc070e8: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc070ec: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc070f0: 4e 80 04 21 bctrl <== NOT EXECUTED ffc070f4: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); ffc070f8: 81 3f 00 08 lwz r9,8(r31) <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ ffc070fc: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc07100: 90 1e 00 d0 stw r0,208(r30) <== NOT EXECUTED * 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); ffc07104: 81 29 00 00 lwz r9,0(r9) <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { ffc07108: 55 20 28 34 rlwinm r0,r9,5,0,26 <== NOT EXECUTED * 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); ffc0710c: 91 3e 00 cc stw r9,204(r30) <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { ffc07110: 7c 1c 00 2e lwzx r0,r28,r0 <== NOT EXECUTED ffc07114: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc07118: 41 be fd 98 beq- cr7,ffc06eb0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); ffc0711c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc07120: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07124: 4e 80 04 21 bctrl <== NOT EXECUTED ffc07128: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED ffc0712c: 4b ff fd 84 b ffc06eb0 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; ffc07130: 81 3f 00 08 lwz r9,8(r31) <== NOT EXECUTED ffc07134: 80 1e 00 cc lwz r0,204(r30) <== NOT EXECUTED ffc07138: 90 09 00 00 stw r0,0(r9) <== NOT EXECUTED break; ffc0713c: 4b ff fd 74 b ffc06eb0 <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; ffc07140: 81 3c 00 00 lwz r9,0(r28) <== NOT EXECUTED ffc07144: 81 5c 00 04 lwz r10,4(r28) <== NOT EXECUTED ffc07148: 91 3e 00 d4 stw r9,212(r30) <== NOT EXECUTED ffc0714c: 91 5e 00 d8 stw r10,216(r30) <== NOT EXECUTED break; ffc07150: 4b ff fd 60 b ffc06eb0 <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && ffc07154: 81 3e 00 38 lwz r9,56(r30) <== NOT EXECUTED ffc07158: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc0715c: 41 9c 00 c4 blt- cr7,ffc07220 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); ffc07160: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED ffc07164: 54 00 06 2c rlwinm r0,r0,0,24,22 <== NOT EXECUTED ffc07168: 90 1e 00 b8 stw r0,184(r30) <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && ffc0716c: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED ffc07170: 70 0b 00 04 andi. r11,r0,4 <== NOT EXECUTED ffc07174: 41 82 00 20 beq- ffc07194 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { ffc07178: 80 1e 00 b0 lwz r0,176(r30) <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && ffc0717c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc07180: 41 9e 00 14 beq- cr7,ffc07194 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); ffc07184: 80 7e 00 10 lwz r3,16(r30) <== NOT EXECUTED ffc07188: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0718c: 4e 80 04 21 bctrl <== NOT EXECUTED ffc07190: 81 3e 00 38 lwz r9,56(r30) <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); ffc07194: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED ffc07198: 54 00 07 b8 rlwinm r0,r0,0,30,28 <== NOT EXECUTED ffc0719c: 90 1e 00 b8 stw r0,184(r30) <== NOT EXECUTED ffc071a0: 4b ff fe 58 b ffc06ff8 <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; ffc071a4: 81 3e 00 64 lwz r9,100(r30) <== NOT EXECUTED ffc071a8: 7c 00 4a 14 add r0,r0,r9 <== NOT EXECUTED ffc071ac: 4b ff fe cc b ffc07078 <== NOT EXECUTED 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)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); ffc071b0: 81 3e 00 84 lwz r9,132(r30) <== 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)(tty->minor, ffc071b4: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc071b8: 80 9e 00 7c lwz r4,124(r30) <== NOT EXECUTED ffc071bc: 80 1e 00 a4 lwz r0,164(r30) <== NOT EXECUTED ffc071c0: 7c 84 4a 14 add r4,r4,r9 <== NOT EXECUTED ffc071c4: 80 7e 00 10 lwz r3,16(r30) <== NOT EXECUTED ffc071c8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc071cc: 4e 80 04 21 bctrl <== NOT EXECUTED ffc071d0: 7f 60 01 24 mtmsr r27 <== NOT EXECUTED ffc071d4: 4b ff fd e4 b ffc06fb8 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; ffc071d8: 8b 5e 00 46 lbz r26,70(r30) <== NOT EXECUTED ffc071dc: 48 00 0d 05 bl ffc07ee0 <== NOT EXECUTED if (tty->termios.c_cc[VTIME]) { ffc071e0: 89 3e 00 46 lbz r9,70(r30) <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * ffc071e4: 3c 00 cc cc lis r0,-13108 <== NOT EXECUTED ffc071e8: 7c 63 d1 d6 mullw r3,r3,r26 <== NOT EXECUTED ffc071ec: 60 00 cc cd ori r0,r0,52429 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { ffc071f0: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * ffc071f4: 7c 03 00 16 mulhwu r0,r3,r0 <== NOT EXECUTED ffc071f8: 54 00 e8 fe rlwinm r0,r0,29,3,31 <== NOT EXECUTED ffc071fc: 90 1e 00 54 stw r0,84(r30) <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { ffc07200: 41 9e 00 30 beq- cr7,ffc07230 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) ffc07204: 89 3e 00 47 lbz r9,71(r30) <== NOT EXECUTED } 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; ffc07208: 93 7e 00 6c stw r27,108(r30) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) ffc0720c: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED 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; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; ffc07210: 90 1e 00 70 stw r0,112(r30) <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) ffc07214: 41 9e 00 38 beq- cr7,ffc0724c <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; ffc07218: 93 7e 00 74 stw r27,116(r30) <== NOT EXECUTED ffc0721c: 4b ff fe 2c b ffc07048 <== 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) { tty->flow_ctrl |= FL_MDRTS; ffc07220: 80 1e 00 b8 lwz r0,184(r30) <== NOT EXECUTED ffc07224: 60 00 01 00 ori r0,r0,256 <== NOT EXECUTED ffc07228: 90 1e 00 b8 stw r0,184(r30) <== NOT EXECUTED ffc0722c: 4b ff fd d4 b ffc07000 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { ffc07230: 88 1e 00 47 lbz r0,71(r30) <== NOT EXECUTED ffc07234: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc07238: 41 9e 00 1c beq- cr7,ffc07254 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; ffc0723c: 91 3e 00 74 stw r9,116(r30) <== NOT EXECUTED else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; ffc07240: 91 3e 00 6c stw r9,108(r30) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; ffc07244: 91 3e 00 70 stw r9,112(r30) <== NOT EXECUTED ffc07248: 4b ff fe 00 b ffc07048 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; ffc0724c: 90 1e 00 74 stw r0,116(r30) <== NOT EXECUTED ffc07250: 4b ff fd f8 b ffc07048 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; ffc07254: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc07258: 90 1e 00 6c stw r0,108(r30) <== NOT EXECUTED ffc0725c: 4b ff fd ec b ffc07048 <== NOT EXECUTED =============================================================================== ffc0765c : int32_t baud ) { int termios_baud; switch (baud) { ffc0765c: 2f 83 04 b0 cmpwi cr7,r3,1200 case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; ffc07660: 38 00 00 09 li r0,9 int32_t baud ) { int termios_baud; switch (baud) { ffc07664: 41 9e 00 5c beq- cr7,ffc076c0 ffc07668: 40 9d 00 60 ble- cr7,ffc076c8 ffc0766c: 2f 83 4b 00 cmpwi cr7,r3,19200 case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; ffc07670: 38 00 00 0e li r0,14 int32_t baud ) { int termios_baud; switch (baud) { ffc07674: 41 9e 00 4c beq- cr7,ffc076c0 ffc07678: 40 9d 00 90 ble- cr7,ffc07708 ffc0767c: 3c 00 00 01 lis r0,1 ffc07680: 60 00 c2 00 ori r0,r0,49664 ffc07684: 7f 83 00 00 cmpw cr7,r3,r0 case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; ffc07688: 38 00 10 02 li r0,4098 int32_t baud ) { int termios_baud; switch (baud) { ffc0768c: 41 9e 00 34 beq- cr7,ffc076c0 ffc07690: 40 9d 00 f8 ble- cr7,ffc07788 ffc07694: 3c 00 00 03 lis r0,3 ffc07698: 60 00 84 00 ori r0,r0,33792 ffc0769c: 7f 83 00 00 cmpw cr7,r3,r0 case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; ffc076a0: 38 00 10 03 li r0,4099 int32_t baud ) { int termios_baud; switch (baud) { ffc076a4: 41 9e 00 1c beq- cr7,ffc076c0 ffc076a8: 3c 00 00 07 lis r0,7 ffc076ac: 60 00 08 00 ori r0,r0,2048 ffc076b0: 7f 83 00 00 cmpw cr7,r3,r0 case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; ffc076b4: 38 00 10 04 li r0,4100 int32_t baud ) { int termios_baud; switch (baud) { ffc076b8: 41 9e 00 08 beq- cr7,ffc076c0 <== ALWAYS TAKEN case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; ffc076bc: 38 00 ff ff li r0,-1 default: termios_baud = -1; break; } return termios_baud; } ffc076c0: 7c 03 03 78 mr r3,r0 ffc076c4: 4e 80 00 20 blr int32_t baud ) { int termios_baud; switch (baud) { ffc076c8: 2f 83 00 86 cmpwi cr7,r3,134 case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; ffc076cc: 38 00 00 04 li r0,4 int32_t baud ) { int termios_baud; switch (baud) { ffc076d0: 41 be ff f0 beq- cr7,ffc076c0 ffc076d4: 40 9d 00 64 ble- cr7,ffc07738 ffc076d8: 2f 83 00 c8 cmpwi cr7,r3,200 case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; ffc076dc: 38 00 00 06 li r0,6 int32_t baud ) { int termios_baud; switch (baud) { ffc076e0: 41 be ff e0 beq- cr7,ffc076c0 ffc076e4: 40 9d 00 84 ble- cr7,ffc07768 ffc076e8: 2f 83 01 2c cmpwi cr7,r3,300 case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; ffc076ec: 38 00 00 07 li r0,7 int32_t baud ) { int termios_baud; switch (baud) { ffc076f0: 41 be ff d0 beq- cr7,ffc076c0 ffc076f4: 2f 83 02 58 cmpwi cr7,r3,600 case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; ffc076f8: 38 00 00 08 li r0,8 int32_t baud ) { int termios_baud; switch (baud) { ffc076fc: 41 be ff c4 beq- cr7,ffc076c0 <== ALWAYS TAKEN case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; ffc07700: 38 00 ff ff li r0,-1 <== NOT EXECUTED ffc07704: 4b ff ff bc b ffc076c0 <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { ffc07708: 2f 83 09 60 cmpwi cr7,r3,2400 case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; ffc0770c: 38 00 00 0b li r0,11 int32_t baud ) { int termios_baud; switch (baud) { ffc07710: 41 be ff b0 beq- cr7,ffc076c0 ffc07714: 40 9d 00 a0 ble- cr7,ffc077b4 ffc07718: 2f 83 12 c0 cmpwi cr7,r3,4800 case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; ffc0771c: 38 00 00 0c li r0,12 int32_t baud ) { int termios_baud; switch (baud) { ffc07720: 41 be ff a0 beq- cr7,ffc076c0 ffc07724: 2f 83 25 80 cmpwi cr7,r3,9600 case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; ffc07728: 38 00 00 0d li r0,13 int32_t baud ) { int termios_baud; switch (baud) { ffc0772c: 41 be ff 94 beq- cr7,ffc076c0 case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; ffc07730: 38 00 ff ff li r0,-1 ffc07734: 4b ff ff 8c b ffc076c0 int32_t baud ) { int termios_baud; switch (baud) { ffc07738: 2f 83 00 32 cmpwi cr7,r3,50 ffc0773c: 38 00 00 01 li r0,1 ffc07740: 41 be ff 80 beq- cr7,ffc076c0 ffc07744: 40 9d 00 34 ble- cr7,ffc07778 ffc07748: 2f 83 00 4b cmpwi cr7,r3,75 ffc0774c: 38 00 00 02 li r0,2 ffc07750: 41 be ff 70 beq- cr7,ffc076c0 ffc07754: 2f 83 00 6e cmpwi cr7,r3,110 case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; ffc07758: 38 00 00 03 li r0,3 int32_t baud ) { int termios_baud; switch (baud) { ffc0775c: 41 be ff 64 beq- cr7,ffc076c0 <== ALWAYS TAKEN case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; ffc07760: 38 00 ff ff li r0,-1 <== NOT EXECUTED ffc07764: 4b ff ff 5c b ffc076c0 <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { ffc07768: 2f 83 00 96 cmpwi cr7,r3,150 case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; ffc0776c: 38 00 00 05 li r0,5 int32_t baud ) { int termios_baud; switch (baud) { ffc07770: 40 9e ff 4c bne+ cr7,ffc076bc <== NEVER TAKEN ffc07774: 4b ff ff 4c b ffc076c0 ffc07778: 2f 83 00 00 cmpwi cr7,r3,0 ffc0777c: 38 00 00 00 li r0,0 ffc07780: 41 be ff 40 beq- cr7,ffc076c0 ffc07784: 4b ff ff 38 b ffc076bc ffc07788: 38 00 00 00 li r0,0 ffc0778c: 60 00 96 00 ori r0,r0,38400 ffc07790: 7f 83 00 00 cmpw cr7,r3,r0 case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; ffc07794: 38 00 00 0f li r0,15 int32_t baud ) { int termios_baud; switch (baud) { ffc07798: 41 be ff 28 beq- cr7,ffc076c0 ffc0779c: 38 00 00 00 li r0,0 ffc077a0: 60 00 e1 00 ori r0,r0,57600 ffc077a4: 7f 83 00 00 cmpw cr7,r3,r0 case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; ffc077a8: 38 00 10 01 li r0,4097 int32_t baud ) { int termios_baud; switch (baud) { ffc077ac: 40 9e ff 10 bne+ cr7,ffc076bc <== NEVER TAKEN ffc077b0: 4b ff ff 10 b ffc076c0 ffc077b4: 2f 83 07 08 cmpwi cr7,r3,1800 case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; ffc077b8: 38 00 00 0a li r0,10 int32_t baud ) { int termios_baud; switch (baud) { ffc077bc: 40 9e ff 00 bne+ cr7,ffc076bc <== NEVER TAKEN ffc077c0: 4b ff ff 00 b ffc076c0 =============================================================================== ffc07458 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc07458: 94 21 ff c8 stwu r1,-56(r1) ffc0745c: 7c 08 02 a6 mflr r0 ffc07460: 93 81 00 28 stw r28,40(r1) struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, ffc07464: 3f 80 00 00 lis r28,0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc07468: 93 c1 00 30 stw r30,48(r1) ffc0746c: 7c 7e 1b 78 mr r30,r3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, ffc07470: 80 7c 27 58 lwz r3,10072(r28) rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc07474: 93 41 00 20 stw r26,32(r1) ffc07478: 7c ba 2b 78 mr r26,r5 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, ffc0747c: 38 a0 00 00 li r5,0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc07480: 93 a1 00 2c stw r29,44(r1) ffc07484: 7c 9d 23 78 mr r29,r4 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, ffc07488: 38 80 00 00 li r4,0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc0748c: 92 e1 00 14 stw r23,20(r1) ffc07490: 7c d7 33 78 mr r23,r6 ffc07494: 93 61 00 24 stw r27,36(r1) ffc07498: 90 01 00 3c stw r0,60(r1) ffc0749c: 92 a1 00 0c stw r21,12(r1) ffc074a0: 92 c1 00 10 stw r22,16(r1) ffc074a4: 93 01 00 18 stw r24,24(r1) ffc074a8: 93 21 00 1c stw r25,28(r1) ffc074ac: 93 e1 00 34 stw r31,52(r1) struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, ffc074b0: 48 00 12 61 bl ffc08710 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) ffc074b4: 7c 7b 1b 79 mr. r27,r3 ffc074b8: 40 82 00 8c bne- ffc07544 <== NEVER TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { ffc074bc: 3e c0 00 00 lis r22,0 ffc074c0: 83 f6 27 60 lwz r31,10080(r22) ffc074c4: 2f 9f 00 00 cmpwi cr7,r31,0 ffc074c8: 40 be 00 14 bne+ cr7,ffc074dc ffc074cc: 48 00 00 f4 b ffc075c0 ffc074d0: 83 ff 00 00 lwz r31,0(r31) ffc074d4: 2f 9f 00 00 cmpwi cr7,r31,0 ffc074d8: 41 9e 00 e8 beq- cr7,ffc075c0 <== ALWAYS TAKEN if ((tty->major == major) && (tty->minor == minor)) ffc074dc: 80 1f 00 0c lwz r0,12(r31) ffc074e0: 7f 80 f0 00 cmpw cr7,r0,r30 ffc074e4: 40 9e ff ec bne+ cr7,ffc074d0 ffc074e8: 80 1f 00 10 lwz r0,16(r31) ffc074ec: 7f 80 e8 00 cmpw cr7,r0,r29 ffc074f0: 40 9e ff e0 bne+ cr7,ffc074d0 <== NEVER TAKEN if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; if (!tty->refcount++) { ffc074f4: 81 3f 00 08 lwz r9,8(r31) */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; ffc074f8: 81 7a 00 00 lwz r11,0(r26) if (!tty->refcount++) { ffc074fc: 2f 89 00 00 cmpwi cr7,r9,0 ffc07500: 39 29 00 01 addi r9,r9,1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; ffc07504: 93 eb 00 38 stw r31,56(r11) if (!tty->refcount++) { ffc07508: 91 3f 00 08 stw r9,8(r31) ffc0750c: 40 9e 00 30 bne- cr7,ffc0753c if (tty->device.firstOpen) ffc07510: 80 1f 00 98 lwz r0,152(r31) ffc07514: 2f 80 00 00 cmpwi cr7,r0,0 ffc07518: 41 9e 00 18 beq- cr7,ffc07530 <== ALWAYS TAKEN (*tty->device.firstOpen)(major, minor, arg); ffc0751c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc07520: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07524: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED ffc07528: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED ffc0752c: 4e 80 04 21 bctrl <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc07530: 80 1f 00 b4 lwz r0,180(r31) ffc07534: 2f 80 00 02 cmpwi cr7,r0,2 ffc07538: 41 9e 00 4c beq- cr7,ffc07584 <== NEVER TAKEN (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); ffc0753c: 80 7c 27 58 lwz r3,10072(r28) ffc07540: 48 00 13 31 bl ffc08870 return RTEMS_SUCCESSFUL; } ffc07544: 80 01 00 3c lwz r0,60(r1) ffc07548: 7f 63 db 78 mr r3,r27 ffc0754c: 82 a1 00 0c lwz r21,12(r1) ffc07550: 7c 08 03 a6 mtlr r0 ffc07554: 82 c1 00 10 lwz r22,16(r1) ffc07558: 82 e1 00 14 lwz r23,20(r1) ffc0755c: 83 01 00 18 lwz r24,24(r1) ffc07560: 83 21 00 1c lwz r25,28(r1) ffc07564: 83 41 00 20 lwz r26,32(r1) ffc07568: 83 61 00 24 lwz r27,36(r1) ffc0756c: 83 81 00 28 lwz r28,40(r1) ffc07570: 83 a1 00 2c lwz r29,44(r1) ffc07574: 83 c1 00 30 lwz r30,48(r1) ffc07578: 83 e1 00 34 lwz r31,52(r1) ffc0757c: 38 21 00 38 addi r1,r1,56 ffc07580: 4e 80 00 20 blr (*tty->device.firstOpen)(major, minor, arg); /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start(tty->rxTaskId, ffc07584: 80 7f 00 c4 lwz r3,196(r31) <== NOT EXECUTED ffc07588: 3c 80 ff c0 lis r4,-64 <== NOT EXECUTED ffc0758c: 38 84 79 b0 addi r4,r4,31152 <== NOT EXECUTED ffc07590: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED ffc07594: 48 00 17 75 bl ffc08d08 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) ffc07598: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc0759c: 40 9e 02 ec bne- cr7,ffc07888 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, ffc075a0: 80 7f 00 c8 lwz r3,200(r31) <== NOT EXECUTED ffc075a4: 3c 80 ff c0 lis r4,-64 <== NOT EXECUTED ffc075a8: 38 84 79 04 addi r4,r4,30980 <== NOT EXECUTED ffc075ac: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED ffc075b0: 48 00 17 59 bl ffc08d08 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) ffc075b4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc075b8: 41 9e ff 84 beq+ cr7,ffc0753c <== NOT EXECUTED ffc075bc: 48 00 02 cc b ffc07888 <== NOT EXECUTED static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); ffc075c0: 38 60 00 01 li r3,1 ffc075c4: 38 80 00 e8 li r4,232 ffc075c8: 48 00 6b 11 bl ffc0e0d8 if (tty == NULL) { ffc075cc: 2f 83 00 00 cmpwi cr7,r3,0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); ffc075d0: 7c 79 1b 78 mr r25,r3 ffc075d4: 7c 7f 1b 78 mr r31,r3 if (tty == NULL) { ffc075d8: 41 9e 02 58 beq- cr7,ffc07830 <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; ffc075dc: 3e a0 00 00 lis r21,0 ffc075e0: 3b 15 21 68 addi r24,r21,8552 ffc075e4: 80 18 00 04 lwz r0,4(r24) ffc075e8: 90 03 00 64 stw r0,100(r3) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); ffc075ec: 80 63 00 64 lwz r3,100(r3) ffc075f0: 4b ff d3 85 bl ffc04974 if (tty->rawInBuf.theBuf == NULL) { ffc075f4: 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); ffc075f8: 90 79 00 58 stw r3,88(r25) if (tty->rawInBuf.theBuf == NULL) { ffc075fc: 41 9e 02 2c beq- cr7,ffc07828 <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; ffc07600: 80 18 00 08 lwz r0,8(r24) ffc07604: 90 19 00 88 stw r0,136(r25) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); ffc07608: 80 79 00 88 lwz r3,136(r25) ffc0760c: 4b ff d3 69 bl ffc04974 if (tty->rawOutBuf.theBuf == NULL) { ffc07610: 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); ffc07614: 90 79 00 7c stw r3,124(r25) if (tty->rawOutBuf.theBuf == NULL) { ffc07618: 41 9e 02 28 beq- cr7,ffc07840 <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); ffc0761c: 80 75 21 68 lwz r3,8552(r21) ffc07620: 4b ff d3 55 bl ffc04974 if (tty->cbuf == NULL) { ffc07624: 2f 83 00 00 cmpwi cr7,r3,0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); ffc07628: 90 79 00 1c stw r3,28(r25) if (tty->cbuf == NULL) { ffc0762c: 41 9e 02 60 beq- cr7,ffc0788c <== NEVER TAKEN tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; ffc07630: 81 36 27 60 lwz r9,10080(r22) return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; ffc07634: 38 00 00 00 li r0,0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; ffc07638: 90 19 00 04 stw r0,4(r25) if (rtems_termios_ttyHead != NULL) ffc0763c: 2f 89 00 00 cmpwi cr7,r9,0 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; ffc07640: 90 19 00 d4 stw r0,212(r25) tty->tty_snd.sw_arg = NULL; ffc07644: 90 19 00 d8 stw r0,216(r25) tty->tty_rcv.sw_pfn = NULL; ffc07648: 90 19 00 dc stw r0,220(r25) tty->tty_rcv.sw_arg = NULL; ffc0764c: 90 19 00 e0 stw r0,224(r25) tty->tty_rcvwakeup = 0; ffc07650: 90 19 00 e4 stw r0,228(r25) /* * link tty */ tty->forw = rtems_termios_ttyHead; ffc07654: 91 39 00 00 stw r9,0(r25) tty->back = NULL; if (rtems_termios_ttyHead != NULL) ffc07658: 41 9e 00 08 beq- cr7,ffc07660 rtems_termios_ttyHead->back = tty; ffc0765c: 93 29 00 04 stw r25,4(r9) rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) ffc07660: 3d 20 00 00 lis r9,0 */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; ffc07664: 93 36 27 60 stw r25,10080(r22) if (rtems_termios_ttyTail == NULL) ffc07668: 80 09 27 5c lwz r0,10076(r9) ffc0766c: 2f 80 00 00 cmpwi cr7,r0,0 ffc07670: 41 9e 02 8c beq- cr7,ffc078fc tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( ffc07674: 88 78 00 0c lbz r3,12(r24) ffc07678: 38 80 00 01 li r4,1 ffc0767c: 38 a0 00 54 li r5,84 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; ffc07680: 93 b9 00 10 stw r29,16(r25) tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( ffc07684: 64 63 54 52 oris r3,r3,21586 ffc07688: 60 63 69 00 ori r3,r3,26880 rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; tty->major = major; ffc0768c: 93 d9 00 0c stw r30,12(r25) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( ffc07690: 38 c0 00 00 li r6,0 ffc07694: 38 f9 00 14 addi r7,r25,20 ffc07698: 48 00 0d 7d bl ffc08414 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) ffc0769c: 2f 83 00 00 cmpwi cr7,r3,0 ffc076a0: 40 9e 01 e8 bne- cr7,ffc07888 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( ffc076a4: 88 78 00 0c lbz r3,12(r24) ffc076a8: 38 80 00 01 li r4,1 ffc076ac: 38 a0 00 54 li r5,84 ffc076b0: 64 63 54 52 oris r3,r3,21586 ffc076b4: 60 63 6f 00 ori r3,r3,28416 ffc076b8: 38 c0 00 00 li r6,0 ffc076bc: 38 f9 00 18 addi r7,r25,24 ffc076c0: 48 00 0d 55 bl ffc08414 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) ffc076c4: 2f 83 00 00 cmpwi cr7,r3,0 ffc076c8: 40 9e 01 c0 bne- cr7,ffc07888 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( ffc076cc: 88 78 00 0c lbz r3,12(r24) ffc076d0: 38 80 00 00 li r4,0 ffc076d4: 38 a0 00 20 li r5,32 ffc076d8: 64 63 54 52 oris r3,r3,21586 ffc076dc: 60 63 78 00 ori r3,r3,30720 ffc076e0: 38 c0 00 00 li r6,0 ffc076e4: 38 f9 00 8c addi r7,r25,140 ffc076e8: 48 00 0d 2d bl ffc08414 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) ffc076ec: 7c 60 1b 79 mr. r0,r3 ffc076f0: 40 82 01 98 bne- ffc07888 <== NEVER TAKEN tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; ffc076f4: 81 37 00 1c lwz r9,28(r23) ffc076f8: 80 97 00 00 lwz r4,0(r23) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc076fc: 2f 89 00 02 cmpwi cr7,r9,2 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; ffc07700: 80 b7 00 04 lwz r5,4(r23) ffc07704: 80 d7 00 08 lwz r6,8(r23) ffc07708: 80 f7 00 0c lwz r7,12(r23) ffc0770c: 81 17 00 10 lwz r8,16(r23) ffc07710: 81 57 00 14 lwz r10,20(r23) ffc07714: 81 77 00 18 lwz r11,24(r23) 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; ffc07718: 90 19 00 94 stw r0,148(r25) /* * Set callbacks */ tty->device = *callbacks; ffc0771c: 90 99 00 98 stw r4,152(r25) ffc07720: 90 b9 00 9c stw r5,156(r25) ffc07724: 90 d9 00 a0 stw r6,160(r25) ffc07728: 90 f9 00 a4 stw r7,164(r25) ffc0772c: 91 19 00 a8 stw r8,168(r25) ffc07730: 91 59 00 ac stw r10,172(r25) ffc07734: 91 79 00 b0 stw r11,176(r25) ffc07738: 91 39 00 b4 stw r9,180(r25) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc0773c: 41 9e 01 64 beq- cr7,ffc078a0 <== NEVER TAKEN &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || ffc07740: 80 19 00 a0 lwz r0,160(r25) ffc07744: 2f 80 00 00 cmpwi cr7,r0,0 ffc07748: 41 9e 01 18 beq- cr7,ffc07860 <== NEVER TAKEN (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ ffc0774c: 80 19 00 b4 lwz r0,180(r25) ffc07750: 2f 80 00 02 cmpwi cr7,r0,2 ffc07754: 41 9e 01 0c beq- cr7,ffc07860 <== NEVER TAKEN tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; ffc07758: 38 00 00 00 li r0,0 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') ffc0775c: 89 38 00 0c lbz r9,12(r24) tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; ffc07760: 90 19 00 b8 stw r0,184(r25) * 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; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; ffc07764: 60 00 82 3b ori r0,r0,33339 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') ffc07768: 2f 89 00 7a cmpwi cr7,r9,122 /* 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; ffc0776c: 81 79 00 64 lwz r11,100(r25) tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') ffc07770: 39 29 00 01 addi r9,r9,1 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; ffc07774: 81 59 00 64 lwz r10,100(r25) * 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; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; ffc07778: 90 19 00 3c stw r0,60(r25) /* 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; ffc0777c: 55 6b f8 7e rlwinm r11,r11,31,1,31 tty->highwater = tty->rawInBuf.Size * 3/4; ffc07780: 1d 4a 00 03 mulli r10,r10,3 /* 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; ffc07784: 91 79 00 bc stw r11,188(r25) tty->highwater = tty->rawInBuf.Size * 3/4; ffc07788: 55 4a f0 be rlwinm r10,r10,30,2,31 ffc0778c: 91 59 00 c0 stw r10,192(r25) } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; ffc07790: 39 40 25 02 li r10,9474 tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; ffc07794: 38 00 00 00 li r0,0 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; ffc07798: 91 59 00 30 stw r10,48(r25) tty->termios.c_oflag = OPOST | ONLCR | XTABS; ffc0779c: 39 40 18 05 li r10,6149 ffc077a0: 91 59 00 34 stw r10,52(r25) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; ffc077a4: 39 40 08 bd li r10,2237 ffc077a8: 91 59 00 38 stw r10,56(r25) tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; ffc077ac: 39 40 00 03 li r10,3 ffc077b0: 99 59 00 41 stb r10,65(r25) tty->termios.c_cc[VQUIT] = '\034'; ffc077b4: 39 40 00 1c li r10,28 ffc077b8: 99 59 00 42 stb r10,66(r25) tty->termios.c_cc[VERASE] = '\177'; ffc077bc: 39 40 00 7f li r10,127 ffc077c0: 99 59 00 43 stb r10,67(r25) tty->termios.c_cc[VKILL] = '\025'; ffc077c4: 39 40 00 15 li r10,21 ffc077c8: 99 59 00 44 stb r10,68(r25) tty->termios.c_cc[VEOF] = '\004'; ffc077cc: 39 40 00 04 li r10,4 ffc077d0: 99 59 00 45 stb r10,69(r25) tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; ffc077d4: 39 40 00 11 li r10,17 ffc077d8: 99 59 00 49 stb r10,73(r25) tty->termios.c_cc[VSTOP] = '\023'; ffc077dc: 39 40 00 13 li r10,19 ffc077e0: 99 59 00 4a stb r10,74(r25) tty->termios.c_cc[VSUSP] = '\032'; ffc077e4: 39 40 00 1a li r10,26 ffc077e8: 99 59 00 4b stb r10,75(r25) tty->termios.c_cc[VREPRINT] = '\022'; ffc077ec: 39 40 00 12 li r10,18 ffc077f0: 99 59 00 4d stb r10,77(r25) tty->termios.c_cc[VDISCARD] = '\017'; ffc077f4: 39 40 00 0f li r10,15 ffc077f8: 99 59 00 4e stb r10,78(r25) tty->termios.c_cc[VWERASE] = '\027'; ffc077fc: 39 40 00 17 li r10,23 ffc07800: 99 59 00 4f stb r10,79(r25) tty->termios.c_cc[VLNEXT] = '\026'; ffc07804: 39 40 00 16 li r10,22 tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; ffc07808: 98 19 00 51 stb r0,81(r25) tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; ffc0780c: 99 59 00 50 stb r10,80(r25) tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') ffc07810: 99 38 00 0c stb r9,12(r24) tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; ffc07814: 98 19 00 4c stb r0,76(r25) tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') ffc07818: 40 9e fc dc bne+ cr7,ffc074f4 <== ALWAYS TAKEN c = 'a'; ffc0781c: 38 00 00 61 li r0,97 <== NOT EXECUTED ffc07820: 98 18 00 0c stb r0,12(r24) <== NOT EXECUTED ffc07824: 4b ff fc d0 b ffc074f4 <== NOT EXECUTED * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); ffc07828: 7f 23 cb 78 mr r3,r25 <== NOT EXECUTED ffc0782c: 4b ff cd c9 bl ffc045f4 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); ffc07830: 80 7c 27 58 lwz r3,10072(r28) <== NOT EXECUTED ffc07834: 3b 60 00 1a li r27,26 <== NOT EXECUTED ffc07838: 48 00 10 39 bl ffc08870 <== NOT EXECUTED return RTEMS_NO_MEMORY; ffc0783c: 4b ff fd 08 b ffc07544 <== NOT EXECUTED * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); ffc07840: 80 79 00 58 lwz r3,88(r25) <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); ffc07844: 3b 60 00 1a li r27,26 <== NOT EXECUTED * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); free((void *)(tty->rawInBuf.theBuf)); ffc07848: 4b ff cd ad bl ffc045f4 <== NOT EXECUTED free(tty); ffc0784c: 7f 23 cb 78 mr r3,r25 <== NOT EXECUTED ffc07850: 4b ff cd a5 bl ffc045f4 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); ffc07854: 80 7c 27 58 lwz r3,10072(r28) <== NOT EXECUTED ffc07858: 48 00 10 19 bl ffc08870 <== NOT EXECUTED return RTEMS_NO_MEMORY; ffc0785c: 4b ff fc e8 b ffc07544 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( ffc07860: 88 78 00 0c lbz r3,12(r24) <== NOT EXECUTED ffc07864: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc07868: 38 a0 00 24 li r5,36 <== NOT EXECUTED ffc0786c: 64 63 54 52 oris r3,r3,21586 <== NOT EXECUTED ffc07870: 60 63 72 00 ori r3,r3,29184 <== NOT EXECUTED ffc07874: 38 c0 00 00 li r6,0 <== NOT EXECUTED ffc07878: 38 f9 00 68 addi r7,r25,104 <== NOT EXECUTED ffc0787c: 48 00 0b 99 bl ffc08414 <== NOT EXECUTED rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) ffc07880: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc07884: 41 9e fe d4 beq+ cr7,ffc07758 <== NOT EXECUTED sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); ffc07888: 48 00 17 b1 bl ffc09038 <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); ffc0788c: 80 79 00 7c lwz r3,124(r25) <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); ffc07890: 3b 60 00 1a li r27,26 <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); ffc07894: 4b ff cd 61 bl ffc045f4 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); ffc07898: 80 79 00 58 lwz r3,88(r25) <== NOT EXECUTED ffc0789c: 4b ff ff ac b ffc07848 <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( ffc078a0: 88 78 00 0c lbz r3,12(r24) <== NOT EXECUTED ffc078a4: 38 80 00 0a li r4,10 <== NOT EXECUTED ffc078a8: 38 a0 04 00 li r5,1024 <== NOT EXECUTED ffc078ac: 64 63 54 78 oris r3,r3,21624 <== NOT EXECUTED ffc078b0: 60 63 54 00 ori r3,r3,21504 <== NOT EXECUTED ffc078b4: 38 c0 05 00 li r6,1280 <== NOT EXECUTED ffc078b8: 38 e0 00 00 li r7,0 <== NOT EXECUTED ffc078bc: 39 19 00 c8 addi r8,r25,200 <== NOT EXECUTED ffc078c0: 48 00 10 8d bl ffc0894c <== NOT EXECUTED TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) ffc078c4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc078c8: 40 be ff c0 bne- cr7,ffc07888 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( ffc078cc: 88 78 00 0c lbz r3,12(r24) <== NOT EXECUTED ffc078d0: 38 80 00 09 li r4,9 <== NOT EXECUTED ffc078d4: 38 a0 04 00 li r5,1024 <== NOT EXECUTED ffc078d8: 64 63 52 78 oris r3,r3,21112 <== NOT EXECUTED ffc078dc: 60 63 54 00 ori r3,r3,21504 <== NOT EXECUTED ffc078e0: 38 c0 05 00 li r6,1280 <== NOT EXECUTED ffc078e4: 38 e0 00 00 li r7,0 <== NOT EXECUTED ffc078e8: 39 19 00 c4 addi r8,r25,196 <== NOT EXECUTED ffc078ec: 48 00 10 61 bl ffc0894c <== NOT EXECUTED TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) ffc078f0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc078f4: 41 9e fe 4c beq+ cr7,ffc07740 <== NOT EXECUTED ffc078f8: 4b ff ff 90 b ffc07888 <== NOT EXECUTED tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; ffc078fc: 93 29 27 5c stw r25,10076(r9) ffc07900: 4b ff fd 74 b ffc07674 =============================================================================== ffc05f38 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { ffc05f38: 94 21 ff d0 stwu r1,-48(r1) ffc05f3c: 7c 08 02 a6 mflr r0 ffc05f40: 90 01 00 34 stw r0,52(r1) ffc05f44: 7c 60 1b 78 mr r0,r3 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { ffc05f48: 81 25 00 b4 lwz r9,180(r5) * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { ffc05f4c: 93 41 00 18 stw r26,24(r1) const unsigned char *buf = _buf; ffc05f50: 7c 7a 1b 78 mr r26,r3 unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { ffc05f54: 2f 89 00 00 cmpwi cr7,r9,0 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { ffc05f58: 93 e1 00 2c stw r31,44(r1) ffc05f5c: 7c bf 2b 78 mr r31,r5 ffc05f60: 93 21 00 14 stw r25,20(r1) ffc05f64: 93 61 00 1c stw r27,28(r1) ffc05f68: 93 81 00 20 stw r28,32(r1) ffc05f6c: 93 a1 00 24 stw r29,36(r1) ffc05f70: 93 c1 00 28 stw r30,40(r1) ffc05f74: 90 81 00 08 stw r4,8(r1) const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { ffc05f78: 41 9e 01 04 beq- cr7,ffc0607c <== ALWAYS TAKEN (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { ffc05f7c: 80 01 00 08 lwz r0,8(r1) <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; ffc05f80: 83 65 00 80 lwz r27,128(r5) <== NOT EXECUTED while (len) { ffc05f84: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc05f88: 41 9e 01 0c beq- cr7,ffc06094 <== NOT EXECUTED * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; ffc05f8c: 3b 80 00 02 li r28,2 <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; ffc05f90: 3b 20 00 01 li r25,1 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; ffc05f94: 80 1f 00 88 lwz r0,136(r31) <== NOT EXECUTED ffc05f98: 3b 7b 00 01 addi r27,r27,1 <== NOT EXECUTED ffc05f9c: 7d 3b 03 96 divwu r9,r27,r0 <== NOT EXECUTED ffc05fa0: 7c 09 01 d6 mullw r0,r9,r0 <== NOT EXECUTED ffc05fa4: 7f 60 d8 50 subf r27,r0,r27 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc05fa8: 7f c0 00 a6 mfmsr r30 <== NOT EXECUTED ffc05fac: 7c 10 42 a6 mfsprg r0,0 <== NOT EXECUTED ffc05fb0: 7f c0 00 78 andc r0,r30,r0 <== NOT EXECUTED ffc05fb4: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { ffc05fb8: 83 bf 00 84 lwz r29,132(r31) <== NOT EXECUTED ffc05fbc: 7f 9d d8 00 cmpw cr7,r29,r27 <== NOT EXECUTED ffc05fc0: 40 9e 00 40 bne- cr7,ffc06000 <== NOT EXECUTED tty->rawOutBufState = rob_wait; ffc05fc4: 93 9f 00 94 stw r28,148(r31) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc05fc8: 7f c0 01 24 mtmsr r30 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, ffc05fcc: 80 7f 00 8c lwz r3,140(r31) <== NOT EXECUTED ffc05fd0: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc05fd4: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc05fd8: 48 00 27 39 bl ffc08710 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) ffc05fdc: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc05fe0: 40 9e 00 e0 bne- cr7,ffc060c0 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc05fe4: 7f c0 00 a6 mfmsr r30 <== NOT EXECUTED ffc05fe8: 7c 10 42 a6 mfsprg r0,0 <== NOT EXECUTED ffc05fec: 7f c0 00 78 andc r0,r30,r0 <== NOT EXECUTED ffc05ff0: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED * 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) { ffc05ff4: 80 1f 00 84 lwz r0,132(r31) <== NOT EXECUTED ffc05ff8: 7f 80 e8 00 cmpw cr7,r0,r29 <== NOT EXECUTED ffc05ffc: 41 9e ff c8 beq+ cr7,ffc05fc4 <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; ffc06000: 80 1f 00 80 lwz r0,128(r31) <== NOT EXECUTED ffc06004: 89 7a 00 00 lbz r11,0(r26) <== NOT EXECUTED ffc06008: 81 3f 00 7c lwz r9,124(r31) <== NOT EXECUTED ffc0600c: 7d 69 01 ae stbx r11,r9,r0 <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { ffc06010: 80 1f 00 94 lwz r0,148(r31) <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; ffc06014: 93 7f 00 80 stw r27,128(r31) <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { ffc06018: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0601c: 40 9e 00 20 bne- cr7,ffc0603c <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { ffc06020: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc06024: 70 09 00 10 andi. r9,r0,16 <== NOT EXECUTED ffc06028: 41 82 00 30 beq- ffc06058 <== NOT EXECUTED (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; ffc0602c: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc06030: 60 00 00 20 ori r0,r0,32 <== NOT EXECUTED ffc06034: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; ffc06038: 93 3f 00 94 stw r25,148(r31) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0603c: 7f c0 01 24 mtmsr r30 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { ffc06040: 80 01 00 08 lwz r0,8(r1) <== NOT EXECUTED ffc06044: 35 20 ff ff addic. r9,r0,-1 <== NOT EXECUTED ffc06048: 91 21 00 08 stw r9,8(r1) <== NOT EXECUTED ffc0604c: 41 82 00 48 beq- ffc06094 <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; ffc06050: 3b 5a 00 01 addi r26,r26,1 <== NOT EXECUTED ffc06054: 4b ff ff 40 b ffc05f94 <== NOT EXECUTED 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, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); ffc06058: 81 3f 00 84 lwz r9,132(r31) <== NOT EXECUTED 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, ffc0605c: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc06060: 80 9f 00 7c lwz r4,124(r31) <== NOT EXECUTED ffc06064: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED ffc06068: 7c 84 4a 14 add r4,r4,r9 <== NOT EXECUTED ffc0606c: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc06070: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06074: 4e 80 04 21 bctrl <== NOT EXECUTED ffc06078: 4b ff ff c0 b ffc06038 <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); ffc0607c: 7c 04 03 78 mr r4,r0 ffc06080: 80 1f 00 a4 lwz r0,164(r31) ffc06084: 80 65 00 10 lwz r3,16(r5) ffc06088: 7c 09 03 a6 mtctr r0 ffc0608c: 80 a1 00 08 lwz r5,8(r1) ffc06090: 4e 80 04 21 bctrl tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } ffc06094: 80 01 00 34 lwz r0,52(r1) ffc06098: 83 21 00 14 lwz r25,20(r1) ffc0609c: 7c 08 03 a6 mtlr r0 ffc060a0: 83 41 00 18 lwz r26,24(r1) ffc060a4: 83 61 00 1c lwz r27,28(r1) ffc060a8: 83 81 00 20 lwz r28,32(r1) ffc060ac: 83 a1 00 24 lwz r29,36(r1) ffc060b0: 83 c1 00 28 lwz r30,40(r1) ffc060b4: 83 e1 00 2c lwz r31,44(r1) ffc060b8: 38 21 00 30 addi r1,r1,48 ffc060bc: 4e 80 00 20 blr rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); ffc060c0: 48 00 2f 79 bl ffc09038 <== NOT EXECUTED =============================================================================== ffc069f0 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc069f0: 94 21 ff d0 stwu r1,-48(r1) <== NOT EXECUTED ffc069f4: 7c 08 02 a6 mflr r0 <== NOT EXECUTED 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); ffc069f8: 38 80 00 00 li r4,0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc069fc: 90 01 00 34 stw r0,52(r1) <== NOT EXECUTED 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); ffc06a00: 38 a0 00 00 li r5,0 <== NOT EXECUTED rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc06a04: 81 23 00 00 lwz r9,0(r3) <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc06a08: 93 e1 00 2c stw r31,44(r1) <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc06a0c: 83 e9 00 38 lwz r31,56(r9) <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc06a10: 93 21 00 14 stw r25,20(r1) <== NOT EXECUTED ffc06a14: 7c 79 1b 78 mr r25,r3 <== NOT EXECUTED 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); ffc06a18: 80 7f 00 14 lwz r3,20(r31) <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc06a1c: 93 01 00 10 stw r24,16(r1) <== NOT EXECUTED ffc06a20: 93 61 00 1c stw r27,28(r1) <== NOT EXECUTED ffc06a24: 93 81 00 20 stw r28,32(r1) <== NOT EXECUTED ffc06a28: 92 e1 00 0c stw r23,12(r1) <== NOT EXECUTED ffc06a2c: 93 41 00 18 stw r26,24(r1) <== NOT EXECUTED ffc06a30: 93 a1 00 24 stw r29,36(r1) <== NOT EXECUTED ffc06a34: 93 c1 00 28 stw r30,40(r1) <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; ffc06a38: 83 79 00 14 lwz r27,20(r25) <== NOT EXECUTED char *buffer = args->buffer; ffc06a3c: 83 99 00 10 lwz r28,16(r25) <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc06a40: 48 00 1c d1 bl ffc08710 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) ffc06a44: 7c 78 1b 79 mr. r24,r3 <== NOT EXECUTED ffc06a48: 40 82 00 48 bne- ffc06a90 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { ffc06a4c: 80 1f 00 cc lwz r0,204(r31) <== NOT EXECUTED ffc06a50: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc06a54: 39 29 28 88 addi r9,r9,10376 <== NOT EXECUTED ffc06a58: 54 00 28 34 rlwinm r0,r0,5,0,26 <== NOT EXECUTED ffc06a5c: 7d 29 02 14 add r9,r9,r0 <== NOT EXECUTED ffc06a60: 80 09 00 08 lwz r0,8(r9) <== NOT EXECUTED ffc06a64: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc06a68: 41 9e 00 60 beq- cr7,ffc06ac8 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); ffc06a6c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06a70: 7f 24 cb 78 mr r4,r25 <== NOT EXECUTED ffc06a74: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc06a78: 4e 80 04 21 bctrl <== NOT EXECUTED tty->tty_rcvwakeup = 0; ffc06a7c: 38 00 00 00 li r0,0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); ffc06a80: 7c 78 1b 78 mr r24,r3 <== NOT EXECUTED tty->tty_rcvwakeup = 0; ffc06a84: 90 1f 00 e4 stw r0,228(r31) <== NOT EXECUTED rtems_semaphore_release (tty->isem); ffc06a88: 80 7f 00 14 lwz r3,20(r31) <== NOT EXECUTED ffc06a8c: 48 00 1d e5 bl ffc08870 <== NOT EXECUTED } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } ffc06a90: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED ffc06a94: 7f 03 c3 78 mr r3,r24 <== NOT EXECUTED ffc06a98: 82 e1 00 0c lwz r23,12(r1) <== NOT EXECUTED ffc06a9c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc06aa0: 83 01 00 10 lwz r24,16(r1) <== NOT EXECUTED ffc06aa4: 83 21 00 14 lwz r25,20(r1) <== NOT EXECUTED ffc06aa8: 83 41 00 18 lwz r26,24(r1) <== NOT EXECUTED ffc06aac: 83 61 00 1c lwz r27,28(r1) <== NOT EXECUTED ffc06ab0: 83 81 00 20 lwz r28,32(r1) <== NOT EXECUTED ffc06ab4: 83 a1 00 24 lwz r29,36(r1) <== NOT EXECUTED ffc06ab8: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc06abc: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc06ac0: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc06ac4: 4e 80 00 20 blr <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { ffc06ac8: 81 3f 00 24 lwz r9,36(r31) <== NOT EXECUTED ffc06acc: 80 1f 00 20 lwz r0,32(r31) <== NOT EXECUTED ffc06ad0: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc06ad4: 41 9e 00 a4 beq- cr7,ffc06b78 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { ffc06ad8: 2f 9b 00 00 cmpwi cr7,r27,0 <== NOT EXECUTED ffc06adc: 41 9e 00 48 beq- cr7,ffc06b24 <== NOT EXECUTED ffc06ae0: 81 3f 00 24 lwz r9,36(r31) <== NOT EXECUTED ffc06ae4: 80 1f 00 20 lwz r0,32(r31) <== NOT EXECUTED ffc06ae8: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc06aec: 40 9c 00 38 bge- cr7,ffc06b24 <== NOT EXECUTED ffc06af0: 7f 69 03 a6 mtctr r27 <== NOT EXECUTED ffc06af4: 48 00 00 10 b ffc06b04 <== NOT EXECUTED ffc06af8: 80 1f 00 20 lwz r0,32(r31) <== NOT EXECUTED ffc06afc: 7f 80 48 00 cmpw cr7,r0,r9 <== NOT EXECUTED ffc06b00: 40 9d 00 24 ble- cr7,ffc06b24 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; ffc06b04: 81 7f 00 1c lwz r11,28(r31) <== NOT EXECUTED count--; ffc06b08: 3b 7b ff ff addi r27,r27,-1 <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; ffc06b0c: 7c 0b 48 ae lbzx r0,r11,r9 <== NOT EXECUTED ffc06b10: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED ffc06b14: 98 1c 00 00 stb r0,0(r28) <== NOT EXECUTED ffc06b18: 3b 9c 00 01 addi r28,r28,1 <== NOT EXECUTED ffc06b1c: 91 3f 00 24 stw r9,36(r31) <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { ffc06b20: 42 00 ff d8 bdnz+ ffc06af8 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; ffc06b24: 80 19 00 14 lwz r0,20(r25) <== NOT EXECUTED ffc06b28: 7f 7b 00 50 subf r27,r27,r0 <== NOT EXECUTED ffc06b2c: 93 79 00 1c stw r27,28(r25) <== NOT EXECUTED tty->tty_rcvwakeup = 0; ffc06b30: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc06b34: 90 1f 00 e4 stw r0,228(r31) <== NOT EXECUTED rtems_semaphore_release (tty->isem); ffc06b38: 80 7f 00 14 lwz r3,20(r31) <== NOT EXECUTED ffc06b3c: 48 00 1d 35 bl ffc08870 <== NOT EXECUTED return sc; } ffc06b40: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED ffc06b44: 7f 03 c3 78 mr r3,r24 <== NOT EXECUTED ffc06b48: 82 e1 00 0c lwz r23,12(r1) <== NOT EXECUTED ffc06b4c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc06b50: 83 01 00 10 lwz r24,16(r1) <== NOT EXECUTED ffc06b54: 83 21 00 14 lwz r25,20(r1) <== NOT EXECUTED ffc06b58: 83 41 00 18 lwz r26,24(r1) <== NOT EXECUTED ffc06b5c: 83 61 00 1c lwz r27,28(r1) <== NOT EXECUTED ffc06b60: 83 81 00 20 lwz r28,32(r1) <== NOT EXECUTED ffc06b64: 83 a1 00 24 lwz r29,36(r1) <== NOT EXECUTED ffc06b68: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc06b6c: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc06b70: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc06b74: 4e 80 00 20 blr <== NOT EXECUTED } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL && tty->device.outputUsesInterrupts == TERMIOS_POLLED) ffc06b78: 80 1f 00 a0 lwz r0,160(r31) <== NOT EXECUTED rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; ffc06b7c: 81 3f 00 28 lwz r9,40(r31) <== NOT EXECUTED if (tty->device.pollRead != NULL ffc06b80: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; ffc06b84: 93 1f 00 20 stw r24,32(r31) <== NOT EXECUTED tty->read_start_column = tty->column; ffc06b88: 91 3f 00 2c stw r9,44(r31) <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; ffc06b8c: 93 1f 00 24 stw r24,36(r31) <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL ffc06b90: 41 9e 00 10 beq- cr7,ffc06ba0 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) ffc06b94: 81 3f 00 b4 lwz r9,180(r31) <== NOT EXECUTED ffc06b98: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc06b9c: 41 9e 01 8c beq- cr7,ffc06d28 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc06ba0: 3f a0 00 00 lis r29,0 <== NOT EXECUTED * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; ffc06ba4: 83 df 00 74 lwz r30,116(r31) <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc06ba8: 3b bd 21 68 addi r29,r29,8552 <== NOT EXECUTED 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)(tty->minor, ffc06bac: 3a ff 00 49 addi r23,r31,73 <== NOT EXECUTED ffc06bb0: 3b 40 00 01 li r26,1 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc06bb4: 81 3f 00 5c lwz r9,92(r31) <== NOT EXECUTED ffc06bb8: 80 1f 00 60 lwz r0,96(r31) <== NOT EXECUTED ffc06bbc: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc06bc0: 41 9e 00 ec beq- cr7,ffc06cac <== NOT EXECUTED ffc06bc4: 81 7d 00 00 lwz r11,0(r29) <== NOT EXECUTED ffc06bc8: 81 3f 00 20 lwz r9,32(r31) <== NOT EXECUTED ffc06bcc: 38 0b ff ff addi r0,r11,-1 <== NOT EXECUTED ffc06bd0: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc06bd4: 40 9c 00 d8 bge- cr7,ffc06cac <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; ffc06bd8: 81 3f 00 5c lwz r9,92(r31) <== NOT EXECUTED ffc06bdc: 81 7f 00 64 lwz r11,100(r31) <== NOT EXECUTED ffc06be0: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; ffc06be4: 81 1f 00 58 lwz r8,88(r31) <== NOT EXECUTED 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; ffc06be8: 7c 09 5b 96 divwu r0,r9,r11 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) ffc06bec: 81 5f 00 bc lwz r10,188(r31) <== NOT EXECUTED 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; ffc06bf0: 7c 00 59 d6 mullw r0,r0,r11 <== NOT EXECUTED ffc06bf4: 7c 00 48 50 subf r0,r0,r9 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; ffc06bf8: 7f c8 00 ae lbzx r30,r8,r0 <== NOT EXECUTED tty->rawInBuf.Head = newHead; ffc06bfc: 90 1f 00 5c stw r0,92(r31) <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) ffc06c00: 81 7f 00 60 lwz r11,96(r31) <== NOT EXECUTED ffc06c04: 81 1f 00 64 lwz r8,100(r31) <== NOT EXECUTED ffc06c08: 81 3f 00 64 lwz r9,100(r31) <== NOT EXECUTED ffc06c0c: 7d 68 5a 14 add r11,r8,r11 <== NOT EXECUTED ffc06c10: 7c 00 58 50 subf r0,r0,r11 <== NOT EXECUTED ffc06c14: 7d 60 4b 96 divwu r11,r0,r9 <== NOT EXECUTED ffc06c18: 7d 2b 49 d6 mullw r9,r11,r9 <== NOT EXECUTED ffc06c1c: 7c 09 00 50 subf r0,r9,r0 <== NOT EXECUTED ffc06c20: 7f 80 50 40 cmplw cr7,r0,r10 <== NOT EXECUTED ffc06c24: 40 9c 00 50 bge- cr7,ffc06c74 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; ffc06c28: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc06c2c: 54 00 00 3c rlwinm r0,r0,0,0,30 <== NOT EXECUTED ffc06c30: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) ffc06c34: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc06c38: 70 00 02 02 andi. r0,r0,514 <== NOT EXECUTED ffc06c3c: 2f 80 02 02 cmpwi cr7,r0,514 <== NOT EXECUTED ffc06c40: 41 9e 00 b4 beq- cr7,ffc06cf4 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { ffc06c44: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc06c48: 70 09 01 00 andi. r9,r0,256 <== NOT EXECUTED ffc06c4c: 41 82 00 28 beq- ffc06c74 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { ffc06c50: 80 1f 00 b0 lwz r0,176(r31) <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF; ffc06c54: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { ffc06c58: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF; ffc06c5c: 55 29 07 b8 rlwinm r9,r9,0,30,28 <== NOT EXECUTED ffc06c60: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { ffc06c64: 41 9e 00 10 beq- cr7,ffc06c74 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); ffc06c68: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc06c6c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06c70: 4e 80 04 21 bctrl <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { ffc06c74: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED ffc06c78: 70 09 00 02 andi. r9,r0,2 <== NOT EXECUTED ffc06c7c: 41 82 00 54 beq- ffc06cd0 <== NOT EXECUTED if (siproc (c, tty)) ffc06c80: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc06c84: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc06c88: 4b ff fb 01 bl ffc06788 <== NOT EXECUTED ffc06c8c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc06c90: 41 9e 00 08 beq- cr7,ffc06c98 <== NOT EXECUTED wait = 0; } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) ffc06c94: 3b 40 00 00 li r26,0 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc06c98: 81 3f 00 5c lwz r9,92(r31) <== NOT EXECUTED ffc06c9c: 80 1f 00 60 lwz r0,96(r31) <== NOT EXECUTED else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; ffc06ca0: 83 df 00 70 lwz r30,112(r31) <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc06ca4: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc06ca8: 40 9e ff 1c bne+ cr7,ffc06bc4 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { ffc06cac: 2f 9a 00 00 cmpwi cr7,r26,0 <== NOT EXECUTED ffc06cb0: 41 9e fe 28 beq+ cr7,ffc06ad8 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, ffc06cb4: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED ffc06cb8: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED ffc06cbc: 80 9f 00 6c lwz r4,108(r31) <== NOT EXECUTED ffc06cc0: 48 00 1a 51 bl ffc08710 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) ffc06cc4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc06cc8: 41 9e fe ec beq+ cr7,ffc06bb4 <== NOT EXECUTED ffc06ccc: 4b ff fe 0c b ffc06ad8 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); ffc06cd0: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc06cd4: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc06cd8: 4b ff fa b1 bl ffc06788 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) ffc06cdc: 88 1f 00 47 lbz r0,71(r31) <== NOT EXECUTED ffc06ce0: 81 3f 00 20 lwz r9,32(r31) <== NOT EXECUTED ffc06ce4: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc06ce8: 41 bc ff b0 blt- cr7,ffc06c98 <== NOT EXECUTED ffc06cec: 3b 40 00 00 li r26,0 <== NOT EXECUTED ffc06cf0: 4b ff ff a8 b ffc06c98 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) ffc06cf4: 80 1f 00 94 lwz r0,148(r31) <== NOT EXECUTED ffc06cf8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc06cfc: 41 9e 00 10 beq- cr7,ffc06d0c <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { ffc06d00: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) ffc06d04: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED ffc06d08: 41 a2 ff 3c beq- ffc06c44 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, ffc06d0c: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED ffc06d10: 7e e4 bb 78 mr r4,r23 <== NOT EXECUTED ffc06d14: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc06d18: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc06d1c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06d20: 4e 80 04 21 bctrl <== NOT EXECUTED ffc06d24: 4b ff ff 50 b ffc06c74 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { ffc06d28: 81 3f 00 3c lwz r9,60(r31) <== NOT EXECUTED ffc06d2c: 71 2b 00 02 andi. r11,r9,2 <== NOT EXECUTED ffc06d30: 41 82 00 34 beq- ffc06d64 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); ffc06d34: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc06d38: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06d3c: 4e 80 04 21 bctrl <== NOT EXECUTED if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) ffc06d40: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { ffc06d44: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) ffc06d48: 54 63 06 3e clrlwi r3,r3,24 <== NOT EXECUTED int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { ffc06d4c: 41 80 00 c0 blt- ffc06e0c <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) ffc06d50: 4b ff fa 39 bl ffc06788 <== NOT EXECUTED ffc06d54: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc06d58: 40 be fd 80 bne- cr7,ffc06ad8 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { ffc06d5c: 80 1f 00 a0 lwz r0,160(r31) <== NOT EXECUTED ffc06d60: 4b ff ff d4 b ffc06d34 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); ffc06d64: 48 00 11 95 bl ffc07ef8 <== NOT EXECUTED ffc06d68: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); ffc06d6c: 80 1f 00 a0 lwz r0,160(r31) <== NOT EXECUTED ffc06d70: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc06d74: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06d78: 4e 80 04 21 bctrl <== NOT EXECUTED if (n < 0) { ffc06d7c: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc06d80: 41 80 00 38 blt- ffc06db8 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); ffc06d84: 54 63 06 3e clrlwi r3,r3,24 <== NOT EXECUTED ffc06d88: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc06d8c: 4b ff f9 fd bl ffc06788 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) ffc06d90: 88 1f 00 47 lbz r0,71(r31) <== NOT EXECUTED ffc06d94: 81 3f 00 20 lwz r9,32(r31) <== NOT EXECUTED ffc06d98: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc06d9c: 40 bc fd 3c bge- cr7,ffc06ad8 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) ffc06da0: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc06da4: 41 be ff c8 beq- cr7,ffc06d6c <== NOT EXECUTED ffc06da8: 88 1f 00 46 lbz r0,70(r31) <== NOT EXECUTED ffc06dac: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc06db0: 41 9e ff bc beq+ cr7,ffc06d6c <== NOT EXECUTED ffc06db4: 4b ff ff b0 b ffc06d64 <== NOT EXECUTED rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { if (tty->termios.c_cc[VMIN]) { ffc06db8: 88 1f 00 47 lbz r0,71(r31) <== NOT EXECUTED ffc06dbc: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc06dc0: 41 9e 00 28 beq- cr7,ffc06de8 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { ffc06dc4: 88 1f 00 46 lbz r0,70(r31) <== NOT EXECUTED ffc06dc8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc06dcc: 41 9e 00 10 beq- cr7,ffc06ddc <== NOT EXECUTED ffc06dd0: 80 1f 00 20 lwz r0,32(r31) <== NOT EXECUTED ffc06dd4: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc06dd8: 40 9e 00 1c bne- cr7,ffc06df4 <== NOT EXECUTED now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); ffc06ddc: 38 60 00 01 li r3,1 <== NOT EXECUTED ffc06de0: 48 00 20 35 bl ffc08e14 <== NOT EXECUTED ffc06de4: 4b ff ff 88 b ffc06d6c <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) ffc06de8: 88 1f 00 46 lbz r0,70(r31) <== NOT EXECUTED ffc06dec: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc06df0: 41 be fc e8 beq- cr7,ffc06ad8 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); ffc06df4: 48 00 11 05 bl ffc07ef8 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { ffc06df8: 80 1f 00 54 lwz r0,84(r31) <== NOT EXECUTED ffc06dfc: 7c 7e 18 50 subf r3,r30,r3 <== NOT EXECUTED ffc06e00: 7f 83 00 40 cmplw cr7,r3,r0 <== NOT EXECUTED ffc06e04: 40 9d ff d8 ble+ cr7,ffc06ddc <== NOT EXECUTED ffc06e08: 4b ff fc d0 b ffc06ad8 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); ffc06e0c: 38 60 00 01 li r3,1 <== NOT EXECUTED ffc06e10: 48 00 20 05 bl ffc08e14 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { ffc06e14: 80 1f 00 a0 lwz r0,160(r31) <== NOT EXECUTED ffc06e18: 4b ff ff 1c b ffc06d34 <== NOT EXECUTED =============================================================================== ffc05840 : * 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) { ffc05840: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED ffc05844: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc05848: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) ffc0584c: 80 03 00 b8 lwz r0,184(r3) <== NOT EXECUTED * 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) { ffc05850: 93 e1 00 14 stw r31,20(r1) <== NOT EXECUTED ffc05854: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) ffc05858: 70 00 04 03 andi. r0,r0,1027 <== NOT EXECUTED * 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) { ffc0585c: 93 a1 00 0c stw r29,12(r1) <== NOT EXECUTED int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) ffc05860: 2f 80 04 01 cmpwi cr7,r0,1025 <== NOT EXECUTED * 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) { ffc05864: 93 c1 00 10 stw r30,16(r1) <== NOT EXECUTED int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) ffc05868: 41 9e 01 5c beq- cr7,ffc059c4 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) ffc0586c: 80 03 00 b8 lwz r0,184(r3) <== NOT EXECUTED ffc05870: 54 00 07 be clrlwi r0,r0,30 <== NOT EXECUTED ffc05874: 2f 80 00 02 cmpwi cr7,r0,2 <== NOT EXECUTED ffc05878: 41 9e 01 b4 beq- cr7,ffc05a2c <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { ffc0587c: 81 23 00 80 lwz r9,128(r3) <== NOT EXECUTED ffc05880: 80 03 00 84 lwz r0,132(r3) <== NOT EXECUTED ffc05884: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc05888: 41 9e 00 d8 beq- cr7,ffc05960 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0588c: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc05890: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED ffc05894: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED ffc05898: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; ffc0589c: 39 20 00 00 li r9,0 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; ffc058a0: 83 c3 00 90 lwz r30,144(r3) <== NOT EXECUTED tty->t_dqlen = 0; ffc058a4: 91 23 00 90 stw r9,144(r3) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc058a8: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; ffc058ac: 80 03 00 84 lwz r0,132(r3) <== NOT EXECUTED ffc058b0: 81 23 00 88 lwz r9,136(r3) <== NOT EXECUTED ffc058b4: 7c 1e 02 14 add r0,r30,r0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { ffc058b8: 81 63 00 94 lwz r11,148(r3) <== NOT EXECUTED rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; ffc058bc: 7f c0 4b 96 divwu r30,r0,r9 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { ffc058c0: 2f 8b 00 02 cmpwi cr7,r11,2 <== NOT EXECUTED rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; ffc058c4: 7f de 49 d6 mullw r30,r30,r9 <== NOT EXECUTED ffc058c8: 7f de 00 50 subf r30,r30,r0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; ffc058cc: 93 c3 00 84 stw r30,132(r3) <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { ffc058d0: 41 9e 00 e8 beq- cr7,ffc059b8 <== NOT EXECUTED /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { ffc058d4: 80 1f 00 80 lwz r0,128(r31) <== NOT EXECUTED ffc058d8: 7f 80 f0 00 cmpw cr7,r0,r30 <== NOT EXECUTED ffc058dc: 41 9e 00 a0 beq- cr7,ffc0597c <== NOT EXECUTED if ( tty->tty_snd.sw_pfn != NULL) { (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) ffc058e0: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc058e4: 70 00 02 10 andi. r0,r0,528 <== NOT EXECUTED ffc058e8: 2f 80 02 10 cmpwi cr7,r0,528 <== NOT EXECUTED ffc058ec: 41 9e 01 a8 beq- cr7,ffc05a94 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) ffc058f0: 80 1f 00 80 lwz r0,128(r31) <== NOT EXECUTED ffc058f4: 7f 9e 00 40 cmplw cr7,r30,r0 <== NOT EXECUTED ffc058f8: 41 9d 00 b4 bgt- cr7,ffc059ac <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; ffc058fc: 83 bf 00 80 lwz r29,128(r31) <== NOT EXECUTED ffc05900: 7f be e8 50 subf r29,r30,r29 <== NOT EXECUTED /* 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)) { ffc05904: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc05908: 7f a5 eb 78 mr r5,r29 <== NOT EXECUTED ffc0590c: 70 09 06 00 andi. r9,r0,1536 <== NOT EXECUTED ffc05910: 41 82 00 0c beq- ffc0591c <== NOT EXECUTED ffc05914: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc05918: 3b a0 00 01 li r29,1 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ ffc0591c: 38 00 00 01 li r0,1 <== NOT EXECUTED (*tty->device.write)(tty->minor, ffc05920: 80 9f 00 7c lwz r4,124(r31) <== NOT EXECUTED /* 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*/ ffc05924: 90 1f 00 94 stw r0,148(r31) <== NOT EXECUTED (*tty->device.write)(tty->minor, ffc05928: 7c 84 f2 14 add r4,r4,r30 <== NOT EXECUTED ffc0592c: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED ffc05930: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc05934: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc05938: 4e 80 04 21 bctrl <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ ffc0593c: 93 df 00 84 stw r30,132(r31) <== NOT EXECUTED } return nToSend; } ffc05940: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc05944: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc05948: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc0594c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05950: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc05954: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc05958: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc0595c: 4e 80 00 20 blr <== NOT EXECUTED else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { ffc05960: 80 03 00 94 lwz r0,148(r3) <== NOT EXECUTED ffc05964: 3b a0 00 00 li r29,0 <== NOT EXECUTED ffc05968: 2f 80 00 02 cmpwi cr7,r0,2 <== NOT EXECUTED ffc0596c: 40 9e ff d4 bne+ cr7,ffc05940 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); ffc05970: 80 63 00 8c lwz r3,140(r3) <== NOT EXECUTED ffc05974: 48 00 2e fd bl ffc08870 <== NOT EXECUTED ffc05978: 4b ff ff c8 b ffc05940 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { ffc0597c: 80 1f 00 d4 lwz r0,212(r31) <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; ffc05980: 39 20 00 00 li r9,0 <== NOT EXECUTED ffc05984: 91 3f 00 94 stw r9,148(r31) <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { ffc05988: 3b a0 00 00 li r29,0 <== NOT EXECUTED ffc0598c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc05990: 41 be ff ac beq- cr7,ffc0593c <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); ffc05994: 38 7f 00 30 addi r3,r31,48 <== NOT EXECUTED ffc05998: 80 9f 00 d8 lwz r4,216(r31) <== NOT EXECUTED ffc0599c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc059a0: 4e 80 04 21 bctrl <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ ffc059a4: 93 df 00 84 stw r30,132(r31) <== NOT EXECUTED ffc059a8: 4b ff ff 98 b ffc05940 <== NOT EXECUTED else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; ffc059ac: 83 bf 00 88 lwz r29,136(r31) <== NOT EXECUTED ffc059b0: 7f be e8 50 subf r29,r30,r29 <== NOT EXECUTED ffc059b4: 4b ff ff 50 b ffc05904 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); ffc059b8: 80 63 00 8c lwz r3,140(r3) <== NOT EXECUTED ffc059bc: 48 00 2e b5 bl ffc08870 <== NOT EXECUTED ffc059c0: 4b ff ff 14 b ffc058d4 <== NOT EXECUTED /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, ffc059c4: 80 03 00 a4 lwz r0,164(r3) <== NOT EXECUTED ffc059c8: 38 9f 00 4a addi r4,r31,74 <== NOT EXECUTED ffc059cc: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc059d0: 80 63 00 10 lwz r3,16(r3) <== NOT EXECUTED ffc059d4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc059d8: 4e 80 04 21 bctrl <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc059dc: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc059e0: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED ffc059e4: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED ffc059e8: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; ffc059ec: 81 3f 00 90 lwz r9,144(r31) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; ffc059f0: 81 7f 00 b8 lwz r11,184(r31) <== NOT EXECUTED /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; ffc059f4: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; ffc059f8: 61 6b 00 02 ori r11,r11,2 <== NOT EXECUTED /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; ffc059fc: 91 3f 00 90 stw r9,144(r31) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; ffc05a00: 91 7f 00 b8 stw r11,184(r31) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc05a04: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } ffc05a08: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc05a0c: 3b a0 00 01 li r29,1 <== NOT EXECUTED ffc05a10: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc05a14: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc05a18: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05a1c: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc05a20: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc05a24: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc05a28: 4e 80 00 20 blr <== NOT EXECUTED * 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, ffc05a2c: 80 03 00 a4 lwz r0,164(r3) <== NOT EXECUTED ffc05a30: 38 9f 00 49 addi r4,r31,73 <== NOT EXECUTED ffc05a34: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc05a38: 80 63 00 10 lwz r3,16(r3) <== NOT EXECUTED ffc05a3c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc05a40: 4e 80 04 21 bctrl <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc05a44: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc05a48: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED ffc05a4c: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED ffc05a50: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; ffc05a54: 81 3f 00 90 lwz r9,144(r31) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; ffc05a58: 81 7f 00 b8 lwz r11,184(r31) <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; ffc05a5c: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; ffc05a60: 55 6b 07 fa rlwinm r11,r11,0,31,29 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; ffc05a64: 91 3f 00 90 stw r9,144(r31) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; ffc05a68: 91 7f 00 b8 stw r11,184(r31) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc05a6c: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } ffc05a70: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc05a74: 3b a0 00 01 li r29,1 <== NOT EXECUTED ffc05a78: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc05a7c: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc05a80: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05a84: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc05a88: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc05a8c: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc05a90: 4e 80 00 20 blr <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc05a94: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc05a98: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED ffc05a9c: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED ffc05aa0: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); tty->flow_ctrl |= FL_OSTOP; ffc05aa4: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED ffc05aa8: 61 29 00 20 ori r9,r9,32 <== NOT EXECUTED ffc05aac: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ ffc05ab0: 39 20 00 01 li r9,1 <== NOT EXECUTED ffc05ab4: 91 3f 00 94 stw r9,148(r31) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc05ab8: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED ffc05abc: 3b a0 00 00 li r29,0 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ ffc05ac0: 93 df 00 84 stw r30,132(r31) <== NOT EXECUTED ffc05ac4: 4b ff fe 7c b ffc05940 <== NOT EXECUTED =============================================================================== ffc079b0 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { ffc079b0: 94 21 ff d8 stwu r1,-40(r1) <== NOT EXECUTED ffc079b4: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc079b8: 90 01 00 2c stw r0,44(r1) <== NOT EXECUTED ffc079bc: 93 a1 00 1c stw r29,28(r1) <== NOT EXECUTED ffc079c0: 3b a1 00 08 addi r29,r1,8 <== NOT EXECUTED ffc079c4: 93 c1 00 20 stw r30,32(r1) <== NOT EXECUTED ffc079c8: 3b c1 00 0c addi r30,r1,12 <== NOT EXECUTED ffc079cc: 93 e1 00 24 stw r31,36(r1) <== NOT EXECUTED ffc079d0: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | ffc079d4: 7f c6 f3 78 mr r6,r30 <== NOT EXECUTED ffc079d8: 38 80 00 02 li r4,2 <== NOT EXECUTED ffc079dc: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc079e0: 38 60 00 03 li r3,3 <== NOT EXECUTED ffc079e4: 48 00 05 a9 bl ffc07f8c <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { ffc079e8: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc079ec: 70 09 00 01 andi. r9,r0,1 <== NOT EXECUTED ffc079f0: 40 82 00 54 bne- ffc07a44 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); ffc079f4: 80 1f 00 a0 lwz r0,160(r31) <== NOT EXECUTED ffc079f8: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc079fc: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07a00: 4e 80 04 21 bctrl <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( ffc07a04: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED else { /* * do something */ c = tty->device.pollRead(tty->minor); if (c != EOF) { ffc07a08: 2f 83 ff ff cmpwi cr7,r3,-1 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); ffc07a0c: 7c 60 1b 78 mr r0,r3 <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( ffc07a10: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc07a14: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED else { /* * do something */ c = tty->device.pollRead(tty->minor); if (c != EOF) { ffc07a18: 41 be ff bc beq- cr7,ffc079d4 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; ffc07a1c: 98 01 00 08 stb r0,8(r1) <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( ffc07a20: 4b ff e1 2d bl ffc05b4c <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | ffc07a24: 7f c6 f3 78 mr r6,r30 <== NOT EXECUTED ffc07a28: 38 80 00 02 li r4,2 <== NOT EXECUTED ffc07a2c: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc07a30: 38 60 00 03 li r3,3 <== NOT EXECUTED ffc07a34: 48 00 05 59 bl ffc07f8c <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { ffc07a38: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc07a3c: 70 09 00 01 andi. r9,r0,1 <== NOT EXECUTED ffc07a40: 41 82 ff b4 beq+ ffc079f4 <== NOT EXECUTED tty->rxTaskId = 0; ffc07a44: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc07a48: 90 1f 00 c4 stw r0,196(r31) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); ffc07a4c: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc07a50: 48 00 10 d1 bl ffc08b20 <== NOT EXECUTED ffc07a54: 4b ff ff 80 b ffc079d4 <== NOT EXECUTED =============================================================================== ffc05818 : * signal receive interrupt to rx daemon * NOTE: This routine runs in the context of the * device receive interrupt handler. */ void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty) { ffc05818: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED ffc0581c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); ffc05820: 38 80 00 02 li r4,2 <== NOT EXECUTED * signal receive interrupt to rx daemon * NOTE: This routine runs in the context of the * device receive interrupt handler. */ void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty) { ffc05824: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); ffc05828: 80 63 00 c4 lwz r3,196(r3) <== NOT EXECUTED ffc0582c: 48 00 29 61 bl ffc0818c <== NOT EXECUTED } ffc05830: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc05834: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc05838: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0583c: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc07904 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { ffc07904: 94 21 ff d8 stwu r1,-40(r1) <== NOT EXECUTED ffc07908: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc0790c: 93 a1 00 1c stw r29,28(r1) <== NOT EXECUTED ffc07910: 3f a0 00 00 lis r29,0 <== NOT EXECUTED ffc07914: 3b bd 28 88 addi r29,r29,10376 <== NOT EXECUTED ffc07918: 90 01 00 2c stw r0,44(r1) <== NOT EXECUTED ffc0791c: 93 c1 00 20 stw r30,32(r1) <== NOT EXECUTED ffc07920: 3b c1 00 08 addi r30,r1,8 <== NOT EXECUTED ffc07924: 93 e1 00 24 stw r31,36(r1) <== NOT EXECUTED ffc07928: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | ffc0792c: 38 80 00 02 li r4,2 <== NOT EXECUTED ffc07930: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc07934: 7f c6 f3 78 mr r6,r30 <== NOT EXECUTED ffc07938: 38 60 00 03 li r3,3 <== NOT EXECUTED ffc0793c: 48 00 06 51 bl ffc07f8c <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { ffc07940: 80 01 00 08 lwz r0,8(r1) <== NOT EXECUTED else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { rtems_termios_linesw[tty->t_line].l_start(tty); ffc07944: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED rtems_event_receive((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) { ffc07948: 70 09 00 01 andi. r9,r0,1 <== NOT EXECUTED ffc0794c: 40 82 00 50 bne- ffc0799c <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { ffc07950: 81 3f 00 cc lwz r9,204(r31) <== NOT EXECUTED ffc07954: 55 29 28 34 rlwinm r9,r9,5,0,26 <== NOT EXECUTED ffc07958: 7d 3d 4a 14 add r9,r29,r9 <== NOT EXECUTED ffc0795c: 80 09 00 14 lwz r0,20(r9) <== NOT EXECUTED ffc07960: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc07964: 41 9e 00 0c beq- cr7,ffc07970 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); ffc07968: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0796c: 4e 80 04 21 bctrl <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); ffc07970: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc07974: 4b ff de cd bl ffc05840 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | ffc07978: 38 80 00 02 li r4,2 <== NOT EXECUTED ffc0797c: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc07980: 7f c6 f3 78 mr r6,r30 <== NOT EXECUTED ffc07984: 38 60 00 03 li r3,3 <== NOT EXECUTED ffc07988: 48 00 06 05 bl ffc07f8c <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { ffc0798c: 80 01 00 08 lwz r0,8(r1) <== NOT EXECUTED else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { rtems_termios_linesw[tty->t_line].l_start(tty); ffc07990: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED rtems_event_receive((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) { ffc07994: 70 09 00 01 andi. r9,r0,1 <== NOT EXECUTED ffc07998: 41 82 ff b8 beq+ ffc07950 <== NOT EXECUTED tty->txTaskId = 0; ffc0799c: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc079a0: 90 1f 00 c8 stw r0,200(r31) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); ffc079a4: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc079a8: 48 00 11 79 bl ffc08b20 <== NOT EXECUTED ffc079ac: 4b ff ff 80 b ffc0792c <== NOT EXECUTED =============================================================================== ffc0680c : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc0680c: 94 21 ff e0 stwu r1,-32(r1) ffc06810: 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); ffc06814: 38 80 00 00 li r4,0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc06818: 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); ffc0681c: 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; ffc06820: 81 23 00 00 lwz r9,0(r3) rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc06824: 93 e1 00 1c stw r31,28(r1) rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc06828: 83 e9 00 38 lwz r31,56(r9) rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc0682c: 93 c1 00 18 stw r30,24(r1) ffc06830: 7c 7e 1b 78 mr r30,r3 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); ffc06834: 80 7f 00 18 lwz r3,24(r31) rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc06838: 93 a1 00 14 stw r29,20(r1) ffc0683c: 93 41 00 08 stw r26,8(r1) ffc06840: 93 61 00 0c stw r27,12(r1) ffc06844: 93 81 00 10 stw r28,16(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); ffc06848: 48 00 1e c9 bl ffc08710 if (sc != RTEMS_SUCCESSFUL) ffc0684c: 7c 7d 1b 79 mr. r29,r3 ffc06850: 40 82 00 40 bne- ffc06890 <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { ffc06854: 80 1f 00 cc lwz r0,204(r31) ffc06858: 3d 20 00 00 lis r9,0 ffc0685c: 39 29 28 88 addi r9,r9,10376 ffc06860: 54 00 28 34 rlwinm r0,r0,5,0,26 ffc06864: 7d 29 02 14 add r9,r9,r0 ffc06868: 80 09 00 0c lwz r0,12(r9) ffc0686c: 2f 80 00 00 cmpwi cr7,r0,0 ffc06870: 41 9e 00 4c beq- cr7,ffc068bc <== ALWAYS TAKEN sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); ffc06874: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc06878: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0687c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc06880: 4e 80 04 21 bctrl <== NOT EXECUTED ffc06884: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED rtems_semaphore_release (tty->osem); ffc06888: 80 7f 00 18 lwz r3,24(r31) <== NOT EXECUTED ffc0688c: 48 00 1f e5 bl ffc08870 <== NOT EXECUTED rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } ffc06890: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED ffc06894: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc06898: 83 41 00 08 lwz r26,8(r1) <== NOT EXECUTED ffc0689c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc068a0: 83 61 00 0c lwz r27,12(r1) <== NOT EXECUTED ffc068a4: 83 81 00 10 lwz r28,16(r1) <== NOT EXECUTED ffc068a8: 83 a1 00 14 lwz r29,20(r1) <== NOT EXECUTED ffc068ac: 83 c1 00 18 lwz r30,24(r1) <== NOT EXECUTED ffc068b0: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc068b4: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc068b8: 4e 80 00 20 blr <== NOT EXECUTED if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { ffc068bc: 80 1f 00 34 lwz r0,52(r31) ffc068c0: 70 09 00 01 andi. r9,r0,1 ffc068c4: 41 82 00 70 beq- ffc06934 <== NEVER TAKEN uint32_t count = args->count; ffc068c8: 83 7e 00 14 lwz r27,20(r30) char *buffer = args->buffer; while (count--) ffc068cc: 3b 80 00 00 li r28,0 rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; ffc068d0: 83 5e 00 10 lwz r26,16(r30) while (count--) ffc068d4: 38 00 00 00 li r0,0 ffc068d8: 2f 9b 00 00 cmpwi cr7,r27,0 ffc068dc: 41 9e 00 20 beq- cr7,ffc068fc <== NEVER TAKEN oproc (*buffer++, tty); ffc068e0: 7c 7a e0 ae lbzx r3,r26,r28 ffc068e4: 7f e4 fb 78 mr r4,r31 ffc068e8: 3b 9c 00 01 addi r28,r28,1 ffc068ec: 4b ff f7 d9 bl ffc060c4 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) ffc068f0: 7f 9b e0 00 cmpw cr7,r27,r28 ffc068f4: 40 9e ff ec bne+ cr7,ffc068e0 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; ffc068f8: 80 1e 00 14 lwz r0,20(r30) ffc068fc: 90 1e 00 1c stw r0,28(r30) } rtems_semaphore_release (tty->osem); ffc06900: 80 7f 00 18 lwz r3,24(r31) ffc06904: 48 00 1f 6d bl ffc08870 return sc; } ffc06908: 80 01 00 24 lwz r0,36(r1) ffc0690c: 7f a3 eb 78 mr r3,r29 ffc06910: 83 41 00 08 lwz r26,8(r1) ffc06914: 7c 08 03 a6 mtlr r0 ffc06918: 83 61 00 0c lwz r27,12(r1) ffc0691c: 83 81 00 10 lwz r28,16(r1) ffc06920: 83 a1 00 14 lwz r29,20(r1) ffc06924: 83 c1 00 18 lwz r30,24(r1) ffc06928: 83 e1 00 1c lwz r31,28(r1) ffc0692c: 38 21 00 20 addi r1,r1,32 ffc06930: 4e 80 00 20 blr while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); ffc06934: 80 7e 00 10 lwz r3,16(r30) <== NOT EXECUTED ffc06938: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED ffc0693c: 80 9e 00 14 lwz r4,20(r30) <== NOT EXECUTED ffc06940: 4b ff f5 f9 bl ffc05f38 <== NOT EXECUTED ffc06944: 4b ff ff b4 b ffc068f8 <== NOT EXECUTED =============================================================================== ffc1afb0 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { ffc1afb0: 94 21 ff e8 stwu r1,-24(r1) ffc1afb4: 7c 08 02 a6 mflr r0 ffc1afb8: 7c 64 1b 78 mr r4,r3 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) ffc1afbc: 3c 60 00 00 lis r3,0 ffc1afc0: 90 01 00 1c stw r0,28(r1) ffc1afc4: 38 63 79 6c addi r3,r3,31084 ffc1afc8: 38 a1 00 08 addi r5,r1,8 ffc1afcc: 48 00 39 49 bl ffc1e914 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc1afd0: 81 21 00 08 lwz r9,8(r1) ffc1afd4: 38 00 00 04 li r0,4 ffc1afd8: 2f 89 00 00 cmpwi cr7,r9,0 ffc1afdc: 40 9e 00 20 bne- cr7,ffc1affc case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) ffc1afe0: 80 03 00 38 lwz r0,56(r3) ffc1afe4: 2f 80 00 04 cmpwi cr7,r0,4 ffc1afe8: 41 9e 00 0c beq- cr7,ffc1aff4 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); ffc1afec: 38 63 00 10 addi r3,r3,16 ffc1aff0: 48 00 63 19 bl ffc21308 <_Watchdog_Remove> _Thread_Enable_dispatch(); ffc1aff4: 48 00 45 ad bl ffc1f5a0 <_Thread_Enable_dispatch> ffc1aff8: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1affc: 7c 03 03 78 mr r3,r0 ffc1b000: 80 01 00 1c lwz r0,28(r1) ffc1b004: 38 21 00 18 addi r1,r1,24 ffc1b008: 7c 08 03 a6 mtlr r0 ffc1b00c: 4e 80 00 20 blr =============================================================================== ffc1b6c8 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1b6c8: 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; ffc1b6cc: 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 ) { ffc1b6d0: 7c 08 02 a6 mflr r0 ffc1b6d4: 93 e1 00 34 stw r31,52(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; ffc1b6d8: 83 e9 28 ec lwz r31,10476(r9) rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1b6dc: 93 61 00 24 stw r27,36(r1) ffc1b6e0: 7c db 33 78 mr r27,r6 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc1b6e4: 2f 9f 00 00 cmpwi cr7,r31,0 rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1b6e8: 93 81 00 28 stw r28,40(r1) ffc1b6ec: 7c 9c 23 78 mr r28,r4 ffc1b6f0: 93 a1 00 2c stw r29,44(r1) ffc1b6f4: 7c 7d 1b 78 mr r29,r3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc1b6f8: 38 60 00 0e li r3,14 rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc1b6fc: 93 c1 00 30 stw r30,48(r1) ffc1b700: 7c be 2b 78 mr r30,r5 ffc1b704: 90 01 00 3c stw r0,60(r1) ffc1b708: 93 01 00 18 stw r24,24(r1) ffc1b70c: 93 21 00 1c stw r25,28(r1) ffc1b710: 93 41 00 20 stw r26,32(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc1b714: 41 9e 00 38 beq- cr7,ffc1b74c return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) ffc1b718: 3d 20 00 00 lis r9,0 ffc1b71c: 88 09 28 70 lbz r0,10352(r9) ffc1b720: 38 60 00 0b li r3,11 ffc1b724: 2f 80 00 00 cmpwi cr7,r0,0 ffc1b728: 41 9e 00 24 beq- cr7,ffc1b74c <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) ffc1b72c: 2f 85 00 00 cmpwi cr7,r5,0 ffc1b730: 38 60 00 09 li r3,9 ffc1b734: 41 9e 00 18 beq- cr7,ffc1b74c return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) ffc1b738: 7c 83 23 78 mr r3,r4 ffc1b73c: 4b ff be bd bl ffc175f8 <_TOD_Validate> ffc1b740: 2f 83 00 00 cmpwi cr7,r3,0 ffc1b744: 40 9e 00 38 bne- cr7,ffc1b77c the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc1b748: 38 60 00 14 li r3,20 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc1b74c: 80 01 00 3c lwz r0,60(r1) ffc1b750: 83 01 00 18 lwz r24,24(r1) ffc1b754: 7c 08 03 a6 mtlr r0 ffc1b758: 83 21 00 1c lwz r25,28(r1) ffc1b75c: 83 41 00 20 lwz r26,32(r1) ffc1b760: 83 61 00 24 lwz r27,36(r1) ffc1b764: 83 81 00 28 lwz r28,40(r1) ffc1b768: 83 a1 00 2c lwz r29,44(r1) ffc1b76c: 83 c1 00 30 lwz r30,48(r1) ffc1b770: 83 e1 00 34 lwz r31,52(r1) ffc1b774: 38 21 00 38 addi r1,r1,56 ffc1b778: 4e 80 00 20 blr return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc1b77c: 7f 83 e3 78 mr r3,r28 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc1b780: 3f 40 00 00 lis r26,0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc1b784: 4b ff bd d1 bl ffc17554 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) ffc1b788: 80 1a 28 88 lwz r0,10376(r26) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc1b78c: 7c 7c 1b 78 mr r28,r3 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc1b790: 7f 83 00 40 cmplw cr7,r3,r0 ffc1b794: 40 bd ff b4 ble- cr7,ffc1b748 ffc1b798: 3c 60 00 00 lis r3,0 ffc1b79c: 38 63 79 6c addi r3,r3,31084 ffc1b7a0: 7f a4 eb 78 mr r4,r29 ffc1b7a4: 38 a1 00 08 addi r5,r1,8 ffc1b7a8: 48 00 31 6d bl ffc1e914 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc1b7ac: 83 01 00 08 lwz r24,8(r1) ffc1b7b0: 7c 79 1b 78 mr r25,r3 ffc1b7b4: 2f 98 00 00 cmpwi cr7,r24,0 ffc1b7b8: 38 60 00 04 li r3,4 ffc1b7bc: 40 be ff 90 bne- cr7,ffc1b74c case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); ffc1b7c0: 38 79 00 10 addi r3,r25,16 ffc1b7c4: 48 00 5b 45 bl ffc21308 <_Watchdog_Remove> void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc1b7c8: 93 b9 00 30 stw r29,48(r25) the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; ffc1b7cc: 39 20 00 03 li r9,3 _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); ffc1b7d0: 80 1a 28 88 lwz r0,10376(r26) (*timer_server->schedule_operation)( timer_server, the_timer ); ffc1b7d4: 7f e3 fb 78 mr r3,r31 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; ffc1b7d8: 91 39 00 38 stw r9,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 ); ffc1b7dc: 7f 24 cb 78 mr r4,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(); ffc1b7e0: 7f 80 e0 50 subf r28,r0,r28 (*timer_server->schedule_operation)( timer_server, the_timer ); ffc1b7e4: 80 1f 00 04 lwz r0,4(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc1b7e8: 93 19 00 18 stw r24,24(r25) ffc1b7ec: 7c 09 03 a6 mtctr r0 the_watchdog->routine = routine; ffc1b7f0: 93 d9 00 2c stw r30,44(r25) the_watchdog->id = id; the_watchdog->user_data = user_data; ffc1b7f4: 93 79 00 34 stw r27,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(); ffc1b7f8: 93 99 00 1c stw r28,28(r25) (*timer_server->schedule_operation)( timer_server, the_timer ); ffc1b7fc: 4e 80 04 21 bctrl _Thread_Enable_dispatch(); ffc1b800: 48 00 3d a1 bl ffc1f5a0 <_Thread_Enable_dispatch> ffc1b804: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc1b808: 4b ff ff 44 b ffc1b74c =============================================================================== ffc0ad1c : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { ffc0ad1c: 94 21 ff d8 stwu r1,-40(r1) <== NOT EXECUTED ffc0ad20: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc0ad24: 7d 80 00 26 mfcr r12 <== NOT EXECUTED ffc0ad28: 90 01 00 2c stw r0,44(r1) <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) ffc0ad2c: 54 60 1f fe rlwinm r0,r3,3,31,31 <== NOT EXECUTED ffc0ad30: 2e 00 00 00 cmpwi cr4,r0,0 <== NOT EXECUTED static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { ffc0ad34: 93 41 00 10 stw r26,16(r1) <== NOT EXECUTED ffc0ad38: 7c 9a 23 78 mr r26,r4 <== NOT EXECUTED ffc0ad3c: 93 a1 00 1c stw r29,28(r1) <== NOT EXECUTED ffc0ad40: 7c bd 2b 78 mr r29,r5 <== NOT EXECUTED ffc0ad44: 93 e1 00 24 stw r31,36(r1) <== NOT EXECUTED ffc0ad48: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED ffc0ad4c: 93 61 00 14 stw r27,20(r1) <== NOT EXECUTED ffc0ad50: 93 81 00 18 stw r28,24(r1) <== NOT EXECUTED ffc0ad54: 93 c1 00 20 stw r30,32(r1) <== NOT EXECUTED ffc0ad58: 91 81 00 0c stw r12,12(r1) <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) ffc0ad5c: 41 92 00 38 beq- cr4,ffc0ad94 <== NOT EXECUTED { if (rtems_panic_in_progress++) ffc0ad60: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0ad64: 81 69 27 d0 lwz r11,10192(r9) <== NOT EXECUTED ffc0ad68: 2f 8b 00 00 cmpwi cr7,r11,0 <== NOT EXECUTED ffc0ad6c: 38 0b 00 01 addi r0,r11,1 <== NOT EXECUTED ffc0ad70: 90 09 27 d0 stw r0,10192(r9) <== NOT EXECUTED ffc0ad74: 41 9e 00 18 beq- cr7,ffc0ad8c <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0ad78: 3d 60 00 00 lis r11,0 <== NOT EXECUTED ffc0ad7c: 81 4b 27 f8 lwz r10,10232(r11) <== NOT EXECUTED ffc0ad80: 38 0a 00 01 addi r0,r10,1 <== NOT EXECUTED ffc0ad84: 90 0b 27 f8 stw r0,10232(r11) <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); ffc0ad88: 80 09 27 d0 lwz r0,10192(r9) <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) ffc0ad8c: 2f 80 00 02 cmpwi cr7,r0,2 <== NOT EXECUTED ffc0ad90: 41 9d 00 d8 bgt- cr7,ffc0ae68 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ ffc0ad94: 3f c0 00 00 lis r30,0 <== NOT EXECUTED ffc0ad98: 81 3e 27 64 lwz r9,10084(r30) <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; ffc0ad9c: 57 fb 01 00 rlwinm r27,r31,0,4,0 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ ffc0ada0: 3b 80 00 00 li r28,0 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ ffc0ada4: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED ffc0ada8: 48 01 16 f1 bl ffc1c498 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ ffc0adac: 77 e0 40 00 andis. r0,r31,16384 <== NOT EXECUTED ffc0adb0: 40 82 01 38 bne- ffc0aee8 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); ffc0adb4: 81 3e 27 64 lwz r9,10084(r30) <== NOT EXECUTED ffc0adb8: 7f a5 eb 78 mr r5,r29 <== NOT EXECUTED ffc0adbc: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED ffc0adc0: 80 69 00 0c lwz r3,12(r9) <== NOT EXECUTED ffc0adc4: 48 01 7a 9d bl ffc22860 <== NOT EXECUTED if (status) ffc0adc8: 2f 9b 00 00 cmpwi cr7,r27,0 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); ffc0adcc: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED if (status) ffc0add0: 40 9e 00 e4 bne- cr7,ffc0aeb4 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) ffc0add4: 2f 9c 00 00 cmpwi cr7,r28,0 <== NOT EXECUTED ffc0add8: 41 9e 00 3c beq- cr7,ffc0ae14 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) ffc0addc: 40 9d 00 18 ble- cr7,ffc0adf4 <== NOT EXECUTED ffc0ade0: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc0ade4: 48 01 2a 89 bl ffc1d86c <== NOT EXECUTED ffc0ade8: 88 03 00 00 lbz r0,0(r3) <== NOT EXECUTED ffc0adec: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0adf0: 40 9e 01 04 bne- cr7,ffc0aef4 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); ffc0adf4: 81 3e 27 64 lwz r9,10084(r30) <== NOT EXECUTED ffc0adf8: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED ffc0adfc: 38 84 bf 48 addi r4,r4,-16568 <== NOT EXECUTED ffc0ae00: 80 69 00 0c lwz r3,12(r9) <== NOT EXECUTED ffc0ae04: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED ffc0ae08: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc0ae0c: 48 01 1a d1 bl ffc1c8dc <== NOT EXECUTED ffc0ae10: 7f bd 1a 14 add r29,r29,r3 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); ffc0ae14: 81 3e 27 64 lwz r9,10084(r30) <== NOT EXECUTED ffc0ae18: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED ffc0ae1c: 38 84 b8 bc addi r4,r4,-18244 <== NOT EXECUTED ffc0ae20: 80 69 00 0c lwz r3,12(r9) <== NOT EXECUTED ffc0ae24: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc0ae28: 48 01 1a b5 bl ffc1c8dc <== NOT EXECUTED (void) fflush(stderr); ffc0ae2c: 81 3e 27 64 lwz r9,10084(r30) <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); ffc0ae30: 7c 7b 1b 78 mr r27,r3 <== NOT EXECUTED (void) fflush(stderr); ffc0ae34: 80 69 00 0c lwz r3,12(r9) <== NOT EXECUTED ffc0ae38: 48 01 16 61 bl ffc1c498 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) ffc0ae3c: 77 e0 30 00 andis. r0,r31,12288 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); ffc0ae40: 7c 7b ea 14 add r3,r27,r29 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) ffc0ae44: 41 82 00 28 beq- ffc0ae6c <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) ffc0ae48: 41 92 00 54 beq- cr4,ffc0ae9c <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); ffc0ae4c: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED ffc0ae50: 38 84 bf 5c addi r4,r4,-16548 <== NOT EXECUTED ffc0ae54: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc0ae58: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc0ae5c: 48 00 01 55 bl ffc0afb0 <== NOT EXECUTED _exit(local_errno); ffc0ae60: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc0ae64: 48 00 10 45 bl ffc0bea8 <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); abort(); ffc0ae68: 38 60 00 00 li r3,0 <== NOT EXECUTED } } return chars_written; } ffc0ae6c: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc0ae70: 81 81 00 0c lwz r12,12(r1) <== NOT EXECUTED ffc0ae74: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0ae78: 83 41 00 10 lwz r26,16(r1) <== NOT EXECUTED ffc0ae7c: 83 61 00 14 lwz r27,20(r1) <== NOT EXECUTED ffc0ae80: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED ffc0ae84: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc0ae88: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc0ae8c: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc0ae90: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc0ae94: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc0ae98: 4e 80 00 20 blr <== NOT EXECUTED rtems_error(0, "fatal error, exiting"); _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); ffc0ae9c: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED ffc0aea0: 38 84 bf 74 addi r4,r4,-16524 <== NOT EXECUTED ffc0aea4: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc0aea8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc0aeac: 48 00 01 05 bl ffc0afb0 <== NOT EXECUTED abort(); ffc0aeb0: 48 01 11 49 bl ffc1bff8 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); ffc0aeb4: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0aeb8: 81 29 27 64 lwz r9,10084(r9) <== NOT EXECUTED ffc0aebc: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc0aec0: 83 69 00 0c lwz r27,12(r9) <== NOT EXECUTED ffc0aec4: 4b ff fe 2d bl ffc0acf0 <== NOT EXECUTED ffc0aec8: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED ffc0aecc: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED ffc0aed0: 38 84 bf 28 addi r4,r4,-16600 <== NOT EXECUTED ffc0aed4: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc0aed8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc0aedc: 48 01 1a 01 bl ffc1c8dc <== NOT EXECUTED ffc0aee0: 7f bd 1a 14 add r29,r29,r3 <== NOT EXECUTED ffc0aee4: 4b ff fe f0 b ffc0add4 <== NOT EXECUTED (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ local_errno = errno; ffc0aee8: 48 01 11 2d bl ffc1c014 <__errno> <== NOT EXECUTED ffc0aeec: 83 83 00 00 lwz r28,0(r3) <== NOT EXECUTED ffc0aef0: 4b ff fe c4 b ffc0adb4 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); ffc0aef4: 81 3e 27 64 lwz r9,10084(r30) <== NOT EXECUTED ffc0aef8: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc0aefc: 83 69 00 0c lwz r27,12(r9) <== NOT EXECUTED ffc0af00: 48 01 29 6d bl ffc1d86c <== NOT EXECUTED ffc0af04: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED ffc0af08: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED ffc0af0c: 38 84 bf 38 addi r4,r4,-16584 <== NOT EXECUTED ffc0af10: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc0af14: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc0af18: 48 01 19 c5 bl ffc1c8dc <== NOT EXECUTED ffc0af1c: 7f bd 1a 14 add r29,r29,r3 <== NOT EXECUTED if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) ffc0af20: 4b ff fe f4 b ffc0ae14 <== NOT EXECUTED =============================================================================== ffc0506c : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc0506c: 94 21 ff d8 stwu r1,-40(r1) ffc05070: 7c 08 02 a6 mflr r0 ffc05074: 93 21 00 0c stw r25,12(r1) unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); ffc05078: 3f 20 00 00 lis r25,0 ffc0507c: 3b 39 26 e4 addi r25,r25,9956 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc05080: 93 41 00 10 stw r26,16(r1) sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) ffc05084: 3f 40 cc cc lis r26,-13108 ffc05088: 63 5a cc cd ori r26,r26,52429 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc0508c: 93 61 00 14 stw r27,20(r1) limit++; continue; } sign = 1; } if (!isdigit(c)) ffc05090: 3f 60 00 00 lis r27,0 ffc05094: 3b 7b 26 e0 addi r27,r27,9952 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc05098: 93 81 00 18 stw r28,24(r1) ffc0509c: 3f 80 7f ff lis r28,32767 ffc050a0: 63 9c ff ff ori r28,r28,65535 ffc050a4: 90 01 00 2c stw r0,44(r1) ffc050a8: 93 01 00 08 stw r24,8(r1) ffc050ac: 7c 98 23 78 mr r24,r4 ffc050b0: 93 a1 00 1c stw r29,28(r1) ffc050b4: 3b a0 00 00 li r29,0 ffc050b8: 93 c1 00 20 stw r30,32(r1) ffc050bc: 3b c0 00 00 li r30,0 ffc050c0: 93 e1 00 24 stw r31,36(r1) ffc050c4: 7c 7f 1b 78 mr r31,r3 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); ffc050c8: 81 3f 00 04 lwz r9,4(r31) ffc050cc: 38 09 ff ff addi r0,r9,-1 ffc050d0: 2f 80 00 00 cmpwi cr7,r0,0 ffc050d4: 90 1f 00 04 stw r0,4(r31) ffc050d8: 41 9c 00 7c blt- cr7,ffc05154 <== NEVER TAKEN ffc050dc: 81 3f 00 00 lwz r9,0(r31) ffc050e0: 88 69 00 00 lbz r3,0(r9) ffc050e4: 38 09 00 01 addi r0,r9,1 ffc050e8: 90 1f 00 00 stw r0,0(r31) if (c == ':') ffc050ec: 2f 83 00 3a cmpwi cr7,r3,58 ffc050f0: 41 9e 00 78 beq- cr7,ffc05168 break; if (sign == 0) { ffc050f4: 2f 9d 00 00 cmpwi cr7,r29,0 ffc050f8: 40 9e 00 10 bne- cr7,ffc05108 <== NEVER TAKEN if (c == '-') { ffc050fc: 2f 83 00 2d cmpwi cr7,r3,45 sign = -1; limit++; continue; ffc05100: 3b a0 00 01 li r29,1 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { ffc05104: 41 9e 00 e8 beq- cr7,ffc051ec <== NEVER TAKEN limit++; continue; } sign = 1; } if (!isdigit(c)) ffc05108: 81 3b 00 00 lwz r9,0(r27) ffc0510c: 7d 29 1a 14 add r9,r9,r3 ffc05110: 88 09 00 01 lbz r0,1(r9) ffc05114: 70 09 00 04 andi. r9,r0,4 ffc05118: 41 82 00 a0 beq- ffc051b8 <== NEVER TAKEN return 0; d = c - '0'; if ((i > (limit / 10)) ffc0511c: 7c 1c d0 16 mulhwu r0,r28,r26 ffc05120: 54 00 e8 fe rlwinm r0,r0,29,3,31 ffc05124: 7f 9e 00 40 cmplw cr7,r30,r0 ffc05128: 41 9d 00 90 bgt- cr7,ffc051b8 <== NEVER TAKEN ffc0512c: 7f 9e 00 00 cmpw cr7,r30,r0 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; ffc05130: 38 63 ff d0 addi r3,r3,-48 ffc05134: 1c 1e 00 0a mulli r0,r30,10 if ((i > (limit / 10)) ffc05138: 41 9e 00 74 beq- cr7,ffc051ac <== NEVER TAKEN unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); ffc0513c: 81 3f 00 04 lwz r9,4(r31) return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; ffc05140: 7f c3 02 14 add r30,r3,r0 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); ffc05144: 38 09 ff ff addi r0,r9,-1 ffc05148: 2f 80 00 00 cmpwi cr7,r0,0 ffc0514c: 90 1f 00 04 stw r0,4(r31) ffc05150: 40 9c ff 8c bge+ cr7,ffc050dc <== ALWAYS TAKEN ffc05154: 80 79 00 00 lwz r3,0(r25) <== NOT EXECUTED ffc05158: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc0515c: 48 01 29 55 bl ffc17ab0 <__srget_r> <== NOT EXECUTED if (c == ':') ffc05160: 2f 83 00 3a cmpwi cr7,r3,58 <== NOT EXECUTED ffc05164: 40 9e ff 90 bne+ cr7,ffc050f4 <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) ffc05168: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0516c: 41 9e 00 4c beq- cr7,ffc051b8 <== NEVER TAKEN return 0; *val = i * sign; return 1; } ffc05170: 80 01 00 2c lwz r0,44(r1) return 0; i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; ffc05174: 7f dd f1 d6 mullw r30,r29,r30 return 1; } ffc05178: 83 21 00 0c lwz r25,12(r1) ffc0517c: 7c 08 03 a6 mtlr r0 return 0; i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; ffc05180: 38 60 00 01 li r3,1 ffc05184: 93 d8 00 00 stw r30,0(r24) return 1; } ffc05188: 83 01 00 08 lwz r24,8(r1) ffc0518c: 83 41 00 10 lwz r26,16(r1) ffc05190: 83 61 00 14 lwz r27,20(r1) ffc05194: 83 81 00 18 lwz r28,24(r1) ffc05198: 83 a1 00 1c lwz r29,28(r1) ffc0519c: 83 c1 00 20 lwz r30,32(r1) ffc051a0: 83 e1 00 24 lwz r31,36(r1) ffc051a4: 38 21 00 28 addi r1,r1,40 ffc051a8: 4e 80 00 20 blr sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) ffc051ac: 7d 20 e0 50 subf r9,r0,r28 <== NOT EXECUTED ffc051b0: 7f 83 48 40 cmplw cr7,r3,r9 <== NOT EXECUTED ffc051b4: 40 9d ff 88 ble+ cr7,ffc0513c <== NOT EXECUTED } if (sign == 0) return 0; *val = i * sign; return 1; } ffc051b8: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; return 1; ffc051bc: 38 60 00 00 li r3,0 <== NOT EXECUTED } ffc051c0: 83 01 00 08 lwz r24,8(r1) <== NOT EXECUTED ffc051c4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc051c8: 83 21 00 0c lwz r25,12(r1) <== NOT EXECUTED ffc051cc: 83 41 00 10 lwz r26,16(r1) <== NOT EXECUTED ffc051d0: 83 61 00 14 lwz r27,20(r1) <== NOT EXECUTED ffc051d4: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc051d8: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc051dc: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc051e0: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc051e4: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc051e8: 4e 80 00 20 blr <== NOT EXECUTED if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; ffc051ec: 3b 9c 00 01 addi r28,r28,1 <== NOT EXECUTED ffc051f0: 3b a0 ff ff li r29,-1 <== NOT EXECUTED continue; ffc051f4: 4b ff fe d4 b ffc050c8 <== NOT EXECUTED =============================================================================== ffc051f8 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { ffc051f8: 94 21 ff e0 stwu r1,-32(r1) ffc051fc: 7c 08 02 a6 mflr r0 ffc05200: 90 01 00 24 stw r0,36(r1) int c; *name = *bufp; ffc05204: 80 05 00 00 lwz r0,0(r5) /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { ffc05208: 93 81 00 10 stw r28,16(r1) int c; *name = *bufp; for (;;) { c = getc(fp); ffc0520c: 3f 80 00 00 lis r28,0 ffc05210: 3b 9c 26 e4 addi r28,r28,9956 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { ffc05214: 93 61 00 0c stw r27,12(r1) ffc05218: 7c fb 3b 78 mr r27,r7 ffc0521c: 93 a1 00 14 stw r29,20(r1) ffc05220: 7c dd 33 78 mr r29,r6 ffc05224: 93 c1 00 18 stw r30,24(r1) ffc05228: 7c be 2b 78 mr r30,r5 ffc0522c: 93 e1 00 1c stw r31,28(r1) ffc05230: 7c 7f 1b 78 mr r31,r3 int c; *name = *bufp; ffc05234: 90 04 00 00 stw r0,0(r4) ffc05238: 48 00 00 58 b ffc05290 for (;;) { c = getc(fp); ffc0523c: 81 3f 00 00 lwz r9,0(r31) ffc05240: 88 69 00 00 lbz r3,0(r9) ffc05244: 38 09 00 01 addi r0,r9,1 ffc05248: 90 1f 00 00 stw r0,0(r31) if (c == ':') { ffc0524c: 2f 83 00 3a cmpwi cr7,r3,58 if (nlFlag) return 0; break; } if (c == '\n') { ffc05250: 2f 03 00 0a cmpwi cr6,r3,10 if (!nlFlag) return 0; break; } if (c == EOF) ffc05254: 2c 83 ff ff cmpwi cr1,r3,-1 int c; *name = *bufp; for (;;) { c = getc(fp); if (c == ':') { ffc05258: 41 9e 00 68 beq- cr7,ffc052c0 if (nlFlag) return 0; break; } if (c == '\n') { ffc0525c: 41 9a 00 b8 beq- cr6,ffc05314 if (!nlFlag) return 0; break; } if (c == EOF) ffc05260: 41 86 00 bc beq- cr1,ffc0531c <== NEVER TAKEN return 0; if (*nleft < 2) ffc05264: 80 1d 00 00 lwz r0,0(r29) ffc05268: 2b 80 00 01 cmplwi cr7,r0,1 ffc0526c: 40 9d 00 b0 ble- cr7,ffc0531c <== NEVER TAKEN return 0; **bufp = c; ffc05270: 81 3e 00 00 lwz r9,0(r30) ffc05274: 98 69 00 00 stb r3,0(r9) ++(*bufp); ffc05278: 81 3e 00 00 lwz r9,0(r30) --(*nleft); ffc0527c: 81 7d 00 00 lwz r11,0(r29) if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); ffc05280: 39 29 00 01 addi r9,r9,1 --(*nleft); ffc05284: 38 0b ff ff addi r0,r11,-1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); ffc05288: 91 3e 00 00 stw r9,0(r30) --(*nleft); ffc0528c: 90 1d 00 00 stw r0,0(r29) { int c; *name = *bufp; for (;;) { c = getc(fp); ffc05290: 81 3f 00 04 lwz r9,4(r31) ffc05294: 38 09 ff ff addi r0,r9,-1 ffc05298: 2f 80 00 00 cmpwi cr7,r0,0 ffc0529c: 90 1f 00 04 stw r0,4(r31) ffc052a0: 40 9c ff 9c bge+ cr7,ffc0523c ffc052a4: 80 7c 00 00 lwz r3,0(r28) ffc052a8: 7f e4 fb 78 mr r4,r31 ffc052ac: 48 01 28 05 bl ffc17ab0 <__srget_r> if (c == ':') { ffc052b0: 2f 83 00 3a cmpwi cr7,r3,58 if (nlFlag) return 0; break; } if (c == '\n') { ffc052b4: 2f 03 00 0a cmpwi cr6,r3,10 if (!nlFlag) return 0; break; } if (c == EOF) ffc052b8: 2c 83 ff ff cmpwi cr1,r3,-1 int c; *name = *bufp; for (;;) { c = getc(fp); if (c == ':') { ffc052bc: 40 9e ff a0 bne+ cr7,ffc0525c <== ALWAYS TAKEN if (nlFlag) ffc052c0: 2f 9b 00 00 cmpwi cr7,r27,0 ffc052c4: 40 9e 00 58 bne- cr7,ffc0531c <== NEVER TAKEN return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ffc052c8: 81 3e 00 00 lwz r9,0(r30) ffc052cc: 38 00 00 00 li r0,0 ++(*bufp); --(*nleft); ffc052d0: 38 60 00 01 li r3,1 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ffc052d4: 98 09 00 00 stb r0,0(r9) ++(*bufp); --(*nleft); ffc052d8: 81 7d 00 00 lwz r11,0(r29) **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); ffc052dc: 81 3e 00 00 lwz r9,0(r30) --(*nleft); ffc052e0: 38 0b ff ff addi r0,r11,-1 return 1; } ffc052e4: 83 61 00 0c lwz r27,12(r1) ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); ffc052e8: 90 1d 00 00 stw r0,0(r29) **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); ffc052ec: 39 29 00 01 addi r9,r9,1 --(*nleft); return 1; } ffc052f0: 80 01 00 24 lwz r0,36(r1) **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); ffc052f4: 91 3e 00 00 stw r9,0(r30) --(*nleft); return 1; } ffc052f8: 7c 08 03 a6 mtlr r0 ffc052fc: 83 81 00 10 lwz r28,16(r1) ffc05300: 83 a1 00 14 lwz r29,20(r1) ffc05304: 83 c1 00 18 lwz r30,24(r1) ffc05308: 83 e1 00 1c lwz r31,28(r1) ffc0530c: 38 21 00 20 addi r1,r1,32 ffc05310: 4e 80 00 20 blr if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) ffc05314: 2f 9b 00 00 cmpwi cr7,r27,0 ffc05318: 40 9e ff b0 bne+ cr7,ffc052c8 <== ALWAYS TAKEN } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; } ffc0531c: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; ffc05320: 38 60 00 00 li r3,0 <== NOT EXECUTED } ffc05324: 83 61 00 0c lwz r27,12(r1) <== NOT EXECUTED ffc05328: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0532c: 83 81 00 10 lwz r28,16(r1) <== NOT EXECUTED ffc05330: 83 a1 00 14 lwz r29,20(r1) <== NOT EXECUTED ffc05334: 83 c1 00 18 lwz r30,24(r1) <== NOT EXECUTED ffc05338: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc0533c: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc05340: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc05344 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc05344: 94 21 ff d0 stwu r1,-48(r1) ffc05348: 7c 08 02 a6 mflr r0 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc0534c: 38 e0 00 00 li r7,0 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc05350: 93 c1 00 28 stw r30,40(r1) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc05354: 3b c1 00 18 addi r30,r1,24 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc05358: 93 e1 00 2c stw r31,44(r1) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc0535c: 3b e1 00 1c addi r31,r1,28 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc05360: 90 a1 00 18 stw r5,24(r1) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc05364: 7f c5 f3 78 mr r5,r30 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc05368: 90 c1 00 1c stw r6,28(r1) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc0536c: 7f e6 fb 78 mr r6,r31 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc05370: 93 81 00 20 stw r28,32(r1) ffc05374: 7c 9c 23 78 mr r28,r4 ffc05378: 93 a1 00 24 stw r29,36(r1) ffc0537c: 7c 7d 1b 78 mr r29,r3 ffc05380: 90 01 00 34 stw r0,52(r1) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc05384: 4b ff fe 75 bl ffc051f8 ffc05388: 2f 83 00 00 cmpwi cr7,r3,0 ffc0538c: 40 9e 00 28 bne- cr7,ffc053b4 <== ALWAYS TAKEN *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; ffc05390: 38 60 00 00 li r3,0 <== NOT EXECUTED } ffc05394: 80 01 00 34 lwz r0,52(r1) ffc05398: 83 81 00 20 lwz r28,32(r1) ffc0539c: 7c 08 03 a6 mtlr r0 ffc053a0: 83 a1 00 24 lwz r29,36(r1) ffc053a4: 83 c1 00 28 lwz r30,40(r1) ffc053a8: 83 e1 00 2c lwz r31,44(r1) ffc053ac: 38 21 00 30 addi r1,r1,48 ffc053b0: 4e 80 00 20 blr int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) ffc053b4: 7f a3 eb 78 mr r3,r29 ffc053b8: 38 9c 00 04 addi r4,r28,4 ffc053bc: 7f c5 f3 78 mr r5,r30 ffc053c0: 7f e6 fb 78 mr r6,r31 ffc053c4: 38 e0 00 00 li r7,0 ffc053c8: 4b ff fe 31 bl ffc051f8 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc053cc: 2f 83 00 00 cmpwi cr7,r3,0 ffc053d0: 41 9e ff c0 beq+ cr7,ffc05390 <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) ffc053d4: 7f a3 eb 78 mr r3,r29 ffc053d8: 38 81 00 08 addi r4,r1,8 ffc053dc: 4b ff fc 91 bl ffc0506c { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc053e0: 2f 83 00 00 cmpwi cr7,r3,0 ffc053e4: 41 9e ff ac beq+ cr7,ffc05390 <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) ffc053e8: 7f a3 eb 78 mr r3,r29 ffc053ec: 7f c5 f3 78 mr r5,r30 ffc053f0: 7f e6 fb 78 mr r6,r31 ffc053f4: 38 81 00 0c addi r4,r1,12 ffc053f8: 38 e0 00 01 li r7,1 ffc053fc: 4b ff fd fd bl ffc051f8 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc05400: 2f 83 00 00 cmpwi cr7,r3,0 ffc05404: 41 be ff 8c beq- cr7,ffc05390 <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; ffc05408: 80 01 00 08 lwz r0,8(r1) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc0540c: 39 20 00 01 li r9,1 ffc05410: 81 41 00 0c lwz r10,12(r1) ffc05414: 39 00 00 17 li r8,23 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; ffc05418: b0 1c 00 08 sth r0,8(r28) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc0541c: 7d 4b 53 78 mr r11,r10 ffc05420: 88 0a 00 00 lbz r0,0(r10) ffc05424: 2f 80 00 00 cmpwi cr7,r0,0 ffc05428: 41 9e 00 28 beq- cr7,ffc05450 <== NEVER TAKEN if(*cp == ',') memcount++; ffc0542c: 68 08 00 2c xori r8,r0,44 ffc05430: 21 08 00 00 subfic r8,r8,0 ffc05434: 7d 09 01 94 addze r8,r9 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc05438: 8c 0b 00 01 lbzu r0,1(r11) ffc0543c: 2f 80 00 00 cmpwi cr7,r0,0 if(*cp == ',') memcount++; ffc05440: 7d 09 43 78 mr r9,r8 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc05444: 40 9e ff e8 bne+ cr7,ffc0542c ffc05448: 55 09 10 3a rlwinm r9,r8,2,0,29 ffc0544c: 39 09 00 13 addi r8,r9,19 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) ffc05450: 80 01 00 1c lwz r0,28(r1) ffc05454: 7f 80 40 40 cmplw cr7,r0,r8 ffc05458: 41 bc ff 38 blt- cr7,ffc05390 <== NEVER TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); ffc0545c: 81 21 00 18 lwz r9,24(r1) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc05460: 39 60 00 01 li r11,1 /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); ffc05464: 39 29 00 0f addi r9,r9,15 ffc05468: 55 29 00 36 rlwinm r9,r9,0,0,27 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; ffc0546c: 91 49 00 00 stw r10,0(r9) for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc05470: 39 40 00 04 li r10,4 /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); ffc05474: 91 3c 00 0c stw r9,12(r28) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc05478: 81 21 00 0c lwz r9,12(r1) ffc0547c: 88 09 00 00 lbz r0,0(r9) ffc05480: 39 29 00 01 addi r9,r9,1 ffc05484: 2f 80 00 00 cmpwi cr7,r0,0 ffc05488: 41 9e 00 40 beq- cr7,ffc054c8 <== NEVER TAKEN if(*cp == ',') { *cp = '\0'; ffc0548c: 39 00 00 00 li r8,0 ffc05490: 48 00 00 14 b ffc054a4 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc05494: 88 09 00 00 lbz r0,0(r9) ffc05498: 39 29 00 01 addi r9,r9,1 ffc0549c: 2f 80 00 00 cmpwi cr7,r0,0 ffc054a0: 41 9e 00 24 beq- cr7,ffc054c4 if(*cp == ',') { ffc054a4: 2f 80 00 2c cmpwi cr7,r0,44 ffc054a8: 40 9e ff ec bne+ cr7,ffc05494 <== ALWAYS TAKEN *cp = '\0'; ffc054ac: 99 09 ff ff stb r8,-1(r9) <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; ffc054b0: 55 60 10 3a rlwinm r0,r11,2,0,29 <== NOT EXECUTED ffc054b4: 39 6b 00 01 addi r11,r11,1 <== NOT EXECUTED ffc054b8: 81 5c 00 0c lwz r10,12(r28) <== NOT EXECUTED ffc054bc: 7d 2a 01 2e stwx r9,r10,r0 <== NOT EXECUTED ffc054c0: 4b ff ff d4 b ffc05494 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc054c4: 55 6a 10 3a rlwinm r10,r11,2,0,29 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; ffc054c8: 81 3c 00 0c lwz r9,12(r28) ffc054cc: 38 00 00 00 li r0,0 ffc054d0: 38 60 00 01 li r3,1 ffc054d4: 7c 09 51 2e stwx r0,r9,r10 return 1; ffc054d8: 4b ff fe bc b ffc05394 =============================================================================== ffc0554c : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc0554c: 94 21 ff d0 stwu r1,-48(r1) ffc05550: 7c 08 02 a6 mflr r0 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc05554: 38 e0 00 00 li r7,0 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc05558: 93 c1 00 28 stw r30,40(r1) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc0555c: 3b c1 00 18 addi r30,r1,24 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc05560: 93 e1 00 2c stw r31,44(r1) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc05564: 3b e1 00 1c addi r31,r1,28 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc05568: 90 a1 00 18 stw r5,24(r1) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc0556c: 7f c5 f3 78 mr r5,r30 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc05570: 90 c1 00 1c stw r6,28(r1) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc05574: 7f e6 fb 78 mr r6,r31 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc05578: 93 81 00 20 stw r28,32(r1) ffc0557c: 7c 9c 23 78 mr r28,r4 ffc05580: 93 a1 00 24 stw r29,36(r1) ffc05584: 7c 7d 1b 78 mr r29,r3 ffc05588: 90 01 00 34 stw r0,52(r1) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc0558c: 4b ff fc 6d bl ffc051f8 ffc05590: 2f 83 00 00 cmpwi cr7,r3,0 ffc05594: 40 9e 00 28 bne- cr7,ffc055bc <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; ffc05598: 38 60 00 00 li r3,0 <== NOT EXECUTED } ffc0559c: 80 01 00 34 lwz r0,52(r1) ffc055a0: 83 81 00 20 lwz r28,32(r1) ffc055a4: 7c 08 03 a6 mtlr r0 ffc055a8: 83 a1 00 24 lwz r29,36(r1) ffc055ac: 83 c1 00 28 lwz r30,40(r1) ffc055b0: 83 e1 00 2c lwz r31,44(r1) ffc055b4: 38 21 00 30 addi r1,r1,48 ffc055b8: 4e 80 00 20 blr ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) ffc055bc: 7f a3 eb 78 mr r3,r29 ffc055c0: 38 9c 00 04 addi r4,r28,4 ffc055c4: 7f c5 f3 78 mr r5,r30 ffc055c8: 7f e6 fb 78 mr r6,r31 ffc055cc: 38 e0 00 00 li r7,0 ffc055d0: 4b ff fc 29 bl ffc051f8 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc055d4: 2f 83 00 00 cmpwi cr7,r3,0 ffc055d8: 41 9e ff c0 beq+ cr7,ffc05598 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) ffc055dc: 7f a3 eb 78 mr r3,r29 ffc055e0: 38 81 00 08 addi r4,r1,8 ffc055e4: 4b ff fa 89 bl ffc0506c size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc055e8: 2f 83 00 00 cmpwi cr7,r3,0 ffc055ec: 41 9e ff ac beq+ cr7,ffc05598 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) ffc055f0: 7f a3 eb 78 mr r3,r29 ffc055f4: 38 81 00 0c addi r4,r1,12 ffc055f8: 4b ff fa 75 bl ffc0506c size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc055fc: 2f 83 00 00 cmpwi cr7,r3,0 ffc05600: 41 9e ff 98 beq+ cr7,ffc05598 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) ffc05604: 7f a3 eb 78 mr r3,r29 ffc05608: 38 9c 00 0c addi r4,r28,12 ffc0560c: 7f c5 f3 78 mr r5,r30 ffc05610: 7f e6 fb 78 mr r6,r31 ffc05614: 38 e0 00 00 li r7,0 ffc05618: 4b ff fb e1 bl ffc051f8 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc0561c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05620: 41 9e ff 78 beq+ cr7,ffc05598 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) ffc05624: 7f a3 eb 78 mr r3,r29 ffc05628: 38 9c 00 10 addi r4,r28,16 ffc0562c: 7f c5 f3 78 mr r5,r30 ffc05630: 7f e6 fb 78 mr r6,r31 ffc05634: 38 e0 00 00 li r7,0 ffc05638: 4b ff fb c1 bl ffc051f8 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc0563c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05640: 41 9e ff 58 beq+ cr7,ffc05598 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !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) ffc05644: 7f a3 eb 78 mr r3,r29 ffc05648: 38 9c 00 14 addi r4,r28,20 ffc0564c: 7f c5 f3 78 mr r5,r30 ffc05650: 7f e6 fb 78 mr r6,r31 ffc05654: 38 e0 00 00 li r7,0 ffc05658: 4b ff fb a1 bl ffc051f8 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc0565c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05660: 41 9e ff 38 beq+ cr7,ffc05598 <== NEVER TAKEN || !scanInt(fp, &pwuid) || !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)) ffc05664: 7f a3 eb 78 mr r3,r29 ffc05668: 7f c5 f3 78 mr r5,r30 ffc0566c: 7f e6 fb 78 mr r6,r31 ffc05670: 38 9c 00 18 addi r4,r28,24 ffc05674: 38 e0 00 01 li r7,1 ffc05678: 4b ff fb 81 bl ffc051f8 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc0567c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05680: 41 be ff 18 beq- cr7,ffc05598 <== NEVER TAKEN || !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; ffc05684: 80 01 00 08 lwz r0,8(r1) pwd->pw_gid = pwgid; ffc05688: 38 60 00 01 li r3,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; ffc0568c: b0 1c 00 08 sth r0,8(r28) pwd->pw_gid = pwgid; ffc05690: 80 01 00 0c lwz r0,12(r1) ffc05694: b0 1c 00 0a sth r0,10(r28) return 1; ffc05698: 4b ff ff 04 b ffc0559c =============================================================================== ffc09468 : int sched_get_priority_max( int policy ) { switch ( policy ) { ffc09468: 2b 83 00 04 cmplwi cr7,r3,4 #include int sched_get_priority_max( int policy ) { ffc0946c: 94 21 ff f8 stwu r1,-8(r1) ffc09470: 7c 08 02 a6 mflr r0 ffc09474: 90 01 00 0c stw r0,12(r1) switch ( policy ) { ffc09478: 40 9d 00 24 ble- cr7,ffc0949c case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc0947c: 48 00 b1 a1 bl ffc1461c <__errno> ffc09480: 38 00 00 16 li r0,22 ffc09484: 90 03 00 00 stw r0,0(r3) ffc09488: 38 60 ff ff li r3,-1 } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } ffc0948c: 80 01 00 0c lwz r0,12(r1) ffc09490: 38 21 00 08 addi r1,r1,8 ffc09494: 7c 08 03 a6 mtlr r0 ffc09498: 4e 80 00 20 blr int sched_get_priority_max( int policy ) { switch ( policy ) { ffc0949c: 38 00 00 01 li r0,1 ffc094a0: 7c 03 18 30 slw r3,r0,r3 ffc094a4: 70 60 00 17 andi. r0,r3,23 ffc094a8: 41 a2 ff d4 beq- ffc0947c <== NEVER TAKEN default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } ffc094ac: 80 01 00 0c lwz r0,12(r1) default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; ffc094b0: 3d 20 00 00 lis r9,0 ffc094b4: 88 69 26 cc lbz r3,9932(r9) } ffc094b8: 38 21 00 08 addi r1,r1,8 ffc094bc: 7c 08 03 a6 mtlr r0 default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; ffc094c0: 38 63 ff ff addi r3,r3,-1 } ffc094c4: 4e 80 00 20 blr =============================================================================== ffc094c8 : int sched_get_priority_min( int policy ) { switch ( policy ) { ffc094c8: 2b 83 00 04 cmplwi cr7,r3,4 #include int sched_get_priority_min( int policy ) { ffc094cc: 94 21 ff f8 stwu r1,-8(r1) ffc094d0: 7c 08 02 a6 mflr r0 ffc094d4: 90 01 00 0c stw r0,12(r1) switch ( policy ) { ffc094d8: 40 9d 00 24 ble- cr7,ffc094fc case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc094dc: 48 00 b1 41 bl ffc1461c <__errno> ffc094e0: 38 00 00 16 li r0,22 ffc094e4: 90 03 00 00 stw r0,0(r3) ffc094e8: 38 60 ff ff li r3,-1 } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } ffc094ec: 80 01 00 0c lwz r0,12(r1) ffc094f0: 38 21 00 08 addi r1,r1,8 ffc094f4: 7c 08 03 a6 mtlr r0 ffc094f8: 4e 80 00 20 blr int sched_get_priority_min( int policy ) { switch ( policy ) { ffc094fc: 38 00 00 01 li r0,1 ffc09500: 7c 03 18 30 slw r3,r0,r3 ffc09504: 70 60 00 17 andi. r0,r3,23 ffc09508: 38 60 00 01 li r3,1 ffc0950c: 41 a2 ff d0 beq- ffc094dc <== NEVER TAKEN default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } ffc09510: 80 01 00 0c lwz r0,12(r1) ffc09514: 38 21 00 08 addi r1,r1,8 ffc09518: 7c 08 03 a6 mtlr r0 ffc0951c: 4e 80 00 20 blr =============================================================================== ffc09520 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { ffc09520: 94 21 ff e8 stwu r1,-24(r1) ffc09524: 7c 08 02 a6 mflr r0 ffc09528: 93 e1 00 14 stw r31,20(r1) /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) ffc0952c: 7c 7f 1b 79 mr. r31,r3 int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { ffc09530: 90 01 00 1c stw r0,28(r1) /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) ffc09534: 40 82 00 30 bne- ffc09564 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) ffc09538: 2f 84 00 00 cmpwi cr7,r4,0 ffc0953c: 41 9e 00 50 beq- cr7,ffc0958c rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); ffc09540: 3d 20 00 00 lis r9,0 ffc09544: 80 69 27 90 lwz r3,10128(r9) ffc09548: 48 00 46 cd bl ffc0dc14 <_Timespec_From_ticks> ffc0954c: 38 60 00 00 li r3,0 return 0; } ffc09550: 80 01 00 1c lwz r0,28(r1) ffc09554: 83 e1 00 14 lwz r31,20(r1) ffc09558: 38 21 00 18 addi r1,r1,24 ffc0955c: 7c 08 03 a6 mtlr r0 ffc09560: 4e 80 00 20 blr { /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) ffc09564: 90 81 00 08 stw r4,8(r1) ffc09568: 4b ff bc 49 bl ffc051b0 ffc0956c: 7f 83 f8 00 cmpw cr7,r3,r31 ffc09570: 80 81 00 08 lwz r4,8(r1) ffc09574: 41 9e ff c4 beq+ cr7,ffc09538 rtems_set_errno_and_return_minus_one( ESRCH ); ffc09578: 48 00 b0 a5 bl ffc1461c <__errno> ffc0957c: 38 00 00 03 li r0,3 ffc09580: 90 03 00 00 stw r0,0(r3) ffc09584: 38 60 ff ff li r3,-1 ffc09588: 4b ff ff c8 b ffc09550 if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc0958c: 48 00 b0 91 bl ffc1461c <__errno> ffc09590: 38 00 00 16 li r0,22 ffc09594: 90 03 00 00 stw r0,0(r3) ffc09598: 38 60 ff ff li r3,-1 ffc0959c: 4b ff ff b4 b ffc09550 =============================================================================== ffc0bb94 : rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0bb94: 3d 20 00 00 lis r9,0 int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { ffc0bb98: 94 21 ff b8 stwu r1,-72(r1) ffc0bb9c: 7c 08 02 a6 mflr r0 ffc0bba0: 81 69 27 90 lwz r11,10128(r9) ffc0bba4: 7d 80 00 26 mfcr r12 ffc0bba8: 93 c1 00 40 stw r30,64(r1) ffc0bbac: 7c 9e 23 78 mr r30,r4 ffc0bbb0: 39 6b 00 01 addi r11,r11,1 ffc0bbb4: 93 e1 00 44 stw r31,68(r1) ffc0bbb8: 7c 7f 1b 78 mr r31,r3 ffc0bbbc: 90 01 00 4c stw r0,76(r1) ffc0bbc0: 93 81 00 38 stw r28,56(r1) ffc0bbc4: 93 a1 00 3c stw r29,60(r1) ffc0bbc8: 91 81 00 34 stw r12,52(r1) ffc0bbcc: 90 a1 00 28 stw r5,40(r1) ffc0bbd0: 91 69 27 90 stw r11,10128(r9) ffc0bbd4: 90 c1 00 2c stw r6,44(r1) POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { ffc0bbd8: 54 80 bf fe rlwinm r0,r4,23,31,31 ffc0bbdc: 2e 00 00 00 cmpwi cr4,r0,0 ffc0bbe0: 40 92 00 c8 bne- cr4,ffc0bca8 ffc0bbe4: 3b a0 00 00 li r29,0 mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); ffc0bbe8: 7f e3 fb 78 mr r3,r31 ffc0bbec: 38 81 00 08 addi r4,r1,8 ffc0bbf0: 48 00 7b 8d bl ffc1377c <_POSIX_Semaphore_Name_to_id> * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "semaphore does not exist" * or some other miscellaneous error on the name. */ if ( status ) { ffc0bbf4: 7c 7c 1b 79 mr. r28,r3 ffc0bbf8: 41 82 00 48 beq- ffc0bc40 /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { ffc0bbfc: 2f 9c 00 02 cmpwi cr7,r28,2 ffc0bc00: 40 9e 00 08 bne- cr7,ffc0bc08 <== NEVER TAKEN ffc0bc04: 40 92 00 c4 bne- cr4,ffc0bcc8 _Thread_Enable_dispatch(); ffc0bc08: 48 00 36 21 bl ffc0f228 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); ffc0bc0c: 48 00 c2 dd bl ffc17ee8 <__errno> id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } ffc0bc10: 80 01 00 4c lwz r0,76(r1) ffc0bc14: 81 81 00 34 lwz r12,52(r1) ffc0bc18: 7c 08 03 a6 mtlr r0 * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); ffc0bc1c: 93 83 00 00 stw r28,0(r3) id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } ffc0bc20: 7d 80 81 20 mtcrf 8,r12 * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); ffc0bc24: 38 60 ff ff li r3,-1 id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } ffc0bc28: 83 81 00 38 lwz r28,56(r1) ffc0bc2c: 83 a1 00 3c lwz r29,60(r1) ffc0bc30: 83 c1 00 40 lwz r30,64(r1) ffc0bc34: 83 e1 00 44 lwz r31,68(r1) ffc0bc38: 38 21 00 48 addi r1,r1,72 ffc0bc3c: 4e 80 00 20 blr /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { ffc0bc40: 73 de 0a 00 andi. r30,r30,2560 ffc0bc44: 2f 9e 0a 00 cmpwi cr7,r30,2560 ffc0bc48: 41 9e 00 ac beq- cr7,ffc0bcf4 ffc0bc4c: 80 81 00 08 lwz r4,8(r1) ffc0bc50: 3c 60 00 00 lis r3,0 ffc0bc54: 38 a1 00 10 addi r5,r1,16 ffc0bc58: 38 63 30 d8 addi r3,r3,12504 ffc0bc5c: 48 00 29 81 bl ffc0e5dc <_Objects_Get> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; ffc0bc60: 81 23 00 18 lwz r9,24(r3) if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); ffc0bc64: 90 61 00 0c stw r3,12(r1) the_semaphore->open_count += 1; ffc0bc68: 38 09 00 01 addi r0,r9,1 ffc0bc6c: 90 03 00 18 stw r0,24(r3) _Thread_Enable_dispatch(); ffc0bc70: 48 00 35 b9 bl ffc0f228 <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); ffc0bc74: 48 00 35 b5 bl ffc0f228 <_Thread_Enable_dispatch> return_id: #if defined(RTEMS_USE_16_BIT_OBJECT) the_semaphore->Semaphore_id = the_semaphore->Object.id; id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; ffc0bc78: 80 61 00 0c lwz r3,12(r1) ffc0bc7c: 38 63 00 08 addi r3,r3,8 #endif return id; } ffc0bc80: 80 01 00 4c lwz r0,76(r1) ffc0bc84: 81 81 00 34 lwz r12,52(r1) ffc0bc88: 7c 08 03 a6 mtlr r0 ffc0bc8c: 83 81 00 38 lwz r28,56(r1) ffc0bc90: 83 a1 00 3c lwz r29,60(r1) ffc0bc94: 7d 80 81 20 mtcrf 8,r12 ffc0bc98: 83 c1 00 40 lwz r30,64(r1) ffc0bc9c: 83 e1 00 44 lwz r31,68(r1) ffc0bca0: 38 21 00 48 addi r1,r1,72 ffc0bca4: 4e 80 00 20 blr Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); ffc0bca8: 38 01 00 50 addi r0,r1,80 mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); ffc0bcac: 83 a1 00 2c lwz r29,44(r1) Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); ffc0bcb0: 90 01 00 18 stw r0,24(r1) ffc0bcb4: 38 01 00 20 addi r0,r1,32 ffc0bcb8: 90 01 00 1c stw r0,28(r1) mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); ffc0bcbc: 38 00 00 04 li r0,4 ffc0bcc0: 98 01 00 14 stb r0,20(r1) ffc0bcc4: 4b ff ff 24 b ffc0bbe8 /* * At this point, the semaphore does not exist and everything has been * checked. We should go ahead and create a semaphore. */ status =_POSIX_Semaphore_Create_support( ffc0bcc8: 7f a5 eb 78 mr r5,r29 ffc0bccc: 7f e3 fb 78 mr r3,r31 ffc0bcd0: 38 80 00 00 li r4,0 ffc0bcd4: 38 c1 00 0c addi r6,r1,12 ffc0bcd8: 48 00 78 bd bl ffc13594 <_POSIX_Semaphore_Create_support> ffc0bcdc: 7c 7f 1b 78 mr r31,r3 /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); ffc0bce0: 48 00 35 49 bl ffc0f228 <_Thread_Enable_dispatch> if ( status == -1 ) ffc0bce4: 2f 9f ff ff cmpwi cr7,r31,-1 ffc0bce8: 38 60 ff ff li r3,-1 ffc0bcec: 40 9e ff 8c bne+ cr7,ffc0bc78 ffc0bcf0: 4b ff ff 90 b ffc0bc80 /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); ffc0bcf4: 48 00 35 35 bl ffc0f228 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); ffc0bcf8: 48 00 c1 f1 bl ffc17ee8 <__errno> ffc0bcfc: 38 00 00 11 li r0,17 ffc0bd00: 90 03 00 00 stw r0,0(r3) ffc0bd04: 38 60 ff ff li r3,-1 ffc0bd08: 4b ff ff 78 b ffc0bc80 =============================================================================== ffc0bd80 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { ffc0bd80: 94 21 ff e0 stwu r1,-32(r1) ffc0bd84: 7c 08 02 a6 mflr r0 ffc0bd88: 93 e1 00 1c stw r31,28(r1) ffc0bd8c: 7c 7f 1b 78 mr r31,r3 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); ffc0bd90: 7c 83 23 78 mr r3,r4 ffc0bd94: 38 81 00 08 addi r4,r1,8 int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { ffc0bd98: 90 01 00 24 stw r0,36(r1) * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); ffc0bd9c: 48 00 6c 39 bl ffc129d4 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) ffc0bda0: 2f 83 00 03 cmpwi cr7,r3,3 ffc0bda4: 41 9e 00 28 beq- cr7,ffc0bdcc <== ALWAYS TAKEN do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); ffc0bda8: 80 a1 00 08 lwz r5,8(r1) <== NOT EXECUTED ffc0bdac: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0bdb0: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc0bdb4: 48 00 7a 8d bl ffc13840 <_POSIX_Semaphore_Wait_support><== NOT EXECUTED break; } } return lock_status; } ffc0bdb8: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED ffc0bdbc: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc0bdc0: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc0bdc4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0bdc8: 4e 80 00 20 blr <== NOT EXECUTED */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); ffc0bdcc: 80 a1 00 08 lwz r5,8(r1) ffc0bdd0: 7f e3 fb 78 mr r3,r31 ffc0bdd4: 38 80 00 01 li r4,1 ffc0bdd8: 48 00 7a 69 bl ffc13840 <_POSIX_Semaphore_Wait_support> break; } } return lock_status; } ffc0bddc: 80 01 00 24 lwz r0,36(r1) ffc0bde0: 83 e1 00 1c lwz r31,28(r1) ffc0bde4: 38 21 00 20 addi r1,r1,32 ffc0bde8: 7c 08 03 a6 mtlr r0 ffc0bdec: 4e 80 00 20 blr =============================================================================== ffc05838 : return NULL; return &grent; } void setgrent(void) { ffc05838: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc0583c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc05840: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED init_etc_passwd_group(); if (group_fp != NULL) ffc05844: 3f e0 00 00 lis r31,0 <== NOT EXECUTED return NULL; return &grent; } void setgrent(void) { ffc05848: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED init_etc_passwd_group(); ffc0584c: 4b ff fe c1 bl ffc0570c <== NOT EXECUTED if (group_fp != NULL) ffc05850: 80 7f 28 8c lwz r3,10380(r31) <== NOT EXECUTED ffc05854: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc05858: 41 9e 00 08 beq- cr7,ffc05860 <== NOT EXECUTED fclose(group_fp); ffc0585c: 48 01 09 29 bl ffc16184 <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); ffc05860: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc05864: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc05868: 38 63 3a 6c addi r3,r3,14956 <== NOT EXECUTED ffc0586c: 38 84 41 b4 addi r4,r4,16820 <== NOT EXECUTED ffc05870: 48 01 12 51 bl ffc16ac0 <== NOT EXECUTED } ffc05874: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED { init_etc_passwd_group(); if (group_fp != NULL) fclose(group_fp); group_fp = fopen("/etc/group", "r"); ffc05878: 90 7f 28 8c stw r3,10380(r31) <== NOT EXECUTED } ffc0587c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05880: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc05884: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc05888: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc05acc : return NULL; return &pwent; } void setpwent(void) { ffc05acc: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc05ad0: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc05ad4: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED init_etc_passwd_group(); if (passwd_fp != NULL) ffc05ad8: 3f e0 00 00 lis r31,0 <== NOT EXECUTED ffc05adc: 3b ff 28 8c addi r31,r31,10380 <== NOT EXECUTED return NULL; return &pwent; } void setpwent(void) { ffc05ae0: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED init_etc_passwd_group(); ffc05ae4: 4b ff fc 29 bl ffc0570c <== NOT EXECUTED if (passwd_fp != NULL) ffc05ae8: 80 7f 00 04 lwz r3,4(r31) <== NOT EXECUTED ffc05aec: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc05af0: 41 9e 00 08 beq- cr7,ffc05af8 <== NOT EXECUTED fclose(passwd_fp); ffc05af4: 48 01 06 91 bl ffc16184 <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); ffc05af8: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc05afc: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc05b00: 38 63 39 f4 addi r3,r3,14836 <== NOT EXECUTED ffc05b04: 38 84 41 b4 addi r4,r4,16820 <== NOT EXECUTED ffc05b08: 48 01 0f b9 bl ffc16ac0 <== NOT EXECUTED } ffc05b0c: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED { init_etc_passwd_group(); if (passwd_fp != NULL) fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); ffc05b10: 90 7f 00 04 stw r3,4(r31) <== NOT EXECUTED } ffc05b14: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05b18: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc05b1c: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc05b20: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc092f4 : struct sigaction *oact ) { ISR_Level level; if ( oact ) ffc092f4: 2c 05 00 00 cmpwi r5,0 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { ffc092f8: 94 21 ff e8 stwu r1,-24(r1) ffc092fc: 7c 08 02 a6 mflr r0 ffc09300: 93 c1 00 10 stw r30,16(r1) ffc09304: 7c 9e 23 78 mr r30,r4 ffc09308: 93 e1 00 14 stw r31,20(r1) ffc0930c: 7c 7f 1b 78 mr r31,r3 ffc09310: 90 01 00 1c stw r0,28(r1) ffc09314: 93 a1 00 0c stw r29,12(r1) ISR_Level level; if ( oact ) ffc09318: 41 82 00 2c beq- ffc09344 *oact = _POSIX_signals_Vectors[ sig ]; ffc0931c: 1c 03 00 0c mulli r0,r3,12 ffc09320: 3d 60 00 00 lis r11,0 ffc09324: 39 6b 31 b0 addi r11,r11,12720 ffc09328: 7d 2b 02 14 add r9,r11,r0 ffc0932c: 7d 6b 00 2e lwzx r11,r11,r0 ffc09330: 81 49 00 08 lwz r10,8(r9) ffc09334: 80 09 00 04 lwz r0,4(r9) ffc09338: 91 45 00 08 stw r10,8(r5) ffc0933c: 91 65 00 00 stw r11,0(r5) ffc09340: 90 05 00 04 stw r0,4(r5) if ( !sig ) ffc09344: 2f 9f 00 00 cmpwi cr7,r31,0 ffc09348: 41 9e 00 cc beq- cr7,ffc09414 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) ffc0934c: 38 1f ff ff addi r0,r31,-1 ffc09350: 2b 80 00 1f cmplwi cr7,r0,31 ffc09354: 41 9d 00 c0 bgt- cr7,ffc09414 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) ffc09358: 2f 9f 00 09 cmpwi cr7,r31,9 ffc0935c: 41 9e 00 b8 beq- cr7,ffc09414 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { ffc09360: 2f 9e 00 00 cmpwi cr7,r30,0 ffc09364: 38 60 00 00 li r3,0 ffc09368: 41 9e 00 58 beq- cr7,ffc093c0 <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0936c: 7f a0 00 a6 mfmsr r29 ffc09370: 7c 10 42 a6 mfsprg r0,0 ffc09374: 7f a0 00 78 andc r0,r29,r0 ffc09378: 7c 00 01 24 mtmsr r0 * Unless the user is installing the default signal actions, then * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { ffc0937c: 80 1e 00 08 lwz r0,8(r30) ffc09380: 2f 80 00 00 cmpwi cr7,r0,0 ffc09384: 41 9e 00 58 beq- cr7,ffc093dc _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); ffc09388: 7f e3 fb 78 mr r3,r31 ffc0938c: 48 00 71 95 bl ffc10520 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; ffc09390: 1f ff 00 0c mulli r31,r31,12 ffc09394: 81 5e 00 08 lwz r10,8(r30) ffc09398: 3d 60 00 00 lis r11,0 ffc0939c: 81 1e 00 00 lwz r8,0(r30) ffc093a0: 80 1e 00 04 lwz r0,4(r30) ffc093a4: 39 6b 31 b0 addi r11,r11,12720 ffc093a8: 7d 2b fa 14 add r9,r11,r31 ffc093ac: 7d 0b f9 2e stwx r8,r11,r31 ffc093b0: 91 49 00 08 stw r10,8(r9) ffc093b4: 90 09 00 04 stw r0,4(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc093b8: 7f a0 01 24 mtmsr r29 ffc093bc: 38 60 00 00 li r3,0 * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } ffc093c0: 80 01 00 1c lwz r0,28(r1) ffc093c4: 83 a1 00 0c lwz r29,12(r1) ffc093c8: 7c 08 03 a6 mtlr r0 ffc093cc: 83 c1 00 10 lwz r30,16(r1) ffc093d0: 83 e1 00 14 lwz r31,20(r1) ffc093d4: 38 21 00 18 addi r1,r1,24 ffc093d8: 4e 80 00 20 blr * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; ffc093dc: 1f ff 00 0c mulli r31,r31,12 ffc093e0: 3d 40 ff c2 lis r10,-62 ffc093e4: 39 4a 22 1c addi r10,r10,8732 ffc093e8: 7d 2a fa 14 add r9,r10,r31 ffc093ec: 7d 0a f8 2e lwzx r8,r10,r31 ffc093f0: 3d 60 00 00 lis r11,0 ffc093f4: 81 49 00 08 lwz r10,8(r9) ffc093f8: 39 6b 31 b0 addi r11,r11,12720 ffc093fc: 80 09 00 04 lwz r0,4(r9) ffc09400: 7d 2b fa 14 add r9,r11,r31 ffc09404: 7d 0b f9 2e stwx r8,r11,r31 ffc09408: 91 49 00 08 stw r10,8(r9) ffc0940c: 90 09 00 04 stw r0,4(r9) ffc09410: 4b ff ff a8 b ffc093b8 * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc09414: 48 00 b4 8d bl ffc148a0 <__errno> ffc09418: 38 00 00 16 li r0,22 ffc0941c: 90 03 00 00 stw r0,0(r3) ffc09420: 38 60 ff ff li r3,-1 ffc09424: 4b ff ff 9c b ffc093c0 =============================================================================== ffc0bf10 : #include int sigsuspend( const sigset_t *sigmask ) { ffc0bf10: 94 21 ff e0 stwu r1,-32(r1) ffc0bf14: 7c 08 02 a6 mflr r0 ffc0bf18: 7c 64 1b 78 mr r4,r3 ffc0bf1c: 93 e1 00 1c stw r31,28(r1) int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); ffc0bf20: 3b e1 00 08 addi r31,r1,8 ffc0bf24: 7f e5 fb 78 mr r5,r31 #include int sigsuspend( const sigset_t *sigmask ) { ffc0bf28: 93 c1 00 18 stw r30,24(r1) int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); ffc0bf2c: 38 60 00 01 li r3,1 (void) sigfillset( &all_signals ); ffc0bf30: 3b c1 00 0c addi r30,r1,12 #include int sigsuspend( const sigset_t *sigmask ) { ffc0bf34: 90 01 00 24 stw r0,36(r1) int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); ffc0bf38: 4b ff ff 99 bl ffc0bed0 (void) sigfillset( &all_signals ); ffc0bf3c: 7f c3 f3 78 mr r3,r30 ffc0bf40: 4b ff fe 89 bl ffc0bdc8 status = sigtimedwait( &all_signals, NULL, NULL ); ffc0bf44: 7f c3 f3 78 mr r3,r30 ffc0bf48: 38 80 00 00 li r4,0 ffc0bf4c: 38 a0 00 00 li r5,0 ffc0bf50: 48 00 00 a9 bl ffc0bff8 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); ffc0bf54: 7f e4 fb 78 mr r4,r31 status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); (void) sigfillset( &all_signals ); status = sigtimedwait( &all_signals, NULL, NULL ); ffc0bf58: 7c 7e 1b 78 mr r30,r3 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); ffc0bf5c: 38 a0 00 00 li r5,0 ffc0bf60: 38 60 00 00 li r3,0 ffc0bf64: 4b ff ff 6d bl ffc0bed0 /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) ffc0bf68: 2f 9e ff ff cmpwi cr7,r30,-1 ffc0bf6c: 40 9e 00 20 bne- cr7,ffc0bf8c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINTR ); return status; } ffc0bf70: 80 01 00 24 lwz r0,36(r1) ffc0bf74: 38 60 ff ff li r3,-1 ffc0bf78: 83 c1 00 18 lwz r30,24(r1) ffc0bf7c: 7c 08 03 a6 mtlr r0 ffc0bf80: 83 e1 00 1c lwz r31,28(r1) ffc0bf84: 38 21 00 20 addi r1,r1,32 ffc0bf88: 4e 80 00 20 blr /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) rtems_set_errno_and_return_minus_one( EINTR ); ffc0bf8c: 48 00 b1 c5 bl ffc17150 <__errno> ffc0bf90: 38 00 00 04 li r0,4 ffc0bf94: 90 03 00 00 stw r0,0(r3) ffc0bf98: 4b ff ff d8 b ffc0bf70 =============================================================================== ffc098f8 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { ffc098f8: 94 21 ff d0 stwu r1,-48(r1) ffc098fc: 7c 08 02 a6 mflr r0 ffc09900: 93 61 00 1c stw r27,28(r1) ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) ffc09904: 7c 7b 1b 79 mr. r27,r3 int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { ffc09908: 93 c1 00 28 stw r30,40(r1) ffc0990c: 7c 9e 23 78 mr r30,r4 ffc09910: 93 e1 00 2c stw r31,44(r1) ffc09914: 7c bf 2b 78 mr r31,r5 ffc09918: 90 01 00 34 stw r0,52(r1) ffc0991c: 93 81 00 20 stw r28,32(r1) ffc09920: 93 a1 00 24 stw r29,36(r1) ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) ffc09924: 41 82 01 f0 beq- ffc09b14 /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { ffc09928: 2f 85 00 00 cmpwi cr7,r5,0 ffc0992c: 41 9e 01 80 beq- cr7,ffc09aac if ( !_Timespec_Is_valid( timeout ) ) ffc09930: 7c a3 2b 78 mr r3,r5 ffc09934: 48 00 47 b9 bl ffc0e0ec <_Timespec_Is_valid> ffc09938: 2f 83 00 00 cmpwi cr7,r3,0 ffc0993c: 41 9e 01 d8 beq- cr7,ffc09b14 rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); ffc09940: 7f e3 fb 78 mr r3,r31 ffc09944: 48 00 48 39 bl ffc0e17c <_Timespec_To_ticks> if ( !interval ) ffc09948: 7c 64 1b 79 mr. r4,r3 ffc0994c: 41 82 01 c8 beq- ffc09b14 <== NEVER TAKEN /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; ffc09950: 2f 9e 00 00 cmpwi cr7,r30,0 ffc09954: 3b e1 00 08 addi r31,r1,8 ffc09958: 41 9e 00 08 beq- cr7,ffc09960 ffc0995c: 7f df f3 78 mr r31,r30 the_thread = _Thread_Executing; ffc09960: 3f c0 00 00 lis r30,0 ffc09964: 81 3e 28 40 lwz r9,10304(r30) api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc09968: 83 89 01 48 lwz r28,328(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0996c: 7f a0 00 a6 mfmsr r29 ffc09970: 7c 10 42 a6 mfsprg r0,0 ffc09974: 7f a0 00 78 andc r0,r29,r0 ffc09978: 7c 00 01 24 mtmsr r0 */ /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { ffc0997c: 80 1b 00 00 lwz r0,0(r27) ffc09980: 80 7c 00 d0 lwz r3,208(r28) ffc09984: 7c 0b 18 39 and. r11,r0,r3 ffc09988: 40 82 01 2c bne- ffc09ab4 return the_info->si_signo; } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { ffc0998c: 3d 60 00 00 lis r11,0 ffc09990: 80 6b 28 74 lwz r3,10356(r11) ffc09994: 7c 0b 18 39 and. r11,r0,r3 ffc09998: 40 82 00 b4 bne- ffc09a4c ffc0999c: 3d 60 00 00 lis r11,0 ffc099a0: 81 4b 28 00 lwz r10,10240(r11) ffc099a4: 38 0a 00 01 addi r0,r10,1 ffc099a8: 90 0b 28 00 stw r0,10240(r11) the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return signo; } the_info->si_signo = -1; ffc099ac: 38 00 ff ff li r0,-1 ffc099b0: 90 1f 00 00 stw r0,0(r31) _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; the_thread->Wait.return_code = EINTR; ffc099b4: 38 00 00 04 li r0,4 the_thread->Wait.option = *set; the_thread->Wait.return_argument = the_info; ffc099b8: 93 e9 00 28 stw r31,40(r9) } the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; ffc099bc: 3d 60 00 00 lis r11,0 the_thread->Wait.return_code = EINTR; ffc099c0: 90 09 00 34 stw r0,52(r9) } the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; ffc099c4: 39 6b 33 3c addi r11,r11,13116 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; ffc099c8: 39 40 00 01 li r10,1 the_thread->Wait.return_code = EINTR; the_thread->Wait.option = *set; ffc099cc: 80 1b 00 00 lwz r0,0(r27) ffc099d0: 91 4b 00 30 stw r10,48(r11) ffc099d4: 90 09 00 30 stw r0,48(r9) } the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; ffc099d8: 91 69 00 44 stw r11,68(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc099dc: 7f a0 01 24 mtmsr r29 the_thread->Wait.return_code = EINTR; the_thread->Wait.option = *set; the_thread->Wait.return_argument = the_info; _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); ffc099e0: 3c a0 ff c1 lis r5,-63 ffc099e4: 3c 60 00 00 lis r3,0 ffc099e8: 38 a5 d9 d0 addi r5,r5,-9776 ffc099ec: 38 63 33 3c addi r3,r3,13116 ffc099f0: 48 00 3b 81 bl ffc0d570 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); ffc099f4: 48 00 34 f5 bl ffc0cee8 <_Thread_Enable_dispatch> /* * When the thread is set free by a signal, it is need to eliminate * the signal. */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); ffc099f8: 80 9f 00 00 lwz r4,0(r31) ffc099fc: 7f e5 fb 78 mr r5,r31 ffc09a00: 38 c0 00 00 li r6,0 ffc09a04: 38 e0 00 00 li r7,0 ffc09a08: 7f 83 e3 78 mr r3,r28 ffc09a0c: 48 00 74 45 bl ffc10e50 <_POSIX_signals_Clear_signals> errno = _Thread_Executing->Wait.return_code; ffc09a10: 48 00 b3 45 bl ffc14d54 <__errno> ffc09a14: 81 3e 28 40 lwz r9,10304(r30) ffc09a18: 80 09 00 34 lwz r0,52(r9) ffc09a1c: 90 03 00 00 stw r0,0(r3) return the_info->si_signo; ffc09a20: 83 df 00 00 lwz r30,0(r31) } ffc09a24: 80 01 00 34 lwz r0,52(r1) ffc09a28: 7f c3 f3 78 mr r3,r30 ffc09a2c: 83 61 00 1c lwz r27,28(r1) ffc09a30: 7c 08 03 a6 mtlr r0 ffc09a34: 83 81 00 20 lwz r28,32(r1) ffc09a38: 83 a1 00 24 lwz r29,36(r1) ffc09a3c: 83 c1 00 28 lwz r30,40(r1) ffc09a40: 83 e1 00 2c lwz r31,44(r1) ffc09a44: 38 21 00 30 addi r1,r1,48 ffc09a48: 4e 80 00 20 blr } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); ffc09a4c: 4b ff fe 51 bl ffc0989c <_POSIX_signals_Get_highest> _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); ffc09a50: 7f e5 fb 78 mr r5,r31 } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); ffc09a54: 7c 7e 1b 78 mr r30,r3 _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); ffc09a58: 7f c4 f3 78 mr r4,r30 ffc09a5c: 7f 83 e3 78 mr r3,r28 ffc09a60: 38 c0 00 01 li r6,1 ffc09a64: 38 e0 00 00 li r7,0 ffc09a68: 48 00 73 e9 bl ffc10e50 <_POSIX_signals_Clear_signals> ffc09a6c: 7f a0 01 24 mtmsr r29 _ISR_Enable( level ); the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; ffc09a70: 38 00 00 00 li r0,0 if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); _ISR_Enable( level ); the_info->si_signo = signo; ffc09a74: 93 df 00 00 stw r30,0(r31) */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } ffc09a78: 7f c3 f3 78 mr r3,r30 _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); _ISR_Enable( level ); the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; ffc09a7c: 90 1f 00 08 stw r0,8(r31) signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); _ISR_Enable( level ); the_info->si_signo = signo; the_info->si_code = SI_USER; ffc09a80: 38 00 00 01 li r0,1 ffc09a84: 90 1f 00 04 stw r0,4(r31) */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } ffc09a88: 80 01 00 34 lwz r0,52(r1) ffc09a8c: 83 61 00 1c lwz r27,28(r1) ffc09a90: 7c 08 03 a6 mtlr r0 ffc09a94: 83 81 00 20 lwz r28,32(r1) ffc09a98: 83 a1 00 24 lwz r29,36(r1) ffc09a9c: 83 c1 00 28 lwz r30,40(r1) ffc09aa0: 83 e1 00 2c lwz r31,44(r1) ffc09aa4: 38 21 00 30 addi r1,r1,48 ffc09aa8: 4e 80 00 20 blr rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc09aac: 38 80 00 00 li r4,0 ffc09ab0: 4b ff fe a0 b ffc09950 /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); ffc09ab4: 4b ff fd e9 bl ffc0989c <_POSIX_signals_Get_highest> _POSIX_signals_Clear_signals( ffc09ab8: 7f e5 fb 78 mr r5,r31 /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); ffc09abc: 90 7f 00 00 stw r3,0(r31) ffc09ac0: 7c 64 1b 78 mr r4,r3 _POSIX_signals_Clear_signals( ffc09ac4: 38 c0 00 00 li r6,0 ffc09ac8: 7f 83 e3 78 mr r3,r28 ffc09acc: 38 e0 00 00 li r7,0 ffc09ad0: 48 00 73 81 bl ffc10e50 <_POSIX_signals_Clear_signals> ffc09ad4: 7f a0 01 24 mtmsr r29 false, false ); _ISR_Enable( level ); the_info->si_code = SI_USER; ffc09ad8: 38 00 00 01 li r0,1 the_info->si_value.sival_int = 0; return the_info->si_signo; ffc09adc: 83 df 00 00 lwz r30,0(r31) false, false ); _ISR_Enable( level ); the_info->si_code = SI_USER; ffc09ae0: 90 1f 00 04 stw r0,4(r31) the_info->si_value.sival_int = 0; ffc09ae4: 38 00 00 00 li r0,0 */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } ffc09ae8: 7f c3 f3 78 mr r3,r30 false ); _ISR_Enable( level ); the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; ffc09aec: 90 1f 00 08 stw r0,8(r31) */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } ffc09af0: 80 01 00 34 lwz r0,52(r1) ffc09af4: 83 61 00 1c lwz r27,28(r1) ffc09af8: 7c 08 03 a6 mtlr r0 ffc09afc: 83 81 00 20 lwz r28,32(r1) ffc09b00: 83 a1 00 24 lwz r29,36(r1) ffc09b04: 83 c1 00 28 lwz r30,40(r1) ffc09b08: 83 e1 00 2c lwz r31,44(r1) ffc09b0c: 38 21 00 30 addi r1,r1,48 ffc09b10: 4e 80 00 20 blr rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc09b14: 48 00 b2 41 bl ffc14d54 <__errno> ffc09b18: 38 00 00 16 li r0,22 ffc09b1c: 90 03 00 00 stw r0,0(r3) ffc09b20: 3b c0 ff ff li r30,-1 ffc09b24: 4b ff ff 00 b ffc09a24 =============================================================================== ffc0c24c : int sigwait( const sigset_t *set, int *sig ) { ffc0c24c: 94 21 ff f0 stwu r1,-16(r1) ffc0c250: 7c 08 02 a6 mflr r0 int status; status = sigtimedwait( set, NULL, NULL ); ffc0c254: 38 a0 00 00 li r5,0 int sigwait( const sigset_t *set, int *sig ) { ffc0c258: 93 e1 00 0c stw r31,12(r1) ffc0c25c: 7c 9f 23 78 mr r31,r4 int status; status = sigtimedwait( set, NULL, NULL ); ffc0c260: 38 80 00 00 li r4,0 int sigwait( const sigset_t *set, int *sig ) { ffc0c264: 90 01 00 14 stw r0,20(r1) int status; status = sigtimedwait( set, NULL, NULL ); ffc0c268: 4b ff fd 91 bl ffc0bff8 if ( status != -1 ) { ffc0c26c: 2f 83 ff ff cmpwi cr7,r3,-1 int *sig ) { int status; status = sigtimedwait( set, NULL, NULL ); ffc0c270: 7c 60 1b 78 mr r0,r3 if ( status != -1 ) { ffc0c274: 41 9e 00 28 beq- cr7,ffc0c29c if ( sig ) ffc0c278: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0c27c: 38 60 00 00 li r3,0 ffc0c280: 41 9e 00 08 beq- cr7,ffc0c288 <== NEVER TAKEN *sig = status; ffc0c284: 90 1f 00 00 stw r0,0(r31) return 0; } return errno; } ffc0c288: 80 01 00 14 lwz r0,20(r1) ffc0c28c: 83 e1 00 0c lwz r31,12(r1) ffc0c290: 38 21 00 10 addi r1,r1,16 ffc0c294: 7c 08 03 a6 mtlr r0 ffc0c298: 4e 80 00 20 blr if ( sig ) *sig = status; return 0; } return errno; ffc0c29c: 48 00 ae b5 bl ffc17150 <__errno> } ffc0c2a0: 80 01 00 14 lwz r0,20(r1) if ( sig ) *sig = status; return 0; } return errno; ffc0c2a4: 80 63 00 00 lwz r3,0(r3) } ffc0c2a8: 7c 08 03 a6 mtlr r0 ffc0c2ac: 83 e1 00 0c lwz r31,12(r1) ffc0c2b0: 38 21 00 10 addi r1,r1,16 ffc0c2b4: 4e 80 00 20 blr =============================================================================== ffc06788 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { ffc06788: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc0678c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc06790: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { ffc06794: 80 04 00 3c lwz r0,60(r4) <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { ffc06798: 93 c1 00 08 stw r30,8(r1) <== NOT EXECUTED ffc0679c: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { ffc067a0: 70 09 0e 78 andi. r9,r0,3704 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { ffc067a4: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED ffc067a8: 7c 9f 23 78 mr r31,r4 <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { ffc067ac: 40 82 00 1c bne- ffc067c8 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } ffc067b0: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc067b4: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc067b8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc067bc: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc067c0: 38 21 00 10 addi r1,r1,16 <== 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); ffc067c4: 4b ff fd c4 b ffc06588 <== NOT EXECUTED /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc067c8: 80 64 00 18 lwz r3,24(r4) <== NOT EXECUTED ffc067cc: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc067d0: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc067d4: 48 00 1f 3d bl ffc08710 <== NOT EXECUTED i = iproc (c, tty); ffc067d8: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc067dc: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc067e0: 4b ff fd a9 bl ffc06588 <== NOT EXECUTED ffc067e4: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED rtems_semaphore_release (tty->osem); ffc067e8: 80 7f 00 18 lwz r3,24(r31) <== NOT EXECUTED ffc067ec: 48 00 20 85 bl ffc08870 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } ffc067f0: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc067f4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc067f8: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc067fc: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc06800: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc06804: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc06808: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc078c8 : int _STAT_NAME( const char *path, struct stat *buf ) { ffc078c8: 94 21 ff c8 stwu r1,-56(r1) ffc078cc: 7c 08 02 a6 mflr r0 ffc078d0: 93 c1 00 30 stw r30,48(r1) /* * Check to see if we were passed a valid pointer. */ if ( !buf ) ffc078d4: 7c 9e 23 79 mr. r30,r4 int _STAT_NAME( const char *path, struct stat *buf ) { ffc078d8: 93 a1 00 2c stw r29,44(r1) ffc078dc: 7c 7d 1b 78 mr r29,r3 ffc078e0: 90 01 00 3c stw r0,60(r1) ffc078e4: 93 e1 00 34 stw r31,52(r1) /* * Check to see if we were passed a valid pointer. */ if ( !buf ) ffc078e8: 41 82 00 b0 beq- ffc07998 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), ffc078ec: 48 01 12 91 bl ffc18b7c ffc078f0: 3b e1 00 08 addi r31,r1,8 ffc078f4: 7c 64 1b 78 mr r4,r3 ffc078f8: 38 a0 00 00 li r5,0 ffc078fc: 7f a3 eb 78 mr r3,r29 ffc07900: 7f e6 fb 78 mr r6,r31 ffc07904: 38 e0 00 01 li r7,1 ffc07908: 4b ff e0 5d bl ffc05964 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) ffc0790c: 3b a0 ff ff li r29,-1 ffc07910: 2f 83 00 00 cmpwi cr7,r3,0 ffc07914: 40 9e 00 64 bne- cr7,ffc07978 return -1; if ( !loc.handlers->fstat_h ){ ffc07918: 81 21 00 10 lwz r9,16(r1) ffc0791c: 80 09 00 18 lwz r0,24(r9) ffc07920: 2f 80 00 00 cmpwi cr7,r0,0 ffc07924: 41 9e 00 a4 beq- cr7,ffc079c8 <== NEVER TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); ffc07928: 38 80 00 00 li r4,0 ffc0792c: 38 a0 00 48 li r5,72 ffc07930: 7f c3 f3 78 mr r3,r30 ffc07934: 48 01 08 41 bl ffc18174 status = (*loc.handlers->fstat_h)( &loc, buf ); ffc07938: 81 21 00 10 lwz r9,16(r1) ffc0793c: 7f c4 f3 78 mr r4,r30 ffc07940: 80 09 00 18 lwz r0,24(r9) ffc07944: 7f e3 fb 78 mr r3,r31 ffc07948: 7c 09 03 a6 mtctr r0 ffc0794c: 4e 80 04 21 bctrl rtems_filesystem_freenode( &loc ); ffc07950: 81 21 00 14 lwz r9,20(r1) * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); ffc07954: 7c 7d 1b 78 mr r29,r3 rtems_filesystem_freenode( &loc ); ffc07958: 2f 89 00 00 cmpwi cr7,r9,0 ffc0795c: 41 9e 00 1c beq- cr7,ffc07978 <== NEVER TAKEN ffc07960: 80 09 00 1c lwz r0,28(r9) ffc07964: 2f 80 00 00 cmpwi cr7,r0,0 ffc07968: 41 9e 00 10 beq- cr7,ffc07978 <== NEVER TAKEN ffc0796c: 7f e3 fb 78 mr r3,r31 ffc07970: 7c 09 03 a6 mtctr r0 ffc07974: 4e 80 04 21 bctrl return status; } ffc07978: 80 01 00 3c lwz r0,60(r1) ffc0797c: 7f a3 eb 78 mr r3,r29 ffc07980: 83 c1 00 30 lwz r30,48(r1) ffc07984: 7c 08 03 a6 mtlr r0 ffc07988: 83 a1 00 2c lwz r29,44(r1) ffc0798c: 83 e1 00 34 lwz r31,52(r1) ffc07990: 38 21 00 38 addi r1,r1,56 ffc07994: 4e 80 00 20 blr /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); ffc07998: 48 00 ef b1 bl ffc16948 <__errno> ffc0799c: 38 00 00 0e li r0,14 ffc079a0: 90 03 00 00 stw r0,0(r3) ffc079a4: 3b a0 ff ff li r29,-1 status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } ffc079a8: 7f a3 eb 78 mr r3,r29 ffc079ac: 80 01 00 3c lwz r0,60(r1) ffc079b0: 83 a1 00 2c lwz r29,44(r1) ffc079b4: 7c 08 03 a6 mtlr r0 ffc079b8: 83 c1 00 30 lwz r30,48(r1) ffc079bc: 83 e1 00 34 lwz r31,52(r1) ffc079c0: 38 21 00 38 addi r1,r1,56 ffc079c4: 4e 80 00 20 blr 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); ffc079c8: 81 21 00 14 lwz r9,20(r1) <== NOT EXECUTED ffc079cc: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc079d0: 41 9e 00 1c beq- cr7,ffc079ec <== NOT EXECUTED ffc079d4: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc079d8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc079dc: 41 9e 00 10 beq- cr7,ffc079ec <== NOT EXECUTED ffc079e0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc079e4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc079e8: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc079ec: 48 00 ef 5d bl ffc16948 <__errno> <== NOT EXECUTED ffc079f0: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc079f4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc079f8: 3b a0 ff ff li r29,-1 <== NOT EXECUTED ffc079fc: 4b ff ff 7c b ffc07978 <== NOT EXECUTED =============================================================================== ffc10994 : int symlink( const char *actualpath, const char *sympath ) { ffc10994: 94 21 ff c8 stwu r1,-56(r1) ffc10998: 7c 08 02 a6 mflr r0 ffc1099c: 93 a1 00 2c stw r29,44(r1) ffc109a0: 7c 7d 1b 78 mr r29,r3 ffc109a4: 90 01 00 3c stw r0,60(r1) ffc109a8: 93 c1 00 30 stw r30,48(r1) ffc109ac: 93 e1 00 34 stw r31,52(r1) rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); ffc109b0: 88 04 00 00 lbz r0,0(r4) ffc109b4: 2f 80 00 2f cmpwi cr7,r0,47 ffc109b8: 41 9e 00 14 beq- cr7,ffc109cc ffc109bc: 2f 80 00 5c cmpwi cr7,r0,92 ffc109c0: 41 9e 00 0c beq- cr7,ffc109cc <== NEVER TAKEN ffc109c4: 2f 80 00 00 cmpwi cr7,r0,0 ffc109c8: 40 9e 00 d8 bne- cr7,ffc10aa0 <== ALWAYS TAKEN ffc109cc: 3d 20 00 00 lis r9,0 ffc109d0: 81 29 4e d4 lwz r9,20180(r9) ffc109d4: 38 60 00 01 li r3,1 ffc109d8: 80 09 00 24 lwz r0,36(r9) ffc109dc: 81 09 00 18 lwz r8,24(r9) ffc109e0: 81 49 00 1c lwz r10,28(r9) ffc109e4: 81 69 00 20 lwz r11,32(r9) ffc109e8: 90 01 00 18 stw r0,24(r1) ffc109ec: 91 01 00 0c stw r8,12(r1) ffc109f0: 91 41 00 10 stw r10,16(r1) ffc109f4: 91 61 00 14 stw r11,20(r1) ffc109f8: 80 09 00 28 lwz r0,40(r9) if ( !loc.ops->evalformake_h ) { ffc109fc: 81 21 00 18 lwz r9,24(r1) rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); ffc10a00: 90 01 00 1c stw r0,28(r1) if ( !loc.ops->evalformake_h ) { ffc10a04: 80 09 00 04 lwz r0,4(r9) ffc10a08: 2f 80 00 00 cmpwi cr7,r0,0 ffc10a0c: 41 9e 00 d8 beq- cr7,ffc10ae4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); ffc10a10: 3b e1 00 0c addi r31,r1,12 ffc10a14: 7c 09 03 a6 mtctr r0 ffc10a18: 7c 64 1a 14 add r3,r4,r3 ffc10a1c: 38 a1 00 08 addi r5,r1,8 ffc10a20: 7f e4 fb 78 mr r4,r31 if ( result != 0 ) ffc10a24: 3b c0 ff ff li r30,-1 if ( !loc.ops->evalformake_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); ffc10a28: 4e 80 04 21 bctrl if ( result != 0 ) ffc10a2c: 2f 83 00 00 cmpwi cr7,r3,0 ffc10a30: 40 9e 00 50 bne- cr7,ffc10a80 return -1; if ( !loc.ops->symlink_h ) { ffc10a34: 81 21 00 18 lwz r9,24(r1) ffc10a38: 80 09 00 38 lwz r0,56(r9) ffc10a3c: 2f 80 00 00 cmpwi cr7,r0,0 ffc10a40: 41 9e 00 d4 beq- cr7,ffc10b14 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); ffc10a44: 7f a4 eb 78 mr r4,r29 ffc10a48: 80 a1 00 08 lwz r5,8(r1) ffc10a4c: 7f e3 fb 78 mr r3,r31 ffc10a50: 7c 09 03 a6 mtctr r0 ffc10a54: 4e 80 04 21 bctrl rtems_filesystem_freenode( &loc ); ffc10a58: 81 21 00 18 lwz r9,24(r1) if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); ffc10a5c: 7c 7e 1b 78 mr r30,r3 rtems_filesystem_freenode( &loc ); ffc10a60: 2f 89 00 00 cmpwi cr7,r9,0 ffc10a64: 41 9e 00 1c beq- cr7,ffc10a80 <== NEVER TAKEN ffc10a68: 80 09 00 1c lwz r0,28(r9) ffc10a6c: 2f 80 00 00 cmpwi cr7,r0,0 ffc10a70: 41 9e 00 10 beq- cr7,ffc10a80 <== NEVER TAKEN ffc10a74: 7f e3 fb 78 mr r3,r31 ffc10a78: 7c 09 03 a6 mtctr r0 ffc10a7c: 4e 80 04 21 bctrl return result; } ffc10a80: 80 01 00 3c lwz r0,60(r1) ffc10a84: 7f c3 f3 78 mr r3,r30 ffc10a88: 83 a1 00 2c lwz r29,44(r1) ffc10a8c: 7c 08 03 a6 mtlr r0 ffc10a90: 83 c1 00 30 lwz r30,48(r1) ffc10a94: 83 e1 00 34 lwz r31,52(r1) ffc10a98: 38 21 00 38 addi r1,r1,56 ffc10a9c: 4e 80 00 20 blr rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); ffc10aa0: 3d 20 00 00 lis r9,0 ffc10aa4: 81 29 4e d4 lwz r9,20180(r9) ffc10aa8: 38 60 00 00 li r3,0 ffc10aac: 80 09 00 10 lwz r0,16(r9) ffc10ab0: 81 09 00 04 lwz r8,4(r9) ffc10ab4: 81 49 00 08 lwz r10,8(r9) ffc10ab8: 81 69 00 0c lwz r11,12(r9) ffc10abc: 90 01 00 18 stw r0,24(r1) ffc10ac0: 91 01 00 0c stw r8,12(r1) ffc10ac4: 91 41 00 10 stw r10,16(r1) ffc10ac8: 91 61 00 14 stw r11,20(r1) ffc10acc: 80 09 00 14 lwz r0,20(r9) if ( !loc.ops->evalformake_h ) { ffc10ad0: 81 21 00 18 lwz r9,24(r1) rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); ffc10ad4: 90 01 00 1c stw r0,28(r1) if ( !loc.ops->evalformake_h ) { ffc10ad8: 80 09 00 04 lwz r0,4(r9) ffc10adc: 2f 80 00 00 cmpwi cr7,r0,0 ffc10ae0: 40 9e ff 30 bne+ cr7,ffc10a10 <== ALWAYS TAKEN if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc10ae4: 48 00 52 59 bl ffc15d3c <__errno> <== NOT EXECUTED ffc10ae8: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc10aec: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc10af0: 3b c0 ff ff li r30,-1 <== NOT EXECUTED result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; } ffc10af4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc10af8: 80 01 00 3c lwz r0,60(r1) <== NOT EXECUTED ffc10afc: 83 a1 00 2c lwz r29,44(r1) <== NOT EXECUTED ffc10b00: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc10b04: 83 c1 00 30 lwz r30,48(r1) <== NOT EXECUTED ffc10b08: 83 e1 00 34 lwz r31,52(r1) <== NOT EXECUTED ffc10b0c: 38 21 00 38 addi r1,r1,56 <== NOT EXECUTED ffc10b10: 4e 80 00 20 blr <== NOT EXECUTED result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); ffc10b14: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc10b18: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc10b1c: 41 be ff c8 beq- cr7,ffc10ae4 <== NOT EXECUTED ffc10b20: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc10b24: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc10b28: 4e 80 04 21 bctrl <== NOT EXECUTED ffc10b2c: 4b ff ff b8 b ffc10ae4 <== NOT EXECUTED =============================================================================== ffc07a0c : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { ffc07a0c: 94 21 ff f0 stwu r1,-16(r1) ffc07a10: 7c 08 02 a6 mflr r0 ffc07a14: 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; ffc07a18: 80 03 01 40 lwz r0,320(r3) fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { ffc07a1c: 93 c1 00 08 stw 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 ) { ffc07a20: 2f 80 00 00 cmpwi cr7,r0,0 fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { ffc07a24: 93 e1 00 0c stw r31,12(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 ) { ffc07a28: 41 9e 00 2c beq- cr7,ffc07a54 <== NEVER TAKEN current_reent = _Thread_Executing->libc_reent; ffc07a2c: 3f e0 00 00 lis r31,0 ffc07a30: 81 3f 27 b4 lwz r9,10164(r31) _Thread_Executing->libc_reent = this_reent; _fwalk (t->libc_reent, sync_wrapper); ffc07a34: 3c 80 ff c0 lis r4,-64 ffc07a38: 38 84 7a a8 addi r4,r4,31400 * 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; ffc07a3c: 83 c9 01 40 lwz r30,320(r9) _Thread_Executing->libc_reent = this_reent; ffc07a40: 90 09 01 40 stw r0,320(r9) _fwalk (t->libc_reent, sync_wrapper); ffc07a44: 80 63 01 40 lwz r3,320(r3) ffc07a48: 48 01 01 f9 bl ffc17c40 <_fwalk> _Thread_Executing->libc_reent = current_reent; ffc07a4c: 81 3f 27 b4 lwz r9,10164(r31) ffc07a50: 93 c9 01 40 stw r30,320(r9) } } ffc07a54: 80 01 00 14 lwz r0,20(r1) ffc07a58: 83 c1 00 08 lwz r30,8(r1) ffc07a5c: 7c 08 03 a6 mtlr r0 ffc07a60: 83 e1 00 0c lwz r31,12(r1) ffc07a64: 38 21 00 10 addi r1,r1,16 ffc07a68: 4e 80 00 20 blr =============================================================================== ffc07300 : int fd, int opt, struct termios *tp ) { switch (opt) { ffc07300: 2c 04 00 00 cmpwi r4,0 int tcsetattr( int fd, int opt, struct termios *tp ) { ffc07304: 94 21 ff f0 stwu r1,-16(r1) ffc07308: 7c 08 02 a6 mflr r0 ffc0730c: 93 c1 00 08 stw r30,8(r1) ffc07310: 7c 7e 1b 78 mr r30,r3 ffc07314: 93 e1 00 0c stw r31,12(r1) ffc07318: 7c bf 2b 78 mr r31,r5 ffc0731c: 90 01 00 14 stw r0,20(r1) switch (opt) { ffc07320: 41 82 00 50 beq- ffc07370 <== ALWAYS TAKEN ffc07324: 2f 84 00 01 cmpwi cr7,r4,1 <== NOT EXECUTED ffc07328: 41 9e 00 2c beq- cr7,ffc07354 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc0732c: 48 00 de 41 bl ffc1516c <__errno> <== NOT EXECUTED ffc07330: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc07334: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc07338: 38 60 ff ff li r3,-1 <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } ffc0733c: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc07340: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc07344: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc07348: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc0734c: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc07350: 4e 80 00 20 blr <== NOT EXECUTED switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) ffc07354: 38 80 00 03 li r4,3 <== NOT EXECUTED ffc07358: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc0735c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc07360: 48 00 94 c1 bl ffc10820 <== NOT EXECUTED ffc07364: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc07368: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0736c: 41 9c 00 18 blt- cr7,ffc07384 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); ffc07370: 7f c3 f3 78 mr r3,r30 ffc07374: 7f e5 fb 78 mr r5,r31 ffc07378: 38 80 00 02 li r4,2 ffc0737c: 4c c6 31 82 crclr 4*cr1+eq ffc07380: 48 00 94 a1 bl ffc10820 } } ffc07384: 80 01 00 14 lwz r0,20(r1) ffc07388: 83 c1 00 08 lwz r30,8(r1) ffc0738c: 7c 08 03 a6 mtlr r0 ffc07390: 83 e1 00 0c lwz r31,12(r1) ffc07394: 38 21 00 10 addi r1,r1,16 ffc07398: 4e 80 00 20 blr =============================================================================== ffc086ac : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { ffc086ac: 7d 80 00 26 mfcr r12 POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) ffc086b0: 2f 83 00 01 cmpwi cr7,r3,1 int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { ffc086b4: 94 21 ff e8 stwu r1,-24(r1) ffc086b8: 7c 08 02 a6 mflr r0 ffc086bc: 93 c1 00 10 stw r30,16(r1) ffc086c0: 7c be 2b 78 mr r30,r5 ffc086c4: 93 e1 00 14 stw r31,20(r1) ffc086c8: 7c 9f 23 78 mr r31,r4 ffc086cc: 90 01 00 1c stw r0,28(r1) ffc086d0: 93 a1 00 0c stw r29,12(r1) ffc086d4: 91 81 00 08 stw r12,8(r1) POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) ffc086d8: 40 9e 01 04 bne- cr7,ffc087dc rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) ffc086dc: 2f 85 00 00 cmpwi cr7,r5,0 ffc086e0: 41 9e 00 fc beq- cr7,ffc087dc /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { ffc086e4: 2e 04 00 00 cmpwi cr4,r4,0 ffc086e8: 41 92 00 2c beq- cr4,ffc08714 /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && ffc086ec: 81 24 00 00 lwz r9,0(r4) ffc086f0: 38 09 ff ff addi r0,r9,-1 ffc086f4: 2b 80 00 01 cmplwi cr7,r0,1 ffc086f8: 41 9d 00 e4 bgt- cr7,ffc087dc <== NEVER TAKEN ( evp->sigev_notify != SIGEV_SIGNAL ) ) { /* The value of the field sigev_notify is not valid */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !evp->sigev_signo ) ffc086fc: 81 24 00 04 lwz r9,4(r4) ffc08700: 2f 89 00 00 cmpwi cr7,r9,0 ffc08704: 41 9e 00 d8 beq- cr7,ffc087dc <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) ffc08708: 39 29 ff ff addi r9,r9,-1 ffc0870c: 2b 89 00 1f cmplwi cr7,r9,31 ffc08710: 41 9d 00 cc bgt- cr7,ffc087dc <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc08714: 3d 20 00 00 lis r9,0 ffc08718: 81 69 27 dc lwz r11,10204(r9) ffc0871c: 38 0b 00 01 addi r0,r11,1 ffc08720: 90 09 27 dc stw r0,10204(r9) * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void ) { return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information ); ffc08724: 3f a0 00 00 lis r29,0 ffc08728: 3b bd 2f 78 addi r29,r29,12152 ffc0872c: 7f a3 eb 78 mr r3,r29 ffc08730: 48 00 28 1d bl ffc0af4c <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { ffc08734: 2c 03 00 00 cmpwi r3,0 ffc08738: 41 82 00 d8 beq- ffc08810 rtems_set_errno_and_return_minus_one( EAGAIN ); } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ffc0873c: 38 00 00 02 li r0,2 ffc08740: 98 03 00 3c stb r0,60(r3) ptimer->thread_id = _Thread_Executing->Object.id; ffc08744: 3d 20 00 00 lis r9,0 ffc08748: 81 29 28 1c lwz r9,10268(r9) ffc0874c: 80 09 00 08 lwz r0,8(r9) ffc08750: 90 03 00 38 stw r0,56(r3) if ( evp != NULL ) { ffc08754: 41 92 00 1c beq- cr4,ffc08770 ptimer->inf.sigev_notify = evp->sigev_notify; ptimer->inf.sigev_signo = evp->sigev_signo; ptimer->inf.sigev_value = evp->sigev_value; ffc08758: 80 1f 00 08 lwz r0,8(r31) ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; if ( evp != NULL ) { ptimer->inf.sigev_notify = evp->sigev_notify; ffc0875c: 81 7f 00 00 lwz r11,0(r31) ptimer->inf.sigev_signo = evp->sigev_signo; ffc08760: 81 3f 00 04 lwz r9,4(r31) ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; if ( evp != NULL ) { ptimer->inf.sigev_notify = evp->sigev_notify; ffc08764: 91 63 00 40 stw r11,64(r3) ptimer->inf.sigev_signo = evp->sigev_signo; ffc08768: 91 23 00 44 stw r9,68(r3) ptimer->inf.sigev_value = evp->sigev_value; ffc0876c: 90 03 00 48 stw r0,72(r3) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc08770: 81 23 00 08 lwz r9,8(r3) } ptimer->overrun = 0; ffc08774: 38 00 00 00 li r0,0 ffc08778: 81 5d 00 1c lwz r10,28(r29) ffc0877c: 55 2b 13 ba rlwinm r11,r9,2,14,29 ffc08780: 90 03 00 68 stw r0,104(r3) ffc08784: 7c 6a 59 2e stwx r3,r10,r11 ptimer->timer_data.it_value.tv_sec = 0; ffc08788: 90 03 00 5c stw r0,92(r3) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; ffc0878c: 90 03 00 0c stw r0,12(r3) ptimer->timer_data.it_value.tv_nsec = 0; ffc08790: 90 03 00 60 stw r0,96(r3) ptimer->timer_data.it_interval.tv_sec = 0; ffc08794: 90 03 00 54 stw r0,84(r3) ptimer->timer_data.it_interval.tv_nsec = 0; ffc08798: 90 03 00 58 stw r0,88(r3) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc0879c: 90 03 00 30 stw r0,48(r3) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc087a0: 90 03 00 18 stw r0,24(r3) the_watchdog->routine = routine; ffc087a4: 90 03 00 2c stw r0,44(r3) the_watchdog->id = id; the_watchdog->user_data = user_data; ffc087a8: 90 03 00 34 stw r0,52(r3) _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; ffc087ac: 91 3e 00 00 stw r9,0(r30) _Thread_Enable_dispatch(); ffc087b0: 48 00 39 69 bl ffc0c118 <_Thread_Enable_dispatch> ffc087b4: 38 60 00 00 li r3,0 return 0; } ffc087b8: 80 01 00 1c lwz r0,28(r1) ffc087bc: 81 81 00 08 lwz r12,8(r1) ffc087c0: 7c 08 03 a6 mtlr r0 ffc087c4: 83 a1 00 0c lwz r29,12(r1) ffc087c8: 83 c1 00 10 lwz r30,16(r1) ffc087cc: 7d 80 81 20 mtcrf 8,r12 ffc087d0: 83 e1 00 14 lwz r31,20(r1) ffc087d4: 38 21 00 18 addi r1,r1,24 ffc087d8: 4e 80 00 20 blr if ( !evp->sigev_signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc087dc: 48 00 bb 01 bl ffc142dc <__errno> ffc087e0: 38 00 00 16 li r0,22 ffc087e4: 90 03 00 00 stw r0,0(r3) ffc087e8: 38 60 ff ff li r3,-1 _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; } ffc087ec: 80 01 00 1c lwz r0,28(r1) ffc087f0: 81 81 00 08 lwz r12,8(r1) ffc087f4: 7c 08 03 a6 mtlr r0 ffc087f8: 83 a1 00 0c lwz r29,12(r1) ffc087fc: 83 c1 00 10 lwz r30,16(r1) ffc08800: 7d 80 81 20 mtcrf 8,r12 ffc08804: 83 e1 00 14 lwz r31,20(r1) ffc08808: 38 21 00 18 addi r1,r1,24 ffc0880c: 4e 80 00 20 blr /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); ffc08810: 48 00 39 09 bl ffc0c118 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); ffc08814: 48 00 ba c9 bl ffc142dc <__errno> ffc08818: 38 00 00 0b li r0,11 ffc0881c: 90 03 00 00 stw r0,0(r3) ffc08820: 38 60 ff ff li r3,-1 ffc08824: 4b ff ff 94 b ffc087b8 =============================================================================== ffc08828 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { ffc08828: 94 21 ff c0 stwu r1,-64(r1) ffc0882c: 7c 08 02 a6 mflr r0 ffc08830: 93 a1 00 34 stw r29,52(r1) Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) ffc08834: 7c bd 2b 79 mr. r29,r5 timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { ffc08838: 93 c1 00 38 stw r30,56(r1) ffc0883c: 7c de 33 78 mr r30,r6 ffc08840: 93 e1 00 3c stw r31,60(r1) ffc08844: 7c 7f 1b 78 mr r31,r3 ffc08848: 90 01 00 44 stw r0,68(r1) ffc0884c: 93 61 00 2c stw r27,44(r1) ffc08850: 93 81 00 30 stw r28,48(r1) Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) ffc08854: 41 82 01 b4 beq- ffc08a08 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* First, it verifies if the structure "value" is correct */ if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) || ffc08858: 80 1d 00 0c lwz r0,12(r29) ffc0885c: 3d 60 3b 9a lis r11,15258 ffc08860: 61 6b c9 ff ori r11,r11,51711 ffc08864: 7f 80 58 40 cmplw cr7,r0,r11 ffc08868: 41 9d 01 a0 bgt- cr7,ffc08a08 ( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) || ffc0886c: 81 3d 00 04 lwz r9,4(r29) ffc08870: 7f 89 58 40 cmplw cr7,r9,r11 ffc08874: 41 9d 01 94 bgt- cr7,ffc08a08 <== NEVER TAKEN ( value->it_interval.tv_nsec < 0 )) { /* The number of nanoseconds is not correct */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { ffc08878: 2f 84 00 04 cmpwi cr7,r4,4 ffc0887c: 41 9e 01 1c beq- cr7,ffc08998 ffc08880: 2f 84 00 00 cmpwi cr7,r4,0 ffc08884: 40 9e 01 84 bne- cr7,ffc08a08 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; ffc08888: 81 5d 00 00 lwz r10,0(r29) RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) ffc0888c: 3c 60 00 00 lis r3,0 ffc08890: 81 7d 00 08 lwz r11,8(r29) ffc08894: 7f e4 fb 78 mr r4,r31 ffc08898: 38 63 2f 78 addi r3,r3,12152 ffc0889c: 90 01 00 20 stw r0,32(r1) ffc088a0: 38 a1 00 08 addi r5,r1,8 ffc088a4: 91 41 00 14 stw r10,20(r1) ffc088a8: 91 21 00 18 stw r9,24(r1) ffc088ac: 91 61 00 1c stw r11,28(r1) ffc088b0: 48 00 2c 9d bl ffc0b54c <_Objects_Get> ffc088b4: 7c 7f 1b 78 mr r31,r3 * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { ffc088b8: 80 01 00 08 lwz r0,8(r1) ffc088bc: 2f 80 00 00 cmpwi cr7,r0,0 ffc088c0: 40 9e 01 48 bne- cr7,ffc08a08 <== NEVER TAKEN case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { ffc088c4: 80 01 00 1c lwz r0,28(r1) ffc088c8: 2f 80 00 00 cmpwi cr7,r0,0 ffc088cc: 40 9e 00 10 bne- cr7,ffc088dc ffc088d0: 80 01 00 20 lwz r0,32(r1) ffc088d4: 2f 80 00 00 cmpwi cr7,r0,0 ffc088d8: 41 9e 01 64 beq- cr7,ffc08a3c _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); ffc088dc: 7f a3 eb 78 mr r3,r29 ffc088e0: 48 00 4a cd bl ffc0d3ac <_Timespec_To_ticks> ffc088e4: 90 7f 00 64 stw r3,100(r31) initial_period = _Timespec_To_ticks( &normalize.it_value ); ffc088e8: 38 61 00 1c addi r3,r1,28 ffc088ec: 48 00 4a c1 bl ffc0d3ac <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( ffc088f0: 80 bf 00 08 lwz r5,8(r31) ffc088f4: 3c c0 ff c1 lis r6,-63 return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); initial_period = _Timespec_To_ticks( &normalize.it_value ); ffc088f8: 7c 64 1b 78 mr r4,r3 activated = _POSIX_Timer_Insert_helper( ffc088fc: 38 c6 8a c0 addi r6,r6,-30016 ffc08900: 38 7f 00 10 addi r3,r31,16 ffc08904: 7f e7 fb 78 mr r7,r31 ffc08908: 48 00 7a 75 bl ffc1037c <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { ffc0890c: 2f 83 00 00 cmpwi cr7,r3,0 ffc08910: 41 9e 00 5c beq- cr7,ffc0896c /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) ffc08914: 2f 9e 00 00 cmpwi cr7,r30,0 ffc08918: 41 9e 00 24 beq- cr7,ffc0893c *ovalue = ptimer->timer_data; ffc0891c: 81 5f 00 54 lwz r10,84(r31) ffc08920: 81 3f 00 58 lwz r9,88(r31) ffc08924: 80 1f 00 5c lwz r0,92(r31) ffc08928: 81 7f 00 60 lwz r11,96(r31) ffc0892c: 91 5e 00 00 stw r10,0(r30) ffc08930: 91 7e 00 0c stw r11,12(r30) ffc08934: 91 3e 00 04 stw r9,4(r30) ffc08938: 90 1e 00 08 stw r0,8(r30) ptimer->timer_data = normalize; ffc0893c: 80 01 00 20 lwz r0,32(r1) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); ffc08940: 38 7f 00 6c addi r3,r31,108 * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = normalize; ffc08944: 81 61 00 18 lwz r11,24(r1) ffc08948: 81 21 00 1c lwz r9,28(r1) ffc0894c: 81 41 00 14 lwz r10,20(r1) ffc08950: 90 1f 00 60 stw r0,96(r31) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; ffc08954: 38 00 00 03 li r0,3 * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = normalize; ffc08958: 91 5f 00 54 stw r10,84(r31) ffc0895c: 91 7f 00 58 stw r11,88(r31) ffc08960: 91 3f 00 5c stw r9,92(r31) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; ffc08964: 98 1f 00 3c stb r0,60(r31) _TOD_Get( &ptimer->time ); ffc08968: 48 00 20 0d bl ffc0a974 <_TOD_Get> _Thread_Enable_dispatch(); ffc0896c: 48 00 37 ad bl ffc0c118 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } ffc08970: 80 01 00 44 lwz r0,68(r1) ptimer->timer_data = normalize; /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); _Thread_Enable_dispatch(); ffc08974: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } ffc08978: 83 61 00 2c lwz r27,44(r1) ffc0897c: 7c 08 03 a6 mtlr r0 ffc08980: 83 81 00 30 lwz r28,48(r1) ffc08984: 83 a1 00 34 lwz r29,52(r1) ffc08988: 83 c1 00 38 lwz r30,56(r1) ffc0898c: 83 e1 00 3c lwz r31,60(r1) ffc08990: 38 21 00 40 addi r1,r1,64 ffc08994: 4e 80 00 20 blr if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; ffc08998: 81 5d 00 00 lwz r10,0(r29) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); ffc0899c: 3b 81 00 0c addi r28,r1,12 if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; ffc089a0: 81 7d 00 08 lwz r11,8(r29) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); ffc089a4: 7f 83 e3 78 mr r3,r28 /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) ffc089a8: 3b 61 00 1c addi r27,r1,28 if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; ffc089ac: 91 41 00 14 stw r10,20(r1) ffc089b0: 91 21 00 18 stw r9,24(r1) ffc089b4: 91 61 00 1c stw r11,28(r1) ffc089b8: 90 01 00 20 stw r0,32(r1) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); ffc089bc: 48 00 1f b9 bl ffc0a974 <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) ffc089c0: 7f 83 e3 78 mr r3,r28 ffc089c4: 7f 64 db 78 mr r4,r27 ffc089c8: 48 00 49 55 bl ffc0d31c <_Timespec_Greater_than> ffc089cc: 2f 83 00 00 cmpwi cr7,r3,0 ffc089d0: 40 9e 00 38 bne- cr7,ffc08a08 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); ffc089d4: 7f 64 db 78 mr r4,r27 ffc089d8: 7f 83 e3 78 mr r3,r28 ffc089dc: 7f 65 db 78 mr r5,r27 ffc089e0: 48 00 49 79 bl ffc0d358 <_Timespec_Subtract> ffc089e4: 3c 60 00 00 lis r3,0 ffc089e8: 7f e4 fb 78 mr r4,r31 ffc089ec: 38 63 2f 78 addi r3,r3,12152 ffc089f0: 38 a1 00 08 addi r5,r1,8 ffc089f4: 48 00 2b 59 bl ffc0b54c <_Objects_Get> * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { ffc089f8: 80 01 00 08 lwz r0,8(r1) ffc089fc: 7c 7f 1b 78 mr r31,r3 ffc08a00: 2f 80 00 00 cmpwi cr7,r0,0 ffc08a04: 41 be fe c0 beq- cr7,ffc088c4 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); ffc08a08: 48 00 b8 d5 bl ffc142dc <__errno> ffc08a0c: 38 00 00 16 li r0,22 ffc08a10: 90 03 00 00 stw r0,0(r3) ffc08a14: 38 60 ff ff li r3,-1 } ffc08a18: 80 01 00 44 lwz r0,68(r1) ffc08a1c: 83 61 00 2c lwz r27,44(r1) ffc08a20: 7c 08 03 a6 mtlr r0 ffc08a24: 83 81 00 30 lwz r28,48(r1) ffc08a28: 83 a1 00 34 lwz r29,52(r1) ffc08a2c: 83 c1 00 38 lwz r30,56(r1) ffc08a30: 83 e1 00 3c lwz r31,60(r1) ffc08a34: 38 21 00 40 addi r1,r1,64 ffc08a38: 4e 80 00 20 blr case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); ffc08a3c: 38 63 00 10 addi r3,r3,16 ffc08a40: 48 00 50 61 bl ffc0daa0 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) ffc08a44: 2f 9e 00 00 cmpwi cr7,r30,0 ffc08a48: 41 9e 00 24 beq- cr7,ffc08a6c *ovalue = ptimer->timer_data; ffc08a4c: 81 5f 00 54 lwz r10,84(r31) ffc08a50: 81 3f 00 58 lwz r9,88(r31) ffc08a54: 80 1f 00 5c lwz r0,92(r31) ffc08a58: 81 7f 00 60 lwz r11,96(r31) ffc08a5c: 91 5e 00 00 stw r10,0(r30) ffc08a60: 91 7e 00 0c stw r11,12(r30) ffc08a64: 91 3e 00 04 stw r9,4(r30) ffc08a68: 90 1e 00 08 stw r0,8(r30) /* The new data are set */ ptimer->timer_data = normalize; ffc08a6c: 80 01 00 20 lwz r0,32(r1) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; ffc08a70: 39 00 00 04 li r8,4 (void) _Watchdog_Remove( &ptimer->Timer ); /* The old data of the timer are returned */ if ( ovalue ) *ovalue = ptimer->timer_data; /* The new data are set */ ptimer->timer_data = normalize; ffc08a74: 81 41 00 14 lwz r10,20(r1) ffc08a78: 81 61 00 18 lwz r11,24(r1) ffc08a7c: 81 21 00 1c lwz r9,28(r1) ffc08a80: 90 1f 00 60 stw r0,96(r31) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; ffc08a84: 99 1f 00 3c stb r8,60(r31) (void) _Watchdog_Remove( &ptimer->Timer ); /* The old data of the timer are returned */ if ( ovalue ) *ovalue = ptimer->timer_data; /* The new data are set */ ptimer->timer_data = normalize; ffc08a88: 91 5f 00 54 stw r10,84(r31) ffc08a8c: 91 7f 00 58 stw r11,88(r31) ffc08a90: 91 3f 00 5c stw r9,92(r31) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; /* Returns with success */ _Thread_Enable_dispatch(); ffc08a94: 48 00 36 85 bl ffc0c118 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } ffc08a98: 80 01 00 44 lwz r0,68(r1) /* The new data are set */ ptimer->timer_data = normalize; /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; /* Returns with success */ _Thread_Enable_dispatch(); ffc08a9c: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } ffc08aa0: 83 61 00 2c lwz r27,44(r1) ffc08aa4: 7c 08 03 a6 mtlr r0 ffc08aa8: 83 81 00 30 lwz r28,48(r1) ffc08aac: 83 a1 00 34 lwz r29,52(r1) ffc08ab0: 83 c1 00 38 lwz r30,56(r1) ffc08ab4: 83 e1 00 3c lwz r31,60(r1) ffc08ab8: 38 21 00 40 addi r1,r1,64 ffc08abc: 4e 80 00 20 blr =============================================================================== ffc08560 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { ffc08560: 94 21 ff d8 stwu r1,-40(r1) ffc08564: 7c 08 02 a6 mflr r0 ffc08568: 93 e1 00 24 stw r31,36(r1) /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { ffc0856c: 3f e0 00 00 lis r31,0 ffc08570: 3b ff 35 44 addi r31,r31,13636 useconds_t ualarm( useconds_t useconds, useconds_t interval ) { ffc08574: 90 01 00 2c stw r0,44(r1) /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { ffc08578: 80 1f 00 1c lwz r0,28(r31) useconds_t ualarm( useconds_t useconds, useconds_t interval ) { ffc0857c: 93 c1 00 20 stw r30,32(r1) ffc08580: 7c 7e 1b 78 mr r30,r3 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { ffc08584: 2f 80 00 00 cmpwi cr7,r0,0 useconds_t ualarm( useconds_t useconds, useconds_t interval ) { ffc08588: 93 81 00 18 stw r28,24(r1) ffc0858c: 93 a1 00 1c stw r29,28(r1) /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { ffc08590: 41 9e 00 ac beq- cr7,ffc0863c _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); ffc08594: 7f e3 fb 78 mr r3,r31 ffc08598: 48 00 4f 09 bl ffc0d4a0 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { ffc0859c: 3b a0 00 00 li r29,0 ffc085a0: 38 63 ff fe addi r3,r3,-2 ffc085a4: 2b 83 00 01 cmplwi cr7,r3,1 ffc085a8: 40 9d 00 b4 ble- cr7,ffc0865c <== ALWAYS TAKEN /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { ffc085ac: 2f 9e 00 00 cmpwi cr7,r30,0 ffc085b0: 41 be 00 68 beq+ cr7,ffc08618 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; ffc085b4: 3c 00 43 1b lis r0,17179 ffc085b8: 60 00 de 83 ori r0,r0,56963 ffc085bc: 7c 1e 00 16 mulhwu r0,r30,r0 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); ffc085c0: 3b 81 00 08 addi r28,r1,8 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; ffc085c4: 54 00 74 be rlwinm r0,r0,14,18,31 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ffc085c8: 54 0b 40 2e rlwinm r11,r0,8,0,23 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; ffc085cc: 90 01 00 08 stw r0,8(r1) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ffc085d0: 54 09 18 38 rlwinm r9,r0,3,0,28 ffc085d4: 7d 29 58 50 subf r9,r9,r11 ffc085d8: 55 2b 30 32 rlwinm r11,r9,6,0,25 ffc085dc: 7d 29 58 50 subf r9,r9,r11 ffc085e0: 7d 29 02 14 add r9,r9,r0 ffc085e4: 55 29 30 32 rlwinm r9,r9,6,0,25 ffc085e8: 7f c9 f0 50 subf r30,r9,r30 ffc085ec: 1f de 03 e8 mulli r30,r30,1000 ticks = _Timespec_To_ticks( &tp ); ffc085f0: 7f 83 e3 78 mr r3,r28 */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ffc085f4: 93 c1 00 0c stw r30,12(r1) ticks = _Timespec_To_ticks( &tp ); ffc085f8: 48 00 46 95 bl ffc0cc8c <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); ffc085fc: 7f 83 e3 78 mr r3,r28 ffc08600: 48 00 46 8d bl ffc0cc8c <_Timespec_To_ticks> ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc08604: 7f e4 fb 78 mr r4,r31 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc08608: 90 7f 00 0c stw r3,12(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0860c: 3c 60 00 00 lis r3,0 ffc08610: 38 63 2d a8 addi r3,r3,11688 ffc08614: 48 00 4c c5 bl ffc0d2d8 <_Watchdog_Insert> } return remaining; } ffc08618: 80 01 00 2c lwz r0,44(r1) ffc0861c: 7f a3 eb 78 mr r3,r29 ffc08620: 83 81 00 18 lwz r28,24(r1) ffc08624: 7c 08 03 a6 mtlr r0 ffc08628: 83 a1 00 1c lwz r29,28(r1) ffc0862c: 83 c1 00 20 lwz r30,32(r1) ffc08630: 83 e1 00 24 lwz r31,36(r1) ffc08634: 38 21 00 28 addi r1,r1,40 ffc08638: 4e 80 00 20 blr Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc0863c: 3d 20 ff c1 lis r9,-63 the_watchdog->id = id; the_watchdog->user_data = user_data; ffc08640: 90 1f 00 24 stw r0,36(r31) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc08644: 39 29 86 bc addi r9,r9,-31044 ffc08648: 91 3f 00 1c stw r9,28(r31) the_watchdog->id = id; the_watchdog->user_data = user_data; ffc0864c: 3b a0 00 00 li r29,0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc08650: 90 1f 00 08 stw r0,8(r31) the_watchdog->routine = routine; the_watchdog->id = id; ffc08654: 90 1f 00 20 stw r0,32(r31) ffc08658: 4b ff ff 54 b ffc085ac * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); ffc0865c: 81 3f 00 0c lwz r9,12(r31) /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); ffc08660: 38 81 00 08 addi r4,r1,8 * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); ffc08664: 80 7f 00 14 lwz r3,20(r31) /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; remaining += tp.tv_nsec / 1000; ffc08668: 3f a0 10 62 lis r29,4194 ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); ffc0866c: 80 1f 00 18 lwz r0,24(r31) remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; remaining += tp.tv_nsec / 1000; ffc08670: 63 bd 4d d3 ori r29,r29,19923 * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); ffc08674: 7c 63 4a 14 add r3,r3,r9 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); ffc08678: 7c 60 18 50 subf r3,r0,r3 ffc0867c: 48 00 45 71 bl ffc0cbec <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; ffc08680: 80 01 00 08 lwz r0,8(r1) remaining += tp.tv_nsec / 1000; ffc08684: 81 21 00 0c lwz r9,12(r1) ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; ffc08688: 54 0a 40 2e rlwinm r10,r0,8,0,23 ffc0868c: 54 0b 18 38 rlwinm r11,r0,3,0,28 ffc08690: 7d 6b 50 50 subf r11,r11,r10 remaining += tp.tv_nsec / 1000; ffc08694: 7f a9 e8 96 mulhw r29,r9,r29 ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; ffc08698: 55 6a 30 32 rlwinm r10,r11,6,0,25 ffc0869c: 7d 6b 50 50 subf r11,r11,r10 ffc086a0: 7c 0b 02 14 add r0,r11,r0 remaining += tp.tv_nsec / 1000; ffc086a4: 7f bd 36 70 srawi r29,r29,6 ffc086a8: 7d 29 fe 70 srawi r9,r9,31 ffc086ac: 7f a9 e8 50 subf r29,r9,r29 ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; ffc086b0: 54 00 30 32 rlwinm r0,r0,6,0,25 remaining += tp.tv_nsec / 1000; ffc086b4: 7f bd 02 14 add r29,r29,r0 ffc086b8: 4b ff fe f4 b ffc085ac =============================================================================== ffc12808 : #include int unlink( const char *path ) { ffc12808: 94 21 ff b8 stwu r1,-72(r1) ffc1280c: 7c 08 02 a6 mflr r0 ffc12810: 93 c1 00 40 stw r30,64(r1) ffc12814: 93 e1 00 44 stw r31,68(r1) ffc12818: 7c 7f 1b 78 mr r31,r3 ffc1281c: 90 01 00 4c stw r0,76(r1) ffc12820: 93 81 00 38 stw r28,56(r1) ffc12824: 93 a1 00 3c stw r29,60(r1) /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); ffc12828: 4b ff 1b 11 bl ffc04338 if ( parentpathlen == 0 ) ffc1282c: 7c 7e 1b 79 mr. r30,r3 ffc12830: 40 82 02 50 bne- ffc12a80 rtems_filesystem_get_start_loc( path, &i, &parentloc ); ffc12834: 88 1f 00 00 lbz r0,0(r31) ffc12838: 2f 80 00 2f cmpwi cr7,r0,47 ffc1283c: 41 9e 00 14 beq- cr7,ffc12850 ffc12840: 2f 80 00 5c cmpwi cr7,r0,92 ffc12844: 41 9e 00 0c beq- cr7,ffc12850 <== NEVER TAKEN ffc12848: 2f 80 00 00 cmpwi cr7,r0,0 ffc1284c: 40 9e 01 68 bne- cr7,ffc129b4 <== ALWAYS TAKEN ffc12850: 3d 20 00 00 lis r9,0 ffc12854: 81 29 26 dc lwz r9,9948(r9) ffc12858: 3b a0 00 00 li r29,0 ffc1285c: 80 09 00 24 lwz r0,36(r9) ffc12860: 81 09 00 18 lwz r8,24(r9) ffc12864: 81 49 00 1c lwz r10,28(r9) ffc12868: 81 69 00 20 lwz r11,32(r9) ffc1286c: 91 01 00 08 stw r8,8(r1) ffc12870: 91 41 00 0c stw r10,12(r1) ffc12874: 91 61 00 10 stw r11,16(r1) ffc12878: 90 01 00 14 stw r0,20(r1) ffc1287c: 80 09 00 28 lwz r0,40(r9) ffc12880: 90 01 00 18 stw r0,24(r1) /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc12884: 80 01 00 08 lwz r0,8(r1) name = path + parentpathlen; ffc12888: 7f df f2 14 add r30,r31,r30 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc1288c: 7f c3 f3 78 mr r3,r30 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc12890: 90 01 00 1c stw r0,28(r1) name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc12894: 3b e1 00 1c addi r31,r1,28 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc12898: 80 01 00 0c lwz r0,12(r1) ffc1289c: 90 01 00 20 stw r0,32(r1) ffc128a0: 80 01 00 10 lwz r0,16(r1) ffc128a4: 90 01 00 24 stw r0,36(r1) ffc128a8: 80 01 00 14 lwz r0,20(r1) ffc128ac: 90 01 00 28 stw r0,40(r1) ffc128b0: 80 01 00 18 lwz r0,24(r1) ffc128b4: 90 01 00 2c stw r0,44(r1) name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc128b8: 48 00 1c b9 bl ffc14570 ffc128bc: 7c 64 1b 78 mr r4,r3 ffc128c0: 7f c3 f3 78 mr r3,r30 ffc128c4: 4b ff 1a 25 bl ffc042e8 ffc128c8: 7f de 1a 14 add r30,r30,r3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc128cc: 7f c3 f3 78 mr r3,r30 ffc128d0: 48 00 1c a1 bl ffc14570 ffc128d4: 38 a0 00 00 li r5,0 ffc128d8: 7c 64 1b 78 mr r4,r3 ffc128dc: 7f e6 fb 78 mr r6,r31 ffc128e0: 7f c3 f3 78 mr r3,r30 ffc128e4: 38 e0 00 00 li r7,0 ffc128e8: 4b ff 1a dd bl ffc043c4 0, &loc, false ); if ( result != 0 ) { ffc128ec: 2f 83 00 00 cmpwi cr7,r3,0 ffc128f0: 40 9e 00 fc bne- cr7,ffc129ec if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( !loc.ops->node_type_h ) { ffc128f4: 81 21 00 28 lwz r9,40(r1) ffc128f8: 80 09 00 10 lwz r0,16(r9) ffc128fc: 2f 80 00 00 cmpwi cr7,r0,0 ffc12900: 41 9e 01 28 beq- cr7,ffc12a28 <== NEVER TAKEN if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { ffc12904: 7f e3 fb 78 mr r3,r31 ffc12908: 7c 09 03 a6 mtctr r0 ffc1290c: 4e 80 04 21 bctrl ffc12910: 2f 83 00 01 cmpwi cr7,r3,1 ffc12914: 41 9e 01 94 beq- cr7,ffc12aa8 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { ffc12918: 81 21 00 28 lwz r9,40(r1) ffc1291c: 80 09 00 0c lwz r0,12(r9) ffc12920: 2f 80 00 00 cmpwi cr7,r0,0 ffc12924: 41 9e 01 04 beq- cr7,ffc12a28 <== NEVER TAKEN if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); ffc12928: 3b c1 00 08 addi r30,r1,8 ffc1292c: 7c 09 03 a6 mtctr r0 ffc12930: 7f c3 f3 78 mr r3,r30 ffc12934: 7f e4 fb 78 mr r4,r31 ffc12938: 4e 80 04 21 bctrl rtems_filesystem_freenode( &loc ); ffc1293c: 81 21 00 28 lwz r9,40(r1) if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); ffc12940: 7c 7c 1b 78 mr r28,r3 rtems_filesystem_freenode( &loc ); ffc12944: 2f 89 00 00 cmpwi cr7,r9,0 ffc12948: 41 9e 00 1c beq- cr7,ffc12964 <== NEVER TAKEN ffc1294c: 80 09 00 1c lwz r0,28(r9) ffc12950: 2f 80 00 00 cmpwi cr7,r0,0 ffc12954: 41 9e 00 10 beq- cr7,ffc12964 <== NEVER TAKEN ffc12958: 7f e3 fb 78 mr r3,r31 ffc1295c: 7c 09 03 a6 mtctr r0 ffc12960: 4e 80 04 21 bctrl if ( free_parentloc ) ffc12964: 2f 9d 00 00 cmpwi cr7,r29,0 ffc12968: 41 9e 00 28 beq- cr7,ffc12990 rtems_filesystem_freenode( &parentloc ); ffc1296c: 81 21 00 14 lwz r9,20(r1) ffc12970: 2f 89 00 00 cmpwi cr7,r9,0 ffc12974: 41 9e 00 1c beq- cr7,ffc12990 <== NEVER TAKEN ffc12978: 80 09 00 1c lwz r0,28(r9) ffc1297c: 2f 80 00 00 cmpwi cr7,r0,0 ffc12980: 41 9e 00 10 beq- cr7,ffc12990 <== NEVER TAKEN ffc12984: 7f c3 f3 78 mr r3,r30 ffc12988: 7c 09 03 a6 mtctr r0 ffc1298c: 4e 80 04 21 bctrl return result; } ffc12990: 80 01 00 4c lwz r0,76(r1) ffc12994: 7f 83 e3 78 mr r3,r28 ffc12998: 83 a1 00 3c lwz r29,60(r1) ffc1299c: 7c 08 03 a6 mtlr r0 ffc129a0: 83 81 00 38 lwz r28,56(r1) ffc129a4: 83 c1 00 40 lwz r30,64(r1) ffc129a8: 83 e1 00 44 lwz r31,68(r1) ffc129ac: 38 21 00 48 addi r1,r1,72 ffc129b0: 4e 80 00 20 blr */ parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); ffc129b4: 3d 20 00 00 lis r9,0 ffc129b8: 81 29 26 dc lwz r9,9948(r9) ffc129bc: 3b a0 00 00 li r29,0 ffc129c0: 80 09 00 10 lwz r0,16(r9) ffc129c4: 81 09 00 04 lwz r8,4(r9) ffc129c8: 81 49 00 08 lwz r10,8(r9) ffc129cc: 81 69 00 0c lwz r11,12(r9) ffc129d0: 91 01 00 08 stw r8,8(r1) ffc129d4: 91 41 00 0c stw r10,12(r1) ffc129d8: 91 61 00 10 stw r11,16(r1) ffc129dc: 90 01 00 14 stw r0,20(r1) ffc129e0: 80 09 00 14 lwz r0,20(r9) ffc129e4: 90 01 00 18 stw r0,24(r1) ffc129e8: 4b ff fe 9c b ffc12884 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 ) ffc129ec: 2f 9d 00 00 cmpwi cr7,r29,0 ffc129f0: 40 9e 00 0c bne- cr7,ffc129fc <== ALWAYS TAKEN result = (*loc.ops->unlink_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); ffc129f4: 3b 80 ff ff li r28,-1 <== NOT EXECUTED ffc129f8: 4b ff ff 98 b ffc12990 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); ffc129fc: 81 21 00 14 lwz r9,20(r1) ffc12a00: 2f 89 00 00 cmpwi cr7,r9,0 ffc12a04: 41 9e ff f0 beq+ cr7,ffc129f4 <== NEVER TAKEN ffc12a08: 80 09 00 1c lwz r0,28(r9) ffc12a0c: 2f 80 00 00 cmpwi cr7,r0,0 ffc12a10: 41 9e ff e4 beq+ cr7,ffc129f4 <== NEVER TAKEN ffc12a14: 38 61 00 08 addi r3,r1,8 ffc12a18: 7c 09 03 a6 mtctr r0 ffc12a1c: 3b 80 ff ff li r28,-1 ffc12a20: 4e 80 04 21 bctrl ffc12a24: 4b ff ff 6c b ffc12990 rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); ffc12a28: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc12a2c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc12a30: 41 9e 00 10 beq- cr7,ffc12a40 <== NOT EXECUTED ffc12a34: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc12a38: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc12a3c: 4e 80 04 21 bctrl <== NOT EXECUTED if ( free_parentloc ) ffc12a40: 2f 9d 00 00 cmpwi cr7,r29,0 <== NOT EXECUTED ffc12a44: 41 9e 00 28 beq- cr7,ffc12a6c <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); ffc12a48: 81 21 00 14 lwz r9,20(r1) <== NOT EXECUTED ffc12a4c: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc12a50: 41 9e 00 1c beq- cr7,ffc12a6c <== NOT EXECUTED ffc12a54: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc12a58: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc12a5c: 41 9e 00 10 beq- cr7,ffc12a6c <== NOT EXECUTED ffc12a60: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED ffc12a64: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc12a68: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc12a6c: 48 00 08 09 bl ffc13274 <__errno> <== NOT EXECUTED ffc12a70: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc12a74: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc12a78: 3b 80 ff ff li r28,-1 <== NOT EXECUTED ffc12a7c: 4b ff ff 14 b ffc12990 <== NOT EXECUTED parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, ffc12a80: 7f e3 fb 78 mr r3,r31 ffc12a84: 7f c4 f3 78 mr r4,r30 ffc12a88: 38 a0 00 02 li r5,2 ffc12a8c: 38 c1 00 08 addi r6,r1,8 ffc12a90: 38 e0 00 00 li r7,0 ffc12a94: 4b ff 1a 59 bl ffc044ec RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) ffc12a98: 2f 83 00 00 cmpwi cr7,r3,0 ffc12a9c: 40 be ff 58 bne- cr7,ffc129f4 <== NEVER TAKEN ffc12aa0: 3b a0 00 01 li r29,1 ffc12aa4: 4b ff fd e0 b ffc12884 rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); ffc12aa8: 81 21 00 28 lwz r9,40(r1) ffc12aac: 2f 89 00 00 cmpwi cr7,r9,0 ffc12ab0: 41 9e 00 1c beq- cr7,ffc12acc <== NEVER TAKEN ffc12ab4: 80 09 00 1c lwz r0,28(r9) ffc12ab8: 2f 80 00 00 cmpwi cr7,r0,0 ffc12abc: 41 9e 00 10 beq- cr7,ffc12acc <== NEVER TAKEN ffc12ac0: 7f e3 fb 78 mr r3,r31 ffc12ac4: 7c 09 03 a6 mtctr r0 ffc12ac8: 4e 80 04 21 bctrl if ( free_parentloc ) ffc12acc: 2f 9d 00 00 cmpwi cr7,r29,0 ffc12ad0: 41 9e 00 28 beq- cr7,ffc12af8 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); ffc12ad4: 81 21 00 14 lwz r9,20(r1) <== NOT EXECUTED ffc12ad8: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc12adc: 41 9e 00 1c beq- cr7,ffc12af8 <== NOT EXECUTED ffc12ae0: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc12ae4: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc12ae8: 41 9e 00 10 beq- cr7,ffc12af8 <== NOT EXECUTED ffc12aec: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED ffc12af0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc12af4: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); ffc12af8: 48 00 07 7d bl ffc13274 <__errno> ffc12afc: 38 00 00 15 li r0,21 ffc12b00: 90 03 00 00 stw r0,0(r3) ffc12b04: 3b 80 ff ff li r28,-1 ffc12b08: 4b ff fe 88 b ffc12990 =============================================================================== ffc0cfb0 : */ int unmount( const char *path ) { ffc0cfb0: 94 21 ff d0 stwu r1,-48(r1) ffc0cfb4: 7c 08 02 a6 mflr r0 ffc0cfb8: 93 c1 00 28 stw r30,40(r1) ffc0cfbc: 7c 7e 1b 78 mr r30,r3 ffc0cfc0: 90 01 00 34 stw r0,52(r1) ffc0cfc4: 93 e1 00 2c stw r31,44(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 ) ) ffc0cfc8: 48 01 08 f9 bl ffc1d8c0 ffc0cfcc: 3b e1 00 08 addi r31,r1,8 ffc0cfd0: 7c 64 1b 78 mr r4,r3 ffc0cfd4: 38 a0 00 00 li r5,0 ffc0cfd8: 7f c3 f3 78 mr r3,r30 ffc0cfdc: 7f e6 fb 78 mr r6,r31 ffc0cfe0: 38 e0 00 01 li r7,1 ffc0cfe4: 4b ff b6 1d bl ffc08600 ffc0cfe8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0cfec: 40 9e 00 e0 bne- cr7,ffc0d0cc return -1; mt_entry = loc.mt_entry; ffc0cff0: 83 c1 00 18 lwz r30,24(r1) fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; ffc0cff4: 80 01 00 08 lwz r0,8(r1) ffc0cff8: 81 3e 00 1c lwz r9,28(r30) ffc0cffc: 7f 89 00 00 cmpw cr7,r9,r0 ffc0d000: 40 9e 01 7c bne- cr7,ffc0d17c /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); ffc0d004: 81 21 00 14 lwz r9,20(r1) ffc0d008: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d00c: 41 9e 00 1c beq- cr7,ffc0d028 <== NEVER TAKEN ffc0d010: 80 09 00 1c lwz r0,28(r9) ffc0d014: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d018: 41 9e 00 10 beq- cr7,ffc0d028 <== NEVER TAKEN ffc0d01c: 7f e3 fb 78 mr r3,r31 ffc0d020: 7c 09 03 a6 mtctr r0 ffc0d024: 4e 80 04 21 bctrl if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; ffc0d028: 81 3e 00 14 lwz r9,20(r30) ffc0d02c: 80 09 00 28 lwz r0,40(r9) ffc0d030: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d034: 41 9e 01 b8 beq- cr7,ffc0d1ec <== NEVER TAKEN fs_root_loc = &mt_entry->mt_fs_root; ffc0d038: 81 3e 00 28 lwz r9,40(r30) ffc0d03c: 80 09 00 2c lwz r0,44(r9) ffc0d040: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d044: 41 9e 01 a8 beq- cr7,ffc0d1ec <== NEVER TAKEN * 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 ) ffc0d048: 3d 20 00 00 lis r9,0 ffc0d04c: 81 29 27 3c lwz r9,10044(r9) ffc0d050: 80 09 00 14 lwz r0,20(r9) ffc0d054: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0d058: 41 9e 00 90 beq- cr7,ffc0d0e8 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; ffc0d05c: 3d 60 00 00 lis r11,0 ffc0d060: 81 2b 34 40 lwz r9,13376(r11) ffc0d064: 39 6b 34 40 addi r11,r11,13376 ffc0d068: 39 6b 00 04 addi r11,r11,4 ffc0d06c: 7f 89 58 00 cmpw cr7,r9,r11 ffc0d070: 41 9e 00 30 beq- cr7,ffc0d0a0 <== NEVER TAKEN !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { ffc0d074: 81 5e 00 2c lwz r10,44(r30) ffc0d078: 80 09 00 18 lwz r0,24(r9) ffc0d07c: 7f 80 50 00 cmpw cr7,r0,r10 ffc0d080: 40 be 00 14 bne+ cr7,ffc0d094 <== ALWAYS TAKEN ffc0d084: 48 00 00 64 b ffc0d0e8 <== NOT EXECUTED ffc0d088: 80 09 00 18 lwz r0,24(r9) ffc0d08c: 7f 8a 00 00 cmpw cr7,r10,r0 ffc0d090: 41 9e 00 58 beq- cr7,ffc0d0e8 * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { ffc0d094: 81 29 00 00 lwz r9,0(r9) /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; ffc0d098: 7f 89 58 00 cmpw cr7,r9,r11 ffc0d09c: 40 9e ff ec bne+ cr7,ffc0d088 * 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 ) ffc0d0a0: 7f c3 f3 78 mr r3,r30 ffc0d0a4: 4b ff b9 bd bl ffc08a60 ffc0d0a8: 2f 83 00 01 cmpwi cr7,r3,1 ffc0d0ac: 41 9e 00 3c beq- cr7,ffc0d0e8 * 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 ) ffc0d0b0: 81 3e 00 14 lwz r9,20(r30) ffc0d0b4: 7f c3 f3 78 mr r3,r30 ffc0d0b8: 80 09 00 28 lwz r0,40(r9) ffc0d0bc: 7c 09 03 a6 mtctr r0 ffc0d0c0: 4e 80 04 21 bctrl ffc0d0c4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0d0c8: 41 9e 00 48 beq- cr7,ffc0d110 <== ALWAYS TAKEN */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; ffc0d0cc: 38 60 ff ff li r3,-1 } ffc0d0d0: 80 01 00 34 lwz r0,52(r1) ffc0d0d4: 83 c1 00 28 lwz r30,40(r1) ffc0d0d8: 7c 08 03 a6 mtlr r0 ffc0d0dc: 83 e1 00 2c lwz r31,44(r1) ffc0d0e0: 38 21 00 30 addi r1,r1,48 ffc0d0e4: 4e 80 00 20 blr * 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 ) rtems_set_errno_and_return_minus_one( EBUSY ); ffc0d0e8: 48 00 cc 81 bl ffc19d68 <__errno> ffc0d0ec: 38 00 00 10 li r0,16 ffc0d0f0: 90 03 00 00 stw r0,0(r3) ffc0d0f4: 38 60 ff ff li r3,-1 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } ffc0d0f8: 80 01 00 34 lwz r0,52(r1) ffc0d0fc: 83 c1 00 28 lwz r30,40(r1) ffc0d100: 7c 08 03 a6 mtlr r0 ffc0d104: 83 e1 00 2c lwz r31,44(r1) ffc0d108: 38 21 00 30 addi r1,r1,48 ffc0d10c: 4e 80 00 20 blr * 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){ ffc0d110: 81 3e 00 28 lwz r9,40(r30) ffc0d114: 7f c3 f3 78 mr r3,r30 ffc0d118: 80 09 00 2c lwz r0,44(r9) ffc0d11c: 7c 09 03 a6 mtctr r0 ffc0d120: 4e 80 04 21 bctrl ffc0d124: 2f 83 00 00 cmpwi cr7,r3,0 ffc0d128: 40 9e 00 a0 bne- cr7,ffc0d1c8 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc0d12c: 7f c3 f3 78 mr r3,r30 ffc0d130: 48 00 1e 71 bl ffc0efa0 <_Chain_Extract> /* * 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 ); ffc0d134: 81 3e 00 14 lwz r9,20(r30) ffc0d138: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d13c: 41 9e 00 1c beq- cr7,ffc0d158 <== NEVER TAKEN ffc0d140: 80 09 00 1c lwz r0,28(r9) ffc0d144: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d148: 41 9e 00 10 beq- cr7,ffc0d158 <== NEVER TAKEN ffc0d14c: 38 7e 00 08 addi r3,r30,8 ffc0d150: 7c 09 03 a6 mtctr r0 ffc0d154: 4e 80 04 21 bctrl free( mt_entry ); ffc0d158: 7f c3 f3 78 mr r3,r30 ffc0d15c: 4b ff b5 ad bl ffc08708 return 0; } ffc0d160: 80 01 00 34 lwz r0,52(r1) * 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 ); free( mt_entry ); ffc0d164: 38 60 00 00 li r3,0 return 0; } ffc0d168: 83 c1 00 28 lwz r30,40(r1) ffc0d16c: 7c 08 03 a6 mtlr r0 ffc0d170: 83 e1 00 2c lwz r31,44(r1) ffc0d174: 38 21 00 30 addi r1,r1,48 ffc0d178: 4e 80 00 20 blr /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ rtems_filesystem_freenode( &loc ); ffc0d17c: 81 21 00 14 lwz r9,20(r1) ffc0d180: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d184: 41 9e 00 1c beq- cr7,ffc0d1a0 <== NEVER TAKEN ffc0d188: 80 09 00 1c lwz r0,28(r9) ffc0d18c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d190: 41 9e 00 10 beq- cr7,ffc0d1a0 <== NEVER TAKEN ffc0d194: 7f e3 fb 78 mr r3,r31 ffc0d198: 7c 09 03 a6 mtctr r0 ffc0d19c: 4e 80 04 21 bctrl rtems_set_errno_and_return_minus_one( EACCES ); ffc0d1a0: 48 00 cb c9 bl ffc19d68 <__errno> ffc0d1a4: 38 00 00 0d li r0,13 ffc0d1a8: 90 03 00 00 stw r0,0(r3) ffc0d1ac: 38 60 ff ff li r3,-1 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } ffc0d1b0: 80 01 00 34 lwz r0,52(r1) ffc0d1b4: 83 c1 00 28 lwz r30,40(r1) ffc0d1b8: 7c 08 03 a6 mtlr r0 ffc0d1bc: 83 e1 00 2c lwz r31,44(r1) ffc0d1c0: 38 21 00 30 addi r1,r1,48 ffc0d1c4: 4e 80 00 20 blr * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) ffc0d1c8: 81 3e 00 14 lwz r9,20(r30) <== NOT EXECUTED ffc0d1cc: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc0d1d0: 80 09 00 20 lwz r0,32(r9) <== NOT EXECUTED ffc0d1d4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0d1d8: 4e 80 04 21 bctrl <== NOT EXECUTED ffc0d1dc: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc0d1e0: 41 9e fe ec beq+ cr7,ffc0d0cc <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); ffc0d1e4: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc0d1e8: 48 00 18 d1 bl ffc0eab8 <== NOT EXECUTED if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc0d1ec: 48 00 cb 7d bl ffc19d68 <__errno> <== NOT EXECUTED ffc0d1f0: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc0d1f4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0d1f8: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0d1fc: 4b ff fe d4 b ffc0d0d0 <== NOT EXECUTED =============================================================================== ffc09da8 : int utime( const char *path, const struct utimbuf *times ) { ffc09da8: 94 21 ff c8 stwu r1,-56(r1) ffc09dac: 7c 08 02 a6 mflr r0 ffc09db0: 93 a1 00 2c stw r29,44(r1) ffc09db4: 7c 7d 1b 78 mr r29,r3 ffc09db8: 90 01 00 3c stw r0,60(r1) ffc09dbc: 93 c1 00 30 stw r30,48(r1) ffc09dc0: 7c 9e 23 78 mr r30,r4 ffc09dc4: 93 e1 00 34 stw r31,52(r1) rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) ffc09dc8: 48 00 ed b5 bl ffc18b7c ffc09dcc: 3b e1 00 08 addi r31,r1,8 ffc09dd0: 7c 64 1b 78 mr r4,r3 ffc09dd4: 38 a0 00 00 li r5,0 ffc09dd8: 7f a3 eb 78 mr r3,r29 ffc09ddc: 7f e6 fb 78 mr r6,r31 ffc09de0: 38 e0 00 01 li r7,1 ffc09de4: 4b ff bb 81 bl ffc05964 ffc09de8: 3b a0 ff ff li r29,-1 ffc09dec: 2f 83 00 00 cmpwi cr7,r3,0 ffc09df0: 40 9e 00 50 bne- cr7,ffc09e40 return -1; if ( !temp_loc.ops->utime_h ){ ffc09df4: 81 21 00 14 lwz r9,20(r1) ffc09df8: 80 09 00 30 lwz r0,48(r9) ffc09dfc: 2f 80 00 00 cmpwi cr7,r0,0 ffc09e00: 41 9e 00 60 beq- cr7,ffc09e60 <== NEVER TAKEN rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); ffc09e04: 80 be 00 04 lwz r5,4(r30) ffc09e08: 7f e3 fb 78 mr r3,r31 ffc09e0c: 80 9e 00 00 lwz r4,0(r30) ffc09e10: 7c 09 03 a6 mtctr r0 ffc09e14: 4e 80 04 21 bctrl rtems_filesystem_freenode( &temp_loc ); ffc09e18: 81 21 00 14 lwz r9,20(r1) if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); ffc09e1c: 7c 7d 1b 78 mr r29,r3 rtems_filesystem_freenode( &temp_loc ); ffc09e20: 2f 89 00 00 cmpwi cr7,r9,0 ffc09e24: 41 9e 00 1c beq- cr7,ffc09e40 <== NEVER TAKEN ffc09e28: 80 09 00 1c lwz r0,28(r9) ffc09e2c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09e30: 41 9e 00 10 beq- cr7,ffc09e40 <== NEVER TAKEN ffc09e34: 7f e3 fb 78 mr r3,r31 ffc09e38: 7c 09 03 a6 mtctr r0 ffc09e3c: 4e 80 04 21 bctrl return result; } ffc09e40: 80 01 00 3c lwz r0,60(r1) ffc09e44: 7f a3 eb 78 mr r3,r29 ffc09e48: 83 c1 00 30 lwz r30,48(r1) ffc09e4c: 7c 08 03 a6 mtlr r0 ffc09e50: 83 a1 00 2c lwz r29,44(r1) ffc09e54: 83 e1 00 34 lwz r31,52(r1) ffc09e58: 38 21 00 38 addi r1,r1,56 ffc09e5c: 4e 80 00 20 blr if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); ffc09e60: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc09e64: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc09e68: 41 9e 00 10 beq- cr7,ffc09e78 <== NOT EXECUTED ffc09e6c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc09e70: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc09e74: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc09e78: 48 00 ca d1 bl ffc16948 <__errno> <== NOT EXECUTED ffc09e7c: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc09e80: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc09e84: 3b a0 ff ff li r29,-1 <== NOT EXECUTED ffc09e88: 4b ff ff b8 b ffc09e40 <== NOT EXECUTED =============================================================================== ffc07a58 : */ void vprintk( const char *fmt, va_list ap ) { ffc07a58: 94 21 ff a8 stwu r1,-88(r1) ffc07a5c: 7d 80 00 26 mfcr r12 ffc07a60: 7c 08 02 a6 mflr r0 ffc07a64: 93 01 00 38 stw r24,56(r1) ffc07a68: 7c 98 23 78 mr r24,r4 ffc07a6c: 93 e1 00 54 stw r31,84(r1) ffc07a70: 7c 7f 1b 78 mr r31,r3 ffc07a74: 90 01 00 5c stw r0,92(r1) ffc07a78: 92 c1 00 30 stw r22,48(r1) ffc07a7c: 92 e1 00 34 stw r23,52(r1) ffc07a80: 93 21 00 3c stw r25,60(r1) ffc07a84: 93 41 00 40 stw r26,64(r1) ffc07a88: 93 61 00 44 stw r27,68(r1) ffc07a8c: 93 81 00 48 stw r28,72(r1) ffc07a90: 93 a1 00 4c stw r29,76(r1) ffc07a94: 93 c1 00 50 stw r30,80(r1) ffc07a98: 91 81 00 2c stw r12,44(r1) for (; *fmt != '\0'; fmt++) { ffc07a9c: 88 63 00 00 lbz r3,0(r3) ffc07aa0: 2f 83 00 00 cmpwi cr7,r3,0 ffc07aa4: 41 9e 01 08 beq- cr7,ffc07bac <== NEVER TAKEN bool sign = false; char lead = ' '; char c; if (*fmt != '%') { BSP_output_char(*fmt); ffc07aa8: 3f 80 00 00 lis r28,0 ffc07aac: 3f 40 ff c2 lis r26,-62 unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { ffc07ab0: 3e c0 ff c2 lis r22,-62 bool sign = false; char lead = ' '; char c; if (*fmt != '%') { BSP_output_char(*fmt); ffc07ab4: 3b 9c 26 d4 addi r28,r28,9940 ffc07ab8: 3b 5a f6 ac addi r26,r26,-2388 unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { ffc07abc: 3a d6 ec 74 addi r22,r22,-5004 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { ffc07ac0: 3a e1 00 08 addi r23,r1,8 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { ffc07ac4: 2f 83 00 25 cmpwi cr7,r3,37 ffc07ac8: 40 9e 00 cc bne- cr7,ffc07b94 BSP_output_char(*fmt); continue; } fmt++; if (*fmt == '0' ) { ffc07acc: 8c 7f 00 01 lbzu r3,1(r31) ffc07ad0: 3b 20 00 20 li r25,32 ffc07ad4: 2f 83 00 30 cmpwi cr7,r3,48 ffc07ad8: 41 9e 02 20 beq- cr7,ffc07cf8 lead = '0'; fmt++; } if (*fmt == '-' ) { ffc07adc: 2f 83 00 2d cmpwi cr7,r3,45 ffc07ae0: 39 20 00 00 li r9,0 ffc07ae4: 41 9e 02 08 beq- cr7,ffc07cec minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { ffc07ae8: 38 03 ff d0 addi r0,r3,-48 ffc07aec: 54 00 06 3e clrlwi r0,r0,24 ffc07af0: 2b 80 00 09 cmplwi cr7,r0,9 ffc07af4: 3b c0 00 00 li r30,0 ffc07af8: 41 9d 00 24 bgt- cr7,ffc07b1c width *= 10; width += ((unsigned) *fmt - '0'); ffc07afc: 1f de 00 0a mulli r30,r30,10 ffc07b00: 7f de 1a 14 add r30,r30,r3 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { ffc07b04: 8c 7f 00 01 lbzu r3,1(r31) width *= 10; width += ((unsigned) *fmt - '0'); ffc07b08: 3b de ff d0 addi r30,r30,-48 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { ffc07b0c: 38 03 ff d0 addi r0,r3,-48 ffc07b10: 54 00 06 3e clrlwi r0,r0,24 ffc07b14: 2b 80 00 09 cmplwi cr7,r0,9 ffc07b18: 40 9d ff e4 ble+ cr7,ffc07afc width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { ffc07b1c: 2f 83 00 6c cmpwi cr7,r3,108 ffc07b20: 41 9e 02 18 beq- cr7,ffc07d38 lflag = true; c = *++fmt; } if ( c == 'c' ) { ffc07b24: 2f 83 00 63 cmpwi cr7,r3,99 ffc07b28: 41 9e 01 dc beq- cr7,ffc07d04 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); BSP_output_char(chr); continue; } if ( c == 's' ) { ffc07b2c: 2f 83 00 73 cmpwi cr7,r3,115 ffc07b30: 41 9e 02 2c beq- cr7,ffc07d5c continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { ffc07b34: 2f 83 00 6f cmpwi cr7,r3,111 ffc07b38: 41 9e 02 18 beq- cr7,ffc07d50 <== NEVER TAKEN ffc07b3c: 2f 83 00 4f cmpwi cr7,r3,79 ffc07b40: 41 9e 02 10 beq- cr7,ffc07d50 base = 8; sign = false; } else if ( c == 'i' || c == 'I' || ffc07b44: 2f 83 00 69 cmpwi cr7,r3,105 ffc07b48: 41 9e 00 a4 beq- cr7,ffc07bec ffc07b4c: 2f 83 00 49 cmpwi cr7,r3,73 ffc07b50: 41 9e 00 9c beq- cr7,ffc07bec ffc07b54: 2f 83 00 64 cmpwi cr7,r3,100 ffc07b58: 41 9e 00 94 beq- cr7,ffc07bec ffc07b5c: 2f 83 00 44 cmpwi cr7,r3,68 ffc07b60: 41 9e 00 8c beq- cr7,ffc07bec c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { ffc07b64: 2f 83 00 75 cmpwi cr7,r3,117 ffc07b68: 41 9e 03 60 beq- cr7,ffc07ec8 ffc07b6c: 2f 83 00 55 cmpwi cr7,r3,85 ffc07b70: 41 9e 03 58 beq- cr7,ffc07ec8 base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { ffc07b74: 2f 83 00 78 cmpwi cr7,r3,120 ffc07b78: 41 9e 03 5c beq- cr7,ffc07ed4 ffc07b7c: 2f 83 00 58 cmpwi cr7,r3,88 ffc07b80: 41 9e 03 54 beq- cr7,ffc07ed4 base = 16; sign = false; } else if ( c == 'p' ) { ffc07b84: 2f 83 00 70 cmpwi cr7,r3,112 ffc07b88: 39 20 00 00 li r9,0 ffc07b8c: 3b a0 00 10 li r29,16 ffc07b90: 41 9e 00 64 beq- cr7,ffc07bf4 c = *++fmt; } if ( c == 'c' ) { /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); BSP_output_char(chr); ffc07b94: 80 1c 00 00 lwz r0,0(r28) ffc07b98: 7c 09 03 a6 mtctr r0 ffc07b9c: 4e 80 04 21 bctrl void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { ffc07ba0: 8c 7f 00 01 lbzu r3,1(r31) ffc07ba4: 2f 83 00 00 cmpwi cr7,r3,0 ffc07ba8: 40 9e ff 1c bne+ cr7,ffc07ac4 sign, width, lead ); } } ffc07bac: 80 01 00 5c lwz r0,92(r1) ffc07bb0: 81 81 00 2c lwz r12,44(r1) ffc07bb4: 7c 08 03 a6 mtlr r0 ffc07bb8: 82 c1 00 30 lwz r22,48(r1) ffc07bbc: 82 e1 00 34 lwz r23,52(r1) ffc07bc0: 7d 80 81 20 mtcrf 8,r12 ffc07bc4: 83 01 00 38 lwz r24,56(r1) ffc07bc8: 83 21 00 3c lwz r25,60(r1) ffc07bcc: 83 41 00 40 lwz r26,64(r1) ffc07bd0: 83 61 00 44 lwz r27,68(r1) ffc07bd4: 83 81 00 48 lwz r28,72(r1) ffc07bd8: 83 a1 00 4c lwz r29,76(r1) ffc07bdc: 83 c1 00 50 lwz r30,80(r1) ffc07be0: 83 e1 00 54 lwz r31,84(r1) ffc07be4: 38 21 00 58 addi r1,r1,88 ffc07be8: 4e 80 00 20 blr base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; ffc07bec: 39 20 00 01 li r9,1 ffc07bf0: 3b a0 00 0a li r29,10 } printNum( lflag ? va_arg(ap, long) : (long) va_arg(ap, int), ffc07bf4: 89 78 00 00 lbz r11,0(r24) ffc07bf8: 2b 8b 00 07 cmplwi cr7,r11,7 ffc07bfc: 41 9d 01 44 bgt- cr7,ffc07d40 ffc07c00: 38 0b 00 01 addi r0,r11,1 ffc07c04: 81 58 00 08 lwz r10,8(r24) ffc07c08: 55 6b 10 3a rlwinm r11,r11,2,0,29 ffc07c0c: 98 18 00 00 stb r0,0(r24) ffc07c10: 7d 6a 5a 14 add r11,r10,r11 unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { ffc07c14: 2f 89 00 00 cmpwi cr7,r9,0 } else { BSP_output_char(c); continue; } printNum( ffc07c18: 83 6b 00 00 lwz r27,0(r11) unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { ffc07c1c: 41 9e 00 0c beq- cr7,ffc07c28 ffc07c20: 2f 9b 00 00 cmpwi cr7,r27,0 ffc07c24: 41 9c 02 80 blt- cr7,ffc07ea4 BSP_output_char('-'); unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; } else { unsigned_num = (unsigned long) num; ffc07c28: 7f 6a db 78 mr r10,r27 } count = 0; while ((n = unsigned_num / base) > 0) { ffc07c2c: 7c 0a eb 96 divwu r0,r10,r29 ffc07c30: 2f 80 00 00 cmpwi cr7,r0,0 ffc07c34: 57 a7 06 3e clrlwi r7,r29,24 ffc07c38: 39 20 00 00 li r9,0 ffc07c3c: 3b 60 00 01 li r27,1 ffc07c40: 40 be 00 10 bne+ cr7,ffc07c50 ffc07c44: 48 00 00 34 b ffc07c78 ffc07c48: 7c 0a 03 78 mr r10,r0 ffc07c4c: 7d 60 5b 78 mr r0,r11 ffc07c50: 7d 60 eb 96 divwu r11,r0,r29 ffc07c54: 2f 8b 00 00 cmpwi cr7,r11,0 toPrint[count++] = (char) (unsigned_num - (n * base)); ffc07c58: 7f 67 01 d6 mullw r27,r7,r0 ffc07c5c: 7d 01 4a 14 add r8,r1,r9 ffc07c60: 7d 5b 50 50 subf r10,r27,r10 ffc07c64: 99 48 00 08 stb r10,8(r8) ffc07c68: 39 29 00 01 addi r9,r9,1 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { ffc07c6c: 40 9e ff dc bne+ cr7,ffc07c48 ffc07c70: 7c 0a 03 78 mr r10,r0 ffc07c74: 3b 69 00 01 addi r27,r9,1 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) ffc07c78: 7f 9e d8 40 cmplw cr7,r30,r27 count = 0; while ((n = unsigned_num / base) > 0) { toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; ffc07c7c: 7d 21 4a 14 add r9,r1,r9 ffc07c80: 99 49 00 08 stb r10,8(r9) for (n=maxwidth ; n > count; n-- ) ffc07c84: 40 9d 00 20 ble- cr7,ffc07ca4 BSP_output_char(lead); ffc07c88: 80 1c 00 00 lwz r0,0(r28) ffc07c8c: 7f 23 cb 78 mr r3,r25 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) ffc07c90: 3b de ff ff addi r30,r30,-1 BSP_output_char(lead); ffc07c94: 7c 09 03 a6 mtctr r0 ffc07c98: 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-- ) ffc07c9c: 7f 9e d8 40 cmplw cr7,r30,r27 ffc07ca0: 41 9d ff e8 bgt+ cr7,ffc07c88 BSP_output_char(lead); for (n = 0; n < count; n++) { ffc07ca4: 2f 9b 00 00 cmpwi cr7,r27,0 ffc07ca8: 41 be fe f8 beq- cr7,ffc07ba0 <== NEVER TAKEN ffc07cac: 3b bb ff ff addi r29,r27,-1 ffc07cb0: 7f b7 ea 14 add r29,r23,r29 ffc07cb4: 3b c0 00 00 li r30,0 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); ffc07cb8: 89 3d 00 00 lbz r9,0(r29) toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { ffc07cbc: 3b de 00 01 addi r30,r30,1 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); ffc07cc0: 80 1c 00 00 lwz r0,0(r28) toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { ffc07cc4: 3b bd ff ff addi r29,r29,-1 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); ffc07cc8: 7c 7a 48 ae lbzx r3,r26,r9 ffc07ccc: 7c 09 03 a6 mtctr r0 ffc07cd0: 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++) { ffc07cd4: 7f 9e d8 40 cmplw cr7,r30,r27 ffc07cd8: 41 9c ff e0 blt+ cr7,ffc07cb8 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { ffc07cdc: 8c 7f 00 01 lbzu r3,1(r31) ffc07ce0: 2f 83 00 00 cmpwi cr7,r3,0 ffc07ce4: 40 9e fd e0 bne+ cr7,ffc07ac4 <== ALWAYS TAKEN ffc07ce8: 4b ff fe c4 b ffc07bac <== NOT EXECUTED lead = '0'; fmt++; } if (*fmt == '-' ) { minus = true; fmt++; ffc07cec: 8c 7f 00 01 lbzu r3,1(r31) ffc07cf0: 39 20 00 01 li r9,1 ffc07cf4: 4b ff fd f4 b ffc07ae8 continue; } fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; ffc07cf8: 8c 7f 00 01 lbzu r3,1(r31) ffc07cfc: 3b 20 00 30 li r25,48 ffc07d00: 4b ff fd dc b ffc07adc lflag = true; c = *++fmt; } if ( c == 'c' ) { /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); ffc07d04: 89 38 00 00 lbz r9,0(r24) ffc07d08: 2b 89 00 07 cmplwi cr7,r9,7 ffc07d0c: 41 9d 01 64 bgt- cr7,ffc07e70 <== NEVER TAKEN ffc07d10: 38 09 00 01 addi r0,r9,1 ffc07d14: 81 78 00 08 lwz r11,8(r24) ffc07d18: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc07d1c: 98 18 00 00 stb r0,0(r24) ffc07d20: 7d 2b 4a 14 add r9,r11,r9 BSP_output_char(chr); ffc07d24: 88 69 00 03 lbz r3,3(r9) ffc07d28: 80 1c 00 00 lwz r0,0(r28) ffc07d2c: 7c 09 03 a6 mtctr r0 ffc07d30: 4e 80 04 21 bctrl ffc07d34: 4b ff fe 6c b ffc07ba0 fmt++; } if ((c = *fmt) == 'l') { lflag = true; c = *++fmt; ffc07d38: 8c 7f 00 01 lbzu r3,1(r31) ffc07d3c: 4b ff fd e8 b ffc07b24 BSP_output_char(c); continue; } printNum( lflag ? va_arg(ap, long) : (long) va_arg(ap, int), ffc07d40: 81 78 00 04 lwz r11,4(r24) ffc07d44: 38 0b 00 04 addi r0,r11,4 ffc07d48: 90 18 00 04 stw r0,4(r24) ffc07d4c: 4b ff fe c8 b ffc07c14 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; ffc07d50: 39 20 00 00 li r9,0 ffc07d54: 3b a0 00 08 li r29,8 ffc07d58: 4b ff fe 9c b ffc07bf4 } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); ffc07d5c: 89 78 00 00 lbz r11,0(r24) ffc07d60: 2b 8b 00 07 cmplwi cr7,r11,7 ffc07d64: 41 9d 01 20 bgt- cr7,ffc07e84 <== NEVER TAKEN ffc07d68: 38 0b 00 01 addi r0,r11,1 ffc07d6c: 81 58 00 08 lwz r10,8(r24) ffc07d70: 55 6b 10 3a rlwinm r11,r11,2,0,29 ffc07d74: 98 18 00 00 stb r0,0(r24) ffc07d78: 7d 6a 5a 14 add r11,r10,r11 ffc07d7c: 83 6b 00 00 lwz r27,0(r11) if ( str == NULL ) { ffc07d80: 2f 9b 00 00 cmpwi cr7,r27,0 ffc07d84: 41 9e 01 18 beq- cr7,ffc07e9c str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) ffc07d88: 88 1b 00 00 lbz r0,0(r27) ffc07d8c: 3b a0 00 00 li r29,0 ffc07d90: 2f 80 00 00 cmpwi cr7,r0,0 ffc07d94: 41 9e 00 14 beq- cr7,ffc07da8 ffc07d98: 3b bd 00 01 addi r29,r29,1 ffc07d9c: 7c 1b e8 ae lbzx r0,r27,r29 ffc07da0: 2f 80 00 00 cmpwi cr7,r0,0 ffc07da4: 40 9e ff f4 bne+ cr7,ffc07d98 ; /* leading spaces */ if ( !minus ) ffc07da8: 2e 09 00 00 cmpwi cr4,r9,0 ffc07dac: 40 92 00 2c bne- cr4,ffc07dd8 for ( i=len ; i ffc07db8: 7f b9 eb 78 mr r25,r29 BSP_output_char(' '); ffc07dbc: 80 1c 00 00 lwz r0,0(r28) ffc07dc0: 38 60 00 20 li r3,32 for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i BSP_output_char(' '); /* no width option */ if (width == 0) { ffc07dd8: 2f 9e 00 00 cmpwi cr7,r30,0 ffc07ddc: 40 9e 00 10 bne- cr7,ffc07dec width = len; } /* output the string */ for ( i=0 ; i ffc07de8: 7f be eb 78 mr r30,r29 ffc07dec: 88 7b 00 00 lbz r3,0(r27) ffc07df0: 2f 83 00 00 cmpwi cr7,r3,0 ffc07df4: 41 9e 00 34 beq- cr7,ffc07e28 <== NEVER TAKEN BSP_output_char(*str); ffc07df8: 80 1c 00 00 lwz r0,0(r28) if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i ffc07e0c: 80 1c 00 00 lwz r0,0(r28) ffc07e10: 7c 09 03 a6 mtctr r0 ffc07e14: 4e 80 04 21 bctrl if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); /* trailing spaces */ if ( minus ) ffc07e28: 41 b2 fd 78 beq- cr4,ffc07ba0 for ( i=len ; i BSP_output_char(' '); ffc07e34: 80 1c 00 00 lwz r0,0(r28) ffc07e38: 38 60 00 20 li r3,32 for ( i=0 ; i <== NEVER TAKEN BSP_output_char(' '); ffc07e50: 80 1c 00 00 lwz r0,0(r28) ffc07e54: 38 60 00 20 li r3,32 for ( i=0 ; i ffc07e6c: 4b ff fd 34 b ffc07ba0 lflag = true; c = *++fmt; } if ( c == 'c' ) { /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); ffc07e70: 81 38 00 04 lwz r9,4(r24) <== NOT EXECUTED ffc07e74: 38 09 00 04 addi r0,r9,4 <== NOT EXECUTED ffc07e78: 90 18 00 04 stw r0,4(r24) <== NOT EXECUTED BSP_output_char(chr); ffc07e7c: 88 69 00 03 lbz r3,3(r9) <== NOT EXECUTED ffc07e80: 4b ff fe a8 b ffc07d28 <== NOT EXECUTED } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); ffc07e84: 81 78 00 04 lwz r11,4(r24) <== NOT EXECUTED ffc07e88: 38 0b 00 04 addi r0,r11,4 <== NOT EXECUTED ffc07e8c: 90 18 00 04 stw r0,4(r24) <== NOT EXECUTED ffc07e90: 83 6b 00 00 lwz r27,0(r11) <== NOT EXECUTED if ( str == NULL ) { ffc07e94: 2f 9b 00 00 cmpwi cr7,r27,0 <== NOT EXECUTED ffc07e98: 40 9e fe f0 bne+ cr7,ffc07d88 <== NOT EXECUTED ffc07e9c: 7e db b3 78 mr r27,r22 ffc07ea0: 4b ff fe e8 b ffc07d88 unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); ffc07ea4: 80 1c 00 00 lwz r0,0(r28) ffc07ea8: 38 60 00 2d li r3,45 ffc07eac: 7c 09 03 a6 mtctr r0 ffc07eb0: 4e 80 04 21 bctrl unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; ffc07eb4: 31 3e ff ff addic r9,r30,-1 ffc07eb8: 7c 09 f1 10 subfe r0,r9,r30 ffc07ebc: 7f c0 f0 50 subf r30,r0,r30 unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); unsigned_num = (unsigned long) -num; ffc07ec0: 7d 5b 00 d0 neg r10,r27 ffc07ec4: 4b ff fd 68 b ffc07c2c base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; ffc07ec8: 39 20 00 00 li r9,0 ffc07ecc: 3b a0 00 0a li r29,10 ffc07ed0: 4b ff fd 24 b ffc07bf4 ffc07ed4: 39 20 00 00 li r9,0 ffc07ed8: 3b a0 00 10 li r29,16 ffc07edc: 4b ff fd 18 b ffc07bf4 =============================================================================== ffc1e3cc : ssize_t write( int fd, const void *buffer, size_t count ) { ffc1e3cc: 94 21 ff f0 stwu r1,-16(r1) ffc1e3d0: 7c 08 02 a6 mflr r0 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc1e3d4: 3d 20 00 00 lis r9,0 ssize_t write( int fd, const void *buffer, size_t count ) { ffc1e3d8: 90 01 00 14 stw r0,20(r1) ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc1e3dc: 80 09 26 8c lwz r0,9868(r9) ssize_t write( int fd, const void *buffer, size_t count ) { ffc1e3e0: 93 e1 00 0c stw r31,12(r1) ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc1e3e4: 7f 83 00 40 cmplw cr7,r3,r0 ffc1e3e8: 40 9c 00 94 bge- cr7,ffc1e47c <== NEVER TAKEN iop = rtems_libio_iop( fd ); ffc1e3ec: 3d 60 00 00 lis r11,0 ffc1e3f0: 83 eb 27 4c lwz r31,10060(r11) ffc1e3f4: 1c 63 00 48 mulli r3,r3,72 ffc1e3f8: 7f ff 1a 14 add r31,r31,r3 rtems_libio_check_is_open( iop ); ffc1e3fc: 81 7f 00 18 lwz r11,24(r31) ffc1e400: 71 6a 01 00 andi. r10,r11,256 ffc1e404: 41 82 00 78 beq- ffc1e47c <== NEVER TAKEN rtems_libio_check_buffer( buffer ); ffc1e408: 2f 84 00 00 cmpwi cr7,r4,0 ffc1e40c: 41 9e 00 84 beq- cr7,ffc1e490 <== NEVER TAKEN rtems_libio_check_count( count ); ffc1e410: 2f 85 00 00 cmpwi cr7,r5,0 ffc1e414: 38 60 00 00 li r3,0 ffc1e418: 41 9e 00 50 beq- cr7,ffc1e468 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); ffc1e41c: 71 60 00 04 andi. r0,r11,4 ffc1e420: 41 82 00 70 beq- ffc1e490 <== NEVER TAKEN /* * Now process the write() request. */ if ( !iop->handlers->write_h ) ffc1e424: 81 3f 00 40 lwz r9,64(r31) ffc1e428: 80 09 00 0c lwz r0,12(r9) ffc1e42c: 2f 80 00 00 cmpwi cr7,r0,0 ffc1e430: 41 9e 00 74 beq- cr7,ffc1e4a4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); ffc1e434: 7f e3 fb 78 mr r3,r31 ffc1e438: 7c 09 03 a6 mtctr r0 ffc1e43c: 4e 80 04 21 bctrl if ( rc > 0 ) ffc1e440: 2c 03 00 00 cmpwi r3,0 ffc1e444: 40 81 00 24 ble- ffc1e468 <== NEVER TAKEN iop->offset += rc; ffc1e448: 80 ff 00 10 lwz r7,16(r31) ffc1e44c: 7c 6a 1b 78 mr r10,r3 ffc1e450: 81 1f 00 14 lwz r8,20(r31) ffc1e454: 7c 69 fe 70 srawi r9,r3,31 ffc1e458: 7d 88 50 14 addc r12,r8,r10 ffc1e45c: 7d 67 49 14 adde r11,r7,r9 ffc1e460: 91 7f 00 10 stw r11,16(r31) ffc1e464: 91 9f 00 14 stw r12,20(r31) return rc; } ffc1e468: 80 01 00 14 lwz r0,20(r1) ffc1e46c: 83 e1 00 0c lwz r31,12(r1) ffc1e470: 38 21 00 10 addi r1,r1,16 ffc1e474: 7c 08 03 a6 mtlr r0 ffc1e478: 4e 80 00 20 blr ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); ffc1e47c: 4b ff 4d f9 bl ffc13274 <__errno> <== NOT EXECUTED ffc1e480: 38 00 00 09 li r0,9 <== NOT EXECUTED ffc1e484: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc1e488: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc1e48c: 4b ff ff dc b ffc1e468 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); ffc1e490: 4b ff 4d e5 bl ffc13274 <__errno> <== NOT EXECUTED ffc1e494: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc1e498: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc1e49c: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc1e4a0: 4b ff ff c8 b ffc1e468 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc1e4a4: 4b ff 4d d1 bl ffc13274 <__errno> <== NOT EXECUTED ffc1e4a8: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc1e4ac: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc1e4b0: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc1e4b4: 4b ff ff b4 b ffc1e468 <== NOT EXECUTED =============================================================================== ffc099fc : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { ffc099fc: 94 21 ff d8 stwu r1,-40(r1) ffc09a00: 7c 08 02 a6 mflr r0 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); ffc09a04: 3d 20 00 00 lis r9,0 ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { ffc09a08: 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 ); ffc09a0c: 80 09 26 8c lwz r0,9868(r9) ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { ffc09a10: 93 a1 00 1c stw r29,28(r1) ffc09a14: 7c bd 2b 78 mr r29,r5 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); ffc09a18: 7f 83 00 40 cmplw cr7,r3,r0 ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { ffc09a1c: 93 21 00 0c stw r25,12(r1) ffc09a20: 93 41 00 10 stw r26,16(r1) ffc09a24: 93 61 00 14 stw r27,20(r1) ffc09a28: 93 81 00 18 stw r28,24(r1) ffc09a2c: 93 c1 00 20 stw r30,32(r1) ffc09a30: 93 e1 00 24 stw r31,36(r1) int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); ffc09a34: 40 9c 01 78 bge- cr7,ffc09bac <== NEVER TAKEN iop = rtems_libio_iop( fd ); ffc09a38: 3d 20 00 00 lis r9,0 ffc09a3c: 83 89 27 50 lwz r28,10064(r9) ffc09a40: 1c 63 00 48 mulli r3,r3,72 ffc09a44: 7f 9c 1a 14 add r28,r28,r3 rtems_libio_check_is_open( iop ); ffc09a48: 80 1c 00 18 lwz r0,24(r28) ffc09a4c: 70 09 01 00 andi. r9,r0,256 ffc09a50: 41 82 01 5c beq- ffc09bac rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); ffc09a54: 70 09 00 04 andi. r9,r0,4 ffc09a58: 41 82 01 14 beq- ffc09b6c <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) ffc09a5c: 2f 84 00 00 cmpwi cr7,r4,0 ffc09a60: 41 9e 01 0c beq- cr7,ffc09b6c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) ffc09a64: 2f 85 00 00 cmpwi cr7,r5,0 ffc09a68: 40 9d 01 04 ble- cr7,ffc09b6c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) ffc09a6c: 2f 85 04 00 cmpwi cr7,r5,1024 ffc09a70: 41 9d 00 fc bgt- cr7,ffc09b6c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) ffc09a74: 81 3c 00 40 lwz r9,64(r28) ffc09a78: 80 09 00 0c lwz r0,12(r9) ffc09a7c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09a80: 41 9e 01 40 beq- cr7,ffc09bc0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc09a84: 7c 9f 23 78 mr r31,r4 ffc09a88: 7c a9 03 a6 mtctr r5 ffc09a8c: 7c 89 23 78 mr r9,r4 ffc09a90: 39 00 00 01 li r8,1 ffc09a94: 39 60 00 00 li r11,0 ffc09a98: 48 00 00 08 b ffc09aa0 * 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++ ) { ffc09a9c: 7c 0b 03 78 mr r11,r0 if ( !iov[v].iov_base ) ffc09aa0: 80 09 00 00 lwz r0,0(r9) ffc09aa4: 2f 80 00 00 cmpwi cr7,r0,0 ffc09aa8: 41 9e 00 c4 beq- cr7,ffc09b6c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) ffc09aac: 81 49 00 04 lwz r10,4(r9) * 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++ ) { ffc09ab0: 39 29 00 08 addi r9,r9,8 if ( iov[v].iov_len ) all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; ffc09ab4: 7c 0b 52 14 add r0,r11,r10 if ( total < old || total > SSIZE_MAX ) ffc09ab8: 7f 8b 00 00 cmpw cr7,r11,r0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) ffc09abc: 31 4a ff ff addic r10,r10,-1 ffc09ac0: 7d 4a 51 10 subfe r10,r10,r10 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) ffc09ac4: 2f 00 7f ff cmpwi cr6,r0,32767 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) ffc09ac8: 7d 08 50 38 and r8,r8,r10 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) ffc09acc: 41 9d 00 a0 bgt- cr7,ffc09b6c ffc09ad0: 41 99 00 9c bgt- cr6,ffc09b6c <== NEVER TAKEN * 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++ ) { ffc09ad4: 42 00 ff c8 bdnz+ ffc09a9c } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { ffc09ad8: 2f 88 00 00 cmpwi cr7,r8,0 ffc09adc: 3b c0 00 00 li r30,0 ffc09ae0: 3b 60 00 00 li r27,0 ffc09ae4: 40 9e 00 98 bne- cr7,ffc09b7c /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) ffc09ae8: 80 bf 00 04 lwz r5,4(r31) } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc09aec: 3b de 00 01 addi r30,r30,1 /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) ffc09af0: 2f 85 00 00 cmpwi cr7,r5,0 ffc09af4: 40 9e 00 20 bne- cr7,ffc09b14 <== ALWAYS TAKEN } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc09af8: 7f 9d f0 00 cmpw cr7,r29,r30 ffc09afc: 3b ff 00 08 addi r31,r31,8 ffc09b00: 40 9d 00 7c ble- cr7,ffc09b7c /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) ffc09b04: 80 bf 00 04 lwz r5,4(r31) } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc09b08: 3b de 00 01 addi r30,r30,1 /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) ffc09b0c: 2f 85 00 00 cmpwi cr7,r5,0 ffc09b10: 41 9e ff e8 beq+ cr7,ffc09af8 <== NEVER TAKEN continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); ffc09b14: 81 3c 00 40 lwz r9,64(r28) ffc09b18: 7f 83 e3 78 mr r3,r28 ffc09b1c: 80 9f 00 00 lwz r4,0(r31) ffc09b20: 80 09 00 0c lwz r0,12(r9) ffc09b24: 7c 09 03 a6 mtctr r0 ffc09b28: 4e 80 04 21 bctrl if ( bytes < 0 ) ffc09b2c: 2c 03 00 00 cmpwi r3,0 ffc09b30: 41 80 00 a4 blt- ffc09bd4 <== NEVER TAKEN return -1; if ( bytes > 0 ) { ffc09b34: 41 82 00 28 beq- ffc09b5c <== NEVER TAKEN iop->offset += bytes; ffc09b38: 81 7c 00 10 lwz r11,16(r28) ffc09b3c: 7c 7a 1b 78 mr r26,r3 ffc09b40: 81 9c 00 14 lwz r12,20(r28) ffc09b44: 7c 79 fe 70 srawi r25,r3,31 total += bytes; ffc09b48: 7f 7b 1a 14 add r27,r27,r3 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; ffc09b4c: 7d 4c d0 14 addc r10,r12,r26 ffc09b50: 7d 2b c9 14 adde r9,r11,r25 ffc09b54: 91 3c 00 10 stw r9,16(r28) ffc09b58: 91 5c 00 14 stw r10,20(r28) total += bytes; } if (bytes != iov[ v ].iov_len) ffc09b5c: 80 1f 00 04 lwz r0,4(r31) ffc09b60: 7f 83 00 00 cmpw cr7,r3,r0 ffc09b64: 41 9e ff 94 beq+ cr7,ffc09af8 <== ALWAYS TAKEN ffc09b68: 48 00 00 14 b ffc09b7c <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); ffc09b6c: 48 00 c7 21 bl ffc1628c <__errno> ffc09b70: 38 00 00 16 li r0,22 ffc09b74: 90 03 00 00 stw r0,0(r3) ffc09b78: 3b 60 ff ff li r27,-1 if (bytes != iov[ v ].iov_len) break; } return total; } ffc09b7c: 80 01 00 2c lwz r0,44(r1) ffc09b80: 7f 63 db 78 mr r3,r27 ffc09b84: 83 21 00 0c lwz r25,12(r1) ffc09b88: 7c 08 03 a6 mtlr r0 ffc09b8c: 83 41 00 10 lwz r26,16(r1) ffc09b90: 83 61 00 14 lwz r27,20(r1) ffc09b94: 83 81 00 18 lwz r28,24(r1) ffc09b98: 83 a1 00 1c lwz r29,28(r1) ffc09b9c: 83 c1 00 20 lwz r30,32(r1) ffc09ba0: 83 e1 00 24 lwz r31,36(r1) ffc09ba4: 38 21 00 28 addi r1,r1,40 ffc09ba8: 4e 80 00 20 blr ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); ffc09bac: 48 00 c6 e1 bl ffc1628c <__errno> ffc09bb0: 38 00 00 09 li r0,9 ffc09bb4: 90 03 00 00 stw r0,0(r3) ffc09bb8: 3b 60 ff ff li r27,-1 ffc09bbc: 4b ff ff c0 b ffc09b7c if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc09bc0: 48 00 c6 cd bl ffc1628c <__errno> <== NOT EXECUTED ffc09bc4: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc09bc8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc09bcc: 3b 60 ff ff li r27,-1 <== NOT EXECUTED ffc09bd0: 4b ff ff ac b ffc09b7c <== NOT EXECUTED if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) ffc09bd4: 3b 60 ff ff li r27,-1 <== NOT EXECUTED ffc09bd8: 4b ff ff a4 b ffc09b7c <== NOT EXECUTED