=============================================================================== ffc11db0 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { ffc11db0: 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; ffc11db4: 81 23 00 10 lwz r9,16(r3) switch( node->type ) { ffc11db8: 81 6b 00 4c lwz r11,76(r11) ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; ffc11dbc: 81 29 00 34 lwz r9,52(r9) switch( node->type ) { ffc11dc0: 38 0b ff ff addi r0,r11,-1 ffc11dc4: 2b 80 00 06 cmplwi cr7,r0,6 ffc11dc8: 41 9d 00 54 bgt- cr7,ffc11e1c <== NEVER TAKEN ffc11dcc: 3d 60 ff c2 lis r11,-62 ffc11dd0: 39 6b 4a 8c addi r11,r11,19084 ffc11dd4: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc11dd8: 7c 0b 00 2e lwzx r0,r11,r0 ffc11ddc: 7d 60 5a 14 add r11,r0,r11 ffc11de0: 7d 69 03 a6 mtctr r11 ffc11de4: 4e 80 04 20 bctr case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; ffc11de8: 80 09 00 0c lwz r0,12(r9) ffc11dec: 48 00 00 2c b ffc11e18 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; ffc11df0: 3d 20 ff c2 lis r9,-62 ffc11df4: 38 09 4b 58 addi r0,r9,19288 ffc11df8: 48 00 00 20 b ffc11e18 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; ffc11dfc: 3d 20 ff c2 lis r9,-62 ffc11e00: 38 09 4b c8 addi r0,r9,19400 ffc11e04: 48 00 00 14 b ffc11e18 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; ffc11e08: 80 09 00 08 lwz r0,8(r9) ffc11e0c: 48 00 00 0c b ffc11e18 break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; ffc11e10: 3d 20 ff c2 lis r9,-62 ffc11e14: 38 09 4a a8 addi r0,r9,19112 ffc11e18: 90 03 00 08 stw r0,8(r3) break; } return 0; } ffc11e1c: 38 60 00 00 li r3,0 ffc11e20: 4e 80 00 20 blr =============================================================================== ffc11b4c : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { ffc11b4c: 94 21 ff d8 stwu r1,-40(r1) ffc11b50: 7c 08 02 a6 mflr r0 ffc11b54: 93 81 00 18 stw r28,24(r1) ffc11b58: 7c 9c 23 78 mr r28,r4 struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); ffc11b5c: 38 80 00 68 li r4,104 IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { ffc11b60: 93 a1 00 1c stw r29,28(r1) ffc11b64: 7c 7d 1b 78 mr r29,r3 struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); ffc11b68: 38 60 00 01 li r3,1 IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { ffc11b6c: 93 c1 00 20 stw r30,32(r1) ffc11b70: 7c be 2b 78 mr r30,r5 ffc11b74: 93 e1 00 24 stw r31,36(r1) ffc11b78: 90 01 00 2c stw r0,44(r1) struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); ffc11b7c: 4b ff 3c 29 bl ffc057a4 if ( !node ) ffc11b80: 7c 7f 1b 79 mr. r31,r3 ffc11b84: 41 82 00 50 beq- ffc11bd4 <== NEVER TAKEN return NULL; /* * Fill in the basic information */ node->st_nlink = 1; ffc11b88: 38 00 00 01 li r0,1 node->type = type; ffc11b8c: 93 bf 00 4c stw r29,76(r31) strncpy( node->name, name, IMFS_NAME_MAX ); ffc11b90: 7f 84 e3 78 mr r4,r28 return NULL; /* * Fill in the basic information */ node->st_nlink = 1; ffc11b94: b0 1f 00 34 sth r0,52(r31) node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); ffc11b98: 38 a0 00 20 li r5,32 ffc11b9c: 38 7f 00 0c addi r3,r31,12 ffc11ba0: 48 00 78 29 bl ffc193c8 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; ffc11ba4: 93 df 00 30 stw r30,48(r31) #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); ffc11ba8: 48 00 14 c1 bl ffc13068 ffc11bac: b0 7f 00 3c sth r3,60(r31) node->st_gid = getegid(); ffc11bb0: 48 00 14 a9 bl ffc13058 #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); ffc11bb4: 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(); ffc11bb8: b0 7f 00 3e sth r3,62(r31) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); ffc11bbc: 38 61 00 08 addi r3,r1,8 ffc11bc0: 4b ff 3f bd bl ffc05b7c node->stat_atime = (time_t) tv.tv_sec; ffc11bc4: 80 01 00 08 lwz r0,8(r1) node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; ffc11bc8: 90 1f 00 48 stw r0,72(r31) /* * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; ffc11bcc: 90 1f 00 40 stw r0,64(r31) node->stat_mtime = (time_t) tv.tv_sec; ffc11bd0: 90 1f 00 44 stw r0,68(r31) node->stat_ctime = (time_t) tv.tv_sec; return node; } ffc11bd4: 80 01 00 2c lwz r0,44(r1) ffc11bd8: 7f e3 fb 78 mr r3,r31 ffc11bdc: 83 81 00 18 lwz r28,24(r1) ffc11be0: 7c 08 03 a6 mtlr r0 ffc11be4: 83 a1 00 1c lwz r29,28(r1) ffc11be8: 83 c1 00 20 lwz r30,32(r1) ffc11bec: 83 e1 00 24 lwz r31,36(r1) ffc11bf0: 38 21 00 28 addi r1,r1,40 ffc11bf4: 4e 80 00 20 blr =============================================================================== ffc11ac0 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { ffc11ac0: 94 21 ff d8 stwu r1,-40(r1) ffc11ac4: 7c 08 02 a6 mflr r0 ffc11ac8: 90 01 00 2c stw r0,44(r1) ffc11acc: 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; ffc11ad0: 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 */ ) { ffc11ad4: 93 a1 00 1c stw r29,28(r1) ffc11ad8: 7c bd 2b 78 mr r29,r5 ffc11adc: 93 c1 00 20 stw r30,32(r1) ffc11ae0: 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(); ffc11ae4: 48 00 15 85 bl ffc13068 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) ffc11ae8: a0 1f 00 3c lhz r0,60(r31) ffc11aec: 7f 80 18 00 cmpw cr7,r0,r3 ffc11af0: 41 9e 00 20 beq- cr7,ffc11b10 <== ALWAYS TAKEN ffc11af4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc11af8: 41 be 00 18 beq+ cr7,ffc11b10 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); ffc11afc: 48 00 65 71 bl ffc1806c <__errno> <== NOT EXECUTED ffc11b00: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc11b04: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc11b08: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc11b0c: 48 00 00 24 b ffc11b30 <== NOT EXECUTED #endif jnode->st_uid = owner; ffc11b10: b3 df 00 3c sth r30,60(r31) jnode->st_gid = group; IMFS_update_ctime( jnode ); ffc11b14: 38 61 00 08 addi r3,r1,8 ffc11b18: 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; ffc11b1c: b3 bf 00 3e sth r29,62(r31) IMFS_update_ctime( jnode ); ffc11b20: 4b ff 40 5d bl ffc05b7c ffc11b24: 80 01 00 08 lwz r0,8(r1) ffc11b28: 38 60 00 00 li r3,0 ffc11b2c: 90 1f 00 48 stw r0,72(r31) return 0; } ffc11b30: 80 01 00 2c lwz r0,44(r1) ffc11b34: 83 a1 00 1c lwz r29,28(r1) ffc11b38: 7c 08 03 a6 mtlr r0 ffc11b3c: 83 c1 00 20 lwz r30,32(r1) ffc11b40: 83 e1 00 24 lwz r31,36(r1) ffc11b44: 38 21 00 28 addi r1,r1,40 ffc11b48: 4e 80 00 20 blr =============================================================================== ffc11c48 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ffc11c48: 94 21 ff e8 stwu r1,-24(r1) ffc11c4c: 7c 08 02 a6 mflr r0 ffc11c50: 93 e1 00 14 stw r31,20(r1) IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) ffc11c54: 7c 7f 1b 79 mr. r31,r3 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ffc11c58: 93 81 00 08 stw r28,8(r1) IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) ffc11c5c: 3b 80 00 00 li r28,0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { ffc11c60: 93 a1 00 0c stw r29,12(r1) ffc11c64: 7c fd 3b 78 mr r29,r7 ffc11c68: 93 c1 00 10 stw r30,16(r1) ffc11c6c: 7c 9e 23 78 mr r30,r4 ffc11c70: 90 01 00 1c stw r0,28(r1) IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) ffc11c74: 41 a2 01 18 beq+ ffc11d8c <== NEVER TAKEN return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); ffc11c78: 3d 20 00 00 lis r9,0 ffc11c7c: 81 29 26 f4 lwz r9,9972(r9) ffc11c80: 7c a4 2b 78 mr r4,r5 ffc11c84: 7f c3 f3 78 mr r3,r30 ffc11c88: 80 a9 00 2c lwz r5,44(r9) ffc11c8c: 7c c5 28 78 andc r5,r6,r5 ffc11c90: 4b ff fe bd bl ffc11b4c if ( !node ) ffc11c94: 7c 7c 1b 79 mr. r28,r3 ffc11c98: 41 82 00 f4 beq- ffc11d8c <== NEVER TAKEN return NULL; /* * Set the type specific information */ switch (type) { ffc11c9c: 3b de ff ff addi r30,r30,-1 ffc11ca0: 2b 9e 00 06 cmplwi cr7,r30,6 ffc11ca4: 41 9d 00 9c bgt- cr7,ffc11d40 <== NEVER TAKEN ffc11ca8: 3d 20 ff c2 lis r9,-62 ffc11cac: 39 29 4a 14 addi r9,r9,18964 ffc11cb0: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc11cb4: 7c 09 f0 2e lwzx r0,r9,r30 ffc11cb8: 7d 20 4a 14 add r9,r0,r9 ffc11cbc: 7d 29 03 a6 mtctr r9 ffc11cc0: 4e 80 04 20 bctr */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc11cc4: 39 3c 00 54 addi r9,r28,84 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc11cc8: 38 1c 00 50 addi r0,r28,80 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc11ccc: 91 3c 00 50 stw r9,80(r28) the_chain->permanent_null = NULL; ffc11cd0: 39 20 00 00 li r9,0 ffc11cd4: 91 3c 00 54 stw r9,84(r28) the_chain->last = _Chain_Head(the_chain); ffc11cd8: 90 1c 00 58 stw r0,88(r28) ffc11cdc: 48 00 00 84 b ffc11d60 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; ffc11ce0: 80 1d 00 00 lwz r0,0(r29) ffc11ce4: 48 00 00 54 b ffc11d38 break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; ffc11ce8: 81 3d 00 04 lwz r9,4(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; ffc11cec: 80 1d 00 00 lwz r0,0(r29) node->info.device.minor = info->device.minor; ffc11cf0: 91 3c 00 54 stw r9,84(r28) ffc11cf4: 48 00 00 44 b ffc11d38 break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; ffc11cf8: 39 20 00 00 li r9,0 <== NOT EXECUTED ffc11cfc: 39 40 00 00 li r10,0 <== NOT EXECUTED ffc11d00: 91 3c 00 50 stw r9,80(r28) <== NOT EXECUTED node->info.linearfile.direct = 0; ffc11d04: 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; ffc11d08: 91 5c 00 54 stw r10,84(r28) <== NOT EXECUTED node->info.linearfile.direct = 0; ffc11d0c: 90 1c 00 58 stw r0,88(r28) <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; ffc11d10: 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; ffc11d14: 39 20 00 00 li r9,0 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; ffc11d18: 90 1c 00 60 stw r0,96(r28) case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; ffc11d1c: 39 40 00 00 li r10,0 ffc11d20: 91 3c 00 50 stw r9,80(r28) ffc11d24: 91 5c 00 54 stw r10,84(r28) node->info.file.indirect = 0; ffc11d28: 90 1c 00 58 stw r0,88(r28) node->info.file.doubly_indirect = 0; ffc11d2c: 90 1c 00 5c stw r0,92(r28) node->info.file.triply_indirect = 0; break; ffc11d30: 48 00 00 30 b ffc11d60 case IMFS_FIFO: node->info.fifo.pipe = NULL; ffc11d34: 38 00 00 00 li r0,0 ffc11d38: 90 1c 00 50 stw r0,80(r28) break; ffc11d3c: 48 00 00 24 b ffc11d60 default: assert(0); ffc11d40: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc11d44: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc11d48: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc11d4c: 38 63 4a 41 addi r3,r3,19009 <== NOT EXECUTED ffc11d50: 38 a5 4a 30 addi r5,r5,18992 <== NOT EXECUTED ffc11d54: 38 c6 41 0f addi r6,r6,16655 <== NOT EXECUTED ffc11d58: 38 80 00 5c li r4,92 <== NOT EXECUTED ffc11d5c: 4b ff 38 71 bl ffc055cc <__assert_func> <== NOT EXECUTED /* * 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; ffc11d60: 81 3f 00 10 lwz r9,16(r31) ffc11d64: 7f 84 e3 78 mr r4,r28 } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; ffc11d68: 80 7f 00 00 lwz r3,0(r31) fs_info = parent_loc->mt_entry->fs_info; ffc11d6c: 81 29 00 34 lwz r9,52(r9) node->Parent = parent; ffc11d70: 90 7c 00 08 stw r3,8(r28) ffc11d74: 38 63 00 50 addi r3,r3,80 node->st_ino = ++fs_info->ino_count; ffc11d78: 81 69 00 04 lwz r11,4(r9) ffc11d7c: 38 0b 00 01 addi r0,r11,1 ffc11d80: 90 09 00 04 stw r0,4(r9) ffc11d84: 90 1c 00 38 stw r0,56(r28) ffc11d88: 4b ff 8b cd bl ffc0a954 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } ffc11d8c: 80 01 00 1c lwz r0,28(r1) ffc11d90: 7f 83 e3 78 mr r3,r28 ffc11d94: 83 a1 00 0c lwz r29,12(r1) ffc11d98: 7c 08 03 a6 mtlr r0 ffc11d9c: 83 81 00 08 lwz r28,8(r1) ffc11da0: 83 c1 00 10 lwz r30,16(r1) ffc11da4: 83 e1 00 14 lwz r31,20(r1) ffc11da8: 38 21 00 18 addi r1,r1,24 ffc11dac: 4e 80 00 20 blr =============================================================================== ffc11bf8 : IMFS_jnode_t *IMFS_create_root_node(void) { ffc11bf8: 94 21 ff f8 stwu r1,-8(r1) ffc11bfc: 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) ); ffc11c00: 3c 80 ff c2 lis r4,-62 ffc11c04: 38 84 48 9a addi r4,r4,18586 return node; } IMFS_jnode_t *IMFS_create_root_node(void) { ffc11c08: 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) ); ffc11c0c: 38 60 00 01 li r3,1 ffc11c10: 38 a0 41 ed li r5,16877 ffc11c14: 4b ff ff 39 bl ffc11b4c if ( !node ) ffc11c18: 2c 03 00 00 cmpwi r3,0 ffc11c1c: 41 82 00 1c beq- ffc11c38 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc11c20: 39 23 00 54 addi r9,r3,84 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc11c24: 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); ffc11c28: 91 23 00 50 stw r9,80(r3) the_chain->permanent_null = NULL; ffc11c2c: 39 20 00 00 li r9,0 ffc11c30: 91 23 00 54 stw r9,84(r3) the_chain->last = _Chain_Head(the_chain); ffc11c34: 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; } ffc11c38: 80 01 00 0c lwz r0,12(r1) ffc11c3c: 38 21 00 08 addi r1,r1,8 ffc11c40: 7c 08 03 a6 mtlr r0 ffc11c44: 4e 80 00 20 blr =============================================================================== ffc06bc4 : rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); ffc06bc4: 2c 03 00 00 cmpwi r3,0 void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { ffc06bc8: 94 21 ff d8 stwu r1,-40(r1) ffc06bcc: 7c 08 02 a6 mflr r0 ffc06bd0: 93 c1 00 20 stw r30,32(r1) ffc06bd4: 7c 9e 23 78 mr r30,r4 ffc06bd8: 90 01 00 2c stw r0,44(r1) ffc06bdc: 93 21 00 0c stw r25,12(r1) ffc06be0: 93 41 00 10 stw r26,16(r1) ffc06be4: 93 61 00 14 stw r27,20(r1) ffc06be8: 93 81 00 18 stw r28,24(r1) ffc06bec: 93 a1 00 1c stw r29,28(r1) ffc06bf0: 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 ); ffc06bf4: 40 a2 00 24 bne+ ffc06c18 <== ALWAYS TAKEN ffc06bf8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc06bfc: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED ffc06c00: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED ffc06c04: 38 63 96 d0 addi r3,r3,-26928 <== NOT EXECUTED ffc06c08: 38 a5 96 bc addi r5,r5,-26948 <== NOT EXECUTED ffc06c0c: 38 c6 97 86 addi r6,r6,-26746 <== NOT EXECUTED ffc06c10: 38 80 00 84 li r4,132 <== NOT EXECUTED ffc06c14: 48 00 00 28 b ffc06c3c <== NOT EXECUTED assert( level >= 0 ); ffc06c18: 2f 84 00 00 cmpwi cr7,r4,0 ffc06c1c: 40 bc 00 24 bge+ cr7,ffc06c40 <== ALWAYS TAKEN ffc06c20: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc06c24: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED ffc06c28: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED ffc06c2c: 38 63 96 d0 addi r3,r3,-26928 <== NOT EXECUTED ffc06c30: 38 a5 96 bc addi r5,r5,-26948 <== NOT EXECUTED ffc06c34: 38 c6 97 94 addi r6,r6,-26732 <== NOT EXECUTED ffc06c38: 38 80 00 86 li r4,134 <== NOT EXECUTED ffc06c3c: 48 00 0a 71 bl ffc076ac <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); ffc06c40: 80 03 00 4c lwz r0,76(r3) ffc06c44: 2f 80 00 01 cmpwi cr7,r0,1 ffc06c48: 41 be 00 24 beq+ cr7,ffc06c6c <== ALWAYS TAKEN ffc06c4c: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc06c50: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED ffc06c54: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED ffc06c58: 38 63 96 d0 addi r3,r3,-26928 <== NOT EXECUTED ffc06c5c: 38 a5 96 bc addi r5,r5,-26948 <== NOT EXECUTED ffc06c60: 38 c6 97 9f addi r6,r6,-26721 <== NOT EXECUTED ffc06c64: 38 80 00 88 li r4,136 <== NOT EXECUTED ffc06c68: 4b ff ff d4 b ffc06c3c <== NOT EXECUTED the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); ffc06c6c: 3f 40 00 00 lis r26,0 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; ffc06c70: 83 e3 00 50 lwz r31,80(r3) the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); ffc06c74: 3f 60 ff c3 lis r27,-61 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc06c78: 3b 23 00 54 addi r25,r3,84 ffc06c7c: 3b 5a 27 4c addi r26,r26,10060 ffc06c80: 3b 7b 97 c5 addi r27,r27,-26683 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); ffc06c84: 3b 84 00 01 addi r28,r4,1 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; ffc06c88: 48 00 00 48 b ffc06cd0 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; ffc06c8c: 3b a0 00 00 li r29,0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); ffc06c90: 81 3a 00 00 lwz r9,0(r26) !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++ ) ffc06c94: 3b bd 00 01 addi r29,r29,1 fprintf(stdout, "...." ); ffc06c98: 7f 63 db 78 mr r3,r27 ffc06c9c: 80 89 00 08 lwz r4,8(r9) ffc06ca0: 48 01 1f 21 bl ffc18bc0 !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++ ) ffc06ca4: 7f 9d f0 00 cmpw cr7,r29,r30 ffc06ca8: 40 9d ff e8 ble+ cr7,ffc06c90 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); ffc06cac: 7f e3 fb 78 mr r3,r31 ffc06cb0: 4b ff fd 2d bl ffc069dc if ( the_jnode->type == IMFS_DIRECTORY ) ffc06cb4: 80 1f 00 4c lwz r0,76(r31) ffc06cb8: 2f 80 00 01 cmpwi cr7,r0,1 ffc06cbc: 40 be 00 10 bne+ cr7,ffc06ccc IMFS_dump_directory( the_jnode, level + 1 ); ffc06cc0: 7f e3 fb 78 mr r3,r31 ffc06cc4: 7f 84 e3 78 mr r4,r28 ffc06cc8: 4b ff fe fd bl ffc06bc4 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 ) { ffc06ccc: 83 ff 00 00 lwz r31,0(r31) assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; ffc06cd0: 7f 9f c8 00 cmpw cr7,r31,r25 ffc06cd4: 40 9e ff b8 bne+ cr7,ffc06c8c fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } ffc06cd8: 80 01 00 2c lwz r0,44(r1) ffc06cdc: 83 21 00 0c lwz r25,12(r1) ffc06ce0: 7c 08 03 a6 mtlr r0 ffc06ce4: 83 41 00 10 lwz r26,16(r1) ffc06ce8: 83 61 00 14 lwz r27,20(r1) ffc06cec: 83 81 00 18 lwz r28,24(r1) ffc06cf0: 83 a1 00 1c lwz r29,28(r1) ffc06cf4: 83 c1 00 20 lwz r30,32(r1) ffc06cf8: 83 e1 00 24 lwz r31,36(r1) ffc06cfc: 38 21 00 28 addi r1,r1,40 ffc06d00: 4e 80 00 20 blr =============================================================================== ffc12034 : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc12034: 94 21 ff 88 stwu r1,-120(r1) ffc12038: 7c 08 02 a6 mflr r0 ffc1203c: 90 01 00 7c stw r0,124(r1) ffc12040: 92 e1 00 54 stw r23,84(r1) case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc12044: 3e e0 00 00 lis r23,0 ffc12048: 3a f7 26 f4 addi r23,r23,9972 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc1204c: 93 c1 00 70 stw r30,112(r1) ffc12050: 92 a1 00 4c stw r21,76(r1) ffc12054: 92 c1 00 50 stw r22,80(r1) /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; ffc12058: 83 c6 00 00 lwz r30,0(r6) const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc1205c: 93 01 00 58 stw r24,88(r1) * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); ffc12060: 3b 01 00 08 addi r24,r1,8 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc12064: 93 21 00 5c stw r25,92(r1) * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); ffc12068: 3b 21 00 20 addi r25,r1,32 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc1206c: 93 41 00 60 stw r26,96(r1) ffc12070: 7c 7a 1b 78 mr r26,r3 ffc12074: 93 61 00 64 stw r27,100(r1) ffc12078: 7c bb 2b 78 mr r27,r5 ffc1207c: 93 81 00 68 stw r28,104(r1) /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; ffc12080: 3b 80 00 00 li r28,0 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc12084: 93 a1 00 6c stw r29,108(r1) ffc12088: 7c 9d 23 78 mr r29,r4 ffc1208c: 93 e1 00 74 stw r31,116(r1) ffc12090: 7c df 33 78 mr r31,r6 * 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 ); ffc12094: 7c 7a e2 14 add r3,r26,r28 ffc12098: 7f a4 eb 78 mr r4,r29 ffc1209c: 7f 25 cb 78 mr r5,r25 ffc120a0: 7f 06 c3 78 mr r6,r24 ffc120a4: 48 00 0a f9 bl ffc12b9c pathnamelen -= len; i += len; if ( !pathloc->node_access ) ffc120a8: 80 1f 00 00 lwz r0,0(r31) * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); ffc120ac: 7c 76 1b 78 mr r22,r3 pathnamelen -= len; ffc120b0: 82 a1 00 08 lwz r21,8(r1) i += len; if ( !pathloc->node_access ) ffc120b4: 2f 80 00 00 cmpwi cr7,r0,0 ffc120b8: 41 9e 01 40 beq- cr7,ffc121f8 <== 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 ) ffc120bc: 2f 83 00 00 cmpwi cr7,r3,0 ffc120c0: 41 9e 00 24 beq- cr7,ffc120e4 if ( node->type == IMFS_DIRECTORY ) ffc120c4: 80 1e 00 4c lwz r0,76(r30) ffc120c8: 2f 80 00 01 cmpwi cr7,r0,1 ffc120cc: 40 be 00 18 bne+ cr7,ffc120e4 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) ffc120d0: 7f e3 fb 78 mr r3,r31 ffc120d4: 38 80 00 01 li r4,1 ffc120d8: 4b ff fd 4d bl ffc11e24 ffc120dc: 2f 83 00 00 cmpwi cr7,r3,0 ffc120e0: 41 9e 01 e4 beq- cr7,ffc122c4 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { ffc120e4: 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; ffc120e8: 83 df 00 00 lwz r30,0(r31) while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; i += len; ffc120ec: 7f 9c aa 14 add r28,r28,r21 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; ffc120f0: 7f b5 e8 50 subf r29,r21,r29 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { ffc120f4: 41 9e 00 80 beq- cr7,ffc12174 ffc120f8: 2f 96 00 04 cmpwi cr7,r22,4 ffc120fc: 41 9e 01 10 beq- cr7,ffc1220c ffc12100: 2f 16 00 02 cmpwi cr6,r22,2 ffc12104: 40 ba 01 14 bne+ cr6,ffc12218 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc12108: 81 37 00 00 lwz r9,0(r23) ffc1210c: 80 09 00 18 lwz r0,24(r9) ffc12110: 7f 9e 00 00 cmpw cr7,r30,r0 ffc12114: 41 be ff 80 beq- cr7,ffc12094 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { ffc12118: 81 1f 00 10 lwz r8,16(r31) /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == ffc1211c: 80 08 00 1c lwz r0,28(r8) ffc12120: 7f 9e 00 00 cmpw cr7,r30,r0 ffc12124: 40 be 00 38 bne+ cr7,ffc1215c */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; ffc12128: 81 28 00 14 lwz r9,20(r8) *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), ffc1212c: 7f 65 db 78 mr r5,r27 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; ffc12130: 80 e8 00 08 lwz r7,8(r8) *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), ffc12134: 7f e6 fb 78 mr r6,r31 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; ffc12138: 81 48 00 0c lwz r10,12(r8) ffc1213c: 81 68 00 10 lwz r11,16(r8) ffc12140: 90 e1 00 0c stw r7,12(r1) ffc12144: 91 41 00 10 stw r10,16(r1) ffc12148: 91 61 00 14 stw r11,20(r1) ffc1214c: 91 21 00 18 stw r9,24(r1) *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), ffc12150: 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; ffc12154: 80 08 00 18 lwz r0,24(r8) ffc12158: 48 00 01 14 b ffc1226c pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) ffc1215c: 83 de 00 08 lwz r30,8(r30) ffc12160: 2f 9e 00 00 cmpwi cr7,r30,0 ffc12164: 40 be 00 a0 bne+ cr7,ffc12204 rtems_set_errno_and_return_minus_one( ENOENT ); ffc12168: 48 00 5f 05 bl ffc1806c <__errno> ffc1216c: 92 c3 00 00 stw r22,0(r3) ffc12170: 48 00 01 60 b ffc122d0 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { ffc12174: 80 1e 00 4c lwz r0,76(r30) ffc12178: 2f 80 00 03 cmpwi cr7,r0,3 ffc1217c: 40 be 00 20 bne+ cr7,ffc1219c IMFS_evaluate_hard_link( pathloc, 0 ); ffc12180: 7f e3 fb 78 mr r3,r31 ffc12184: 38 80 00 00 li r4,0 ffc12188: 4b ff fd 1d bl ffc11ea4 node = pathloc->node_access; ffc1218c: 83 df 00 00 lwz r30,0(r31) if ( !node ) ffc12190: 2f 9e 00 00 cmpwi cr7,r30,0 ffc12194: 40 be 00 2c bne+ cr7,ffc121c0 <== ALWAYS TAKEN ffc12198: 48 00 00 34 b ffc121cc <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { ffc1219c: 2f 80 00 04 cmpwi cr7,r0,4 ffc121a0: 40 be 00 20 bne+ cr7,ffc121c0 result = IMFS_evaluate_sym_link( pathloc, 0 ); ffc121a4: 7f e3 fb 78 mr r3,r31 ffc121a8: 38 80 00 00 li r4,0 ffc121ac: 4b ff fd 71 bl ffc11f1c node = pathloc->node_access; ffc121b0: 83 df 00 00 lwz r30,0(r31) if ( result == -1 ) ffc121b4: 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 ); ffc121b8: 7c 76 1b 78 mr r22,r3 node = pathloc->node_access; if ( result == -1 ) ffc121bc: 41 9e 01 18 beq- cr7,ffc122d4 <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) ffc121c0: 80 1e 00 4c lwz r0,76(r30) ffc121c4: 2f 80 00 01 cmpwi cr7,r0,1 ffc121c8: 41 be 00 10 beq+ cr7,ffc121d8 rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc121cc: 48 00 5e a1 bl ffc1806c <__errno> ffc121d0: 38 00 00 14 li r0,20 ffc121d4: 48 00 00 f8 b ffc122cc /* * 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 ) { ffc121d8: 81 1e 00 5c lwz r8,92(r30) ffc121dc: 2f 88 00 00 cmpwi cr7,r8,0 ffc121e0: 40 9e 00 5c bne- cr7,ffc1223c /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); ffc121e4: 7f c3 f3 78 mr r3,r30 ffc121e8: 7f 24 cb 78 mr r4,r25 ffc121ec: 48 00 08 dd bl ffc12ac8 if ( !node ) ffc121f0: 7c 7e 1b 79 mr. r30,r3 ffc121f4: 40 a2 00 10 bne+ ffc12204 rtems_set_errno_and_return_minus_one( ENOENT ); ffc121f8: 48 00 5e 75 bl ffc1806c <__errno> ffc121fc: 38 00 00 02 li r0,2 ffc12200: 48 00 00 cc b ffc122cc /* * Set the node access to the point we have found. */ pathloc->node_access = node; ffc12204: 93 df 00 00 stw r30,0(r31) break; ffc12208: 4b ff fe 8c b ffc12094 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); ffc1220c: 48 00 5e 61 bl ffc1806c <__errno> ffc12210: 38 00 00 5b li r0,91 ffc12214: 48 00 00 b8 b ffc122cc /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { ffc12218: 2f 16 00 00 cmpwi cr6,r22,0 ffc1221c: 41 9a 00 08 beq- cr6,ffc12224 ffc12220: 40 9e fe 74 bne+ cr7,ffc12094 <== ALWAYS TAKEN * new fs root node and let let the mounted filesystem set the handlers. * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { ffc12224: 80 1e 00 4c lwz r0,76(r30) ffc12228: 2f 80 00 01 cmpwi cr7,r0,1 ffc1222c: 40 9e 00 78 bne- cr7,ffc122a4 if ( node->info.directory.mt_fs != NULL ) { ffc12230: 81 1e 00 5c lwz r8,92(r30) ffc12234: 2f 88 00 00 cmpwi cr7,r8,0 ffc12238: 41 9e 00 6c beq- cr7,ffc122a4 newloc = node->info.directory.mt_fs->mt_fs_root; ffc1223c: 81 28 00 28 lwz r9,40(r8) *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc12240: 7f 65 db 78 mr r5,r27 * 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; ffc12244: 80 e8 00 1c lwz r7,28(r8) *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc12248: 7f e6 fb 78 mr r6,r31 * 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; ffc1224c: 81 48 00 20 lwz r10,32(r8) ffc12250: 81 68 00 24 lwz r11,36(r8) ffc12254: 90 e1 00 0c stw r7,12(r1) ffc12258: 91 41 00 10 stw r10,16(r1) ffc1225c: 91 61 00 14 stw r11,20(r1) ffc12260: 91 21 00 18 stw r9,24(r1) *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc12264: 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; ffc12268: 80 08 00 2c lwz r0,44(r8) *pathloc = newloc; ffc1226c: 90 1f 00 10 stw r0,16(r31) return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc12270: 7c 64 e0 50 subf r3,r4,r28 ffc12274: 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; ffc12278: 90 ff 00 00 stw r7,0(r31) return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc1227c: 7c 9d 22 14 add r4,r29,r4 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; ffc12280: 91 5f 00 04 stw r10,4(r31) ffc12284: 91 7f 00 08 stw r11,8(r31) * 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; ffc12288: 90 01 00 1c stw r0,28(r1) *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc1228c: 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; ffc12290: 91 3f 00 0c stw r9,12(r31) return (*pathloc->ops->evalpath_h)( &pathname[i-len], ffc12294: 7c 09 03 a6 mtctr r0 ffc12298: 4e 80 04 21 bctrl ffc1229c: 7c 76 1b 78 mr r22,r3 ffc122a0: 48 00 00 34 b ffc122d4 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); ffc122a4: 7f e3 fb 78 mr r3,r31 ffc122a8: 4b ff fb 09 bl ffc11db0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) ffc122ac: 7f 64 db 78 mr r4,r27 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); ffc122b0: 7c 76 1b 78 mr r22,r3 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) ffc122b4: 7f e3 fb 78 mr r3,r31 ffc122b8: 4b ff fb 6d bl ffc11e24 ffc122bc: 2f 83 00 00 cmpwi cr7,r3,0 ffc122c0: 40 be 00 14 bne+ cr7,ffc122d4 rtems_set_errno_and_return_minus_one( EACCES ); ffc122c4: 48 00 5d a9 bl ffc1806c <__errno> ffc122c8: 38 00 00 0d li r0,13 ffc122cc: 90 03 00 00 stw r0,0(r3) ffc122d0: 3a c0 ff ff li r22,-1 return result; } ffc122d4: 80 01 00 7c lwz r0,124(r1) ffc122d8: 7e c3 b3 78 mr r3,r22 ffc122dc: 82 a1 00 4c lwz r21,76(r1) ffc122e0: 7c 08 03 a6 mtlr r0 ffc122e4: 82 c1 00 50 lwz r22,80(r1) ffc122e8: 82 e1 00 54 lwz r23,84(r1) ffc122ec: 83 01 00 58 lwz r24,88(r1) ffc122f0: 83 21 00 5c lwz r25,92(r1) ffc122f4: 83 41 00 60 lwz r26,96(r1) ffc122f8: 83 61 00 64 lwz r27,100(r1) ffc122fc: 83 81 00 68 lwz r28,104(r1) ffc12300: 83 a1 00 6c lwz r29,108(r1) ffc12304: 83 c1 00 70 lwz r30,112(r1) ffc12308: 83 e1 00 74 lwz r31,116(r1) ffc1230c: 38 21 00 78 addi r1,r1,120 ffc12310: 4e 80 00 20 blr =============================================================================== ffc123f8 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { ffc123f8: 94 21 ff 88 stwu r1,-120(r1) ffc123fc: 7c 08 02 a6 mflr r0 ffc12400: 90 01 00 7c stw r0,124(r1) ffc12404: 92 e1 00 54 stw r23,84(r1) case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc12408: 3e e0 00 00 lis r23,0 ffc1240c: 3a f7 26 f4 addi r23,r23,9972 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { ffc12410: 93 01 00 58 stw r24,88(r1) * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); ffc12414: 3b 01 00 08 addi r24,r1,8 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { ffc12418: 93 21 00 5c stw r25,92(r1) * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); ffc1241c: 3b 21 00 20 addi r25,r1,32 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { ffc12420: 93 41 00 60 stw r26,96(r1) ffc12424: 93 61 00 64 stw r27,100(r1) ffc12428: 7c bb 2b 78 mr r27,r5 ffc1242c: 93 81 00 68 stw r28,104(r1) ffc12430: 7c 7c 1b 78 mr r28,r3 ffc12434: 93 a1 00 6c stw r29,108(r1) node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); ffc12438: 3b a0 00 00 li r29,0 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { ffc1243c: 93 c1 00 70 stw r30,112(r1) ffc12440: 93 e1 00 74 stw r31,116(r1) ffc12444: 7c 9f 23 78 mr r31,r4 ffc12448: 92 a1 00 4c stw r21,76(r1) ffc1244c: 92 c1 00 50 stw r22,80(r1) /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; ffc12450: 83 c4 00 00 lwz r30,0(r4) /* * Get the path length. */ pathlen = strlen( path ); ffc12454: 48 00 6e d9 bl ffc1932c ffc12458: 7c 7a 1b 78 mr r26,r3 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); ffc1245c: 7f 44 d3 78 mr r4,r26 ffc12460: 7c 7c ea 14 add r3,r28,r29 ffc12464: 7f 25 cb 78 mr r5,r25 ffc12468: 7f 06 c3 78 mr r6,r24 ffc1246c: 48 00 07 31 bl ffc12b9c pathlen -= len; i += len; if ( !pathloc->node_access ) ffc12470: 80 1f 00 00 lwz r0,0(r31) */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; ffc12474: 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 ); ffc12478: 7c 76 1b 78 mr r22,r3 pathlen -= len; i += len; if ( !pathloc->node_access ) ffc1247c: 2f 80 00 00 cmpwi cr7,r0,0 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; ffc12480: 7f 55 d0 50 subf r26,r21,r26 i += len; if ( !pathloc->node_access ) ffc12484: 41 9e 01 d0 beq- cr7,ffc12654 <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) ffc12488: 2f 83 00 00 cmpwi cr7,r3,0 ffc1248c: 41 9e 00 24 beq- cr7,ffc124b0 if ( node->type == IMFS_DIRECTORY ) ffc12490: 80 1e 00 4c lwz r0,76(r30) ffc12494: 2f 80 00 01 cmpwi cr7,r0,1 ffc12498: 40 be 00 18 bne+ cr7,ffc124b0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) ffc1249c: 7f e3 fb 78 mr r3,r31 ffc124a0: 38 80 00 01 li r4,1 ffc124a4: 4b ff f9 81 bl ffc11e24 ffc124a8: 2f 83 00 00 cmpwi cr7,r3,0 ffc124ac: 41 9e 02 08 beq- cr7,ffc126b4 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { ffc124b0: 2f 96 00 02 cmpwi cr7,r22,2 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; ffc124b4: 83 df 00 00 lwz r30,0(r31) while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; ffc124b8: 7f bd aa 14 add r29,r29,r21 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { ffc124bc: 41 9e 00 2c beq- cr7,ffc124e8 ffc124c0: 2b 96 00 02 cmplwi cr7,r22,2 ffc124c4: 41 9d 00 10 bgt- cr7,ffc124d4 ffc124c8: 2f 96 00 00 cmpwi cr7,r22,0 ffc124cc: 41 9e 01 50 beq- cr7,ffc1261c ffc124d0: 4b ff ff 8c b ffc1245c ffc124d4: 2f 96 00 03 cmpwi cr7,r22,3 ffc124d8: 41 9e 00 78 beq- cr7,ffc12550 ffc124dc: 2f 96 00 04 cmpwi cr7,r22,4 ffc124e0: 40 9e ff 7c bne+ cr7,ffc1245c <== NEVER TAKEN ffc124e4: 48 00 01 44 b ffc12628 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) ffc124e8: 81 37 00 00 lwz r9,0(r23) ffc124ec: 80 09 00 18 lwz r0,24(r9) ffc124f0: 7f 9e 00 00 cmpw cr7,r30,r0 ffc124f4: 41 be ff 68 beq- cr7,ffc1245c /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ ffc124f8: 81 1f 00 10 lwz r8,16(r31) ffc124fc: 80 08 00 1c lwz r0,28(r8) ffc12500: 7f 9e 00 00 cmpw cr7,r30,r0 ffc12504: 40 be 00 34 bne+ cr7,ffc12538 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; ffc12508: 81 28 00 14 lwz r9,20(r8) *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc1250c: 7f e4 fb 78 mr r4,r31 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; ffc12510: 80 e8 00 08 lwz r7,8(r8) *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc12514: 7f 65 db 78 mr r5,r27 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; ffc12518: 81 48 00 0c lwz r10,12(r8) ffc1251c: 81 68 00 10 lwz r11,16(r8) ffc12520: 90 e1 00 0c stw r7,12(r1) ffc12524: 91 41 00 10 stw r10,16(r1) ffc12528: 91 61 00 14 stw r11,20(r1) ffc1252c: 91 21 00 18 stw r9,24(r1) ffc12530: 80 08 00 18 lwz r0,24(r8) ffc12534: 48 00 00 98 b ffc125cc *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) ffc12538: 83 de 00 08 lwz r30,8(r30) ffc1253c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc12540: 40 be 00 d4 bne+ cr7,ffc12614 rtems_set_errno_and_return_minus_one( ENOENT ); ffc12544: 48 00 5b 29 bl ffc1806c <__errno> ffc12548: 92 c3 00 00 stw r22,0(r3) ffc1254c: 48 00 01 74 b ffc126c0 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { ffc12550: 80 1e 00 4c lwz r0,76(r30) ffc12554: 2f 80 00 03 cmpwi cr7,r0,3 ffc12558: 41 9e 00 0c beq- cr7,ffc12564 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { ffc1255c: 2f 80 00 04 cmpwi cr7,r0,4 ffc12560: 40 be 00 1c bne+ cr7,ffc1257c result = IMFS_evaluate_link( pathloc, 0 ); ffc12564: 7f e3 fb 78 mr r3,r31 ffc12568: 38 80 00 00 li r4,0 ffc1256c: 4b ff fd a9 bl ffc12314 if ( result == -1 ) ffc12570: 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 ); ffc12574: 7c 7e 1b 78 mr r30,r3 if ( result == -1 ) ffc12578: 41 9e 01 4c beq- cr7,ffc126c4 <== NEVER TAKEN return -1; } node = pathloc->node_access; ffc1257c: 80 7f 00 00 lwz r3,0(r31) if ( !node ) ffc12580: 2f 83 00 00 cmpwi cr7,r3,0 ffc12584: 41 9e 01 10 beq- cr7,ffc12694 <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) ffc12588: 80 03 00 4c lwz r0,76(r3) ffc1258c: 2f 80 00 01 cmpwi cr7,r0,1 ffc12590: 40 9e 01 04 bne- cr7,ffc12694 /* * 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 ) { ffc12594: 81 03 00 5c lwz r8,92(r3) ffc12598: 2f 88 00 00 cmpwi cr7,r8,0 ffc1259c: 41 be 00 68 beq+ cr7,ffc12604 newloc = node->info.directory.mt_fs->mt_fs_root; ffc125a0: 81 28 00 28 lwz r9,40(r8) *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc125a4: 7f e4 fb 78 mr r4,r31 * 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; ffc125a8: 80 e8 00 1c lwz r7,28(r8) *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc125ac: 7f 65 db 78 mr r5,r27 * 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; ffc125b0: 81 48 00 20 lwz r10,32(r8) ffc125b4: 81 68 00 24 lwz r11,36(r8) ffc125b8: 90 e1 00 0c stw r7,12(r1) ffc125bc: 91 41 00 10 stw r10,16(r1) ffc125c0: 91 61 00 14 stw r11,20(r1) ffc125c4: 91 21 00 18 stw r9,24(r1) ffc125c8: 80 08 00 2c lwz r0,44(r8) *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc125cc: 81 01 00 08 lwz r8,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; ffc125d0: 90 1f 00 10 stw r0,16(r31) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc125d4: 7f a8 e8 50 subf r29,r8,r29 * 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; ffc125d8: 90 ff 00 00 stw r7,0(r31) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc125dc: 7c 7c ea 14 add r3,r28,r29 * 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; ffc125e0: 91 5f 00 04 stw r10,4(r31) ffc125e4: 91 7f 00 08 stw r11,8(r31) * 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; ffc125e8: 90 01 00 1c stw r0,28(r1) *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc125ec: 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; ffc125f0: 91 3f 00 0c stw r9,12(r31) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); ffc125f4: 7c 09 03 a6 mtctr r0 ffc125f8: 4e 80 04 21 bctrl ffc125fc: 7c 7e 1b 78 mr r30,r3 ffc12600: 48 00 00 c4 b ffc126c4 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); ffc12604: 7f 24 cb 78 mr r4,r25 ffc12608: 48 00 04 c1 bl ffc12ac8 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) ffc1260c: 7c 7e 1b 79 mr. r30,r3 ffc12610: 41 82 00 24 beq- ffc12634 done = true; else pathloc->node_access = node; ffc12614: 93 df 00 00 stw r30,0(r31) ffc12618: 4b ff fe 44 b ffc1245c break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); ffc1261c: 48 00 5a 51 bl ffc1806c <__errno> ffc12620: 38 00 00 11 li r0,17 ffc12624: 48 00 00 98 b ffc126bc break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); ffc12628: 48 00 5a 45 bl ffc1806c <__errno> ffc1262c: 38 00 00 5b li r0,91 ffc12630: 48 00 00 8c b ffc126bc case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; ffc12634: 80 01 00 08 lwz r0,8(r1) ffc12638: 7d 3c ea 14 add r9,r28,r29 ffc1263c: 7f a0 e8 50 subf r29,r0,r29 ffc12640: 7f 9c ea 14 add r28,r28,r29 ffc12644: 93 9b 00 00 stw r28,0(r27) /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { ffc12648: 48 00 00 18 b ffc12660 if ( !IMFS_is_separator( path[ i ] ) ) ffc1264c: 41 9a 00 14 beq- cr6,ffc12660 ffc12650: 41 86 00 10 beq- cr1,ffc12660 rtems_set_errno_and_return_minus_one( ENOENT ); ffc12654: 48 00 5a 19 bl ffc1806c <__errno> ffc12658: 38 00 00 02 li r0,2 ffc1265c: 48 00 00 60 b ffc126bc /* * 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++) { ffc12660: 88 09 00 00 lbz r0,0(r9) if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); ffc12664: 39 29 00 01 addi r9,r9,1 /* * 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++) { ffc12668: 2f 80 00 00 cmpwi cr7,r0,0 if ( !IMFS_is_separator( path[ i ] ) ) ffc1266c: 2c 80 00 5c cmpwi cr1,r0,92 ffc12670: 2f 00 00 2f cmpwi cr6,r0,47 /* * 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++) { ffc12674: 40 9e ff d8 bne+ cr7,ffc1264c /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); ffc12678: 7f e3 fb 78 mr r3,r31 ffc1267c: 4b ff f7 35 bl ffc11db0 /* * The returned node must be a directory */ node = pathloc->node_access; ffc12680: 81 3f 00 00 lwz r9,0(r31) /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); ffc12684: 7c 7e 1b 78 mr r30,r3 /* * The returned node must be a directory */ node = pathloc->node_access; ffc12688: 80 09 00 4c lwz r0,76(r9) ffc1268c: 2f 80 00 01 cmpwi cr7,r0,1 ffc12690: 41 be 00 10 beq+ cr7,ffc126a0 <== ALWAYS TAKEN if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc12694: 48 00 59 d9 bl ffc1806c <__errno> ffc12698: 38 00 00 14 li r0,20 ffc1269c: 48 00 00 20 b ffc126bc /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) ffc126a0: 7f e3 fb 78 mr r3,r31 ffc126a4: 38 80 00 03 li r4,3 ffc126a8: 4b ff f7 7d bl ffc11e24 ffc126ac: 2f 83 00 00 cmpwi cr7,r3,0 ffc126b0: 40 be 00 14 bne+ cr7,ffc126c4 rtems_set_errno_and_return_minus_one( EACCES ); ffc126b4: 48 00 59 b9 bl ffc1806c <__errno> ffc126b8: 38 00 00 0d li r0,13 ffc126bc: 90 03 00 00 stw r0,0(r3) ffc126c0: 3b c0 ff ff li r30,-1 return result; } ffc126c4: 80 01 00 7c lwz r0,124(r1) ffc126c8: 7f c3 f3 78 mr r3,r30 ffc126cc: 82 a1 00 4c lwz r21,76(r1) ffc126d0: 7c 08 03 a6 mtlr r0 ffc126d4: 82 c1 00 50 lwz r22,80(r1) ffc126d8: 82 e1 00 54 lwz r23,84(r1) ffc126dc: 83 01 00 58 lwz r24,88(r1) ffc126e0: 83 21 00 5c lwz r25,92(r1) ffc126e4: 83 41 00 60 lwz r26,96(r1) ffc126e8: 83 61 00 64 lwz r27,100(r1) ffc126ec: 83 81 00 68 lwz r28,104(r1) ffc126f0: 83 a1 00 6c lwz r29,108(r1) ffc126f4: 83 c1 00 70 lwz r30,112(r1) ffc126f8: 83 e1 00 74 lwz r31,116(r1) ffc126fc: 38 21 00 78 addi r1,r1,120 ffc12700: 4e 80 00 20 blr =============================================================================== ffc11ea4 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { ffc11ea4: 94 21 ff e8 stwu r1,-24(r1) ffc11ea8: 7c 08 02 a6 mflr r0 ffc11eac: 90 01 00 1c stw r0,28(r1) IMFS_jnode_t *jnode = node->node_access; ffc11eb0: 81 23 00 00 lwz r9,0(r3) int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { ffc11eb4: 93 e1 00 14 stw r31,20(r1) ffc11eb8: 7c 7f 1b 78 mr r31,r3 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) ffc11ebc: 80 09 00 4c lwz r0,76(r9) ffc11ec0: 2f 80 00 03 cmpwi cr7,r0,3 ffc11ec4: 41 be 00 0c beq+ cr7,ffc11ed0 <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); ffc11ec8: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED ffc11ecc: 4b ff 83 c9 bl ffc0a294 <== NOT EXECUTED /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; ffc11ed0: 80 09 00 50 lwz r0,80(r9) IMFS_Set_handlers( node ); ffc11ed4: 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; ffc11ed8: 90 03 00 00 stw r0,0(r3) IMFS_Set_handlers( node ); ffc11edc: 4b ff fe d5 bl ffc11db0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) ffc11ee0: 80 81 00 08 lwz r4,8(r1) ffc11ee4: 7f e3 fb 78 mr r3,r31 ffc11ee8: 4b ff ff 3d bl ffc11e24 ffc11eec: 2f 83 00 00 cmpwi cr7,r3,0 ffc11ef0: 38 60 00 00 li r3,0 ffc11ef4: 40 be 00 14 bne+ cr7,ffc11f08 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); ffc11ef8: 48 00 61 75 bl ffc1806c <__errno> <== NOT EXECUTED ffc11efc: 38 00 00 0d li r0,13 <== NOT EXECUTED ffc11f00: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc11f04: 38 60 ff ff li r3,-1 <== NOT EXECUTED return result; } ffc11f08: 80 01 00 1c lwz r0,28(r1) ffc11f0c: 83 e1 00 14 lwz r31,20(r1) ffc11f10: 38 21 00 18 addi r1,r1,24 ffc11f14: 7c 08 03 a6 mtlr r0 ffc11f18: 4e 80 00 20 blr =============================================================================== ffc11e24 : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { ffc11e24: 94 21 ff e8 stwu r1,-24(r1) ffc11e28: 7c 08 02 a6 mflr r0 ffc11e2c: 90 01 00 1c stw r0,28(r1) ffc11e30: 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; ffc11e34: 83 e3 00 00 lwz r31,0(r3) int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { ffc11e38: 93 a1 00 0c stw r29,12(r1) ffc11e3c: 93 c1 00 10 stw r30,16(r1) ffc11e40: 7c 9e 23 78 mr r30,r4 } jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); ffc11e44: 48 00 12 25 bl ffc13068 ffc11e48: 7c 7d 1b 78 mr r29,r3 st_gid = getegid(); ffc11e4c: 48 00 12 0d bl ffc13058 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) ffc11e50: a1 3f 00 3c lhz r9,60(r31) flags_to_test <<= 6; ffc11e54: 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 ) ffc11e58: 7f 89 e8 00 cmpw cr7,r9,r29 ffc11e5c: 41 9e 00 18 beq- cr7,ffc11e74 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) ffc11e60: a1 3f 00 3e lhz r9,62(r31) flags_to_test <<= 3; ffc11e64: 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 ) ffc11e68: 7f 89 18 00 cmpw cr7,r9,r3 ffc11e6c: 41 9e 00 08 beq- cr7,ffc11e74 <== ALWAYS TAKEN ffc11e70: 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 ) ffc11e74: 80 7f 00 30 lwz r3,48(r31) return 1; return 0; } ffc11e78: 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 ) ffc11e7c: 7c 03 18 38 and r3,r0,r3 return 1; return 0; } ffc11e80: 83 c1 00 10 lwz r30,16(r1) ffc11e84: 7c 63 02 78 xor r3,r3,r0 ffc11e88: 80 01 00 1c lwz r0,28(r1) ffc11e8c: 7c 63 00 34 cntlzw r3,r3 ffc11e90: 83 e1 00 14 lwz r31,20(r1) ffc11e94: 7c 08 03 a6 mtlr r0 ffc11e98: 54 63 d9 7e rlwinm r3,r3,27,5,31 ffc11e9c: 38 21 00 18 addi r1,r1,24 ffc11ea0: 4e 80 00 20 blr =============================================================================== ffc11f1c : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { ffc11f1c: 94 21 ff e8 stwu r1,-24(r1) ffc11f20: 7c 08 02 a6 mflr r0 ffc11f24: 90 01 00 1c stw r0,28(r1) IMFS_jnode_t *jnode = node->node_access; ffc11f28: 81 23 00 00 lwz r9,0(r3) int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { ffc11f2c: 93 c1 00 10 stw r30,16(r1) ffc11f30: 7c 9e 23 78 mr r30,r4 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) ffc11f34: 80 09 00 4c lwz r0,76(r9) int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { ffc11f38: 93 e1 00 14 stw r31,20(r1) ffc11f3c: 7c 7f 1b 78 mr r31,r3 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) ffc11f40: 2f 80 00 04 cmpwi cr7,r0,4 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { ffc11f44: 93 a1 00 0c stw r29,12(r1) /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); ffc11f48: 3c 60 ab cd lis r3,-21555 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) ffc11f4c: 40 9e 00 14 bne- cr7,ffc11f60 <== NEVER TAKEN rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) ffc11f50: 80 09 00 08 lwz r0,8(r9) ffc11f54: 2f 80 00 00 cmpwi cr7,r0,0 ffc11f58: 40 be 00 0c bne+ cr7,ffc11f64 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xBAD00000 ); ffc11f5c: 3c 60 ba d0 lis r3,-17712 <== NOT EXECUTED ffc11f60: 4b ff 83 35 bl ffc0a294 <== NOT EXECUTED /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; ffc11f64: 90 1f 00 00 stw r0,0(r31) rtems_filesystem_get_sym_start_loc( ffc11f68: 81 69 00 50 lwz r11,80(r9) ffc11f6c: 88 0b 00 00 lbz r0,0(r11) ffc11f70: 2f 80 00 2f cmpwi cr7,r0,47 ffc11f74: 41 9e 00 18 beq- cr7,ffc11f8c ffc11f78: 2f 80 00 5c cmpwi cr7,r0,92 ffc11f7c: 41 9e 00 10 beq- cr7,ffc11f8c <== NEVER TAKEN ffc11f80: 2f 80 00 00 cmpwi cr7,r0,0 ffc11f84: 38 00 00 00 li r0,0 ffc11f88: 40 9e 00 38 bne- cr7,ffc11fc0 <== ALWAYS TAKEN ffc11f8c: 3d 60 00 00 lis r11,0 ffc11f90: 81 6b 26 f4 lwz r11,9972(r11) ffc11f94: 38 00 00 01 li r0,1 ffc11f98: 80 cb 00 18 lwz r6,24(r11) ffc11f9c: 80 eb 00 1c lwz r7,28(r11) ffc11fa0: 81 0b 00 20 lwz r8,32(r11) ffc11fa4: 81 4b 00 24 lwz r10,36(r11) ffc11fa8: 90 df 00 00 stw r6,0(r31) ffc11fac: 90 ff 00 04 stw r7,4(r31) ffc11fb0: 91 1f 00 08 stw r8,8(r31) ffc11fb4: 91 5f 00 0c stw r10,12(r31) ffc11fb8: 81 6b 00 28 lwz r11,40(r11) ffc11fbc: 91 7f 00 10 stw r11,16(r31) * 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] ), ffc11fc0: 83 a9 00 50 lwz r29,80(r9) ffc11fc4: 7f bd 02 14 add r29,r29,r0 ffc11fc8: 7f a3 eb 78 mr r3,r29 ffc11fcc: 48 00 73 61 bl ffc1932c /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( ffc11fd0: 7f c5 f3 78 mr r5,r30 &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), ffc11fd4: 7c 64 1b 78 mr r4,r3 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( ffc11fd8: 7f e6 fb 78 mr r6,r31 ffc11fdc: 7f a3 eb 78 mr r3,r29 ffc11fe0: 48 00 00 55 bl ffc12034 ffc11fe4: 7c 7d 1b 78 mr r29,r3 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); ffc11fe8: 7f e3 fb 78 mr r3,r31 ffc11fec: 4b ff fd c5 bl ffc11db0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) ffc11ff0: 7f e3 fb 78 mr r3,r31 ffc11ff4: 7f c4 f3 78 mr r4,r30 ffc11ff8: 4b ff fe 2d bl ffc11e24 ffc11ffc: 2f 83 00 00 cmpwi cr7,r3,0 ffc12000: 40 be 00 14 bne+ cr7,ffc12014 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); ffc12004: 48 00 60 69 bl ffc1806c <__errno> <== NOT EXECUTED ffc12008: 38 00 00 0d li r0,13 <== NOT EXECUTED ffc1200c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc12010: 3b a0 ff ff li r29,-1 <== NOT EXECUTED return result; } ffc12014: 80 01 00 1c lwz r0,28(r1) ffc12018: 7f a3 eb 78 mr r3,r29 ffc1201c: 83 c1 00 10 lwz r30,16(r1) ffc12020: 7c 08 03 a6 mtlr r0 ffc12024: 83 a1 00 0c lwz r29,12(r1) ffc12028: 83 e1 00 14 lwz r31,20(r1) ffc1202c: 38 21 00 18 addi r1,r1,24 ffc12030: 4e 80 00 20 blr =============================================================================== ffc16fe8 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { ffc16fe8: 94 21 ff e0 stwu r1,-32(r1) ffc16fec: 7c 08 02 a6 mflr r0 ffc16ff0: 90 01 00 24 stw r0,36(r1) ffc16ff4: 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; ffc16ff8: 83 e3 00 00 lwz r31,0(r3) int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { ffc16ffc: 93 c1 00 18 stw r30,24(r1) ffc17000: 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(); ffc17004: 4b ff c0 65 bl ffc13068 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) ffc17008: a0 1f 00 3c lhz r0,60(r31) ffc1700c: 7f 80 18 00 cmpw cr7,r0,r3 ffc17010: 41 9e 00 20 beq- cr7,ffc17030 <== ALWAYS TAKEN ffc17014: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc17018: 41 be 00 18 beq+ cr7,ffc17030 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); ffc1701c: 48 00 10 51 bl ffc1806c <__errno> <== NOT EXECUTED ffc17020: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc17024: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc17028: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc1702c: 48 00 00 30 b ffc1705c <== 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); ffc17030: 80 1f 00 30 lwz r0,48(r31) ffc17034: 57 de 05 3e clrlwi r30,r30,20 IMFS_update_ctime( jnode ); ffc17038: 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); ffc1703c: 54 00 00 26 rlwinm r0,r0,0,0,19 ffc17040: 7f de 03 78 or r30,r30,r0 ffc17044: 93 df 00 30 stw r30,48(r31) IMFS_update_ctime( jnode ); ffc17048: 38 80 00 00 li r4,0 ffc1704c: 4b fe eb 31 bl ffc05b7c ffc17050: 80 01 00 08 lwz r0,8(r1) ffc17054: 38 60 00 00 li r3,0 ffc17058: 90 1f 00 48 stw r0,72(r31) return 0; } ffc1705c: 80 01 00 24 lwz r0,36(r1) ffc17060: 83 c1 00 18 lwz r30,24(r1) ffc17064: 7c 08 03 a6 mtlr r0 ffc17068: 83 e1 00 1c lwz r31,28(r1) ffc1706c: 38 21 00 20 addi r1,r1,32 ffc17070: 4e 80 00 20 blr =============================================================================== ffc128e8 : } int IMFS_fifo_close( rtems_libio_t *iop ) { ffc128e8: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED ffc128ec: 7c 08 02 a6 mflr r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); ffc128f0: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { ffc128f4: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED ffc128f8: 93 e1 00 14 stw r31,20(r1) <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; ffc128fc: 83 e3 00 3c lwz r31,60(r3) <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { ffc12900: 93 c1 00 10 stw r30,16(r1) <== NOT EXECUTED ffc12904: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); ffc12908: 38 7f 00 50 addi r3,r31,80 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { ffc1290c: 93 a1 00 0c stw r29,12(r1) <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); ffc12910: 4b ff ec a9 bl ffc115b8 <== NOT EXECUTED if (! err) { ffc12914: 7c 7d 1b 79 mr. r29,r3 <== NOT EXECUTED ffc12918: 40 a2 00 38 bne+ ffc12950 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; ffc1291c: 80 1e 00 18 lwz r0,24(r30) <== 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) ffc12920: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; ffc12924: 54 00 06 2c rlwinm r0,r0,0,24,22 <== NOT EXECUTED ffc12928: 90 1e 00 18 stw r0,24(r30) <== 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) ffc1292c: 48 00 07 ad bl ffc130d8 <== NOT EXECUTED ffc12930: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc12934: 40 9e 00 30 bne- cr7,ffc12964 <== NOT EXECUTED ffc12938: a0 1f 00 34 lhz r0,52(r31) <== NOT EXECUTED ffc1293c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc12940: 40 be 00 24 bne+ cr7,ffc12964 <== NOT EXECUTED free(jnode); ffc12944: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc12948: 4b ff 31 6d bl ffc05ab4 <== NOT EXECUTED ffc1294c: 48 00 00 18 b ffc12964 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); ffc12950: 40 a0 00 14 bge+ ffc12964 <== NOT EXECUTED ffc12954: 7f bd 00 d0 neg r29,r29 <== NOT EXECUTED ffc12958: 48 00 57 15 bl ffc1806c <__errno> <== NOT EXECUTED ffc1295c: 93 a3 00 00 stw r29,0(r3) <== NOT EXECUTED ffc12960: 3b a0 ff ff li r29,-1 <== NOT EXECUTED } ffc12964: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc12968: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc1296c: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc12970: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc12974: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc12978: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc1297c: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc12980: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc12768 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { ffc12768: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc1276c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc12770: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED ffc12774: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED int err; if (command == FIONBIO) { ffc12778: 3c 00 80 04 lis r0,-32764 <== NOT EXECUTED ffc1277c: 60 00 66 7e ori r0,r0,26238 <== NOT EXECUTED ffc12780: 7f 84 00 00 cmpw cr7,r4,r0 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { ffc12784: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED int err; if (command == FIONBIO) { ffc12788: 40 9e 00 38 bne- cr7,ffc127c0 <== NOT EXECUTED if (buffer == NULL) ffc1278c: 2f 85 00 00 cmpwi cr7,r5,0 <== NOT EXECUTED ffc12790: 3b e0 ff f2 li r31,-14 <== NOT EXECUTED ffc12794: 41 9e 00 40 beq- cr7,ffc127d4 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) ffc12798: 81 25 00 00 lwz r9,0(r5) <== NOT EXECUTED ffc1279c: 80 03 00 18 lwz r0,24(r3) <== NOT EXECUTED ffc127a0: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc127a4: 41 9e 00 0c beq- cr7,ffc127b0 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; ffc127a8: 60 00 00 01 ori r0,r0,1 <== NOT EXECUTED ffc127ac: 48 00 00 08 b ffc127b4 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; ffc127b0: 54 00 00 3c rlwinm r0,r0,0,0,30 <== NOT EXECUTED ffc127b4: 90 06 00 18 stw r0,24(r6) <== NOT EXECUTED ffc127b8: 3b e0 00 00 li r31,0 <== NOT EXECUTED ffc127bc: 48 00 00 28 b ffc127e4 <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); ffc127c0: 81 23 00 3c lwz r9,60(r3) <== NOT EXECUTED ffc127c4: 80 69 00 50 lwz r3,80(r9) <== NOT EXECUTED ffc127c8: 4b ff e8 f9 bl ffc110c0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); ffc127cc: 7c 7f 1b 79 mr. r31,r3 <== NOT EXECUTED ffc127d0: 40 a0 00 14 bge+ ffc127e4 <== NOT EXECUTED ffc127d4: 7f ff 00 d0 neg r31,r31 <== NOT EXECUTED ffc127d8: 48 00 58 95 bl ffc1806c <__errno> <== NOT EXECUTED ffc127dc: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED ffc127e0: 3b e0 ff ff li r31,-1 <== NOT EXECUTED } ffc127e4: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc127e8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc127ec: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc127f0: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc127f4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc127f8: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc12704 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { ffc12704: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc12708: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc1270c: 7c 68 1b 78 mr r8,r3 <== NOT EXECUTED ffc12710: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED ffc12714: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); ffc12718: 81 23 00 3c lwz r9,60(r3) <== NOT EXECUTED ffc1271c: 80 69 00 50 lwz r3,80(r9) <== NOT EXECUTED ffc12720: 4b ff e9 29 bl ffc11048 <== NOT EXECUTED ffc12724: 7c 69 fe 70 srawi r9,r3,31 <== NOT EXECUTED IMFS_FIFO_RETURN(err); ffc12728: 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); ffc1272c: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED ffc12730: 7c 6a 1b 78 mr r10,r3 <== NOT EXECUTED IMFS_FIFO_RETURN(err); ffc12734: 40 bc 00 18 bge+ cr7,ffc1274c <== NOT EXECUTED ffc12738: 48 00 59 35 bl ffc1806c <__errno> <== NOT EXECUTED ffc1273c: 7f ff 00 d0 neg r31,r31 <== NOT EXECUTED ffc12740: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED ffc12744: 39 20 ff ff li r9,-1 <== NOT EXECUTED ffc12748: 39 40 ff ff li r10,-1 <== NOT EXECUTED } ffc1274c: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc12750: 7d 44 53 78 mr r4,r10 <== NOT EXECUTED ffc12754: 7d 23 4b 78 mr r3,r9 <== NOT EXECUTED ffc12758: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc1275c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc12760: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc12764: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc12984 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc12984: 94 21 ff f0 stwu r1,-16(r1) ffc12988: 7c 08 02 a6 mflr r0 ffc1298c: 7c 64 1b 78 mr r4,r3 ffc12990: 90 01 00 14 stw r0,20(r1) IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); ffc12994: 81 23 00 3c lwz r9,60(r3) rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc12998: 93 e1 00 0c stw r31,12(r1) IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); ffc1299c: 38 69 00 50 addi r3,r9,80 ffc129a0: 4b ff ed 39 bl ffc116d8 IMFS_FIFO_RETURN(err); ffc129a4: 7c 7f 1b 79 mr. r31,r3 ffc129a8: 40 a0 00 14 bge+ ffc129bc <== NEVER TAKEN ffc129ac: 7f ff 00 d0 neg r31,r31 ffc129b0: 48 00 56 bd bl ffc1806c <__errno> ffc129b4: 93 e3 00 00 stw r31,0(r3) ffc129b8: 3b e0 ff ff li r31,-1 } ffc129bc: 80 01 00 14 lwz r0,20(r1) ffc129c0: 7f e3 fb 78 mr r3,r31 ffc129c4: 83 e1 00 0c lwz r31,12(r1) ffc129c8: 38 21 00 10 addi r1,r1,16 ffc129cc: 7c 08 03 a6 mtlr r0 ffc129d0: 4e 80 00 20 blr =============================================================================== ffc12874 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc12874: 94 21 ff e0 stwu r1,-32(r1) <== NOT EXECUTED ffc12878: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc1287c: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED ffc12880: 90 01 00 24 stw r0,36(r1) <== NOT EXECUTED ffc12884: 93 c1 00 18 stw r30,24(r1) <== NOT EXECUTED ffc12888: 93 e1 00 1c stw r31,28(r1) <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; ffc1288c: 83 e3 00 3c lwz r31,60(r3) <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); ffc12890: 80 7f 00 50 lwz r3,80(r31) <== NOT EXECUTED ffc12894: 4b ff e8 b1 bl ffc11144 <== NOT EXECUTED if (err > 0) ffc12898: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED ffc1289c: 40 81 00 1c ble- ffc128b8 <== NOT EXECUTED IMFS_update_atime(jnode); ffc128a0: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED ffc128a4: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc128a8: 4b ff 32 d5 bl ffc05b7c <== NOT EXECUTED ffc128ac: 80 01 00 08 lwz r0,8(r1) <== NOT EXECUTED ffc128b0: 90 1f 00 40 stw r0,64(r31) <== NOT EXECUTED ffc128b4: 48 00 00 18 b ffc128cc <== NOT EXECUTED IMFS_FIFO_RETURN(err); ffc128b8: 41 a2 00 14 beq+ ffc128cc <== NOT EXECUTED ffc128bc: 7f de 00 d0 neg r30,r30 <== NOT EXECUTED ffc128c0: 48 00 57 ad bl ffc1806c <__errno> <== NOT EXECUTED ffc128c4: 93 c3 00 00 stw r30,0(r3) <== NOT EXECUTED ffc128c8: 3b c0 ff ff li r30,-1 <== NOT EXECUTED } ffc128cc: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED ffc128d0: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc128d4: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc128d8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc128dc: 83 c1 00 18 lwz r30,24(r1) <== NOT EXECUTED ffc128e0: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc128e4: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc127fc : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { ffc127fc: 94 21 ff e0 stwu r1,-32(r1) <== NOT EXECUTED ffc12800: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc12804: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED ffc12808: 90 01 00 24 stw r0,36(r1) <== NOT EXECUTED ffc1280c: 93 c1 00 18 stw r30,24(r1) <== NOT EXECUTED ffc12810: 93 e1 00 1c stw r31,28(r1) <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; ffc12814: 83 e3 00 3c lwz r31,60(r3) <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); ffc12818: 80 7f 00 50 lwz r3,80(r31) <== NOT EXECUTED ffc1281c: 4b ff eb 19 bl ffc11334 <== NOT EXECUTED if (err > 0) { ffc12820: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED ffc12824: 40 81 00 20 ble- ffc12844 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); ffc12828: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED ffc1282c: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc12830: 4b ff 33 4d bl ffc05b7c <== NOT EXECUTED ffc12834: 80 01 00 08 lwz r0,8(r1) <== NOT EXECUTED ffc12838: 90 1f 00 48 stw r0,72(r31) <== NOT EXECUTED ffc1283c: 90 1f 00 44 stw r0,68(r31) <== NOT EXECUTED ffc12840: 48 00 00 18 b ffc12858 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); ffc12844: 41 a2 00 14 beq+ ffc12858 <== NOT EXECUTED ffc12848: 7f de 00 d0 neg r30,r30 <== NOT EXECUTED ffc1284c: 48 00 58 21 bl ffc1806c <__errno> <== NOT EXECUTED ffc12850: 93 c3 00 00 stw r30,0(r3) <== NOT EXECUTED ffc12854: 3b c0 ff ff li r30,-1 <== NOT EXECUTED } ffc12858: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED ffc1285c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc12860: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc12864: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc12868: 83 c1 00 18 lwz r30,24(r1) <== NOT EXECUTED ffc1286c: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc12870: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc12ac8 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc12ac8: 94 21 ff e8 stwu r1,-24(r1) ffc12acc: 7c 08 02 a6 mflr r0 ffc12ad0: 93 e1 00 14 stw r31,20(r1) /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); ffc12ad4: 7c 7f 1b 79 mr. r31,r3 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { ffc12ad8: 93 c1 00 10 stw r30,16(r1) ffc12adc: 7c 9e 23 78 mr r30,r4 ffc12ae0: 90 01 00 1c stw r0,28(r1) ffc12ae4: 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 ); ffc12ae8: 40 a2 00 24 bne+ ffc12b0c <== ALWAYS TAKEN ffc12aec: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc12af0: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc12af4: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc12af8: 38 63 4a ff addi r3,r3,19199 <== NOT EXECUTED ffc12afc: 38 a5 4a e0 addi r5,r5,19168 <== NOT EXECUTED ffc12b00: 38 c6 4b 4b addi r6,r6,19275 <== NOT EXECUTED ffc12b04: 38 80 00 2a li r4,42 <== NOT EXECUTED ffc12b08: 4b ff 2a c5 bl ffc055cc <__assert_func> <== NOT EXECUTED if ( !name ) ffc12b0c: 2f 84 00 00 cmpwi cr7,r4,0 ffc12b10: 41 9e 00 68 beq- cr7,ffc12b78 <== NEVER TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) ffc12b14: 3f a0 ff c2 lis r29,-62 ffc12b18: 3b bd 4a e0 addi r29,r29,19168 ffc12b1c: 7c 83 23 78 mr r3,r4 ffc12b20: 38 9d 00 18 addi r4,r29,24 ffc12b24: 48 00 66 51 bl ffc19174 ffc12b28: 2f 83 00 00 cmpwi cr7,r3,0 ffc12b2c: 41 9e 00 50 beq- cr7,ffc12b7c <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) ffc12b30: 38 9d 00 1c addi r4,r29,28 ffc12b34: 7f c3 f3 78 mr r3,r30 ffc12b38: 48 00 66 3d bl ffc19174 ffc12b3c: 2f 83 00 00 cmpwi cr7,r3,0 ffc12b40: 40 9e 00 0c bne- cr7,ffc12b4c <== ALWAYS TAKEN return directory->Parent; ffc12b44: 83 ff 00 08 lwz r31,8(r31) <== NOT EXECUTED ffc12b48: 48 00 00 34 b ffc12b7c <== NOT EXECUTED ffc12b4c: 3b bf 00 54 addi r29,r31,84 the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; ffc12b50: 83 ff 00 50 lwz r31,80(r31) ffc12b54: 48 00 00 1c b ffc12b70 !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 ) ) ffc12b58: 7f c3 f3 78 mr r3,r30 ffc12b5c: 38 9f 00 0c addi r4,r31,12 ffc12b60: 48 00 66 15 bl ffc19174 ffc12b64: 2f 83 00 00 cmpwi cr7,r3,0 ffc12b68: 41 9e 00 14 beq- cr7,ffc12b7c the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { ffc12b6c: 83 ff 00 00 lwz r31,0(r31) if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; ffc12b70: 7f 9f e8 00 cmpw cr7,r31,r29 ffc12b74: 40 9e ff e4 bne+ cr7,ffc12b58 ffc12b78: 3b e0 00 00 li r31,0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } ffc12b7c: 80 01 00 1c lwz r0,28(r1) ffc12b80: 7f e3 fb 78 mr r3,r31 ffc12b84: 83 a1 00 0c lwz r29,12(r1) ffc12b88: 7c 08 03 a6 mtlr r0 ffc12b8c: 83 c1 00 10 lwz r30,16(r1) ffc12b90: 83 e1 00 14 lwz r31,20(r1) ffc12b94: 38 21 00 18 addi r1,r1,24 ffc12b98: 4e 80 00 20 blr =============================================================================== ffc129dc : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc129dc: 94 21 ff c8 stwu r1,-56(r1) ffc129e0: 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; ffc129e4: 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 ) { ffc129e8: 90 01 00 3c stw r0,60(r1) ffc129ec: 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; ffc129f0: 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; ffc129f4: 83 a3 00 1c lwz r29,28(r3) loc = temp_mt_entry->mt_fs_root; ffc129f8: 81 63 00 24 lwz r11,36(r3) ffc129fc: 81 23 00 28 lwz r9,40(r3) ffc12a00: 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; ffc12a04: 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 ) { ffc12a08: 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; ffc12a0c: 91 41 00 0c stw r10,12(r1) ffc12a10: 91 61 00 10 stw r11,16(r1) ffc12a14: 91 21 00 14 stw r9,20(r1) ffc12a18: 90 01 00 18 stw r0,24(r1) ffc12a1c: 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 ) { ffc12a20: 93 e1 00 34 stw r31,52(r1) temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); ffc12a24: 3b e1 00 08 addi r31,r1,8 ffc12a28: 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; ffc12a2c: 93 a1 00 08 stw r29,8(r1) */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; ffc12a30: 83 dd 00 08 lwz r30,8(r29) loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); ffc12a34: 4b ff f3 7d bl ffc11db0 if ( jnode->type != IMFS_DIRECTORY ) { ffc12a38: 81 3d 00 4c lwz r9,76(r29) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc12a3c: 38 1d 00 54 addi r0,r29,84 ffc12a40: 2f 89 00 01 cmpwi cr7,r9,1 ffc12a44: 40 9e 00 10 bne- cr7,ffc12a54 ffc12a48: 81 3d 00 50 lwz r9,80(r29) ffc12a4c: 7f 89 00 00 cmpw cr7,r9,r0 ffc12a50: 40 be 00 1c bne+ cr7,ffc12a6c result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); ffc12a54: 38 60 00 00 li r3,0 ffc12a58: 7f e4 fb 78 mr r4,r31 ffc12a5c: 4b ff 28 5d bl ffc052b8 if (result != 0) ffc12a60: 2f 83 00 00 cmpwi cr7,r3,0 ffc12a64: 40 9e 00 3c bne- cr7,ffc12aa0 <== NEVER TAKEN ffc12a68: 7f dd f3 78 mr r29,r30 return -1; jnode = next; } if ( jnode != NULL ) { ffc12a6c: 2f 9d 00 00 cmpwi cr7,r29,0 ffc12a70: 41 9e 00 38 beq- cr7,ffc12aa8 if ( jnode->type == IMFS_DIRECTORY ) { ffc12a74: 80 1d 00 4c lwz r0,76(r29) ffc12a78: 2f 80 00 01 cmpwi cr7,r0,1 ffc12a7c: 40 9e ff ac bne+ cr7,ffc12a28 <== NEVER TAKEN ffc12a80: 80 1d 00 50 lwz r0,80(r29) ffc12a84: 39 3d 00 54 addi r9,r29,84 ffc12a88: 7f 80 48 00 cmpw cr7,r0,r9 ffc12a8c: 41 be ff 9c beq- cr7,ffc12a28 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); ffc12a90: 2f 80 00 00 cmpwi cr7,r0,0 ffc12a94: 7c 1d 03 78 mr r29,r0 ffc12a98: 40 9e ff 90 bne+ cr7,ffc12a28 <== ALWAYS TAKEN ffc12a9c: 48 00 00 0c b ffc12aa8 <== NOT EXECUTED ffc12aa0: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc12aa4: 48 00 00 08 b ffc12aac <== NOT EXECUTED ffc12aa8: 38 60 00 00 li r3,0 return 0; } ffc12aac: 80 01 00 3c lwz r0,60(r1) ffc12ab0: 83 a1 00 2c lwz r29,44(r1) ffc12ab4: 7c 08 03 a6 mtlr r0 ffc12ab8: 83 c1 00 30 lwz r30,48(r1) ffc12abc: 83 e1 00 34 lwz r31,52(r1) ffc12ac0: 38 21 00 38 addi r1,r1,56 ffc12ac4: 4e 80 00 20 blr =============================================================================== ffc12b9c : const char *path, int pathlen, char *token, int *token_len ) { ffc12b9c: 94 21 ff f0 stwu r1,-16(r1) ffc12ba0: 7c 08 02 a6 mflr r0 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; ffc12ba4: 39 60 00 21 li r11,33 const char *path, int pathlen, char *token, int *token_len ) { ffc12ba8: 93 e1 00 0c stw r31,12(r1) register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; ffc12bac: 39 20 00 00 li r9,0 const char *path, int pathlen, char *token, int *token_len ) { ffc12bb0: 7c bf 2b 78 mr r31,r5 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; ffc12bb4: 7d 69 03 a6 mtctr r11 const char *path, int pathlen, char *token, int *token_len ) { ffc12bb8: 90 01 00 14 stw r0,20(r1) ffc12bbc: 93 c1 00 08 stw r30,8(r1) register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; ffc12bc0: 88 03 00 00 lbz r0,0(r3) while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { ffc12bc4: 48 00 00 1c b ffc12be0 token[i] = c; ffc12bc8: 7c 1f 49 ae stbx r0,r31,r9 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; ffc12bcc: 39 29 00 01 addi r9,r9,1 c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; if ( i == IMFS_NAME_MAX ) ffc12bd0: 42 00 00 0c bdnz- ffc12bdc ffc12bd4: 3b c0 00 04 li r30,4 ffc12bd8: 48 00 00 bc b ffc12c94 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; ffc12bdc: 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) ) { ffc12be0: 2c 00 00 2f cmpwi r0,47 ffc12be4: 2c 80 00 5c cmpwi cr1,r0,92 ffc12be8: 2f 00 00 00 cmpwi cr6,r0,0 ffc12bec: 7f 89 20 00 cmpw cr7,r9,r4 ffc12bf0: 41 82 00 10 beq- ffc12c00 ffc12bf4: 41 86 00 0c beq- cr1,ffc12c00 ffc12bf8: 41 9a 00 08 beq- cr6,ffc12c00 ffc12bfc: 41 9c ff cc blt+ cr7,ffc12bc8 /* * Copy a seperator into token. */ if ( i == 0 ) { ffc12c00: 2f 89 00 00 cmpwi cr7,r9,0 ffc12c04: 40 9e 00 24 bne- cr7,ffc12c28 token[i] = c; if ( (token[i] != '\0') && pathlen ) { ffc12c08: 2f 80 00 00 cmpwi cr7,r0,0 /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; ffc12c0c: 98 1f 00 00 stb r0,0(r31) if ( (token[i] != '\0') && pathlen ) { ffc12c10: 41 9e 00 38 beq- cr7,ffc12c48 ffc12c14: 2f 84 00 00 cmpwi cr7,r4,0 ffc12c18: 41 9e 00 30 beq- cr7,ffc12c48 ffc12c1c: 3b c0 00 01 li r30,1 ffc12c20: 39 20 00 01 li r9,1 ffc12c24: 48 00 00 28 b ffc12c4c i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { ffc12c28: 7d 7f 4a 14 add r11,r31,r9 ffc12c2c: 88 0b ff ff lbz r0,-1(r11) ffc12c30: 3b c0 00 03 li r30,3 ffc12c34: 2f 80 00 00 cmpwi cr7,r0,0 ffc12c38: 41 9e 00 14 beq- cr7,ffc12c4c <== NEVER TAKEN token[i] = '\0'; ffc12c3c: 38 00 00 00 li r0,0 ffc12c40: 7c 1f 49 ae stbx r0,r31,r9 ffc12c44: 48 00 00 08 b ffc12c4c ffc12c48: 3b c0 00 00 li r30,0 /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { ffc12c4c: 2f 9e 00 03 cmpwi cr7,r30,3 /* * Set token_len to the number of characters copied. */ *token_len = i; ffc12c50: 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 ) { ffc12c54: 40 be 00 40 bne+ cr7,ffc12c94 if ( strcmp( token, "..") == 0 ) ffc12c58: 3c 80 ff c2 lis r4,-62 ffc12c5c: 38 84 4b 55 addi r4,r4,19285 ffc12c60: 7f e3 fb 78 mr r3,r31 ffc12c64: 48 00 65 11 bl ffc19174 ffc12c68: 2f 83 00 00 cmpwi cr7,r3,0 ffc12c6c: 40 9e 00 0c bne- cr7,ffc12c78 ffc12c70: 3b c0 00 02 li r30,2 ffc12c74: 48 00 00 20 b ffc12c94 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) ffc12c78: 3c 80 ff c2 lis r4,-62 ffc12c7c: 7f e3 fb 78 mr r3,r31 ffc12c80: 38 84 4b 56 addi r4,r4,19286 ffc12c84: 48 00 64 f1 bl ffc19174 ffc12c88: 2f 83 00 00 cmpwi cr7,r3,0 ffc12c8c: 40 9e 00 08 bne- cr7,ffc12c94 ffc12c90: 3b c0 00 01 li r30,1 type = IMFS_CURRENT_DIR; } return type; } ffc12c94: 80 01 00 14 lwz r0,20(r1) ffc12c98: 7f c3 f3 78 mr r3,r30 ffc12c9c: 83 e1 00 0c lwz r31,12(r1) ffc12ca0: 7c 08 03 a6 mtlr r0 ffc12ca4: 83 c1 00 08 lwz r30,8(r1) ffc12ca8: 38 21 00 10 addi r1,r1,16 ffc12cac: 4e 80 00 20 blr =============================================================================== ffc04dcc : IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, ffc04dcc: 39 60 00 06 li r11,6 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 ) { ffc04dd0: 94 21 ff e8 stwu r1,-24(r1) IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, ffc04dd4: 7d 69 03 a6 mtctr r11 ffc04dd8: 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 ) { ffc04ddc: 7c 08 02 a6 mflr r0 ffc04de0: 93 81 00 08 stw r28,8(r1) ffc04de4: 7c 9c 23 78 mr r28,r4 ffc04de8: 90 01 00 1c stw r0,28(r1) ffc04dec: 93 a1 00 0c stw r29,12(r1) ffc04df0: 7c dd 33 78 mr r29,r6 ffc04df4: 93 c1 00 10 stw r30,16(r1) ffc04df8: 7c be 2b 78 mr r30,r5 ffc04dfc: 93 e1 00 14 stw r31,20(r1) ffc04e00: 7c 7f 1b 78 mr r31,r3 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, ffc04e04: 80 09 26 b0 lwz r0,9904(r9) ffc04e08: 39 20 00 10 li r9,16 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { ffc04e0c: 7f 89 00 00 cmpw cr7,r9,r0 ffc04e10: 41 9e 00 10 beq- cr7,ffc04e20 ffc04e14: 55 29 08 3c rlwinm r9,r9,1,0,30 ffc04e18: 42 00 ff f4 bdnz+ ffc04e0c ffc04e1c: 39 20 00 80 li r9,128 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) ffc04e20: 3d 60 00 00 lis r11,0 ffc04e24: 91 2b 27 68 stw r9,10088(r11) /* * 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(); ffc04e28: 48 00 cd d1 bl ffc11bf8 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; ffc04e2c: 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(); ffc04e30: 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; ffc04e34: 38 84 49 e4 addi r4,r4,18916 ffc04e38: 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; ffc04e3c: 93 9f 00 28 stw r28,40(r31) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; ffc04e40: 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; ffc04e44: 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; ffc04e48: 48 01 3e 0d bl ffc18c54 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); ffc04e4c: 38 60 00 01 li r3,1 ffc04e50: 38 80 00 10 li r4,16 ffc04e54: 48 00 09 51 bl ffc057a4 if ( !fs_info ) { ffc04e58: 7c 69 1b 79 mr. r9,r3 ffc04e5c: 80 7f 00 1c lwz r3,28(r31) ffc04e60: 40 a2 00 1c bne+ ffc04e7c <== ALWAYS TAKEN free(temp_mt_entry->mt_fs_root.node_access); ffc04e64: 48 00 0c 51 bl ffc05ab4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); ffc04e68: 48 01 32 05 bl ffc1806c <__errno> <== NOT EXECUTED ffc04e6c: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc04e70: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc04e74: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc04e78: 48 00 00 38 b ffc04eb0 <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; ffc04e7c: 3d 60 00 00 lis r11,0 fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; ffc04e80: 93 a9 00 0c stw r29,12(r9) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; ffc04e84: 38 00 00 01 li r0,1 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; ffc04e88: 81 4b 28 b4 lwz r10,10420(r11) fs_info->ino_count = 1; ffc04e8c: 90 09 00 04 stw r0,4(r9) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; ffc04e90: 39 0a 00 01 addi r8,r10,1 ffc04e94: 91 49 00 00 stw r10,0(r9) 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; ffc04e98: 90 03 00 38 stw r0,56(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; ffc04e9c: 91 3f 00 34 stw r9,52(r31) * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; ffc04ea0: 93 c9 00 08 stw r30,8(r9) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; ffc04ea4: 91 0b 28 b4 stw r8,10420(r11) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); ffc04ea8: 48 00 c1 a9 bl ffc11050 ffc04eac: 38 60 00 00 li r3,0 return 0; } ffc04eb0: 80 01 00 1c lwz r0,28(r1) ffc04eb4: 83 81 00 08 lwz r28,8(r1) ffc04eb8: 7c 08 03 a6 mtlr r0 ffc04ebc: 83 a1 00 0c lwz r29,12(r1) ffc04ec0: 83 c1 00 10 lwz r30,16(r1) ffc04ec4: 83 e1 00 14 lwz r31,20(r1) ffc04ec8: 38 21 00 18 addi r1,r1,24 ffc04ecc: 4e 80 00 20 blr =============================================================================== ffc04ed0 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { ffc04ed0: 94 21 ff 98 stwu r1,-104(r1) ffc04ed4: 7c 08 02 a6 mflr r0 ffc04ed8: 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; ffc04edc: 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 */ ) { ffc04ee0: 93 a1 00 5c stw r29,92(r1) ffc04ee4: 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; ffc04ee8: 91 21 00 18 stw r9,24(r1) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) ffc04eec: 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 */ ) { ffc04ef0: 93 c1 00 60 stw r30,96(r1) ffc04ef4: 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 ) ffc04ef8: 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 */ ) { ffc04efc: 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 ) ffc04f00: 40 bd 00 10 ble+ cr7,ffc04f10 rtems_set_errno_and_return_minus_one( EMLINK ); ffc04f04: 48 01 31 69 bl ffc1806c <__errno> ffc04f08: 38 00 00 1f li r0,31 ffc04f0c: 48 00 00 50 b ffc04f5c /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); ffc04f10: 7c a3 2b 78 mr r3,r5 ffc04f14: 48 01 44 19 bl ffc1932c ffc04f18: 3b e1 00 30 addi r31,r1,48 ffc04f1c: 7c 64 1b 78 mr r4,r3 ffc04f20: 7f e5 fb 78 mr r5,r31 ffc04f24: 38 c1 00 08 addi r6,r1,8 ffc04f28: 7f a3 eb 78 mr r3,r29 ffc04f2c: 48 00 dc 71 bl ffc12b9c * 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( ffc04f30: 38 c0 00 00 li r6,0 ffc04f34: 7f c3 f3 78 mr r3,r30 ffc04f38: 7f e5 fb 78 mr r5,r31 ffc04f3c: 60 c6 a1 ff ori r6,r6,41471 ffc04f40: 38 80 00 03 li r4,3 ffc04f44: 38 e1 00 18 addi r7,r1,24 ffc04f48: 48 00 cd 01 bl ffc11c48 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) ffc04f4c: 2f 83 00 00 cmpwi cr7,r3,0 ffc04f50: 40 be 00 18 bne+ cr7,ffc04f68 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); ffc04f54: 48 01 31 19 bl ffc1806c <__errno> <== NOT EXECUTED ffc04f58: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc04f5c: 90 03 00 00 stw r0,0(r3) ffc04f60: 38 60 ff ff li r3,-1 ffc04f64: 48 00 00 30 b ffc04f94 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; ffc04f68: 81 21 00 18 lwz r9,24(r1) IMFS_update_ctime( info.hard_link.link_node ); ffc04f6c: 38 61 00 0c addi r3,r1,12 ffc04f70: 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++; ffc04f74: a1 69 00 34 lhz r11,52(r9) ffc04f78: 38 0b 00 01 addi r0,r11,1 ffc04f7c: b0 09 00 34 sth r0,52(r9) IMFS_update_ctime( info.hard_link.link_node ); ffc04f80: 48 00 0b fd bl ffc05b7c ffc04f84: 80 01 00 0c lwz r0,12(r1) ffc04f88: 81 21 00 18 lwz r9,24(r1) ffc04f8c: 38 60 00 00 li r3,0 ffc04f90: 90 09 00 48 stw r0,72(r9) return 0; } ffc04f94: 80 01 00 6c lwz r0,108(r1) ffc04f98: 83 a1 00 5c lwz r29,92(r1) ffc04f9c: 7c 08 03 a6 mtlr r0 ffc04fa0: 83 c1 00 60 lwz r30,96(r1) ffc04fa4: 83 e1 00 64 lwz r31,100(r1) ffc04fa8: 38 21 00 68 addi r1,r1,104 ffc04fac: 4e 80 00 20 blr =============================================================================== ffc15d58 : ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); ffc15d58: 7c 69 1b 79 mr. r9,r3 MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { ffc15d5c: 94 21 ff f0 stwu r1,-16(r1) ffc15d60: 7c 08 02 a6 mflr r0 ffc15d64: 93 e1 00 0c stw r31,12(r1) ffc15d68: 90 01 00 14 stw r0,20(r1) block_p memory; block_p *block_entry_ptr; assert( the_jnode ); ffc15d6c: 40 a2 00 28 bne+ ffc15d94 <== ALWAYS TAKEN ffc15d70: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc15d74: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc15d78: 38 a5 4e a4 addi r5,r5,20132 <== NOT EXECUTED ffc15d7c: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc15d80: 38 63 4f 66 addi r3,r3,20326 <== NOT EXECUTED ffc15d84: 38 a5 00 70 addi r5,r5,112 <== NOT EXECUTED ffc15d88: 38 c6 4f ac addi r6,r6,20396 <== NOT EXECUTED ffc15d8c: 38 80 01 69 li r4,361 <== NOT EXECUTED ffc15d90: 48 00 00 30 b ffc15dc0 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); ffc15d94: 80 09 00 4c lwz r0,76(r9) ffc15d98: 2f 80 00 05 cmpwi cr7,r0,5 ffc15d9c: 41 be 00 28 beq+ cr7,ffc15dc4 <== ALWAYS TAKEN ffc15da0: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc15da4: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc15da8: 38 a5 4e a4 addi r5,r5,20132 <== NOT EXECUTED ffc15dac: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc15db0: 38 63 4f 66 addi r3,r3,20326 <== NOT EXECUTED ffc15db4: 38 a5 00 70 addi r5,r5,112 <== NOT EXECUTED ffc15db8: 38 c6 4f b6 addi r6,r6,20406 <== NOT EXECUTED ffc15dbc: 38 80 01 6d li r4,365 <== NOT EXECUTED ffc15dc0: 4b fe f8 0d bl ffc055cc <__assert_func> <== NOT EXECUTED 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 ); ffc15dc4: 38 a0 00 01 li r5,1 ffc15dc8: 4b ff f9 39 bl ffc15700 if ( *block_entry_ptr ) ffc15dcc: 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 ); ffc15dd0: 7c 7f 1b 78 mr r31,r3 if ( *block_entry_ptr ) ffc15dd4: 38 60 00 00 li r3,0 ffc15dd8: 2f 80 00 00 cmpwi cr7,r0,0 ffc15ddc: 40 be 00 1c bne+ cr7,ffc15df8 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); ffc15de0: 4b ff f8 dd bl ffc156bc if ( !memory ) ffc15de4: 7c 60 1b 79 mr. r0,r3 ffc15de8: 38 60 00 01 li r3,1 ffc15dec: 41 82 00 0c beq- ffc15df8 <== NEVER TAKEN return 1; *block_entry_ptr = memory; ffc15df0: 90 1f 00 00 stw r0,0(r31) ffc15df4: 38 60 00 00 li r3,0 return 0; } ffc15df8: 80 01 00 14 lwz r0,20(r1) ffc15dfc: 83 e1 00 0c lwz r31,12(r1) ffc15e00: 38 21 00 10 addi r1,r1,16 ffc15e04: 7c 08 03 a6 mtlr r0 ffc15e08: 4e 80 00 20 blr =============================================================================== ffc15e0c : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc15e0c: 94 21 ff d8 stwu r1,-40(r1) ffc15e10: 7c 08 02 a6 mflr r0 ffc15e14: 93 e1 00 24 stw r31,36(r1) /* * Perform internal consistency checks */ assert( the_jnode ); ffc15e18: 7c 7f 1b 79 mr. r31,r3 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { ffc15e1c: 93 81 00 18 stw r28,24(r1) ffc15e20: 7c dc 33 78 mr r28,r6 ffc15e24: 93 a1 00 1c stw r29,28(r1) ffc15e28: 7c bd 2b 78 mr r29,r5 ffc15e2c: 90 01 00 2c stw r0,44(r1) ffc15e30: 93 01 00 08 stw r24,8(r1) ffc15e34: 93 21 00 0c stw r25,12(r1) ffc15e38: 93 41 00 10 stw r26,16(r1) ffc15e3c: 93 61 00 14 stw r27,20(r1) ffc15e40: 93 c1 00 20 stw r30,32(r1) /* * Perform internal consistency checks */ assert( the_jnode ); ffc15e44: 40 a2 00 28 bne+ ffc15e6c <== ALWAYS TAKEN ffc15e48: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc15e4c: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc15e50: 38 a5 4e a4 addi r5,r5,20132 <== NOT EXECUTED ffc15e54: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc15e58: 38 63 4f 66 addi r3,r3,20326 <== NOT EXECUTED ffc15e5c: 38 a5 00 88 addi r5,r5,136 <== NOT EXECUTED ffc15e60: 38 c6 4f ac addi r6,r6,20396 <== NOT EXECUTED ffc15e64: 38 80 01 31 li r4,305 <== NOT EXECUTED ffc15e68: 48 00 00 30 b ffc15e98 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); ffc15e6c: 80 1f 00 4c lwz r0,76(r31) ffc15e70: 2f 80 00 05 cmpwi cr7,r0,5 ffc15e74: 41 be 00 28 beq+ cr7,ffc15e9c <== ALWAYS TAKEN ffc15e78: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc15e7c: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc15e80: 38 a5 4e a4 addi r5,r5,20132 <== NOT EXECUTED ffc15e84: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc15e88: 38 63 4f 66 addi r3,r3,20326 <== NOT EXECUTED ffc15e8c: 38 a5 00 88 addi r5,r5,136 <== NOT EXECUTED ffc15e90: 38 c6 4f b6 addi r6,r6,20406 <== NOT EXECUTED ffc15e94: 38 80 01 35 li r4,309 <== NOT EXECUTED ffc15e98: 4b fe f7 35 bl ffc055cc <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ffc15e9c: 3d 20 00 00 lis r9,0 ffc15ea0: 83 c9 27 68 lwz r30,10088(r9) ffc15ea4: 38 00 00 00 li r0,0 ffc15ea8: 7f 80 28 00 cmpw cr7,r0,r5 ffc15eac: 57 c9 f0 be rlwinm r9,r30,30,2,31 ffc15eb0: 39 69 00 01 addi r11,r9,1 ffc15eb4: 7d 6b 49 d6 mullw r11,r11,r9 ffc15eb8: 38 0b 00 01 addi r0,r11,1 ffc15ebc: 7d 20 49 d6 mullw r9,r0,r9 ffc15ec0: 39 29 ff ff addi r9,r9,-1 ffc15ec4: 7d 29 f1 d6 mullw r9,r9,r30 ffc15ec8: 41 bd 00 1c bgt+ cr7,ffc15ee4 <== NEVER TAKEN ffc15ecc: 40 9e 00 0c bne- cr7,ffc15ed8 <== NEVER TAKEN ffc15ed0: 7f 89 30 40 cmplw cr7,r9,r6 ffc15ed4: 41 bd 00 10 bgt+ cr7,ffc15ee4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ffc15ed8: 48 00 21 95 bl ffc1806c <__errno> <== NOT EXECUTED ffc15edc: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc15ee0: 48 00 00 9c b ffc15f7c <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) ffc15ee4: 83 3f 00 50 lwz r25,80(r31) ffc15ee8: 83 5f 00 54 lwz r26,84(r31) ffc15eec: 7f 9d c8 00 cmpw cr7,r29,r25 ffc15ef0: 41 bd 00 18 bgt+ cr7,ffc15f08 <== NEVER TAKEN ffc15ef4: 40 9e 00 0c bne- cr7,ffc15f00 <== NEVER TAKEN ffc15ef8: 7f 9c d0 40 cmplw cr7,r28,r26 ffc15efc: 41 bd 00 0c bgt+ cr7,ffc15f08 ffc15f00: 38 60 00 00 li r3,0 ffc15f04: 48 00 00 9c b ffc15fa0 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc15f08: 7f db fe 70 srawi r27,r30,31 ffc15f0c: 7f 65 db 78 mr r5,r27 ffc15f10: 7f c6 f3 78 mr r6,r30 ffc15f14: 7f a3 eb 78 mr r3,r29 ffc15f18: 7f 84 e3 78 mr r4,r28 ffc15f1c: 48 00 c0 05 bl ffc21f20 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc15f20: 7f 65 db 78 mr r5,r27 ffc15f24: 7f c6 f3 78 mr r6,r30 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc15f28: 7c 98 23 78 mr r24,r4 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc15f2c: 7f 23 cb 78 mr r3,r25 ffc15f30: 7f 44 d3 78 mr r4,r26 ffc15f34: 48 00 bf ed bl ffc21f20 <__divdi3> ffc15f38: 7c 9b 23 78 mr r27,r4 ffc15f3c: 7c 9e 23 78 mr r30,r4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ffc15f40: 48 00 00 4c b ffc15f8c if ( IMFS_memfile_addblock( the_jnode, block ) ) { ffc15f44: 7f e3 fb 78 mr r3,r31 ffc15f48: 7f c4 f3 78 mr r4,r30 ffc15f4c: 4b ff fe 0d bl ffc15d58 ffc15f50: 2f 83 00 00 cmpwi cr7,r3,0 ffc15f54: 41 be 00 34 beq+ cr7,ffc15f88 <== ALWAYS TAKEN ffc15f58: 48 00 00 14 b ffc15f6c <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); ffc15f5c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc15f60: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc15f64: 4b ff fa 99 bl ffc159fc <== 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-- ) { ffc15f68: 3b de ff ff addi r30,r30,-1 <== NOT EXECUTED ffc15f6c: 7f 9e d8 40 cmplw cr7,r30,r27 <== NOT EXECUTED ffc15f70: 40 9c ff ec bge+ cr7,ffc15f5c <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); ffc15f74: 48 00 20 f9 bl ffc1806c <__errno> <== NOT EXECUTED ffc15f78: 38 00 00 1c li r0,28 <== NOT EXECUTED ffc15f7c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc15f80: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc15f84: 48 00 00 1c b ffc15fa0 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ffc15f88: 3b de 00 01 addi r30,r30,1 ffc15f8c: 7f 9e c0 40 cmplw cr7,r30,r24 ffc15f90: 40 9d ff b4 ble+ cr7,ffc15f44 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; ffc15f94: 93 9f 00 54 stw r28,84(r31) ffc15f98: 38 60 00 00 li r3,0 ffc15f9c: 93 bf 00 50 stw r29,80(r31) return 0; } ffc15fa0: 80 01 00 2c lwz r0,44(r1) ffc15fa4: 83 01 00 08 lwz r24,8(r1) ffc15fa8: 7c 08 03 a6 mtlr r0 ffc15fac: 83 21 00 0c lwz r25,12(r1) ffc15fb0: 83 41 00 10 lwz r26,16(r1) ffc15fb4: 83 61 00 14 lwz r27,20(r1) ffc15fb8: 83 81 00 18 lwz r28,24(r1) ffc15fbc: 83 a1 00 1c lwz r29,28(r1) ffc15fc0: 83 c1 00 20 lwz r30,32(r1) ffc15fc4: 83 e1 00 24 lwz r31,36(r1) ffc15fc8: 38 21 00 28 addi r1,r1,40 ffc15fcc: 4e 80 00 20 blr =============================================================================== ffc15700 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc15700: 94 21 ff e8 stwu r1,-24(r1) ffc15704: 7c 08 02 a6 mflr r0 ffc15708: 93 e1 00 14 stw r31,20(r1) /* * Perform internal consistency checks */ assert( the_jnode ); ffc1570c: 7c 7f 1b 79 mr. r31,r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { ffc15710: 93 c1 00 10 stw r30,16(r1) ffc15714: 7c 9e 23 78 mr r30,r4 ffc15718: 90 01 00 1c stw r0,28(r1) ffc1571c: 93 81 00 08 stw r28,8(r1) ffc15720: 93 a1 00 0c stw r29,12(r1) /* * Perform internal consistency checks */ assert( the_jnode ); ffc15724: 40 a2 00 24 bne+ ffc15748 <== ALWAYS TAKEN ffc15728: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc1572c: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc15730: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc15734: 38 63 4f 66 addi r3,r3,20326 <== NOT EXECUTED ffc15738: 38 a5 4e a4 addi r5,r5,20132 <== NOT EXECUTED ffc1573c: 38 c6 4f ac addi r6,r6,20396 <== NOT EXECUTED ffc15740: 38 80 03 88 li r4,904 <== NOT EXECUTED ffc15744: 48 00 00 2c b ffc15770 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); ffc15748: 80 1f 00 4c lwz r0,76(r31) ffc1574c: 2f 80 00 05 cmpwi cr7,r0,5 ffc15750: 41 be 00 24 beq+ cr7,ffc15774 <== ALWAYS TAKEN ffc15754: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc15758: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc1575c: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc15760: 38 63 4f 66 addi r3,r3,20326 <== NOT EXECUTED ffc15764: 38 a5 4e a4 addi r5,r5,20132 <== NOT EXECUTED ffc15768: 38 c6 4f b6 addi r6,r6,20406 <== NOT EXECUTED ffc1576c: 38 80 03 8c li r4,908 <== NOT EXECUTED ffc15770: 4b fe fe 5d bl ffc055cc <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { ffc15774: 3d 20 00 00 lis r9,0 ffc15778: 81 29 27 68 lwz r9,10088(r9) ffc1577c: 55 29 f0 be rlwinm r9,r9,30,2,31 ffc15780: 38 09 ff ff addi r0,r9,-1 ffc15784: 7f 84 00 40 cmplw cr7,r4,r0 ffc15788: 41 9d 00 40 bgt- cr7,ffc157c8 <== NEVER TAKEN fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { ffc1578c: 2f 05 00 00 cmpwi cr6,r5,0 if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; ffc15790: 80 1f 00 58 lwz r0,88(r31) ffc15794: 2f 80 00 00 cmpwi cr7,r0,0 if ( malloc_it ) { ffc15798: 41 9a 00 20 beq- cr6,ffc157b8 if ( !p ) { ffc1579c: 40 be 00 14 bne+ cr7,ffc157b0 p = memfile_alloc_block(); ffc157a0: 4b ff ff 1d bl ffc156bc if ( !p ) ffc157a4: 2c 03 00 00 cmpwi r3,0 ffc157a8: 41 82 01 78 beq- ffc15920 <== NEVER TAKEN return 0; info->indirect = p; ffc157ac: 90 7f 00 58 stw r3,88(r31) } return &info->indirect[ my_block ]; ffc157b0: 80 7f 00 58 lwz r3,88(r31) ffc157b4: 48 00 01 60 b ffc15914 } if ( !p ) ffc157b8: 41 9e 01 68 beq- cr7,ffc15920 <== NEVER TAKEN return 0; return &info->indirect[ my_block ]; ffc157bc: 54 9e 10 3a rlwinm r30,r4,2,0,29 ffc157c0: 7c 60 f2 14 add r3,r0,r30 ffc157c4: 48 00 01 60 b ffc15924 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { ffc157c8: 39 69 00 01 addi r11,r9,1 <== NOT EXECUTED ffc157cc: 7d 6b 49 d6 mullw r11,r11,r9 <== NOT EXECUTED ffc157d0: 38 0b ff ff addi r0,r11,-1 <== NOT EXECUTED ffc157d4: 7f 84 00 40 cmplw cr7,r4,r0 <== NOT EXECUTED ffc157d8: 41 9d 00 80 bgt- cr7,ffc15858 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; ffc157dc: 7f c9 20 50 subf r30,r9,r4 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; ffc157e0: 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; ffc157e4: 7f be 4b 96 divwu r29,r30,r9 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { ffc157e8: 2f 05 00 00 cmpwi cr6,r5,0 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ffc157ec: 7d 3d 49 d6 mullw r9,r29,r9 <== NOT EXECUTED ffc157f0: 2f 8b 00 00 cmpwi cr7,r11,0 <== NOT EXECUTED ffc157f4: 7f c9 f0 50 subf r30,r9,r30 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { ffc157f8: 41 9a 00 40 beq- cr6,ffc15838 <== NOT EXECUTED if ( !p ) { ffc157fc: 40 be 00 14 bne+ cr7,ffc15810 <== NOT EXECUTED p = memfile_alloc_block(); ffc15800: 4b ff fe bd bl ffc156bc <== NOT EXECUTED if ( !p ) ffc15804: 7c 6b 1b 79 mr. r11,r3 <== NOT EXECUTED ffc15808: 41 82 01 18 beq- ffc15920 <== NOT EXECUTED return 0; info->doubly_indirect = p; ffc1580c: 91 7f 00 5c stw r11,92(r31) <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; ffc15810: 57 bd 10 3a rlwinm r29,r29,2,0,29 <== NOT EXECUTED ffc15814: 7c 6b e8 2e lwzx r3,r11,r29 <== NOT EXECUTED ffc15818: 7f ab ea 14 add r29,r11,r29 <== NOT EXECUTED if ( !p1 ) { ffc1581c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc15820: 40 be 00 f4 bne+ cr7,ffc15914 <== NOT EXECUTED p1 = memfile_alloc_block(); ffc15824: 4b ff fe 99 bl ffc156bc <== NOT EXECUTED if ( !p1 ) ffc15828: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc1582c: 41 82 00 f4 beq- ffc15920 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; ffc15830: 90 7d 00 00 stw r3,0(r29) <== NOT EXECUTED ffc15834: 48 00 00 e0 b ffc15914 <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) ffc15838: 41 be 00 e8 beq+ cr7,ffc15920 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; ffc1583c: 57 bd 10 3a rlwinm r29,r29,2,0,29 <== NOT EXECUTED ffc15840: 7c 0b e8 2e lwzx r0,r11,r29 <== 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 ]; ffc15844: 57 de 10 3a rlwinm r30,r30,2,0,29 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) ffc15848: 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 ]; ffc1584c: 7c 60 f2 14 add r3,r0,r30 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) ffc15850: 40 be 00 d4 bne+ cr7,ffc15924 <== NOT EXECUTED ffc15854: 48 00 00 cc b ffc15920 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { ffc15858: 39 4b 00 01 addi r10,r11,1 <== NOT EXECUTED ffc1585c: 7d 4a 49 d6 mullw r10,r10,r9 <== NOT EXECUTED ffc15860: 38 0a ff ff addi r0,r10,-1 <== NOT EXECUTED ffc15864: 7f 84 00 40 cmplw cr7,r4,r0 <== NOT EXECUTED ffc15868: 41 9d 00 b8 bgt- cr7,ffc15920 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; ffc1586c: 7f cb 20 50 subf r30,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; ffc15870: 81 7f 00 60 lwz r11,96(r31) <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ffc15874: 7c 1e 4b 96 divwu r0,r30,r9 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; ffc15878: 7f a0 4b 96 divwu r29,r0,r9 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { ffc1587c: 2f 05 00 00 cmpwi cr6,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; ffc15880: 7f 9d 49 d6 mullw r28,r29,r9 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ffc15884: 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; ffc15888: 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; ffc1588c: 7f c9 f0 50 subf r30,r9,r30 <== NOT EXECUTED ffc15890: 2f 8b 00 00 cmpwi cr7,r11,0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { ffc15894: 41 9a 00 64 beq- cr6,ffc158f8 <== NOT EXECUTED if ( !p ) { ffc15898: 40 be 00 14 bne+ cr7,ffc158ac <== NOT EXECUTED p = memfile_alloc_block(); ffc1589c: 4b ff fe 21 bl ffc156bc <== NOT EXECUTED if ( !p ) ffc158a0: 7c 6b 1b 79 mr. r11,r3 <== NOT EXECUTED ffc158a4: 41 82 00 7c beq- ffc15920 <== NOT EXECUTED return 0; info->triply_indirect = p; ffc158a8: 91 7f 00 60 stw r11,96(r31) <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; ffc158ac: 57 bd 10 3a rlwinm r29,r29,2,0,29 <== NOT EXECUTED ffc158b0: 7d 2b e8 2e lwzx r9,r11,r29 <== NOT EXECUTED ffc158b4: 7f ab ea 14 add r29,r11,r29 <== NOT EXECUTED if ( !p1 ) { ffc158b8: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc158bc: 40 be 00 14 bne+ cr7,ffc158d0 <== NOT EXECUTED p1 = memfile_alloc_block(); ffc158c0: 4b ff fd fd bl ffc156bc <== NOT EXECUTED if ( !p1 ) ffc158c4: 7c 69 1b 79 mr. r9,r3 <== NOT EXECUTED ffc158c8: 41 82 00 58 beq- ffc15920 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; ffc158cc: 91 3d 00 00 stw r9,0(r29) <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; ffc158d0: 57 9c 10 3a rlwinm r28,r28,2,0,29 <== NOT EXECUTED ffc158d4: 7c 69 e0 2e lwzx r3,r9,r28 <== NOT EXECUTED ffc158d8: 7f 89 e2 14 add r28,r9,r28 <== NOT EXECUTED if ( !p2 ) { ffc158dc: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc158e0: 40 be 00 34 bne+ cr7,ffc15914 <== NOT EXECUTED p2 = memfile_alloc_block(); ffc158e4: 4b ff fd d9 bl ffc156bc <== NOT EXECUTED if ( !p2 ) ffc158e8: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc158ec: 41 82 00 34 beq- ffc15920 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; ffc158f0: 90 7c 00 00 stw r3,0(r28) <== NOT EXECUTED ffc158f4: 48 00 00 20 b ffc15914 <== NOT EXECUTED } return (block_p *)&p2[ singly ]; } if ( !p ) ffc158f8: 41 be 00 28 beq+ cr7,ffc15920 <== 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 ]; ffc158fc: 57 bd 10 3a rlwinm r29,r29,2,0,29 <== NOT EXECUTED ffc15900: 7d 2b e8 2e lwzx r9,r11,r29 <== NOT EXECUTED if ( !p1 ) ffc15904: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc15908: 41 be 00 18 beq+ cr7,ffc15920 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; ffc1590c: 57 9c 10 3a rlwinm r28,r28,2,0,29 <== NOT EXECUTED ffc15910: 7c 69 e0 2e lwzx r3,r9,r28 <== NOT EXECUTED ffc15914: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc15918: 7c 63 f2 14 add r3,r3,r30 ffc1591c: 48 00 00 08 b ffc15924 ffc15920: 38 60 00 00 li r3,0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } ffc15924: 80 01 00 1c lwz r0,28(r1) ffc15928: 83 81 00 08 lwz r28,8(r1) ffc1592c: 7c 08 03 a6 mtlr r0 ffc15930: 83 a1 00 0c lwz r29,12(r1) ffc15934: 83 c1 00 10 lwz r30,16(r1) ffc15938: 83 e1 00 14 lwz r31,20(r1) ffc1593c: 38 21 00 18 addi r1,r1,24 ffc15940: 4e 80 00 20 blr =============================================================================== ffc16528 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc16528: 94 21 ff c8 stwu r1,-56(r1) ffc1652c: 7c 08 02 a6 mflr r0 ffc16530: 93 e1 00 34 stw r31,52(r1) /* * Perform internal consistency checks */ assert( the_jnode ); ffc16534: 7c 7f 1b 79 mr. r31,r3 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { ffc16538: 93 61 00 24 stw r27,36(r1) ffc1653c: 7c bb 2b 78 mr r27,r5 ffc16540: 93 81 00 28 stw r28,40(r1) ffc16544: 7c dc 33 78 mr r28,r6 ffc16548: 93 c1 00 30 stw r30,48(r1) ffc1654c: 7c fe 3b 78 mr r30,r7 ffc16550: 90 01 00 3c stw r0,60(r1) ffc16554: 93 01 00 18 stw r24,24(r1) ffc16558: 93 21 00 1c stw r25,28(r1) ffc1655c: 93 41 00 20 stw r26,32(r1) ffc16560: 93 a1 00 2c stw r29,44(r1) /* * Perform internal consistency checks */ assert( the_jnode ); ffc16564: 40 a2 00 28 bne+ ffc1658c <== ALWAYS TAKEN ffc16568: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc1656c: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc16570: 38 a5 4e a4 addi r5,r5,20132 <== NOT EXECUTED ffc16574: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc16578: 38 63 4f 66 addi r3,r3,20326 <== NOT EXECUTED ffc1657c: 38 a5 00 b0 addi r5,r5,176 <== NOT EXECUTED ffc16580: 38 c6 4f ac addi r6,r6,20396 <== NOT EXECUTED ffc16584: 38 80 02 4c li r4,588 <== NOT EXECUTED ffc16588: 48 00 00 34 b ffc165bc <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || ffc1658c: 81 3f 00 4c lwz r9,76(r31) ffc16590: 38 09 ff fb addi r0,r9,-5 ffc16594: 2b 80 00 01 cmplwi cr7,r0,1 ffc16598: 40 bd 00 28 ble+ cr7,ffc165c0 <== ALWAYS TAKEN ffc1659c: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc165a0: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc165a4: 38 a5 4e a4 addi r5,r5,20132 <== NOT EXECUTED ffc165a8: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc165ac: 38 63 4f 66 addi r3,r3,20326 <== NOT EXECUTED ffc165b0: 38 a5 00 b0 addi r5,r5,176 <== NOT EXECUTED ffc165b4: 38 c6 50 20 addi r6,r6,20512 <== NOT EXECUTED ffc165b8: 38 80 02 51 li r4,593 <== NOT EXECUTED ffc165bc: 4b fe f0 11 bl ffc055cc <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); ffc165c0: 2f 87 00 00 cmpwi cr7,r7,0 ffc165c4: 40 be 00 28 bne+ cr7,ffc165ec <== ALWAYS TAKEN ffc165c8: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc165cc: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc165d0: 38 a5 4e a4 addi r5,r5,20132 <== NOT EXECUTED ffc165d4: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc165d8: 38 63 4f 66 addi r3,r3,20326 <== NOT EXECUTED ffc165dc: 38 a5 00 b0 addi r5,r5,176 <== NOT EXECUTED ffc165e0: 38 c6 50 6b addi r6,r6,20587 <== NOT EXECUTED ffc165e4: 38 80 02 5a li r4,602 <== NOT EXECUTED ffc165e8: 4b ff ff d4 b ffc165bc <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) ffc165ec: 2f 88 00 00 cmpwi cr7,r8,0 ffc165f0: 40 be 00 18 bne+ cr7,ffc16608 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ffc165f4: 48 00 1a 79 bl ffc1806c <__errno> <== NOT EXECUTED ffc165f8: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc165fc: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc16600: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc16604: 48 00 02 3c b ffc16840 <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { ffc16608: 2f 89 00 06 cmpwi cr7,r9,6 ffc1660c: 40 be 00 60 bne+ cr7,ffc1666c <== ALWAYS TAKEN unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) ffc16610: 81 3f 00 50 lwz r9,80(r31) <== NOT EXECUTED ffc16614: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc16618: 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; ffc1661c: 80 9f 00 58 lwz r4,88(r31) <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) ffc16620: 7d 9c 50 10 subfc r12,r28,r10 <== NOT EXECUTED ffc16624: 7d 7b 49 10 subfe r11,r27,r9 <== NOT EXECUTED ffc16628: 7f 80 58 00 cmpw cr7,r0,r11 <== NOT EXECUTED ffc1662c: 41 bd 00 18 bgt+ cr7,ffc16644 <== NOT EXECUTED ffc16630: 40 9e 00 0c bne- cr7,ffc1663c <== NOT EXECUTED ffc16634: 7f 88 60 40 cmplw cr7,r8,r12 <== NOT EXECUTED ffc16638: 41 bd 00 0c bgt+ cr7,ffc16644 <== NOT EXECUTED ffc1663c: 7d 1d 43 78 mr r29,r8 <== NOT EXECUTED ffc16640: 48 00 00 08 b ffc16648 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; ffc16644: 7f bc 50 50 subf r29,r28,r10 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); ffc16648: 7c 84 e2 14 add r4,r4,r28 <== NOT EXECUTED ffc1664c: 7f a5 eb 78 mr r5,r29 <== NOT EXECUTED ffc16650: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc16654: 48 00 26 01 bl ffc18c54 <== NOT EXECUTED IMFS_update_atime( the_jnode ); ffc16658: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED ffc1665c: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc16660: 4b fe f5 1d bl ffc05b7c <== NOT EXECUTED return my_length; ffc16664: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc16668: 48 00 01 d0 b ffc16838 <== 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 ) ffc1666c: 80 1f 00 50 lwz r0,80(r31) ffc16670: 39 20 00 00 li r9,0 ffc16674: 83 bf 00 54 lwz r29,84(r31) ffc16678: 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; ffc1667c: 7c c0 33 78 mr r0,r6 if ( last_byte > the_jnode->info.file.size ) ffc16680: 7d 28 32 14 add r9,r8,r6 ffc16684: 41 9d 00 18 bgt- cr7,ffc1669c <== NEVER TAKEN ffc16688: 40 9e 00 0c bne- cr7,ffc16694 <== NEVER TAKEN ffc1668c: 7f 89 e8 40 cmplw cr7,r9,r29 ffc16690: 41 9d 00 0c bgt- cr7,ffc1669c ffc16694: 7d 1d 43 78 mr r29,r8 ffc16698: 48 00 00 08 b ffc166a0 my_length = the_jnode->info.file.size - start; ffc1669c: 7f a0 e8 50 subf r29,r0,r29 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc166a0: 3d 20 00 00 lis r9,0 ffc166a4: 83 49 27 68 lwz r26,10088(r9) ffc166a8: 7f 63 db 78 mr r3,r27 ffc166ac: 7f 84 e3 78 mr r4,r28 ffc166b0: 7f 58 fe 70 srawi r24,r26,31 ffc166b4: 7f 05 c3 78 mr r5,r24 ffc166b8: 7f 46 d3 78 mr r6,r26 ffc166bc: 48 00 bc 69 bl ffc22324 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc166c0: 7f 63 db 78 mr r3,r27 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc166c4: 7c 99 23 78 mr r25,r4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc166c8: 7f 05 c3 78 mr r5,r24 ffc166cc: 7f 84 e3 78 mr r4,r28 ffc166d0: 7f 46 d3 78 mr r6,r26 ffc166d4: 48 00 b8 4d bl ffc21f20 <__divdi3> if ( start_offset ) { ffc166d8: 2f 99 00 00 cmpwi cr7,r25,0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc166dc: 7c 98 23 78 mr r24,r4 if ( start_offset ) { ffc166e0: 7f dc f3 78 mr r28,r30 ffc166e4: 3b 60 00 00 li r27,0 ffc166e8: 41 9e 00 70 beq- cr7,ffc16758 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 ); ffc166ec: 7f e3 fb 78 mr r3,r31 ffc166f0: 38 a0 00 00 li r5,0 ffc166f4: 4b ff f0 0d bl ffc15700 assert( block_ptr ); ffc166f8: 2c 03 00 00 cmpwi r3,0 ffc166fc: 40 a2 00 28 bne+ ffc16724 <== ALWAYS TAKEN ffc16700: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc16704: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc16708: 38 a5 4e a4 addi r5,r5,20132 <== NOT EXECUTED ffc1670c: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc16710: 38 63 4f 66 addi r3,r3,20326 <== NOT EXECUTED ffc16714: 38 a5 00 b0 addi r5,r5,176 <== NOT EXECUTED ffc16718: 38 c6 4f e6 addi r6,r6,20454 <== NOT EXECUTED ffc1671c: 38 80 02 96 li r4,662 <== NOT EXECUTED ffc16720: 4b ff fe 9c b ffc165bc <== NOT EXECUTED */ 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; ffc16724: 7f 59 d0 50 subf r26,r25,r26 ffc16728: 7f 9d d0 40 cmplw cr7,r29,r26 ffc1672c: 7f bb eb 78 mr r27,r29 ffc16730: 40 9d 00 08 ble- cr7,ffc16738 ffc16734: 7f 5b d3 78 mr r27,r26 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 ); ffc16738: 80 83 00 00 lwz r4,0(r3) ffc1673c: 7f 65 db 78 mr r5,r27 ffc16740: 7f c3 f3 78 mr r3,r30 ffc16744: 7c 84 ca 14 add r4,r4,r25 ffc16748: 48 00 25 0d bl ffc18c54 dest += to_copy; ffc1674c: 7f 9e da 14 add r28,r30,r27 block++; ffc16750: 3b 18 00 01 addi r24,r24,1 my_length -= to_copy; ffc16754: 7f bb e8 50 subf r29,r27,r29 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; ffc16758: 3d 20 00 00 lis r9,0 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc1675c: 3b 49 27 68 addi r26,r9,10088 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; ffc16760: 83 c9 27 68 lwz r30,10088(r9) while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc16764: 48 00 00 60 b ffc167c4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc16768: 7f e3 fb 78 mr r3,r31 ffc1676c: 7f 04 c3 78 mr r4,r24 ffc16770: 38 a0 00 00 li r5,0 ffc16774: 4b ff ef 8d bl ffc15700 assert( block_ptr ); ffc16778: 2c 03 00 00 cmpwi r3,0 ffc1677c: 40 a2 00 28 bne+ ffc167a4 <== ALWAYS TAKEN ffc16780: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc16784: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc16788: 38 a5 4e a4 addi r5,r5,20132 <== NOT EXECUTED ffc1678c: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc16790: 38 63 4f 66 addi r3,r3,20326 <== NOT EXECUTED ffc16794: 38 a5 00 b0 addi r5,r5,176 <== NOT EXECUTED ffc16798: 38 c6 4f e6 addi r6,r6,20454 <== NOT EXECUTED ffc1679c: 38 80 02 a7 li r4,679 <== NOT EXECUTED ffc167a0: 4b ff fe 1c b ffc165bc <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); ffc167a4: 80 83 00 00 lwz r4,0(r3) ffc167a8: 7f c5 f3 78 mr r5,r30 ffc167ac: 7f 83 e3 78 mr r3,r28 ffc167b0: 48 00 24 a5 bl ffc18c54 dest += to_copy; ffc167b4: 7f 9c f2 14 add r28,r28,r30 block++; ffc167b8: 3b 18 00 01 addi r24,r24,1 my_length -= to_copy; ffc167bc: 7f be e8 50 subf r29,r30,r29 copied += to_copy; ffc167c0: 7f 7b f2 14 add r27,r27,r30 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc167c4: 80 1a 00 00 lwz r0,0(r26) ffc167c8: 7f 9d 00 40 cmplw cr7,r29,r0 ffc167cc: 40 9c ff 9c bge+ cr7,ffc16768 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { ffc167d0: 2f 9d 00 00 cmpwi cr7,r29,0 ffc167d4: 41 9e 00 54 beq- cr7,ffc16828 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc167d8: 7f 04 c3 78 mr r4,r24 ffc167dc: 7f e3 fb 78 mr r3,r31 ffc167e0: 38 a0 00 00 li r5,0 ffc167e4: 4b ff ef 1d bl ffc15700 assert( block_ptr ); ffc167e8: 2c 03 00 00 cmpwi r3,0 ffc167ec: 40 a2 00 28 bne+ ffc16814 <== ALWAYS TAKEN ffc167f0: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc167f4: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc167f8: 38 a5 4e a4 addi r5,r5,20132 <== NOT EXECUTED ffc167fc: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc16800: 38 63 4f 66 addi r3,r3,20326 <== NOT EXECUTED ffc16804: 38 a5 00 b0 addi r5,r5,176 <== NOT EXECUTED ffc16808: 38 c6 4f e6 addi r6,r6,20454 <== NOT EXECUTED ffc1680c: 38 80 02 b9 li r4,697 <== NOT EXECUTED ffc16810: 4b ff fd ac b ffc165bc <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); ffc16814: 80 83 00 00 lwz r4,0(r3) ffc16818: 7f a5 eb 78 mr r5,r29 ffc1681c: 7f 83 e3 78 mr r3,r28 ffc16820: 48 00 24 35 bl ffc18c54 copied += my_length; ffc16824: 7f 7d da 14 add r27,r29,r27 } IMFS_update_atime( the_jnode ); ffc16828: 38 61 00 08 addi r3,r1,8 ffc1682c: 38 80 00 00 li r4,0 ffc16830: 4b fe f3 4d bl ffc05b7c return copied; ffc16834: 7f 63 db 78 mr r3,r27 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); ffc16838: 80 01 00 08 lwz r0,8(r1) ffc1683c: 90 1f 00 40 stw r0,64(r31) return copied; } ffc16840: 80 01 00 3c lwz r0,60(r1) ffc16844: 83 01 00 18 lwz r24,24(r1) ffc16848: 7c 08 03 a6 mtlr r0 ffc1684c: 83 21 00 1c lwz r25,28(r1) ffc16850: 83 41 00 20 lwz r26,32(r1) ffc16854: 83 61 00 24 lwz r27,36(r1) ffc16858: 83 81 00 28 lwz r28,40(r1) ffc1685c: 83 a1 00 2c lwz r29,44(r1) ffc16860: 83 c1 00 30 lwz r30,48(r1) ffc16864: 83 e1 00 34 lwz r31,52(r1) ffc16868: 38 21 00 38 addi r1,r1,56 ffc1686c: 4e 80 00 20 blr =============================================================================== ffc15a60 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc15a60: 94 21 ff d8 stwu r1,-40(r1) ffc15a64: 7c 08 02 a6 mflr r0 ffc15a68: 93 e1 00 24 stw r31,36(r1) /* * Perform internal consistency checks */ assert( the_jnode ); ffc15a6c: 7c 7f 1b 79 mr. r31,r3 */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ffc15a70: 90 01 00 2c stw r0,44(r1) ffc15a74: 93 21 00 0c stw r25,12(r1) ffc15a78: 93 41 00 10 stw r26,16(r1) ffc15a7c: 93 61 00 14 stw r27,20(r1) ffc15a80: 93 81 00 18 stw r28,24(r1) ffc15a84: 93 a1 00 1c stw r29,28(r1) ffc15a88: 93 c1 00 20 stw r30,32(r1) /* * Perform internal consistency checks */ assert( the_jnode ); ffc15a8c: 40 a2 00 28 bne+ ffc15ab4 <== ALWAYS TAKEN ffc15a90: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc15a94: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc15a98: 38 a5 4e a4 addi r5,r5,20132 <== NOT EXECUTED ffc15a9c: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc15aa0: 38 63 4f 66 addi r3,r3,20326 <== NOT EXECUTED ffc15aa4: 38 a5 00 5c addi r5,r5,92 <== NOT EXECUTED ffc15aa8: 38 c6 4f ac addi r6,r6,20396 <== NOT EXECUTED ffc15aac: 38 80 01 ee li r4,494 <== NOT EXECUTED ffc15ab0: 48 00 00 30 b ffc15ae0 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); ffc15ab4: 80 1f 00 4c lwz r0,76(r31) ffc15ab8: 2f 80 00 05 cmpwi cr7,r0,5 ffc15abc: 41 be 00 28 beq+ cr7,ffc15ae4 <== ALWAYS TAKEN ffc15ac0: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc15ac4: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc15ac8: 38 a5 4e a4 addi r5,r5,20132 <== NOT EXECUTED ffc15acc: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc15ad0: 38 63 4f 66 addi r3,r3,20326 <== NOT EXECUTED ffc15ad4: 38 a5 00 5c addi r5,r5,92 <== NOT EXECUTED ffc15ad8: 38 c6 4f b6 addi r6,r6,20406 <== NOT EXECUTED ffc15adc: 38 80 01 f2 li r4,498 <== NOT EXECUTED ffc15ae0: 4b fe fa ed bl ffc055cc <__assert_func> <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; ffc15ae4: 80 1f 00 58 lwz r0,88(r31) /* * 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; ffc15ae8: 3d 20 00 00 lis r9,0 ffc15aec: 83 c9 27 68 lwz r30,10088(r9) * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; ffc15af0: 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; ffc15af4: 57 de f0 be rlwinm r30,r30,30,2,31 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; ffc15af8: 41 9e 00 10 beq- cr7,ffc15b08 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); ffc15afc: 38 7f 00 58 addi r3,r31,88 ffc15b00: 7f c4 f3 78 mr r4,r30 ffc15b04: 4b ff fe 41 bl ffc15944 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; ffc15b08: 80 1f 00 5c lwz r0,92(r31) ffc15b0c: 2f 80 00 00 cmpwi cr7,r0,0 ffc15b10: 41 9e 00 54 beq- cr7,ffc15b64 <== ALWAYS TAKEN memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; iinfo.file; ffc15b1c: 3b a0 00 00 li r29,0 <== NOT EXECUTED ffc15b20: 48 00 00 28 b ffc15b48 <== NOT EXECUTED } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { ffc15b24: 80 7f 00 5c lwz r3,92(r31) <== NOT EXECUTED ffc15b28: 57 a0 10 3a rlwinm r0,r29,2,0,29 <== NOT EXECUTED ffc15b2c: 7d 23 00 2e lwzx r9,r3,r0 <== NOT EXECUTED ffc15b30: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc15b34: 41 9e 00 10 beq- cr7,ffc15b44 <== NOT EXECUTED memfile_free_blocks_in_table( ffc15b38: 7c 63 02 14 add r3,r3,r0 <== NOT EXECUTED ffc15b3c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc15b40: 4b ff fe 05 bl ffc15944 <== 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 ); ffc15b58: 38 7f 00 5c addi r3,r31,92 <== NOT EXECUTED ffc15b5c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc15b60: 4b ff fd e5 bl ffc15944 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; ffc15b64: 80 1f 00 60 lwz r0,96(r31) ffc15b68: 2f 80 00 00 cmpwi cr7,r0,0 ffc15b6c: 41 9e 00 90 beq- cr7,ffc15bfc <== ALWAYS TAKEN memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; iinfo.file; ffc15b78: 3b a0 00 00 li r29,0 <== NOT EXECUTED ffc15b7c: 48 00 00 64 b ffc15be0 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; ffc15b80: 81 3f 00 60 lwz r9,96(r31) <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; ffc15b84: 57 b9 10 3a rlwinm r25,r29,2,0,29 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; ffc15b88: 7f 89 c8 2e lwzx r28,r9,r25 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ ffc15b8c: 2f 9c 00 00 cmpwi cr7,r28,0 <== NOT EXECUTED ffc15b90: 41 9e 00 60 beq- cr7,ffc15bf0 <== NOT EXECUTED ffc15b94: 3b 60 00 00 li r27,0 <== NOT EXECUTED ffc15b98: 48 00 00 24 b ffc15bbc <== NOT EXECUTED break; for ( j=0 ; j<== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); ffc15ba8: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc15bac: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc15bb0: 4b ff fd 95 bl ffc15944 <== 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 if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( ffc15bcc: 80 7f 00 60 lwz r3,96(r31) <== NOT EXECUTED ffc15bd0: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i<== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i<== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( ffc15bf0: 38 7f 00 60 addi r3,r31,96 <== NOT EXECUTED ffc15bf4: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc15bf8: 4b ff fd 4d bl ffc15944 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } ffc15bfc: 80 01 00 2c lwz r0,44(r1) ffc15c00: 38 60 00 00 li r3,0 ffc15c04: 83 21 00 0c lwz r25,12(r1) ffc15c08: 7c 08 03 a6 mtlr r0 ffc15c0c: 83 41 00 10 lwz r26,16(r1) ffc15c10: 83 61 00 14 lwz r27,20(r1) ffc15c14: 83 81 00 18 lwz r28,24(r1) ffc15c18: 83 a1 00 1c lwz r29,28(r1) ffc15c1c: 83 c1 00 20 lwz r30,32(r1) ffc15c20: 83 e1 00 24 lwz r31,36(r1) ffc15c24: 38 21 00 28 addi r1,r1,40 ffc15c28: 4e 80 00 20 blr =============================================================================== ffc159fc : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { ffc159fc: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED ffc15a00: 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 ); ffc15a04: 38 a0 00 00 li r5,0 <== NOT EXECUTED MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { ffc15a08: 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 ); ffc15a0c: 4b ff fc f5 bl ffc15700 <== NOT EXECUTED assert( block_ptr ); ffc15a10: 7c 69 1b 79 mr. r9,r3 <== NOT EXECUTED ffc15a14: 40 a2 00 28 bne+ ffc15a3c <== NOT EXECUTED ffc15a18: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc15a1c: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc15a20: 38 a5 4e a4 addi r5,r5,20132 <== NOT EXECUTED ffc15a24: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc15a28: 38 63 4f 66 addi r3,r3,20326 <== NOT EXECUTED ffc15a2c: 38 a5 00 40 addi r5,r5,64 <== NOT EXECUTED ffc15a30: 38 c6 4f e6 addi r6,r6,20454 <== NOT EXECUTED ffc15a34: 38 80 01 96 li r4,406 <== NOT EXECUTED ffc15a38: 4b fe fb 95 bl ffc055cc <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; *block_ptr = 0; ffc15a3c: 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; ffc15a40: 80 69 00 00 lwz r3,0(r9) <== NOT EXECUTED *block_ptr = 0; ffc15a44: 90 09 00 00 stw r0,0(r9) <== NOT EXECUTED memfile_free_block( ptr ); ffc15a48: 4b ff fc 45 bl ffc1568c <== NOT EXECUTED } return 1; } ffc15a4c: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc15a50: 38 60 00 01 li r3,1 <== NOT EXECUTED ffc15a54: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc15a58: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc15a5c: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc1610c : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ffc1610c: 94 21 ff c8 stwu r1,-56(r1) ffc16110: 7c 08 02 a6 mflr r0 ffc16114: 93 e1 00 34 stw r31,52(r1) /* * Perform internal consistency checks */ assert( the_jnode ); ffc16118: 7c 7f 1b 79 mr. r31,r3 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ffc1611c: 93 61 00 24 stw r27,36(r1) ffc16120: 7d 1b 43 78 mr r27,r8 ffc16124: 93 81 00 28 stw r28,40(r1) ffc16128: 7c fc 3b 78 mr r28,r7 ffc1612c: 93 a1 00 2c stw r29,44(r1) ffc16130: 7c bd 2b 78 mr r29,r5 ffc16134: 93 c1 00 30 stw r30,48(r1) ffc16138: 7c de 33 78 mr r30,r6 ffc1613c: 90 01 00 3c stw r0,60(r1) ffc16140: 93 01 00 18 stw r24,24(r1) ffc16144: 93 21 00 1c stw r25,28(r1) ffc16148: 93 41 00 20 stw r26,32(r1) /* * Perform internal consistency checks */ assert( the_jnode ); ffc1614c: 40 a2 00 28 bne+ ffc16174 <== ALWAYS TAKEN ffc16150: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc16154: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc16158: 38 a5 4e a4 addi r5,r5,20132 <== NOT EXECUTED ffc1615c: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc16160: 38 63 4f 66 addi r3,r3,20326 <== NOT EXECUTED ffc16164: 38 a5 00 9c addi r5,r5,156 <== NOT EXECUTED ffc16168: 38 c6 4f ac addi r6,r6,20396 <== NOT EXECUTED ffc1616c: 38 80 02 e3 li r4,739 <== NOT EXECUTED ffc16170: 48 00 00 30 b ffc161a0 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); ffc16174: 80 1f 00 4c lwz r0,76(r31) ffc16178: 2f 80 00 05 cmpwi cr7,r0,5 ffc1617c: 41 be 00 28 beq+ cr7,ffc161a4 <== ALWAYS TAKEN ffc16180: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc16184: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc16188: 38 a5 4e a4 addi r5,r5,20132 <== NOT EXECUTED ffc1618c: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc16190: 38 63 4f 66 addi r3,r3,20326 <== NOT EXECUTED ffc16194: 38 a5 00 9c addi r5,r5,156 <== NOT EXECUTED ffc16198: 38 c6 4f b6 addi r6,r6,20406 <== NOT EXECUTED ffc1619c: 38 80 02 e7 li r4,743 <== NOT EXECUTED ffc161a0: 4b fe f4 2d bl ffc055cc <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); ffc161a4: 2f 87 00 00 cmpwi cr7,r7,0 ffc161a8: 40 be 00 28 bne+ cr7,ffc161d0 <== ALWAYS TAKEN ffc161ac: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc161b0: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc161b4: 38 a5 4e a4 addi r5,r5,20132 <== NOT EXECUTED ffc161b8: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc161bc: 38 63 4f 66 addi r3,r3,20326 <== NOT EXECUTED ffc161c0: 38 a5 00 9c addi r5,r5,156 <== NOT EXECUTED ffc161c4: 38 c6 4f f0 addi r6,r6,20464 <== NOT EXECUTED ffc161c8: 38 80 02 ef li r4,751 <== NOT EXECUTED ffc161cc: 4b ff ff d4 b ffc161a0 <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) ffc161d0: 2f 88 00 00 cmpwi cr7,r8,0 ffc161d4: 40 be 00 10 bne+ cr7,ffc161e4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ffc161d8: 48 00 1e 95 bl ffc1806c <__errno> <== NOT EXECUTED ffc161dc: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc161e0: 48 00 00 40 b ffc16220 <== NOT EXECUTED * 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 ) { ffc161e4: 80 1f 00 50 lwz r0,80(r31) ffc161e8: 7c c8 32 14 add r6,r8,r6 ffc161ec: 2f 80 00 00 cmpwi cr7,r0,0 ffc161f0: 41 9c 00 14 blt- cr7,ffc16204 <== NEVER TAKEN ffc161f4: 40 be 00 38 bne+ cr7,ffc1622c <== NEVER TAKEN ffc161f8: 80 1f 00 54 lwz r0,84(r31) ffc161fc: 7f 80 30 40 cmplw cr7,r0,r6 ffc16200: 40 bc 00 2c bge+ cr7,ffc1622c <== NEVER TAKEN status = IMFS_memfile_extend( the_jnode, last_byte ); ffc16204: 7f e3 fb 78 mr r3,r31 ffc16208: 38 a0 00 00 li r5,0 ffc1620c: 4b ff fc 01 bl ffc15e0c if ( status ) ffc16210: 2f 83 00 00 cmpwi cr7,r3,0 ffc16214: 41 be 00 18 beq+ cr7,ffc1622c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); ffc16218: 48 00 1e 55 bl ffc1806c <__errno> <== NOT EXECUTED ffc1621c: 38 00 00 1c li r0,28 <== NOT EXECUTED ffc16220: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc16224: 3b 40 ff ff li r26,-1 <== NOT EXECUTED ffc16228: 48 00 01 a0 b ffc163c8 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc1622c: 3d 20 00 00 lis r9,0 ffc16230: 83 49 27 68 lwz r26,10088(r9) ffc16234: 7f c4 f3 78 mr r4,r30 ffc16238: 7f a3 eb 78 mr r3,r29 ffc1623c: 7f 58 fe 70 srawi r24,r26,31 ffc16240: 7f 05 c3 78 mr r5,r24 ffc16244: 7f 46 d3 78 mr r6,r26 ffc16248: 48 00 c0 dd bl ffc22324 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc1624c: 7f a3 eb 78 mr r3,r29 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffc16250: 7c 99 23 78 mr r25,r4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc16254: 7f 05 c3 78 mr r5,r24 ffc16258: 7f c4 f3 78 mr r4,r30 ffc1625c: 7f 46 d3 78 mr r6,r26 ffc16260: 48 00 bc c1 bl ffc21f20 <__divdi3> if ( start_offset ) { ffc16264: 2f 99 00 00 cmpwi cr7,r25,0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffc16268: 7c 9e 23 78 mr r30,r4 if ( start_offset ) { ffc1626c: 40 9e 00 0c bne- cr7,ffc16278 ffc16270: 3b 40 00 00 li r26,0 ffc16274: 48 00 00 6c b ffc162e0 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 ); ffc16278: 7f e3 fb 78 mr r3,r31 ffc1627c: 38 a0 00 00 li r5,0 ffc16280: 4b ff f4 81 bl ffc15700 assert( block_ptr ); ffc16284: 2c 03 00 00 cmpwi r3,0 ffc16288: 40 a2 00 28 bne+ ffc162b0 <== ALWAYS TAKEN ffc1628c: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc16290: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc16294: 38 a5 4e a4 addi r5,r5,20132 <== NOT EXECUTED ffc16298: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc1629c: 38 63 4f 66 addi r3,r3,20326 <== NOT EXECUTED ffc162a0: 38 a5 00 9c addi r5,r5,156 <== NOT EXECUTED ffc162a4: 38 c6 4f e6 addi r6,r6,20454 <== NOT EXECUTED ffc162a8: 38 80 03 1c li r4,796 <== NOT EXECUTED ffc162ac: 4b ff fe f4 b ffc161a0 <== NOT EXECUTED */ 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; ffc162b0: 7f 59 d0 50 subf r26,r25,r26 ffc162b4: 7f 9a d8 40 cmplw cr7,r26,r27 ffc162b8: 40 9d 00 08 ble- cr7,ffc162c0 ffc162bc: 7f 7a db 78 mr r26,r27 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 ); ffc162c0: 80 63 00 00 lwz r3,0(r3) ffc162c4: 7f 84 e3 78 mr r4,r28 ffc162c8: 7f 45 d3 78 mr r5,r26 ffc162cc: 7c 63 ca 14 add r3,r3,r25 ffc162d0: 48 00 29 85 bl ffc18c54 src += to_copy; ffc162d4: 7f 9c d2 14 add r28,r28,r26 block++; ffc162d8: 3b de 00 01 addi r30,r30,1 my_length -= to_copy; ffc162dc: 7f 7a d8 50 subf r27,r26,r27 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; ffc162e0: 3d 20 00 00 lis r9,0 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc162e4: 3b 29 27 68 addi r25,r9,10088 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; ffc162e8: 83 a9 27 68 lwz r29,10088(r9) while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc162ec: 48 00 00 60 b ffc1634c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc162f0: 7f e3 fb 78 mr r3,r31 ffc162f4: 7f c4 f3 78 mr r4,r30 ffc162f8: 38 a0 00 00 li r5,0 ffc162fc: 4b ff f4 05 bl ffc15700 assert( block_ptr ); ffc16300: 2c 03 00 00 cmpwi r3,0 ffc16304: 40 a2 00 28 bne+ ffc1632c <== ALWAYS TAKEN ffc16308: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc1630c: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc16310: 38 a5 4e a4 addi r5,r5,20132 <== NOT EXECUTED ffc16314: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc16318: 38 63 4f 66 addi r3,r3,20326 <== NOT EXECUTED ffc1631c: 38 a5 00 9c addi r5,r5,156 <== NOT EXECUTED ffc16320: 38 c6 4f e6 addi r6,r6,20454 <== NOT EXECUTED ffc16324: 38 80 03 30 li r4,816 <== NOT EXECUTED ffc16328: 4b ff fe 78 b ffc161a0 <== NOT EXECUTED 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 ); ffc1632c: 80 63 00 00 lwz r3,0(r3) ffc16330: 7f 84 e3 78 mr r4,r28 ffc16334: 7f a5 eb 78 mr r5,r29 ffc16338: 48 00 29 1d bl ffc18c54 src += to_copy; ffc1633c: 7f 9c ea 14 add r28,r28,r29 block++; ffc16340: 3b de 00 01 addi r30,r30,1 my_length -= to_copy; ffc16344: 7f 7d d8 50 subf r27,r29,r27 * * 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( ffc16348: 7f 5a ea 14 add r26,r26,r29 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ffc1634c: 80 19 00 00 lwz r0,0(r25) ffc16350: 7f 9b 00 40 cmplw cr7,r27,r0 ffc16354: 40 9c ff 9c bge+ cr7,ffc162f0 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { ffc16358: 2f 9b 00 00 cmpwi cr7,r27,0 ffc1635c: 41 9e 00 54 beq- cr7,ffc163b0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ffc16360: 7f c4 f3 78 mr r4,r30 ffc16364: 7f e3 fb 78 mr r3,r31 ffc16368: 38 a0 00 00 li r5,0 ffc1636c: 4b ff f3 95 bl ffc15700 assert( block_ptr ); ffc16370: 2c 03 00 00 cmpwi r3,0 ffc16374: 40 a2 00 28 bne+ ffc1639c <== ALWAYS TAKEN ffc16378: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc1637c: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc16380: 38 a5 4e a4 addi r5,r5,20132 <== NOT EXECUTED ffc16384: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc16388: 38 63 4f 66 addi r3,r3,20326 <== NOT EXECUTED ffc1638c: 38 a5 00 9c addi r5,r5,156 <== NOT EXECUTED ffc16390: 38 c6 4f e6 addi r6,r6,20454 <== NOT EXECUTED ffc16394: 38 80 03 46 li r4,838 <== NOT EXECUTED ffc16398: 4b ff fe 08 b ffc161a0 <== NOT EXECUTED 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 ); ffc1639c: 80 63 00 00 lwz r3,0(r3) ffc163a0: 7f 84 e3 78 mr r4,r28 ffc163a4: 7f 65 db 78 mr r5,r27 ffc163a8: 48 00 28 ad bl ffc18c54 my_length = 0; copied += to_copy; ffc163ac: 7f 5a da 14 add r26,r26,r27 } IMFS_mtime_ctime_update( the_jnode ); ffc163b0: 38 61 00 08 addi r3,r1,8 ffc163b4: 38 80 00 00 li r4,0 ffc163b8: 4b fe f7 c5 bl ffc05b7c ffc163bc: 80 01 00 08 lwz r0,8(r1) ffc163c0: 90 1f 00 48 stw r0,72(r31) ffc163c4: 90 1f 00 44 stw r0,68(r31) return copied; } ffc163c8: 80 01 00 3c lwz r0,60(r1) ffc163cc: 7f 43 d3 78 mr r3,r26 ffc163d0: 83 01 00 18 lwz r24,24(r1) ffc163d4: 7c 08 03 a6 mtlr r0 ffc163d8: 83 21 00 1c lwz r25,28(r1) ffc163dc: 83 41 00 20 lwz r26,32(r1) ffc163e0: 83 61 00 24 lwz r27,36(r1) ffc163e4: 83 81 00 28 lwz r28,40(r1) ffc163e8: 83 a1 00 2c lwz r29,44(r1) ffc163ec: 83 c1 00 30 lwz r30,48(r1) ffc163f0: 83 e1 00 34 lwz r31,52(r1) ffc163f4: 38 21 00 38 addi r1,r1,56 ffc163f8: 4e 80 00 20 blr =============================================================================== ffc04fb0 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { ffc04fb0: 94 21 ff 90 stwu r1,-112(r1) ffc04fb4: 7c 08 02 a6 mflr r0 ffc04fb8: 93 61 00 5c stw r27,92(r1) ffc04fbc: 7c fb 3b 78 mr r27,r7 ffc04fc0: 90 01 00 74 stw r0,116(r1) ffc04fc4: 93 81 00 60 stw r28,96(r1) ffc04fc8: 7c 7c 1b 78 mr r28,r3 ffc04fcc: 93 a1 00 64 stw r29,100(r1) ffc04fd0: 7c bd 2b 78 mr r29,r5 ffc04fd4: 93 c1 00 68 stw r30,104(r1) ffc04fd8: 7c de 33 78 mr r30,r6 ffc04fdc: 93 e1 00 6c stw r31,108(r1) ffc04fe0: 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 ); ffc04fe4: 48 01 43 49 bl ffc1932c ffc04fe8: 38 a1 00 28 addi r5,r1,40 ffc04fec: 7c 64 1b 78 mr r4,r3 ffc04ff0: 38 c1 00 08 addi r6,r1,8 ffc04ff4: 7f 83 e3 78 mr r3,r28 ffc04ff8: 48 00 db a5 bl ffc12b9c /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) ffc04ffc: 57 e0 04 26 rlwinm r0,r31,0,16,19 ffc05000: 2f 80 40 00 cmpwi cr7,r0,16384 ffc05004: 41 9e 00 50 beq- cr7,ffc05054 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) ffc05008: 39 20 00 00 li r9,0 ffc0500c: 61 29 80 00 ori r9,r9,32768 ffc05010: 7f 80 48 00 cmpw cr7,r0,r9 ffc05014: 38 80 00 05 li r4,5 ffc05018: 41 9e 00 40 beq- cr7,ffc05058 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { ffc0501c: 2f 80 60 00 cmpwi cr7,r0,24576 ffc05020: 41 9e 00 0c beq- cr7,ffc0502c ffc05024: 2f 80 20 00 cmpwi cr7,r0,8192 ffc05028: 40 be 00 14 bne+ cr7,ffc0503c type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); ffc0502c: 93 a1 00 10 stw r29,16(r1) ffc05030: 38 80 00 02 li r4,2 ffc05034: 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) ) { ffc05038: 48 00 00 20 b ffc05058 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) ffc0503c: 2f 80 10 00 cmpwi cr7,r0,4096 ffc05040: 38 80 00 07 li r4,7 ffc05044: 41 be 00 14 beq+ cr7,ffc05058 <== ALWAYS TAKEN type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); ffc05048: 48 01 30 25 bl ffc1806c <__errno> <== NOT EXECUTED ffc0504c: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc05050: 48 00 00 30 b ffc05080 <== NOT EXECUTED ffc05054: 38 80 00 01 li r4,1 * 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( ffc05058: 7f 63 db 78 mr r3,r27 ffc0505c: 7f e6 fb 78 mr r6,r31 ffc05060: 38 a1 00 28 addi r5,r1,40 ffc05064: 38 e1 00 10 addi r7,r1,16 ffc05068: 48 00 cb e1 bl ffc11c48 new_name, mode, &info ); if ( !new_node ) ffc0506c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05070: 38 60 00 00 li r3,0 ffc05074: 40 be 00 14 bne+ cr7,ffc05088 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); ffc05078: 48 01 2f f5 bl ffc1806c <__errno> <== NOT EXECUTED ffc0507c: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc05080: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc05084: 38 60 ff ff li r3,-1 <== NOT EXECUTED return 0; } ffc05088: 80 01 00 74 lwz r0,116(r1) ffc0508c: 83 61 00 5c lwz r27,92(r1) ffc05090: 7c 08 03 a6 mtlr r0 ffc05094: 83 81 00 60 lwz r28,96(r1) ffc05098: 83 a1 00 64 lwz r29,100(r1) ffc0509c: 83 c1 00 68 lwz r30,104(r1) ffc050a0: 83 e1 00 6c lwz r31,108(r1) ffc050a4: 38 21 00 70 addi r1,r1,112 ffc050a8: 4e 80 00 20 blr =============================================================================== ffc050ac : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { ffc050ac: 7c 08 02 a6 mflr r0 ffc050b0: 94 21 ff f8 stwu r1,-8(r1) ffc050b4: 90 01 00 0c stw r0,12(r1) IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; ffc050b8: 81 23 00 08 lwz r9,8(r3) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) ffc050bc: 80 09 00 4c lwz r0,76(r9) ffc050c0: 2f 80 00 01 cmpwi cr7,r0,1 ffc050c4: 41 be 00 18 beq+ cr7,ffc050dc <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc050c8: 48 01 2f a5 bl ffc1806c <__errno> <== NOT EXECUTED ffc050cc: 38 00 00 14 li r0,20 <== NOT EXECUTED ffc050d0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc050d4: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc050d8: 48 00 00 0c b ffc050e4 <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; ffc050dc: 90 69 00 5c stw r3,92(r9) ffc050e0: 38 60 00 00 li r3,0 return 0; } ffc050e4: 80 01 00 0c lwz r0,12(r1) ffc050e8: 38 21 00 08 addi r1,r1,8 ffc050ec: 7c 08 03 a6 mtlr r0 ffc050f0: 4e 80 00 20 blr =============================================================================== ffc069dc : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { ffc069dc: 94 21 ff f0 stwu r1,-16(r1) ffc069e0: 7c 08 02 a6 mflr r0 ffc069e4: 93 e1 00 0c stw r31,12(r1) assert( the_jnode ); ffc069e8: 7c 7f 1b 79 mr. r31,r3 */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { ffc069ec: 90 01 00 14 stw r0,20(r1) ffc069f0: 93 c1 00 08 stw r30,8(r1) assert( the_jnode ); ffc069f4: 40 a2 00 24 bne+ ffc06a18 <== ALWAYS TAKEN ffc069f8: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc069fc: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED ffc06a00: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED ffc06a04: 38 63 96 d0 addi r3,r3,-26928 <== NOT EXECUTED ffc06a08: 38 a5 96 a8 addi r5,r5,-26968 <== NOT EXECUTED ffc06a0c: 38 c6 97 19 addi r6,r6,-26855 <== NOT EXECUTED ffc06a10: 38 80 00 38 li r4,56 <== NOT EXECUTED ffc06a14: 48 00 00 e8 b ffc06afc <== NOT EXECUTED fprintf(stdout, "%s", the_jnode->name ); ffc06a18: 3f c0 00 00 lis r30,0 ffc06a1c: 81 3e 27 4c lwz r9,10060(r30) ffc06a20: 38 7f 00 0c addi r3,r31,12 ffc06a24: 80 89 00 08 lwz r4,8(r9) ffc06a28: 48 01 21 99 bl ffc18bc0 switch( the_jnode->type ) { ffc06a2c: 80 bf 00 4c lwz r5,76(r31) ffc06a30: 38 05 ff ff addi r0,r5,-1 ffc06a34: 2b 80 00 06 cmplwi cr7,r0,6 ffc06a38: 41 9d 01 30 bgt- cr7,ffc06b68 <== NEVER TAKEN ffc06a3c: 3d 20 ff c3 lis r9,-61 ffc06a40: 39 29 96 8c addi r9,r9,-26996 ffc06a44: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc06a48: 7c 09 00 2e lwzx r0,r9,r0 ffc06a4c: 7d 20 4a 14 add r9,r0,r9 ffc06a50: 7d 29 03 a6 mtctr r9 ffc06a54: 4e 80 04 20 bctr case IMFS_DIRECTORY: fprintf(stdout, "/" ); ffc06a58: 81 3e 27 4c lwz r9,10060(r30) ffc06a5c: 38 60 00 2f li r3,47 ffc06a60: 80 89 00 08 lwz r4,8(r9) ffc06a64: 48 01 1f f1 bl ffc18a54 break; ffc06a68: 48 00 01 38 b ffc06ba0 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", ffc06a6c: 81 3e 27 4c lwz r9,10060(r30) ffc06a70: 3c 80 ff c3 lis r4,-61 ffc06a74: 80 df 00 54 lwz r6,84(r31) ffc06a78: 38 84 97 23 addi r4,r4,-26845 ffc06a7c: 80 69 00 08 lwz r3,8(r9) ffc06a80: 80 bf 00 50 lwz r5,80(r31) ffc06a84: 48 00 00 1c b ffc06aa0 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", ffc06a88: 81 3e 27 4c lwz r9,10060(r30) <== NOT EXECUTED ffc06a8c: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED ffc06a90: 80 df 00 58 lwz r6,88(r31) <== NOT EXECUTED ffc06a94: 38 84 97 36 addi r4,r4,-26826 <== NOT EXECUTED ffc06a98: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED ffc06a9c: 80 bf 00 54 lwz r5,84(r31) <== NOT EXECUTED ffc06aa0: 4c c6 31 82 crclr 4*cr1+eq ffc06aa4: 48 01 1e a1 bl ffc18944 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; ffc06aa8: 48 00 00 f8 b ffc06ba0 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", ffc06aac: 81 3e 27 4c lwz r9,10060(r30) ffc06ab0: 3c 80 ff c3 lis r4,-61 ffc06ab4: 80 bf 00 54 lwz r5,84(r31) ffc06ab8: 38 84 97 45 addi r4,r4,-26811 ffc06abc: 80 69 00 08 lwz r3,8(r9) ffc06ac0: 4c c6 31 82 crclr 4*cr1+eq ffc06ac4: 48 01 1e 81 bl ffc18944 (uint32_t)the_jnode->info.file.size ); #endif break; ffc06ac8: 48 00 00 d8 b ffc06ba0 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); ffc06acc: 81 3e 27 4c lwz r9,10060(r30) <== NOT EXECUTED ffc06ad0: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc06ad4: 38 63 97 51 addi r3,r3,-26799 <== NOT EXECUTED ffc06ad8: 80 89 00 08 lwz r4,8(r9) <== NOT EXECUTED ffc06adc: 48 01 20 e5 bl ffc18bc0 <== NOT EXECUTED assert(0); ffc06ae0: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc06ae4: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED ffc06ae8: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED ffc06aec: 38 63 96 d0 addi r3,r3,-26928 <== NOT EXECUTED ffc06af0: 38 a5 96 a8 addi r5,r5,-26968 <== NOT EXECUTED ffc06af4: 38 c6 82 cd addi r6,r6,-32051 <== NOT EXECUTED ffc06af8: 38 80 00 5d li r4,93 <== NOT EXECUTED ffc06afc: 48 00 0b b1 bl ffc076ac <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); ffc06b00: 81 3e 27 4c lwz r9,10060(r30) <== NOT EXECUTED ffc06b04: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc06b08: 38 63 97 51 addi r3,r3,-26799 <== NOT EXECUTED ffc06b0c: 80 89 00 08 lwz r4,8(r9) <== NOT EXECUTED ffc06b10: 48 01 20 b1 bl ffc18bc0 <== NOT EXECUTED assert(0); ffc06b14: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc06b18: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED ffc06b1c: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED ffc06b20: 38 63 96 d0 addi r3,r3,-26928 <== NOT EXECUTED ffc06b24: 38 a5 96 a8 addi r5,r5,-26968 <== NOT EXECUTED ffc06b28: 38 c6 82 cd addi r6,r6,-32051 <== NOT EXECUTED ffc06b2c: 38 80 00 62 li r4,98 <== NOT EXECUTED ffc06b30: 4b ff ff cc b ffc06afc <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); ffc06b34: 81 3e 27 4c lwz r9,10060(r30) <== NOT EXECUTED ffc06b38: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc06b3c: 38 63 97 65 addi r3,r3,-26779 <== NOT EXECUTED ffc06b40: 80 89 00 08 lwz r4,8(r9) <== NOT EXECUTED ffc06b44: 48 01 20 7d bl ffc18bc0 <== NOT EXECUTED assert(0); ffc06b48: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc06b4c: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED ffc06b50: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED ffc06b54: 38 63 96 d0 addi r3,r3,-26928 <== NOT EXECUTED ffc06b58: 38 a5 96 a8 addi r5,r5,-26968 <== NOT EXECUTED ffc06b5c: 38 c6 82 cd addi r6,r6,-32051 <== NOT EXECUTED ffc06b60: 38 80 00 67 li r4,103 <== NOT EXECUTED ffc06b64: 4b ff ff 98 b ffc06afc <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); ffc06b68: 81 3e 27 4c lwz r9,10060(r30) <== NOT EXECUTED ffc06b6c: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED ffc06b70: 38 84 97 78 addi r4,r4,-26760 <== NOT EXECUTED ffc06b74: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED ffc06b78: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc06b7c: 48 01 1d c9 bl ffc18944 <== NOT EXECUTED assert(0); ffc06b80: 3c 60 ff c3 lis r3,-61 <== NOT EXECUTED ffc06b84: 3c a0 ff c3 lis r5,-61 <== NOT EXECUTED ffc06b88: 3c c0 ff c3 lis r6,-61 <== NOT EXECUTED ffc06b8c: 38 63 96 d0 addi r3,r3,-26928 <== NOT EXECUTED ffc06b90: 38 a5 96 a8 addi r5,r5,-26968 <== NOT EXECUTED ffc06b94: 38 c6 82 cd addi r6,r6,-32051 <== NOT EXECUTED ffc06b98: 38 80 00 6c li r4,108 <== NOT EXECUTED ffc06b9c: 4b ff ff 60 b ffc06afc <== NOT EXECUTED break; } puts(""); ffc06ba0: 3c 60 ff c3 lis r3,-61 ffc06ba4: 38 63 9a 32 addi r3,r3,-26062 ffc06ba8: 48 01 3f d5 bl ffc1ab7c } ffc06bac: 80 01 00 14 lwz r0,20(r1) ffc06bb0: 83 c1 00 08 lwz r30,8(r1) ffc06bb4: 7c 08 03 a6 mtlr r0 ffc06bb8: 83 e1 00 0c lwz r31,12(r1) ffc06bbc: 38 21 00 10 addi r1,r1,16 ffc06bc0: 4e 80 00 20 blr =============================================================================== ffc05100 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { ffc05100: 7c 08 02 a6 mflr r0 ffc05104: 94 21 ff f8 stwu r1,-8(r1) ffc05108: 90 01 00 0c stw r0,12(r1) IMFS_jnode_t *node; int i; node = loc->node_access; ffc0510c: 81 23 00 00 lwz r9,0(r3) if ( node->type != IMFS_SYM_LINK ) ffc05110: 80 09 00 4c lwz r0,76(r9) ffc05114: 2f 80 00 04 cmpwi cr7,r0,4 ffc05118: 40 9e 00 1c bne- cr7,ffc05134 <== NEVER TAKEN ffc0511c: 2f 85 00 00 cmpwi cr7,r5,0 ffc05120: 38 60 00 00 li r3,0 ffc05124: 38 a5 00 01 addi r5,r5,1 ffc05128: 40 be 00 28 bne+ cr7,ffc05150 <== ALWAYS TAKEN ffc0512c: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc05130: 48 00 00 20 b ffc05150 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); ffc05134: 48 01 2f 39 bl ffc1806c <__errno> <== NOT EXECUTED ffc05138: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc0513c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc05140: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc05144: 48 00 00 24 b ffc05168 <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; ffc05148: 7c 04 19 ae stbx r0,r4,r3 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++ ) ffc0514c: 38 63 00 01 addi r3,r3,1 ffc05150: 34 a5 ff ff addic. r5,r5,-1 ffc05154: 41 82 00 14 beq- ffc05168 ffc05158: 81 69 00 50 lwz r11,80(r9) ffc0515c: 7c 0b 18 ae lbzx r0,r11,r3 ffc05160: 2f 80 00 00 cmpwi cr7,r0,0 ffc05164: 40 9e ff e4 bne+ cr7,ffc05148 buf[i] = node->info.sym_link.name[i]; return i; } ffc05168: 80 01 00 0c lwz r0,12(r1) ffc0516c: 38 21 00 08 addi r1,r1,8 ffc05170: 7c 08 03 a6 mtlr r0 ffc05174: 4e 80 00 20 blr =============================================================================== ffc05178 : 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 */ ) { ffc05178: 94 21 ff e0 stwu r1,-32(r1) ffc0517c: 7c 08 02 a6 mflr r0 ffc05180: 90 01 00 24 stw r0,36(r1) ffc05184: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; ffc05188: 83 e4 00 00 lwz r31,0(r4) strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); ffc0518c: 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 */ ) { ffc05190: 93 c1 00 18 stw r30,24(r1) ffc05194: 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 ); ffc05198: 38 7f 00 0c addi r3,r31,12 ffc0519c: 38 a0 00 20 li r5,32 ffc051a0: 48 01 42 29 bl ffc193c8 if ( the_jnode->Parent != NULL ) ffc051a4: 80 1f 00 08 lwz r0,8(r31) ffc051a8: 2f 80 00 00 cmpwi cr7,r0,0 ffc051ac: 41 9e 00 0c beq- cr7,ffc051b8 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc051b0: 7f e3 fb 78 mr r3,r31 ffc051b4: 48 00 57 d1 bl ffc0a984 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; ffc051b8: 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 ); ffc051bc: 7f e4 fb 78 mr r4,r31 the_jnode->Parent = new_parent; ffc051c0: 90 7f 00 08 stw r3,8(r31) ffc051c4: 38 63 00 50 addi r3,r3,80 ffc051c8: 48 00 57 8d bl ffc0a954 <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); ffc051cc: 38 61 00 08 addi r3,r1,8 ffc051d0: 38 80 00 00 li r4,0 ffc051d4: 48 00 09 a9 bl ffc05b7c ffc051d8: 80 01 00 08 lwz r0,8(r1) return 0; } ffc051dc: 38 60 00 00 li r3,0 ffc051e0: 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 ); ffc051e4: 90 1f 00 48 stw r0,72(r31) return 0; } ffc051e8: 80 01 00 24 lwz r0,36(r1) ffc051ec: 83 e1 00 1c lwz r31,28(r1) ffc051f0: 38 21 00 20 addi r1,r1,32 ffc051f4: 7c 08 03 a6 mtlr r0 ffc051f8: 4e 80 00 20 blr =============================================================================== ffc12cb0 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { ffc12cb0: 94 21 ff e0 stwu r1,-32(r1) ffc12cb4: 7c 08 02 a6 mflr r0 ffc12cb8: 90 01 00 24 stw r0,36(r1) ffc12cbc: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; ffc12cc0: 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 */ ) { ffc12cc4: 93 c1 00 18 stw r30,24(r1) ffc12cc8: 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 ) { ffc12ccc: 80 1f 00 08 lwz r0,8(r31) ffc12cd0: 2f 80 00 00 cmpwi cr7,r0,0 ffc12cd4: 41 9e 00 14 beq- cr7,ffc12ce8 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc12cd8: 7f e3 fb 78 mr r3,r31 ffc12cdc: 4b ff 7c a9 bl ffc0a984 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; ffc12ce0: 38 00 00 00 li r0,0 ffc12ce4: 90 1f 00 08 stw r0,8(r31) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; ffc12ce8: a1 3f 00 34 lhz r9,52(r31) IMFS_update_ctime( the_jnode ); ffc12cec: 38 80 00 00 li r4,0 ffc12cf0: 38 61 00 08 addi r3,r1,8 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; ffc12cf4: 38 09 ff ff addi r0,r9,-1 ffc12cf8: b0 1f 00 34 sth r0,52(r31) IMFS_update_ctime( the_jnode ); ffc12cfc: 4b ff 2e 81 bl ffc05b7c ffc12d00: 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) ) { ffc12d04: 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 ); ffc12d08: 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) ) { ffc12d0c: 48 00 03 cd bl ffc130d8 ffc12d10: 2f 83 00 00 cmpwi cr7,r3,0 ffc12d14: 40 9e 00 50 bne- cr7,ffc12d64 <== NEVER TAKEN ffc12d18: a0 1f 00 34 lhz r0,52(r31) ffc12d1c: 2f 80 00 00 cmpwi cr7,r0,0 ffc12d20: 40 9e 00 44 bne- cr7,ffc12d64 <== NEVER TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) ffc12d24: 3d 20 00 00 lis r9,0 ffc12d28: 81 7e 00 00 lwz r11,0(r30) ffc12d2c: 81 29 26 f4 lwz r9,9972(r9) ffc12d30: 81 49 00 04 lwz r10,4(r9) ffc12d34: 7f 8a 58 00 cmpw cr7,r10,r11 ffc12d38: 40 be 00 08 bne+ cr7,ffc12d40 <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; ffc12d3c: 90 09 00 04 stw r0,4(r9) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { ffc12d40: 80 1f 00 4c lwz r0,76(r31) ffc12d44: 2f 80 00 04 cmpwi cr7,r0,4 ffc12d48: 40 be 00 14 bne+ cr7,ffc12d5c if ( the_jnode->info.sym_link.name ) ffc12d4c: 80 7f 00 50 lwz r3,80(r31) ffc12d50: 2f 83 00 00 cmpwi cr7,r3,0 ffc12d54: 41 9e 00 08 beq- cr7,ffc12d5c <== NEVER TAKEN free( (void*) the_jnode->info.sym_link.name ); ffc12d58: 4b ff 2d 5d bl ffc05ab4 } free( the_jnode ); ffc12d5c: 7f e3 fb 78 mr r3,r31 ffc12d60: 4b ff 2d 55 bl ffc05ab4 } return 0; } ffc12d64: 80 01 00 24 lwz r0,36(r1) ffc12d68: 38 60 00 00 li r3,0 ffc12d6c: 83 c1 00 18 lwz r30,24(r1) ffc12d70: 7c 08 03 a6 mtlr r0 ffc12d74: 83 e1 00 1c lwz r31,28(r1) ffc12d78: 38 21 00 20 addi r1,r1,32 ffc12d7c: 4e 80 00 20 blr =============================================================================== ffc12d80 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { ffc12d80: 7c 08 02 a6 mflr r0 ffc12d84: 94 21 ff f8 stwu r1,-8(r1) ffc12d88: 7c 6b 1b 78 mr r11,r3 ffc12d8c: 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; ffc12d90: 81 23 00 00 lwz r9,0(r3) switch ( the_jnode->type ) { ffc12d94: 81 49 00 4c lwz r10,76(r9) ffc12d98: 38 0a ff fe addi r0,r10,-2 ffc12d9c: 2b 80 00 05 cmplwi cr7,r0,5 ffc12da0: 41 9d 00 54 bgt- cr7,ffc12df4 <== NEVER TAKEN ffc12da4: 3d 40 ff c2 lis r10,-62 ffc12da8: 39 4a 4c 38 addi r10,r10,19512 ffc12dac: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc12db0: 7c 0a 00 2e lwzx r0,r10,r0 ffc12db4: 7d 40 52 14 add r10,r0,r10 ffc12db8: 7d 49 03 a6 mtctr r10 ffc12dbc: 4e 80 04 20 bctr case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); ffc12dc0: 81 49 00 54 lwz r10,84(r9) rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; ffc12dc4: 80 09 00 50 lwz r0,80(r9) ffc12dc8: 91 44 00 1c stw r10,28(r4) ffc12dcc: 90 04 00 18 stw r0,24(r4) break; ffc12dd0: 48 00 00 38 b ffc12e08 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; ffc12dd4: 80 e9 00 50 lwz r7,80(r9) ffc12dd8: 81 09 00 54 lwz r8,84(r9) ffc12ddc: 48 00 00 0c b ffc12de8 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; ffc12de0: 38 e0 00 00 li r7,0 <== NOT EXECUTED ffc12de4: 39 00 00 00 li r8,0 <== NOT EXECUTED ffc12de8: 90 e4 00 20 stw r7,32(r4) ffc12dec: 91 04 00 24 stw r8,36(r4) break; ffc12df0: 48 00 00 18 b ffc12e08 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc12df4: 48 00 52 79 bl ffc1806c <__errno> <== NOT EXECUTED ffc12df8: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc12dfc: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc12e00: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc12e04: 48 00 00 64 b ffc12e68 <== 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; ffc12e08: 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; ffc12e0c: 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; ffc12e10: 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; ffc12e14: 90 04 00 0c stw r0,12(r4) buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; ffc12e18: 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; ffc12e1c: b1 44 00 10 sth r10,16(r4) buf->st_ino = the_jnode->st_ino; ffc12e20: 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; ffc12e24: 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; ffc12e28: a1 49 00 3c lhz r10,60(r9) buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; ffc12e2c: 90 04 00 28 stw r0,40(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 = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); ffc12e30: 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; ffc12e34: 80 09 00 44 lwz r0,68(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; ffc12e38: 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; ffc12e3c: 90 04 00 30 stw r0,48(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 = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); ffc12e40: 81 6b 00 34 lwz r11,52(r11) 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; ffc12e44: 81 49 00 48 lwz r10,72(r9) 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; ffc12e48: 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 = ffc12e4c: 39 20 00 00 li r9,0 rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); ffc12e50: 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 = ffc12e54: 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; ffc12e58: 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 = ffc12e5c: 91 24 00 00 stw r9,0(r4) ffc12e60: 91 64 00 04 stw r11,4(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; ffc12e64: 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; } ffc12e68: 80 01 00 0c lwz r0,12(r1) ffc12e6c: 38 21 00 08 addi r1,r1,8 ffc12e70: 7c 08 03 a6 mtlr r0 ffc12e74: 4e 80 00 20 blr =============================================================================== ffc051fc : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { ffc051fc: 94 21 ff 98 stwu r1,-104(r1) ffc05200: 7c 08 02 a6 mflr r0 ffc05204: 93 c1 00 60 stw r30,96(r1) ffc05208: 7c 7e 1b 78 mr r30,r3 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); ffc0520c: 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 ) { ffc05210: 90 01 00 6c stw r0,108(r1) ffc05214: 93 81 00 58 stw r28,88(r1) ffc05218: 7c bc 2b 78 mr r28,r5 ffc0521c: 93 a1 00 5c stw r29,92(r1) ffc05220: 7c 9d 23 78 mr r29,r4 ffc05224: 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 ); ffc05228: 48 01 41 05 bl ffc1932c ffc0522c: 3b e1 00 28 addi r31,r1,40 ffc05230: 7c 64 1b 78 mr r4,r3 ffc05234: 7f e5 fb 78 mr r5,r31 ffc05238: 38 c1 00 08 addi r6,r1,8 ffc0523c: 7f 83 e3 78 mr r3,r28 ffc05240: 48 00 d9 5d bl ffc12b9c /* * Duplicate link name */ info.sym_link.name = strdup(link_name); ffc05244: 7f a3 eb 78 mr r3,r29 ffc05248: 48 01 40 4d bl ffc19294 if (info.sym_link.name == NULL) { ffc0524c: 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); ffc05250: 90 61 00 10 stw r3,16(r1) if (info.sym_link.name == NULL) { ffc05254: 41 9e 00 34 beq- cr7,ffc05288 <== 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( ffc05258: 38 c0 00 00 li r6,0 ffc0525c: 7f c3 f3 78 mr r3,r30 ffc05260: 7f e5 fb 78 mr r5,r31 ffc05264: 60 c6 a1 ff ori r6,r6,41471 ffc05268: 38 80 00 04 li r4,4 ffc0526c: 38 e1 00 10 addi r7,r1,16 ffc05270: 48 00 c9 d9 bl ffc11c48 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { ffc05274: 2f 83 00 00 cmpwi cr7,r3,0 ffc05278: 38 60 00 00 li r3,0 ffc0527c: 40 be 00 1c bne+ cr7,ffc05298 <== ALWAYS TAKEN free(info.sym_link.name); ffc05280: 80 61 00 10 lwz r3,16(r1) <== NOT EXECUTED ffc05284: 48 00 08 31 bl ffc05ab4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); ffc05288: 48 01 2d e5 bl ffc1806c <__errno> <== NOT EXECUTED ffc0528c: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc05290: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc05294: 38 60 ff ff li r3,-1 <== NOT EXECUTED } return 0; } ffc05298: 80 01 00 6c lwz r0,108(r1) ffc0529c: 83 81 00 58 lwz r28,88(r1) ffc052a0: 7c 08 03 a6 mtlr r0 ffc052a4: 83 a1 00 5c lwz r29,92(r1) ffc052a8: 83 c1 00 60 lwz r30,96(r1) ffc052ac: 83 e1 00 64 lwz r31,100(r1) ffc052b0: 38 21 00 68 addi r1,r1,104 ffc052b4: 4e 80 00 20 blr =============================================================================== ffc052b8 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { ffc052b8: 94 21 ff c8 stwu r1,-56(r1) ffc052bc: 7c 08 02 a6 mflr r0 ffc052c0: 90 01 00 3c stw r0,60(r1) ffc052c4: 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; ffc052c8: 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 */ ) { ffc052cc: 93 a1 00 2c stw r29,44(r1) ffc052d0: 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 ) { ffc052d4: 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 */ ) { ffc052d8: 93 e1 00 34 stw r31,52(r1) ffc052dc: 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 ) { ffc052e0: 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 */ ) { ffc052e4: 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 ) { ffc052e8: 40 9e 00 ac bne- cr7,ffc05394 if ( !node->info.hard_link.link_node ) ffc052ec: 80 1e 00 50 lwz r0,80(r30) ffc052f0: 2f 80 00 00 cmpwi cr7,r0,0 ffc052f4: 40 be 00 18 bne+ cr7,ffc0530c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ffc052f8: 48 01 2d 75 bl ffc1806c <__errno> <== NOT EXECUTED ffc052fc: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc05300: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc05304: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc05308: 48 00 00 a4 b ffc053ac <== NOT EXECUTED the_link = *loc; the_link.node_access = node->info.hard_link.link_node; ffc0530c: 7c 3c 0b 78 mr r28,r1 ffc05310: 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; ffc05314: 81 64 00 08 lwz r11,8(r4) the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); ffc05318: 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; ffc0531c: 81 24 00 0c lwz r9,12(r4) ffc05320: 81 44 00 04 lwz r10,4(r4) ffc05324: 80 04 00 10 lwz r0,16(r4) ffc05328: 91 61 00 18 stw r11,24(r1) ffc0532c: 91 21 00 1c stw r9,28(r1) ffc05330: 91 41 00 14 stw r10,20(r1) ffc05334: 90 01 00 20 stw r0,32(r1) the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); ffc05338: 48 00 ca 79 bl ffc11db0 /* * 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) ffc0533c: 81 3e 00 50 lwz r9,80(r30) ffc05340: a1 69 00 34 lhz r11,52(r9) ffc05344: 2f 8b 00 01 cmpwi cr7,r11,1 ffc05348: 40 be 00 2c bne+ cr7,ffc05374 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); ffc0534c: 81 21 00 18 lwz r9,24(r1) ffc05350: 7f 84 e3 78 mr r4,r28 ffc05354: 7f a3 eb 78 mr r3,r29 ffc05358: 80 09 00 34 lwz r0,52(r9) ffc0535c: 7c 09 03 a6 mtctr r0 ffc05360: 4e 80 04 21 bctrl if ( result != 0 ) ffc05364: 2f 83 00 00 cmpwi cr7,r3,0 ffc05368: 38 60 ff ff li r3,-1 ffc0536c: 41 be 00 28 beq+ cr7,ffc05394 ffc05370: 48 00 00 3c b ffc053ac return -1; } else { node->info.hard_link.link_node->st_nlink --; ffc05374: 39 6b ff ff addi r11,r11,-1 ffc05378: b1 69 00 34 sth r11,52(r9) IMFS_update_ctime( node->info.hard_link.link_node ); ffc0537c: 38 61 00 08 addi r3,r1,8 ffc05380: 38 80 00 00 li r4,0 ffc05384: 48 00 07 f9 bl ffc05b7c ffc05388: 81 3e 00 50 lwz r9,80(r30) ffc0538c: 80 01 00 08 lwz r0,8(r1) ffc05390: 90 09 00 48 stw r0,72(r9) /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); ffc05394: 81 3f 00 08 lwz r9,8(r31) ffc05398: 7f a3 eb 78 mr r3,r29 ffc0539c: 7f e4 fb 78 mr r4,r31 ffc053a0: 80 09 00 34 lwz r0,52(r9) ffc053a4: 7c 09 03 a6 mtctr r0 ffc053a8: 4e 80 04 21 bctrl return result; } ffc053ac: 80 01 00 3c lwz r0,60(r1) ffc053b0: 83 81 00 28 lwz r28,40(r1) ffc053b4: 7c 08 03 a6 mtlr r0 ffc053b8: 83 a1 00 2c lwz r29,44(r1) ffc053bc: 83 c1 00 30 lwz r30,48(r1) ffc053c0: 83 e1 00 34 lwz r31,52(r1) ffc053c4: 38 21 00 38 addi r1,r1,56 ffc053c8: 4e 80 00 20 blr =============================================================================== ffc053cc : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { ffc053cc: 7c 08 02 a6 mflr r0 ffc053d0: 94 21 ff f8 stwu r1,-8(r1) ffc053d4: 90 01 00 0c stw r0,12(r1) IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; ffc053d8: 81 23 00 08 lwz r9,8(r3) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) ffc053dc: 80 09 00 4c lwz r0,76(r9) ffc053e0: 2f 80 00 01 cmpwi cr7,r0,1 ffc053e4: 41 be 00 10 beq+ cr7,ffc053f4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc053e8: 48 01 2c 85 bl ffc1806c <__errno> <== NOT EXECUTED ffc053ec: 38 00 00 14 li r0,20 <== NOT EXECUTED ffc053f0: 48 00 00 18 b ffc05408 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) ffc053f4: 80 09 00 5c lwz r0,92(r9) ffc053f8: 2f 80 00 00 cmpwi cr7,r0,0 ffc053fc: 40 be 00 18 bne+ cr7,ffc05414 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ ffc05400: 48 01 2c 6d bl ffc1806c <__errno> <== NOT EXECUTED ffc05404: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc05408: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0540c: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc05410: 48 00 00 10 b ffc05420 <== NOT EXECUTED /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; ffc05414: 38 00 00 00 li r0,0 ffc05418: 90 09 00 5c stw r0,92(r9) ffc0541c: 38 60 00 00 li r3,0 return 0; } ffc05420: 80 01 00 0c lwz r0,12(r1) ffc05424: 38 21 00 08 addi r1,r1,8 ffc05428: 7c 08 03 a6 mtlr r0 ffc0542c: 4e 80 00 20 blr =============================================================================== ffc05d94 : #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { ffc05d94: 3d 20 00 00 lis r9,0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { ffc05d98: 94 21 ff e8 stwu r1,-24(r1) ffc05d9c: 7c 08 02 a6 mflr r0 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { ffc05da0: 81 29 27 28 lwz r9,10024(r9) void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { ffc05da4: 93 a1 00 0c stw r29,12(r1) ffc05da8: 7c bd 2b 78 mr r29,r5 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { ffc05dac: 2f 89 00 00 cmpwi cr7,r9,0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { ffc05db0: 93 c1 00 10 stw r30,16(r1) ffc05db4: 7c 9e 23 78 mr r30,r4 ffc05db8: 93 e1 00 14 stw r31,20(r1) ffc05dbc: 7c 7f 1b 78 mr r31,r3 ffc05dc0: 90 01 00 1c stw r0,28(r1) #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { ffc05dc4: 41 9e 00 10 beq- cr7,ffc05dd4 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->initialize)(); ffc05dc8: 80 09 00 00 lwz r0,0(r9) <== NOT EXECUTED ffc05dcc: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc05dd0: 4e 80 04 21 bctrl <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); ffc05dd4: 4b ff ff 31 bl ffc05d04 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { ffc05dd8: 3d 20 00 00 lis r9,0 ffc05ddc: 81 29 27 2c lwz r9,10028(r9) ffc05de0: 2f 89 00 00 cmpwi cr7,r9,0 ffc05de4: 41 9e 00 24 beq- cr7,ffc05e08 <== ALWAYS TAKEN void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( ffc05de8: 80 09 00 00 lwz r0,0(r9) <== NOT EXECUTED ffc05dec: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc05df0: 7f a4 eb 78 mr r4,r29 <== NOT EXECUTED ffc05df4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; ffc05df8: 7f df f2 14 add r30,r31,r30 <== 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)( ffc05dfc: 4e 80 04 21 bctrl <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; ffc05e00: 7f c3 f0 50 subf r30,r3,r30 <== NOT EXECUTED ffc05e04: 7c 7f 1b 78 mr r31,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 ( ffc05e08: 3d 20 00 00 lis r9,0 ffc05e0c: 88 09 27 25 lbz r0,10021(r9) ffc05e10: 2f 80 00 00 cmpwi cr7,r0,0 ffc05e14: 40 9e 00 24 bne- cr7,ffc05e38 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ffc05e18: 3d 20 00 00 lis r9,0 ffc05e1c: 88 09 20 b0 lbz r0,8368(r9) ffc05e20: 2f 80 00 00 cmpwi cr7,r0,0 ffc05e24: 41 be 00 14 beq+ cr7,ffc05e38 ) { memset( heap_begin, 0, heap_size ); ffc05e28: 7f e3 fb 78 mr r3,r31 ffc05e2c: 38 80 00 00 li r4,0 ffc05e30: 7f c5 f3 78 mr r5,r30 ffc05e34: 48 01 2f 21 bl ffc18d54 * 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 ) { ffc05e38: 3d 20 00 00 lis r9,0 ffc05e3c: 88 09 27 25 lbz r0,10021(r9) ffc05e40: 2f 80 00 00 cmpwi cr7,r0,0 ffc05e44: 40 9e 00 2c bne- cr7,ffc05e70 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); ffc05e48: 3d 20 00 00 lis r9,0 ffc05e4c: 80 69 26 bc lwz r3,9916(r9) ffc05e50: 7f e4 fb 78 mr r4,r31 ffc05e54: 7f c5 f3 78 mr r5,r30 ffc05e58: 38 c0 00 08 li r6,8 ffc05e5c: 48 00 51 09 bl ffc0af64 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { ffc05e60: 2f 83 00 00 cmpwi cr7,r3,0 ffc05e64: 40 be 00 0c bne+ cr7,ffc05e70 <== ALWAYS TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); ffc05e68: 38 60 00 1a li r3,26 <== NOT EXECUTED ffc05e6c: 48 00 44 29 bl ffc0a294 <== NOT EXECUTED } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); ffc05e70: 3d 20 00 00 lis r9,0 ffc05e74: 80 69 26 bc lwz r3,9916(r9) ffc05e78: 3f e0 00 00 lis r31,0 ffc05e7c: 83 df 2b c0 lwz r30,11200(r31) ffc05e80: 48 00 5f 35 bl ffc0bdb4 <_Protected_heap_Get_size> printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } ffc05e84: 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) ); ffc05e88: 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 } ffc05e8c: 83 a1 00 0c lwz r29,12(r1) ffc05e90: 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) ); ffc05e94: 90 7f 2b c0 stw r3,11200(r31) printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } ffc05e98: 83 c1 00 10 lwz r30,16(r1) ffc05e9c: 83 e1 00 14 lwz r31,20(r1) ffc05ea0: 38 21 00 18 addi r1,r1,24 ffc05ea4: 4e 80 00 20 blr =============================================================================== ffc039a4 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc039a4: 94 21 ff c8 stwu r1,-56(r1) <== NOT EXECUTED ffc039a8: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc039ac: 93 41 00 20 stw r26,32(r1) <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) ffc039b0: 7c 7a 1b 79 mr. r26,r3 <== NOT EXECUTED static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { ffc039b4: 90 01 00 3c stw r0,60(r1) <== NOT EXECUTED ffc039b8: 93 21 00 1c stw r25,28(r1) <== NOT EXECUTED ffc039bc: 93 61 00 24 stw r27,36(r1) <== NOT EXECUTED ffc039c0: 93 81 00 28 stw r28,40(r1) <== NOT EXECUTED ffc039c4: 93 a1 00 2c stw r29,44(r1) <== NOT EXECUTED ffc039c8: 93 c1 00 30 stw r30,48(r1) <== NOT EXECUTED ffc039cc: 93 e1 00 34 stw r31,52(r1) <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) ffc039d0: 41 82 01 6c beq- ffc03b3c <== NOT EXECUTED return; if ( !print_handler ) ffc039d4: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc039d8: 83 a9 28 88 lwz r29,10376(r9) <== NOT EXECUTED ffc039dc: 2f 9d 00 00 cmpwi cr7,r29,0 <== NOT EXECUTED ffc039e0: 41 9e 01 5c beq- cr7,ffc03b3c <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { ffc039e4: 2f 9a ff ff cmpwi cr7,r26,-1 <== NOT EXECUTED ffc039e8: 40 be 00 24 bne+ cr7,ffc03a0c <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { ffc039ec: 3f e0 00 00 lis r31,0 <== NOT EXECUTED ffc039f0: 3b ff 27 48 addi r31,r31,10056 <== NOT EXECUTED ffc039f4: 80 1f 00 04 lwz r0,4(r31) <== NOT EXECUTED ffc039f8: 3b 60 00 00 li r27,0 <== NOT EXECUTED ffc039fc: 3b 40 00 00 li r26,0 <== NOT EXECUTED ffc03a00: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc03a04: 40 be 00 10 bne+ cr7,ffc03a14 <== NOT EXECUTED ffc03a08: 48 00 01 34 b ffc03b3c <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); ffc03a0c: 83 7a 00 dc lwz r27,220(r26) <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; ffc03a10: 3b fa 00 cc addi r31,r26,204 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); ffc03a14: 83 3f 00 04 lwz r25,4(r31) <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); ffc03a18: 83 9f 00 00 lwz r28,0(r31) <== 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); ffc03a1c: 3b 39 00 80 addi r25,r25,128 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); ffc03a20: 3b 9c ff 80 addi r28,r28,-128 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); ffc03a24: 7f 23 cb 78 mr r3,r25 <== NOT EXECUTED ffc03a28: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED ffc03a2c: 4b ff ff 41 bl ffc0396c <== NOT EXECUTED if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { ffc03a30: 2f 9a 00 00 cmpwi cr7,r26,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 ) ffc03a34: 7c 69 fe 70 srawi r9,r3,31 <== NOT EXECUTED ffc03a38: 7d 20 1a 78 xor r0,r9,r3 <== NOT EXECUTED ffc03a3c: 7c 00 48 50 subf r0,r0,r9 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); ffc03a40: 7f d9 e2 14 add r30,r25,r28 <== NOT EXECUTED ffc03a44: 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 ) ffc03a48: 7c 00 fe 70 srawi r0,r0,31 <== NOT EXECUTED ffc03a4c: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc03a50: 7f de 00 38 and r30,r30,r0 <== NOT EXECUTED ffc03a54: 39 29 28 84 addi r9,r9,10372 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { ffc03a58: 41 9e 00 40 beq- cr7,ffc03a98 <== NOT EXECUTED (*print_handler)( ffc03a5c: 83 5a 00 08 lwz r26,8(r26) <== NOT EXECUTED ffc03a60: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED ffc03a64: 83 29 00 08 lwz r25,8(r9) <== NOT EXECUTED ffc03a68: 38 80 00 05 li r4,5 <== NOT EXECUTED ffc03a6c: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED ffc03a70: 48 00 42 d1 bl ffc07d40 <== NOT EXECUTED ffc03a74: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc03a78: 7c 66 1b 78 mr r6,r3 <== NOT EXECUTED ffc03a7c: 7f a9 03 a6 mtctr r29 <== NOT EXECUTED ffc03a80: 7f 23 cb 78 mr r3,r25 <== NOT EXECUTED ffc03a84: 38 84 de a8 addi r4,r4,-8536 <== NOT EXECUTED ffc03a88: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED ffc03a8c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc03a90: 4e 80 04 21 bctrl <== NOT EXECUTED ffc03a94: 48 00 00 20 b ffc03ab4 <== 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 ); ffc03a98: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc03a9c: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED ffc03aa0: 38 84 de b5 addi r4,r4,-8523 <== NOT EXECUTED ffc03aa4: 7f a9 03 a6 mtctr r29 <== NOT EXECUTED ffc03aa8: 38 a0 ff ff li r5,-1 <== NOT EXECUTED ffc03aac: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc03ab0: 4e 80 04 21 bctrl <== NOT EXECUTED } (*print_handler)( ffc03ab4: 3f a0 00 00 lis r29,0 <== NOT EXECUTED ffc03ab8: 80 df 00 00 lwz r6,0(r31) <== NOT EXECUTED ffc03abc: 80 bf 00 04 lwz r5,4(r31) <== NOT EXECUTED ffc03ac0: 3b fd 28 84 addi r31,r29,10372 <== NOT EXECUTED ffc03ac4: 80 1f 00 04 lwz r0,4(r31) <== NOT EXECUTED ffc03ac8: 38 c6 ff ff addi r6,r6,-1 <== NOT EXECUTED ffc03acc: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc03ad0: 80 7f 00 08 lwz r3,8(r31) <== NOT EXECUTED ffc03ad4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc03ad8: 38 84 de c3 addi r4,r4,-8509 <== NOT EXECUTED ffc03adc: 7c c5 32 14 add r6,r5,r6 <== NOT EXECUTED ffc03ae0: 7f 67 db 78 mr r7,r27 <== NOT EXECUTED ffc03ae4: 7f 88 e3 78 mr r8,r28 <== NOT EXECUTED ffc03ae8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc03aec: 4e 80 04 21 bctrl <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { ffc03af0: 80 1d 28 84 lwz r0,10372(r29) <== NOT EXECUTED ffc03af4: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc03af8: 40 be 00 24 bne+ cr7,ffc03b1c <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); ffc03afc: 80 1f 00 04 lwz r0,4(r31) <== NOT EXECUTED ffc03b00: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc03b04: 80 7f 00 08 lwz r3,8(r31) <== NOT EXECUTED ffc03b08: 38 84 de e1 addi r4,r4,-8479 <== NOT EXECUTED ffc03b0c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc03b10: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc03b14: 4e 80 04 21 bctrl <== NOT EXECUTED ffc03b18: 48 00 00 24 b ffc03b3c <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); ffc03b1c: 80 1f 00 04 lwz r0,4(r31) <== NOT EXECUTED ffc03b20: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc03b24: 80 7f 00 08 lwz r3,8(r31) <== NOT EXECUTED ffc03b28: 38 84 de ee addi r4,r4,-8466 <== NOT EXECUTED ffc03b2c: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED ffc03b30: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc03b34: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc03b38: 4e 80 04 21 bctrl <== NOT EXECUTED } } ffc03b3c: 80 01 00 3c lwz r0,60(r1) <== NOT EXECUTED ffc03b40: 83 21 00 1c lwz r25,28(r1) <== NOT EXECUTED ffc03b44: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc03b48: 83 41 00 20 lwz r26,32(r1) <== NOT EXECUTED ffc03b4c: 83 61 00 24 lwz r27,36(r1) <== NOT EXECUTED ffc03b50: 83 81 00 28 lwz r28,40(r1) <== NOT EXECUTED ffc03b54: 83 a1 00 2c lwz r29,44(r1) <== NOT EXECUTED ffc03b58: 83 c1 00 30 lwz r30,48(r1) <== NOT EXECUTED ffc03b5c: 83 e1 00 34 lwz r31,52(r1) <== NOT EXECUTED ffc03b60: 38 21 00 38 addi r1,r1,56 <== NOT EXECUTED ffc03b64: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0396c : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; ffc0396c: 38 63 00 80 addi r3,r3,128 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) ffc03970: 54 84 00 3a rlwinm r4,r4,0,0,29 <== NOT EXECUTED if (*base != U32_PATTERN) ffc03974: 3c 00 a5 a5 lis r0,-23131 <== 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++) ffc03978: 7c 83 22 14 add r4,r3,r4 <== NOT EXECUTED if (*base != U32_PATTERN) ffc0397c: 60 00 a5 a5 ori r0,r0,42405 <== 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++) ffc03980: 48 00 00 14 b ffc03994 <== NOT EXECUTED if (*base != U32_PATTERN) ffc03984: 81 23 00 00 lwz r9,0(r3) <== NOT EXECUTED ffc03988: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc0398c: 4c 9e 00 20 bnelr cr7 <== 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++) ffc03990: 38 63 00 04 addi r3,r3,4 <== NOT EXECUTED ffc03994: 7f 83 20 40 cmplw cr7,r3,r4 <== NOT EXECUTED ffc03998: 41 9c ff ec blt+ cr7,ffc03984 <== NOT EXECUTED ffc0399c: 38 60 00 00 li r3,0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } ffc039a0: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc03c10 : * * 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) { ffc03c10: 94 21 ff c8 stwu r1,-56(r1) ffc03c14: 7c 08 02 a6 mflr r0 ffc03c18: 93 a1 00 2c stw r29,44(r1) ffc03c1c: 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"); ffc03c20: 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) { ffc03c24: 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"); ffc03c28: 38 63 df 55 addi r3,r3,-8363 * * 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) { ffc03c2c: 93 c1 00 30 stw r30,48(r1) ffc03c30: 7c 9e 23 78 mr r30,r4 ffc03c34: 93 e1 00 34 stw r31,52(r1) Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); ffc03c38: 83 fd 00 d0 lwz r31,208(r29) char name [32]; printk("BLOWN STACK!!!\n"); ffc03c3c: 4c c6 31 82 crclr 4*cr1+eq ffc03c40: 48 00 18 2d bl ffc0546c printk("task control block: 0x%08" PRIxPTR "\n", running); ffc03c44: 3c 60 ff c2 lis r3,-62 ffc03c48: 38 63 df 65 addi r3,r3,-8347 ffc03c4c: 7f a4 eb 78 mr r4,r29 ffc03c50: 4c c6 31 82 crclr 4*cr1+eq ffc03c54: 48 00 18 19 bl ffc0546c printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); ffc03c58: 80 9d 00 08 lwz r4,8(r29) ffc03c5c: 3c 60 ff c2 lis r3,-62 ffc03c60: 38 63 df 82 addi r3,r3,-8318 ffc03c64: 4c c6 31 82 crclr 4*cr1+eq ffc03c68: 48 00 18 05 bl ffc0546c printk( ffc03c6c: 80 9d 00 0c lwz r4,12(r29) ffc03c70: 3c 60 ff c2 lis r3,-62 ffc03c74: 38 63 df 94 addi r3,r3,-8300 ffc03c78: 4c c6 31 82 crclr 4*cr1+eq ffc03c7c: 48 00 17 f1 bl ffc0546c "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( ffc03c80: 80 7d 00 08 lwz r3,8(r29) ffc03c84: 38 a1 00 08 addi r5,r1,8 ffc03c88: 38 80 00 20 li r4,32 ffc03c8c: 48 00 40 b5 bl ffc07d40 ffc03c90: 7c 64 1b 78 mr r4,r3 ffc03c94: 3c 60 ff c2 lis r3,-62 ffc03c98: 38 63 df a8 addi r3,r3,-8280 ffc03c9c: 4c c6 31 82 crclr 4*cr1+eq ffc03ca0: 48 00 17 cd bl ffc0546c "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( ffc03ca4: 80 9d 00 cc lwz r4,204(r29) ffc03ca8: 80 bd 00 d0 lwz r5,208(r29) ffc03cac: 3c 60 ff c2 lis r3,-62 ffc03cb0: 38 63 df be addi r3,r3,-8258 ffc03cb4: 7c c5 22 14 add r6,r5,r4 ffc03cb8: 4c c6 31 82 crclr 4*cr1+eq ffc03cbc: 48 00 17 b1 bl ffc0546c "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) { ffc03cc0: 2f 9e 00 00 cmpwi cr7,r30,0 ffc03cc4: 40 be 00 20 bne+ cr7,ffc03ce4 <== NEVER TAKEN printk( ffc03cc8: 3c 60 ff c2 lis r3,-62 ffc03ccc: 38 63 df ef addi r3,r3,-8209 ffc03cd0: 38 df 00 88 addi r6,r31,136 ffc03cd4: 38 80 00 80 li r4,128 ffc03cd8: 38 bf 00 08 addi r5,r31,8 ffc03cdc: 4c c6 31 82 crclr 4*cr1+eq ffc03ce0: 48 00 17 8d bl ffc0546c rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); ffc03ce4: 38 60 00 81 li r3,129 ffc03ce8: 48 00 4b 75 bl ffc0885c =============================================================================== ffc0cef0 : *************************************************************************/ int Untar_FromFile( const char *tar_name ) { ffc0cef0: 94 21 fe e8 stwu r1,-280(r1) <== NOT EXECUTED ffc0cef4: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc0cef8: 93 a1 01 0c stw r29,268(r1) <== NOT EXECUTED ffc0cefc: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED unsigned long size; unsigned char linkflag; retval = UNTAR_SUCCESSFUL; bufr = (char *)malloc(512); ffc0cf00: 38 60 02 00 li r3,512 <== NOT EXECUTED *************************************************************************/ int Untar_FromFile( const char *tar_name ) { ffc0cf04: 93 c1 01 10 stw r30,272(r1) <== NOT EXECUTED unsigned char linkflag; retval = UNTAR_SUCCESSFUL; bufr = (char *)malloc(512); if (bufr == NULL) ffc0cf08: 3b c0 00 01 li r30,1 <== NOT EXECUTED *************************************************************************/ int Untar_FromFile( const char *tar_name ) { ffc0cf0c: 93 e1 01 14 stw r31,276(r1) <== NOT EXECUTED ffc0cf10: 90 01 01 1c stw r0,284(r1) <== NOT EXECUTED ffc0cf14: 92 21 00 dc stw r17,220(r1) <== NOT EXECUTED ffc0cf18: 92 41 00 e0 stw r18,224(r1) <== NOT EXECUTED ffc0cf1c: 92 61 00 e4 stw r19,228(r1) <== NOT EXECUTED ffc0cf20: 92 81 00 e8 stw r20,232(r1) <== NOT EXECUTED ffc0cf24: 92 a1 00 ec stw r21,236(r1) <== NOT EXECUTED ffc0cf28: 92 c1 00 f0 stw r22,240(r1) <== NOT EXECUTED ffc0cf2c: 92 e1 00 f4 stw r23,244(r1) <== NOT EXECUTED ffc0cf30: 93 01 00 f8 stw r24,248(r1) <== NOT EXECUTED ffc0cf34: 93 21 00 fc stw r25,252(r1) <== NOT EXECUTED ffc0cf38: 93 41 01 00 stw r26,256(r1) <== NOT EXECUTED ffc0cf3c: 93 61 01 04 stw r27,260(r1) <== NOT EXECUTED ffc0cf40: 93 81 01 08 stw r28,264(r1) <== NOT EXECUTED unsigned long size; unsigned char linkflag; retval = UNTAR_SUCCESSFUL; bufr = (char *)malloc(512); ffc0cf44: 4b ff 86 09 bl ffc0554c <== NOT EXECUTED if (bufr == NULL) ffc0cf48: 7c 7f 1b 79 mr. r31,r3 <== NOT EXECUTED ffc0cf4c: 41 82 02 24 beq- ffc0d170 <== NOT EXECUTED { return(UNTAR_FAIL); } fd = open(tar_name, O_RDONLY); ffc0cf50: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc0cf54: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc0cf58: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc0cf5c: 4b ff 90 09 bl ffc05f64 <== NOT EXECUTED if ((n = read(fd, bufr, 512)) != 512) { break; } if (strncmp(&bufr[257], "ustar ", 7)) ffc0cf60: 3e 20 ff c2 lis r17,-62 <== NOT EXECUTED if (bufr == NULL) { return(UNTAR_FAIL); } fd = open(tar_name, O_RDONLY); ffc0cf64: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED if ((n = read(fd, bufr, 512)) != 512) { break; } if (strncmp(&bufr[257], "ustar ", 7)) ffc0cf68: 3a 31 4a a0 addi r17,r17,19104 <== NOT EXECUTED ffc0cf6c: 3a 5f 01 01 addi r18,r31,257 <== NOT EXECUTED { break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); ffc0cf70: 3b 81 00 08 addi r28,r1,8 <== NOT EXECUTED ************************************************************************** * Change History: * * 12/30/1998 - Creation (JWJ) * *************************************************************************/ int Untar_FromFile( ffc0cf74: 3a 7f 00 0c addi r19,r31,12 <== NOT EXECUTED ffc0cf78: 3a 9f 00 08 addi r20,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); ffc0cf7c: 3b 01 00 6c addi r24,r1,108 <== NOT EXECUTED ffc0cf80: 3a bf 00 9d addi r21,r31,157 <== NOT EXECUTED linkname[MAX_NAME_FIELD_SIZE] = '\0'; ffc0cf84: 3a c0 00 00 li r22,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) ffc0cf88: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc0cf8c: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc0cf90: 38 a0 02 00 li r5,512 <== NOT EXECUTED ffc0cf94: 4b ff 93 5d bl ffc062f0 <== NOT EXECUTED ffc0cf98: 2f 83 02 00 cmpwi cr7,r3,512 <== NOT EXECUTED ffc0cf9c: 40 9e 01 c0 bne- cr7,ffc0d15c <== NOT EXECUTED { break; } if (strncmp(&bufr[257], "ustar ", 7)) ffc0cfa0: 7e 43 93 78 mr r3,r18 <== NOT EXECUTED ffc0cfa4: 7e 24 8b 78 mr r4,r17 <== NOT EXECUTED ffc0cfa8: 38 a0 00 07 li r5,7 <== NOT EXECUTED ffc0cfac: 48 00 9c ed bl ffc16c98 <== NOT EXECUTED ffc0cfb0: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED ffc0cfb4: 40 82 01 a8 bne- ffc0d15c <== NOT EXECUTED { break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); ffc0cfb8: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc0cfbc: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc0cfc0: 38 a0 00 63 li r5,99 <== NOT EXECUTED ffc0cfc4: 48 00 9e 11 bl ffc16dd4 <== NOT EXECUTED ************************************************************************** * Change History: * * 12/30/1998 - Creation (JWJ) * *************************************************************************/ int Untar_FromFile( ffc0cfc8: 7d 1f 98 50 subf r8,r31,r19 <== NOT EXECUTED { break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); fname[MAX_NAME_FIELD_SIZE] = '\0'; ffc0cfcc: 9b c1 00 6b stb r30,107(r1) <== NOT EXECUTED ************************************************************************** * Change History: * * 12/30/1998 - Creation (JWJ) * *************************************************************************/ int Untar_FromFile( ffc0cfd0: 7d 09 03 a6 mtctr r8 <== NOT EXECUTED } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); fname[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = bufr[156]; ffc0cfd4: 7f e9 fb 78 mr r9,r31 <== NOT EXECUTED ffc0cfd8: 88 1f 00 9c lbz r0,156(r31) <== NOT EXECUTED ************************************************************************** * Change History: * * 12/30/1998 - Creation (JWJ) * *************************************************************************/ int Untar_FromFile( ffc0cfdc: 7f eb fb 78 mr r11,r31 <== NOT EXECUTED ffc0cfe0: 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')) ffc0cfe4: 89 4b 00 7c lbz r10,124(r11) <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); ffc0cfe8: 57 c8 18 38 rlwinm r8,r30,3,0,28 <== NOT EXECUTED ffc0cfec: 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')) ffc0cff0: 39 4a ff d0 addi r10,r10,-48 <== NOT EXECUTED ffc0cff4: 55 47 06 3e clrlwi r7,r10,24 <== NOT EXECUTED ffc0cff8: 2b 87 00 09 cmplwi cr7,r7,9 <== NOT EXECUTED ffc0cffc: 41 9d 00 08 bgt- cr7,ffc0d004 <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); ffc0d000: 7f ca 42 14 add r30,r10,r8 <== NOT EXECUTED { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) ffc0d004: 42 00 ff e0 bdnz+ ffc0cfe4 <== NOT EXECUTED ************************************************************************** * Change History: * * 12/30/1998 - Creation (JWJ) * *************************************************************************/ int Untar_FromFile( ffc0d008: 7d 7f a0 50 subf r11,r31,r20 <== NOT EXECUTED ffc0d00c: 7d 69 03 a6 mtctr r11 <== NOT EXECUTED ffc0d010: 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')) ffc0d014: 89 69 00 94 lbz r11,148(r9) <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); ffc0d018: 55 48 18 38 rlwinm r8,r10,3,0,28 <== NOT EXECUTED ffc0d01c: 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')) ffc0d020: 39 6b ff d0 addi r11,r11,-48 <== NOT EXECUTED ffc0d024: 55 67 06 3e clrlwi r7,r11,24 <== NOT EXECUTED ffc0d028: 2b 87 00 09 cmplwi cr7,r7,9 <== NOT EXECUTED ffc0d02c: 41 9d 00 08 bgt- cr7,ffc0d034 <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); ffc0d030: 7d 4b 42 14 add r10,r11,r8 <== NOT EXECUTED { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) ffc0d034: 42 00 ff e0 bdnz+ ffc0d014 <== NOT EXECUTED ffc0d038: 39 00 02 00 li r8,512 <== NOT EXECUTED ffc0d03c: 7d 09 03 a6 mtctr r8 <== NOT EXECUTED ffc0d040: 39 20 00 00 li r9,0 <== NOT EXECUTED ffc0d044: 39 60 00 00 li r11,0 <== NOT EXECUTED int i, sum; sum = 0; for (i=0; i<512; i++) { if ((i >= 148) && (i < 156)) ffc0d048: 39 0b ff 6c addi r8,r11,-148 <== NOT EXECUTED ffc0d04c: 2b 88 00 07 cmplwi cr7,r8,7 <== NOT EXECUTED ffc0d050: 41 9d 00 0c bgt- cr7,ffc0d05c <== NOT EXECUTED sum += 0xff & ' '; ffc0d054: 39 29 00 20 addi r9,r9,32 <== NOT EXECUTED ffc0d058: 48 00 00 0c b ffc0d064 <== NOT EXECUTED else sum += 0xff & bufr[i]; ffc0d05c: 7d 1f 58 ae lbzx r8,r31,r11 <== NOT EXECUTED ffc0d060: 7d 29 42 14 add r9,r9,r8 <== NOT EXECUTED ) { int i, sum; sum = 0; for (i=0; i<512; i++) ffc0d064: 39 6b 00 01 addi r11,r11,1 <== NOT EXECUTED ffc0d068: 42 00 ff e0 bdnz+ ffc0d048 <== 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) ffc0d06c: 7f 89 50 00 cmpw cr7,r9,r10 <== NOT EXECUTED ffc0d070: 41 be 00 0c beq+ cr7,ffc0d07c <== NOT EXECUTED ffc0d074: 3b c0 00 02 li r30,2 <== NOT EXECUTED ffc0d078: 48 00 00 e8 b ffc0d160 <== NOT EXECUTED /****************************************************************** * We've decoded the header, now figure out what it contains and * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) ffc0d07c: 2f 80 00 32 cmpwi cr7,r0,50 <== NOT EXECUTED ffc0d080: 40 be 00 28 bne+ cr7,ffc0d0a8 <== NOT EXECUTED { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); ffc0d084: 7e a4 ab 78 mr r4,r21 <== NOT EXECUTED ffc0d088: 7f 03 c3 78 mr r3,r24 <== NOT EXECUTED ffc0d08c: 38 a0 00 63 li r5,99 <== NOT EXECUTED ffc0d090: 48 00 9d 45 bl ffc16dd4 <== NOT EXECUTED linkname[MAX_NAME_FIELD_SIZE] = '\0'; symlink(linkname,fname); ffc0d094: 7f 03 c3 78 mr r3,r24 <== NOT EXECUTED ffc0d098: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); linkname[MAX_NAME_FIELD_SIZE] = '\0'; ffc0d09c: 9a c1 00 cf stb r22,207(r1) <== NOT EXECUTED symlink(linkname,fname); ffc0d0a0: 48 00 25 55 bl ffc0f5f4 <== NOT EXECUTED ffc0d0a4: 4b ff fe e4 b ffc0cf88 <== NOT EXECUTED } else if (linkflag == REGTYPE) ffc0d0a8: 2f 80 00 30 cmpwi cr7,r0,48 <== NOT EXECUTED ffc0d0ac: 40 be 00 98 bne+ cr7,ffc0d144 <== 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) ffc0d0b0: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc0d0b4: 38 80 01 a4 li r4,420 <== NOT EXECUTED ffc0d0b8: 48 00 72 1d bl ffc142d4 <== 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; ffc0d0bc: 3a fe 01 ff addi r23,r30,511 <== NOT EXECUTED if ((out_fd = creat(fname, 0644)) == -1) ffc0d0c0: 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; ffc0d0c4: 56 f7 ba 7e rlwinm r23,r23,23,9,31 <== NOT EXECUTED if ((out_fd = creat(fname, 0644)) == -1) ffc0d0c8: 7c 7b 1b 78 mr r27,r3 <== NOT EXECUTED ffc0d0cc: 3b 40 00 00 li r26,0 <== NOT EXECUTED ffc0d0d0: 3b 20 00 00 li r25,0 <== NOT EXECUTED ffc0d0d4: 40 be 00 4c bne+ cr7,ffc0d120 <== NOT EXECUTED ffc0d0d8: 48 00 00 08 b ffc0d0e0 <== NOT EXECUTED { for (i=0; i <== NOT EXECUTED *****************************************************************/ nblocks = (((size) + 511) & ~511) / 512; if ((out_fd = creat(fname, 0644)) == -1) { for (i=0; i <== NOT EXECUTED ffc0d0f8: 4b ff fe 90 b ffc0cf88 <== NOT EXECUTED } else { for (i=0; i <== NOT EXECUTED n = MIN(n, size - i*512); write(out_fd, bufr, n); ffc0d100: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc0d104: 7f 83 f0 40 cmplw cr7,r3,r30 <== NOT EXECUTED } else { for (i=0; i <== NOT EXECUTED ffc0d114: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED ffc0d118: 48 00 26 49 bl ffc0f760 <== 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); ffc0d138: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc0d13c: 4b ff 75 11 bl ffc0464c <== NOT EXECUTED ffc0d140: 4b ff fe 48 b ffc0cf88 <== NOT EXECUTED } } else if (linkflag == DIRTYPE) ffc0d144: 2f 80 00 35 cmpwi cr7,r0,53 <== NOT EXECUTED ffc0d148: 40 9e fe 40 bne+ cr7,ffc0cf88 <== NOT EXECUTED { mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO); ffc0d14c: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc0d150: 38 80 01 ff li r4,511 <== NOT EXECUTED ffc0d154: 4b ff 85 21 bl ffc05674 <== NOT EXECUTED ffc0d158: 4b ff fe 30 b ffc0cf88 <== NOT EXECUTED ffc0d15c: 3b c0 00 00 li r30,0 <== NOT EXECUTED } } free(bufr); ffc0d160: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0d164: 4b ff 7b 7d bl ffc04ce0 <== NOT EXECUTED close(fd); ffc0d168: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc0d16c: 4b ff 74 e1 bl ffc0464c <== NOT EXECUTED return(retval); } ffc0d170: 80 01 01 1c lwz r0,284(r1) <== NOT EXECUTED ffc0d174: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc0d178: 82 21 00 dc lwz r17,220(r1) <== NOT EXECUTED ffc0d17c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0d180: 82 41 00 e0 lwz r18,224(r1) <== NOT EXECUTED ffc0d184: 82 61 00 e4 lwz r19,228(r1) <== NOT EXECUTED ffc0d188: 82 81 00 e8 lwz r20,232(r1) <== NOT EXECUTED ffc0d18c: 82 a1 00 ec lwz r21,236(r1) <== NOT EXECUTED ffc0d190: 82 c1 00 f0 lwz r22,240(r1) <== NOT EXECUTED ffc0d194: 82 e1 00 f4 lwz r23,244(r1) <== NOT EXECUTED ffc0d198: 83 01 00 f8 lwz r24,248(r1) <== NOT EXECUTED ffc0d19c: 83 21 00 fc lwz r25,252(r1) <== NOT EXECUTED ffc0d1a0: 83 41 01 00 lwz r26,256(r1) <== NOT EXECUTED ffc0d1a4: 83 61 01 04 lwz r27,260(r1) <== NOT EXECUTED ffc0d1a8: 83 81 01 08 lwz r28,264(r1) <== NOT EXECUTED ffc0d1ac: 83 a1 01 0c lwz r29,268(r1) <== NOT EXECUTED ffc0d1b0: 83 c1 01 10 lwz r30,272(r1) <== NOT EXECUTED ffc0d1b4: 83 e1 01 14 lwz r31,276(r1) <== NOT EXECUTED ffc0d1b8: 38 21 01 18 addi r1,r1,280 <== NOT EXECUTED ffc0d1bc: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0d1c0 : int Untar_FromMemory( void *tar_buf, size_t size ) { ffc0d1c0: 94 21 fe e8 stwu r1,-280(r1) ffc0d1c4: 7c 08 02 a6 mflr r0 ffc0d1c8: 92 21 00 dc stw r17,220(r1) } /* Read the header */ bufr = &tar_ptr[ptr]; ptr += 512; if (strncmp(&bufr[257], "ustar ", 7)) ffc0d1cc: 3e 20 ff c2 lis r17,-62 ffc0d1d0: 3a 31 4a a0 addi r17,r17,19104 int Untar_FromMemory( void *tar_buf, size_t size ) { ffc0d1d4: 92 41 00 e0 stw r18,224(r1) symlink(linkname, fname); } else if (linkflag == REGTYPE) { nblocks = (((file_size) + 511) & ~511) / 512; if ((fp = fopen(fname, "w")) == NULL) ffc0d1d8: 3e 40 ff c2 lis r18,-62 ffc0d1dc: 3a 52 4a a8 addi r18,r18,19112 int Untar_FromMemory( void *tar_buf, size_t size ) { ffc0d1e0: 92 61 00 e4 stw r19,228(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); ffc0d1e4: 3e 60 ff c2 lis r19,-62 ffc0d1e8: 3a 73 4a aa addi r19,r19,19114 int Untar_FromMemory( void *tar_buf, size_t size ) { ffc0d1ec: 92 81 00 e8 stw r20,232(r1) { len = ((sizeToGo < 512L)?(sizeToGo):(512L)); n = fwrite(&tar_ptr[ptr], 1, len, fp); if (n != len) { printk("untar: Error during write\n"); ffc0d1f0: 3e 80 ff c2 lis r20,-62 ffc0d1f4: 3a 94 4a cb addi r20,r20,19147 int Untar_FromMemory( void *tar_buf, size_t size ) { ffc0d1f8: 92 01 00 d8 stw r16,216(r1) ffc0d1fc: 7c 90 23 78 mr r16,r4 ffc0d200: 92 a1 00 ec stw r21,236(r1) * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); linkname[MAX_NAME_FIELD_SIZE] = '\0'; ffc0d204: 3a a0 00 00 li r21,0 int Untar_FromMemory( void *tar_buf, size_t size ) { ffc0d208: 93 01 00 f8 stw r24,248(r1) ffc0d20c: 7c 78 1b 78 mr r24,r3 ffc0d210: 93 21 00 fc stw r25,252(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); ffc0d214: 3b 21 00 6c addi r25,r1,108 int Untar_FromMemory( void *tar_buf, size_t size ) { ffc0d218: 93 81 01 08 stw r28,264(r1) FILE *fp; const char *tar_ptr = (const char *)tar_buf; ffc0d21c: 3b 80 00 00 li r28,0 int Untar_FromMemory( void *tar_buf, size_t size ) { ffc0d220: 93 c1 01 10 stw r30,272(r1) { retval = UNTAR_SUCCESSFUL; break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); ffc0d224: 3b c1 00 08 addi r30,r1,8 int Untar_FromMemory( void *tar_buf, size_t size ) { ffc0d228: 90 01 01 1c stw r0,284(r1) ffc0d22c: 92 c1 00 f0 stw r22,240(r1) ffc0d230: 92 e1 00 f4 stw r23,244(r1) ffc0d234: 93 41 01 00 stw r26,256(r1) ffc0d238: 93 61 01 04 stw r27,260(r1) ffc0d23c: 93 a1 01 0c stw r29,268(r1) ffc0d240: 93 e1 01 14 stw r31,276(r1) ffc0d244: 48 00 00 08 b ffc0d24c FILE *fp; const char *tar_ptr = (const char *)tar_buf; ffc0d248: 7f fc fb 78 mr r28,r31 ptr = 0; while (1) { if (ptr + 512 > size) ffc0d24c: 3b fc 02 00 addi r31,r28,512 ffc0d250: 7f 9f 80 40 cmplw cr7,r31,r16 ffc0d254: 41 9d 01 d4 bgt- cr7,ffc0d428 <== NEVER TAKEN retval = UNTAR_SUCCESSFUL; break; } /* Read the header */ bufr = &tar_ptr[ptr]; ffc0d258: 7f 98 e2 14 add r28,r24,r28 ptr += 512; if (strncmp(&bufr[257], "ustar ", 7)) ffc0d25c: 38 7c 01 01 addi r3,r28,257 ffc0d260: 7e 24 8b 78 mr r4,r17 ffc0d264: 38 a0 00 07 li r5,7 ffc0d268: 48 00 9a 31 bl ffc16c98 ffc0d26c: 7c 7d 1b 79 mr. r29,r3 ffc0d270: 40 82 01 b8 bne- ffc0d428 { retval = UNTAR_SUCCESSFUL; break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); ffc0d274: 7f c3 f3 78 mr r3,r30 ffc0d278: 7f 84 e3 78 mr r4,r28 ffc0d27c: 38 a0 00 63 li r5,99 ffc0d280: 48 00 9b 55 bl ffc16dd4 * UNTAR_INVALID_CHECKSUM for an invalid header checksum. * * UNTAR_INVALID_HEADER for an invalid header. * * * **************************************************************************/ int Untar_FromMemory( ffc0d284: 39 00 00 0c li r8,12 retval = UNTAR_SUCCESSFUL; break; } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); fname[MAX_NAME_FIELD_SIZE] = '\0'; ffc0d288: 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( ffc0d28c: 7d 09 03 a6 mtctr r8 } strncpy(fname, bufr, MAX_NAME_FIELD_SIZE); fname[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = bufr[156]; ffc0d290: 7f 89 e3 78 mr r9,r28 ffc0d294: 88 1c 00 9c lbz r0,156(r28) * UNTAR_INVALID_CHECKSUM for an invalid header checksum. * * UNTAR_INVALID_HEADER for an invalid header. * * * **************************************************************************/ int Untar_FromMemory( ffc0d298: 7f 8b e3 78 mr r11,r28 ffc0d29c: 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')) ffc0d2a0: 89 4b 00 7c lbz r10,124(r11) { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); ffc0d2a4: 57 a8 18 38 rlwinm r8,r29,3,0,28 ffc0d2a8: 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')) ffc0d2ac: 39 4a ff d0 addi r10,r10,-48 ffc0d2b0: 55 47 06 3e clrlwi r7,r10,24 ffc0d2b4: 2b 87 00 09 cmplwi cr7,r7,9 ffc0d2b8: 41 9d 00 08 bgt- cr7,ffc0d2c0 { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); ffc0d2bc: 7f aa 42 14 add r29,r10,r8 { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) ffc0d2c0: 42 00 ff e0 bdnz+ ffc0d2a0 * UNTAR_INVALID_CHECKSUM for an invalid header checksum. * * UNTAR_INVALID_HEADER for an invalid header. * * * **************************************************************************/ int Untar_FromMemory( ffc0d2c4: 39 60 00 08 li r11,8 ffc0d2c8: 7d 69 03 a6 mtctr r11 ffc0d2cc: 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')) ffc0d2d0: 89 69 00 94 lbz r11,148(r9) { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); ffc0d2d4: 55 48 18 38 rlwinm r8,r10,3,0,28 ffc0d2d8: 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')) ffc0d2dc: 39 6b ff d0 addi r11,r11,-48 ffc0d2e0: 55 67 06 3e clrlwi r7,r11,24 ffc0d2e4: 2b 87 00 09 cmplwi cr7,r7,9 ffc0d2e8: 41 9d 00 08 bgt- cr7,ffc0d2f0 { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); ffc0d2ec: 7d 4b 42 14 add r10,r11,r8 { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) ffc0d2f0: 42 00 ff e0 bdnz+ ffc0d2d0 ffc0d2f4: 39 00 02 00 li r8,512 ffc0d2f8: 7d 09 03 a6 mtctr r8 ffc0d2fc: 39 20 00 00 li r9,0 ffc0d300: 39 60 00 00 li r11,0 int i, sum; sum = 0; for (i=0; i<512; i++) { if ((i >= 148) && (i < 156)) ffc0d304: 39 0b ff 6c addi r8,r11,-148 ffc0d308: 2b 88 00 07 cmplwi cr7,r8,7 ffc0d30c: 41 9d 00 0c bgt- cr7,ffc0d318 sum += 0xff & ' '; ffc0d310: 39 29 00 20 addi r9,r9,32 ffc0d314: 48 00 00 0c b ffc0d320 else sum += 0xff & bufr[i]; ffc0d318: 7d 1c 58 ae lbzx r8,r28,r11 ffc0d31c: 7d 29 42 14 add r9,r9,r8 ) { int i, sum; sum = 0; for (i=0; i<512; i++) ffc0d320: 39 6b 00 01 addi r11,r11,1 ffc0d324: 42 00 ff e0 bdnz+ ffc0d304 * 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) ffc0d328: 7f 89 50 00 cmpw cr7,r9,r10 ffc0d32c: 41 be 00 0c beq+ cr7,ffc0d338 <== ALWAYS TAKEN ffc0d330: 38 60 00 02 li r3,2 <== NOT EXECUTED ffc0d334: 48 00 00 f8 b ffc0d42c <== NOT EXECUTED /****************************************************************** * We've decoded the header, now figure out what it contains and * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) ffc0d338: 2f 80 00 32 cmpwi cr7,r0,50 ffc0d33c: 40 be 00 28 bne+ cr7,ffc0d364 { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); ffc0d340: 38 9c 00 9d addi r4,r28,157 ffc0d344: 7f 23 cb 78 mr r3,r25 ffc0d348: 38 a0 00 63 li r5,99 ffc0d34c: 48 00 9a 89 bl ffc16dd4 linkname[MAX_NAME_FIELD_SIZE] = '\0'; symlink(linkname, fname); ffc0d350: 7f 23 cb 78 mr r3,r25 ffc0d354: 7f c4 f3 78 mr r4,r30 * do something with it. *****************************************************************/ if (linkflag == SYMTYPE) { strncpy(linkname, &bufr[157], MAX_NAME_FIELD_SIZE); linkname[MAX_NAME_FIELD_SIZE] = '\0'; ffc0d358: 9a a1 00 cf stb r21,207(r1) symlink(linkname, fname); ffc0d35c: 48 00 22 99 bl ffc0f5f4 ffc0d360: 4b ff fe e8 b ffc0d248 } else if (linkflag == REGTYPE) ffc0d364: 2f 80 00 30 cmpwi cr7,r0,48 ffc0d368: 40 be 00 a8 bne+ cr7,ffc0d410 { nblocks = (((file_size) + 511) & ~511) / 512; if ((fp = fopen(fname, "w")) == NULL) ffc0d36c: 7f c3 f3 78 mr r3,r30 ffc0d370: 7e 44 93 78 mr r4,r18 ffc0d374: 48 00 7a 69 bl ffc14ddc linkname[MAX_NAME_FIELD_SIZE] = '\0'; symlink(linkname, fname); } else if (linkflag == REGTYPE) { nblocks = (((file_size) + 511) & ~511) / 512; ffc0d378: 3a dd 01 ff addi r22,r29,511 if ((fp = fopen(fname, "w")) == NULL) ffc0d37c: 7c 77 1b 79 mr. r23,r3 linkname[MAX_NAME_FIELD_SIZE] = '\0'; symlink(linkname, fname); } else if (linkflag == REGTYPE) { nblocks = (((file_size) + 511) & ~511) / 512; ffc0d380: 56 d6 ba 7e rlwinm r22,r22,23,9,31 if ((fp = fopen(fname, "w")) == NULL) ffc0d384: 41 82 00 10 beq- ffc0d394 <== NEVER TAKEN ffc0d388: 7f 58 fa 14 add r26,r24,r31 ffc0d38c: 3b 60 00 00 li r27,0 ffc0d390: 48 00 00 50 b ffc0d3e0 { printk("Untar: failed to create file %s\n", fname); ffc0d394: 7e 63 9b 78 mr r3,r19 <== NOT EXECUTED ffc0d398: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ptr += 512 * nblocks; ffc0d39c: 56 d6 48 2c rlwinm r22,r22,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); ffc0d3a0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc0d3a4: 4b ff 8e c9 bl ffc0626c <== NOT EXECUTED ptr += 512 * nblocks; ffc0d3a8: 7f ff b2 14 add r31,r31,r22 <== NOT EXECUTED ffc0d3ac: 4b ff fe 9c b ffc0d248 <== NOT EXECUTED * 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 ffc0d3b4: 3b 80 02 00 li r28,512 <== NOT EXECUTED n = fwrite(&tar_ptr[ptr], 1, len, fp); ffc0d3b8: 7f 85 e3 78 mr r5,r28 ffc0d3bc: 48 00 84 09 bl ffc157c4 { printk("untar: Error during write\n"); break; } ptr += 512; sizeToGo -= n; ffc0d3c0: 7f bc e8 50 subf r29,r28,r29 **************************************************************/ for (i=0; i <== ALWAYS TAKEN { printk("untar: Error during write\n"); ffc0d3cc: 7e 83 a3 78 mr r3,r20 <== NOT EXECUTED ffc0d3d0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc0d3d4: 4b ff 8e 99 bl ffc0626c <== NOT EXECUTED break; ffc0d3d8: 48 00 00 2c b ffc0d404 <== NOT EXECUTED } ptr += 512; ffc0d3dc: 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 break; } ptr += 512; sizeToGo -= n; } fclose(fp); ffc0d404: 7e e3 bb 78 mr r3,r23 ffc0d408: 48 00 70 99 bl ffc144a0 ffc0d40c: 4b ff fe 3c b ffc0d248 } } else if (linkflag == DIRTYPE) ffc0d410: 2f 80 00 35 cmpwi cr7,r0,53 ffc0d414: 40 9e fe 34 bne+ cr7,ffc0d248 <== NEVER TAKEN { mkdir(fname, S_IRWXU | S_IRWXG | S_IRWXO); ffc0d418: 7f c3 f3 78 mr r3,r30 ffc0d41c: 38 80 01 ff li r4,511 ffc0d420: 4b ff 82 55 bl ffc05674 ffc0d424: 4b ff fe 24 b ffc0d248 ffc0d428: 38 60 00 00 li r3,0 } } return(retval); } ffc0d42c: 80 01 01 1c lwz r0,284(r1) ffc0d430: 82 01 00 d8 lwz r16,216(r1) ffc0d434: 7c 08 03 a6 mtlr r0 ffc0d438: 82 21 00 dc lwz r17,220(r1) ffc0d43c: 82 41 00 e0 lwz r18,224(r1) ffc0d440: 82 61 00 e4 lwz r19,228(r1) ffc0d444: 82 81 00 e8 lwz r20,232(r1) ffc0d448: 82 a1 00 ec lwz r21,236(r1) ffc0d44c: 82 c1 00 f0 lwz r22,240(r1) ffc0d450: 82 e1 00 f4 lwz r23,244(r1) ffc0d454: 83 01 00 f8 lwz r24,248(r1) ffc0d458: 83 21 00 fc lwz r25,252(r1) ffc0d45c: 83 41 01 00 lwz r26,256(r1) ffc0d460: 83 61 01 04 lwz r27,260(r1) ffc0d464: 83 81 01 08 lwz r28,264(r1) ffc0d468: 83 a1 01 0c lwz r29,268(r1) ffc0d46c: 83 c1 01 10 lwz r30,272(r1) ffc0d470: 83 e1 01 14 lwz r31,276(r1) ffc0d474: 38 21 01 18 addi r1,r1,280 ffc0d478: 4e 80 00 20 blr =============================================================================== ffc0b798 <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { ffc0b798: 94 21 ff e0 stwu r1,-32(r1) ffc0b79c: 7c 08 02 a6 mflr r0 ISR_Level level; Thread_Control *executing = _Thread_Executing; ffc0b7a0: 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 ) { ffc0b7a4: 90 01 00 24 stw r0,36(r1) ffc0b7a8: 93 41 00 08 stw r26,8(r1) ffc0b7ac: 7c da 33 78 mr r26,r6 ffc0b7b0: 93 81 00 10 stw r28,16(r1) ffc0b7b4: 7c 7c 1b 78 mr r28,r3 ffc0b7b8: 93 a1 00 14 stw r29,20(r1) ffc0b7bc: 7c bd 2b 78 mr r29,r5 ffc0b7c0: 93 c1 00 18 stw r30,24(r1) ffc0b7c4: 7c 9e 23 78 mr r30,r4 ffc0b7c8: 93 e1 00 1c stw r31,28(r1) ffc0b7cc: 93 61 00 0c stw r27,12(r1) ISR_Level level; Thread_Control *executing = _Thread_Executing; ffc0b7d0: 83 e9 27 fc lwz r31,10236(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b7d4: 7f 60 00 a6 mfmsr r27 ffc0b7d8: 7c 10 42 a6 mfsprg r0,0 ffc0b7dc: 7f 60 00 78 andc r0,r27,r0 ffc0b7e0: 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 ) { ffc0b7e4: 80 03 00 44 lwz r0,68(r3) ffc0b7e8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b7ec: 41 9e 00 10 beq- cr7,ffc0b7fc <_CORE_RWLock_Obtain_for_reading+0x64> ffc0b7f0: 2f 80 00 01 cmpwi cr7,r0,1 ffc0b7f4: 40 be 00 44 bne+ cr7,ffc0b838 <_CORE_RWLock_Obtain_for_reading+0xa0> ffc0b7f8: 48 00 00 1c b ffc0b814 <_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; ffc0b7fc: 81 23 00 48 lwz r9,72(r3) ffc0b800: 38 09 00 01 addi r0,r9,1 ffc0b804: 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; ffc0b808: 38 00 00 01 li r0,1 ffc0b80c: 90 03 00 44 stw r0,68(r3) the_rwlock->number_of_readers += 1; _ISR_Enable( level ); ffc0b810: 48 00 00 1c b ffc0b82c <_CORE_RWLock_Obtain_for_reading+0x94> 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 ); ffc0b814: 48 00 23 f1 bl ffc0dc04 <_Thread_queue_First> if ( !waiter ) { ffc0b818: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b81c: 40 be 00 1c bne+ cr7,ffc0b838 <_CORE_RWLock_Obtain_for_reading+0xa0><== NEVER TAKEN the_rwlock->number_of_readers += 1; ffc0b820: 81 3c 00 48 lwz r9,72(r28) ffc0b824: 38 09 00 01 addi r0,r9,1 ffc0b828: 90 1c 00 48 stw r0,72(r28) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0b82c: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; ffc0b830: 38 00 00 00 li r0,0 ffc0b834: 48 00 00 14 b ffc0b848 <_CORE_RWLock_Obtain_for_reading+0xb0> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { ffc0b838: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0b83c: 40 9e 00 14 bne- cr7,ffc0b850 <_CORE_RWLock_Obtain_for_reading+0xb8> ffc0b840: 7f 60 01 24 mtmsr r27 _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; ffc0b844: 38 00 00 02 li r0,2 ffc0b848: 90 1f 00 34 stw r0,52(r31) return; ffc0b84c: 48 00 00 38 b ffc0b884 <_CORE_RWLock_Obtain_for_reading+0xec> */ _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; ffc0b850: 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; ffc0b854: 93 df 00 20 stw r30,32(r31) ffc0b858: 39 20 00 01 li r9,1 executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; ffc0b85c: 90 1f 00 34 stw r0,52(r31) ffc0b860: 91 3c 00 30 stw r9,48(r28) /* * 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; ffc0b864: 93 9f 00 44 stw r28,68(r31) executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; ffc0b868: 90 1f 00 30 stw r0,48(r31) ffc0b86c: 7f 60 01 24 mtmsr r27 executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( ffc0b870: 3c a0 ff c1 lis r5,-63 ffc0b874: 7f 83 e3 78 mr r3,r28 ffc0b878: 7f 44 d3 78 mr r4,r26 ffc0b87c: 38 a5 ba 50 addi r5,r5,-17840 ffc0b880: 48 00 1f 89 bl ffc0d808 <_Thread_queue_Enqueue_with_handler> timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } ffc0b884: 80 01 00 24 lwz r0,36(r1) ffc0b888: 83 41 00 08 lwz r26,8(r1) ffc0b88c: 7c 08 03 a6 mtlr r0 ffc0b890: 83 61 00 0c lwz r27,12(r1) ffc0b894: 83 81 00 10 lwz r28,16(r1) ffc0b898: 83 a1 00 14 lwz r29,20(r1) ffc0b89c: 83 c1 00 18 lwz r30,24(r1) ffc0b8a0: 83 e1 00 1c lwz r31,28(r1) ffc0b8a4: 38 21 00 20 addi r1,r1,32 ffc0b8a8: 4e 80 00 20 blr =============================================================================== ffc0b948 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { ffc0b948: 94 21 ff f0 stwu r1,-16(r1) ffc0b94c: 7c 08 02 a6 mflr r0 ISR_Level level; Thread_Control *executing = _Thread_Executing; ffc0b950: 3d 20 00 00 lis r9,0 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { ffc0b954: 90 01 00 14 stw r0,20(r1) ffc0b958: 93 e1 00 0c stw r31,12(r1) ffc0b95c: 7c 7f 1b 78 mr r31,r3 ISR_Level level; Thread_Control *executing = _Thread_Executing; ffc0b960: 81 29 27 fc lwz r9,10236(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b964: 7c 00 00 a6 mfmsr r0 ffc0b968: 7d 70 42 a6 mfsprg r11,0 ffc0b96c: 7c 0b 58 78 andc r11,r0,r11 ffc0b970: 7d 60 01 24 mtmsr r11 * 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){ ffc0b974: 81 63 00 44 lwz r11,68(r3) ffc0b978: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0b97c: 40 be 00 14 bne+ cr7,ffc0b990 <_CORE_RWLock_Release+0x48> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0b980: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; ffc0b984: 38 00 00 02 li r0,2 ffc0b988: 90 09 00 34 stw r0,52(r9) return CORE_RWLOCK_SUCCESSFUL; ffc0b98c: 48 00 00 ac b ffc0ba38 <_CORE_RWLock_Release+0xf0> } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { ffc0b990: 2f 8b 00 01 cmpwi cr7,r11,1 ffc0b994: 40 9e 00 20 bne- cr7,ffc0b9b4 <_CORE_RWLock_Release+0x6c> the_rwlock->number_of_readers -= 1; ffc0b998: 81 63 00 48 lwz r11,72(r3) ffc0b99c: 39 6b ff ff addi r11,r11,-1 if ( the_rwlock->number_of_readers != 0 ) { ffc0b9a0: 2f 8b 00 00 cmpwi cr7,r11,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; ffc0b9a4: 91 63 00 48 stw r11,72(r3) if ( the_rwlock->number_of_readers != 0 ) { ffc0b9a8: 41 be 00 0c beq+ cr7,ffc0b9b4 <_CORE_RWLock_Release+0x6c> ffc0b9ac: 7c 00 01 24 mtmsr r0 /* must be unlocked again */ _ISR_Enable( level ); return CORE_RWLOCK_SUCCESSFUL; ffc0b9b0: 48 00 00 88 b ffc0ba38 <_CORE_RWLock_Release+0xf0> } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; ffc0b9b4: 39 60 00 00 li r11,0 ffc0b9b8: 91 69 00 34 stw r11,52(r9) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; ffc0b9bc: 91 7f 00 44 stw r11,68(r31) ffc0b9c0: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); ffc0b9c4: 7f e3 fb 78 mr r3,r31 ffc0b9c8: 48 00 1c 85 bl ffc0d64c <_Thread_queue_Dequeue> if ( next ) { ffc0b9cc: 2c 03 00 00 cmpwi r3,0 ffc0b9d0: 41 82 00 68 beq- ffc0ba38 <_CORE_RWLock_Release+0xf0> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { ffc0b9d4: 80 03 00 30 lwz r0,48(r3) ffc0b9d8: 2f 80 00 01 cmpwi cr7,r0,1 ffc0b9dc: 40 be 00 10 bne+ cr7,ffc0b9ec <_CORE_RWLock_Release+0xa4> the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; ffc0b9e0: 38 00 00 02 li r0,2 ffc0b9e4: 90 1f 00 44 stw r0,68(r31) return CORE_RWLOCK_SUCCESSFUL; ffc0b9e8: 48 00 00 50 b ffc0ba38 <_CORE_RWLock_Release+0xf0> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; ffc0b9ec: 81 3f 00 48 lwz r9,72(r31) ffc0b9f0: 38 09 00 01 addi r0,r9,1 ffc0b9f4: 90 1f 00 48 stw r0,72(r31) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; ffc0b9f8: 38 00 00 01 li r0,1 ffc0b9fc: 90 1f 00 44 stw r0,68(r31) /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); ffc0ba00: 7f e3 fb 78 mr r3,r31 ffc0ba04: 48 00 22 01 bl ffc0dc04 <_Thread_queue_First> if ( !next || ffc0ba08: 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 ); ffc0ba0c: 7f e3 fb 78 mr r3,r31 ffc0ba10: 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 || ffc0ba14: 41 82 00 24 beq- ffc0ba38 <_CORE_RWLock_Release+0xf0> next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) ffc0ba18: 80 09 00 30 lwz r0,48(r9) ffc0ba1c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ba20: 41 9e 00 18 beq- cr7,ffc0ba38 <_CORE_RWLock_Release+0xf0><== NEVER TAKEN return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; ffc0ba24: 81 3f 00 48 lwz r9,72(r31) ffc0ba28: 38 09 00 01 addi r0,r9,1 ffc0ba2c: 90 1f 00 48 stw r0,72(r31) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); ffc0ba30: 48 00 20 5d bl ffc0da8c <_Thread_queue_Extract> } ffc0ba34: 4b ff ff cc b ffc0ba00 <_CORE_RWLock_Release+0xb8> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } ffc0ba38: 80 01 00 14 lwz r0,20(r1) ffc0ba3c: 38 60 00 00 li r3,0 ffc0ba40: 83 e1 00 0c lwz r31,12(r1) ffc0ba44: 38 21 00 10 addi r1,r1,16 ffc0ba48: 7c 08 03 a6 mtlr r0 ffc0ba4c: 4e 80 00 20 blr =============================================================================== ffc0ba50 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { ffc0ba50: 94 21 ff e8 stwu r1,-24(r1) ffc0ba54: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0ba58: 38 81 00 08 addi r4,r1,8 void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { ffc0ba5c: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0ba60: 48 00 17 c9 bl ffc0d228 <_Thread_Get> switch ( location ) { ffc0ba64: 80 01 00 08 lwz r0,8(r1) ffc0ba68: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ba6c: 40 9e 00 18 bne- cr7,ffc0ba84 <_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 ); ffc0ba70: 48 00 22 b9 bl ffc0dd28 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0ba74: 3d 20 00 00 lis r9,0 ffc0ba78: 81 69 27 bc lwz r11,10172(r9) ffc0ba7c: 38 0b ff ff addi r0,r11,-1 ffc0ba80: 90 09 27 bc stw r0,10172(r9) _Thread_Unnest_dispatch(); break; } } ffc0ba84: 80 01 00 1c lwz r0,28(r1) ffc0ba88: 38 21 00 18 addi r1,r1,24 ffc0ba8c: 7c 08 03 a6 mtlr r0 ffc0ba90: 4e 80 00 20 blr =============================================================================== ffc1aa10 <_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 ) { ffc1aa10: 94 21 ff e0 stwu r1,-32(r1) ffc1aa14: 7c 08 02 a6 mflr r0 ffc1aa18: 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 ) { ffc1aa1c: 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 ) { ffc1aa20: 93 61 00 0c stw r27,12(r1) ffc1aa24: 7d 1b 43 78 mr r27,r8 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { ffc1aa28: 7f 85 00 40 cmplw cr7,r5,r0 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { ffc1aa2c: 93 a1 00 14 stw r29,20(r1) ffc1aa30: 7c 9d 23 78 mr r29,r4 ffc1aa34: 93 c1 00 18 stw r30,24(r1) ffc1aa38: 7c be 2b 78 mr r30,r5 ffc1aa3c: 93 e1 00 1c stw r31,28(r1) ffc1aa40: 7c 7f 1b 78 mr r31,r3 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { ffc1aa44: 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 ) { ffc1aa48: 93 41 00 08 stw r26,8(r1) ffc1aa4c: 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 ) { ffc1aa50: 41 9d 00 54 bgt- cr7,ffc1aaa4 <_CORE_message_queue_Broadcast+0x94><== 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 ) { ffc1aa54: 80 1f 00 48 lwz r0,72(r31) * 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))) { ffc1aa58: 3b 80 00 00 li r28,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 ) { ffc1aa5c: 2f 80 00 00 cmpwi cr7,r0,0 ffc1aa60: 41 be 00 28 beq+ cr7,ffc1aa88 <_CORE_message_queue_Broadcast+0x78> *count = 0; ffc1aa64: 38 00 00 00 li r0,0 ffc1aa68: 90 08 00 00 stw r0,0(r8) ffc1aa6c: 38 60 00 00 li r3,0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; ffc1aa70: 48 00 00 34 b ffc1aaa4 <_CORE_message_queue_Broadcast+0x94> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); ffc1aa74: 80 7a 00 2c lwz r3,44(r26) */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; ffc1aa78: 3b 9c 00 01 addi r28,r28,1 ffc1aa7c: 48 00 ac 39 bl ffc256b4 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; ffc1aa80: 81 3a 00 28 lwz r9,40(r26) ffc1aa84: 93 c9 00 00 stw r30,0(r9) * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { ffc1aa88: 7f e3 fb 78 mr r3,r31 ffc1aa8c: 48 00 2e 31 bl ffc1d8bc <_Thread_queue_Dequeue> ffc1aa90: 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 = ffc1aa94: 7c 7a 1b 79 mr. r26,r3 ffc1aa98: 7f c5 f3 78 mr r5,r30 ffc1aa9c: 40 82 ff d8 bne+ ffc1aa74 <_CORE_message_queue_Broadcast+0x64> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; ffc1aaa0: 93 9b 00 00 stw r28,0(r27) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } ffc1aaa4: 80 01 00 24 lwz r0,36(r1) ffc1aaa8: 83 41 00 08 lwz r26,8(r1) ffc1aaac: 7c 08 03 a6 mtlr r0 ffc1aab0: 83 61 00 0c lwz r27,12(r1) ffc1aab4: 83 81 00 10 lwz r28,16(r1) ffc1aab8: 83 a1 00 14 lwz r29,20(r1) ffc1aabc: 83 c1 00 18 lwz r30,24(r1) ffc1aac0: 83 e1 00 1c lwz r31,28(r1) ffc1aac4: 38 21 00 20 addi r1,r1,32 ffc1aac8: 4e 80 00 20 blr =============================================================================== ffc12fac <_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 ) { ffc12fac: 94 21 ff e0 stwu r1,-32(r1) ffc12fb0: 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)) { ffc12fb4: 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 ) { ffc12fb8: 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)) { ffc12fbc: 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; ffc12fc0: 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 ) { ffc12fc4: 93 c1 00 18 stw r30,24(r1) ffc12fc8: 7c 9e 23 78 mr r30,r4 ffc12fcc: 93 e1 00 1c stw r31,28(r1) ffc12fd0: 7c 7f 1b 78 mr r31,r3 ffc12fd4: 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; ffc12fd8: 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; ffc12fdc: 90 a3 00 44 stw r5,68(r3) the_message_queue->number_of_pending_messages = 0; ffc12fe0: 90 03 00 48 stw r0,72(r3) the_message_queue->maximum_message_size = maximum_message_size; ffc12fe4: 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; ffc12fe8: 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)) { ffc12fec: 41 82 00 14 beq- ffc13000 <_CORE_message_queue_Initialize+0x54> allocated_message_size += sizeof(uint32_t); ffc12ff0: 39 26 00 04 addi r9,r6,4 allocated_message_size &= ~(sizeof(uint32_t) - 1); ffc12ff4: 55 29 00 3a rlwinm r9,r9,0,0,29 } if (allocated_message_size < maximum_message_size) ffc12ff8: 7f 89 30 40 cmplw cr7,r9,r6 ffc12ffc: 41 bc 00 7c blt+ cr7,ffc13078 <_CORE_message_queue_Initialize+0xcc><== NEVER TAKEN /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); ffc13000: 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 * ffc13004: 7c 7d 29 d6 mullw r3,r29,r5 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) ffc13008: 7f 83 48 40 cmplw cr7,r3,r9 ffc1300c: 41 bc 00 6c blt+ cr7,ffc13078 <_CORE_message_queue_Initialize+0xcc><== NEVER TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) ffc13010: 90 a1 00 08 stw r5,8(r1) ffc13014: 48 00 37 6d bl ffc16780 <_Workspace_Allocate> _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) ffc13018: 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 *) ffc1301c: 7c 64 1b 78 mr r4,r3 ffc13020: 90 7f 00 5c stw r3,92(r31) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) ffc13024: 80 a1 00 08 lwz r5,8(r1) ffc13028: 41 9e 00 50 beq- cr7,ffc13078 <_CORE_message_queue_Initialize+0xcc> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( ffc1302c: 7f a6 eb 78 mr r6,r29 ffc13030: 38 7f 00 68 addi r3,r31,104 ffc13034: 48 00 5f 31 bl ffc18f64 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( ffc13038: 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); ffc1303c: 39 3f 00 54 addi r9,r31,84 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc13040: 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); ffc13044: 91 3f 00 50 stw r9,80(r31) ffc13048: 68 84 00 01 xori r4,r4,1 the_chain->permanent_null = NULL; ffc1304c: 39 20 00 00 li r9,0 the_chain->last = _Chain_Head(the_chain); ffc13050: 90 1f 00 58 stw r0,88(r31) ffc13054: 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; ffc13058: 91 3f 00 54 stw r9,84(r31) ffc1305c: 7f e3 fb 78 mr r3,r31 ffc13060: 54 84 d9 7e rlwinm r4,r4,27,5,31 ffc13064: 38 a0 00 80 li r5,128 ffc13068: 38 c0 00 06 li r6,6 ffc1306c: 48 00 27 91 bl ffc157fc <_Thread_queue_Initialize> ffc13070: 38 60 00 01 li r3,1 THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; ffc13074: 48 00 00 08 b ffc1307c <_CORE_message_queue_Initialize+0xd0> ffc13078: 38 60 00 00 li r3,0 } ffc1307c: 80 01 00 24 lwz r0,36(r1) ffc13080: 83 a1 00 14 lwz r29,20(r1) ffc13084: 7c 08 03 a6 mtlr r0 ffc13088: 83 c1 00 18 lwz r30,24(r1) ffc1308c: 83 e1 00 1c lwz r31,28(r1) ffc13090: 38 21 00 20 addi r1,r1,32 ffc13094: 4e 80 00 20 blr =============================================================================== ffc13098 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { ffc13098: 94 21 ff e8 stwu r1,-24(r1) ffc1309c: 7c 08 02 a6 mflr r0 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; ffc130a0: 3d 20 00 00 lis r9,0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { ffc130a4: 90 01 00 1c stw r0,28(r1) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; ffc130a8: 38 00 00 00 li r0,0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { ffc130ac: 7c 8b 23 78 mr r11,r4 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; ffc130b0: 81 29 28 70 lwz r9,10352(r9) void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { ffc130b4: 93 e1 00 14 stw r31,20(r1) ffc130b8: 7c 7f 1b 78 mr r31,r3 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; ffc130bc: 90 09 00 34 stw r0,52(r9) void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { ffc130c0: 7c a0 2b 78 mr r0,r5 ffc130c4: 93 a1 00 0c stw r29,12(r1) ffc130c8: 93 c1 00 10 stw r30,16(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc130cc: 7d 40 00 a6 mfmsr r10 ffc130d0: 7c b0 42 a6 mfsprg r5,0 ffc130d4: 7d 45 28 78 andc r5,r10,r5 ffc130d8: 7c a0 01 24 mtmsr r5 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc130dc: 83 c3 00 50 lwz r30,80(r3) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc130e0: 38 a3 00 54 addi r5,r3,84 ffc130e4: 7f 9e 28 00 cmpw cr7,r30,r5 ffc130e8: 41 9e 00 a4 beq- cr7,ffc1318c <_CORE_message_queue_Seize+0xf4> executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { ffc130ec: 2f 9e 00 00 cmpwi cr7,r30,0 { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; ffc130f0: 80 9e 00 00 lwz r4,0(r30) the_chain->first = new_first; ffc130f4: 7c 65 1b 78 mr r5,r3 ffc130f8: 94 85 00 50 stwu r4,80(r5) new_first->previous = _Chain_Head(the_chain); ffc130fc: 90 a4 00 04 stw r5,4(r4) ffc13100: 41 9e 00 8c beq- cr7,ffc1318c <_CORE_message_queue_Seize+0xf4><== NEVER TAKEN the_message_queue->number_of_pending_messages -= 1; ffc13104: 81 23 00 48 lwz r9,72(r3) ffc13108: 39 29 ff ff addi r9,r9,-1 ffc1310c: 91 23 00 48 stw r9,72(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc13110: 7d 40 01 24 mtmsr r10 _ISR_Enable( level ); *size_p = the_message->Contents.size; ffc13114: 80 be 00 0c lwz r5,12(r30) _Thread_Executing->Wait.count = ffc13118: 3d 20 00 00 lis r9,0 ffc1311c: 81 29 28 70 lwz r9,10352(r9) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, ffc13120: 3b be 00 10 addi r29,r30,16 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; ffc13124: 90 a6 00 00 stw r5,0(r6) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); ffc13128: 7c 03 03 78 mr r3,r0 ffc1312c: 7f a4 eb 78 mr r4,r29 _Thread_Executing->Wait.count = ffc13130: 81 7e 00 08 lwz r11,8(r30) ffc13134: 91 69 00 24 stw r11,36(r9) ffc13138: 48 00 9c e9 bl ffc1ce20 * is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); ffc1313c: 7f e3 fb 78 mr r3,r31 ffc13140: 48 00 21 ed bl ffc1532c <_Thread_queue_Dequeue> if ( !the_thread ) { ffc13144: 7c 69 1b 79 mr. r9,r3 ffc13148: 40 a2 00 14 bne+ ffc1315c <_CORE_message_queue_Seize+0xc4> RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); ffc1314c: 38 7f 00 68 addi r3,r31,104 ffc13150: 7f c4 f3 78 mr r4,r30 ffc13154: 4b ff fd 95 bl ffc12ee8 <_Chain_Append> _CORE_message_queue_Free_message_buffer( the_message_queue, the_message ); return; ffc13158: 48 00 00 7c b ffc131d4 <_CORE_message_queue_Seize+0x13c> */ _CORE_message_queue_Set_message_priority( the_message, the_thread->Wait.count ); the_message->Contents.size = (size_t) the_thread->Wait.option; ffc1315c: 80 a9 00 30 lwz r5,48(r9) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); ffc13160: 7f a3 eb 78 mr r3,r29 CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; ffc13164: 80 09 00 24 lwz r0,36(r9) ffc13168: 90 be 00 0c stw r5,12(r30) ffc1316c: 90 1e 00 08 stw r0,8(r30) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); ffc13170: 80 89 00 2c lwz r4,44(r9) ffc13174: 48 00 9c ad bl ffc1ce20 the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( ffc13178: 80 be 00 08 lwz r5,8(r30) ffc1317c: 7f e3 fb 78 mr r3,r31 ffc13180: 7f c4 f3 78 mr r4,r30 ffc13184: 48 00 5e 1d bl ffc18fa0 <_CORE_message_queue_Insert_message> the_message_queue, the_message, _CORE_message_queue_Get_message_priority( the_message ) ); return; ffc13188: 48 00 00 4c b ffc131d4 <_CORE_message_queue_Seize+0x13c> } #endif } if ( !wait ) { ffc1318c: 2f 87 00 00 cmpwi cr7,r7,0 ffc13190: 40 9e 00 14 bne- cr7,ffc131a4 <_CORE_message_queue_Seize+0x10c> ffc13194: 7d 40 01 24 mtmsr r10 _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; ffc13198: 38 00 00 04 li r0,4 ffc1319c: 90 09 00 34 stw r0,52(r9) return; ffc131a0: 48 00 00 34 b ffc131d4 <_CORE_message_queue_Seize+0x13c> 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; ffc131a4: 38 e0 00 01 li r7,1 _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; ffc131a8: 90 c9 00 28 stw r6,40(r9) ffc131ac: 90 ff 00 30 stw r7,48(r31) return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; ffc131b0: 91 69 00 20 stw r11,32(r9) executing->Wait.return_argument_second.mutable_object = buffer; ffc131b4: 90 09 00 2c stw r0,44(r9) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; ffc131b8: 93 e9 00 44 stw r31,68(r9) ffc131bc: 7d 40 01 24 mtmsr r10 executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); ffc131c0: 3c a0 ff c1 lis r5,-63 ffc131c4: 7f e3 fb 78 mr r3,r31 ffc131c8: 7d 04 43 78 mr r4,r8 ffc131cc: 38 a5 58 e0 addi r5,r5,22752 ffc131d0: 48 00 23 19 bl ffc154e8 <_Thread_queue_Enqueue_with_handler> } ffc131d4: 80 01 00 1c lwz r0,28(r1) ffc131d8: 83 a1 00 0c lwz r29,12(r1) ffc131dc: 7c 08 03 a6 mtlr r0 ffc131e0: 83 c1 00 10 lwz r30,16(r1) ffc131e4: 83 e1 00 14 lwz r31,20(r1) ffc131e8: 38 21 00 18 addi r1,r1,24 ffc131ec: 4e 80 00 20 blr =============================================================================== ffc0ab64 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc0ab64: 94 21 ff e0 stwu r1,-32(r1) ffc0ab68: 7c 08 02 a6 mflr r0 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc0ab6c: 3d 20 00 00 lis r9,0 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc0ab70: 90 01 00 24 stw r0,36(r1) _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc0ab74: 80 09 27 90 lwz r0,10128(r9) Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc0ab78: 93 81 00 10 stw r28,16(r1) ffc0ab7c: 7c dc 33 78 mr r28,r6 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc0ab80: 2f 80 00 00 cmpwi cr7,r0,0 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc0ab84: 93 a1 00 14 stw r29,20(r1) ffc0ab88: 7c bd 2b 78 mr r29,r5 ffc0ab8c: 93 c1 00 18 stw r30,24(r1) ffc0ab90: 7c 9e 23 78 mr r30,r4 ffc0ab94: 93 e1 00 1c stw r31,28(r1) ffc0ab98: 7c 7f 1b 78 mr r31,r3 ffc0ab9c: 90 e1 00 08 stw r7,8(r1) _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc0aba0: 41 9e 00 2c beq- cr7,ffc0abcc <_CORE_mutex_Seize+0x68> ffc0aba4: 2f 85 00 00 cmpwi cr7,r5,0 ffc0aba8: 41 9e 00 24 beq- cr7,ffc0abcc <_CORE_mutex_Seize+0x68> <== NEVER TAKEN ffc0abac: 3d 20 00 00 lis r9,0 ffc0abb0: 80 09 27 f4 lwz r0,10228(r9) ffc0abb4: 2b 80 00 01 cmplwi cr7,r0,1 ffc0abb8: 40 bd 00 14 ble+ cr7,ffc0abcc <_CORE_mutex_Seize+0x68> ffc0abbc: 38 60 00 00 li r3,0 ffc0abc0: 38 80 00 00 li r4,0 ffc0abc4: 38 a0 00 13 li r5,19 ffc0abc8: 48 00 07 65 bl ffc0b32c <_Internal_error_Occurred> ffc0abcc: 7f e3 fb 78 mr r3,r31 ffc0abd0: 38 81 00 08 addi r4,r1,8 ffc0abd4: 48 00 9d fd bl ffc149d0 <_CORE_mutex_Seize_interrupt_trylock> ffc0abd8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0abdc: 41 9e 00 60 beq- cr7,ffc0ac3c <_CORE_mutex_Seize+0xd8> ffc0abe0: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0abe4: 3d 60 00 00 lis r11,0 ffc0abe8: 40 9e 00 1c bne- cr7,ffc0ac04 <_CORE_mutex_Seize+0xa0> ffc0abec: 80 01 00 08 lwz r0,8(r1) ffc0abf0: 7c 00 01 24 mtmsr r0 ffc0abf4: 81 2b 27 d0 lwz r9,10192(r11) ffc0abf8: 38 00 00 01 li r0,1 ffc0abfc: 90 09 00 34 stw r0,52(r9) ffc0ac00: 48 00 00 3c b ffc0ac3c <_CORE_mutex_Seize+0xd8> ffc0ac04: 3d 20 00 00 lis r9,0 ffc0ac08: 81 6b 27 d0 lwz r11,10192(r11) ffc0ac0c: 81 49 27 90 lwz r10,10128(r9) ffc0ac10: 93 cb 00 20 stw r30,32(r11) ffc0ac14: 38 0a 00 01 addi r0,r10,1 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; ffc0ac18: 39 40 00 01 li r10,1 ffc0ac1c: 93 eb 00 44 stw r31,68(r11) ffc0ac20: 91 5f 00 30 stw r10,48(r31) ffc0ac24: 90 09 27 90 stw r0,10128(r9) ffc0ac28: 80 01 00 08 lwz r0,8(r1) ffc0ac2c: 7c 00 01 24 mtmsr r0 ffc0ac30: 7f e3 fb 78 mr r3,r31 ffc0ac34: 7f 84 e3 78 mr r4,r28 ffc0ac38: 4b ff fe a5 bl ffc0aadc <_CORE_mutex_Seize_interrupt_blocking> } ffc0ac3c: 80 01 00 24 lwz r0,36(r1) ffc0ac40: 83 81 00 10 lwz r28,16(r1) ffc0ac44: 7c 08 03 a6 mtlr r0 ffc0ac48: 83 a1 00 14 lwz r29,20(r1) ffc0ac4c: 83 c1 00 18 lwz r30,24(r1) ffc0ac50: 83 e1 00 1c lwz r31,28(r1) ffc0ac54: 38 21 00 20 addi r1,r1,32 ffc0ac58: 4e 80 00 20 blr =============================================================================== ffc0ae1c <_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 ) { ffc0ae1c: 94 21 ff f0 stwu r1,-16(r1) ffc0ae20: 7c 08 02 a6 mflr r0 ffc0ae24: 93 e1 00 0c stw r31,12(r1) ffc0ae28: 7c 7f 1b 78 mr r31,r3 ffc0ae2c: 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)) ) { ffc0ae30: 48 00 1b 31 bl ffc0c960 <_Thread_queue_Dequeue> ffc0ae34: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ae38: 38 60 00 00 li r3,0 ffc0ae3c: 40 be 00 38 bne+ cr7,ffc0ae74 <_CORE_semaphore_Surrender+0x58> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0ae40: 7c 00 00 a6 mfmsr r0 ffc0ae44: 7d 30 42 a6 mfsprg r9,0 ffc0ae48: 7c 09 48 78 andc r9,r0,r9 ffc0ae4c: 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 ) ffc0ae50: 81 3f 00 48 lwz r9,72(r31) ffc0ae54: 38 60 00 04 li r3,4 ffc0ae58: 81 7f 00 40 lwz r11,64(r31) ffc0ae5c: 7f 89 58 40 cmplw cr7,r9,r11 ffc0ae60: 40 9c 00 10 bge- cr7,ffc0ae70 <_CORE_semaphore_Surrender+0x54><== NEVER TAKEN the_semaphore->count += 1; ffc0ae64: 39 29 00 01 addi r9,r9,1 ffc0ae68: 91 3f 00 48 stw r9,72(r31) ffc0ae6c: 38 60 00 00 li r3,0 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0ae70: 7c 00 01 24 mtmsr r0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc0ae74: 80 01 00 14 lwz r0,20(r1) ffc0ae78: 83 e1 00 0c lwz r31,12(r1) ffc0ae7c: 38 21 00 10 addi r1,r1,16 ffc0ae80: 7c 08 03 a6 mtlr r0 ffc0ae84: 4e 80 00 20 blr =============================================================================== ffc0941c <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { ffc0941c: 94 21 ff f0 stwu r1,-16(r1) ffc09420: 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; ffc09424: 3d 20 00 00 lis r9,0 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { ffc09428: 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; ffc0942c: 83 e9 27 d0 lwz r31,10192(r9) rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { ffc09430: 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; ffc09434: 38 00 00 00 li r0,0 ffc09438: 90 1f 00 34 stw r0,52(r31) api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc0943c: 81 5f 01 44 lwz r10,324(r31) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc09440: 7d 20 00 a6 mfmsr r9 ffc09444: 7c 10 42 a6 mfsprg r0,0 ffc09448: 7d 20 00 78 andc r0,r9,r0 ffc0944c: 7c 00 01 24 mtmsr r0 _ISR_Disable( level ); pending_events = api->pending_events; ffc09450: 81 6a 00 00 lwz r11,0(r10) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && ffc09454: 7c 60 58 39 and. r0,r3,r11 ffc09458: 41 82 00 24 beq- ffc0947c <_Event_Seize+0x60> ffc0945c: 7f 80 18 00 cmpw cr7,r0,r3 ffc09460: 41 9e 00 0c beq- cr7,ffc0946c <_Event_Seize+0x50> ffc09464: 70 88 00 02 andi. r8,r4,2 ffc09468: 41 a2 00 14 beq+ ffc0947c <_Event_Seize+0x60> <== NEVER TAKEN (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = ffc0946c: 7d 6b 00 78 andc r11,r11,r0 ffc09470: 91 6a 00 00 stw r11,0(r10) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09474: 7d 20 01 24 mtmsr r9 ffc09478: 48 00 00 18 b ffc09490 <_Event_Seize+0x74> _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { ffc0947c: 70 8b 00 01 andi. r11,r4,1 ffc09480: 41 a2 00 18 beq+ ffc09498 <_Event_Seize+0x7c> ffc09484: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); executing->Wait.return_code = RTEMS_UNSATISFIED; ffc09488: 39 20 00 0d li r9,13 ffc0948c: 91 3f 00 34 stw r9,52(r31) *event_out = seized_events; ffc09490: 90 06 00 00 stw r0,0(r6) return; ffc09494: 48 00 00 a0 b ffc09534 <_Event_Seize+0x118> */ 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; ffc09498: 38 00 00 01 li r0,1 * 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; ffc0949c: 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; ffc094a0: 3d 60 00 00 lis r11,0 ffc094a4: 90 0b 28 04 stw r0,10244(r11) * * 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; ffc094a8: 90 7f 00 24 stw r3,36(r31) executing->Wait.return_argument = event_out; ffc094ac: 90 df 00 28 stw r6,40(r31) ffc094b0: 7d 20 01 24 mtmsr r9 _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { ffc094b4: 2f 85 00 00 cmpwi cr7,r5,0 ffc094b8: 41 be 00 38 beq+ cr7,ffc094f0 <_Event_Seize+0xd4> _Watchdog_Initialize( ffc094bc: 81 3f 00 08 lwz r9,8(r31) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc094c0: 3d 60 ff c1 lis r11,-63 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc094c4: 38 00 00 00 li r0,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc094c8: 90 bf 00 54 stw r5,84(r31) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc094cc: 39 6b 97 04 addi r11,r11,-26876 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc094d0: 3c 60 00 00 lis r3,0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc094d4: 91 7f 00 64 stw r11,100(r31) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc094d8: 38 63 2e 08 addi r3,r3,11784 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc094dc: 91 3f 00 68 stw r9,104(r31) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc094e0: 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; ffc094e4: 90 1f 00 6c stw r0,108(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc094e8: 90 1f 00 50 stw r0,80(r31) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc094ec: 48 00 44 f9 bl ffc0d9e4 <_Watchdog_Insert> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); ffc094f0: 7f e3 fb 78 mr r3,r31 ffc094f4: 38 80 01 00 li r4,256 ffc094f8: 48 00 3a bd bl ffc0cfb4 <_Thread_Set_state> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc094fc: 7c a0 00 a6 mfmsr r5 ffc09500: 7c 10 42 a6 mfsprg r0,0 ffc09504: 7c a0 00 78 andc r0,r5,r0 ffc09508: 7c 00 01 24 mtmsr r0 _ISR_Disable( level ); sync_state = _Event_Sync_state; ffc0950c: 3d 20 00 00 lis r9,0 ffc09510: 80 69 28 04 lwz r3,10244(r9) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc09514: 38 00 00 00 li r0,0 ffc09518: 90 09 28 04 stw r0,10244(r9) if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { ffc0951c: 2f 83 00 01 cmpwi cr7,r3,1 ffc09520: 40 be 00 0c bne+ cr7,ffc0952c <_Event_Seize+0x110> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09524: 7c a0 01 24 mtmsr r5 ffc09528: 48 00 00 0c b ffc09534 <_Event_Seize+0x118> * 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 ); ffc0952c: 7f e4 fb 78 mr r4,r31 ffc09530: 48 00 28 fd bl ffc0be2c <_Thread_blocking_operation_Cancel> } ffc09534: 80 01 00 14 lwz r0,20(r1) ffc09538: 83 e1 00 0c lwz r31,12(r1) ffc0953c: 38 21 00 10 addi r1,r1,16 ffc09540: 7c 08 03 a6 mtlr r0 ffc09544: 4e 80 00 20 blr =============================================================================== ffc095bc <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { ffc095bc: 94 21 ff f0 stwu r1,-16(r1) ffc095c0: 7c 08 02 a6 mflr r0 ffc095c4: 90 01 00 14 stw r0,20(r1) ffc095c8: 93 e1 00 0c stw r31,12(r1) ffc095cc: 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 ]; ffc095d0: 81 03 01 44 lwz r8,324(r3) option_set = (rtems_option) the_thread->Wait.option; ffc095d4: 80 e3 00 30 lwz r7,48(r3) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc095d8: 7c 00 00 a6 mfmsr r0 ffc095dc: 7d 30 42 a6 mfsprg r9,0 ffc095e0: 7c 09 48 78 andc r9,r0,r9 ffc095e4: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); pending_events = api->pending_events; ffc095e8: 81 68 00 00 lwz r11,0(r8) event_condition = (rtems_event_set) the_thread->Wait.count; ffc095ec: 81 43 00 24 lwz r10,36(r3) seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { ffc095f0: 7d 49 58 39 and. r9,r10,r11 ffc095f4: 40 a2 00 08 bne+ ffc095fc <_Event_Surrender+0x40> _ISR_Enable( level ); ffc095f8: 48 00 00 f4 b ffc096ec <_Event_Surrender+0x130> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && ffc095fc: 3c c0 00 00 lis r6,0 ffc09600: 80 c6 27 b8 lwz r6,10168(r6) ffc09604: 2f 86 00 00 cmpwi cr7,r6,0 ffc09608: 41 9e 00 68 beq- cr7,ffc09670 <_Event_Surrender+0xb4> ffc0960c: 3c c0 00 00 lis r6,0 ffc09610: 80 c6 27 d0 lwz r6,10192(r6) ffc09614: 7f 83 30 00 cmpw cr7,r3,r6 ffc09618: 40 be 00 58 bne+ cr7,ffc09670 <_Event_Surrender+0xb4> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || ffc0961c: 3c c0 00 00 lis r6,0 ffc09620: 80 a6 28 04 lwz r5,10244(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() && ffc09624: 2f 85 00 02 cmpwi cr7,r5,2 ffc09628: 41 9e 00 10 beq- cr7,ffc09638 <_Event_Surrender+0x7c> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { ffc0962c: 80 c6 28 04 lwz r6,10244(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() && ffc09630: 2f 86 00 01 cmpwi cr7,r6,1 ffc09634: 40 be 00 3c bne+ cr7,ffc09670 <_Event_Surrender+0xb4> _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) ) { ffc09638: 7f 89 50 00 cmpw cr7,r9,r10 ffc0963c: 41 9e 00 0c beq- cr7,ffc09648 <_Event_Surrender+0x8c> ffc09640: 70 e5 00 02 andi. r5,r7,2 ffc09644: 41 82 00 28 beq- ffc0966c <_Event_Surrender+0xb0> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); ffc09648: 7d 6b 48 78 andc r11,r11,r9 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc0964c: 81 5f 00 28 lwz r10,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 ); ffc09650: 91 68 00 00 stw r11,0(r8) the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; ffc09654: 3d 60 00 00 lis r11,0 ffc09658: 39 00 00 03 li r8,3 ffc0965c: 91 0b 28 04 stw r8,10244(r11) _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; ffc09660: 39 60 00 00 li r11,0 ffc09664: 91 7f 00 24 stw r11,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc09668: 91 2a 00 00 stw r9,0(r10) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; } _ISR_Enable( level ); ffc0966c: 48 00 00 80 b ffc096ec <_Event_Surrender+0x130> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { ffc09670: 80 df 00 10 lwz r6,16(r31) ffc09674: 70 c5 01 00 andi. r5,r6,256 ffc09678: 41 82 00 74 beq- ffc096ec <_Event_Surrender+0x130> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { ffc0967c: 7f 89 50 00 cmpw cr7,r9,r10 ffc09680: 41 9e 00 0c beq- cr7,ffc0968c <_Event_Surrender+0xd0> ffc09684: 70 ea 00 02 andi. r10,r7,2 ffc09688: 41 82 00 64 beq- ffc096ec <_Event_Surrender+0x130> <== 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; ffc0968c: 81 5f 00 28 lwz r10,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 ); ffc09690: 7d 6b 48 78 andc r11,r11,r9 ffc09694: 91 68 00 00 stw r11,0(r8) the_thread->Wait.count = 0; ffc09698: 39 60 00 00 li r11,0 ffc0969c: 91 7f 00 24 stw r11,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc096a0: 91 2a 00 00 stw r9,0(r10) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc096a4: 7d 20 00 a6 mfmsr r9 ffc096a8: 7c 00 01 24 mtmsr r0 ffc096ac: 7d 20 01 24 mtmsr r9 _ISR_Flash( level ); if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc096b0: 81 3f 00 50 lwz r9,80(r31) ffc096b4: 2f 89 00 02 cmpwi cr7,r9,2 ffc096b8: 41 9e 00 0c beq- cr7,ffc096c4 <_Event_Surrender+0x108> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc096bc: 7c 00 01 24 mtmsr r0 ffc096c0: 48 00 00 18 b ffc096d8 <_Event_Surrender+0x11c> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; ffc096c4: 39 20 00 03 li r9,3 ffc096c8: 91 3f 00 50 stw r9,80(r31) ffc096cc: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); ffc096d0: 38 7f 00 48 addi r3,r31,72 ffc096d4: 48 00 44 69 bl ffc0db3c <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc096d8: 3c 80 10 03 lis r4,4099 ffc096dc: 7f e3 fb 78 mr r3,r31 ffc096e0: 60 84 ff f8 ori r4,r4,65528 ffc096e4: 48 00 29 55 bl ffc0c038 <_Thread_Clear_state> ffc096e8: 48 00 00 08 b ffc096f0 <_Event_Surrender+0x134> ffc096ec: 7c 00 01 24 mtmsr r0 } return; } } _ISR_Enable( level ); } ffc096f0: 80 01 00 14 lwz r0,20(r1) ffc096f4: 83 e1 00 0c lwz r31,12(r1) ffc096f8: 38 21 00 10 addi r1,r1,16 ffc096fc: 7c 08 03 a6 mtlr r0 ffc09700: 4e 80 00 20 blr =============================================================================== ffc09704 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { ffc09704: 94 21 ff e8 stwu r1,-24(r1) ffc09708: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc0970c: 38 81 00 08 addi r4,r1,8 void _Event_Timeout( Objects_Id id, void *ignored ) { ffc09710: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc09714: 48 00 2e 29 bl ffc0c53c <_Thread_Get> switch ( location ) { ffc09718: 80 01 00 08 lwz r0,8(r1) ffc0971c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09720: 40 9e 00 68 bne- cr7,ffc09788 <_Event_Timeout+0x84> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc09724: 7d 60 00 a6 mfmsr r11 ffc09728: 7d 30 42 a6 mfsprg r9,0 ffc0972c: 7d 69 48 78 andc r9,r11,r9 ffc09730: 7d 20 01 24 mtmsr r9 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { ffc09734: 3d 20 00 00 lis r9,0 _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; ffc09738: 90 03 00 24 stw r0,36(r3) if ( _Thread_Is_executing( the_thread ) ) { ffc0973c: 81 29 27 d0 lwz r9,10192(r9) ffc09740: 7f 83 48 00 cmpw cr7,r3,r9 ffc09744: 40 be 00 1c bne+ cr7,ffc09760 <_Event_Timeout+0x5c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) ffc09748: 3d 20 00 00 lis r9,0 ffc0974c: 80 09 28 04 lwz r0,10244(r9) ffc09750: 2f 80 00 01 cmpwi cr7,r0,1 ffc09754: 40 be 00 0c bne+ cr7,ffc09760 <_Event_Timeout+0x5c> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ffc09758: 38 00 00 02 li r0,2 ffc0975c: 90 09 28 04 stw r0,10244(r9) } the_thread->Wait.return_code = RTEMS_TIMEOUT; ffc09760: 38 00 00 06 li r0,6 ffc09764: 90 03 00 34 stw r0,52(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09768: 7d 60 01 24 mtmsr r11 ffc0976c: 3c 80 10 03 lis r4,4099 ffc09770: 60 84 ff f8 ori r4,r4,65528 ffc09774: 48 00 28 c5 bl ffc0c038 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc09778: 3d 20 00 00 lis r9,0 ffc0977c: 81 69 27 90 lwz r11,10128(r9) ffc09780: 38 0b ff ff addi r0,r11,-1 ffc09784: 90 09 27 90 stw r0,10128(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc09788: 80 01 00 1c lwz r0,28(r1) ffc0978c: 38 21 00 18 addi r1,r1,24 ffc09790: 7c 08 03 a6 mtlr r0 ffc09794: 4e 80 00 20 blr =============================================================================== ffc14bb4 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc14bb4: 94 21 ff d8 stwu r1,-40(r1) ffc14bb8: 7c 08 02 a6 mflr r0 ffc14bbc: 7d 80 00 26 mfcr r12 ffc14bc0: 7c 89 23 78 mr r9,r4 ffc14bc4: 90 01 00 2c stw r0,44(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; ffc14bc8: 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 ) { ffc14bcc: 7f 80 20 40 cmplw cr7,r0,r4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { ffc14bd0: 93 c1 00 20 stw r30,32(r1) ffc14bd4: 7c 7e 1b 78 mr r30,r3 ffc14bd8: 93 41 00 10 stw r26,16(r1) ffc14bdc: 93 61 00 14 stw r27,20(r1) ffc14be0: 93 81 00 18 stw r28,24(r1) ffc14be4: 93 a1 00 1c stw r29,28(r1) ffc14be8: 93 e1 00 24 stw r31,36(r1) ffc14bec: 91 81 00 0c stw r12,12(r1) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc14bf0: 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; ffc14bf4: 81 43 00 10 lwz r10,16(r3) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { ffc14bf8: 41 9c 01 48 blt- cr7,ffc14d40 <_Heap_Allocate_aligned_with_boundary+0x18c> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { ffc14bfc: 2f 86 00 00 cmpwi cr7,r6,0 ffc14c00: 41 be 00 18 beq+ cr7,ffc14c18 <_Heap_Allocate_aligned_with_boundary+0x64> if ( boundary < alloc_size ) { ffc14c04: 7f 86 48 40 cmplw cr7,r6,r9 ffc14c08: 41 9c 01 38 blt- cr7,ffc14d40 <_Heap_Allocate_aligned_with_boundary+0x18c> return NULL; } if ( alignment == 0 ) { ffc14c0c: 2f 85 00 00 cmpwi cr7,r5,0 ffc14c10: 40 9e 00 08 bne- cr7,ffc14c18 <_Heap_Allocate_aligned_with_boundary+0x64> ffc14c14: 7d 45 53 78 mr r5,r10 ffc14c18: 3b a0 00 00 li r29,0 * 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 ) { ffc14c1c: 2f 05 00 00 cmpwi cr6,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; ffc14c20: 3b 8a 00 07 addi r28,r10,7 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; ffc14c24: 21 89 00 04 subfic r12,r9,4 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { ffc14c28: 2f 86 00 00 cmpwi cr7,r6,0 ffc14c2c: 48 00 00 d0 b ffc14cfc <_Heap_Allocate_aligned_with_boundary+0x148> /* * 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 ) { ffc14c30: 81 64 00 04 lwz r11,4(r4) while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; ffc14c34: 3b bd 00 01 addi r29,r29,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 ) { ffc14c38: 7c 8b 00 40 cmplw cr1,r11,r0 ffc14c3c: 40 85 00 bc ble- cr1,ffc14cf8 <_Heap_Allocate_aligned_with_boundary+0x144> ffc14c40: 38 e4 00 08 addi r7,r4,8 if ( alignment == 0 ) { ffc14c44: 40 9a 00 0c bne- cr6,ffc14c50 <_Heap_Allocate_aligned_with_boundary+0x9c> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc14c48: 7c ff 3b 78 mr r31,r7 ffc14c4c: 48 00 00 a4 b ffc14cf0 <_Heap_Allocate_aligned_with_boundary+0x13c> 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; ffc14c50: 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; ffc14c54: 80 7e 00 14 lwz r3,20(r30) 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; ffc14c58: 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; ffc14c5c: 7f ec 5a 14 add r31,r12,r11 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc14c60: 7f ff 2b 96 divwu r31,r31,r5 ffc14c64: 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; ffc14c68: 7d 03 e0 50 subf r8,r3,r28 ffc14c6c: 7d 68 5a 14 add r11,r8,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 ) { ffc14c70: 7c 9f 58 40 cmplw cr1,r31,r11 ffc14c74: 40 85 00 0c ble- cr1,ffc14c80 <_Heap_Allocate_aligned_with_boundary+0xcc> ffc14c78: 7f eb 2b 96 divwu r31,r11,r5 ffc14c7c: 7f ff 29 d6 mullw r31,r31,r5 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { ffc14c80: 41 9e 00 48 beq- cr7,ffc14cc8 <_Heap_Allocate_aligned_with_boundary+0x114> /* 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; ffc14c84: 7d 1f 4a 14 add r8,r31,r9 ffc14c88: 7d 68 33 96 divwu r11,r8,r6 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; ffc14c8c: 7f 67 4a 14 add r27,r7,r9 ffc14c90: 7d 6b 31 d6 mullw r11,r11,r6 ffc14c94: 48 00 00 1c b ffc14cb0 <_Heap_Allocate_aligned_with_boundary+0xfc> uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { ffc14c98: 41 80 00 60 blt- ffc14cf8 <_Heap_Allocate_aligned_with_boundary+0x144> ffc14c9c: 7f fa 2b 96 divwu r31,r26,r5 ffc14ca0: 7f ff 29 d6 mullw r31,r31,r5 return 0; } alloc_begin = boundary_line - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; ffc14ca4: 7d 1f 4a 14 add r8,r31,r9 ffc14ca8: 7d 68 33 96 divwu r11,r8,r6 ffc14cac: 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 ) { ffc14cb0: 7e 1f 58 40 cmplw cr4,r31,r11 if ( boundary_line < boundary_floor ) { return 0; } alloc_begin = boundary_line - alloc_size; ffc14cb4: 7f 49 58 50 subf r26,r9,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 ) { ffc14cb8: 7c 8b 40 40 cmplw cr1,r11,r8 if ( boundary_line < boundary_floor ) { ffc14cbc: 7c 0b d8 40 cmplw r11,r27 /* 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 ) { ffc14cc0: 40 90 00 08 bge- cr4,ffc14cc8 <_Heap_Allocate_aligned_with_boundary+0x114> ffc14cc4: 41 84 ff d4 blt+ cr1,ffc14c98 <_Heap_Allocate_aligned_with_boundary+0xe4> 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 ) { ffc14cc8: 7c 9f 38 40 cmplw cr1,r31,r7 ffc14ccc: 41 84 00 2c blt- cr1,ffc14cf8 <_Heap_Allocate_aligned_with_boundary+0x144> 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; ffc14cd0: 7d 7f 53 96 divwu r11,r31,r10 ffc14cd4: 7d 6b 51 d6 mullw r11,r11,r10 ffc14cd8: 21 04 ff f8 subfic r8,r4,-8 ffc14cdc: 7d 68 5a 14 add r11,r8,r11 if ( free_size >= min_block_size || free_size == 0 ) { ffc14ce0: 7c 8b 18 40 cmplw cr1,r11,r3 ffc14ce4: 40 84 00 0c bge- cr1,ffc14cf0 <_Heap_Allocate_aligned_with_boundary+0x13c> ffc14ce8: 2c 8b 00 00 cmpwi cr1,r11,0 ffc14cec: 40 86 00 0c bne- cr1,ffc14cf8 <_Heap_Allocate_aligned_with_boundary+0x144> boundary ); } } if ( alloc_begin != 0 ) { ffc14cf0: 2c 9f 00 00 cmpwi cr1,r31,0 ffc14cf4: 40 86 00 18 bne- cr1,ffc14d0c <_Heap_Allocate_aligned_with_boundary+0x158><== ALWAYS TAKEN break; } block = block->next; ffc14cf8: 80 84 00 08 lwz r4,8(r4) if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { ffc14cfc: 7c 84 f0 00 cmpw cr1,r4,r30 ffc14d00: 40 86 ff 30 bne+ cr1,ffc14c30 <_Heap_Allocate_aligned_with_boundary+0x7c> ffc14d04: 3b e0 00 00 li r31,0 ffc14d08: 48 00 00 20 b ffc14d28 <_Heap_Allocate_aligned_with_boundary+0x174> block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; ffc14d0c: 80 1e 00 4c lwz r0,76(r30) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc14d10: 7d 26 4b 78 mr r6,r9 ffc14d14: 7f c3 f3 78 mr r3,r30 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; ffc14d18: 7c 00 ea 14 add r0,r0,r29 ffc14d1c: 90 1e 00 4c stw r0,76(r30) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); ffc14d20: 7f e5 fb 78 mr r5,r31 ffc14d24: 4b ff 64 91 bl ffc0b1b4 <_Heap_Block_allocate> uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; ffc14d28: 80 1e 00 44 lwz r0,68(r30) ffc14d2c: 7f 80 e8 40 cmplw cr7,r0,r29 ffc14d30: 40 9c 00 08 bge- cr7,ffc14d38 <_Heap_Allocate_aligned_with_boundary+0x184> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; ffc14d34: 93 be 00 44 stw r29,68(r30) } return (void *) alloc_begin; ffc14d38: 7f e3 fb 78 mr r3,r31 ffc14d3c: 48 00 00 08 b ffc14d44 <_Heap_Allocate_aligned_with_boundary+0x190> ffc14d40: 38 60 00 00 li r3,0 } ffc14d44: 80 01 00 2c lwz r0,44(r1) ffc14d48: 81 81 00 0c lwz r12,12(r1) ffc14d4c: 7c 08 03 a6 mtlr r0 ffc14d50: 83 41 00 10 lwz r26,16(r1) ffc14d54: 83 61 00 14 lwz r27,20(r1) ffc14d58: 7d 80 81 20 mtcrf 8,r12 ffc14d5c: 83 81 00 18 lwz r28,24(r1) ffc14d60: 83 a1 00 1c lwz r29,28(r1) ffc14d64: 83 c1 00 20 lwz r30,32(r1) ffc14d68: 83 e1 00 24 lwz r31,36(r1) ffc14d6c: 38 21 00 28 addi r1,r1,40 ffc14d70: 4e 80 00 20 blr =============================================================================== ffc13560 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { ffc13560: 7c 08 02 a6 mflr r0 ffc13564: 94 21 ff f8 stwu r1,-8(r1) ffc13568: 7c 69 1b 78 mr r9,r3 ffc1356c: 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; ffc13570: 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; ffc13574: 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; ffc13578: 7f 84 00 40 cmplw cr7,r4,r0 uintptr_t const heap_area_end = heap->area_end; ffc1357c: 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; ffc13580: 41 bc 00 10 blt+ cr7,ffc13590 <_Heap_Extend+0x30> * 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 ) { ffc13584: 7f 84 00 40 cmplw cr7,r4,r0 ffc13588: 38 60 00 01 li r3,1 ffc1358c: 41 9c 00 9c blt- cr7,ffc13628 <_Heap_Extend+0xc8> return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { ffc13590: 7f 84 00 00 cmpw cr7,r4,r0 ffc13594: 38 60 00 02 li r3,2 ffc13598: 40 be 00 90 bne+ cr7,ffc13628 <_Heap_Extend+0xc8> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc1359c: 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; ffc135a0: 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 ffc135a4: 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; ffc135a8: 90 89 00 1c stw r4,28(r9) extend_size = new_heap_area_end ffc135ac: 7c 00 22 14 add r0,r0,r4 ffc135b0: 7c 00 5b 96 divwu r0,r0,r11 ffc135b4: 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 ) { ffc135b8: 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; ffc135bc: 90 06 00 00 stw r0,0(r6) if( extend_size >= heap->min_block_size ) { ffc135c0: 81 69 00 14 lwz r11,20(r9) ffc135c4: 7f 80 58 40 cmplw cr7,r0,r11 ffc135c8: 41 bc 00 60 blt+ cr7,ffc13628 <_Heap_Extend+0xc8> <== NEVER TAKEN uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; ffc135cc: 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); ffc135d0: 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 = ffc135d4: 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 )); ffc135d8: 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; ffc135dc: 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; ffc135e0: 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 = ffc135e4: 7d 0b 40 50 subf r8,r11,r8 ffc135e8: 7c 07 3b 78 or r7,r0,r7 ffc135ec: 61 08 00 01 ori r8,r8,1 ffc135f0: 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 )); ffc135f4: 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 = ffc135f8: 91 0b 00 04 stw r8,4(r11) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ffc135fc: 80 e9 00 2c lwz r7,44(r9) ++stats->used_blocks; ffc13600: 81 09 00 40 lwz r8,64(r9) --stats->frees; /* Do not count subsequent call as actual free() */ ffc13604: 81 49 00 50 lwz r10,80(r9) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ffc13608: 7c 07 02 14 add r0,r7,r0 ++stats->used_blocks; ffc1360c: 39 08 00 01 addi r8,r8,1 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ffc13610: 90 09 00 2c stw r0,44(r9) ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ ffc13614: 39 4a ff ff addi r10,r10,-1 heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ++stats->used_blocks; ffc13618: 91 09 00 40 stw r8,64(r9) --stats->frees; /* Do not count subsequent call as actual free() */ ffc1361c: 91 49 00 50 stw r10,80(r9) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); ffc13620: 4b ff 99 75 bl ffc0cf94 <_Heap_Free> ffc13624: 38 60 00 00 li r3,0 } return HEAP_EXTEND_SUCCESSFUL; } ffc13628: 80 01 00 0c lwz r0,12(r1) ffc1362c: 38 21 00 08 addi r1,r1,8 ffc13630: 7c 08 03 a6 mtlr r0 ffc13634: 4e 80 00 20 blr =============================================================================== ffc14d74 <_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 ) ffc14d74: 81 63 00 10 lwz r11,16(r3) #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { ffc14d78: 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; ffc14d7c: 80 03 00 20 lwz r0,32(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 ffc14d80: 39 40 00 00 li r10,0 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 ) ffc14d84: 7c 84 5b 96 divwu r4,r4,r11 ffc14d88: 7d 64 59 d6 mullw r11,r4,r11 ffc14d8c: 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 ffc14d90: 7f 8b 00 40 cmplw cr7,r11,r0 ffc14d94: 41 9c 00 14 blt- cr7,ffc14da8 <_Heap_Free+0x34> ffc14d98: 81 43 00 24 lwz r10,36(r3) ffc14d9c: 7d 4b 50 10 subfc r10,r11,r10 ffc14da0: 39 40 00 00 li r10,0 ffc14da4: 7d 4a 51 14 adde r10,r10,r10 Heap_Block *next_block = NULL; uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { ffc14da8: 2f 8a 00 00 cmpwi cr7,r10,0 ffc14dac: 41 9e 01 a8 beq- cr7,ffc14f54 <_Heap_Free+0x1e0> - 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; ffc14db0: 80 ab 00 04 lwz r5,4(r11) 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 ffc14db4: 38 e0 00 00 li r7,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; ffc14db8: 54 a8 00 3c rlwinm r8,r5,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); ffc14dbc: 7d 4b 42 14 add r10,r11,r8 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 ffc14dc0: 7f 8a 00 40 cmplw cr7,r10,r0 ffc14dc4: 41 9c 00 14 blt- cr7,ffc14dd8 <_Heap_Free+0x64> <== NEVER TAKEN ffc14dc8: 80 e9 00 24 lwz r7,36(r9) ffc14dcc: 7c ea 38 10 subfc r7,r10,r7 ffc14dd0: 38 e0 00 00 li r7,0 ffc14dd4: 7c e7 39 14 adde r7,r7,r7 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { ffc14dd8: 2f 87 00 00 cmpwi cr7,r7,0 ffc14ddc: 41 9e 01 78 beq- cr7,ffc14f54 <_Heap_Free+0x1e0> <== 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; ffc14de0: 80 ca 00 04 lwz r6,4(r10) _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc14de4: 70 c3 00 01 andi. r3,r6,1 ffc14de8: 41 82 01 6c beq- ffc14f54 <_Heap_Free+0x1e0> <== NEVER TAKEN return false; } 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 )); ffc14dec: 81 89 00 24 lwz r12,36(r9) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc14df0: 54 c6 00 3c rlwinm r6,r6,0,0,30 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block ffc14df4: 38 80 00 00 li r4,0 ffc14df8: 7f 8a 60 00 cmpw cr7,r10,r12 ffc14dfc: 41 9e 00 14 beq- cr7,ffc14e10 <_Heap_Free+0x9c> ffc14e00: 7c ea 32 14 add r7,r10,r6 ffc14e04: 80 87 00 04 lwz r4,4(r7) ffc14e08: 54 84 07 fe clrlwi r4,r4,31 ffc14e0c: 68 84 00 01 xori r4,r4,1 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { ffc14e10: 70 a7 00 01 andi. r7,r5,1 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block ffc14e14: 54 84 06 3e clrlwi r4,r4,24 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { ffc14e18: 40 82 00 94 bne- ffc14eac <_Heap_Free+0x138> uintptr_t const prev_size = block->prev_size; ffc14e1c: 80 ab 00 00 lwz r5,0(r11) 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 ffc14e20: 38 60 00 00 li r3,0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc14e24: 7c e5 58 50 subf r7,r5,r11 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 ffc14e28: 7f 87 00 40 cmplw cr7,r7,r0 ffc14e2c: 41 9c 00 10 blt- cr7,ffc14e3c <_Heap_Free+0xc8> <== NEVER TAKEN ffc14e30: 7c 67 60 10 subfc r3,r7,r12 ffc14e34: 38 60 00 00 li r3,0 ffc14e38: 7c 63 19 14 adde r3,r3,r3 Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { ffc14e3c: 2f 83 00 00 cmpwi cr7,r3,0 ffc14e40: 41 9e 01 14 beq- cr7,ffc14f54 <_Heap_Free+0x1e0> <== 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) ) { ffc14e44: 80 07 00 04 lwz r0,4(r7) ffc14e48: 70 03 00 01 andi. r3,r0,1 ffc14e4c: 41 82 01 08 beq- ffc14f54 <_Heap_Free+0x1e0> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ ffc14e50: 2f 84 00 00 cmpwi cr7,r4,0 ffc14e54: 41 9e 00 38 beq- cr7,ffc14e8c <_Heap_Free+0x118> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc14e58: 80 89 00 38 lwz r4,56(r9) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; ffc14e5c: 7c c8 32 14 add r6,r8,r6 ffc14e60: 7c a6 2a 14 add r5,r6,r5 } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; ffc14e64: 81 6a 00 0c lwz r11,12(r10) return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; ffc14e68: 81 4a 00 08 lwz r10,8(r10) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc14e6c: 38 c4 ff ff addi r6,r4,-1 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc14e70: 60 a0 00 01 ori r0,r5,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; ffc14e74: 90 c9 00 38 stw r6,56(r9) Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; ffc14e78: 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; ffc14e7c: 7c a7 29 2e stwx r5,r7,r5 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; ffc14e80: 90 07 00 04 stw r0,4(r7) RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; ffc14e84: 91 4b 00 08 stw r10,8(r11) ffc14e88: 48 00 00 a0 b ffc14f28 <_Heap_Free+0x1b4> 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; ffc14e8c: 7c a8 2a 14 add r5,r8,r5 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc14e90: 60 a0 00 01 ori r0,r5,1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; ffc14e94: 7c ab 41 2e stwx r5,r11,r8 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc14e98: 90 07 00 04 stw r0,4(r7) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc14e9c: 80 0a 00 04 lwz r0,4(r10) ffc14ea0: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc14ea4: 90 0a 00 04 stw r0,4(r10) ffc14ea8: 48 00 00 80 b ffc14f28 <_Heap_Free+0x1b4> next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ ffc14eac: 2f 84 00 00 cmpwi cr7,r4,0 ffc14eb0: 41 9e 00 30 beq- cr7,ffc14ee0 <_Heap_Free+0x16c> Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; ffc14eb4: 80 aa 00 0c lwz r5,12(r10) uintptr_t const size = block_size + next_block_size; ffc14eb8: 7c e6 42 14 add r7,r6,r8 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; ffc14ebc: 81 4a 00 08 lwz r10,8(r10) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc14ec0: 60 e0 00 01 ori r0,r7,1 Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; ffc14ec4: 90 ab 00 0c stw r5,12(r11) ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; ffc14ec8: 91 4b 00 08 stw r10,8(r11) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; ffc14ecc: 7c eb 39 2e stwx r7,r11,r7 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; ffc14ed0: 90 0b 00 04 stw r0,4(r11) new_block->prev = prev; next->prev = new_block; prev->next = new_block; ffc14ed4: 91 65 00 08 stw r11,8(r5) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; ffc14ed8: 91 6a 00 0c stw r11,12(r10) ffc14edc: 48 00 00 4c b ffc14f28 <_Heap_Free+0x1b4> 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; ffc14ee0: 61 00 00 01 ori r0,r8,1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; ffc14ee4: 7d 0b 41 2e stwx r8,r11,r8 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; ffc14ee8: 90 0b 00 04 stw r0,4(r11) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc14eec: 80 0a 00 04 lwz r0,4(r10) ) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; ffc14ef0: 91 2b 00 0c stw r9,12(r11) ffc14ef4: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc14ef8: 90 0a 00 04 stw r0,4(r10) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; ffc14efc: 80 e9 00 38 lwz r7,56(r9) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; ffc14f00: 81 49 00 3c lwz r10,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; ffc14f04: 38 07 00 01 addi r0,r7,1 #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; ffc14f08: 7f 8a 00 40 cmplw cr7,r10,r0 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; ffc14f0c: 81 49 00 08 lwz r10,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; ffc14f10: 90 09 00 38 stw r0,56(r9) new_block->next = next; ffc14f14: 91 4b 00 08 stw r10,8(r11) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; ffc14f18: 91 6a 00 0c stw r11,12(r10) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; ffc14f1c: 91 69 00 08 stw r11,8(r9) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; ffc14f20: 40 9c 00 08 bge- cr7,ffc14f28 <_Heap_Free+0x1b4> 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; ffc14f24: 90 09 00 3c stw r0,60(r9) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; ffc14f28: 80 09 00 30 lwz r0,48(r9) ffc14f2c: 38 60 00 01 li r3,1 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc14f30: 81 69 00 40 lwz r11,64(r9) ++stats->frees; ffc14f34: 81 49 00 50 lwz r10,80(r9) stats->free_size += block_size; ffc14f38: 7d 00 42 14 add r8,r0,r8 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc14f3c: 39 6b ff ff addi r11,r11,-1 ++stats->frees; stats->free_size += block_size; ffc14f40: 91 09 00 30 stw r8,48(r9) } } /* Statistics */ --stats->used_blocks; ++stats->frees; ffc14f44: 38 0a 00 01 addi r0,r10,1 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc14f48: 91 69 00 40 stw r11,64(r9) ++stats->frees; ffc14f4c: 90 09 00 50 stw r0,80(r9) stats->free_size += block_size; return( true ); ffc14f50: 4e 80 00 20 blr ffc14f54: 38 60 00 00 li r3,0 } ffc14f58: 4e 80 00 20 blr =============================================================================== ffc150b4 <_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 ) ffc150b4: 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; ffc150b8: 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 ) ffc150bc: 7d 64 03 96 divwu r11,r4,r0 ffc150c0: 7d 6b 01 d6 mullw 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 ffc150c4: 38 00 00 00 li r0,0 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 ) ffc150c8: 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 ffc150cc: 7f 8b 48 40 cmplw cr7,r11,r9 ffc150d0: 41 9c 00 14 blt- cr7,ffc150e4 <_Heap_Size_of_alloc_area+0x30><== NEVER TAKEN ffc150d4: 80 03 00 24 lwz r0,36(r3) ffc150d8: 7c 0b 00 10 subfc r0,r11,r0 ffc150dc: 38 00 00 00 li r0,0 ffc150e0: 7c 00 01 14 adde r0,r0,r0 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { ffc150e4: 2f 80 00 00 cmpwi cr7,r0,0 ffc150e8: 41 9e 00 54 beq- cr7,ffc1513c <_Heap_Size_of_alloc_area+0x88> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc150ec: 80 0b 00 04 lwz r0,4(r11) 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 ffc150f0: 39 40 00 00 li r10,0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc150f4: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc150f8: 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 ffc150fc: 7f 8b 48 40 cmplw cr7,r11,r9 ffc15100: 41 9c 00 14 blt- cr7,ffc15114 <_Heap_Size_of_alloc_area+0x60><== NEVER TAKEN ffc15104: 81 43 00 24 lwz r10,36(r3) ffc15108: 7d 4b 50 10 subfc r10,r11,r10 ffc1510c: 39 40 00 00 li r10,0 ffc15110: 7d 4a 51 14 adde r10,r10,r10 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( ffc15114: 2f 8a 00 00 cmpwi cr7,r10,0 ffc15118: 41 9e 00 24 beq- cr7,ffc1513c <_Heap_Size_of_alloc_area+0x88><== NEVER TAKEN ffc1511c: 80 0b 00 04 lwz r0,4(r11) ffc15120: 70 09 00 01 andi. r9,r0,1 ffc15124: 41 82 00 18 beq- ffc1513c <_Heap_Size_of_alloc_area+0x88><== NEVER TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; ffc15128: 20 84 00 04 subfic r4,r4,4 ffc1512c: 7d 64 5a 14 add r11,r4,r11 ffc15130: 91 65 00 00 stw r11,0(r5) ffc15134: 38 60 00 01 li r3,1 return true; ffc15138: 4e 80 00 20 blr ffc1513c: 38 60 00 00 li r3,0 } ffc15140: 4e 80 00 20 blr =============================================================================== ffc0a0a0 <_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; ffc0a0a0: 2f 85 00 00 cmpwi cr7,r5,0 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { ffc0a0a4: 94 21 ff 98 stwu r1,-104(r1) ffc0a0a8: 7c 08 02 a6 mflr r0 ffc0a0ac: 93 21 00 4c stw r25,76(r1) ffc0a0b0: 90 01 00 6c stw r0,108(r1) ffc0a0b4: 93 61 00 54 stw r27,84(r1) ffc0a0b8: 93 81 00 58 stw r28,88(r1) ffc0a0bc: 93 a1 00 5c stw r29,92(r1) ffc0a0c0: 7c 7d 1b 78 mr r29,r3 ffc0a0c4: 93 c1 00 60 stw r30,96(r1) ffc0a0c8: 7c 9e 23 78 mr r30,r4 ffc0a0cc: 93 e1 00 64 stw r31,100(r1) ffc0a0d0: 91 c1 00 20 stw r14,32(r1) ffc0a0d4: 91 e1 00 24 stw r15,36(r1) ffc0a0d8: 92 01 00 28 stw r16,40(r1) ffc0a0dc: 92 21 00 2c stw r17,44(r1) ffc0a0e0: 92 41 00 30 stw r18,48(r1) ffc0a0e4: 92 61 00 34 stw r19,52(r1) ffc0a0e8: 92 81 00 38 stw r20,56(r1) ffc0a0ec: 92 a1 00 3c stw r21,60(r1) ffc0a0f0: 92 c1 00 40 stw r22,64(r1) ffc0a0f4: 92 e1 00 44 stw r23,68(r1) ffc0a0f8: 93 01 00 48 stw r24,72(r1) ffc0a0fc: 93 41 00 50 stw r26,80(r1) uintptr_t const page_size = heap->page_size; ffc0a100: 83 83 00 10 lwz r28,16(r3) uintptr_t const min_block_size = heap->min_block_size; ffc0a104: 83 63 00 14 lwz r27,20(r3) Heap_Block *const last_block = heap->last_block; ffc0a108: 83 23 00 24 lwz r25,36(r3) Heap_Block *block = heap->first_block; ffc0a10c: 83 e3 00 20 lwz r31,32(r3) Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; ffc0a110: 40 9e 00 10 bne- cr7,ffc0a120 <_Heap_Walk+0x80> ffc0a114: 3d 20 ff c1 lis r9,-63 ffc0a118: 39 29 a0 9c addi r9,r9,-24420 ffc0a11c: 48 00 00 0c b ffc0a128 <_Heap_Walk+0x88> ffc0a120: 3d 20 ff c1 lis r9,-63 ffc0a124: 39 29 a6 38 addi r9,r9,-22984 ffc0a128: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc0a12c: 3d 20 00 00 lis r9,0 ffc0a130: 80 09 27 d4 lwz r0,10196(r9) ffc0a134: 2f 80 00 03 cmpwi cr7,r0,3 ffc0a138: 40 be 04 94 bne+ cr7,ffc0a5cc <_Heap_Walk+0x52c> 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)( ffc0a13c: 80 1d 00 0c lwz r0,12(r29) ffc0a140: 3c a0 ff c2 lis r5,-62 ffc0a144: 81 1d 00 18 lwz r8,24(r29) ffc0a148: 38 a5 f3 50 addi r5,r5,-3248 ffc0a14c: 81 3d 00 1c lwz r9,28(r29) ffc0a150: 7f c3 f3 78 mr r3,r30 ffc0a154: 81 7d 00 08 lwz r11,8(r29) ffc0a158: 38 80 00 00 li r4,0 ffc0a15c: 90 01 00 10 stw r0,16(r1) ffc0a160: 7f 86 e3 78 mr r6,r28 ffc0a164: 7f 67 db 78 mr r7,r27 ffc0a168: 80 01 00 18 lwz r0,24(r1) ffc0a16c: 7f ea fb 78 mr r10,r31 ffc0a170: 91 61 00 0c stw r11,12(r1) ffc0a174: 7c 09 03 a6 mtctr r0 ffc0a178: 93 21 00 08 stw r25,8(r1) ffc0a17c: 4c c6 31 82 crclr 4*cr1+eq ffc0a180: 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 ) { ffc0a184: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0a188: 40 be 00 14 bne+ cr7,ffc0a19c <_Heap_Walk+0xfc> (*printer)( source, true, "page size is zero\n" ); ffc0a18c: 3c a0 ff c2 lis r5,-62 ffc0a190: 7f c3 f3 78 mr r3,r30 ffc0a194: 38 a5 f3 e1 addi r5,r5,-3103 ffc0a198: 48 00 00 c8 b ffc0a260 <_Heap_Walk+0x1c0> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { ffc0a19c: 73 89 00 07 andi. r9,r28,7 ffc0a1a0: 41 a2 00 18 beq+ ffc0a1b8 <_Heap_Walk+0x118> (*printer)( ffc0a1a4: 3c a0 ff c2 lis r5,-62 ffc0a1a8: 7f c3 f3 78 mr r3,r30 ffc0a1ac: 38 a5 f3 f4 addi r5,r5,-3084 ffc0a1b0: 7f 86 e3 78 mr r6,r28 ffc0a1b4: 48 00 03 8c b ffc0a540 <_Heap_Walk+0x4a0> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { ffc0a1b8: 7c 1b e3 96 divwu r0,r27,r28 ffc0a1bc: 7c 00 e1 d6 mullw r0,r0,r28 ffc0a1c0: 7f 9b 00 00 cmpw cr7,r27,r0 ffc0a1c4: 41 be 00 18 beq+ cr7,ffc0a1dc <_Heap_Walk+0x13c> (*printer)( ffc0a1c8: 3c a0 ff c2 lis r5,-62 ffc0a1cc: 7f c3 f3 78 mr r3,r30 ffc0a1d0: 38 a5 f4 12 addi r5,r5,-3054 ffc0a1d4: 7f 66 db 78 mr r6,r27 ffc0a1d8: 48 00 03 68 b ffc0a540 <_Heap_Walk+0x4a0> ); return false; } if ( ffc0a1dc: 38 1f 00 08 addi r0,r31,8 ffc0a1e0: 7d 20 e3 96 divwu r9,r0,r28 ffc0a1e4: 7d 29 e1 d6 mullw r9,r9,r28 ffc0a1e8: 7f 80 48 00 cmpw cr7,r0,r9 ffc0a1ec: 41 be 00 14 beq+ cr7,ffc0a200 <_Heap_Walk+0x160> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( ffc0a1f0: 3c a0 ff c2 lis r5,-62 ffc0a1f4: 7f c3 f3 78 mr r3,r30 ffc0a1f8: 38 a5 f4 36 addi r5,r5,-3018 ffc0a1fc: 48 00 03 40 b ffc0a53c <_Heap_Walk+0x49c> ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { ffc0a200: 80 1f 00 04 lwz r0,4(r31) ffc0a204: 70 09 00 01 andi. r9,r0,1 ffc0a208: 40 a2 00 14 bne+ ffc0a21c <_Heap_Walk+0x17c> (*printer)( ffc0a20c: 3c a0 ff c2 lis r5,-62 ffc0a210: 7f c3 f3 78 mr r3,r30 ffc0a214: 38 a5 f4 67 addi r5,r5,-2969 ffc0a218: 48 00 00 48 b ffc0a260 <_Heap_Walk+0x1c0> ); return false; } if ( first_block->prev_size != page_size ) { ffc0a21c: 83 5f 00 00 lwz r26,0(r31) ffc0a220: 7f 9a e0 00 cmpw cr7,r26,r28 ffc0a224: 41 be 00 18 beq+ cr7,ffc0a23c <_Heap_Walk+0x19c> (*printer)( ffc0a228: 3c a0 ff c2 lis r5,-62 ffc0a22c: 7f c3 f3 78 mr r3,r30 ffc0a230: 38 a5 f4 95 addi r5,r5,-2923 ffc0a234: 7f 46 d3 78 mr r6,r26 ffc0a238: 48 00 02 18 b ffc0a450 <_Heap_Walk+0x3b0> ); return false; } if ( _Heap_Is_free( last_block ) ) { ffc0a23c: 81 39 00 04 lwz r9,4(r25) ffc0a240: 55 29 00 3c rlwinm r9,r9,0,0,30 ffc0a244: 7d 39 4a 14 add r9,r25,r9 ffc0a248: 80 09 00 04 lwz r0,4(r9) ffc0a24c: 70 09 00 01 andi. r9,r0,1 ffc0a250: 40 a2 00 28 bne+ ffc0a278 <_Heap_Walk+0x1d8> (*printer)( ffc0a254: 3c a0 ff c2 lis r5,-62 ffc0a258: 7f c3 f3 78 mr r3,r30 ffc0a25c: 38 a5 f4 c0 addi r5,r5,-2880 ffc0a260: 80 01 00 18 lwz r0,24(r1) ffc0a264: 38 80 00 01 li r4,1 ffc0a268: 7c 09 03 a6 mtctr r0 ffc0a26c: 4c c6 31 82 crclr 4*cr1+eq ffc0a270: 4e 80 04 21 bctrl ffc0a274: 48 00 02 e0 b ffc0a554 <_Heap_Walk+0x4b4> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; ffc0a278: 81 3d 00 10 lwz r9,16(r29) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0a27c: 7f a0 eb 78 mr r0,r29 ffc0a280: 80 dd 00 08 lwz r6,8(r29) ffc0a284: 48 00 00 a4 b ffc0a328 <_Heap_Walk+0x288> 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 ffc0a288: 81 1d 00 20 lwz r8,32(r29) ffc0a28c: 7f 88 30 40 cmplw cr7,r8,r6 ffc0a290: 41 9d 00 14 bgt- cr7,ffc0a2a4 <_Heap_Walk+0x204> ffc0a294: 81 7d 00 24 lwz r11,36(r29) ffc0a298: 7d 66 58 10 subfc r11,r6,r11 ffc0a29c: 39 60 00 00 li r11,0 ffc0a2a0: 7d 6b 59 14 adde r11,r11,r11 const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { ffc0a2a4: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0a2a8: 40 be 00 14 bne+ cr7,ffc0a2bc <_Heap_Walk+0x21c> (*printer)( ffc0a2ac: 3c a0 ff c2 lis r5,-62 ffc0a2b0: 7f c3 f3 78 mr r3,r30 ffc0a2b4: 38 a5 f4 d5 addi r5,r5,-2859 ffc0a2b8: 48 00 02 88 b ffc0a540 <_Heap_Walk+0x4a0> ); return false; } if ( ffc0a2bc: 7d 6a 4b 96 divwu r11,r10,r9 ffc0a2c0: 7d 6b 49 d6 mullw r11,r11,r9 ffc0a2c4: 7f 8a 58 00 cmpw cr7,r10,r11 ffc0a2c8: 41 be 00 14 beq+ cr7,ffc0a2dc <_Heap_Walk+0x23c> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( ffc0a2cc: 3c a0 ff c2 lis r5,-62 ffc0a2d0: 7f c3 f3 78 mr r3,r30 ffc0a2d4: 38 a5 f4 f5 addi r5,r5,-2827 ffc0a2d8: 48 00 02 68 b ffc0a540 <_Heap_Walk+0x4a0> ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc0a2dc: 81 66 00 04 lwz r11,4(r6) ffc0a2e0: 55 6b 00 3c rlwinm r11,r11,0,0,30 ffc0a2e4: 7d 66 5a 14 add r11,r6,r11 ffc0a2e8: 81 6b 00 04 lwz r11,4(r11) ffc0a2ec: 71 6a 00 01 andi. r10,r11,1 ffc0a2f0: 41 a2 00 14 beq+ ffc0a304 <_Heap_Walk+0x264> (*printer)( ffc0a2f4: 3c a0 ff c2 lis r5,-62 ffc0a2f8: 7f c3 f3 78 mr r3,r30 ffc0a2fc: 38 a5 f5 25 addi r5,r5,-2779 ffc0a300: 48 00 02 40 b ffc0a540 <_Heap_Walk+0x4a0> ); return false; } if ( free_block->prev != prev_block ) { ffc0a304: 80 e6 00 0c lwz r7,12(r6) ffc0a308: 7f 87 00 00 cmpw cr7,r7,r0 return false; } prev_block = free_block; free_block = free_block->next; ffc0a30c: 7c c0 33 78 mr r0,r6 ); return false; } if ( free_block->prev != prev_block ) { ffc0a310: 41 be 00 14 beq+ cr7,ffc0a324 <_Heap_Walk+0x284> (*printer)( ffc0a314: 3c a0 ff c2 lis r5,-62 ffc0a318: 7f c3 f3 78 mr r3,r30 ffc0a31c: 38 a5 f5 41 addi r5,r5,-2751 ffc0a320: 48 00 01 34 b ffc0a454 <_Heap_Walk+0x3b4> return false; } prev_block = free_block; free_block = free_block->next; ffc0a324: 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 ) { ffc0a328: 7f 86 e8 00 cmpw cr7,r6,r29 ); return false; } if ( ffc0a32c: 39 46 00 08 addi r10,r6,8 ffc0a330: 39 60 00 00 li r11,0 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 ) { ffc0a334: 40 9e ff 54 bne+ cr7,ffc0a288 <_Heap_Walk+0x1e8> ffc0a338: 48 00 02 4c b ffc0a584 <_Heap_Walk+0x4e4> - 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; ffc0a33c: 83 1f 00 04 lwz r24,4(r31) 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 ) { ffc0a340: 73 09 00 01 andi. r9,r24,1 ffc0a344: 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); ffc0a348: 7f 9f c2 14 add r28,r31,r24 ffc0a34c: 41 82 00 2c beq- ffc0a378 <_Heap_Walk+0x2d8> (*printer)( ffc0a350: 80 01 00 18 lwz r0,24(r1) ffc0a354: 7f c3 f3 78 mr r3,r30 ffc0a358: 38 80 00 00 li r4,0 ffc0a35c: 7e 85 a3 78 mr r5,r20 ffc0a360: 7c 09 03 a6 mtctr r0 ffc0a364: 7f e6 fb 78 mr r6,r31 ffc0a368: 7f 07 c3 78 mr r7,r24 ffc0a36c: 4c c6 31 82 crclr 4*cr1+eq ffc0a370: 4e 80 04 21 bctrl ffc0a374: 48 00 00 2c b ffc0a3a0 <_Heap_Walk+0x300> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0a378: 80 01 00 18 lwz r0,24(r1) ffc0a37c: 7f c3 f3 78 mr r3,r30 ffc0a380: 38 80 00 00 li r4,0 ffc0a384: 81 1f 00 00 lwz r8,0(r31) ffc0a388: 7e 65 9b 78 mr r5,r19 ffc0a38c: 7c 09 03 a6 mtctr r0 ffc0a390: 7f e6 fb 78 mr r6,r31 ffc0a394: 7f 07 c3 78 mr r7,r24 ffc0a398: 4c c6 31 82 crclr 4*cr1+eq ffc0a39c: 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 ffc0a3a0: 81 3d 00 20 lwz r9,32(r29) ffc0a3a4: 38 00 00 00 li r0,0 ffc0a3a8: 7f 89 e0 40 cmplw cr7,r9,r28 ffc0a3ac: 41 9d 00 14 bgt- cr7,ffc0a3c0 <_Heap_Walk+0x320> <== NEVER TAKEN ffc0a3b0: 80 1d 00 24 lwz r0,36(r29) ffc0a3b4: 7c 1c 00 10 subfc r0,r28,r0 ffc0a3b8: 38 00 00 00 li r0,0 ffc0a3bc: 7c 00 01 14 adde r0,r0,r0 block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { ffc0a3c0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a3c4: 40 be 00 14 bne+ cr7,ffc0a3d8 <_Heap_Walk+0x338> (*printer)( ffc0a3c8: 3c a0 ff c2 lis r5,-62 ffc0a3cc: 7f c3 f3 78 mr r3,r30 ffc0a3d0: 38 a5 f5 af addi r5,r5,-2641 ffc0a3d4: 48 00 00 78 b ffc0a44c <_Heap_Walk+0x3ac> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { ffc0a3d8: 7c 18 d3 96 divwu r0,r24,r26 ffc0a3dc: 7c 00 d1 d6 mullw r0,r0,r26 ffc0a3e0: 7f 98 00 00 cmpw cr7,r24,r0 ffc0a3e4: 41 be 00 1c beq+ cr7,ffc0a400 <_Heap_Walk+0x360> (*printer)( ffc0a3e8: 3c a0 ff c2 lis r5,-62 ffc0a3ec: 7f c3 f3 78 mr r3,r30 ffc0a3f0: 38 a5 f5 dc addi r5,r5,-2596 ffc0a3f4: 7f e6 fb 78 mr r6,r31 ffc0a3f8: 7f 07 c3 78 mr r7,r24 ffc0a3fc: 48 00 00 58 b ffc0a454 <_Heap_Walk+0x3b4> ); return false; } if ( block_size < min_block_size ) { ffc0a400: 7f 98 d8 40 cmplw cr7,r24,r27 ffc0a404: 40 bc 00 34 bge+ cr7,ffc0a438 <_Heap_Walk+0x398> (*printer)( ffc0a408: 80 01 00 18 lwz r0,24(r1) ffc0a40c: 3c a0 ff c2 lis r5,-62 ffc0a410: 7f c3 f3 78 mr r3,r30 ffc0a414: 38 a5 f6 0a addi r5,r5,-2550 ffc0a418: 7c 09 03 a6 mtctr r0 ffc0a41c: 7f e6 fb 78 mr r6,r31 ffc0a420: 7f 07 c3 78 mr r7,r24 ffc0a424: 7f 68 db 78 mr r8,r27 ffc0a428: 38 80 00 01 li r4,1 ffc0a42c: 4c c6 31 82 crclr 4*cr1+eq ffc0a430: 4e 80 04 21 bctrl ffc0a434: 48 00 01 20 b ffc0a554 <_Heap_Walk+0x4b4> ); return false; } if ( next_block_begin <= block_begin ) { ffc0a438: 7f 9c f8 40 cmplw cr7,r28,r31 ffc0a43c: 41 bd 00 30 bgt+ cr7,ffc0a46c <_Heap_Walk+0x3cc> (*printer)( ffc0a440: 3c a0 ff c2 lis r5,-62 ffc0a444: 7f c3 f3 78 mr r3,r30 ffc0a448: 38 a5 f6 35 addi r5,r5,-2507 ffc0a44c: 7f e6 fb 78 mr r6,r31 ffc0a450: 7f 87 e3 78 mr r7,r28 ffc0a454: 80 01 00 18 lwz r0,24(r1) ffc0a458: 38 80 00 01 li r4,1 ffc0a45c: 7c 09 03 a6 mtctr r0 ffc0a460: 4c c6 31 82 crclr 4*cr1+eq ffc0a464: 4e 80 04 21 bctrl ffc0a468: 48 00 00 ec b ffc0a554 <_Heap_Walk+0x4b4> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc0a46c: 80 1c 00 04 lwz r0,4(r28) ffc0a470: 70 09 00 01 andi. r9,r0,1 ffc0a474: 40 82 01 08 bne- ffc0a57c <_Heap_Walk+0x4dc> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0a478: 80 1d 00 08 lwz r0,8(r29) ffc0a47c: 7d c8 73 78 mr r8,r14 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)( ffc0a480: 80 ff 00 0c lwz r7,12(r31) 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; ffc0a484: 82 bf 00 04 lwz r21,4(r31) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0a488: 7f 87 00 00 cmpw cr7,r7,r0 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; ffc0a48c: 80 1d 00 0c lwz r0,12(r29) - 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; ffc0a490: 56 b8 00 3c rlwinm r24,r21,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc0a494: 7e df c2 14 add r22,r31,r24 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; ffc0a498: 41 9e 00 14 beq- cr7,ffc0a4ac <_Heap_Walk+0x40c> "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)" : ""), ffc0a49c: 7f 87 e8 00 cmpw cr7,r7,r29 ffc0a4a0: 7e e8 bb 78 mr r8,r23 ffc0a4a4: 40 be 00 08 bne+ cr7,ffc0a4ac <_Heap_Walk+0x40c> ffc0a4a8: 7d e8 7b 78 mr r8,r15 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)( ffc0a4ac: 81 3f 00 08 lwz r9,8(r31) ffc0a4b0: 7e 0a 83 78 mr r10,r16 ffc0a4b4: 7f 89 00 00 cmpw cr7,r9,r0 ffc0a4b8: 41 9e 00 14 beq- cr7,ffc0a4cc <_Heap_Walk+0x42c> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0a4bc: 7f 89 e8 00 cmpw cr7,r9,r29 ffc0a4c0: 7e ea bb 78 mr r10,r23 ffc0a4c4: 40 be 00 08 bne+ cr7,ffc0a4cc <_Heap_Walk+0x42c> ffc0a4c8: 7e 2a 8b 78 mr r10,r17 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)( ffc0a4cc: 80 01 00 18 lwz r0,24(r1) ffc0a4d0: 7f c3 f3 78 mr r3,r30 ffc0a4d4: 38 80 00 00 li r4,0 ffc0a4d8: 7e 45 93 78 mr r5,r18 ffc0a4dc: 7c 09 03 a6 mtctr r0 ffc0a4e0: 7f e6 fb 78 mr r6,r31 ffc0a4e4: 4c c6 31 82 crclr 4*cr1+eq ffc0a4e8: 4e 80 04 21 bctrl block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { ffc0a4ec: 81 16 00 00 lwz r8,0(r22) ffc0a4f0: 7f 98 40 00 cmpw cr7,r24,r8 ffc0a4f4: 41 9e 00 34 beq- cr7,ffc0a528 <_Heap_Walk+0x488> (*printer)( ffc0a4f8: 80 01 00 18 lwz r0,24(r1) ffc0a4fc: 3c a0 ff c2 lis r5,-62 ffc0a500: 7f c3 f3 78 mr r3,r30 ffc0a504: 38 a5 f6 be addi r5,r5,-2370 ffc0a508: 7c 09 03 a6 mtctr r0 ffc0a50c: 7f e6 fb 78 mr r6,r31 ffc0a510: 7f 07 c3 78 mr r7,r24 ffc0a514: 7e c9 b3 78 mr r9,r22 ffc0a518: 38 80 00 01 li r4,1 ffc0a51c: 4c c6 31 82 crclr 4*cr1+eq ffc0a520: 4e 80 04 21 bctrl ffc0a524: 48 00 00 30 b ffc0a554 <_Heap_Walk+0x4b4> ); return false; } if ( !prev_used ) { ffc0a528: 72 a9 00 01 andi. r9,r21,1 ffc0a52c: 40 a2 00 30 bne+ ffc0a55c <_Heap_Walk+0x4bc> (*printer)( ffc0a530: 3c a0 ff c2 lis r5,-62 ffc0a534: 7f c3 f3 78 mr r3,r30 ffc0a538: 38 a5 f6 f7 addi r5,r5,-2313 ffc0a53c: 7f e6 fb 78 mr r6,r31 ffc0a540: 80 01 00 18 lwz r0,24(r1) ffc0a544: 38 80 00 01 li r4,1 ffc0a548: 7c 09 03 a6 mtctr r0 ffc0a54c: 4c c6 31 82 crclr 4*cr1+eq ffc0a550: 4e 80 04 21 bctrl ffc0a554: 38 60 00 00 li r3,0 ffc0a558: 48 00 00 78 b ffc0a5d0 <_Heap_Walk+0x530> ffc0a55c: 81 3d 00 08 lwz r9,8(r29) ffc0a560: 48 00 00 0c b ffc0a56c <_Heap_Walk+0x4cc> { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { if ( free_block == block ) { ffc0a564: 41 9a 00 18 beq- cr6,ffc0a57c <_Heap_Walk+0x4dc> return true; } free_block = free_block->next; ffc0a568: 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 ) { ffc0a56c: 7f 89 e8 00 cmpw cr7,r9,r29 if ( free_block == block ) { ffc0a570: 7f 09 f8 00 cmpw cr6,r9,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 ) { ffc0a574: 40 9e ff f0 bne+ cr7,ffc0a564 <_Heap_Walk+0x4c4> ffc0a578: 48 00 00 b0 b ffc0a628 <_Heap_Walk+0x588> ffc0a57c: 7f 9f e3 78 mr r31,r28 ffc0a580: 48 00 00 44 b ffc0a5c4 <_Heap_Walk+0x524> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0a584: 3e 60 ff c2 lis r19,-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)( ffc0a588: 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)( ffc0a58c: 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)" : "") ffc0a590: 3e 20 ff c2 lis r17,-62 ffc0a594: 3e e0 ff c2 lis r23,-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)( ffc0a598: 3e 00 ff c2 lis r16,-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)" : ""), ffc0a59c: 3d e0 ff c2 lis r15,-62 ffc0a5a0: 3d c0 ff c2 lis r14,-62 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc0a5a4: 3a 73 f5 8a addi r19,r19,-2678 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)( ffc0a5a8: 3a 94 f5 73 addi r20,r20,-2701 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)( ffc0a5ac: 3a 52 f6 92 addi r18,r18,-2414 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ffc0a5b0: 3a 31 f6 88 addi r17,r17,-2424 ffc0a5b4: 3a f7 f2 9c addi r23,r23,-3428 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)( ffc0a5b8: 3a 10 f6 7e addi r16,r16,-2434 "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)" : ""), ffc0a5bc: 39 ef f6 74 addi r15,r15,-2444 ffc0a5c0: 39 ce f6 69 addi r14,r14,-2455 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { ffc0a5c4: 7f 9f c8 00 cmpw cr7,r31,r25 ffc0a5c8: 40 9e fd 74 bne+ cr7,ffc0a33c <_Heap_Walk+0x29c> ffc0a5cc: 38 60 00 01 li r3,1 block = next_block; } return true; } ffc0a5d0: 80 01 00 6c lwz r0,108(r1) ffc0a5d4: 81 c1 00 20 lwz r14,32(r1) ffc0a5d8: 7c 08 03 a6 mtlr r0 ffc0a5dc: 81 e1 00 24 lwz r15,36(r1) ffc0a5e0: 82 01 00 28 lwz r16,40(r1) ffc0a5e4: 82 21 00 2c lwz r17,44(r1) ffc0a5e8: 82 41 00 30 lwz r18,48(r1) ffc0a5ec: 82 61 00 34 lwz r19,52(r1) ffc0a5f0: 82 81 00 38 lwz r20,56(r1) ffc0a5f4: 82 a1 00 3c lwz r21,60(r1) ffc0a5f8: 82 c1 00 40 lwz r22,64(r1) ffc0a5fc: 82 e1 00 44 lwz r23,68(r1) ffc0a600: 83 01 00 48 lwz r24,72(r1) ffc0a604: 83 21 00 4c lwz r25,76(r1) ffc0a608: 83 41 00 50 lwz r26,80(r1) ffc0a60c: 83 61 00 54 lwz r27,84(r1) ffc0a610: 83 81 00 58 lwz r28,88(r1) ffc0a614: 83 a1 00 5c lwz r29,92(r1) ffc0a618: 83 c1 00 60 lwz r30,96(r1) ffc0a61c: 83 e1 00 64 lwz r31,100(r1) ffc0a620: 38 21 00 68 addi r1,r1,104 ffc0a624: 4e 80 00 20 blr return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( ffc0a628: 3c a0 ff c2 lis r5,-62 ffc0a62c: 7f c3 f3 78 mr r3,r30 ffc0a630: 38 a5 f7 26 addi r5,r5,-2266 ffc0a634: 4b ff ff 08 b ffc0a53c <_Heap_Walk+0x49c> =============================================================================== ffc0a638 <_Heap_Walk_print>: { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0a638: 94 21 ff 88 stwu r1,-120(r1) ffc0a63c: 7c 08 02 a6 mflr r0 ffc0a640: 93 e1 00 74 stw r31,116(r1) ffc0a644: 90 01 00 7c stw r0,124(r1) ffc0a648: 7c 60 1b 78 mr r0,r3 ffc0a64c: 90 c1 00 1c stw r6,28(r1) ffc0a650: 90 e1 00 20 stw r7,32(r1) ffc0a654: 91 01 00 24 stw r8,36(r1) ffc0a658: 91 21 00 28 stw r9,40(r1) ffc0a65c: 91 41 00 2c stw r10,44(r1) ffc0a660: 40 86 00 24 bne- cr1,ffc0a684 <_Heap_Walk_print+0x4c> <== ALWAYS TAKEN ffc0a664: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc0a668: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc0a66c: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc0a670: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc0a674: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc0a678: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc0a67c: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc0a680: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list ap; if ( error ) { ffc0a684: 2f 84 00 00 cmpwi cr7,r4,0 { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc0a688: 7c bf 2b 78 mr r31,r5 va_list ap; if ( error ) { ffc0a68c: 41 be 00 10 beq+ cr7,ffc0a69c <_Heap_Walk_print+0x64> printk( "FAIL[%d]: ", source ); ffc0a690: 3c 60 ff c2 lis r3,-62 ffc0a694: 38 63 f7 51 addi r3,r3,-2223 ffc0a698: 48 00 00 0c b ffc0a6a4 <_Heap_Walk_print+0x6c> } else { printk( "PASS[%d]: ", source ); ffc0a69c: 3c 60 ff c2 lis r3,-62 ffc0a6a0: 38 63 f7 5c addi r3,r3,-2212 ffc0a6a4: 7c 04 03 78 mr r4,r0 ffc0a6a8: 4c c6 31 82 crclr 4*cr1+eq ffc0a6ac: 4b ff b4 49 bl ffc05af4 } va_start( ap, fmt ); ffc0a6b0: 38 00 00 03 li r0,3 ffc0a6b4: 98 01 00 08 stb r0,8(r1) ffc0a6b8: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc0a6bc: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0a6c0: 98 01 00 09 stb r0,9(r1) ffc0a6c4: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc0a6c8: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc0a6cc: 90 01 00 0c stw r0,12(r1) ffc0a6d0: 38 01 00 10 addi r0,r1,16 ffc0a6d4: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc0a6d8: 4b ff d4 79 bl ffc07b50 va_end( ap ); } ffc0a6dc: 80 01 00 7c lwz r0,124(r1) ffc0a6e0: 83 e1 00 74 lwz r31,116(r1) ffc0a6e4: 38 21 00 78 addi r1,r1,120 ffc0a6e8: 7c 08 03 a6 mtlr r0 ffc0a6ec: 4e 80 00 20 blr =============================================================================== ffc0a30c <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { ffc0a30c: 94 21 ff d8 stwu r1,-40(r1) ffc0a310: 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; ffc0a314: 3d 20 00 00 lis r9,0 * workspace. * */ void _IO_Manager_initialization(void) { ffc0a318: 90 01 00 2c stw r0,44(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; ffc0a31c: 39 29 20 88 addi r9,r9,8328 * workspace. * */ void _IO_Manager_initialization(void) { ffc0a320: 93 c1 00 20 stw r30,32(r1) ffc0a324: 93 e1 00 24 stw r31,36(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; ffc0a328: 83 c9 00 2c lwz r30,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; ffc0a32c: 83 e9 00 30 lwz r31,48(r9) * workspace. * */ void _IO_Manager_initialization(void) { ffc0a330: 93 61 00 14 stw r27,20(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 ) ffc0a334: 7f 9e f8 40 cmplw cr7,r30,r31 * workspace. * */ void _IO_Manager_initialization(void) { ffc0a338: 93 81 00 18 stw r28,24(r1) ffc0a33c: 3f 80 00 00 lis r28,0 ffc0a340: 93 a1 00 1c stw r29,28(r1) ffc0a344: 3f a0 00 00 lis r29,0 ffc0a348: 93 21 00 0c stw r25,12(r1) ffc0a34c: 93 41 00 10 stw r26,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; ffc0a350: 83 69 00 34 lwz r27,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 ) ffc0a354: 40 9d 00 40 ble- cr7,ffc0a394 <_IO_Manager_initialization+0x88> * 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 ) ffc0a358: 1f 3e 00 18 mulli r25,r30,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 *) ffc0a35c: 7f 23 cb 78 mr r3,r25 ffc0a360: 48 00 38 89 bl ffc0dbe8 <_Workspace_Allocate_or_fatal_error> _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( ffc0a364: 7f 25 cb 78 mr r5,r25 ffc0a368: 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; ffc0a36c: 93 dd 28 08 stw r30,10248(r29) /* * 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 *) ffc0a370: 7c 7a 1b 78 mr r26,r3 ffc0a374: 90 7c 28 0c stw r3,10252(r28) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( ffc0a378: 48 00 e9 dd bl ffc18d54 ffc0a37c: 2f 9f 00 00 cmpwi cr7,r31,0 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; ffc0a380: 39 40 00 00 li r10,0 ffc0a384: 3b ff 00 01 addi r31,r31,1 ffc0a388: 40 be 00 4c bne+ cr7,ffc0a3d4 <_IO_Manager_initialization+0xc8><== ALWAYS TAKEN ffc0a38c: 3b e0 00 01 li r31,1 <== NOT EXECUTED ffc0a390: 48 00 00 44 b ffc0a3d4 <_IO_Manager_initialization+0xc8><== NOT EXECUTED * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; ffc0a394: 93 7c 28 0c stw r27,10252(r28) _IO_Number_of_drivers = number_of_drivers; ffc0a398: 93 fd 28 08 stw r31,10248(r29) return; ffc0a39c: 48 00 00 48 b ffc0a3e4 <_IO_Manager_initialization+0xd8> _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; ffc0a3a0: 7c c9 50 6e lwzux r6,r9,r10 ffc0a3a4: 81 09 00 08 lwz r8,8(r9) ffc0a3a8: 80 09 00 0c lwz r0,12(r9) ffc0a3ac: 80 e9 00 04 lwz r7,4(r9) ffc0a3b0: 7c da 51 2e stwx r6,r26,r10 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc0a3b4: 39 4a 00 18 addi r10,r10,24 _IO_Driver_address_table[index] = driver_table[index]; ffc0a3b8: 90 eb 00 04 stw r7,4(r11) ffc0a3bc: 91 0b 00 08 stw r8,8(r11) ffc0a3c0: 90 0b 00 0c stw r0,12(r11) ffc0a3c4: 81 09 00 14 lwz r8,20(r9) ffc0a3c8: 80 09 00 10 lwz r0,16(r9) ffc0a3cc: 91 0b 00 14 stw r8,20(r11) ffc0a3d0: 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++ ) ffc0a3d4: 37 ff ff ff addic. r31,r31,-1 _IO_Driver_address_table[index] = driver_table[index]; ffc0a3d8: 7f 69 db 78 mr r9,r27 ffc0a3dc: 7d 7a 52 14 add r11,r26,r10 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc0a3e0: 40 82 ff c0 bne+ ffc0a3a0 <_IO_Manager_initialization+0x94> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } ffc0a3e4: 80 01 00 2c lwz r0,44(r1) ffc0a3e8: 83 21 00 0c lwz r25,12(r1) ffc0a3ec: 7c 08 03 a6 mtlr r0 ffc0a3f0: 83 41 00 10 lwz r26,16(r1) ffc0a3f4: 83 61 00 14 lwz r27,20(r1) ffc0a3f8: 83 81 00 18 lwz r28,24(r1) ffc0a3fc: 83 a1 00 1c lwz r29,28(r1) ffc0a400: 83 c1 00 20 lwz r30,32(r1) ffc0a404: 83 e1 00 24 lwz r31,36(r1) ffc0a408: 38 21 00 28 addi r1,r1,40 ffc0a40c: 4e 80 00 20 blr =============================================================================== ffc0b32c <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0b32c: 94 21 ff f0 stwu r1,-16(r1) ffc0b330: 7c 08 02 a6 mflr r0 _Internal_errors_What_happened.the_source = the_source; ffc0b334: 3d 60 00 00 lis r11,0 ffc0b338: 39 2b 2d f0 addi r9,r11,11760 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc0b33c: 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; ffc0b340: 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; ffc0b344: 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 ) { ffc0b348: 93 e1 00 0c stw r31,12(r1) ffc0b34c: 7c bf 2b 78 mr r31,r5 _Internal_errors_What_happened.the_source = the_source; ffc0b350: 90 6b 2d f0 stw r3,11760(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 ); ffc0b354: 48 00 23 f1 bl ffc0d744 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; ffc0b358: 38 00 00 05 li r0,5 ffc0b35c: 3d 20 00 00 lis r9,0 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); ffc0b360: 7f e3 fb 78 mr r3,r31 ffc0b364: 90 09 27 f4 stw r0,10228(r9) ffc0b368: 4b ff 89 b9 bl ffc03d20 <_BSP_Fatal_error> ffc0b36c: 48 00 00 00 b ffc0b36c <_Internal_error_Occurred+0x40><== NOT EXECUTED =============================================================================== ffc0b38c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0b38c: 94 21 ff f0 stwu r1,-16(r1) ffc0b390: 7c 08 02 a6 mflr r0 ffc0b394: 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 ) ffc0b398: 80 03 00 18 lwz r0,24(r3) */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0b39c: 93 e1 00 0c stw r31,12(r1) ffc0b3a0: 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 ) ffc0b3a4: 2f 80 00 00 cmpwi cr7,r0,0 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc0b3a8: 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 ) ffc0b3ac: 38 60 00 00 li r3,0 ffc0b3b0: 41 be 00 70 beq+ cr7,ffc0b420 <_Objects_Allocate+0x94> <== NEVER TAKEN /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); ffc0b3b4: 3b df 00 20 addi r30,r31,32 ffc0b3b8: 7f c3 f3 78 mr r3,r30 ffc0b3bc: 4b ff f5 f1 bl ffc0a9ac <_Chain_Get> if ( information->auto_extend ) { ffc0b3c0: 88 1f 00 12 lbz r0,18(r31) ffc0b3c4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b3c8: 41 9e 00 58 beq- cr7,ffc0b420 <_Objects_Allocate+0x94> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { ffc0b3cc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b3d0: 40 be 00 1c bne+ cr7,ffc0b3ec <_Objects_Allocate+0x60> _Objects_Extend_information( information ); ffc0b3d4: 7f e3 fb 78 mr r3,r31 ffc0b3d8: 48 00 00 95 bl ffc0b46c <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); ffc0b3dc: 7f c3 f3 78 mr r3,r30 ffc0b3e0: 4b ff f5 cd bl ffc0a9ac <_Chain_Get> } if ( the_object ) { ffc0b3e4: 2c 03 00 00 cmpwi r3,0 ffc0b3e8: 41 a2 00 38 beq+ ffc0b420 <_Objects_Allocate+0x94> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc0b3ec: a1 63 00 0a lhz r11,10(r3) ffc0b3f0: a0 1f 00 0a lhz r0,10(r31) _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; ffc0b3f4: a1 3f 00 14 lhz r9,20(r31) } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc0b3f8: 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--; ffc0b3fc: 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 ]--; ffc0b400: 7c 00 4b 96 divwu r0,r0,r9 ffc0b404: 81 3f 00 30 lwz r9,48(r31) ffc0b408: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0b40c: 7d 49 00 2e lwzx r10,r9,r0 information->inactive--; ffc0b410: 39 6b ff ff addi r11,r11,-1 ffc0b414: 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 ]--; ffc0b418: 39 4a ff ff addi r10,r10,-1 ffc0b41c: 7d 49 01 2e stwx r10,r9,r0 information->inactive--; } } return the_object; } ffc0b420: 80 01 00 14 lwz r0,20(r1) ffc0b424: 83 c1 00 08 lwz r30,8(r1) ffc0b428: 7c 08 03 a6 mtlr r0 ffc0b42c: 83 e1 00 0c lwz r31,12(r1) ffc0b430: 38 21 00 10 addi r1,r1,16 ffc0b434: 4e 80 00 20 blr =============================================================================== ffc0b46c <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { ffc0b46c: 94 21 ff b8 stwu r1,-72(r1) ffc0b470: 7c 08 02 a6 mflr r0 ffc0b474: 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 ) ffc0b478: 81 63 00 34 lwz r11,52(r3) */ void _Objects_Extend_information( Objects_Information *information ) { ffc0b47c: 93 61 00 34 stw r27,52(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 ) ffc0b480: 2f 8b 00 00 cmpwi cr7,r11,0 */ void _Objects_Extend_information( Objects_Information *information ) { ffc0b484: 93 e1 00 44 stw r31,68(r1) ffc0b488: 7c 7f 1b 78 mr r31,r3 ffc0b48c: 92 a1 00 1c stw r21,28(r1) ffc0b490: 92 c1 00 20 stw r22,32(r1) ffc0b494: 92 e1 00 24 stw r23,36(r1) ffc0b498: 93 01 00 28 stw r24,40(r1) ffc0b49c: 93 21 00 2c stw r25,44(r1) ffc0b4a0: 93 41 00 30 stw r26,48(r1) ffc0b4a4: 93 81 00 38 stw r28,56(r1) ffc0b4a8: 93 a1 00 3c stw r29,60(r1) ffc0b4ac: 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 ); ffc0b4b0: a3 63 00 0a lhz r27,10(r3) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc0b4b4: 40 be 00 14 bne+ cr7,ffc0b4c8 <_Objects_Extend_information+0x5c> ffc0b4b8: 7f 7e db 78 mr r30,r27 ffc0b4bc: 3b 80 00 00 li r28,0 ffc0b4c0: 3b 40 00 00 li r26,0 ffc0b4c4: 48 00 00 4c b ffc0b510 <_Objects_Extend_information+0xa4> block_count = 0; else { block_count = information->maximum / information->allocation_size; ffc0b4c8: a1 23 00 14 lhz r9,20(r3) ffc0b4cc: 7f 7e db 78 mr r30,r27 ffc0b4d0: a3 43 00 10 lhz r26,16(r3) ffc0b4d4: 3b 80 00 00 li r28,0 ffc0b4d8: 7f 5a 4b 96 divwu r26,r26,r9 ffc0b4dc: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0b4e0: 38 1a 00 01 addi r0,r26,1 ffc0b4e4: 40 be 00 20 bne+ cr7,ffc0b504 <_Objects_Extend_information+0x98><== ALWAYS TAKEN ffc0b4e8: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0b4ec: 48 00 00 18 b ffc0b504 <_Objects_Extend_information+0x98><== NOT EXECUTED for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) ffc0b4f0: 7d 4b 50 2e lwzx r10,r11,r10 ffc0b4f4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0b4f8: 41 9e 00 18 beq- cr7,ffc0b510 <_Objects_Extend_information+0xa4> ffc0b4fc: 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++ ) { ffc0b500: 3b 9c 00 01 addi r28,r28,1 ffc0b504: 34 00 ff ff addic. r0,r0,-1 if ( information->object_blocks[ block ] == NULL ) ffc0b508: 57 8a 10 3a rlwinm r10,r28,2,0,29 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { ffc0b50c: 40 82 ff e4 bne+ ffc0b4f0 <_Objects_Extend_information+0x84> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; ffc0b510: a0 1f 00 14 lhz r0,20(r31) ffc0b514: a2 df 00 10 lhz r22,16(r31) ffc0b518: 7e c0 b2 14 add r22,r0,r22 /* * 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 ) { ffc0b51c: 2b 96 ff ff cmplwi cr7,r22,65535 ffc0b520: 41 9d 02 1c bgt- cr7,ffc0b73c <_Objects_Extend_information+0x2d0><== 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 ) { ffc0b524: 89 3f 00 12 lbz r9,18(r31) /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; ffc0b528: 80 7f 00 18 lwz r3,24(r31) if ( information->auto_extend ) { ffc0b52c: 2f 89 00 00 cmpwi cr7,r9,0 /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; ffc0b530: 7c 60 19 d6 mullw r3,r0,r3 if ( information->auto_extend ) { ffc0b534: 41 9e 00 14 beq- cr7,ffc0b548 <_Objects_Extend_information+0xdc> new_object_block = _Workspace_Allocate( block_size ); ffc0b538: 48 00 26 f9 bl ffc0dc30 <_Workspace_Allocate> if ( !new_object_block ) ffc0b53c: 7c 7d 1b 79 mr. r29,r3 ffc0b540: 40 a2 00 10 bne+ ffc0b550 <_Objects_Extend_information+0xe4> ffc0b544: 48 00 01 f8 b ffc0b73c <_Objects_Extend_information+0x2d0> return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); ffc0b548: 48 00 26 a1 bl ffc0dbe8 <_Workspace_Allocate_or_fatal_error> ffc0b54c: 7c 7d 1b 78 mr r29,r3 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { ffc0b550: a0 1f 00 10 lhz r0,16(r31) ffc0b554: 7f 9e 00 40 cmplw cr7,r30,r0 ffc0b558: 41 9c 01 5c blt- cr7,ffc0b6b4 <_Objects_Extend_information+0x248> */ /* * Up the block count and maximum */ block_count++; ffc0b55c: 3b 3a 00 01 addi r25,r26,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 ); ffc0b560: 1c 19 00 03 mulli r0,r25,3 ffc0b564: 7c 76 da 14 add r3,r22,r27 ffc0b568: 7c 63 02 14 add r3,r3,r0 ffc0b56c: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc0b570: 48 00 26 c1 bl ffc0dc30 <_Workspace_Allocate> if ( !object_blocks ) { ffc0b574: 7c 77 1b 79 mr. r23,r3 ffc0b578: 40 a2 00 10 bne+ ffc0b588 <_Objects_Extend_information+0x11c> _Workspace_Free( new_object_block ); ffc0b57c: 7f a3 eb 78 mr r3,r29 ffc0b580: 48 00 26 e5 bl ffc0dc64 <_Workspace_Free> return; ffc0b584: 48 00 01 b8 b ffc0b73c <_Objects_Extend_information+0x2d0> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc0b588: a0 1f 00 10 lhz r0,16(r31) } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( ffc0b58c: 57 39 10 3a rlwinm r25,r25,2,0,29 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); ffc0b590: 7f 17 ca 14 add r24,r23,r25 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc0b594: 7f 80 d8 40 cmplw cr7,r0,r27 ffc0b598: 7f 38 ca 14 add r25,r24,r25 ffc0b59c: 41 9d 00 20 bgt- cr7,ffc0b5bc <_Objects_Extend_information+0x150> ffc0b5a0: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0b5a4: 39 20 00 00 li r9,0 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; ffc0b5a8: 38 00 00 00 li r0,0 ffc0b5ac: 3b 7b 00 01 addi r27,r27,1 ffc0b5b0: 40 be 00 50 bne+ cr7,ffc0b600 <_Objects_Extend_information+0x194><== ALWAYS TAKEN ffc0b5b4: 3b 60 00 01 li r27,1 <== NOT EXECUTED ffc0b5b8: 48 00 00 48 b ffc0b600 <_Objects_Extend_information+0x194><== NOT EXECUTED * separate parts as size of each block has changed. */ memcpy( object_blocks, information->object_blocks, block_count * sizeof(void*) ); ffc0b5bc: 57 55 10 3a rlwinm r21,r26,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, ffc0b5c0: 80 9f 00 34 lwz r4,52(r31) ffc0b5c4: 7e a5 ab 78 mr r5,r21 ffc0b5c8: 48 00 d6 8d bl ffc18c54 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, ffc0b5cc: 80 9f 00 30 lwz r4,48(r31) ffc0b5d0: 7e a5 ab 78 mr r5,r21 ffc0b5d4: 7f 03 c3 78 mr r3,r24 ffc0b5d8: 48 00 d6 7d bl ffc18c54 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc0b5dc: a0 1f 00 10 lhz r0,16(r31) ffc0b5e0: 80 9f 00 1c lwz r4,28(r31) ffc0b5e4: 7f 23 cb 78 mr r3,r25 ffc0b5e8: 7f 7b 02 14 add r27,r27,r0 ffc0b5ec: 57 65 10 3a rlwinm r5,r27,2,0,29 ffc0b5f0: 48 00 d6 65 bl ffc18c54 ffc0b5f4: 48 00 00 18 b ffc0b60c <_Objects_Extend_information+0x1a0> /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; ffc0b5f8: 7c 0b c9 2e stwx r0,r11,r25 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0b5fc: 39 29 00 01 addi r9,r9,1 ffc0b600: 37 7b ff ff addic. r27,r27,-1 local_table[ index ] = NULL; ffc0b604: 55 2b 10 3a rlwinm r11,r9,2,0,29 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc0b608: 40 82 ff f0 bne+ ffc0b5f8 <_Objects_Extend_information+0x18c> */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc0b60c: a1 5f 00 14 lhz r10,20(r31) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc0b610: 38 00 00 00 li r0,0 ffc0b614: 57 5a 10 3a rlwinm r26,r26,2,0,29 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc0b618: 7d 7e 52 14 add r11,r30,r10 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; ffc0b61c: 7c 18 d1 2e stwx r0,r24,r26 ffc0b620: 7f 9e 58 40 cmplw cr7,r30,r11 for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc0b624: 57 c9 10 3a rlwinm r9,r30,2,0,29 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc0b628: 7c 17 d1 2e stwx r0,r23,r26 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc0b62c: 7d 39 4a 14 add r9,r25,r9 index++ ) { local_table[ index ] = NULL; ffc0b630: 38 0a 00 01 addi r0,r10,1 ffc0b634: 39 40 00 00 li r10,0 ffc0b638: 41 9d 00 0c bgt- cr7,ffc0b644 <_Objects_Extend_information+0x1d8><== NEVER TAKEN ffc0b63c: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0b640: 40 be 00 14 bne+ cr7,ffc0b654 <_Objects_Extend_information+0x1e8><== ALWAYS TAKEN ffc0b644: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0b648: 48 00 00 0c b ffc0b654 <_Objects_Extend_information+0x1e8><== NOT EXECUTED ffc0b64c: 91 49 00 00 stw r10,0(r9) object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { ffc0b650: 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 ; ffc0b654: 34 00 ff ff addic. r0,r0,-1 ffc0b658: 40 82 ff f4 bne+ ffc0b64c <_Objects_Extend_information+0x1e0> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b65c: 7c 00 00 a6 mfmsr r0 ffc0b660: 7d 30 42 a6 mfsprg r9,0 ffc0b664: 7c 09 48 78 andc r9,r0,r9 ffc0b668: 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( ffc0b66c: 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; ffc0b670: 56 d6 04 3e clrlwi r22,r22,16 information->maximum_id = _Objects_Build_id( ffc0b674: a1 3f 00 04 lhz r9,4(r31) ffc0b678: 55 6b c0 0e rlwinm r11,r11,24,0,7 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; ffc0b67c: 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( ffc0b680: 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; ffc0b684: 93 1f 00 30 stw r24,48(r31) information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( ffc0b688: 55 29 d8 08 rlwinm r9,r9,27,0,4 ffc0b68c: 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; ffc0b690: 93 3f 00 1c stw r25,28(r31) information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( ffc0b694: 7d 29 b3 78 or r9,r9,r22 ffc0b698: 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; ffc0b69c: b2 df 00 10 sth r22,16(r31) _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; ffc0b6a0: 92 ff 00 34 stw r23,52(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0b6a4: 7c 00 01 24 mtmsr r0 information->maximum ); _ISR_Enable( level ); if ( old_tables ) ffc0b6a8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b6ac: 41 9e 00 08 beq- cr7,ffc0b6b4 <_Objects_Extend_information+0x248> _Workspace_Free( old_tables ); ffc0b6b0: 48 00 25 b5 bl ffc0dc64 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc0b6b4: 81 3f 00 34 lwz r9,52(r31) ffc0b6b8: 57 9c 10 3a rlwinm r28,r28,2,0,29 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0b6bc: 3b 61 00 08 addi r27,r1,8 ffc0b6c0: 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; ffc0b6c4: 7f a9 e1 2e stwx r29,r9,r28 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0b6c8: 7f a4 eb 78 mr r4,r29 ffc0b6cc: 7f 63 db 78 mr r3,r27 ffc0b6d0: 80 df 00 18 lwz r6,24(r31) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0b6d4: 3b bf 00 20 addi r29,r31,32 information->object_blocks[ block ] = new_object_block; /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc0b6d8: 48 00 91 89 bl ffc14860 <_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 ) { ffc0b6dc: 48 00 00 2c b ffc0b708 <_Objects_Extend_information+0x29c> the_object->id = _Objects_Build_id( ffc0b6e0: 81 7f 00 00 lwz r11,0(r31) ffc0b6e4: a0 1f 00 04 lhz r0,4(r31) ffc0b6e8: 55 6b c0 0e rlwinm r11,r11,24,0,7 ffc0b6ec: 65 6b 00 01 oris r11,r11,1 ffc0b6f0: 54 00 d8 08 rlwinm r0,r0,27,0,4 ffc0b6f4: 7d 60 03 78 or r0,r11,r0 ffc0b6f8: 7c 00 f3 78 or r0,r0,r30 ffc0b6fc: 90 09 00 08 stw r0,8(r9) index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; ffc0b700: 3b de 00 01 addi r30,r30,1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0b704: 4b ff f2 51 bl ffc0a954 <_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 ) { ffc0b708: 7f 63 db 78 mr r3,r27 ffc0b70c: 4b ff f2 a1 bl ffc0a9ac <_Chain_Get> ffc0b710: 7c 69 1b 79 mr. r9,r3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc0b714: 7f a3 eb 78 mr r3,r29 ffc0b718: 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 ) { ffc0b71c: 40 82 ff c4 bne+ ffc0b6e0 <_Objects_Extend_information+0x274> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0b720: a0 1f 00 14 lhz r0,20(r31) information->inactive = ffc0b724: a1 3f 00 2c lhz r9,44(r31) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0b728: 81 7f 00 30 lwz r11,48(r31) information->inactive = ffc0b72c: 7d 20 4a 14 add r9,r0,r9 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0b730: 54 00 04 3e clrlwi r0,r0,16 information->inactive = ffc0b734: b1 3f 00 2c sth r9,44(r31) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc0b738: 7c 0b e1 2e stwx r0,r11,r28 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } ffc0b73c: 80 01 00 4c lwz r0,76(r1) ffc0b740: 82 a1 00 1c lwz r21,28(r1) ffc0b744: 7c 08 03 a6 mtlr r0 ffc0b748: 82 c1 00 20 lwz r22,32(r1) ffc0b74c: 82 e1 00 24 lwz r23,36(r1) ffc0b750: 83 01 00 28 lwz r24,40(r1) ffc0b754: 83 21 00 2c lwz r25,44(r1) ffc0b758: 83 41 00 30 lwz r26,48(r1) ffc0b75c: 83 61 00 34 lwz r27,52(r1) ffc0b760: 83 81 00 38 lwz r28,56(r1) ffc0b764: 83 a1 00 3c lwz r29,60(r1) ffc0b768: 83 c1 00 40 lwz r30,64(r1) ffc0b76c: 83 e1 00 44 lwz r31,68(r1) ffc0b770: 38 21 00 48 addi r1,r1,72 ffc0b774: 4e 80 00 20 blr =============================================================================== ffc0b844 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { ffc0b844: 94 21 ff f0 stwu r1,-16(r1) ffc0b848: 7c 08 02 a6 mflr r0 ffc0b84c: 93 e1 00 0c stw r31,12(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc0b850: 7c 9f 23 79 mr. r31,r4 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { ffc0b854: 93 c1 00 08 stw r30,8(r1) ffc0b858: 7c 7e 1b 78 mr r30,r3 ffc0b85c: 90 01 00 14 stw r0,20(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc0b860: 41 a2 00 4c beq+ ffc0b8ac <_Objects_Get_information+0x68> /* * 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 ); ffc0b864: 48 00 98 e1 bl ffc15144 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) ffc0b868: 2c 03 00 00 cmpwi r3,0 ffc0b86c: 41 a2 00 40 beq+ ffc0b8ac <_Objects_Get_information+0x68> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) ffc0b870: 7f 9f 18 40 cmplw cr7,r31,r3 ffc0b874: 41 bd 00 38 bgt+ cr7,ffc0b8ac <_Objects_Get_information+0x68> return NULL; if ( !_Objects_Information_table[ the_api ] ) ffc0b878: 3d 20 00 00 lis r9,0 ffc0b87c: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc0b880: 39 29 2c e0 addi r9,r9,11488 ffc0b884: 7d 29 f0 2e lwzx r9,r9,r30 ffc0b888: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b88c: 41 be 00 20 beq+ cr7,ffc0b8ac <_Objects_Get_information+0x68><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; ffc0b890: 57 ff 10 3a rlwinm r31,r31,2,0,29 ffc0b894: 7c 69 f8 2e lwzx r3,r9,r31 if ( !info ) ffc0b898: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b89c: 41 be 00 14 beq+ cr7,ffc0b8b0 <_Objects_Get_information+0x6c><== NEVER TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) ffc0b8a0: a0 03 00 10 lhz r0,16(r3) ffc0b8a4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b8a8: 40 be 00 08 bne+ cr7,ffc0b8b0 <_Objects_Get_information+0x6c> ffc0b8ac: 38 60 00 00 li r3,0 return NULL; #endif return info; } ffc0b8b0: 80 01 00 14 lwz r0,20(r1) ffc0b8b4: 83 c1 00 08 lwz r30,8(r1) ffc0b8b8: 7c 08 03 a6 mtlr r0 ffc0b8bc: 83 e1 00 0c lwz r31,12(r1) ffc0b8c0: 38 21 00 10 addi r1,r1,16 ffc0b8c4: 4e 80 00 20 blr =============================================================================== ffc1c81c <_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; ffc1c81c: 81 23 00 08 lwz r9,8(r3) if ( information->maximum >= index ) { ffc1c820: 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; ffc1c824: 21 29 00 01 subfic r9,r9,1 ffc1c828: 7d 29 22 14 add r9,r9,r4 if ( information->maximum >= index ) { ffc1c82c: 7f 80 48 40 cmplw cr7,r0,r9 ffc1c830: 41 9c 00 24 blt- cr7,ffc1c854 <_Objects_Get_no_protection+0x38> if ( (the_object = information->local_table[ index ]) != NULL ) { ffc1c834: 81 63 00 1c lwz r11,28(r3) ffc1c838: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc1c83c: 7c 6b 48 2e lwzx r3,r11,r9 ffc1c840: 2f 83 00 00 cmpwi cr7,r3,0 ffc1c844: 41 9e 00 10 beq- cr7,ffc1c854 <_Objects_Get_no_protection+0x38><== NEVER TAKEN *location = OBJECTS_LOCAL; ffc1c848: 38 00 00 00 li r0,0 ffc1c84c: 90 05 00 00 stw r0,0(r5) return the_object; ffc1c850: 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; ffc1c854: 38 00 00 01 li r0,1 ffc1c858: 90 05 00 00 stw r0,0(r5) ffc1c85c: 38 60 00 00 li r3,0 return NULL; } ffc1c860: 4e 80 00 20 blr =============================================================================== ffc0b40c <_Objects_Id_to_name>: /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0b40c: 2c 03 00 00 cmpwi r3,0 */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc0b410: 94 21 ff e0 stwu r1,-32(r1) ffc0b414: 7c 08 02 a6 mflr r0 ffc0b418: 93 e1 00 1c stw r31,28(r1) ffc0b41c: 7c 9f 23 78 mr r31,r4 ffc0b420: 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; ffc0b424: 41 82 00 0c beq- ffc0b430 <_Objects_Id_to_name+0x24> ffc0b428: 7c 64 1b 78 mr r4,r3 ffc0b42c: 48 00 00 10 b ffc0b43c <_Objects_Id_to_name+0x30> ffc0b430: 3d 20 00 00 lis r9,0 ffc0b434: 81 29 27 fc lwz r9,10236(r9) ffc0b438: 80 89 00 08 lwz r4,8(r9) */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); ffc0b43c: 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 ) ffc0b440: 38 09 ff ff addi r0,r9,-1 ffc0b444: 2b 80 00 03 cmplwi cr7,r0,3 ffc0b448: 41 9d 00 48 bgt- cr7,ffc0b490 <_Objects_Id_to_name+0x84> ffc0b44c: 48 00 00 5c b ffc0b4a8 <_Objects_Id_to_name+0x9c> if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; ffc0b450: 54 80 3e 7a rlwinm r0,r4,7,25,29 ffc0b454: 7c 69 00 2e lwzx r3,r9,r0 if ( !information ) ffc0b458: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b45c: 41 9e 00 34 beq- cr7,ffc0b490 <_Objects_Id_to_name+0x84><== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) ffc0b460: 88 03 00 38 lbz r0,56(r3) ffc0b464: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b468: 40 9e 00 28 bne- cr7,ffc0b490 <_Objects_Id_to_name+0x84><== NEVER TAKEN return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); ffc0b46c: 38 a1 00 08 addi r5,r1,8 ffc0b470: 4b ff ff 0d bl ffc0b37c <_Objects_Get> if ( !the_object ) ffc0b474: 2c 03 00 00 cmpwi r3,0 ffc0b478: 41 82 00 18 beq- ffc0b490 <_Objects_Id_to_name+0x84> return OBJECTS_INVALID_ID; *name = the_object->name; ffc0b47c: 80 03 00 0c lwz r0,12(r3) ffc0b480: 90 1f 00 00 stw r0,0(r31) _Thread_Enable_dispatch(); ffc0b484: 48 00 0a c1 bl ffc0bf44 <_Thread_Enable_dispatch> ffc0b488: 38 60 00 00 li r3,0 return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; ffc0b48c: 48 00 00 08 b ffc0b494 <_Objects_Id_to_name+0x88> ffc0b490: 38 60 00 03 li r3,3 } ffc0b494: 80 01 00 24 lwz r0,36(r1) ffc0b498: 83 e1 00 1c lwz r31,28(r1) ffc0b49c: 38 21 00 20 addi r1,r1,32 ffc0b4a0: 7c 08 03 a6 mtlr r0 ffc0b4a4: 4e 80 00 20 blr the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) ffc0b4a8: 3d 60 00 00 lis r11,0 ffc0b4ac: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0b4b0: 39 6b 2c 80 addi r11,r11,11392 ffc0b4b4: 7d 2b 48 2e lwzx r9,r11,r9 ffc0b4b8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b4bc: 40 9e ff 94 bne+ cr7,ffc0b450 <_Objects_Id_to_name+0x44> ffc0b4c0: 4b ff ff d0 b ffc0b490 <_Objects_Id_to_name+0x84> =============================================================================== ffc0a5e0 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { ffc0a5e0: 94 21 ff e8 stwu r1,-24(r1) ffc0a5e4: 7c 08 02 a6 mflr r0 ffc0a5e8: 90 01 00 1c stw r0,28(r1) ffc0a5ec: 93 c1 00 10 stw r30,16(r1) ffc0a5f0: 7c 9e 23 78 mr r30,r4 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); ffc0a5f4: a0 83 00 3a lhz r4,58(r3) bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { ffc0a5f8: 93 a1 00 0c stw r29,12(r1) ffc0a5fc: 7c 7d 1b 78 mr r29,r3 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); ffc0a600: 7c a3 2b 78 mr r3,r5 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { ffc0a604: 93 81 00 08 stw r28,8(r1) ffc0a608: 7c bc 2b 78 mr r28,r5 ffc0a60c: 93 e1 00 14 stw r31,20(r1) size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); ffc0a610: 48 00 a0 75 bl ffc14684 ffc0a614: 7c 7f 1b 78 mr r31,r3 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { ffc0a618: 88 1d 00 38 lbz r0,56(r29) ffc0a61c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a620: 41 be 00 54 beq+ cr7,ffc0a674 <_Objects_Set_name+0x94> char *d; d = _Workspace_Allocate( length + 1 ); ffc0a624: 38 63 00 01 addi r3,r3,1 ffc0a628: 48 00 22 15 bl ffc0c83c <_Workspace_Allocate> if ( !d ) ffc0a62c: 7c 7d 1b 79 mr. r29,r3 ffc0a630: 38 60 00 00 li r3,0 ffc0a634: 41 82 00 8c beq- ffc0a6c0 <_Objects_Set_name+0xe0> <== NEVER TAKEN return false; if ( the_object->name.name_p ) { ffc0a638: 80 7e 00 0c lwz r3,12(r30) ffc0a63c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a640: 41 9e 00 10 beq- cr7,ffc0a650 <_Objects_Set_name+0x70> _Workspace_Free( (void *)the_object->name.name_p ); ffc0a644: 48 00 22 2d bl ffc0c870 <_Workspace_Free> the_object->name.name_p = NULL; ffc0a648: 38 00 00 00 li r0,0 ffc0a64c: 90 1e 00 0c stw r0,12(r30) } strncpy( d, name, length ); ffc0a650: 7f 84 e3 78 mr r4,r28 ffc0a654: 7f a3 eb 78 mr r3,r29 ffc0a658: 7f e5 fb 78 mr r5,r31 ffc0a65c: 48 00 9f 49 bl ffc145a4 d[length] = '\0'; ffc0a660: 38 00 00 00 li r0,0 ffc0a664: 7c 1d f9 ae stbx r0,r29,r31 the_object->name.name_p = d; ffc0a668: 38 60 00 01 li r3,1 ffc0a66c: 93 be 00 0c stw r29,12(r30) ffc0a670: 48 00 00 50 b ffc0a6c0 <_Objects_Set_name+0xe0> } else #endif { the_object->name.name_u32 = _Objects_Build_name( ffc0a674: 2b 83 00 01 cmplwi cr7,r3,1 ffc0a678: 89 5c 00 00 lbz r10,0(r28) ffc0a67c: 40 9d 00 64 ble- cr7,ffc0a6e0 <_Objects_Set_name+0x100> ffc0a680: 2b 83 00 02 cmplwi cr7,r3,2 ffc0a684: 89 7c 00 01 lbz r11,1(r28) ffc0a688: 55 6b 80 1e rlwinm r11,r11,16,0,15 ffc0a68c: 40 9d 00 58 ble- cr7,ffc0a6e4 <_Objects_Set_name+0x104> ffc0a690: 2b 83 00 03 cmplwi cr7,r3,3 ffc0a694: 89 3c 00 02 lbz r9,2(r28) ffc0a698: 38 00 00 20 li r0,32 ffc0a69c: 55 29 40 2e rlwinm r9,r9,8,0,23 ffc0a6a0: 40 9d 00 08 ble- cr7,ffc0a6a8 <_Objects_Set_name+0xc8> ffc0a6a4: 88 1c 00 03 lbz r0,3(r28) ffc0a6a8: 55 4a c0 0e rlwinm r10,r10,24,0,7 ffc0a6ac: 7d 6b 53 78 or r11,r11,r10 ffc0a6b0: 7d 69 4b 78 or r9,r11,r9 ffc0a6b4: 7d 20 03 78 or r0,r9,r0 ffc0a6b8: 90 1e 00 0c stw r0,12(r30) ffc0a6bc: 38 60 00 01 li r3,1 ); } return true; } ffc0a6c0: 80 01 00 1c lwz r0,28(r1) ffc0a6c4: 83 81 00 08 lwz r28,8(r1) ffc0a6c8: 7c 08 03 a6 mtlr r0 ffc0a6cc: 83 a1 00 0c lwz r29,12(r1) ffc0a6d0: 83 c1 00 10 lwz r30,16(r1) ffc0a6d4: 83 e1 00 14 lwz r31,20(r1) ffc0a6d8: 38 21 00 18 addi r1,r1,24 ffc0a6dc: 4e 80 00 20 blr d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( ffc0a6e0: 3d 60 00 20 lis r11,32 ffc0a6e4: 39 20 20 00 li r9,8192 ffc0a6e8: 38 00 00 20 li r0,32 ffc0a6ec: 4b ff ff bc b ffc0a6a8 <_Objects_Set_name+0xc8> =============================================================================== ffc0bb94 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0bb94: 94 21 ff e8 stwu r1,-24(r1) ffc0bb98: 7c 08 02 a6 mflr r0 /* * 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) / ffc0bb9c: 39 20 00 00 li r9,0 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0bba0: 90 01 00 1c stw r0,28(r1) ffc0bba4: 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) / ffc0bba8: a1 43 00 10 lhz r10,16(r3) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); ffc0bbac: a3 c3 00 0a lhz r30,10(r3) block_count = (information->maximum - index_base) / ffc0bbb0: a1 63 00 14 lhz r11,20(r3) ffc0bbb4: 7d 5e 50 50 subf r10,r30,r10 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0bbb8: 93 e1 00 14 stw r31,20(r1) /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / ffc0bbbc: 7d 4a 5b 96 divwu r10,r10,r11 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0bbc0: 93 81 00 08 stw r28,8(r1) ffc0bbc4: 93 a1 00 0c stw r29,12(r1) ffc0bbc8: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0bbcc: 7c 7f 1b 78 mr r31,r3 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / ffc0bbd0: 38 0a 00 01 addi r0,r10,1 ffc0bbd4: 40 be 00 88 bne+ cr7,ffc0bc5c <_Objects_Shrink_information+0xc8><== ALWAYS TAKEN ffc0bbd8: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0bbdc: 48 00 00 80 b ffc0bc5c <_Objects_Shrink_information+0xc8><== NOT EXECUTED information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == ffc0bbe0: 81 5f 00 30 lwz r10,48(r31) index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0bbe4: 39 29 00 01 addi r9,r9,1 if ( information->inactive_per_block[ block ] == ffc0bbe8: 7d 4a e8 2e lwzx r10,r10,r29 ffc0bbec: 7f 8a 58 00 cmpw cr7,r10,r11 ffc0bbf0: 40 be 00 68 bne+ cr7,ffc0bc58 <_Objects_Shrink_information+0xc4> information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; ffc0bbf4: 80 7f 00 20 lwz r3,32(r31) do { index = _Objects_Get_index( the_object->id ); ffc0bbf8: 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; ffc0bbfc: 83 83 00 00 lwz r28,0(r3) if ((index >= index_base) && ffc0bc00: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0bc04: 41 9c 00 18 blt- cr7,ffc0bc1c <_Objects_Shrink_information+0x88> (index < (index_base + information->allocation_size))) { ffc0bc08: a1 3f 00 14 lhz r9,20(r31) ffc0bc0c: 7d 3e 4a 14 add r9,r30,r9 ffc0bc10: 7f 80 48 40 cmplw cr7,r0,r9 ffc0bc14: 40 bc 00 08 bge+ cr7,ffc0bc1c <_Objects_Shrink_information+0x88> _Chain_Extract( &extract_me->Node ); ffc0bc18: 4b ff ed 6d bl ffc0a984 <_Chain_Extract> } } while ( the_object ); ffc0bc1c: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0bc20: 7f 83 e3 78 mr r3,r28 ffc0bc24: 40 9e ff d4 bne+ cr7,ffc0bbf8 <_Objects_Shrink_information+0x64> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); ffc0bc28: 81 3f 00 34 lwz r9,52(r31) ffc0bc2c: 7c 69 e8 2e lwzx r3,r9,r29 ffc0bc30: 48 00 20 35 bl ffc0dc64 <_Workspace_Free> information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc0bc34: a1 5f 00 2c lhz r10,44(r31) ffc0bc38: a0 1f 00 14 lhz r0,20(r31) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; ffc0bc3c: 81 3f 00 34 lwz r9,52(r31) information->inactive_per_block[ block ] = 0; ffc0bc40: 81 7f 00 30 lwz r11,48(r31) information->inactive -= information->allocation_size; ffc0bc44: 7c 00 50 50 subf r0,r0,r10 ffc0bc48: b0 1f 00 2c sth r0,44(r31) * 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; ffc0bc4c: 7f 8b e9 2e stwx r28,r11,r29 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; ffc0bc50: 7f 89 e9 2e stwx r28,r9,r29 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; ffc0bc54: 48 00 00 14 b ffc0bc68 <_Objects_Shrink_information+0xd4> } index_base += information->allocation_size; ffc0bc58: 7f de 5a 14 add r30,r30,r11 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc0bc5c: 34 00 ff ff addic. r0,r0,-1 ffc0bc60: 55 3d 10 3a rlwinm r29,r9,2,0,29 ffc0bc64: 40 82 ff 7c bne+ ffc0bbe0 <_Objects_Shrink_information+0x4c> return; } index_base += information->allocation_size; } } ffc0bc68: 80 01 00 1c lwz r0,28(r1) ffc0bc6c: 83 81 00 08 lwz r28,8(r1) ffc0bc70: 7c 08 03 a6 mtlr r0 ffc0bc74: 83 a1 00 0c lwz r29,12(r1) ffc0bc78: 83 c1 00 10 lwz r30,16(r1) ffc0bc7c: 83 e1 00 14 lwz r31,20(r1) ffc0bc80: 38 21 00 18 addi r1,r1,24 ffc0bc84: 4e 80 00 20 blr =============================================================================== ffc091e8 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { ffc091e8: 94 21 ff d0 stwu r1,-48(r1) ffc091ec: 7c 08 02 a6 mflr r0 ffc091f0: 93 a1 00 24 stw r29,36(r1) register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { ffc091f4: 3b a1 00 08 addi r29,r1,8 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { ffc091f8: 93 e1 00 2c stw r31,44(r1) ffc091fc: 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 ) ) { ffc09200: 7f a4 eb 78 mr r4,r29 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { ffc09204: 93 c1 00 28 stw r30,40(r1) ffc09208: 7c 7e 1b 78 mr r30,r3 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { ffc0920c: 7f e3 fb 78 mr r3,r31 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { ffc09210: 93 61 00 1c stw r27,28(r1) ffc09214: 7c db 33 78 mr r27,r6 ffc09218: 93 81 00 20 stw r28,32(r1) ffc0921c: 7c bc 2b 78 mr r28,r5 ffc09220: 90 01 00 34 stw r0,52(r1) ffc09224: 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 ) ) { ffc09228: 48 00 02 3d bl ffc09464 <_POSIX_Mutex_Get> ffc0922c: 2f 83 00 00 cmpwi cr7,r3,0 ffc09230: 41 9e 00 d8 beq- cr7,ffc09308 <_POSIX_Condition_variables_Wait_support+0x120> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc09234: 3d 20 00 00 lis r9,0 ffc09238: 81 69 27 c8 lwz r11,10184(r9) return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); ffc0923c: 7f a4 eb 78 mr r4,r29 ffc09240: 7f c3 f3 78 mr r3,r30 ffc09244: 38 0b ff ff addi r0,r11,-1 ffc09248: 90 09 27 c8 stw r0,10184(r9) ffc0924c: 4b ff fc e9 bl ffc08f34 <_POSIX_Condition_variables_Get> ffc09250: 7c 7a 1b 78 mr r26,r3 switch ( location ) { ffc09254: 80 01 00 08 lwz r0,8(r1) ffc09258: 2f 80 00 00 cmpwi cr7,r0,0 ffc0925c: 40 9e 00 ac bne- cr7,ffc09308 <_POSIX_Condition_variables_Wait_support+0x120> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { ffc09260: 80 03 00 14 lwz r0,20(r3) ffc09264: 2f 80 00 00 cmpwi cr7,r0,0 ffc09268: 41 9e 00 18 beq- cr7,ffc09280 <_POSIX_Condition_variables_Wait_support+0x98> ffc0926c: 81 3f 00 00 lwz r9,0(r31) ffc09270: 7f 80 48 00 cmpw cr7,r0,r9 ffc09274: 41 9e 00 0c beq- cr7,ffc09280 <_POSIX_Condition_variables_Wait_support+0x98> _Thread_Enable_dispatch(); ffc09278: 48 00 3d 21 bl ffc0cf98 <_Thread_Enable_dispatch> ffc0927c: 48 00 00 8c b ffc09308 <_POSIX_Condition_variables_Wait_support+0x120> return EINVAL; } (void) pthread_mutex_unlock( mutex ); ffc09280: 7f e3 fb 78 mr r3,r31 ffc09284: 48 00 04 99 bl ffc0971c _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { ffc09288: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0928c: 40 be 00 64 bne+ cr7,ffc092f0 <_POSIX_Condition_variables_Wait_support+0x108> the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; ffc09290: 3f a0 00 00 lis r29,0 return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; ffc09294: 80 1f 00 00 lwz r0,0(r31) _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; ffc09298: 81 3d 28 08 lwz r9,10248(r29) 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; ffc0929c: 39 40 00 01 li r10,1 return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; ffc092a0: 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; ffc092a4: 38 1a 00 18 addi r0,r26,24 _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); ffc092a8: 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; ffc092ac: 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 ); ffc092b0: 7c 03 03 78 mr r3,r0 ffc092b4: 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; ffc092b8: 81 7e 00 00 lwz r11,0(r30) _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); ffc092bc: 38 a5 da 14 addi r5,r5,-9708 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; ffc092c0: 90 09 00 44 stw r0,68(r9) _Thread_Executing->Wait.id = *cond; ffc092c4: 91 69 00 20 stw r11,32(r9) ffc092c8: 91 5a 00 48 stw r10,72(r26) _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); ffc092cc: 48 00 42 cd bl ffc0d598 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); ffc092d0: 48 00 3c c9 bl ffc0cf98 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; ffc092d4: 81 3d 28 08 lwz r9,10248(r29) ffc092d8: 83 c9 00 34 lwz r30,52(r9) if ( status && status != ETIMEDOUT ) ffc092dc: 2f 9e 00 00 cmpwi cr7,r30,0 ffc092e0: 41 be 00 18 beq+ cr7,ffc092f8 <_POSIX_Condition_variables_Wait_support+0x110> ffc092e4: 2f 9e 00 74 cmpwi cr7,r30,116 ffc092e8: 40 be 00 24 bne+ cr7,ffc0930c <_POSIX_Condition_variables_Wait_support+0x124><== NEVER TAKEN ffc092ec: 48 00 00 0c b ffc092f8 <_POSIX_Condition_variables_Wait_support+0x110> return status; } else { _Thread_Enable_dispatch(); ffc092f0: 48 00 3c a9 bl ffc0cf98 <_Thread_Enable_dispatch> ffc092f4: 3b c0 00 74 li r30,116 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); ffc092f8: 7f e3 fb 78 mr r3,r31 ffc092fc: 48 00 03 69 bl ffc09664 if ( mutex_status ) ffc09300: 2f 83 00 00 cmpwi cr7,r3,0 ffc09304: 41 be 00 08 beq+ cr7,ffc0930c <_POSIX_Condition_variables_Wait_support+0x124> ffc09308: 3b c0 00 16 li r30,22 case OBJECTS_ERROR: break; } return EINVAL; } ffc0930c: 80 01 00 34 lwz r0,52(r1) ffc09310: 7f c3 f3 78 mr r3,r30 ffc09314: 83 41 00 18 lwz r26,24(r1) ffc09318: 7c 08 03 a6 mtlr r0 ffc0931c: 83 61 00 1c lwz r27,28(r1) ffc09320: 83 81 00 20 lwz r28,32(r1) ffc09324: 83 a1 00 24 lwz r29,36(r1) ffc09328: 83 c1 00 28 lwz r30,40(r1) ffc0932c: 83 e1 00 2c lwz r31,44(r1) ffc09330: 38 21 00 30 addi r1,r1,48 ffc09334: 4e 80 00 20 blr =============================================================================== ffc0d790 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { ffc0d790: 94 21 ff c8 stwu r1,-56(r1) ffc0d794: 7c 08 02 a6 mflr r0 ffc0d798: 93 e1 00 34 stw r31,52(r1) ffc0d79c: 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( ffc0d7a0: 3c 60 00 00 lis r3,0 ffc0d7a4: 93 81 00 28 stw r28,40(r1) ffc0d7a8: 38 63 36 44 addi r3,r3,13892 ffc0d7ac: 7c bc 2b 78 mr r28,r5 ffc0d7b0: 93 a1 00 2c stw r29,44(r1) ffc0d7b4: 38 a1 00 08 addi r5,r1,8 ffc0d7b8: 7c 9d 23 78 mr r29,r4 ffc0d7bc: 7f e4 fb 78 mr r4,r31 ffc0d7c0: 90 01 00 3c stw r0,60(r1) ffc0d7c4: 93 61 00 24 stw r27,36(r1) ffc0d7c8: 7c fb 3b 78 mr r27,r7 ffc0d7cc: 93 c1 00 30 stw r30,48(r1) ffc0d7d0: 7c de 33 78 mr r30,r6 ffc0d7d4: 91 01 00 18 stw r8,24(r1) ffc0d7d8: 48 00 3a a9 bl ffc11280 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { ffc0d7dc: 80 01 00 08 lwz r0,8(r1) ffc0d7e0: 81 01 00 18 lwz r8,24(r1) ffc0d7e4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d7e8: 40 9e 00 bc bne- cr7,ffc0d8a4 <_POSIX_Message_queue_Receive_support+0x114> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { ffc0d7ec: 80 03 00 14 lwz r0,20(r3) ffc0d7f0: 54 09 07 be clrlwi r9,r0,30 ffc0d7f4: 2f 89 00 01 cmpwi cr7,r9,1 ffc0d7f8: 40 be 00 0c bne+ cr7,ffc0d804 <_POSIX_Message_queue_Receive_support+0x74> _Thread_Enable_dispatch(); ffc0d7fc: 48 00 46 01 bl ffc11dfc <_Thread_Enable_dispatch> ffc0d800: 48 00 00 a4 b ffc0d8a4 <_POSIX_Message_queue_Receive_support+0x114> rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; ffc0d804: 80 63 00 10 lwz r3,16(r3) if ( msg_len < the_mq->Message_queue.maximum_message_size ) { ffc0d808: 81 23 00 68 lwz r9,104(r3) ffc0d80c: 7f 9c 48 40 cmplw cr7,r28,r9 ffc0d810: 40 bc 00 14 bge+ cr7,ffc0d824 <_POSIX_Message_queue_Receive_support+0x94> _Thread_Enable_dispatch(); ffc0d814: 48 00 45 e9 bl ffc11dfc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); ffc0d818: 48 00 bf 09 bl ffc19720 <__errno> ffc0d81c: 38 00 00 7a li r0,122 ffc0d820: 48 00 00 8c b ffc0d8ac <_POSIX_Message_queue_Receive_support+0x11c> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) ffc0d824: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0d828: 38 e0 00 00 li r7,0 ffc0d82c: 41 9e 00 0c beq- cr7,ffc0d838 <_POSIX_Message_queue_Receive_support+0xa8><== NEVER TAKEN do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; ffc0d830: 68 07 40 00 xori r7,r0,16384 ffc0d834: 54 e7 97 fe rlwinm r7,r7,18,31,31 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; ffc0d838: 38 00 ff ff li r0,-1 ffc0d83c: 7c 26 0b 78 mr r6,r1 ffc0d840: 94 06 00 0c stwu r0,12(r6) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( ffc0d844: 7f e4 fb 78 mr r4,r31 ffc0d848: 38 63 00 1c addi r3,r3,28 ffc0d84c: 7f a5 eb 78 mr r5,r29 timeout ); _Thread_Enable_dispatch(); *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); ffc0d850: 3f e0 00 00 lis r31,0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( ffc0d854: 48 00 27 29 bl ffc0ff7c <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); ffc0d858: 48 00 45 a5 bl ffc11dfc <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); ffc0d85c: 81 3f 2a 38 lwz r9,10808(r31) if ( !_Thread_Executing->Wait.return_code ) ffc0d860: 80 09 00 34 lwz r0,52(r9) do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = ffc0d864: 81 29 00 24 lwz r9,36(r9) _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) ffc0d868: 2f 80 00 00 cmpwi cr7,r0,0 do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = ffc0d86c: 7d 2b fe 70 srawi r11,r9,31 ffc0d870: 7d 60 4a 78 xor r0,r11,r9 ffc0d874: 7c 0b 00 50 subf r0,r11,r0 ffc0d878: 90 1e 00 00 stw r0,0(r30) _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) ffc0d87c: 40 9e 00 0c bne- cr7,ffc0d888 <_POSIX_Message_queue_Receive_support+0xf8> return length_out; ffc0d880: 80 61 00 0c lwz r3,12(r1) ffc0d884: 48 00 00 30 b ffc0d8b4 <_POSIX_Message_queue_Receive_support+0x124> rtems_set_errno_and_return_minus_one( ffc0d888: 48 00 be 99 bl ffc19720 <__errno> ffc0d88c: 81 3f 2a 38 lwz r9,10808(r31) ffc0d890: 7c 7e 1b 78 mr r30,r3 ffc0d894: 80 69 00 34 lwz r3,52(r9) ffc0d898: 48 00 03 29 bl ffc0dbc0 <_POSIX_Message_queue_Translate_core_message_queue_return_code> ffc0d89c: 90 7e 00 00 stw r3,0(r30) ffc0d8a0: 48 00 00 10 b ffc0d8b0 <_POSIX_Message_queue_Receive_support+0x120> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); ffc0d8a4: 48 00 be 7d bl ffc19720 <__errno> ffc0d8a8: 38 00 00 09 li r0,9 ffc0d8ac: 90 03 00 00 stw r0,0(r3) ffc0d8b0: 38 60 ff ff li r3,-1 } ffc0d8b4: 80 01 00 3c lwz r0,60(r1) ffc0d8b8: 83 61 00 24 lwz r27,36(r1) ffc0d8bc: 7c 08 03 a6 mtlr r0 ffc0d8c0: 83 81 00 28 lwz r28,40(r1) ffc0d8c4: 83 a1 00 2c lwz r29,44(r1) ffc0d8c8: 83 c1 00 30 lwz r30,48(r1) ffc0d8cc: 83 e1 00 34 lwz r31,52(r1) ffc0d8d0: 38 21 00 38 addi r1,r1,56 ffc0d8d4: 4e 80 00 20 blr =============================================================================== ffc0dc94 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { ffc0dc94: 7c 08 02 a6 mflr r0 ffc0dc98: 94 21 ff f8 stwu r1,-8(r1) ffc0dc9c: 90 01 00 0c stw r0,12(r1) POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0dca0: 81 23 01 48 lwz r9,328(r3) if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && ffc0dca4: 80 09 00 d4 lwz r0,212(r9) ffc0dca8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0dcac: 40 9e 00 38 bne- cr7,ffc0dce4 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x50><== NEVER TAKEN thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && ffc0dcb0: 80 09 00 d8 lwz r0,216(r9) ffc0dcb4: 2f 80 00 01 cmpwi cr7,r0,1 ffc0dcb8: 40 be 00 2c bne+ cr7,ffc0dce4 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x50> thread_support->cancelation_requested ) { ffc0dcbc: 80 09 00 dc lwz r0,220(r9) ffc0dcc0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0dcc4: 41 be 00 20 beq+ cr7,ffc0dce4 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x50> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0dcc8: 3d 20 00 00 lis r9,0 ffc0dccc: 81 69 27 9c lwz r11,10140(r9) _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); ffc0dcd0: 38 80 ff ff li r4,-1 ffc0dcd4: 38 0b ff ff addi r0,r11,-1 ffc0dcd8: 90 09 27 9c stw r0,10140(r9) ffc0dcdc: 48 00 08 29 bl ffc0e504 <_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 && ffc0dce0: 48 00 00 08 b ffc0dce8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x54> thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); ffc0dce4: 4b ff cd d9 bl ffc0aabc <_Thread_Enable_dispatch> } ffc0dce8: 80 01 00 0c lwz r0,12(r1) ffc0dcec: 38 21 00 08 addi r1,r1,8 ffc0dcf0: 7c 08 03 a6 mtlr r0 ffc0dcf4: 4e 80 00 20 blr =============================================================================== ffc0f3f4 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { ffc0f3f4: 94 21 ff e8 stwu r1,-24(r1) ffc0f3f8: 7c 08 02 a6 mflr r0 ffc0f3fc: 93 c1 00 10 stw r30,16(r1) ffc0f400: 7c 7e 1b 78 mr r30,r3 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) ffc0f404: 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 ) { ffc0f408: 93 81 00 08 stw r28,8(r1) ffc0f40c: 7c dc 33 78 mr r28,r6 ffc0f410: 93 a1 00 0c stw r29,12(r1) ffc0f414: 7c bd 2b 78 mr r29,r5 ffc0f418: 93 e1 00 14 stw r31,20(r1) ffc0f41c: 7c 9f 23 78 mr r31,r4 ffc0f420: 90 01 00 1c stw r0,28(r1) if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) ffc0f424: 4b ff ff ad bl ffc0f3d0 <_POSIX_Priority_Is_valid> ffc0f428: 2f 83 00 00 cmpwi cr7,r3,0 ffc0f42c: 41 9e 00 c4 beq- cr7,ffc0f4f0 <_POSIX_Thread_Translate_sched_param+0xfc><== NEVER TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { ffc0f430: 2f 9e 00 00 cmpwi cr7,r30,0 ) { if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; ffc0f434: 38 00 00 00 li r0,0 ffc0f438: 90 1d 00 00 stw r0,0(r29) *budget_callout = NULL; ffc0f43c: 90 1c 00 00 stw r0,0(r28) if ( policy == SCHED_OTHER ) { ffc0f440: 40 be 00 0c bne+ cr7,ffc0f44c <_POSIX_Thread_Translate_sched_param+0x58> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; ffc0f444: 38 00 00 01 li r0,1 ffc0f448: 48 00 00 0c b ffc0f454 <_POSIX_Thread_Translate_sched_param+0x60> return 0; } if ( policy == SCHED_FIFO ) { ffc0f44c: 2f 9e 00 01 cmpwi cr7,r30,1 ffc0f450: 40 be 00 0c bne+ cr7,ffc0f45c <_POSIX_Thread_Translate_sched_param+0x68> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; ffc0f454: 90 1d 00 00 stw r0,0(r29) ffc0f458: 48 00 00 10 b ffc0f468 <_POSIX_Thread_Translate_sched_param+0x74> return 0; } if ( policy == SCHED_RR ) { ffc0f45c: 2f 9e 00 02 cmpwi cr7,r30,2 ffc0f460: 40 be 00 10 bne+ cr7,ffc0f470 <_POSIX_Thread_Translate_sched_param+0x7c> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; ffc0f464: 93 dd 00 00 stw r30,0(r29) ffc0f468: 38 60 00 00 li r3,0 return 0; ffc0f46c: 48 00 00 88 b ffc0f4f4 <_POSIX_Thread_Translate_sched_param+0x100> } if ( policy == SCHED_SPORADIC ) { ffc0f470: 2f 9e 00 04 cmpwi cr7,r30,4 ffc0f474: 40 be 00 7c bne+ cr7,ffc0f4f0 <_POSIX_Thread_Translate_sched_param+0xfc> if ( (param->sched_ss_repl_period.tv_sec == 0) && ffc0f478: 80 1f 00 08 lwz r0,8(r31) ffc0f47c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f480: 40 9e 00 10 bne- cr7,ffc0f490 <_POSIX_Thread_Translate_sched_param+0x9c> (param->sched_ss_repl_period.tv_nsec == 0) ) ffc0f484: 80 1f 00 0c lwz r0,12(r31) ffc0f488: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f48c: 41 9e 00 64 beq- cr7,ffc0f4f0 <_POSIX_Thread_Translate_sched_param+0xfc> return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && ffc0f490: 80 1f 00 10 lwz r0,16(r31) ffc0f494: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f498: 40 9e 00 10 bne- cr7,ffc0f4a8 <_POSIX_Thread_Translate_sched_param+0xb4> (param->sched_ss_init_budget.tv_nsec == 0) ) ffc0f49c: 80 1f 00 14 lwz r0,20(r31) ffc0f4a0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f4a4: 41 9e 00 4c beq- cr7,ffc0f4f0 <_POSIX_Thread_Translate_sched_param+0xfc> return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < ffc0f4a8: 38 7f 00 08 addi r3,r31,8 ffc0f4ac: 4b ff d7 9d bl ffc0cc48 <_Timespec_To_ticks> ffc0f4b0: 7c 7e 1b 78 mr r30,r3 ffc0f4b4: 38 7f 00 10 addi r3,r31,16 ffc0f4b8: 4b ff d7 91 bl ffc0cc48 <_Timespec_To_ticks> ffc0f4bc: 7f 9e 18 40 cmplw cr7,r30,r3 ffc0f4c0: 41 9c 00 30 blt- cr7,ffc0f4f0 <_POSIX_Thread_Translate_sched_param+0xfc> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) ffc0f4c4: 80 7f 00 04 lwz r3,4(r31) ffc0f4c8: 4b ff ff 09 bl ffc0f3d0 <_POSIX_Priority_Is_valid> ffc0f4cc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0f4d0: 41 9e 00 20 beq- cr7,ffc0f4f0 <_POSIX_Thread_Translate_sched_param+0xfc> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; ffc0f4d4: 38 00 00 03 li r0,3 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; ffc0f4d8: 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; ffc0f4dc: 90 1d 00 00 stw r0,0(r29) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; ffc0f4e0: 38 09 88 3c addi r0,r9,-30660 ffc0f4e4: 38 60 00 00 li r3,0 ffc0f4e8: 90 1c 00 00 stw r0,0(r28) return 0; ffc0f4ec: 48 00 00 08 b ffc0f4f4 <_POSIX_Thread_Translate_sched_param+0x100> ffc0f4f0: 38 60 00 16 li r3,22 } return EINVAL; } ffc0f4f4: 80 01 00 1c lwz r0,28(r1) ffc0f4f8: 83 81 00 08 lwz r28,8(r1) ffc0f4fc: 7c 08 03 a6 mtlr r0 ffc0f500: 83 a1 00 0c lwz r29,12(r1) ffc0f504: 83 c1 00 10 lwz r30,16(r1) ffc0f508: 83 e1 00 14 lwz r31,20(r1) ffc0f50c: 38 21 00 18 addi r1,r1,24 ffc0f510: 4e 80 00 20 blr =============================================================================== ffc084ac <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc084ac: 94 21 ff a0 stwu r1,-96(r1) ffc084b0: 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; ffc084b4: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc084b8: 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; ffc084bc: 39 29 20 84 addi r9,r9,8324 * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc084c0: 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; ffc084c4: 83 c9 00 34 lwz r30,52(r9) * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc084c8: 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 ) ffc084cc: 2f 9e 00 00 cmpwi cr7,r30,0 * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc084d0: 93 61 00 4c stw r27,76(r1) ffc084d4: 93 a1 00 54 stw r29,84(r1) ffc084d8: 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; ffc084dc: 83 89 00 30 lwz r28,48(r9) if ( !user_threads || maximum == 0 ) ffc084e0: 41 9e 00 70 beq- cr7,ffc08550 <_POSIX_Threads_Initialize_user_threads_body+0xa4><== NEVER TAKEN ffc084e4: 2f 9c 00 00 cmpwi cr7,r28,0 ffc084e8: 41 9e 00 68 beq- cr7,ffc08550 <_POSIX_Threads_Initialize_user_threads_body+0xa4><== NEVER TAKEN ffc084ec: 3b a0 00 00 li r29,0 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); ffc084f0: 3b e1 00 0c addi r31,r1,12 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); status = pthread_create( ffc084f4: 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 ); ffc084f8: 7f e3 fb 78 mr r3,r31 ffc084fc: 48 00 70 19 bl ffc0f514 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); ffc08500: 38 80 00 02 li r4,2 ffc08504: 7f e3 fb 78 mr r3,r31 ffc08508: 48 00 70 4d bl ffc0f554 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); ffc0850c: 80 9e 00 04 lwz r4,4(r30) ffc08510: 7f e3 fb 78 mr r3,r31 ffc08514: 48 00 70 79 bl ffc0f58c status = pthread_create( ffc08518: 80 be 00 00 lwz r5,0(r30) ffc0851c: 7f 63 db 78 mr r3,r27 ffc08520: 7f e4 fb 78 mr r4,r31 ffc08524: 38 c0 00 00 li r6,0 ffc08528: 4b ff fb c5 bl ffc080ec &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) ffc0852c: 7c 65 1b 79 mr. r5,r3 ffc08530: 41 a2 00 10 beq+ ffc08540 <_POSIX_Threads_Initialize_user_threads_body+0x94> _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); ffc08534: 38 60 00 02 li r3,2 ffc08538: 38 80 00 01 li r4,1 ffc0853c: 48 00 24 89 bl ffc0a9c4 <_Internal_error_Occurred> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { ffc08540: 3b bd 00 01 addi r29,r29,1 ffc08544: 7f 9d e0 40 cmplw cr7,r29,r28 ffc08548: 3b de 00 08 addi r30,r30,8 ffc0854c: 41 9c ff ac blt+ cr7,ffc084f8 <_POSIX_Threads_Initialize_user_threads_body+0x4c><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } ffc08550: 80 01 00 64 lwz r0,100(r1) ffc08554: 83 61 00 4c lwz r27,76(r1) ffc08558: 7c 08 03 a6 mtlr r0 ffc0855c: 83 81 00 50 lwz r28,80(r1) ffc08560: 83 a1 00 54 lwz r29,84(r1) ffc08564: 83 c1 00 58 lwz r30,88(r1) ffc08568: 83 e1 00 5c lwz r31,92(r1) ffc0856c: 38 21 00 60 addi r1,r1,96 ffc08570: 4e 80 00 20 blr =============================================================================== ffc13c18 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { ffc13c18: 94 21 ff f0 stwu r1,-16(r1) ffc13c1c: 7c 08 02 a6 mflr r0 ffc13c20: 90 01 00 14 stw r0,20(r1) ffc13c24: 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 ]; ffc13c28: 83 e4 01 48 lwz r31,328(r4) */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { ffc13c2c: 93 c1 00 08 stw r30,8(r1) ffc13c30: 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 ); ffc13c34: 38 7f 00 94 addi r3,r31,148 ffc13c38: 48 00 19 81 bl ffc155b8 <_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 ) { ffc13c3c: 80 1e 00 1c lwz r0,28(r30) ffc13c40: 3d 20 00 00 lis r9,0 ffc13c44: 2f 80 00 00 cmpwi cr7,r0,0 ffc13c48: 88 89 26 c4 lbz r4,9924(r9) ffc13c4c: 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; ffc13c50: 90 7e 00 78 stw r3,120(r30) ffc13c54: 7c 80 20 50 subf r4,r0,r4 new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; ffc13c58: 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 ) { ffc13c5c: 40 9e 00 1c bne- cr7,ffc13c78 <_POSIX_Threads_Sporadic_budget_TSR+0x60><== NEVER TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { ffc13c60: 80 1e 00 14 lwz r0,20(r30) ffc13c64: 7f 80 20 40 cmplw cr7,r0,r4 ffc13c68: 40 bd 00 10 ble+ cr7,ffc13c78 <_POSIX_Threads_Sporadic_budget_TSR+0x60> _Thread_Change_priority( the_thread, new_priority, true ); ffc13c6c: 7f c3 f3 78 mr r3,r30 ffc13c70: 38 a0 00 01 li r5,1 ffc13c74: 4b ff 82 21 bl ffc0be94 <_Thread_Change_priority> #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); ffc13c78: 38 7f 00 8c addi r3,r31,140 ffc13c7c: 48 00 19 3d bl ffc155b8 <_Timespec_To_ticks> ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc13c80: 38 9f 00 a4 addi r4,r31,164 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc13c84: 90 7f 00 b0 stw r3,176(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc13c88: 3c 60 00 00 lis r3,0 ffc13c8c: 38 63 2e 08 addi r3,r3,11784 ffc13c90: 4b ff 9d 55 bl ffc0d9e4 <_Watchdog_Insert> _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } ffc13c94: 80 01 00 14 lwz r0,20(r1) ffc13c98: 83 c1 00 08 lwz r30,8(r1) ffc13c9c: 7c 08 03 a6 mtlr r0 ffc13ca0: 83 e1 00 0c lwz r31,12(r1) ffc13ca4: 38 21 00 10 addi r1,r1,16 ffc13ca8: 4e 80 00 20 blr =============================================================================== ffc13bbc <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { ffc13bbc: 7c 08 02 a6 mflr r0 ffc13bc0: 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); ffc13bc4: 3d 40 00 00 lis r10,0 ffc13bc8: 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 ) { ffc13bcc: 80 03 00 1c lwz r0,28(r3) ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc13bd0: 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 ) { ffc13bd4: 2f 80 00 00 cmpwi cr7,r0,0 ffc13bd8: 88 8a 26 c4 lbz r4,9924(r10) ffc13bdc: 80 0b 00 88 lwz r0,136(r11) ffc13be0: 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 */ ffc13be4: 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; ffc13be8: 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 */ ffc13bec: 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 ) { ffc13bf0: 40 9e 00 18 bne- cr7,ffc13c08 <_POSIX_Threads_Sporadic_budget_callout+0x4c><== 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 ) { ffc13bf4: 80 03 00 14 lwz r0,20(r3) ffc13bf8: 7f 80 20 40 cmplw cr7,r0,r4 ffc13bfc: 40 bc 00 0c bge+ cr7,ffc13c08 <_POSIX_Threads_Sporadic_budget_callout+0x4c><== NEVER TAKEN _Thread_Change_priority( the_thread, new_priority, true ); ffc13c00: 38 a0 00 01 li r5,1 ffc13c04: 4b ff 82 91 bl ffc0be94 <_Thread_Change_priority> #if 0 printk( "lower priority\n" ); #endif } } } ffc13c08: 80 01 00 0c lwz r0,12(r1) ffc13c0c: 38 21 00 08 addi r1,r1,8 ffc13c10: 7c 08 03 a6 mtlr r0 ffc13c14: 4e 80 00 20 blr =============================================================================== ffc0816c <_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) { ffc0816c: 94 21 ff f0 stwu r1,-16(r1) ffc08170: 7c 08 02 a6 mflr r0 ffc08174: 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 ) || ffc08178: 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; ffc0817c: 81 24 00 68 lwz r9,104(r4) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ffc08180: 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) { ffc08184: 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; ffc08188: 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) { ffc0818c: 7c 9f 23 78 mr r31,r4 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; ffc08190: 90 04 00 68 stw r0,104(r4) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ffc08194: 40 9e 00 10 bne- cr7,ffc081a4 <_POSIX_Timer_TSR+0x38> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { ffc08198: 80 04 00 58 lwz r0,88(r4) ffc0819c: 2f 80 00 00 cmpwi cr7,r0,0 ffc081a0: 41 9e 00 38 beq- cr7,ffc081d8 <_POSIX_Timer_TSR+0x6c> <== NEVER TAKEN activated = _POSIX_Timer_Insert_helper( ffc081a4: 80 9f 00 64 lwz r4,100(r31) ffc081a8: 3c c0 ff c1 lis r6,-63 ffc081ac: 80 bf 00 08 lwz r5,8(r31) ffc081b0: 38 c6 81 6c addi r6,r6,-32404 ffc081b4: 38 7f 00 10 addi r3,r31,16 ffc081b8: 7f e7 fb 78 mr r7,r31 ffc081bc: 48 00 6f 09 bl ffc0f0c4 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) ffc081c0: 2f 83 00 00 cmpwi cr7,r3,0 ffc081c4: 41 be 00 30 beq+ cr7,ffc081f4 <_POSIX_Timer_TSR+0x88> <== NEVER TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); ffc081c8: 38 7f 00 6c addi r3,r31,108 ffc081cc: 48 00 1b 79 bl ffc09d44 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; ffc081d0: 38 00 00 03 li r0,3 ffc081d4: 48 00 00 08 b ffc081dc <_POSIX_Timer_TSR+0x70> } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; ffc081d8: 38 00 00 04 li r0,4 <== NOT EXECUTED ffc081dc: 98 1f 00 3c stb r0,60(r31) /* * 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 ) ) { ffc081e0: 80 7f 00 38 lwz r3,56(r31) ffc081e4: 80 9f 00 44 lwz r4,68(r31) ffc081e8: 48 00 69 51 bl ffc0eb38 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; ffc081ec: 38 00 00 00 li r0,0 ffc081f0: 90 1f 00 68 stw r0,104(r31) } ffc081f4: 80 01 00 14 lwz r0,20(r1) ffc081f8: 83 e1 00 0c lwz r31,12(r1) ffc081fc: 38 21 00 10 addi r1,r1,16 ffc08200: 7c 08 03 a6 mtlr r0 ffc08204: 4e 80 00 20 blr =============================================================================== ffc17624 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { ffc17624: 94 21 ff d8 stwu r1,-40(r1) ffc17628: 7c 08 02 a6 mflr r0 ffc1762c: 7c a6 2b 78 mr r6,r5 ffc17630: 93 a1 00 1c stw r29,28(r1) siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, ffc17634: 3b a1 00 08 addi r29,r1,8 ffc17638: 7f a5 eb 78 mr r5,r29 ffc1763c: 38 e0 00 01 li r7,1 bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { ffc17640: 93 c1 00 20 stw r30,32(r1) ffc17644: 7c 9e 23 78 mr r30,r4 ffc17648: 93 e1 00 24 stw r31,36(r1) ffc1764c: 7c 7f 1b 78 mr r31,r3 ffc17650: 90 01 00 2c stw r0,44(r1) ffc17654: 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, ffc17658: 48 00 00 9d bl ffc176f4 <_POSIX_signals_Clear_signals> ffc1765c: 2f 83 00 00 cmpwi cr7,r3,0 ffc17660: 41 9e 00 70 beq- cr7,ffc176d0 <_POSIX_signals_Check_signal+0xac> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) ffc17664: 1d 7e 00 0c mulli r11,r30,12 ffc17668: 3d 40 00 00 lis r10,0 ffc1766c: 39 4a 32 30 addi r10,r10,12848 ffc17670: 7d 2a 5a 14 add r9,r10,r11 ffc17674: 80 09 00 08 lwz r0,8(r9) ffc17678: 2f 80 00 01 cmpwi cr7,r0,1 ffc1767c: 41 9e 00 54 beq- cr7,ffc176d0 <_POSIX_signals_Check_signal+0xac><== NEVER TAKEN api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { ffc17680: 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; ffc17684: 81 29 00 04 lwz r9,4(r9) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { ffc17688: 2f 8b 00 02 cmpwi cr7,r11,2 return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; ffc1768c: 83 9f 00 cc lwz r28,204(r31) api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; ffc17690: 7d 29 e3 78 or r9,r9,r28 ffc17694: 91 3f 00 cc stw r9,204(r31) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { ffc17698: 40 be 00 1c bne+ cr7,ffc176b4 <_POSIX_signals_Check_signal+0x90> case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( ffc1769c: 7f c3 f3 78 mr r3,r30 ffc176a0: 7c 09 03 a6 mtctr r0 ffc176a4: 7f a4 eb 78 mr r4,r29 ffc176a8: 38 a0 00 00 li r5,0 ffc176ac: 4e 80 04 21 bctrl signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; ffc176b0: 48 00 00 14 b ffc176c4 <_POSIX_signals_Check_signal+0xa0> default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); ffc176b4: 7f c3 f3 78 mr r3,r30 ffc176b8: 7c 09 03 a6 mtctr r0 ffc176bc: 4c c6 31 82 crclr 4*cr1+eq ffc176c0: 4e 80 04 21 bctrl } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; ffc176c4: 93 9f 00 cc stw r28,204(r31) ffc176c8: 38 60 00 01 li r3,1 return true; ffc176cc: 48 00 00 08 b ffc176d4 <_POSIX_signals_Check_signal+0xb0> ffc176d0: 38 60 00 00 li r3,0 } ffc176d4: 80 01 00 2c lwz r0,44(r1) ffc176d8: 83 81 00 18 lwz r28,24(r1) ffc176dc: 7c 08 03 a6 mtlr r0 ffc176e0: 83 a1 00 1c lwz r29,28(r1) ffc176e4: 83 c1 00 20 lwz r30,32(r1) ffc176e8: 83 e1 00 24 lwz r31,36(r1) ffc176ec: 38 21 00 28 addi r1,r1,40 ffc176f0: 4e 80 00 20 blr =============================================================================== ffc17f68 <_POSIX_signals_Clear_process_signals>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc17f68: 7d 60 00 a6 mfmsr r11 ffc17f6c: 7c 10 42 a6 mfsprg r0,0 ffc17f70: 7d 60 00 78 andc r0,r11,r0 ffc17f74: 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 ) { ffc17f78: 3d 20 00 00 lis r9,0 ffc17f7c: 1c 03 00 0c mulli r0,r3,12 ffc17f80: 39 29 32 30 addi r9,r9,12848 ffc17f84: 7d 29 00 2e lwzx r9,r9,r0 ffc17f88: 2f 89 00 02 cmpwi cr7,r9,2 ffc17f8c: 40 be 00 20 bne+ cr7,ffc17fac <_POSIX_signals_Clear_process_signals+0x44> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) ffc17f90: 3d 20 00 00 lis r9,0 ffc17f94: 39 29 34 24 addi r9,r9,13348 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc17f98: 7d 49 00 2e lwzx r10,r9,r0 ffc17f9c: 7d 29 02 14 add r9,r9,r0 ffc17fa0: 38 09 00 04 addi r0,r9,4 ffc17fa4: 7f 8a 00 00 cmpw cr7,r10,r0 ffc17fa8: 40 be 00 38 bne+ cr7,ffc17fe0 <_POSIX_signals_Clear_process_signals+0x78><== NEVER TAKEN clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; ffc17fac: 3d 20 00 00 lis r9,0 ffc17fb0: 80 09 28 00 lwz r0,10240(r9) ffc17fb4: 38 63 ff ff addi r3,r3,-1 ffc17fb8: 39 40 ff fe li r10,-2 ffc17fbc: 5d 43 18 3e rotlw r3,r10,r3 ffc17fc0: 7c 63 00 38 and r3,r3,r0 if ( !_POSIX_signals_Pending ) ffc17fc4: 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; ffc17fc8: 90 69 28 00 stw r3,10240(r9) if ( !_POSIX_signals_Pending ) ffc17fcc: 40 9e 00 14 bne- cr7,ffc17fe0 <_POSIX_signals_Clear_process_signals+0x78><== NEVER TAKEN _Thread_Do_post_task_switch_extension--; ffc17fd0: 3d 20 00 00 lis r9,0 ffc17fd4: 81 49 27 c0 lwz r10,10176(r9) ffc17fd8: 38 0a ff ff addi r0,r10,-1 ffc17fdc: 90 09 27 c0 stw r0,10176(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc17fe0: 7d 60 01 24 mtmsr r11 } _ISR_Enable( level ); } ffc17fe4: 4e 80 00 20 blr =============================================================================== ffc08dec <_POSIX_signals_Get_highest>: ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { ffc08dec: 39 40 00 05 li r10,5 ffc08df0: 7d 49 03 a6 mtctr r10 #include int _POSIX_signals_Get_highest( sigset_t set ) { ffc08df4: 39 20 00 1b li r9,27 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { ffc08df8: 38 00 00 01 li r0,1 ffc08dfc: 39 69 ff ff addi r11,r9,-1 ffc08e00: 7c 0b 58 30 slw r11,r0,r11 ffc08e04: 7d 6a 18 39 and. r10,r11,r3 ffc08e08: 40 82 00 34 bne- ffc08e3c <_POSIX_signals_Get_highest+0x50><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { ffc08e0c: 39 29 00 01 addi r9,r9,1 ffc08e10: 42 00 ff ec bdnz+ ffc08dfc <_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 ) ) { ffc08e14: 39 60 00 1a li r11,26 ffc08e18: 7d 69 03 a6 mtctr r11 sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { ffc08e1c: 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 ) ) { ffc08e20: 38 00 00 01 li r0,1 ffc08e24: 39 69 ff ff addi r11,r9,-1 ffc08e28: 7c 0b 58 30 slw r11,r0,r11 ffc08e2c: 7d 6a 18 39 and. r10,r11,r3 ffc08e30: 40 82 00 0c bne- ffc08e3c <_POSIX_signals_Get_highest+0x50> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { ffc08e34: 39 29 00 01 addi r9,r9,1 ffc08e38: 42 00 ff ec bdnz+ ffc08e24 <_POSIX_signals_Get_highest+0x38> * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } ffc08e3c: 7d 23 4b 78 mr r3,r9 ffc08e40: 4e 80 00 20 blr =============================================================================== ffc1788c <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { ffc1788c: 94 21 ff f0 stwu r1,-16(r1) ffc17890: 7c 08 02 a6 mflr r0 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { ffc17894: 3d 20 10 00 lis r9,4096 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { ffc17898: 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 ) ) { ffc1789c: 61 29 80 00 ori r9,r9,32768 ffc178a0: 80 03 00 10 lwz r0,16(r3) bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { ffc178a4: 93 e1 00 0c stw r31,12(r1) ffc178a8: 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 ) ) { ffc178ac: 7d 2b 00 38 and r11,r9,r0 ffc178b0: 7f 8b 48 00 cmpw cr7,r11,r9 { POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc178b4: 81 43 01 48 lwz r10,328(r3) ffc178b8: 39 64 ff ff addi r11,r4,-1 ffc178bc: 39 20 00 01 li r9,1 ffc178c0: 7d 2b 58 30 slw r11,r9,r11 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { ffc178c4: 40 be 00 68 bne+ cr7,ffc1792c <_POSIX_signals_Unblock_thread+0xa0> if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { ffc178c8: 80 03 00 30 lwz r0,48(r3) ffc178cc: 7d 68 00 39 and. r8,r11,r0 ffc178d0: 40 82 00 10 bne- ffc178e0 <_POSIX_signals_Unblock_thread+0x54> ffc178d4: 80 0a 00 cc lwz r0,204(r10) ffc178d8: 7d 69 00 79 andc. r9,r11,r0 ffc178dc: 41 82 00 d0 beq- ffc179ac <_POSIX_signals_Unblock_thread+0x120> the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { ffc178e0: 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; ffc178e4: 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; ffc178e8: 38 00 00 04 li r0,4 ffc178ec: 90 1f 00 34 stw r0,52(r31) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { ffc178f0: 40 be 00 14 bne+ cr7,ffc17904 <_POSIX_signals_Unblock_thread+0x78> the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; ffc178f4: 90 a9 00 08 stw r5,8(r9) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; ffc178f8: 38 00 00 01 li r0,1 the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; ffc178fc: 90 89 00 00 stw r4,0(r9) ffc17900: 48 00 00 18 b ffc17918 <_POSIX_signals_Unblock_thread+0x8c> the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; ffc17904: 81 45 00 08 lwz r10,8(r5) ffc17908: 81 65 00 00 lwz r11,0(r5) ffc1790c: 80 05 00 04 lwz r0,4(r5) ffc17910: 91 49 00 08 stw r10,8(r9) ffc17914: 91 69 00 00 stw r11,0(r9) ffc17918: 90 09 00 04 stw r0,4(r9) } _Thread_queue_Extract_with_proxy( the_thread ); ffc1791c: 7f e3 fb 78 mr r3,r31 ffc17920: 4b ff 54 81 bl ffc0cda0 <_Thread_queue_Extract_with_proxy> ffc17924: 38 60 00 01 li r3,1 return true; ffc17928: 48 00 00 88 b ffc179b0 <_POSIX_signals_Unblock_thread+0x124> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { ffc1792c: 81 4a 00 cc lwz r10,204(r10) ffc17930: 7d 68 50 79 andc. r8,r11,r10 ffc17934: 41 82 00 78 beq- ffc179ac <_POSIX_signals_Unblock_thread+0x120> * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { ffc17938: 74 0b 10 00 andis. r11,r0,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; ffc1793c: 99 23 00 74 stb r9,116(r3) if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { ffc17940: 41 82 00 3c beq- ffc1797c <_POSIX_signals_Unblock_thread+0xf0> #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) ){ ffc17944: 70 08 00 08 andi. r8,r0,8 */ the_thread->do_post_task_switch_extension = true; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { the_thread->Wait.return_code = EINTR; ffc17948: 38 00 00 04 li r0,4 ffc1794c: 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) ){ ffc17950: 41 82 00 5c beq- ffc179ac <_POSIX_signals_Unblock_thread+0x120><== NEVER TAKEN if ( _Watchdog_Is_active( &the_thread->Timer ) ) ffc17954: 80 03 00 50 lwz r0,80(r3) ffc17958: 2f 80 00 02 cmpwi cr7,r0,2 ffc1795c: 40 be 00 0c bne+ cr7,ffc17968 <_POSIX_signals_Unblock_thread+0xdc><== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); ffc17960: 38 63 00 48 addi r3,r3,72 ffc17964: 4b ff 61 d9 bl ffc0db3c <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc17968: 3c 80 10 03 lis r4,4099 ffc1796c: 7f e3 fb 78 mr r3,r31 ffc17970: 60 84 ff f8 ori r4,r4,65528 ffc17974: 4b ff 46 c5 bl ffc0c038 <_Thread_Clear_state> ffc17978: 48 00 00 34 b ffc179ac <_POSIX_signals_Unblock_thread+0x120> _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { ffc1797c: 2f 80 00 00 cmpwi cr7,r0,0 ffc17980: 40 9e 00 2c bne- cr7,ffc179ac <_POSIX_signals_Unblock_thread+0x120><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) ffc17984: 3d 60 00 00 lis r11,0 ffc17988: 80 0b 27 b8 lwz r0,10168(r11) ffc1798c: 2f 80 00 00 cmpwi cr7,r0,0 ffc17990: 41 9e 00 1c beq- cr7,ffc179ac <_POSIX_signals_Unblock_thread+0x120> ffc17994: 3d 60 00 00 lis r11,0 ffc17998: 80 0b 27 d0 lwz r0,10192(r11) ffc1799c: 7f 83 00 00 cmpw cr7,r3,r0 ffc179a0: 40 be 00 0c bne+ cr7,ffc179ac <_POSIX_signals_Unblock_thread+0x120><== NEVER TAKEN _ISR_Signals_to_thread_executing = true; ffc179a4: 3d 60 00 00 lis r11,0 ffc179a8: 99 2b 27 ec stb r9,10220(r11) ffc179ac: 38 60 00 00 li r3,0 } } return false; } ffc179b0: 80 01 00 14 lwz r0,20(r1) ffc179b4: 83 e1 00 0c lwz r31,12(r1) ffc179b8: 38 21 00 10 addi r1,r1,16 ffc179bc: 7c 08 03 a6 mtlr r0 ffc179c0: 4e 80 00 20 blr =============================================================================== ffc14548 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc14548: 94 21 ff d8 stwu r1,-40(r1) ffc1454c: 7c 08 02 a6 mflr r0 ffc14550: 90 01 00 2c stw r0,44(r1) ffc14554: 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 ]; ffc14558: 83 e3 01 44 lwz r31,324(r3) */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc1455c: 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 ) ffc14560: 2f 9f 00 00 cmpwi cr7,r31,0 */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { ffc14564: 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 ) ffc14568: 41 9e 00 80 beq- cr7,ffc145e8 <_RTEMS_tasks_Post_switch_extension+0xa0><== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1456c: 7c 00 00 a6 mfmsr r0 ffc14570: 7d 30 42 a6 mfsprg r9,0 ffc14574: 7c 09 48 78 andc r9,r0,r9 ffc14578: 7d 20 01 24 mtmsr r9 asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; asr->signals_posted = 0; ffc1457c: 39 20 00 00 li r9,0 */ asr = &api->Signal; _ISR_Disable( level ); signal_set = asr->signals_posted; ffc14580: 83 bf 00 14 lwz r29,20(r31) asr->signals_posted = 0; ffc14584: 91 3f 00 14 stw r9,20(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc14588: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ ffc1458c: 2f 9d 00 00 cmpwi cr7,r29,0 ffc14590: 41 be 00 58 beq+ cr7,ffc145e8 <_RTEMS_tasks_Post_switch_extension+0xa0> return; asr->nest_level += 1; ffc14594: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc14598: 3b c1 00 08 addi r30,r1,8 ffc1459c: 80 7f 00 10 lwz r3,16(r31) ffc145a0: 38 80 00 00 li r4,0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; ffc145a4: 38 09 00 01 addi r0,r9,1 ffc145a8: 90 1f 00 1c stw r0,28(r31) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc145ac: 60 84 ff ff ori r4,r4,65535 ffc145b0: 7f c5 f3 78 mr r5,r30 ffc145b4: 4b ff fc fd bl ffc142b0 (*asr->handler)( signal_set ); ffc145b8: 80 1f 00 0c lwz r0,12(r31) ffc145bc: 7f a3 eb 78 mr r3,r29 ffc145c0: 7c 09 03 a6 mtctr r0 ffc145c4: 4e 80 04 21 bctrl asr->nest_level -= 1; ffc145c8: 81 3f 00 1c lwz r9,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc145cc: 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; ffc145d0: 38 09 ff ff addi r0,r9,-1 ffc145d4: 90 1f 00 1c stw r0,28(r31) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); ffc145d8: 60 84 ff ff ori r4,r4,65535 ffc145dc: 7f c5 f3 78 mr r5,r30 ffc145e0: 80 61 00 08 lwz r3,8(r1) ffc145e4: 4b ff fc cd bl ffc142b0 } ffc145e8: 80 01 00 2c lwz r0,44(r1) ffc145ec: 83 a1 00 1c lwz r29,28(r1) ffc145f0: 7c 08 03 a6 mtlr r0 ffc145f4: 83 c1 00 20 lwz r30,32(r1) ffc145f8: 83 e1 00 24 lwz r31,36(r1) ffc145fc: 38 21 00 28 addi r1,r1,40 ffc14600: 4e 80 00 20 blr =============================================================================== ffc09844 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { ffc09844: 94 21 ff e0 stwu r1,-32(r1) ffc09848: 7c 08 02 a6 mflr r0 ffc0984c: 7c 64 1b 78 mr r4,r3 ffc09850: 3c 60 00 00 lis r3,0 ffc09854: 90 01 00 24 stw r0,36(r1) ffc09858: 38 63 2c 64 addi r3,r3,11364 ffc0985c: 38 a1 00 08 addi r5,r1,8 ffc09860: 93 e1 00 1c stw r31,28(r1) ffc09864: 48 00 23 c1 bl ffc0bc24 <_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 ) { ffc09868: 80 01 00 08 lwz r0,8(r1) ffc0986c: 7c 7f 1b 78 mr r31,r3 ffc09870: 2f 80 00 00 cmpwi cr7,r0,0 ffc09874: 40 9e 00 84 bne- cr7,ffc098f8 <_Rate_monotonic_Timeout+0xb4><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; ffc09878: 80 63 00 40 lwz r3,64(r3) if ( _States_Is_waiting_for_period( the_thread->current_state ) && ffc0987c: 80 03 00 10 lwz r0,16(r3) ffc09880: 70 09 40 00 andi. r9,r0,16384 ffc09884: 41 82 00 24 beq- ffc098a8 <_Rate_monotonic_Timeout+0x64> the_thread->Wait.id == the_period->Object.id ) { ffc09888: 81 23 00 20 lwz r9,32(r3) ffc0988c: 80 1f 00 08 lwz r0,8(r31) ffc09890: 7f 89 00 00 cmpw cr7,r9,r0 ffc09894: 40 be 00 14 bne+ cr7,ffc098a8 <_Rate_monotonic_Timeout+0x64> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc09898: 3c 80 10 03 lis r4,4099 ffc0989c: 60 84 ff f8 ori r4,r4,65528 ffc098a0: 48 00 29 b1 bl ffc0c250 <_Thread_Clear_state> ffc098a4: 48 00 00 18 b ffc098bc <_Rate_monotonic_Timeout+0x78> _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 ) { ffc098a8: 80 1f 00 38 lwz r0,56(r31) ffc098ac: 2f 80 00 01 cmpwi cr7,r0,1 ffc098b0: 40 be 00 30 bne+ cr7,ffc098e0 <_Rate_monotonic_Timeout+0x9c> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; ffc098b4: 38 00 00 03 li r0,3 ffc098b8: 90 1f 00 38 stw r0,56(r31) _Rate_monotonic_Initiate_statistics( the_period ); ffc098bc: 7f e3 fb 78 mr r3,r31 ffc098c0: 4b ff f7 75 bl ffc09034 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc098c4: 80 1f 00 3c lwz r0,60(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc098c8: 3c 60 00 00 lis r3,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc098cc: 90 1f 00 1c stw r0,28(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc098d0: 38 63 2e 68 addi r3,r3,11880 ffc098d4: 38 9f 00 10 addi r4,r31,16 ffc098d8: 48 00 45 45 bl ffc0de1c <_Watchdog_Insert> ffc098dc: 48 00 00 0c b ffc098e8 <_Rate_monotonic_Timeout+0xa4> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; ffc098e0: 38 00 00 04 li r0,4 ffc098e4: 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; ffc098e8: 3d 20 00 00 lis r9,0 ffc098ec: 81 69 27 f4 lwz r11,10228(r9) ffc098f0: 38 0b ff ff addi r0,r11,-1 ffc098f4: 90 09 27 f4 stw r0,10228(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc098f8: 80 01 00 24 lwz r0,36(r1) ffc098fc: 83 e1 00 1c lwz r31,28(r1) ffc09900: 38 21 00 20 addi r1,r1,32 ffc09904: 7c 08 03 a6 mtlr r0 ffc09908: 4e 80 00 20 blr =============================================================================== ffc09184 <_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) || ffc09184: 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(); ffc09188: 3d 20 00 00 lis r9,0 ffc0918c: 81 29 20 cc lwz r9,8396(r9) if ((!the_tod) || ffc09190: 41 82 00 98 beq- ffc09228 <_TOD_Validate+0xa4> <== NEVER TAKEN (the_tod->ticks >= ticks_per_second) || ffc09194: 3c 00 00 0f lis r0,15 ffc09198: 60 00 42 40 ori r0,r0,16960 ffc0919c: 7c 00 4b 96 divwu r0,r0,r9 ffc091a0: 81 23 00 18 lwz r9,24(r3) ffc091a4: 7f 89 00 40 cmplw cr7,r9,r0 ffc091a8: 40 9c 00 80 bge- cr7,ffc09228 <_TOD_Validate+0xa4> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || ffc091ac: 80 03 00 14 lwz r0,20(r3) ffc091b0: 2b 80 00 3b cmplwi cr7,r0,59 ffc091b4: 41 9d 00 74 bgt- cr7,ffc09228 <_TOD_Validate+0xa4> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || ffc091b8: 80 03 00 10 lwz r0,16(r3) ffc091bc: 2b 80 00 3b cmplwi cr7,r0,59 ffc091c0: 41 9d 00 68 bgt- cr7,ffc09228 <_TOD_Validate+0xa4> (the_tod->hour >= TOD_HOURS_PER_DAY) || ffc091c4: 80 03 00 0c lwz r0,12(r3) ffc091c8: 2b 80 00 17 cmplwi cr7,r0,23 ffc091cc: 41 9d 00 5c bgt- cr7,ffc09228 <_TOD_Validate+0xa4> (the_tod->month == 0) || ffc091d0: 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) || ffc091d4: 2f 89 00 00 cmpwi cr7,r9,0 ffc091d8: 41 9e 00 50 beq- cr7,ffc09228 <_TOD_Validate+0xa4> <== NEVER TAKEN ffc091dc: 2b 89 00 0c cmplwi cr7,r9,12 ffc091e0: 41 9d 00 48 bgt- cr7,ffc09228 <_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) || ffc091e4: 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) || ffc091e8: 2b 80 07 c3 cmplwi cr7,r0,1987 ffc091ec: 40 9d 00 3c ble- cr7,ffc09228 <_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) ) ffc091f0: 80 63 00 08 lwz r3,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) || ffc091f4: 2f 83 00 00 cmpwi cr7,r3,0 ffc091f8: 41 9e 00 30 beq- cr7,ffc09228 <_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 ) ffc091fc: 70 0b 00 03 andi. r11,r0,3 ffc09200: 3d 60 ff c2 lis r11,-62 ffc09204: 39 6b 3e 38 addi r11,r11,15928 ffc09208: 40 82 00 08 bne- ffc09210 <_TOD_Validate+0x8c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; ffc0920c: 39 29 00 0d addi r9,r9,13 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; ffc09210: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc09214: 7c 0b 48 2e lwzx r0,r11,r9 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( ffc09218: 7c 63 00 10 subfc r3,r3,r0 ffc0921c: 38 60 00 00 li r3,0 ffc09220: 7c 63 19 14 adde r3,r3,r3 ffc09224: 4e 80 00 20 blr ffc09228: 38 60 00 00 li r3,0 if ( the_tod->day > days_in_month ) return false; return true; } ffc0922c: 4e 80 00 20 blr =============================================================================== ffc0be94 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { ffc0be94: 94 21 ff e0 stwu r1,-32(r1) ffc0be98: 7c 08 02 a6 mflr r0 ffc0be9c: 90 01 00 24 stw r0,36(r1) ffc0bea0: 93 e1 00 1c stw r31,28(r1) ffc0bea4: 7c 7f 1b 78 mr r31,r3 ffc0bea8: 93 a1 00 14 stw r29,20(r1) ffc0beac: 93 c1 00 18 stw r30,24(r1) ffc0beb0: 7c be 2b 78 mr r30,r5 /* * 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 ); ffc0beb4: 90 81 00 08 stw r4,8(r1) */ /* * Save original state */ original_state = the_thread->current_state; ffc0beb8: 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 ); ffc0bebc: 48 00 12 11 bl ffc0d0cc <_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 ) ffc0bec0: 80 1f 00 14 lwz r0,20(r31) ffc0bec4: 80 81 00 08 lwz r4,8(r1) ffc0bec8: 7f 80 20 00 cmpw cr7,r0,r4 ffc0becc: 41 9e 00 0c beq- cr7,ffc0bed8 <_Thread_Change_priority+0x44> _Thread_Set_priority( the_thread, new_priority ); ffc0bed0: 7f e3 fb 78 mr r3,r31 ffc0bed4: 48 00 10 85 bl ffc0cf58 <_Thread_Set_priority> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0bed8: 7d 60 00 a6 mfmsr r11 ffc0bedc: 7c 10 42 a6 mfsprg r0,0 ffc0bee0: 7d 60 00 78 andc r0,r11,r0 ffc0bee4: 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; ffc0bee8: 80 1f 00 10 lwz r0,16(r31) ffc0beec: 57 bd 07 7a rlwinm r29,r29,0,29,29 if ( state != STATES_TRANSIENT ) { ffc0bef0: 2f 80 00 04 cmpwi cr7,r0,4 ffc0bef4: 41 9e 00 38 beq- cr7,ffc0bf2c <_Thread_Change_priority+0x98> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) ffc0bef8: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0befc: 40 9e 00 0c bne- cr7,ffc0bf08 <_Thread_Change_priority+0x74><== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); ffc0bf00: 54 09 07 b8 rlwinm r9,r0,0,30,28 ffc0bf04: 91 3f 00 10 stw r9,16(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0bf08: 7d 60 01 24 mtmsr r11 _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc0bf0c: 3d 20 00 03 lis r9,3 ffc0bf10: 61 29 be e0 ori r9,r9,48864 ffc0bf14: 7c 0b 48 39 and. r11,r0,r9 ffc0bf18: 41 a2 01 04 beq+ ffc0c01c <_Thread_Change_priority+0x188> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); ffc0bf1c: 80 7f 00 44 lwz r3,68(r31) ffc0bf20: 7f e4 fb 78 mr r4,r31 ffc0bf24: 48 00 0f 61 bl ffc0ce84 <_Thread_queue_Requeue> ffc0bf28: 48 00 00 f4 b ffc0c01c <_Thread_Change_priority+0x188> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { ffc0bf2c: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0bf30: 40 9e 00 6c bne- cr7,ffc0bf9c <_Thread_Change_priority+0x108><== 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 ); ffc0bf34: 93 bf 00 10 stw r29,16(r31) _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) ffc0bf38: 2f 9e 00 00 cmpwi cr7,r30,0 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; _Priority_Major_bit_map |= the_priority_map->ready_major; ffc0bf3c: 3d 40 00 00 lis r10,0 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc0bf40: 81 3f 00 90 lwz r9,144(r31) ffc0bf44: 80 1f 00 98 lwz r0,152(r31) ffc0bf48: 81 09 00 00 lwz r8,0(r9) ffc0bf4c: 7d 00 03 78 or r0,r8,r0 ffc0bf50: 90 09 00 00 stw r0,0(r9) _Priority_Major_bit_map |= the_priority_map->ready_major; ffc0bf54: 81 0a 27 c4 lwz r8,10180(r10) ffc0bf58: 80 1f 00 94 lwz r0,148(r31) ffc0bf5c: 81 3f 00 8c lwz r9,140(r31) ffc0bf60: 7d 00 03 78 or r0,r8,r0 ffc0bf64: 90 0a 27 c4 stw r0,10180(r10) ffc0bf68: 41 9e 00 1c beq- cr7,ffc0bf84 <_Thread_Change_priority+0xf0> ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc0bf6c: 81 49 00 00 lwz r10,0(r9) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc0bf70: 91 3f 00 04 stw r9,4(r31) before_node = after_node->next; after_node->next = the_node; ffc0bf74: 93 e9 00 00 stw r31,0(r9) the_node->next = before_node; before_node->previous = the_node; ffc0bf78: 93 ea 00 04 stw r31,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; ffc0bf7c: 91 5f 00 00 stw r10,0(r31) ffc0bf80: 48 00 00 1c b ffc0bf9c <_Thread_Change_priority+0x108> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0bf84: 38 09 00 04 addi r0,r9,4 ffc0bf88: 90 1f 00 00 stw r0,0(r31) old_last_node = the_chain->last; ffc0bf8c: 81 49 00 08 lwz r10,8(r9) the_chain->last = the_node; ffc0bf90: 93 e9 00 08 stw r31,8(r9) old_last_node->next = the_node; the_node->previous = old_last_node; ffc0bf94: 91 5f 00 04 stw r10,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; ffc0bf98: 93 ea 00 00 stw r31,0(r10) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0bf9c: 7c 00 00 a6 mfmsr r0 ffc0bfa0: 7d 60 01 24 mtmsr r11 ffc0bfa4: 7c 00 01 24 mtmsr r0 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 ); ffc0bfa8: 3c c0 00 00 lis r6,0 */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; ffc0bfac: 3d 40 00 00 lis r10,0 ffc0bfb0: 81 26 27 c4 lwz r9,10180(r6) ffc0bfb4: 80 aa 27 84 lwz r5,10116(r10) ffc0bfb8: 7d 27 00 34 cntlzw r7,r9 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0bfbc: 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 ); ffc0bfc0: 91 26 27 c4 stw r9,10180(r6) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0bfc4: 39 08 2e 60 addi r8,r8,11872 ffc0bfc8: 54 ea 10 3a rlwinm r10,r7,2,0,29 ffc0bfcc: 7c 08 50 2e lwzx r0,r8,r10 ffc0bfd0: 7c 09 00 34 cntlzw r9,r0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc0bfd4: 54 e7 20 36 rlwinm r7,r7,4,0,27 ffc0bfd8: 7c 08 51 2e stwx r0,r8,r10 ffc0bfdc: 7c e7 4a 14 add r7,r7,r9 ffc0bfe0: 1c e7 00 0c mulli r7,r7,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 ); ffc0bfe4: 3d 20 00 00 lis r9,0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc0bfe8: 7c 05 38 2e lwzx r0,r5,r7 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); ffc0bfec: 81 29 27 d0 lwz r9,10192(r9) * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) ffc0bff0: 3d 40 00 00 lis r10,0 ffc0bff4: 90 0a 27 ac stw r0,10156(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() && ffc0bff8: 7f 89 00 00 cmpw cr7,r9,r0 ffc0bffc: 41 9e 00 1c beq- cr7,ffc0c018 <_Thread_Change_priority+0x184> _Thread_Executing->is_preemptible ) ffc0c000: 88 09 00 75 lbz r0,117(r9) ffc0c004: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c008: 41 9e 00 10 beq- cr7,ffc0c018 <_Thread_Change_priority+0x184> _Context_Switch_necessary = true; ffc0c00c: 38 00 00 01 li r0,1 ffc0c010: 3d 20 00 00 lis r9,0 ffc0c014: 98 09 27 e0 stb r0,10208(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0c018: 7d 60 01 24 mtmsr r11 _ISR_Enable( level ); } ffc0c01c: 80 01 00 24 lwz r0,36(r1) ffc0c020: 83 a1 00 14 lwz r29,20(r1) ffc0c024: 7c 08 03 a6 mtlr r0 ffc0c028: 83 c1 00 18 lwz r30,24(r1) ffc0c02c: 83 e1 00 1c lwz r31,28(r1) ffc0c030: 38 21 00 20 addi r1,r1,32 ffc0c034: 4e 80 00 20 blr =============================================================================== ffc0c038 <_Thread_Clear_state>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0c038: 7c 00 00 a6 mfmsr r0 ffc0c03c: 7d 30 42 a6 mfsprg r9,0 ffc0c040: 7c 09 48 78 andc r9,r0,r9 ffc0c044: 7d 20 01 24 mtmsr r9 { ISR_Level level; States_Control current_state; _ISR_Disable( level ); current_state = the_thread->current_state; ffc0c048: 81 23 00 10 lwz r9,16(r3) if ( current_state & state ) { ffc0c04c: 7c 8b 48 39 and. r11,r4,r9 ffc0c050: 41 82 00 a8 beq- ffc0c0f8 <_Thread_Clear_state+0xc0> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); ffc0c054: 7d 24 20 78 andc r4,r9,r4 current_state = the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { ffc0c058: 2f 84 00 00 cmpwi cr7,r4,0 _ISR_Disable( level ); current_state = the_thread->current_state; if ( current_state & state ) { current_state = ffc0c05c: 90 83 00 10 stw r4,16(r3) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { ffc0c060: 40 9e 00 98 bne- cr7,ffc0c0f8 <_Thread_Clear_state+0xc0> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc0c064: 81 63 00 90 lwz r11,144(r3) ffc0c068: 81 43 00 98 lwz r10,152(r3) ffc0c06c: 81 0b 00 00 lwz r8,0(r11) _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); ffc0c070: 81 23 00 8c lwz r9,140(r3) ffc0c074: 7d 0a 53 78 or r10,r8,r10 ffc0c078: 91 4b 00 00 stw r10,0(r11) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0c07c: 39 69 00 04 addi r11,r9,4 _Priority_Major_bit_map |= the_priority_map->ready_major; ffc0c080: 3d 40 00 00 lis r10,0 ffc0c084: 91 63 00 00 stw r11,0(r3) ffc0c088: 80 ea 27 c4 lwz r7,10180(r10) ffc0c08c: 81 03 00 94 lwz r8,148(r3) old_last_node = the_chain->last; ffc0c090: 81 69 00 08 lwz r11,8(r9) ffc0c094: 7c e8 43 78 or r8,r7,r8 the_chain->last = the_node; ffc0c098: 90 69 00 08 stw r3,8(r9) ffc0c09c: 91 0a 27 c4 stw r8,10180(r10) old_last_node->next = the_node; the_node->previous = old_last_node; ffc0c0a0: 91 63 00 04 stw r11,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; ffc0c0a4: 90 6b 00 00 stw r3,0(r11) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0c0a8: 7d 20 00 a6 mfmsr r9 ffc0c0ac: 7c 00 01 24 mtmsr r0 ffc0c0b0: 7d 20 01 24 mtmsr r9 * 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 ) { ffc0c0b4: 3d 60 00 00 lis r11,0 ffc0c0b8: 81 23 00 14 lwz r9,20(r3) ffc0c0bc: 81 4b 27 ac lwz r10,10156(r11) ffc0c0c0: 81 4a 00 14 lwz r10,20(r10) ffc0c0c4: 7f 89 50 40 cmplw cr7,r9,r10 ffc0c0c8: 40 9c 00 30 bge- cr7,ffc0c0f8 <_Thread_Clear_state+0xc0> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc0c0cc: 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; ffc0c0d0: 90 6b 27 ac stw r3,10156(r11) if ( _Thread_Executing->is_preemptible || ffc0c0d4: 81 4a 27 d0 lwz r10,10192(r10) ffc0c0d8: 89 6a 00 75 lbz r11,117(r10) ffc0c0dc: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0c0e0: 40 9e 00 0c bne- cr7,ffc0c0ec <_Thread_Clear_state+0xb4> ffc0c0e4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c0e8: 40 9e 00 10 bne- cr7,ffc0c0f8 <_Thread_Clear_state+0xc0><== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; ffc0c0ec: 39 60 00 01 li r11,1 ffc0c0f0: 3d 20 00 00 lis r9,0 ffc0c0f4: 99 69 27 e0 stb r11,10208(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0c0f8: 7c 00 01 24 mtmsr r0 } } } _ISR_Enable( level ); } ffc0c0fc: 4e 80 00 20 blr =============================================================================== ffc0c100 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { ffc0c100: 94 21 ff e8 stwu r1,-24(r1) ffc0c104: 7c 08 02 a6 mflr r0 ffc0c108: 39 60 00 00 li r11,0 ffc0c10c: 90 01 00 1c stw r0,28(r1) ffc0c110: a0 04 00 0a lhz r0,10(r4) ffc0c114: 81 23 00 1c lwz r9,28(r3) ffc0c118: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc0c11c: 93 a1 00 0c stw r29,12(r1) ffc0c120: 7c 7d 1b 78 mr r29,r3 ffc0c124: 93 e1 00 14 stw r31,20(r1) ffc0c128: 7c 9f 23 78 mr r31,r4 ffc0c12c: 93 c1 00 10 stw r30,16(r1) ffc0c130: 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; ffc0c134: 3f c0 00 00 lis r30,0 ffc0c138: 81 3e 27 90 lwz r9,10128(r30) * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); ffc0c13c: 7c 83 23 78 mr r3,r4 ffc0c140: 38 09 ff ff addi r0,r9,-1 ffc0c144: 90 1e 27 90 stw r0,10128(r30) ffc0c148: 48 00 17 1d bl ffc0d864 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0c14c: 81 3e 27 90 lwz r9,10128(r30) ffc0c150: 38 09 00 01 addi r0,r9,1 ffc0c154: 90 1e 27 90 stw r0,10128(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 ); ffc0c158: 7f a3 eb 78 mr r3,r29 ffc0c15c: 7f e4 fb 78 mr r4,r31 ffc0c160: 4b ff f2 d9 bl ffc0b438 <_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 ); ffc0c164: 7f e3 fb 78 mr r3,r31 ffc0c168: 38 80 00 01 li r4,1 ffc0c16c: 48 00 0e 49 bl ffc0cfb4 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { ffc0c170: 7f e3 fb 78 mr r3,r31 ffc0c174: 48 00 0c 2d bl ffc0cda0 <_Thread_queue_Extract_with_proxy> ffc0c178: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c17c: 40 9e 00 18 bne- cr7,ffc0c194 <_Thread_Close+0x94> if ( _Watchdog_Is_active( &the_thread->Timer ) ) ffc0c180: 80 1f 00 50 lwz r0,80(r31) ffc0c184: 2f 80 00 02 cmpwi cr7,r0,2 ffc0c188: 40 be 00 0c bne+ cr7,ffc0c194 <_Thread_Close+0x94> (void) _Watchdog_Remove( &the_thread->Timer ); ffc0c18c: 38 7f 00 48 addi r3,r31,72 ffc0c190: 48 00 19 ad bl ffc0db3c <_Watchdog_Remove> if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; if ( the_thread->Start.fp_context ) ffc0c194: 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; ffc0c198: 38 00 00 00 li r0,0 ffc0c19c: 90 1f 01 3c stw r0,316(r31) if ( the_thread->Start.fp_context ) ffc0c1a0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c1a4: 41 9e 00 08 beq- cr7,ffc0c1ac <_Thread_Close+0xac> <== NEVER TAKEN (void) _Workspace_Free( the_thread->Start.fp_context ); ffc0c1a8: 48 00 1a bd bl ffc0dc64 <_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 ); ffc0c1ac: 7f e3 fb 78 mr r3,r31 ffc0c1b0: 48 00 10 3d bl ffc0d1ec <_Thread_Stack_Free> the_thread->Start.stack = NULL; if ( the_thread->extensions ) ffc0c1b4: 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; ffc0c1b8: 38 00 00 00 li r0,0 if ( the_thread->extensions ) ffc0c1bc: 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; ffc0c1c0: 90 1f 00 d8 stw r0,216(r31) if ( the_thread->extensions ) ffc0c1c4: 41 9e 00 08 beq- cr7,ffc0c1cc <_Thread_Close+0xcc> (void) _Workspace_Free( the_thread->extensions ); ffc0c1c8: 48 00 1a 9d bl ffc0dc64 <_Workspace_Free> the_thread->extensions = NULL; ffc0c1cc: 38 00 00 00 li r0,0 } ffc0c1d0: 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; ffc0c1d4: 90 1f 01 50 stw r0,336(r31) } ffc0c1d8: 80 01 00 1c lwz r0,28(r1) ffc0c1dc: 83 c1 00 10 lwz r30,16(r1) ffc0c1e0: 7c 08 03 a6 mtlr r0 ffc0c1e4: 83 e1 00 14 lwz r31,20(r1) ffc0c1e8: 38 21 00 18 addi r1,r1,24 ffc0c1ec: 4e 80 00 20 blr =============================================================================== ffc0c2e0 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0c2e0: 94 21 ff e8 stwu r1,-24(r1) ffc0c2e4: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0c2e8: 38 81 00 08 addi r4,r1,8 void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0c2ec: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0c2f0: 48 00 02 4d bl ffc0c53c <_Thread_Get> switch ( location ) { ffc0c2f4: 80 01 00 08 lwz r0,8(r1) ffc0c2f8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c2fc: 40 9e 00 20 bne- cr7,ffc0c31c <_Thread_Delay_ended+0x3c><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( ffc0c300: 3c 80 10 00 lis r4,4096 ffc0c304: 60 84 00 18 ori r4,r4,24 ffc0c308: 4b ff fd 31 bl ffc0c038 <_Thread_Clear_state> ffc0c30c: 3d 20 00 00 lis r9,0 ffc0c310: 81 69 27 90 lwz r11,10128(r9) ffc0c314: 38 0b ff ff addi r0,r11,-1 ffc0c318: 90 09 27 90 stw r0,10128(r9) | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } ffc0c31c: 80 01 00 1c lwz r0,28(r1) ffc0c320: 38 21 00 18 addi r1,r1,24 ffc0c324: 7c 08 03 a6 mtlr r0 ffc0c328: 4e 80 00 20 blr =============================================================================== ffc0c32c <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { ffc0c32c: 94 21 ff b0 stwu r1,-80(r1) ffc0c330: 7c 08 02 a6 mflr r0 ffc0c334: 93 41 00 38 stw r26,56(r1) Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; ffc0c338: 3f 40 00 00 lis r26,0 * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { ffc0c33c: 93 e1 00 4c stw r31,76(r1) ffc0c340: 90 01 00 54 stw r0,84(r1) ffc0c344: 92 61 00 1c stw r19,28(r1) ffc0c348: 92 81 00 20 stw r20,32(r1) ffc0c34c: 92 a1 00 24 stw r21,36(r1) ffc0c350: 92 c1 00 28 stw r22,40(r1) ffc0c354: 92 e1 00 2c stw r23,44(r1) ffc0c358: 93 01 00 30 stw r24,48(r1) ffc0c35c: 93 21 00 34 stw r25,52(r1) ffc0c360: 93 61 00 3c stw r27,60(r1) ffc0c364: 93 81 00 40 stw r28,64(r1) ffc0c368: 93 a1 00 44 stw r29,68(r1) ffc0c36c: 93 c1 00 48 stw r30,72(r1) Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; ffc0c370: 83 fa 27 d0 lwz r31,10192(r26) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0c374: 7c 00 00 a6 mfmsr r0 ffc0c378: 7d 30 42 a6 mfsprg r9,0 ffc0c37c: 7c 09 48 78 andc r9,r0,r9 ffc0c380: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { ffc0c384: 3f 20 00 00 lis r25,0 heir = _Thread_Heir; ffc0c388: 3e 60 00 00 lis r19,0 _Thread_Dispatch_disable_level = 1; ffc0c38c: 3e 80 00 00 lis r20,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; ffc0c390: 3e a0 00 00 lis r21,0 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( ffc0c394: 3f 60 00 00 lis r27,0 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0c398: 3e c0 00 00 lis r22,0 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { ffc0c39c: 3b 39 27 e0 addi r25,r25,10208 heir = _Thread_Heir; ffc0c3a0: 3a 73 27 ac addi r19,r19,10156 _Thread_Dispatch_disable_level = 1; ffc0c3a4: 3a 94 27 90 addi r20,r20,10128 _Context_Switch_necessary = false; _Thread_Executing = heir; ffc0c3a8: 3b 5a 27 d0 addi r26,r26,10192 #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; ffc0c3ac: 3a b5 27 88 addi r21,r21,10120 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( ffc0c3b0: 3b 7b 27 d8 addi r27,r27,10200 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0c3b4: 3a d6 27 a8 addi r22,r22,10152 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; ffc0c3b8: 3a e0 00 01 li r23,1 _Context_Switch_necessary = false; ffc0c3bc: 3b 00 00 00 li r24,0 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); ffc0c3c0: 3b 81 00 08 addi r28,r1,8 _Timestamp_Subtract( ffc0c3c4: 3b a1 00 10 addi r29,r1,16 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { ffc0c3c8: 48 00 00 d0 b ffc0c498 <_Thread_Dispatch+0x16c> heir = _Thread_Heir; ffc0c3cc: 83 d3 00 00 lwz r30,0(r19) _Thread_Dispatch_disable_level = 1; ffc0c3d0: 92 f4 00 00 stw r23,0(r20) _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 ) ffc0c3d4: 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; ffc0c3d8: 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 ) ffc0c3dc: 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; ffc0c3e0: 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 ) ffc0c3e4: 40 be 00 0c bne+ cr7,ffc0c3f0 <_Thread_Dispatch+0xc4> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0c3e8: 81 35 00 00 lwz r9,0(r21) ffc0c3ec: 91 3e 00 78 stw r9,120(r30) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0c3f0: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); ffc0c3f4: 7f 83 e3 78 mr r3,r28 ffc0c3f8: 48 00 87 19 bl ffc14b10 <_TOD_Get_uptime> _Timestamp_Subtract( ffc0c3fc: 7f 63 db 78 mr r3,r27 ffc0c400: 7f 84 e3 78 mr r4,r28 ffc0c404: 7f a5 eb 78 mr r5,r29 ffc0c408: 48 00 11 19 bl ffc0d520 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); ffc0c40c: 7f a4 eb 78 mr r4,r29 ffc0c410: 38 7f 00 84 addi r3,r31,132 ffc0c414: 48 00 10 b1 bl ffc0d4c4 <_Timespec_Add_to> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0c418: 81 36 00 00 lwz r9,0(r22) &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc0c41c: 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 ); ffc0c420: 7f e3 fb 78 mr r3,r31 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0c424: 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; ffc0c428: 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 ); ffc0c42c: 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; ffc0c430: 91 7b 00 00 stw r11,0(r27) ffc0c434: 91 9b 00 04 stw r12,4(r27) #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc0c438: 41 9e 00 14 beq- cr7,ffc0c44c <_Thread_Dispatch+0x120> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; ffc0c43c: 80 09 00 00 lwz r0,0(r9) ffc0c440: 90 1f 01 40 stw r0,320(r31) *_Thread_libc_reent = heir->libc_reent; ffc0c444: 80 1e 01 40 lwz r0,320(r30) ffc0c448: 90 09 00 00 stw r0,0(r9) } _User_extensions_Thread_switch( executing, heir ); ffc0c44c: 48 00 15 21 bl ffc0d96c <_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 ) ffc0c450: 80 1f 01 3c lwz r0,316(r31) _Context_Save_fp( &executing->fp_context ); ffc0c454: 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 ) ffc0c458: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c45c: 41 9e 00 08 beq- cr7,ffc0c464 <_Thread_Dispatch+0x138> _Context_Save_fp( &executing->fp_context ); ffc0c460: 48 01 6b c1 bl ffc23020 <_CPU_Context_save_fp> #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); ffc0c464: 38 7f 00 dc addi r3,r31,220 ffc0c468: 38 9e 00 dc addi r4,r30,220 ffc0c46c: 48 01 6d 35 bl ffc231a0 <_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 ) ffc0c470: 80 1f 01 3c lwz r0,316(r31) _Context_Restore_fp( &executing->fp_context ); ffc0c474: 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 ) ffc0c478: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c47c: 41 9e 00 08 beq- cr7,ffc0c484 <_Thread_Dispatch+0x158> _Context_Restore_fp( &executing->fp_context ); ffc0c480: 48 01 6c 61 bl ffc230e0 <_CPU_Context_restore_fp> #endif #endif executing = _Thread_Executing; ffc0c484: 83 fa 00 00 lwz r31,0(r26) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0c488: 7c 00 00 a6 mfmsr r0 ffc0c48c: 7d 30 42 a6 mfsprg r9,0 ffc0c490: 7c 09 48 78 andc r9,r0,r9 ffc0c494: 7d 20 01 24 mtmsr r9 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { ffc0c498: 89 39 00 00 lbz r9,0(r25) ffc0c49c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c4a0: 40 9e ff 2c bne+ cr7,ffc0c3cc <_Thread_Dispatch+0xa0> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; ffc0c4a4: 3d 60 00 00 lis r11,0 ffc0c4a8: 91 2b 27 90 stw r9,10128(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0c4ac: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); if ( _Thread_Do_post_task_switch_extension || ffc0c4b0: 3d 20 00 00 lis r9,0 ffc0c4b4: 80 09 27 c0 lwz r0,10176(r9) ffc0c4b8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c4bc: 40 9e 00 10 bne- cr7,ffc0c4cc <_Thread_Dispatch+0x1a0> executing->do_post_task_switch_extension ) { ffc0c4c0: 88 1f 00 74 lbz r0,116(r31) ffc0c4c4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c4c8: 41 9e 00 10 beq- cr7,ffc0c4d8 <_Thread_Dispatch+0x1ac> executing->do_post_task_switch_extension = false; ffc0c4cc: 38 00 00 00 li r0,0 ffc0c4d0: 98 1f 00 74 stb r0,116(r31) _API_extensions_Run_postswitch(); ffc0c4d4: 4b ff e2 89 bl ffc0a75c <_API_extensions_Run_postswitch> } } ffc0c4d8: 80 01 00 54 lwz r0,84(r1) ffc0c4dc: 82 61 00 1c lwz r19,28(r1) ffc0c4e0: 7c 08 03 a6 mtlr r0 ffc0c4e4: 82 81 00 20 lwz r20,32(r1) ffc0c4e8: 82 a1 00 24 lwz r21,36(r1) ffc0c4ec: 82 c1 00 28 lwz r22,40(r1) ffc0c4f0: 82 e1 00 2c lwz r23,44(r1) ffc0c4f4: 83 01 00 30 lwz r24,48(r1) ffc0c4f8: 83 21 00 34 lwz r25,52(r1) ffc0c4fc: 83 41 00 38 lwz r26,56(r1) ffc0c500: 83 61 00 3c lwz r27,60(r1) ffc0c504: 83 81 00 40 lwz r28,64(r1) ffc0c508: 83 a1 00 44 lwz r29,68(r1) ffc0c50c: 83 c1 00 48 lwz r30,72(r1) ffc0c510: 83 e1 00 4c lwz r31,76(r1) ffc0c514: 38 21 00 50 addi r1,r1,80 ffc0c518: 4e 80 00 20 blr =============================================================================== ffc15168 <_Thread_Evaluate_mode>: bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; ffc15168: 3d 20 00 00 lis r9,0 ffc1516c: 81 29 27 d0 lwz r9,10192(r9) if ( !_States_Is_ready( executing->current_state ) || ffc15170: 80 09 00 10 lwz r0,16(r9) ffc15174: 2f 80 00 00 cmpwi cr7,r0,0 ffc15178: 40 9e 00 20 bne- cr7,ffc15198 <_Thread_Evaluate_mode+0x30><== NEVER TAKEN ffc1517c: 3d 60 00 00 lis r11,0 ffc15180: 80 0b 27 ac lwz r0,10156(r11) ffc15184: 7f 89 00 00 cmpw cr7,r9,r0 ffc15188: 41 9e 00 24 beq- cr7,ffc151ac <_Thread_Evaluate_mode+0x44> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { ffc1518c: 88 09 00 75 lbz r0,117(r9) ffc15190: 2f 80 00 00 cmpwi cr7,r0,0 ffc15194: 41 9e 00 18 beq- cr7,ffc151ac <_Thread_Evaluate_mode+0x44><== NEVER TAKEN _Context_Switch_necessary = true; ffc15198: 38 00 00 01 li r0,1 ffc1519c: 3d 20 00 00 lis r9,0 ffc151a0: 98 09 27 e0 stb r0,10208(r9) ffc151a4: 38 60 00 01 li r3,1 return true; ffc151a8: 4e 80 00 20 blr ffc151ac: 38 60 00 00 li r3,0 } return false; } ffc151b0: 4e 80 00 20 blr =============================================================================== ffc17d90 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc17d90: 94 21 ff f0 stwu r1,-16(r1) ffc17d94: 7c 08 02 a6 mflr r0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; ffc17d98: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc17d9c: 90 01 00 14 stw r0,20(r1) ffc17da0: 93 e1 00 0c stw r31,12(r1) #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; ffc17da4: 83 e9 27 d0 lwz r31,10192(r9) * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc17da8: 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; ffc17dac: 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); ffc17db0: 38 00 00 00 li r0,0 ffc17db4: 7c 00 00 a6 mfmsr r0 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc17db8: 71 2b 00 01 andi. r11,r9,1 ffc17dbc: 40 82 00 10 bne- ffc17dcc <_Thread_Handler+0x3c> static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; asm volatile ( ffc17dc0: 7d 30 42 a6 mfsprg r9,0 msr |= ppc_interrupt_get_disable_mask(); ffc17dc4: 7d 20 03 78 or r0,r9,r0 ffc17dc8: 48 00 00 0c b ffc17dd4 <_Thread_Handler+0x44> ffc17dcc: 7d 30 42 a6 mfsprg r9,0 } else { msr &= ~ppc_interrupt_get_disable_mask(); ffc17dd0: 7c 00 48 78 andc r0,r0,r9 } _CPU_MSR_SET(msr); ffc17dd4: 7c 00 01 24 mtmsr r0 _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; ffc17dd8: 3d 20 00 00 lis r9,0 ffc17ddc: 8b c9 2a 54 lbz r30,10836(r9) doneConstructors = 1; ffc17de0: 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 ); ffc17de4: 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; ffc17de8: 98 09 2a 54 stb r0,10836(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 ); ffc17dec: 4b ff 58 79 bl ffc0d664 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); ffc17df0: 4b ff 47 2d bl ffc0c51c <_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) */ { ffc17df4: 2f 9e 00 00 cmpwi cr7,r30,0 ffc17df8: 40 be 00 08 bne+ cr7,ffc17e00 <_Thread_Handler+0x70> INIT_NAME (); ffc17dfc: 48 00 be a1 bl ffc23c9c <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { ffc17e00: 80 1f 00 a8 lwz r0,168(r31) ffc17e04: 2f 80 00 00 cmpwi cr7,r0,0 ffc17e08: 40 be 00 10 bne+ cr7,ffc17e18 <_Thread_Handler+0x88> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( ffc17e0c: 80 1f 00 a4 lwz r0,164(r31) ffc17e10: 80 7f 00 b0 lwz r3,176(r31) ffc17e14: 48 00 00 14 b ffc17e28 <_Thread_Handler+0x98> executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { ffc17e18: 2f 80 00 01 cmpwi cr7,r0,1 ffc17e1c: 40 be 00 18 bne+ cr7,ffc17e34 <_Thread_Handler+0xa4> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( ffc17e20: 80 1f 00 a4 lwz r0,164(r31) ffc17e24: 80 7f 00 ac lwz r3,172(r31) ffc17e28: 7c 09 03 a6 mtctr r0 ffc17e2c: 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 = ffc17e30: 90 7f 00 28 stw r3,40(r31) * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); ffc17e34: 7f e3 fb 78 mr r3,r31 ffc17e38: 4b ff 58 9d bl ffc0d6d4 <_User_extensions_Thread_exitted> _Internal_error_Occurred( ffc17e3c: 38 60 00 00 li r3,0 ffc17e40: 38 80 00 01 li r4,1 ffc17e44: 38 a0 00 06 li r5,6 ffc17e48: 4b ff 34 e5 bl ffc0b32c <_Internal_error_Occurred> =============================================================================== ffc0c5f0 <_Thread_Initialize>: if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { ffc0c5f0: 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 ) { ffc0c5f4: 94 21 ff d8 stwu r1,-40(r1) ffc0c5f8: 7c 08 02 a6 mflr r0 ffc0c5fc: 93 41 00 10 stw r26,16(r1) ffc0c600: 7d 3a 4b 78 mr r26,r9 ffc0c604: 90 01 00 2c stw r0,44(r1) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0c608: 38 00 00 00 li r0,0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0c60c: 81 21 00 38 lwz r9,56(r1) ffc0c610: 93 01 00 08 stw r24,8(r1) ffc0c614: 93 21 00 0c stw r25,12(r1) ffc0c618: 7d 59 53 78 mr r25,r10 ffc0c61c: 93 61 00 14 stw r27,20(r1) ffc0c620: 7d 1b 43 78 mr r27,r8 ffc0c624: 93 81 00 18 stw r28,24(r1) ffc0c628: 7c fc 3b 78 mr r28,r7 ffc0c62c: 93 a1 00 1c stw r29,28(r1) ffc0c630: 7c dd 33 78 mr r29,r6 ffc0c634: 93 c1 00 20 stw r30,32(r1) ffc0c638: 7c 7e 1b 78 mr r30,r3 ffc0c63c: 93 e1 00 24 stw r31,36(r1) ffc0c640: 7c 9f 23 78 mr r31,r4 ffc0c644: 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; ffc0c648: 90 04 01 44 stw r0,324(r4) ffc0c64c: 90 04 01 48 stw r0,328(r4) ffc0c650: 90 04 01 4c stw r0,332(r4) extensions_area = NULL; the_thread->libc_reent = NULL; ffc0c654: 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 ) { ffc0c658: 40 a2 00 30 bne+ ffc0c688 <_Thread_Initialize+0x98> actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); ffc0c65c: 7c 83 23 78 mr r3,r4 ffc0c660: 7c c4 33 78 mr r4,r6 ffc0c664: 48 00 0a fd bl ffc0d160 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0c668: 2c 03 00 00 cmpwi r3,0 ffc0c66c: 41 82 01 b8 beq- ffc0c824 <_Thread_Initialize+0x234> ffc0c670: 7f 83 e8 40 cmplw cr7,r3,r29 ffc0c674: 41 9c 01 b0 blt- cr7,ffc0c824 <_Thread_Initialize+0x234><== NEVER TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = true; ffc0c678: 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; ffc0c67c: 80 bf 00 d8 lwz r5,216(r31) the_thread->Start.core_allocated_stack = true; ffc0c680: 98 1f 00 c8 stb r0,200(r31) ffc0c684: 48 00 00 0c b ffc0c690 <_Thread_Initialize+0xa0> } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; ffc0c688: 98 04 00 c8 stb r0,200(r4) ffc0c68c: 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 ) { ffc0c690: 2f 9c 00 00 cmpwi cr7,r28,0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0c694: 90 bf 00 d0 stw r5,208(r31) ffc0c698: 3b 80 00 00 li r28,0 the_stack->size = size; ffc0c69c: 90 7f 00 cc stw r3,204(r31) ffc0c6a0: 41 be 00 1c beq+ cr7,ffc0c6bc <_Thread_Initialize+0xcc> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); ffc0c6a4: 38 60 01 08 li r3,264 ffc0c6a8: 48 00 15 89 bl ffc0dc30 <_Workspace_Allocate> if ( !fp_area ) ffc0c6ac: 7c 7c 1b 79 mr. r28,r3 ffc0c6b0: 40 a2 00 0c bne+ ffc0c6bc <_Thread_Initialize+0xcc> ffc0c6b4: 3b a0 00 00 li r29,0 ffc0c6b8: 48 00 01 04 b ffc0c7bc <_Thread_Initialize+0x1cc> #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0c6bc: 3d 20 00 00 lis r9,0 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; ffc0c6c0: 93 9f 01 3c stw r28,316(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0c6c4: 38 00 00 00 li r0,0 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0c6c8: 80 69 27 bc lwz r3,10172(r9) ffc0c6cc: 3b a0 00 00 li r29,0 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; ffc0c6d0: 90 1f 00 6c stw r0,108(r31) ffc0c6d4: 2f 83 00 00 cmpwi cr7,r3,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; ffc0c6d8: 93 9f 00 d4 stw r28,212(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0c6dc: 90 1f 00 50 stw r0,80(r31) the_watchdog->routine = routine; ffc0c6e0: 90 1f 00 64 stw r0,100(r31) the_watchdog->id = id; ffc0c6e4: 90 1f 00 68 stw r0,104(r31) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0c6e8: 41 be 00 18 beq+ cr7,ffc0c700 <_Thread_Initialize+0x110> extensions_area = _Workspace_Allocate( ffc0c6ec: 38 63 00 01 addi r3,r3,1 ffc0c6f0: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc0c6f4: 48 00 15 3d bl ffc0dc30 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) ffc0c6f8: 7c 7d 1b 79 mr. r29,r3 ffc0c6fc: 41 82 00 c0 beq- ffc0c7bc <_Thread_Initialize+0x1cc> * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { ffc0c700: 2f 9d 00 00 cmpwi cr7,r29,0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; ffc0c704: 93 bf 01 50 stw r29,336(r31) * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { ffc0c708: 41 9e 00 30 beq- cr7,ffc0c738 <_Thread_Initialize+0x148> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) ffc0c70c: 3d 20 00 00 lis r9,0 ffc0c710: 81 69 27 bc lwz r11,10172(r9) the_thread->extensions[i] = NULL; ffc0c714: 38 00 00 00 li r0,0 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) ffc0c718: 39 20 00 00 li r9,0 ffc0c71c: 48 00 00 0c b ffc0c728 <_Thread_Initialize+0x138> the_thread->extensions[i] = NULL; ffc0c720: 81 1f 01 50 lwz r8,336(r31) ffc0c724: 7c 08 51 2e stwx r0,r8,r10 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) ffc0c728: 7f 89 58 40 cmplw cr7,r9,r11 the_thread->extensions[i] = NULL; ffc0c72c: 55 2a 10 3a rlwinm r10,r9,2,0,29 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) ffc0c730: 39 29 00 01 addi r9,r9,1 ffc0c734: 40 9d ff ec ble+ cr7,ffc0c720 <_Thread_Initialize+0x130> the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { ffc0c738: 2f 99 00 02 cmpwi cr7,r25,2 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0c73c: 80 01 00 30 lwz r0,48(r1) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; ffc0c740: 9b 5f 00 b4 stb r26,180(r31) the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; ffc0c744: 90 1f 00 bc stw r0,188(r31) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; ffc0c748: 93 3f 00 b8 stw r25,184(r31) the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { ffc0c74c: 40 be 00 10 bne+ cr7,ffc0c75c <_Thread_Initialize+0x16c> 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; ffc0c750: 3d 20 00 00 lis r9,0 ffc0c754: 80 09 27 88 lwz r0,10120(r9) ffc0c758: 90 1f 00 78 stw r0,120(r31) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0c75c: 80 01 00 34 lwz r0,52(r1) the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; ffc0c760: 3b 40 00 00 li r26,0 ffc0c764: 93 5f 00 44 stw r26,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 ); ffc0c768: 7f 64 db 78 mr r4,r27 ffc0c76c: 7f e3 fb 78 mr r3,r31 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0c770: 90 1f 00 c0 stw r0,192(r31) the_thread->current_state = STATES_DORMANT; ffc0c774: 38 00 00 01 li r0,1 ffc0c778: 90 1f 00 10 stw r0,16(r31) the_thread->Wait.queue = NULL; the_thread->resource_count = 0; ffc0c77c: 93 5f 00 1c stw r26,28(r31) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; ffc0c780: 93 7f 00 18 stw r27,24(r31) the_thread->Start.initial_priority = priority; ffc0c784: 93 7f 00 c4 stw r27,196(r31) _Thread_Set_priority( the_thread, priority ); ffc0c788: 48 00 07 d1 bl ffc0cf58 <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0c78c: a0 1f 00 0a lhz r0,10(r31) ffc0c790: 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 ); ffc0c794: 7f e3 fb 78 mr r3,r31 ffc0c798: 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 ); ffc0c79c: 93 5f 00 88 stw r26,136(r31) ffc0c7a0: 7f e9 01 2e stwx r31,r9,r0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc0c7a4: 93 1f 00 0c stw r24,12(r31) ffc0c7a8: 93 5f 00 84 stw r26,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 ); ffc0c7ac: 48 00 10 29 bl ffc0d7d4 <_User_extensions_Thread_create> if ( extension_status ) ffc0c7b0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c7b4: 38 60 00 01 li r3,1 ffc0c7b8: 40 9e 00 70 bne- cr7,ffc0c828 <_Thread_Initialize+0x238> return true; failed: if ( the_thread->libc_reent ) ffc0c7bc: 80 7f 01 40 lwz r3,320(r31) ffc0c7c0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c7c4: 41 9e 00 08 beq- cr7,ffc0c7cc <_Thread_Initialize+0x1dc> _Workspace_Free( the_thread->libc_reent ); ffc0c7c8: 48 00 14 9d bl ffc0dc64 <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) ffc0c7cc: 80 7f 01 44 lwz r3,324(r31) ffc0c7d0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c7d4: 41 9e 00 08 beq- cr7,ffc0c7dc <_Thread_Initialize+0x1ec> _Workspace_Free( the_thread->API_Extensions[i] ); ffc0c7d8: 48 00 14 8d bl ffc0dc64 <_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] ) ffc0c7dc: 80 7f 01 48 lwz r3,328(r31) ffc0c7e0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c7e4: 41 9e 00 08 beq- cr7,ffc0c7ec <_Thread_Initialize+0x1fc> _Workspace_Free( the_thread->API_Extensions[i] ); ffc0c7e8: 48 00 14 7d bl ffc0dc64 <_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] ) ffc0c7ec: 80 7f 01 4c lwz r3,332(r31) ffc0c7f0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c7f4: 41 9e 00 08 beq- cr7,ffc0c7fc <_Thread_Initialize+0x20c><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); ffc0c7f8: 48 00 14 6d bl ffc0dc64 <_Workspace_Free> <== NOT EXECUTED if ( extensions_area ) ffc0c7fc: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0c800: 41 9e 00 0c beq- cr7,ffc0c80c <_Thread_Initialize+0x21c> (void) _Workspace_Free( extensions_area ); ffc0c804: 7f a3 eb 78 mr r3,r29 ffc0c808: 48 00 14 5d bl ffc0dc64 <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) ffc0c80c: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0c810: 41 9e 00 0c beq- cr7,ffc0c81c <_Thread_Initialize+0x22c> (void) _Workspace_Free( fp_area ); ffc0c814: 7f 83 e3 78 mr r3,r28 ffc0c818: 48 00 14 4d bl ffc0dc64 <_Workspace_Free> #endif _Thread_Stack_Free( the_thread ); ffc0c81c: 7f e3 fb 78 mr r3,r31 ffc0c820: 48 00 09 cd bl ffc0d1ec <_Thread_Stack_Free> return false; ffc0c824: 38 60 00 00 li r3,0 } ffc0c828: 80 01 00 2c lwz r0,44(r1) ffc0c82c: 83 01 00 08 lwz r24,8(r1) ffc0c830: 7c 08 03 a6 mtlr r0 ffc0c834: 83 21 00 0c lwz r25,12(r1) ffc0c838: 83 41 00 10 lwz r26,16(r1) ffc0c83c: 83 61 00 14 lwz r27,20(r1) ffc0c840: 83 81 00 18 lwz r28,24(r1) ffc0c844: 83 a1 00 1c lwz r29,28(r1) ffc0c848: 83 c1 00 20 lwz r30,32(r1) ffc0c84c: 83 e1 00 24 lwz r31,36(r1) ffc0c850: 38 21 00 28 addi r1,r1,40 ffc0c854: 4e 80 00 20 blr =============================================================================== ffc1600c <_Thread_Reset_timeslice>: { ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ffc1600c: 3d 20 00 00 lis r9,0 ffc16010: 81 29 27 f4 lwz r9,10228(r9) ready = executing->ready; ffc16014: 81 69 00 8c lwz r11,140(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc16018: 7c 00 00 a6 mfmsr r0 ffc1601c: 7d 50 42 a6 mfsprg r10,0 ffc16020: 7c 0a 50 78 andc r10,r0,r10 ffc16024: 7d 40 01 24 mtmsr r10 _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { ffc16028: 81 0b 00 00 lwz r8,0(r11) ffc1602c: 81 4b 00 08 lwz r10,8(r11) ffc16030: 7f 88 50 00 cmpw cr7,r8,r10 ffc16034: 40 be 00 08 bne+ cr7,ffc1603c <_Thread_Reset_timeslice+0x30> _ISR_Enable( level ); ffc16038: 48 00 00 5c b ffc16094 <_Thread_Reset_timeslice+0x88> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc1603c: 81 49 00 00 lwz r10,0(r9) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc16040: 38 eb 00 04 addi r7,r11,4 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc16044: 81 09 00 04 lwz r8,4(r9) next->previous = previous; previous->next = next; ffc16048: 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; ffc1604c: 91 0a 00 04 stw r8,4(r10) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc16050: 90 e9 00 00 stw r7,0(r9) old_last_node = the_chain->last; ffc16054: 81 4b 00 08 lwz r10,8(r11) the_chain->last = the_node; ffc16058: 91 2b 00 08 stw r9,8(r11) old_last_node->next = the_node; the_node->previous = old_last_node; ffc1605c: 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; ffc16060: 91 2a 00 00 stw r9,0(r10) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc16064: 7d 40 00 a6 mfmsr r10 ffc16068: 7c 00 01 24 mtmsr r0 ffc1606c: 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 ) ) ffc16070: 3d 40 00 00 lis r10,0 ffc16074: 81 0a 27 d0 lwz r8,10192(r10) ffc16078: 7f 89 40 00 cmpw cr7,r9,r8 ffc1607c: 40 be 00 0c bne+ cr7,ffc16088 <_Thread_Reset_timeslice+0x7c><== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; ffc16080: 81 2b 00 00 lwz r9,0(r11) ffc16084: 91 2a 27 d0 stw r9,10192(r10) _Context_Switch_necessary = true; ffc16088: 39 60 00 01 li r11,1 ffc1608c: 3d 20 00 00 lis r9,0 ffc16090: 99 69 28 04 stb r11,10244(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc16094: 7c 00 01 24 mtmsr r0 ffc16098: 4e 80 00 20 blr =============================================================================== ffc0bfd4 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0bfd4: 94 21 ff e8 stwu r1,-24(r1) ffc0bfd8: 7c 08 02 a6 mflr r0 ffc0bfdc: 90 01 00 1c stw r0,28(r1) if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0bfe0: 80 03 00 10 lwz r0,16(r3) bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0bfe4: 93 e1 00 14 stw r31,20(r1) ffc0bfe8: 7c 7f 1b 78 mr r31,r3 if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0bfec: 70 09 00 01 andi. r9,r0,1 ffc0bff0: 38 00 00 00 li r0,0 ffc0bff4: 40 a2 00 74 bne+ ffc0c068 <_Thread_Restart+0x94> _Thread_Set_transient( the_thread ); ffc0bff8: 90 81 00 08 stw r4,8(r1) ffc0bffc: 90 a1 00 0c stw r5,12(r1) ffc0c000: 48 00 01 f5 bl ffc0c1f4 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); ffc0c004: 7f e3 fb 78 mr r3,r31 ffc0c008: 80 81 00 08 lwz r4,8(r1) ffc0c00c: 80 a1 00 0c lwz r5,12(r1) ffc0c010: 48 00 43 09 bl ffc10318 <_Thread_Reset> _Thread_Load_environment( the_thread ); ffc0c014: 7f e3 fb 78 mr r3,r31 ffc0c018: 48 00 3e fd bl ffc0ff14 <_Thread_Load_environment> _Thread_Ready( the_thread ); ffc0c01c: 7f e3 fb 78 mr r3,r31 ffc0c020: 48 00 42 1d bl ffc1023c <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); ffc0c024: 7f e3 fb 78 mr r3,r31 ffc0c028: 48 00 0a 99 bl ffc0cac0 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) ffc0c02c: 3d 20 00 00 lis r9,0 ffc0c030: 81 29 27 fc lwz r9,10236(r9) ffc0c034: 38 00 00 01 li r0,1 ffc0c038: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0c03c: 40 be 00 2c bne+ cr7,ffc0c068 <_Thread_Restart+0x94> */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) ffc0c040: 80 1f 01 3c lwz r0,316(r31) ffc0c044: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c048: 41 9e 00 0c beq- cr7,ffc0c054 <_Thread_Restart+0x80> <== NEVER TAKEN _Context_Restore_fp( &_Thread_Executing->fp_context ); ffc0c04c: 38 7f 01 3c addi r3,r31,316 ffc0c050: 48 01 42 b1 bl ffc20300 <_CPU_Context_restore_fp> #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); ffc0c054: 3d 20 00 00 lis r9,0 ffc0c058: 80 69 27 fc lwz r3,10236(r9) ffc0c05c: 38 63 00 dc addi r3,r3,220 ffc0c060: 48 01 44 61 bl ffc204c0 <_CPU_Context_restore> ffc0c064: 38 00 00 01 li r0,1 <== NOT EXECUTED return true; } return false; } ffc0c068: 7c 03 03 78 mr r3,r0 ffc0c06c: 80 01 00 1c lwz r0,28(r1) ffc0c070: 83 e1 00 14 lwz r31,20(r1) ffc0c074: 38 21 00 18 addi r1,r1,24 ffc0c078: 7c 08 03 a6 mtlr r0 ffc0c07c: 4e 80 00 20 blr =============================================================================== ffc0f6ac <_Thread_Resume>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0f6ac: 7c 00 00 a6 mfmsr r0 ffc0f6b0: 7d 30 42 a6 mfsprg r9,0 ffc0f6b4: 7c 09 48 78 andc r9,r0,r9 ffc0f6b8: 7d 20 01 24 mtmsr r9 _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; ffc0f6bc: 81 23 00 10 lwz r9,16(r3) if ( current_state & STATES_SUSPENDED ) { ffc0f6c0: 71 2b 00 02 andi. r11,r9,2 ffc0f6c4: 41 82 00 a8 beq- ffc0f76c <_Thread_Resume+0xc0> <== NEVER TAKEN ffc0f6c8: 55 29 07 fa rlwinm r9,r9,0,31,29 current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { ffc0f6cc: 2f 89 00 00 cmpwi cr7,r9,0 } #endif current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = ffc0f6d0: 91 23 00 10 stw r9,16(r3) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { ffc0f6d4: 40 9e 00 98 bne- cr7,ffc0f76c <_Thread_Resume+0xc0> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc0f6d8: 81 63 00 90 lwz r11,144(r3) ffc0f6dc: 81 43 00 98 lwz r10,152(r3) ffc0f6e0: 81 0b 00 00 lwz r8,0(r11) _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); ffc0f6e4: 81 23 00 8c lwz r9,140(r3) ffc0f6e8: 7d 0a 53 78 or r10,r8,r10 ffc0f6ec: 91 4b 00 00 stw r10,0(r11) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0f6f0: 39 69 00 04 addi r11,r9,4 _Priority_Major_bit_map |= the_priority_map->ready_major; ffc0f6f4: 3d 40 00 00 lis r10,0 ffc0f6f8: 91 63 00 00 stw r11,0(r3) ffc0f6fc: 80 ea 27 c4 lwz r7,10180(r10) ffc0f700: 81 03 00 94 lwz r8,148(r3) old_last_node = the_chain->last; ffc0f704: 81 69 00 08 lwz r11,8(r9) ffc0f708: 7c e8 43 78 or r8,r7,r8 the_chain->last = the_node; ffc0f70c: 90 69 00 08 stw r3,8(r9) ffc0f710: 91 0a 27 c4 stw r8,10180(r10) old_last_node->next = the_node; the_node->previous = old_last_node; ffc0f714: 91 63 00 04 stw r11,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; ffc0f718: 90 6b 00 00 stw r3,0(r11) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0f71c: 7d 20 00 a6 mfmsr r9 ffc0f720: 7c 00 01 24 mtmsr r0 ffc0f724: 7d 20 01 24 mtmsr r9 _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { ffc0f728: 3d 60 00 00 lis r11,0 ffc0f72c: 81 23 00 14 lwz r9,20(r3) ffc0f730: 81 4b 27 ac lwz r10,10156(r11) ffc0f734: 81 4a 00 14 lwz r10,20(r10) ffc0f738: 7f 89 50 40 cmplw cr7,r9,r10 ffc0f73c: 40 9c 00 30 bge- cr7,ffc0f76c <_Thread_Resume+0xc0> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || ffc0f740: 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; ffc0f744: 90 6b 27 ac stw r3,10156(r11) if ( _Thread_Executing->is_preemptible || ffc0f748: 81 4a 27 d0 lwz r10,10192(r10) ffc0f74c: 89 6a 00 75 lbz r11,117(r10) ffc0f750: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0f754: 40 9e 00 0c bne- cr7,ffc0f760 <_Thread_Resume+0xb4> ffc0f758: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f75c: 40 9e 00 10 bne- cr7,ffc0f76c <_Thread_Resume+0xc0> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; ffc0f760: 39 60 00 01 li r11,1 ffc0f764: 3d 20 00 00 lis r9,0 ffc0f768: 99 69 27 e0 stb r11,10208(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0f76c: 7c 00 01 24 mtmsr r0 } } } _ISR_Enable( level ); } ffc0f770: 4e 80 00 20 blr =============================================================================== ffc11378 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { ffc11378: 94 21 ff f0 stwu r1,-16(r1) ffc1137c: 7c 08 02 a6 mflr r0 Thread_Control *executing; executing = _Thread_Executing; ffc11380: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { ffc11384: 90 01 00 14 stw r0,20(r1) ffc11388: 93 e1 00 0c stw r31,12(r1) Thread_Control *executing; executing = _Thread_Executing; ffc1138c: 83 e9 27 f4 lwz r31,10228(r9) /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) ffc11390: 88 1f 00 75 lbz r0,117(r31) ffc11394: 2f 80 00 00 cmpwi cr7,r0,0 ffc11398: 41 9e 00 7c beq- cr7,ffc11414 <_Thread_Tickle_timeslice+0x9c> return; if ( !_States_Is_ready( executing->current_state ) ) ffc1139c: 80 1f 00 10 lwz r0,16(r31) ffc113a0: 2f 80 00 00 cmpwi cr7,r0,0 ffc113a4: 40 9e 00 70 bne- cr7,ffc11414 <_Thread_Tickle_timeslice+0x9c> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { ffc113a8: 80 1f 00 7c lwz r0,124(r31) ffc113ac: 2b 80 00 01 cmplwi cr7,r0,1 ffc113b0: 41 9c 00 64 blt- cr7,ffc11414 <_Thread_Tickle_timeslice+0x9c> ffc113b4: 2b 80 00 02 cmplwi cr7,r0,2 ffc113b8: 40 9d 00 10 ble- cr7,ffc113c8 <_Thread_Tickle_timeslice+0x50> ffc113bc: 2f 80 00 03 cmpwi cr7,r0,3 ffc113c0: 40 be 00 54 bne+ cr7,ffc11414 <_Thread_Tickle_timeslice+0x9c><== NEVER TAKEN ffc113c4: 48 00 00 2c b ffc113f0 <_Thread_Tickle_timeslice+0x78> 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 ) { ffc113c8: 81 3f 00 78 lwz r9,120(r31) ffc113cc: 38 09 ff ff addi r0,r9,-1 ffc113d0: 2f 80 00 00 cmpwi cr7,r0,0 ffc113d4: 90 1f 00 78 stw r0,120(r31) ffc113d8: 41 bd 00 3c bgt+ cr7,ffc11414 <_Thread_Tickle_timeslice+0x9c> _Thread_Reset_timeslice(); ffc113dc: 48 00 4c 31 bl ffc1600c <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc113e0: 3d 20 00 00 lis r9,0 ffc113e4: 80 09 27 ac lwz r0,10156(r9) ffc113e8: 90 1f 00 78 stw r0,120(r31) ffc113ec: 48 00 00 28 b ffc11414 <_Thread_Tickle_timeslice+0x9c> } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) ffc113f0: 81 3f 00 78 lwz r9,120(r31) ffc113f4: 38 09 ff ff addi r0,r9,-1 ffc113f8: 2f 80 00 00 cmpwi cr7,r0,0 ffc113fc: 90 1f 00 78 stw r0,120(r31) ffc11400: 40 be 00 14 bne+ cr7,ffc11414 <_Thread_Tickle_timeslice+0x9c> (*executing->budget_callout)( executing ); ffc11404: 80 1f 00 80 lwz r0,128(r31) ffc11408: 7f e3 fb 78 mr r3,r31 ffc1140c: 7c 09 03 a6 mtctr r0 ffc11410: 4e 80 04 21 bctrl break; #endif } } ffc11414: 80 01 00 14 lwz r0,20(r1) ffc11418: 83 e1 00 0c lwz r31,12(r1) ffc1141c: 38 21 00 10 addi r1,r1,16 ffc11420: 7c 08 03 a6 mtlr r0 ffc11424: 4e 80 00 20 blr =============================================================================== ffc0d428 <_Thread_Yield_processor>: { ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ffc0d428: 3d 20 00 00 lis r9,0 ffc0d42c: 81 29 27 d0 lwz r9,10192(r9) ready = executing->ready; ffc0d430: 81 69 00 8c lwz r11,140(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0d434: 7c 00 00 a6 mfmsr r0 ffc0d438: 7d 50 42 a6 mfsprg r10,0 ffc0d43c: 7c 0a 50 78 andc r10,r0,r10 ffc0d440: 7d 40 01 24 mtmsr r10 _ISR_Disable( level ); if ( !_Chain_Has_only_one_node( ready ) ) { ffc0d444: 80 eb 00 00 lwz r7,0(r11) ffc0d448: 3d 40 00 00 lis r10,0 ffc0d44c: 81 0b 00 08 lwz r8,8(r11) ffc0d450: 7f 87 40 00 cmpw cr7,r7,r8 ffc0d454: 41 9e 00 50 beq- cr7,ffc0d4a4 <_Thread_Yield_processor+0x7c> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0d458: 81 09 00 00 lwz r8,0(r9) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0d45c: 38 cb 00 04 addi r6,r11,4 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0d460: 80 e9 00 04 lwz r7,4(r9) next->previous = previous; previous->next = next; ffc0d464: 91 07 00 00 stw r8,0(r7) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc0d468: 90 e8 00 04 stw r7,4(r8) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc0d46c: 90 c9 00 00 stw r6,0(r9) old_last_node = the_chain->last; ffc0d470: 81 0b 00 08 lwz r8,8(r11) the_chain->last = the_node; ffc0d474: 91 2b 00 08 stw r9,8(r11) old_last_node->next = the_node; the_node->previous = old_last_node; ffc0d478: 91 09 00 04 stw r8,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; ffc0d47c: 91 28 00 00 stw r9,0(r8) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0d480: 7d 00 00 a6 mfmsr r8 ffc0d484: 7c 00 01 24 mtmsr r0 ffc0d488: 7d 00 01 24 mtmsr r8 _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) ffc0d48c: 81 0a 27 ac lwz r8,10156(r10) ffc0d490: 7f 89 40 00 cmpw cr7,r9,r8 ffc0d494: 40 be 00 1c bne+ cr7,ffc0d4b0 <_Thread_Yield_processor+0x88><== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; ffc0d498: 81 2b 00 00 lwz r9,0(r11) ffc0d49c: 91 2a 27 ac stw r9,10156(r10) ffc0d4a0: 48 00 00 10 b ffc0d4b0 <_Thread_Yield_processor+0x88> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) ffc0d4a4: 81 6a 27 ac lwz r11,10156(r10) ffc0d4a8: 7f 89 58 00 cmpw cr7,r9,r11 ffc0d4ac: 41 9e 00 10 beq- cr7,ffc0d4bc <_Thread_Yield_processor+0x94><== ALWAYS TAKEN _Context_Switch_necessary = true; ffc0d4b0: 39 60 00 01 li r11,1 ffc0d4b4: 3d 20 00 00 lis r9,0 ffc0d4b8: 99 69 27 e0 stb r11,10208(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0d4bc: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); } ffc0d4c0: 4e 80 00 20 blr =============================================================================== ffc0cbf4 <_Thread_queue_Enqueue_priority>: Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; ffc0cbf4: 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); ffc0cbf8: 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 ) { ffc0cbfc: 94 21 ff f0 stwu r1,-16(r1) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc0cc00: 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 ) ) ffc0cc04: 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 ]; ffc0cc08: 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); ffc0cc0c: 91 04 00 38 stw r8,56(r4) ffc0cc10: 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 ) { ffc0cc14: 93 e1 00 0c stw r31,12(r1) the_chain->permanent_null = NULL; ffc0cc18: 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; ffc0cc1c: 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 ]; ffc0cc20: 7d 43 52 14 add r10,r3,r10 ffc0cc24: 91 04 00 3c stw r8,60(r4) the_chain->last = _Chain_Head(the_chain); ffc0cc28: 91 64 00 40 stw r11,64(r4) block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) ffc0cc2c: 40 82 00 98 bne- ffc0ccc4 <_Thread_queue_Enqueue_priority+0xd0> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc0cc30: 38 ca 00 04 addi r6,r10,4 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0cc34: 7d 00 00 a6 mfmsr r8 ffc0cc38: 7d 70 42 a6 mfsprg r11,0 ffc0cc3c: 7d 0b 58 78 andc r11,r8,r11 ffc0cc40: 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; ffc0cc44: 38 e0 ff ff li r7,-1 ffc0cc48: 81 6a 00 00 lwz r11,0(r10) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { ffc0cc4c: 48 00 00 34 b ffc0cc80 <_Thread_queue_Enqueue_priority+0x8c> search_priority = search_thread->current_priority; ffc0cc50: 80 eb 00 14 lwz r7,20(r11) if ( priority <= search_priority ) ffc0cc54: 7f 80 38 40 cmplw cr7,r0,r7 ffc0cc58: 40 9d 00 30 ble- cr7,ffc0cc88 <_Thread_queue_Enqueue_priority+0x94> static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0cc5c: 7d 80 00 a6 mfmsr r12 ffc0cc60: 7d 00 01 24 mtmsr r8 ffc0cc64: 7d 80 01 24 mtmsr r12 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) ) { ffc0cc68: 81 8b 00 10 lwz r12,16(r11) ffc0cc6c: 7d 3f 60 39 and. r31,r9,r12 ffc0cc70: 40 a2 00 0c bne+ ffc0cc7c <_Thread_queue_Enqueue_priority+0x88><== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0cc74: 7d 00 01 24 mtmsr r8 <== NOT EXECUTED ffc0cc78: 4b ff ff bc b ffc0cc34 <_Thread_queue_Enqueue_priority+0x40><== NOT EXECUTED _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; ffc0cc7c: 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 ) ) { ffc0cc80: 7f 8b 30 00 cmpw cr7,r11,r6 ffc0cc84: 40 9e ff cc bne+ cr7,ffc0cc50 <_Thread_queue_Enqueue_priority+0x5c> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != ffc0cc88: 81 43 00 30 lwz r10,48(r3) 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 ) ) { ffc0cc8c: 7d 09 43 78 mr r9,r8 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != ffc0cc90: 2f 8a 00 01 cmpwi cr7,r10,1 ffc0cc94: 40 be 00 f8 bne+ cr7,ffc0cd8c <_Thread_queue_Enqueue_priority+0x198> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) ffc0cc98: 7f 80 38 00 cmpw cr7,r0,r7 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc0cc9c: 38 00 00 00 li r0,0 ffc0cca0: 90 03 00 30 stw r0,48(r3) if ( priority == search_priority ) ffc0cca4: 41 9e 00 c4 beq- cr7,ffc0cd68 <_Thread_queue_Enqueue_priority+0x174> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; ffc0cca8: 81 2b 00 04 lwz r9,4(r11) the_node = (Chain_Node *) the_thread; the_node->next = search_node; ffc0ccac: 91 64 00 00 stw r11,0(r4) the_node->previous = previous_node; ffc0ccb0: 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; ffc0ccb4: 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; ffc0ccb8: 90 89 00 00 stw r4,0(r9) search_node->previous = the_node; ffc0ccbc: 90 8b 00 04 stw r4,4(r11) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); ffc0ccc0: 48 00 00 9c b ffc0cd5c <_Thread_queue_Enqueue_priority+0x168> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; ffc0ccc4: 3c c0 00 00 lis r6,0 ffc0ccc8: 38 c6 26 c4 addi r6,r6,9924 ffc0cccc: 88 e6 00 00 lbz r7,0(r6) ffc0ccd0: 38 e7 00 01 addi r7,r7,1 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0ccd4: 7d 00 00 a6 mfmsr r8 ffc0ccd8: 7d 70 42 a6 mfsprg r11,0 ffc0ccdc: 7d 0b 58 78 andc r11,r8,r11 ffc0cce0: 7d 60 01 24 mtmsr r11 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; ffc0cce4: 81 6a 00 08 lwz r11,8(r10) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { ffc0cce8: 48 00 00 34 b ffc0cd1c <_Thread_queue_Enqueue_priority+0x128> search_priority = search_thread->current_priority; ffc0ccec: 80 eb 00 14 lwz r7,20(r11) if ( priority >= search_priority ) ffc0ccf0: 7f 80 38 40 cmplw cr7,r0,r7 ffc0ccf4: 40 9c 00 30 bge- cr7,ffc0cd24 <_Thread_queue_Enqueue_priority+0x130> static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc0ccf8: 7d 80 00 a6 mfmsr r12 ffc0ccfc: 7d 00 01 24 mtmsr r8 ffc0cd00: 7d 80 01 24 mtmsr r12 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) ) { ffc0cd04: 81 8b 00 10 lwz r12,16(r11) ffc0cd08: 7d 3f 60 39 and. r31,r9,r12 ffc0cd0c: 40 a2 00 0c bne+ ffc0cd18 <_Thread_queue_Enqueue_priority+0x124> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0cd10: 7d 00 01 24 mtmsr r8 ffc0cd14: 4b ff ff b8 b ffc0cccc <_Thread_queue_Enqueue_priority+0xd8> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) ffc0cd18: 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 ) ) { ffc0cd1c: 7f 8b 50 00 cmpw cr7,r11,r10 ffc0cd20: 40 9e ff cc bne+ cr7,ffc0ccec <_Thread_queue_Enqueue_priority+0xf8> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != ffc0cd24: 81 43 00 30 lwz r10,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 ) ) { ffc0cd28: 7d 09 43 78 mr r9,r8 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != ffc0cd2c: 2f 8a 00 01 cmpwi cr7,r10,1 ffc0cd30: 40 be 00 5c bne+ cr7,ffc0cd8c <_Thread_queue_Enqueue_priority+0x198> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) ffc0cd34: 7f 80 38 00 cmpw cr7,r0,r7 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; ffc0cd38: 38 00 00 00 li r0,0 ffc0cd3c: 90 03 00 30 stw r0,48(r3) if ( priority == search_priority ) ffc0cd40: 41 9e 00 28 beq- cr7,ffc0cd68 <_Thread_queue_Enqueue_priority+0x174> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; ffc0cd44: 81 2b 00 00 lwz r9,0(r11) the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; ffc0cd48: 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; ffc0cd4c: 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; ffc0cd50: 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; ffc0cd54: 90 8b 00 00 stw r4,0(r11) next_node->previous = the_node; ffc0cd58: 90 89 00 04 stw r4,4(r9) ffc0cd5c: 7d 00 01 24 mtmsr r8 ffc0cd60: 38 60 00 01 li r3,1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc0cd64: 48 00 00 30 b ffc0cd94 <_Thread_queue_Enqueue_priority+0x1a0> ffc0cd68: 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; ffc0cd6c: 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; ffc0cd70: 81 4b 00 04 lwz r10,4(r11) the_node = (Chain_Node *) the_thread; the_node->next = search_node; ffc0cd74: 91 64 00 00 stw r11,0(r4) the_node->previous = previous_node; ffc0cd78: 91 44 00 04 stw r10,4(r4) previous_node->next = the_node; ffc0cd7c: 90 8a 00 00 stw r4,0(r10) search_node->previous = the_node; ffc0cd80: 90 8b 00 04 stw r4,4(r11) ffc0cd84: 7d 20 01 24 mtmsr r9 ffc0cd88: 4b ff ff d8 b ffc0cd60 <_Thread_queue_Enqueue_priority+0x16c> * 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; ffc0cd8c: 91 25 00 00 stw r9,0(r5) return the_thread_queue->sync_state; ffc0cd90: 80 63 00 30 lwz r3,48(r3) } ffc0cd94: 83 e1 00 0c lwz r31,12(r1) ffc0cd98: 38 21 00 10 addi r1,r1,16 ffc0cd9c: 4e 80 00 20 blr =============================================================================== ffc0ce84 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0ce84: 94 21 ff d8 stwu r1,-40(r1) ffc0ce88: 7c 08 02 a6 mflr r0 ffc0ce8c: 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 ) ffc0ce90: 7c 7f 1b 79 mr. r31,r3 void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0ce94: 93 c1 00 20 stw r30,32(r1) ffc0ce98: 7c 9e 23 78 mr r30,r4 ffc0ce9c: 90 01 00 2c stw r0,44(r1) ffc0cea0: 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 ) ffc0cea4: 41 82 00 54 beq- ffc0cef8 <_Thread_queue_Requeue+0x74> <== 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 ) { ffc0cea8: 80 1f 00 34 lwz r0,52(r31) ffc0ceac: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ceb0: 40 be 00 48 bne+ cr7,ffc0cef8 <_Thread_queue_Requeue+0x74><== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0ceb4: 7f a0 00 a6 mfmsr r29 ffc0ceb8: 7d 30 42 a6 mfsprg r9,0 ffc0cebc: 7f a9 48 78 andc r9,r29,r9 ffc0cec0: 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 ) ) { ffc0cec4: 3d 60 00 03 lis r11,3 ffc0cec8: 81 24 00 10 lwz r9,16(r4) ffc0cecc: 61 6b be e0 ori r11,r11,48864 ffc0ced0: 7d 6a 48 39 and. r10,r11,r9 ffc0ced4: 41 a2 00 20 beq+ ffc0cef4 <_Thread_queue_Requeue+0x70> <== NEVER TAKEN ffc0ced8: 90 1f 00 30 stw r0,48(r31) _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); ffc0cedc: 38 a0 00 01 li r5,1 ffc0cee0: 48 00 84 95 bl ffc15374 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); ffc0cee4: 7f e3 fb 78 mr r3,r31 ffc0cee8: 7f c4 f3 78 mr r4,r30 ffc0ceec: 38 a1 00 08 addi r5,r1,8 ffc0cef0: 4b ff fd 05 bl ffc0cbf4 <_Thread_queue_Enqueue_priority> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0cef4: 7f a0 01 24 mtmsr r29 } _ISR_Enable( level ); } } ffc0cef8: 80 01 00 2c lwz r0,44(r1) ffc0cefc: 83 a1 00 1c lwz r29,28(r1) ffc0cf00: 7c 08 03 a6 mtlr r0 ffc0cf04: 83 c1 00 20 lwz r30,32(r1) ffc0cf08: 83 e1 00 24 lwz r31,36(r1) ffc0cf0c: 38 21 00 28 addi r1,r1,40 ffc0cf10: 4e 80 00 20 blr =============================================================================== ffc0cf14 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0cf14: 94 21 ff e8 stwu r1,-24(r1) ffc0cf18: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0cf1c: 38 81 00 08 addi r4,r1,8 void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0cf20: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0cf24: 4b ff f6 19 bl ffc0c53c <_Thread_Get> switch ( location ) { ffc0cf28: 80 01 00 08 lwz r0,8(r1) ffc0cf2c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cf30: 40 9e 00 18 bne- cr7,ffc0cf48 <_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 ); ffc0cf34: 48 00 85 3d bl ffc15470 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0cf38: 3d 20 00 00 lis r9,0 ffc0cf3c: 81 69 27 90 lwz r11,10128(r9) ffc0cf40: 38 0b ff ff addi r0,r11,-1 ffc0cf44: 90 09 27 90 stw r0,10128(r9) _Thread_Unnest_dispatch(); break; } } ffc0cf48: 80 01 00 1c lwz r0,28(r1) ffc0cf4c: 38 21 00 18 addi r1,r1,24 ffc0cf50: 7c 08 03 a6 mtlr r0 ffc0cf54: 4e 80 00 20 blr =============================================================================== ffc19d0c <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc19d0c: 94 21 ff 98 stwu r1,-104(r1) ffc19d10: 7c 08 02 a6 mflr r0 ffc19d14: 92 01 00 28 stw r16,40(r1) Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc19d18: 3a 01 00 08 addi r16,r1,8 ffc19d1c: 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; ffc19d20: 38 00 00 00 li r0,0 ffc19d24: 93 01 00 48 stw r24,72(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc19d28: 3b 01 00 0c addi r24,r1,12 ffc19d2c: 93 61 00 54 stw r27,84(r1) ffc19d30: 3b 61 00 18 addi r27,r1,24 ffc19d34: 93 c1 00 60 stw r30,96(r1) ffc19d38: 3b c1 00 14 addi r30,r1,20 ffc19d3c: 92 21 00 2c stw r17,44(r1) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc19d40: 3e 20 00 00 lis r17,0 ffc19d44: 3a 31 28 c0 addi r17,r17,10432 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc19d48: 92 41 00 30 stw r18,48(r1) static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc19d4c: 3e 40 00 00 lis r18,0 ffc19d50: 3a 52 28 88 addi r18,r18,10376 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc19d54: 93 21 00 4c stw r25,76(r1) ffc19d58: 3f 20 00 00 lis r25,0 ffc19d5c: 3b 39 28 68 addi r25,r25,10344 ffc19d60: 93 a1 00 5c stw r29,92(r1) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; ffc19d64: 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); ffc19d68: 93 01 00 08 stw r24,8(r1) the_chain->permanent_null = NULL; ffc19d6c: 90 01 00 0c stw r0,12(r1) the_chain->last = _Chain_Head(the_chain); ffc19d70: 92 01 00 10 stw r16,16(r1) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); ffc19d74: 93 61 00 14 stw r27,20(r1) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); ffc19d78: 93 c1 00 1c stw r30,28(r1) ffc19d7c: 92 61 00 34 stw r19,52(r1) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc19d80: 3a 63 00 08 addi r19,r3,8 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc19d84: 92 81 00 38 stw r20,56(r1) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc19d88: 3a 83 00 40 addi r20,r3,64 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc19d8c: 92 a1 00 3c stw r21,60(r1) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) ffc19d90: 3a a0 00 00 li r21,0 ffc19d94: 92 c1 00 40 stw r22,64(r1) * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; ffc19d98: 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 ) { ffc19d9c: 92 e1 00 44 stw r23,68(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; ffc19da0: 3a e0 00 01 li r23,1 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc19da4: 93 41 00 50 stw r26,80(r1) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc19da8: 3b 43 00 30 addi r26,r3,48 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc19dac: 93 81 00 58 stw r28,88(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 ); ffc19db0: 3b 83 00 68 addi r28,r3,104 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc19db4: 93 e1 00 64 stw r31,100(r1) ffc19db8: 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; ffc19dbc: 92 1f 00 78 stw r16,120(r31) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc19dc0: 80 11 00 00 lwz r0,0(r17) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc19dc4: 7f c5 f3 78 mr r5,r30 Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; ffc19dc8: 80 9f 00 3c lwz r4,60(r31) watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc19dcc: 7f 43 d3 78 mr r3,r26 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; ffc19dd0: 90 1f 00 3c stw r0,60(r31) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc19dd4: 7c 84 00 50 subf r4,r4,r0 ffc19dd8: 48 00 4f 6d bl ffc1ed44 <_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(); ffc19ddc: 83 b2 00 00 lwz r29,0(r18) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; ffc19de0: 80 bf 00 74 lwz r5,116(r31) /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { ffc19de4: 7f 9d 28 40 cmplw cr7,r29,r5 ffc19de8: 40 bd 00 18 ble+ cr7,ffc19e00 <_Timer_server_Body+0xf4> /* * 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 ); ffc19dec: 7c 85 e8 50 subf r4,r5,r29 ffc19df0: 7f 83 e3 78 mr r3,r28 ffc19df4: 7f c5 f3 78 mr r5,r30 ffc19df8: 48 00 4f 4d bl ffc1ed44 <_Watchdog_Adjust_to_chain> ffc19dfc: 48 00 00 18 b ffc19e14 <_Timer_server_Body+0x108> } else if ( snapshot < last_snapshot ) { ffc19e00: 40 bc 00 14 bge+ cr7,ffc19e14 <_Timer_server_Body+0x108> /* * 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 ); ffc19e04: 7c bd 28 50 subf r5,r29,r5 ffc19e08: 7f 83 e3 78 mr r3,r28 ffc19e0c: 38 80 00 01 li r4,1 ffc19e10: 48 00 4e 51 bl ffc1ec60 <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; ffc19e14: 93 bf 00 74 stw r29,116(r31) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); ffc19e18: 80 7f 00 78 lwz r3,120(r31) ffc19e1c: 48 00 0b 79 bl ffc1a994 <_Chain_Get> if ( timer == NULL ) { ffc19e20: 7c 64 1b 79 mr. r4,r3 ffc19e24: 41 82 00 34 beq- ffc19e58 <_Timer_server_Body+0x14c> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc19e28: 80 04 00 38 lwz r0,56(r4) ffc19e2c: 2f 00 00 01 cmpwi cr6,r0,1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc19e30: 2f 80 00 03 cmpwi cr7,r0,3 static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc19e34: 40 ba 00 10 bne+ cr6,ffc19e44 <_Timer_server_Body+0x138> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc19e38: 38 84 00 10 addi r4,r4,16 ffc19e3c: 7f 43 d3 78 mr r3,r26 ffc19e40: 48 00 00 10 b ffc19e50 <_Timer_server_Body+0x144> } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc19e44: 40 9e ff d4 bne+ cr7,ffc19e18 <_Timer_server_Body+0x10c><== NEVER TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc19e48: 38 84 00 10 addi r4,r4,16 ffc19e4c: 7f 83 e3 78 mr r3,r28 ffc19e50: 48 00 4f ad bl ffc1edfc <_Watchdog_Insert> ffc19e54: 4b ff ff c4 b ffc19e18 <_Timer_server_Body+0x10c> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc19e58: 7c 00 00 a6 mfmsr r0 ffc19e5c: 7d 30 42 a6 mfsprg r9,0 ffc19e60: 7c 09 48 78 andc r9,r0,r9 ffc19e64: 7d 20 01 24 mtmsr r9 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ffc19e68: 81 21 00 08 lwz r9,8(r1) ffc19e6c: 7f 89 c0 00 cmpw cr7,r9,r24 ffc19e70: 40 be 00 1c bne+ cr7,ffc19e8c <_Timer_server_Body+0x180><== NEVER TAKEN ts->insert_chain = NULL; ffc19e74: 90 9f 00 78 stw r4,120(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc19e78: 7c 00 01 24 mtmsr r0 _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 ) ) { ffc19e7c: 80 01 00 14 lwz r0,20(r1) ffc19e80: 7f 80 d8 00 cmpw cr7,r0,r27 ffc19e84: 40 be 00 10 bne+ cr7,ffc19e94 <_Timer_server_Body+0x188> ffc19e88: 48 00 00 64 b ffc19eec <_Timer_server_Body+0x1e0> ffc19e8c: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED ffc19e90: 4b ff ff 30 b ffc19dc0 <_Timer_server_Body+0xb4> <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc19e94: 7c 00 00 a6 mfmsr r0 ffc19e98: 7d 30 42 a6 mfsprg r9,0 ffc19e9c: 7c 09 48 78 andc r9,r0,r9 ffc19ea0: 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)); ffc19ea4: 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)) ffc19ea8: 7f 09 d8 00 cmpw cr6,r9,r27 * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { ffc19eac: 2f 89 00 00 cmpwi cr7,r9,0 ffc19eb0: 41 9a 00 34 beq- cr6,ffc19ee4 <_Timer_server_Body+0x1d8> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; ffc19eb4: 81 69 00 00 lwz r11,0(r9) the_chain->first = new_first; ffc19eb8: 91 61 00 14 stw r11,20(r1) new_first->previous = _Chain_Head(the_chain); ffc19ebc: 93 cb 00 04 stw r30,4(r11) ffc19ec0: 41 9e 00 24 beq- cr7,ffc19ee4 <_Timer_server_Body+0x1d8><== NEVER TAKEN watchdog->state = WATCHDOG_INACTIVE; ffc19ec4: 92 a9 00 08 stw r21,8(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc19ec8: 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 ); ffc19ecc: 80 09 00 1c lwz r0,28(r9) ffc19ed0: 80 89 00 24 lwz r4,36(r9) ffc19ed4: 80 69 00 20 lwz r3,32(r9) ffc19ed8: 7c 09 03 a6 mtctr r0 ffc19edc: 4e 80 04 21 bctrl } ffc19ee0: 4b ff ff b4 b ffc19e94 <_Timer_server_Body+0x188> ffc19ee4: 7c 00 01 24 mtmsr r0 ffc19ee8: 4b ff fe d4 b ffc19dbc <_Timer_server_Body+0xb0> } else { ts->active = false; ffc19eec: 9a df 00 7c stb r22,124(r31) ffc19ef0: 81 39 00 00 lwz r9,0(r25) ffc19ef4: 38 09 00 01 addi r0,r9,1 ffc19ef8: 90 19 00 00 stw r0,0(r25) /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); ffc19efc: 80 7f 00 00 lwz r3,0(r31) ffc19f00: 38 80 00 08 li r4,8 ffc19f04: 48 00 41 81 bl ffc1e084 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); ffc19f08: 7f e3 fb 78 mr r3,r31 ffc19f0c: 4b ff fd 01 bl ffc19c0c <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); ffc19f10: 7f e3 fb 78 mr r3,r31 ffc19f14: 4b ff fd 79 bl ffc19c8c <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); ffc19f18: 48 00 35 15 bl ffc1d42c <_Thread_Enable_dispatch> ts->active = true; ffc19f1c: 9a ff 00 7c stb r23,124(r31) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc19f20: 7e 63 9b 78 mr r3,r19 ffc19f24: 48 00 50 31 bl ffc1ef54 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc19f28: 7e 83 a3 78 mr r3,r20 ffc19f2c: 48 00 50 29 bl ffc1ef54 <_Watchdog_Remove> ffc19f30: 4b ff fe 8c b ffc19dbc <_Timer_server_Body+0xb0> =============================================================================== ffc0df68 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { ffc0df68: 94 21 ff e0 stwu r1,-32(r1) ffc0df6c: 7c 08 02 a6 mflr r0 ffc0df70: 90 01 00 24 stw r0,36(r1) ffc0df74: 93 c1 00 18 stw r30,24(r1) ffc0df78: 7c be 2b 78 mr r30,r5 ffc0df7c: 93 e1 00 1c stw r31,28(r1) ffc0df80: 7c 7f 1b 78 mr r31,r3 ffc0df84: 93 61 00 0c stw r27,12(r1) ffc0df88: 93 81 00 10 stw r28,16(r1) ffc0df8c: 93 a1 00 14 stw r29,20(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0df90: 7c 00 00 a6 mfmsr r0 ffc0df94: 7d 30 42 a6 mfsprg r9,0 ffc0df98: 7c 09 48 78 andc r9,r0,r9 ffc0df9c: 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)); ffc0dfa0: 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; ffc0dfa4: 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 ) ) { ffc0dfa8: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0dfac: 41 9e 00 78 beq- cr7,ffc0e024 <_Watchdog_Adjust+0xbc> switch ( direction ) { ffc0dfb0: 2f 84 00 00 cmpwi cr7,r4,0 if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0dfb4: 3b 60 00 01 li r27,1 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { ffc0dfb8: 41 9e 00 64 beq- cr7,ffc0e01c <_Watchdog_Adjust+0xb4> ffc0dfbc: 2f 84 00 01 cmpwi cr7,r4,1 ffc0dfc0: 40 be 00 64 bne+ cr7,ffc0e024 <_Watchdog_Adjust+0xbc> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; ffc0dfc4: 81 69 00 10 lwz r11,16(r9) ffc0dfc8: 7f cb 2a 14 add r30,r11,r5 ffc0dfcc: 48 00 00 18 b ffc0dfe4 <_Watchdog_Adjust+0x7c> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); ffc0dfd0: 81 3f 00 00 lwz r9,0(r31) break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { ffc0dfd4: 83 a9 00 10 lwz r29,16(r9) ffc0dfd8: 7f 9e e8 40 cmplw cr7,r30,r29 ffc0dfdc: 40 bc 00 10 bge+ cr7,ffc0dfec <_Watchdog_Adjust+0x84> _Watchdog_First( header )->delta_interval -= units; ffc0dfe0: 7f de e8 50 subf r30,r30,r29 ffc0dfe4: 93 c9 00 10 stw r30,16(r9) break; ffc0dfe8: 48 00 00 3c b ffc0e024 <_Watchdog_Adjust+0xbc> } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0dfec: 93 69 00 10 stw r27,16(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0dff0: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _Watchdog_Tickle( header ); ffc0dff4: 7f e3 fb 78 mr r3,r31 ffc0dff8: 48 00 02 59 bl ffc0e250 <_Watchdog_Tickle> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0dffc: 7c 00 00 a6 mfmsr r0 ffc0e000: 7d 30 42 a6 mfsprg r9,0 ffc0e004: 7c 09 48 78 andc r9,r0,r9 ffc0e008: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0e00c: 81 3f 00 00 lwz r9,0(r31) while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; ffc0e010: 7f dd f0 50 subf r30,r29,r30 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0e014: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0e018: 41 9e 00 0c beq- cr7,ffc0e024 <_Watchdog_Adjust+0xbc> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0e01c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0e020: 40 9e ff b0 bne+ cr7,ffc0dfd0 <_Watchdog_Adjust+0x68> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0e024: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0e028: 80 01 00 24 lwz r0,36(r1) ffc0e02c: 83 61 00 0c lwz r27,12(r1) ffc0e030: 7c 08 03 a6 mtlr r0 ffc0e034: 83 81 00 10 lwz r28,16(r1) ffc0e038: 83 a1 00 14 lwz r29,20(r1) ffc0e03c: 83 c1 00 18 lwz r30,24(r1) ffc0e040: 83 e1 00 1c lwz r31,28(r1) ffc0e044: 38 21 00 20 addi r1,r1,32 ffc0e048: 4e 80 00 20 blr =============================================================================== ffc1ed44 <_Watchdog_Adjust_to_chain>: { Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { ffc1ed44: 2c 04 00 00 cmpwi r4,0 ffc1ed48: 4d 82 00 20 beqlr static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1ed4c: 7d 40 00 a6 mfmsr r10 ffc1ed50: 7c 10 42 a6 mfsprg r0,0 ffc1ed54: 7d 40 00 78 andc r0,r10,r0 ffc1ed58: 7c 00 01 24 mtmsr r0 /* * 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; ffc1ed5c: 38 c0 00 00 li r6,0 ffc1ed60: 39 03 00 04 addi r8,r3,4 ffc1ed64: 39 85 00 04 addi r12,r5,4 ffc1ed68: 48 00 00 0c b ffc1ed74 <_Watchdog_Adjust_to_chain+0x30> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { ffc1ed6c: 2f 84 00 00 cmpwi cr7,r4,0 ffc1ed70: 41 9e 00 84 beq- cr7,ffc1edf4 <_Watchdog_Adjust_to_chain+0xb0> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc1ed74: 81 63 00 00 lwz r11,0(r3) break; } if ( _Chain_Is_empty( header ) ) { ffc1ed78: 7f 8b 40 00 cmpw cr7,r11,r8 ffc1ed7c: 41 9e 00 78 beq- cr7,ffc1edf4 <_Watchdog_Adjust_to_chain+0xb0> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { ffc1ed80: 80 0b 00 10 lwz r0,16(r11) ffc1ed84: 7d 69 5b 78 mr r9,r11 ffc1ed88: 7f 84 00 40 cmplw cr7,r4,r0 ffc1ed8c: 40 bc 00 10 bge+ cr7,ffc1ed9c <_Watchdog_Adjust_to_chain+0x58> first->delta_interval -= units; ffc1ed90: 7c 84 00 50 subf r4,r4,r0 ffc1ed94: 90 8b 00 10 stw r4,16(r11) break; ffc1ed98: 48 00 00 5c b ffc1edf4 <_Watchdog_Adjust_to_chain+0xb0> /* * 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; ffc1ed9c: 90 cb 00 10 stw r6,16(r11) /* * 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; ffc1eda0: 7c 80 20 50 subf r4,r0,r4 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc1eda4: 81 69 00 00 lwz r11,0(r9) previous = the_node->previous; ffc1eda8: 80 e9 00 04 lwz r7,4(r9) next->previous = previous; previous->next = next; ffc1edac: 91 67 00 00 stw r11,0(r7) Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; ffc1edb0: 90 eb 00 04 stw r7,4(r11) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); ffc1edb4: 91 89 00 00 stw r12,0(r9) old_last_node = the_chain->last; ffc1edb8: 81 65 00 08 lwz r11,8(r5) the_chain->last = the_node; ffc1edbc: 91 25 00 08 stw r9,8(r5) old_last_node->next = the_node; the_node->previous = old_last_node; ffc1edc0: 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; ffc1edc4: 91 2b 00 00 stw r9,0(r11) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc1edc8: 7c 00 00 a6 mfmsr r0 ffc1edcc: 7d 40 01 24 mtmsr r10 ffc1edd0: 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)); ffc1edd4: 80 03 00 00 lwz r0,0(r3) _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); if ( _Chain_Is_empty( header ) ) ffc1edd8: 7f 80 40 00 cmpw cr7,r0,r8 ffc1eddc: 7c 09 03 78 mr r9,r0 ffc1ede0: 41 be ff 8c beq- cr7,ffc1ed6c <_Watchdog_Adjust_to_chain+0x28> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) ffc1ede4: 80 09 00 10 lwz r0,16(r9) ffc1ede8: 2f 80 00 00 cmpwi cr7,r0,0 ffc1edec: 41 9e ff b8 beq+ cr7,ffc1eda4 <_Watchdog_Adjust_to_chain+0x60><== NEVER TAKEN ffc1edf0: 4b ff ff 7c b ffc1ed6c <_Watchdog_Adjust_to_chain+0x28> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1edf4: 7d 40 01 24 mtmsr r10 ffc1edf8: 4e 80 00 20 blr =============================================================================== ffc0db3c <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { ffc0db3c: 7c 69 1b 78 mr r9,r3 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0db40: 7c 00 00 a6 mfmsr r0 ffc0db44: 7d 70 42 a6 mfsprg r11,0 ffc0db48: 7c 0b 58 78 andc r11,r0,r11 ffc0db4c: 7d 60 01 24 mtmsr r11 ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; ffc0db50: 80 63 00 08 lwz r3,8(r3) switch ( previous_state ) { ffc0db54: 2f 83 00 01 cmpwi cr7,r3,1 ffc0db58: 41 9e 00 18 beq- cr7,ffc0db70 <_Watchdog_Remove+0x34> ffc0db5c: 2b 83 00 01 cmplwi cr7,r3,1 ffc0db60: 41 9c 00 74 blt- cr7,ffc0dbd4 <_Watchdog_Remove+0x98> ffc0db64: 2b 83 00 03 cmplwi cr7,r3,3 ffc0db68: 41 9d 00 6c bgt- cr7,ffc0dbd4 <_Watchdog_Remove+0x98> <== NEVER TAKEN ffc0db6c: 48 00 00 10 b ffc0db7c <_Watchdog_Remove+0x40> /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; ffc0db70: 39 60 00 00 li r11,0 ffc0db74: 91 69 00 08 stw r11,8(r9) break; ffc0db78: 48 00 00 5c b ffc0dbd4 <_Watchdog_Remove+0x98> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); ffc0db7c: 81 69 00 00 lwz r11,0(r9) case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; ffc0db80: 39 00 00 00 li r8,0 ffc0db84: 91 09 00 08 stw r8,8(r9) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) ffc0db88: 81 4b 00 00 lwz r10,0(r11) ffc0db8c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0db90: 41 9e 00 14 beq- cr7,ffc0dba4 <_Watchdog_Remove+0x68> next_watchdog->delta_interval += the_watchdog->delta_interval; ffc0db94: 81 0b 00 10 lwz r8,16(r11) ffc0db98: 81 49 00 10 lwz r10,16(r9) ffc0db9c: 7d 48 52 14 add r10,r8,r10 ffc0dba0: 91 4b 00 10 stw r10,16(r11) if ( _Watchdog_Sync_count ) ffc0dba4: 3d 60 00 00 lis r11,0 ffc0dba8: 81 6b 27 e4 lwz r11,10212(r11) ffc0dbac: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0dbb0: 41 9e 00 14 beq- cr7,ffc0dbc4 <_Watchdog_Remove+0x88> _Watchdog_Sync_level = _ISR_Nest_level; ffc0dbb4: 3d 60 00 00 lis r11,0 ffc0dbb8: 81 4b 27 b8 lwz r10,10168(r11) ffc0dbbc: 3d 60 00 00 lis r11,0 ffc0dbc0: 91 4b 27 cc stw r10,10188(r11) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0dbc4: 81 69 00 00 lwz r11,0(r9) previous = the_node->previous; ffc0dbc8: 81 49 00 04 lwz r10,4(r9) next->previous = previous; previous->next = next; ffc0dbcc: 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; ffc0dbd0: 91 4b 00 04 stw r10,4(r11) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0dbd4: 3d 60 00 00 lis r11,0 ffc0dbd8: 81 6b 27 e8 lwz r11,10216(r11) ffc0dbdc: 91 69 00 18 stw r11,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0dbe0: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); return( previous_state ); } ffc0dbe4: 4e 80 00 20 blr =============================================================================== ffc0d64c <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { ffc0d64c: 94 21 ff e8 stwu r1,-24(r1) ffc0d650: 7c 08 02 a6 mflr r0 ffc0d654: 93 c1 00 10 stw r30,16(r1) ffc0d658: 7c 7e 1b 78 mr r30,r3 ffc0d65c: 93 e1 00 14 stw r31,20(r1) ffc0d660: 7c 9f 23 78 mr r31,r4 ffc0d664: 90 01 00 1c stw r0,28(r1) ffc0d668: 93 81 00 08 stw r28,8(r1) ffc0d66c: 93 a1 00 0c stw r29,12(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0d670: 7f a0 00 a6 mfmsr r29 ffc0d674: 7c 10 42 a6 mfsprg r0,0 ffc0d678: 7f a0 00 78 andc r0,r29,r0 ffc0d67c: 7c 00 01 24 mtmsr r0 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); ffc0d680: 3c 60 ff c2 lis r3,-62 ffc0d684: 7f e5 fb 78 mr r5,r31 ffc0d688: 38 63 35 b0 addi r3,r3,13744 ffc0d68c: 7f c4 f3 78 mr r4,r30 ffc0d690: 4c c6 31 82 crclr 4*cr1+eq ffc0d694: 4b ff 8b b9 bl ffc0624c */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); ffc0d698: 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; ffc0d69c: 3b ff 00 04 addi r31,r31,4 if ( !_Chain_Is_empty( header ) ) { ffc0d6a0: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0d6a4: 41 9e 00 34 beq- cr7,ffc0d6d8 <_Watchdog_Report_chain+0x8c> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); ffc0d6a8: 7f 84 e3 78 mr r4,r28 ffc0d6ac: 38 60 00 00 li r3,0 ffc0d6b0: 48 00 00 5d bl ffc0d70c <_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 ) ffc0d6b4: 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 ; ffc0d6b8: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0d6bc: 40 9e ff ec bne+ cr7,ffc0d6a8 <_Watchdog_Report_chain+0x5c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); ffc0d6c0: 3c 60 ff c2 lis r3,-62 ffc0d6c4: 38 63 35 c7 addi r3,r3,13767 ffc0d6c8: 7f c4 f3 78 mr r4,r30 ffc0d6cc: 4c c6 31 82 crclr 4*cr1+eq ffc0d6d0: 4b ff 8b 7d bl ffc0624c ffc0d6d4: 48 00 00 14 b ffc0d6e8 <_Watchdog_Report_chain+0x9c> } else { printk( "Chain is empty\n" ); ffc0d6d8: 3c 60 ff c2 lis r3,-62 ffc0d6dc: 38 63 35 d6 addi r3,r3,13782 ffc0d6e0: 4c c6 31 82 crclr 4*cr1+eq ffc0d6e4: 4b ff 8b 69 bl ffc0624c return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0d6e8: 7f a0 01 24 mtmsr r29 } _ISR_Enable( level ); } ffc0d6ec: 80 01 00 1c lwz r0,28(r1) ffc0d6f0: 83 81 00 08 lwz r28,8(r1) ffc0d6f4: 7c 08 03 a6 mtlr r0 ffc0d6f8: 83 a1 00 0c lwz r29,12(r1) ffc0d6fc: 83 c1 00 10 lwz r30,16(r1) ffc0d700: 83 e1 00 14 lwz r31,20(r1) ffc0d704: 38 21 00 18 addi r1,r1,24 ffc0d708: 4e 80 00 20 blr =============================================================================== ffc23640 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); ffc23640: 94 21 ff f0 stwu r1,-16(r1) ffc23644: 7c 08 02 a6 mflr r0 ffc23648: 90 61 00 08 stw r3,8(r1) ffc2364c: 90 01 00 14 stw r0,20(r1) ffc23650: 48 00 06 71 bl ffc23cc0 <__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(); ffc23654: 4b ff ff 65 bl ffc235b8 rtems_shutdown_executive(status); ffc23658: 80 61 00 08 lwz r3,8(r1) ffc2365c: 48 00 01 49 bl ffc237a4 ffc23660: 48 00 00 00 b ffc23660 <_exit+0x20> <== NOT EXECUTED =============================================================================== ffc0581c <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); ffc0581c: 7c 83 23 78 mr r3,r4 <== NOT EXECUTED ffc05820: 7c a4 2b 78 mr r4,r5 <== NOT EXECUTED ffc05824: 7c c5 33 78 mr r5,r6 <== NOT EXECUTED ffc05828: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc0582c: 4b ff fd 58 b ffc05584 <== NOT EXECUTED =============================================================================== ffc13080 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } ffc13080: 38 60 00 01 li r3,1 <== NOT EXECUTED ffc13084: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc05bfc <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); ffc05bfc: 4b ff ff 80 b ffc05b7c <== NOT EXECUTED =============================================================================== ffc061d8 <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); ffc061d8: 7c 83 23 78 mr r3,r4 <== NOT EXECUTED ffc061dc: 7c a4 2b 78 mr r4,r5 <== NOT EXECUTED ffc061e0: 4b ff fd 60 b ffc05f40 <== NOT EXECUTED =============================================================================== ffc23750 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { ffc23750: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED ffc23754: 7c 08 02 a6 mflr r0 <== NOT EXECUTED return realloc( ptr, size ); ffc23758: 7c 83 23 78 mr r3,r4 <== NOT EXECUTED ffc2375c: 7c a4 2b 78 mr r4,r5 <== NOT EXECUTED void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { ffc23760: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED return realloc( ptr, size ); ffc23764: 4b fe 34 3d bl ffc06ba0 <== NOT EXECUTED } ffc23768: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc2376c: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc23770: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc23774: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc09424 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { ffc09424: 94 21 ff a8 stwu r1,-88(r1) ffc09428: 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 ); ffc0942c: 7c 83 23 78 mr r3,r4 int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { ffc09430: 93 81 00 48 stw r28,72(r1) ffc09434: 93 a1 00 4c stw r29,76(r1) ffc09438: 7c bd 2b 78 mr r29,r5 ffc0943c: 93 c1 00 50 stw r30,80(r1) ffc09440: 7c 9e 23 78 mr r30,r4 ffc09444: 90 01 00 5c stw r0,92(r1) ffc09448: 93 e1 00 54 stw r31,84(r1) /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); ffc0944c: 4b ff e7 01 bl ffc07b4c if ( old_parent_pathlen == 0 ) ffc09450: 7c 7c 1b 79 mr. r28,r3 ffc09454: 40 82 00 8c bne- ffc094e0 <_rename_r+0xbc> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); ffc09458: 88 1e 00 00 lbz r0,0(r30) ffc0945c: 2f 80 00 2f cmpwi cr7,r0,47 ffc09460: 41 9e 00 14 beq- cr7,ffc09474 <_rename_r+0x50> <== NEVER TAKEN ffc09464: 2f 80 00 5c cmpwi cr7,r0,92 ffc09468: 41 9e 00 0c beq- cr7,ffc09474 <_rename_r+0x50> <== NEVER TAKEN ffc0946c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09470: 40 9e 00 38 bne- cr7,ffc094a8 <_rename_r+0x84> <== ALWAYS TAKEN ffc09474: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc09478: 81 29 27 3c lwz r9,10044(r9) <== NOT EXECUTED ffc0947c: 3b e0 00 00 li r31,0 <== NOT EXECUTED ffc09480: 80 09 00 24 lwz r0,36(r9) <== NOT EXECUTED ffc09484: 81 09 00 18 lwz r8,24(r9) <== NOT EXECUTED ffc09488: 81 49 00 1c lwz r10,28(r9) <== NOT EXECUTED ffc0948c: 81 69 00 20 lwz r11,32(r9) <== NOT EXECUTED ffc09490: 91 01 00 20 stw r8,32(r1) <== NOT EXECUTED ffc09494: 91 41 00 24 stw r10,36(r1) <== NOT EXECUTED ffc09498: 91 61 00 28 stw r11,40(r1) <== NOT EXECUTED ffc0949c: 90 01 00 2c stw r0,44(r1) <== NOT EXECUTED ffc094a0: 80 09 00 28 lwz r0,40(r9) <== NOT EXECUTED ffc094a4: 48 00 00 34 b ffc094d8 <_rename_r+0xb4> <== NOT EXECUTED ffc094a8: 3d 20 00 00 lis r9,0 ffc094ac: 81 29 27 3c lwz r9,10044(r9) ffc094b0: 3b e0 00 00 li r31,0 ffc094b4: 80 09 00 10 lwz r0,16(r9) ffc094b8: 81 09 00 04 lwz r8,4(r9) ffc094bc: 81 49 00 08 lwz r10,8(r9) ffc094c0: 81 69 00 0c lwz r11,12(r9) ffc094c4: 91 01 00 20 stw r8,32(r1) ffc094c8: 91 41 00 24 stw r10,36(r1) ffc094cc: 91 61 00 28 stw r11,40(r1) ffc094d0: 90 01 00 2c stw r0,44(r1) ffc094d4: 80 09 00 14 lwz r0,20(r9) ffc094d8: 90 01 00 30 stw r0,48(r1) ffc094dc: 48 00 00 28 b ffc09504 <_rename_r+0xe0> else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, ffc094e0: 7f c3 f3 78 mr r3,r30 ffc094e4: 7f 84 e3 78 mr r4,r28 ffc094e8: 38 a0 00 02 li r5,2 ffc094ec: 38 c1 00 20 addi r6,r1,32 ffc094f0: 38 e0 00 00 li r7,0 ffc094f4: 4b ff e7 d1 bl ffc07cc4 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) ffc094f8: 2f 83 00 00 cmpwi cr7,r3,0 ffc094fc: 40 9e 03 74 bne- cr7,ffc09870 <_rename_r+0x44c> <== NEVER TAKEN ffc09500: 3b e0 00 01 li r31,1 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; ffc09504: 80 01 00 20 lwz r0,32(r1) name = old + old_parent_pathlen; ffc09508: 7f de e2 14 add r30,r30,r28 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc0950c: 7f c3 f3 78 mr r3,r30 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; ffc09510: 93 c1 00 08 stw r30,8(r1) /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; ffc09514: 90 01 00 0c stw r0,12(r1) ffc09518: 80 01 00 24 lwz r0,36(r1) ffc0951c: 90 01 00 10 stw r0,16(r1) ffc09520: 80 01 00 28 lwz r0,40(r1) ffc09524: 90 01 00 14 stw r0,20(r1) ffc09528: 80 01 00 2c lwz r0,44(r1) ffc0952c: 90 01 00 18 stw r0,24(r1) ffc09530: 80 01 00 30 lwz r0,48(r1) ffc09534: 90 01 00 1c stw r0,28(r1) name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc09538: 48 01 21 8d bl ffc1b6c4 ffc0953c: 7c 64 1b 78 mr r4,r3 ffc09540: 7f c3 f3 78 mr r3,r30 ffc09544: 4b ff e5 cd bl ffc07b10 ffc09548: 7f de 1a 14 add r30,r30,r3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc0954c: 7f c3 f3 78 mr r3,r30 * 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 ) ); ffc09550: 93 c1 00 08 stw r30,8(r1) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc09554: 48 01 21 71 bl ffc1b6c4 ffc09558: 38 a0 00 00 li r5,0 ffc0955c: 7c 64 1b 78 mr r4,r3 ffc09560: 38 c1 00 0c addi r6,r1,12 ffc09564: 7f c3 f3 78 mr r3,r30 ffc09568: 38 e0 00 00 li r7,0 ffc0956c: 4b ff e6 45 bl ffc07bb0 0, &old_loc, false ); if ( result != 0 ) { ffc09570: 2f 83 00 00 cmpwi cr7,r3,0 ffc09574: 41 be 00 2c beq+ cr7,ffc095a0 <_rename_r+0x17c> if ( free_old_parentloc ) ffc09578: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0957c: 41 be 02 f4 beq+ cr7,ffc09870 <_rename_r+0x44c> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); ffc09580: 81 21 00 2c lwz r9,44(r1) ffc09584: 2f 89 00 00 cmpwi cr7,r9,0 ffc09588: 41 be 02 e8 beq+ cr7,ffc09870 <_rename_r+0x44c> <== NEVER TAKEN ffc0958c: 80 09 00 1c lwz r0,28(r9) ffc09590: 38 61 00 20 addi r3,r1,32 ffc09594: 2f 80 00 00 cmpwi cr7,r0,0 ffc09598: 41 be 02 d8 beq+ cr7,ffc09870 <_rename_r+0x44c> <== NEVER TAKEN ffc0959c: 48 00 01 24 b ffc096c0 <_rename_r+0x29c> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); ffc095a0: 88 1d 00 00 lbz r0,0(r29) ffc095a4: 2f 80 00 2f cmpwi cr7,r0,47 ffc095a8: 41 9e 00 14 beq- cr7,ffc095bc <_rename_r+0x198> ffc095ac: 2f 80 00 5c cmpwi cr7,r0,92 ffc095b0: 41 9e 00 0c beq- cr7,ffc095bc <_rename_r+0x198> <== NEVER TAKEN ffc095b4: 2f 80 00 00 cmpwi cr7,r0,0 ffc095b8: 40 9e 00 38 bne- cr7,ffc095f0 <_rename_r+0x1cc> <== ALWAYS TAKEN ffc095bc: 3d 20 00 00 lis r9,0 ffc095c0: 81 29 27 3c lwz r9,10044(r9) ffc095c4: 38 60 00 01 li r3,1 ffc095c8: 80 09 00 24 lwz r0,36(r9) ffc095cc: 81 09 00 18 lwz r8,24(r9) ffc095d0: 81 49 00 1c lwz r10,28(r9) ffc095d4: 81 69 00 20 lwz r11,32(r9) ffc095d8: 91 01 00 34 stw r8,52(r1) ffc095dc: 91 41 00 38 stw r10,56(r1) ffc095e0: 91 61 00 3c stw r11,60(r1) ffc095e4: 90 01 00 40 stw r0,64(r1) ffc095e8: 80 09 00 28 lwz r0,40(r9) ffc095ec: 48 00 00 34 b ffc09620 <_rename_r+0x1fc> ffc095f0: 3d 20 00 00 lis r9,0 ffc095f4: 81 29 27 3c lwz r9,10044(r9) ffc095f8: 38 60 00 00 li r3,0 ffc095fc: 80 09 00 10 lwz r0,16(r9) ffc09600: 81 09 00 04 lwz r8,4(r9) ffc09604: 81 49 00 08 lwz r10,8(r9) ffc09608: 81 69 00 0c lwz r11,12(r9) ffc0960c: 91 01 00 34 stw r8,52(r1) ffc09610: 91 41 00 38 stw r10,56(r1) ffc09614: 91 61 00 3c stw r11,60(r1) ffc09618: 90 01 00 40 stw r0,64(r1) ffc0961c: 80 09 00 14 lwz r0,20(r9) if ( !new_parent_loc.ops->evalformake_h ) { ffc09620: 81 21 00 40 lwz r9,64(r1) /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); ffc09624: 90 01 00 44 stw r0,68(r1) if ( !new_parent_loc.ops->evalformake_h ) { ffc09628: 80 09 00 04 lwz r0,4(r9) ffc0962c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09630: 41 9e 01 54 beq- cr7,ffc09784 <_rename_r+0x360> 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 ); ffc09634: 3b c1 00 34 addi r30,r1,52 ffc09638: 7c 09 03 a6 mtctr r0 ffc0963c: 7c 7d 1a 14 add r3,r29,r3 ffc09640: 7f c4 f3 78 mr r4,r30 ffc09644: 38 a1 00 08 addi r5,r1,8 ffc09648: 4e 80 04 21 bctrl if ( result != 0 ) { ffc0964c: 2f 83 00 00 cmpwi cr7,r3,0 ffc09650: 41 be 00 80 beq+ cr7,ffc096d0 <_rename_r+0x2ac> rtems_filesystem_freenode( &new_parent_loc ); ffc09654: 81 21 00 40 lwz r9,64(r1) ffc09658: 2f 89 00 00 cmpwi cr7,r9,0 ffc0965c: 41 9e 00 1c beq- cr7,ffc09678 <_rename_r+0x254> <== NEVER TAKEN ffc09660: 80 09 00 1c lwz r0,28(r9) ffc09664: 2f 80 00 00 cmpwi cr7,r0,0 ffc09668: 41 9e 00 10 beq- cr7,ffc09678 <_rename_r+0x254> <== NEVER TAKEN ffc0966c: 7f c3 f3 78 mr r3,r30 ffc09670: 7c 09 03 a6 mtctr r0 ffc09674: 4e 80 04 21 bctrl if ( free_old_parentloc ) ffc09678: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0967c: 41 9e 00 28 beq- cr7,ffc096a4 <_rename_r+0x280> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); ffc09680: 81 21 00 2c lwz r9,44(r1) ffc09684: 2f 89 00 00 cmpwi cr7,r9,0 ffc09688: 41 9e 00 1c beq- cr7,ffc096a4 <_rename_r+0x280> <== NEVER TAKEN ffc0968c: 80 09 00 1c lwz r0,28(r9) ffc09690: 2f 80 00 00 cmpwi cr7,r0,0 ffc09694: 41 9e 00 10 beq- cr7,ffc096a4 <_rename_r+0x280> <== NEVER TAKEN ffc09698: 38 61 00 20 addi r3,r1,32 ffc0969c: 7c 09 03 a6 mtctr r0 ffc096a0: 4e 80 04 21 bctrl rtems_filesystem_freenode( &old_loc ); ffc096a4: 81 21 00 18 lwz r9,24(r1) ffc096a8: 2f 89 00 00 cmpwi cr7,r9,0 ffc096ac: 41 be 01 c4 beq+ cr7,ffc09870 <_rename_r+0x44c> <== NEVER TAKEN ffc096b0: 80 09 00 1c lwz r0,28(r9) ffc096b4: 2f 80 00 00 cmpwi cr7,r0,0 ffc096b8: 41 be 01 b8 beq+ cr7,ffc09870 <_rename_r+0x44c> <== NEVER TAKEN ffc096bc: 38 61 00 0c addi r3,r1,12 ffc096c0: 3b a0 ff ff li r29,-1 ffc096c4: 7c 09 03 a6 mtctr r0 ffc096c8: 4e 80 04 21 bctrl ffc096cc: 48 00 01 a8 b ffc09874 <_rename_r+0x450> /* * 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 ) { ffc096d0: 80 01 00 44 lwz r0,68(r1) ffc096d4: 81 61 00 30 lwz r11,48(r1) ffc096d8: 81 21 00 40 lwz r9,64(r1) ffc096dc: 7f 8b 00 00 cmpw cr7,r11,r0 ffc096e0: 41 be 00 80 beq+ cr7,ffc09760 <_rename_r+0x33c> rtems_filesystem_freenode( &new_parent_loc ); ffc096e4: 2f 89 00 00 cmpwi cr7,r9,0 ffc096e8: 41 9e 00 1c beq- cr7,ffc09704 <_rename_r+0x2e0> <== NEVER TAKEN ffc096ec: 80 09 00 1c lwz r0,28(r9) ffc096f0: 2f 80 00 00 cmpwi cr7,r0,0 ffc096f4: 41 9e 00 10 beq- cr7,ffc09704 <_rename_r+0x2e0> <== NEVER TAKEN ffc096f8: 7f c3 f3 78 mr r3,r30 ffc096fc: 7c 09 03 a6 mtctr r0 ffc09700: 4e 80 04 21 bctrl if ( free_old_parentloc ) ffc09704: 2f 9f 00 00 cmpwi cr7,r31,0 ffc09708: 41 9e 00 28 beq- cr7,ffc09730 <_rename_r+0x30c> rtems_filesystem_freenode( &old_parent_loc ); ffc0970c: 81 21 00 2c lwz r9,44(r1) ffc09710: 2f 89 00 00 cmpwi cr7,r9,0 ffc09714: 41 9e 00 1c beq- cr7,ffc09730 <_rename_r+0x30c> <== NEVER TAKEN ffc09718: 80 09 00 1c lwz r0,28(r9) ffc0971c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09720: 41 9e 00 10 beq- cr7,ffc09730 <_rename_r+0x30c> <== NEVER TAKEN ffc09724: 38 61 00 20 addi r3,r1,32 ffc09728: 7c 09 03 a6 mtctr r0 ffc0972c: 4e 80 04 21 bctrl rtems_filesystem_freenode( &old_loc ); ffc09730: 81 21 00 18 lwz r9,24(r1) ffc09734: 2f 89 00 00 cmpwi cr7,r9,0 ffc09738: 41 9e 00 1c beq- cr7,ffc09754 <_rename_r+0x330> <== NEVER TAKEN ffc0973c: 80 09 00 1c lwz r0,28(r9) ffc09740: 2f 80 00 00 cmpwi cr7,r0,0 ffc09744: 41 9e 00 10 beq- cr7,ffc09754 <_rename_r+0x330> <== NEVER TAKEN ffc09748: 38 61 00 0c addi r3,r1,12 ffc0974c: 7c 09 03 a6 mtctr r0 ffc09750: 4e 80 04 21 bctrl rtems_set_errno_and_return_minus_one( EXDEV ); ffc09754: 48 00 e5 11 bl ffc17c64 <__errno> ffc09758: 38 00 00 12 li r0,18 ffc0975c: 48 00 00 80 b ffc097dc <_rename_r+0x3b8> } if ( !new_parent_loc.ops->rename_h ) { ffc09760: 80 09 00 40 lwz r0,64(r9) ffc09764: 2f 80 00 00 cmpwi cr7,r0,0 ffc09768: 40 be 00 7c bne+ cr7,ffc097e4 <_rename_r+0x3c0> rtems_filesystem_freenode( &new_parent_loc ); ffc0976c: 80 09 00 1c lwz r0,28(r9) ffc09770: 2f 80 00 00 cmpwi cr7,r0,0 ffc09774: 41 9e 00 10 beq- cr7,ffc09784 <_rename_r+0x360> <== NEVER TAKEN ffc09778: 7f c3 f3 78 mr r3,r30 ffc0977c: 7c 09 03 a6 mtctr r0 ffc09780: 4e 80 04 21 bctrl if ( free_old_parentloc ) ffc09784: 2f 9f 00 00 cmpwi cr7,r31,0 ffc09788: 41 9e 00 28 beq- cr7,ffc097b0 <_rename_r+0x38c> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); ffc0978c: 81 21 00 2c lwz r9,44(r1) ffc09790: 2f 89 00 00 cmpwi cr7,r9,0 ffc09794: 41 9e 00 1c beq- cr7,ffc097b0 <_rename_r+0x38c> <== NEVER TAKEN ffc09798: 80 09 00 1c lwz r0,28(r9) ffc0979c: 2f 80 00 00 cmpwi cr7,r0,0 ffc097a0: 41 9e 00 10 beq- cr7,ffc097b0 <_rename_r+0x38c> <== NEVER TAKEN ffc097a4: 38 61 00 20 addi r3,r1,32 ffc097a8: 7c 09 03 a6 mtctr r0 ffc097ac: 4e 80 04 21 bctrl rtems_filesystem_freenode( &old_loc ); ffc097b0: 81 21 00 18 lwz r9,24(r1) ffc097b4: 2f 89 00 00 cmpwi cr7,r9,0 ffc097b8: 41 9e 00 1c beq- cr7,ffc097d4 <_rename_r+0x3b0> <== NEVER TAKEN ffc097bc: 80 09 00 1c lwz r0,28(r9) ffc097c0: 2f 80 00 00 cmpwi cr7,r0,0 ffc097c4: 41 9e 00 10 beq- cr7,ffc097d4 <_rename_r+0x3b0> <== NEVER TAKEN ffc097c8: 38 61 00 0c addi r3,r1,12 ffc097cc: 7c 09 03 a6 mtctr r0 ffc097d0: 4e 80 04 21 bctrl rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc097d4: 48 00 e4 91 bl ffc17c64 <__errno> ffc097d8: 38 00 00 86 li r0,134 ffc097dc: 90 03 00 00 stw r0,0(r3) ffc097e0: 48 00 00 90 b ffc09870 <_rename_r+0x44c> } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); ffc097e4: 38 61 00 20 addi r3,r1,32 ffc097e8: 80 c1 00 08 lwz r6,8(r1) ffc097ec: 38 81 00 0c addi r4,r1,12 ffc097f0: 7c 09 03 a6 mtctr r0 ffc097f4: 7f c5 f3 78 mr r5,r30 ffc097f8: 4e 80 04 21 bctrl rtems_filesystem_freenode( &new_parent_loc ); ffc097fc: 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 ); ffc09800: 7c 7d 1b 78 mr r29,r3 rtems_filesystem_freenode( &new_parent_loc ); ffc09804: 2f 89 00 00 cmpwi cr7,r9,0 ffc09808: 41 9e 00 1c beq- cr7,ffc09824 <_rename_r+0x400> <== NEVER TAKEN ffc0980c: 80 09 00 1c lwz r0,28(r9) ffc09810: 2f 80 00 00 cmpwi cr7,r0,0 ffc09814: 41 9e 00 10 beq- cr7,ffc09824 <_rename_r+0x400> <== NEVER TAKEN ffc09818: 7f c3 f3 78 mr r3,r30 ffc0981c: 7c 09 03 a6 mtctr r0 ffc09820: 4e 80 04 21 bctrl if ( free_old_parentloc ) ffc09824: 2f 9f 00 00 cmpwi cr7,r31,0 ffc09828: 41 9e 00 28 beq- cr7,ffc09850 <_rename_r+0x42c> rtems_filesystem_freenode( &old_parent_loc ); ffc0982c: 81 21 00 2c lwz r9,44(r1) ffc09830: 2f 89 00 00 cmpwi cr7,r9,0 ffc09834: 41 9e 00 1c beq- cr7,ffc09850 <_rename_r+0x42c> <== NEVER TAKEN ffc09838: 80 09 00 1c lwz r0,28(r9) ffc0983c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09840: 41 9e 00 10 beq- cr7,ffc09850 <_rename_r+0x42c> <== NEVER TAKEN ffc09844: 38 61 00 20 addi r3,r1,32 ffc09848: 7c 09 03 a6 mtctr r0 ffc0984c: 4e 80 04 21 bctrl rtems_filesystem_freenode( &old_loc ); ffc09850: 81 21 00 18 lwz r9,24(r1) ffc09854: 2f 89 00 00 cmpwi cr7,r9,0 ffc09858: 41 9e 00 1c beq- cr7,ffc09874 <_rename_r+0x450> <== NEVER TAKEN ffc0985c: 80 09 00 1c lwz r0,28(r9) ffc09860: 38 61 00 0c addi r3,r1,12 ffc09864: 2f 80 00 00 cmpwi cr7,r0,0 ffc09868: 40 9e fe 5c bne+ cr7,ffc096c4 <_rename_r+0x2a0> <== ALWAYS TAKEN ffc0986c: 48 00 00 08 b ffc09874 <_rename_r+0x450> <== NOT EXECUTED ffc09870: 3b a0 ff ff li r29,-1 return result; } ffc09874: 80 01 00 5c lwz r0,92(r1) ffc09878: 7f a3 eb 78 mr r3,r29 ffc0987c: 83 81 00 48 lwz r28,72(r1) ffc09880: 7c 08 03 a6 mtlr r0 ffc09884: 83 a1 00 4c lwz r29,76(r1) ffc09888: 83 c1 00 50 lwz r30,80(r1) ffc0988c: 83 e1 00 54 lwz r31,84(r1) ffc09890: 38 21 00 58 addi r1,r1,88 ffc09894: 4e 80 00 20 blr =============================================================================== ffc0ce68 <_rtems_octal2ulong>: unsigned long _rtems_octal2ulong( const char *octascii, size_t len ) { ffc0ce68: 2f 84 00 00 cmpwi cr7,r4,0 <== NOT EXECUTED ffc0ce6c: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc0ce70: 39 20 00 00 li r9,0 <== NOT EXECUTED ffc0ce74: 38 84 00 01 addi r4,r4,1 <== NOT EXECUTED ffc0ce78: 40 be 00 28 bne+ cr7,ffc0cea0 <_rtems_octal2ulong+0x38> <== NOT EXECUTED ffc0ce7c: 38 80 00 01 li r4,1 <== NOT EXECUTED ffc0ce80: 48 00 00 20 b ffc0cea0 <_rtems_octal2ulong+0x38> <== NOT EXECUTED unsigned long num; num = 0; for (i=0; i < len; i++) { if ((octascii[i] < '0') || (octascii[i] > '9')) ffc0ce84: 7d 63 48 ae lbzx r11,r3,r9 <== NOT EXECUTED { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) ffc0ce88: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED { if ((octascii[i] < '0') || (octascii[i] > '9')) ffc0ce8c: 39 6b ff d0 addi r11,r11,-48 <== NOT EXECUTED ffc0ce90: 55 68 06 3e clrlwi r8,r11,24 <== NOT EXECUTED ffc0ce94: 2b 88 00 09 cmplwi cr7,r8,9 <== NOT EXECUTED ffc0ce98: 41 9d 00 08 bgt- cr7,ffc0cea0 <_rtems_octal2ulong+0x38> <== NOT EXECUTED { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); ffc0ce9c: 7c 0b 52 14 add r0,r11,r10 <== NOT EXECUTED { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) ffc0cea0: 34 84 ff ff addic. r4,r4,-1 <== NOT EXECUTED { if ((octascii[i] < '0') || (octascii[i] > '9')) { continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); ffc0cea4: 54 0a 18 38 rlwinm r10,r0,3,0,28 <== NOT EXECUTED { size_t i; unsigned long num; num = 0; for (i=0; i < len; i++) ffc0cea8: 40 82 ff dc bne+ ffc0ce84 <_rtems_octal2ulong+0x1c> <== NOT EXECUTED continue; } num = num * 8 + ((unsigned long)(octascii[i] - '0')); } return(num); } ffc0ceac: 7c 03 03 78 mr r3,r0 <== NOT EXECUTED ffc0ceb0: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0ceb4 <_rtems_tar_header_checksum>: ************************************************************************/ int _rtems_tar_header_checksum( const char *bufr ) { ffc0ceb4: 38 00 02 00 li r0,512 <== NOT EXECUTED ffc0ceb8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0cebc: 39 20 00 00 li r9,0 <== NOT EXECUTED ffc0cec0: 39 60 00 00 li r11,0 <== NOT EXECUTED int i, sum; sum = 0; for (i=0; i<512; i++) { if ((i >= 148) && (i < 156)) ffc0cec4: 38 0b ff 6c addi r0,r11,-148 <== NOT EXECUTED ffc0cec8: 2b 80 00 07 cmplwi cr7,r0,7 <== NOT EXECUTED ffc0cecc: 41 9d 00 0c bgt- cr7,ffc0ced8 <_rtems_tar_header_checksum+0x24><== NOT EXECUTED sum += 0xff & ' '; ffc0ced0: 39 29 00 20 addi r9,r9,32 <== NOT EXECUTED ffc0ced4: 48 00 00 0c b ffc0cee0 <_rtems_tar_header_checksum+0x2c><== NOT EXECUTED else sum += 0xff & bufr[i]; ffc0ced8: 7c 03 58 ae lbzx r0,r3,r11 <== NOT EXECUTED ffc0cedc: 7d 29 02 14 add r9,r9,r0 <== NOT EXECUTED ) { int i, sum; sum = 0; for (i=0; i<512; i++) ffc0cee0: 39 6b 00 01 addi r11,r11,1 <== NOT EXECUTED ffc0cee4: 42 00 ff e0 bdnz+ ffc0cec4 <_rtems_tar_header_checksum+0x10><== NOT EXECUTED sum += 0xff & ' '; else sum += 0xff & bufr[i]; } return(sum); } ffc0cee8: 7d 23 4b 78 mr r3,r9 <== NOT EXECUTED ffc0ceec: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0724c <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); ffc0724c: 7c 83 23 78 mr r3,r4 <== NOT EXECUTED ffc07250: 7c a4 2b 78 mr r4,r5 <== NOT EXECUTED ffc07254: 4b ff fe e4 b ffc07138 <== NOT EXECUTED =============================================================================== ffc08fa0 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); ffc08fa0: 7c 83 23 78 mr r3,r4 <== NOT EXECUTED ffc08fa4: 4b ff fd 20 b ffc08cc4 <== NOT EXECUTED =============================================================================== ffc07e9c : int adjtime( struct timeval *delta, struct timeval *olddelta ) { ffc07e9c: 94 21 ff e0 stwu r1,-32(r1) ffc07ea0: 7c 08 02 a6 mflr r0 ffc07ea4: 93 e1 00 1c stw r31,28(r1) long adjustment; /* * Simple validations */ if ( !delta ) ffc07ea8: 7c 7f 1b 79 mr. r31,r3 int adjtime( struct timeval *delta, struct timeval *olddelta ) { ffc07eac: 93 c1 00 18 stw r30,24(r1) ffc07eb0: 7c 9e 23 78 mr r30,r4 ffc07eb4: 90 01 00 24 stw r0,36(r1) long adjustment; /* * Simple validations */ if ( !delta ) ffc07eb8: 41 82 00 18 beq- ffc07ed0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) ffc07ebc: 81 3f 00 04 lwz r9,4(r31) ffc07ec0: 3c 00 00 0f lis r0,15 ffc07ec4: 60 00 42 3f ori r0,r0,16959 ffc07ec8: 7f 89 00 40 cmplw cr7,r9,r0 ffc07ecc: 40 bd 00 18 ble+ cr7,ffc07ee4 rtems_set_errno_and_return_minus_one( EINVAL ); ffc07ed0: 48 00 aa ed bl ffc129bc <__errno> ffc07ed4: 38 00 00 16 li r0,22 ffc07ed8: 90 03 00 00 stw r0,0(r3) ffc07edc: 38 60 ff ff li r3,-1 ffc07ee0: 48 00 00 fc b ffc07fdc if ( olddelta ) { ffc07ee4: 2f 84 00 00 cmpwi cr7,r4,0 ffc07ee8: 41 9e 00 10 beq- cr7,ffc07ef8 olddelta->tv_sec = 0; ffc07eec: 38 00 00 00 li r0,0 olddelta->tv_usec = 0; ffc07ef0: 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; ffc07ef4: 90 04 00 00 stw r0,0(r4) olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); ffc07ef8: 80 1f 00 00 lwz r0,0(r31) ffc07efc: 3d 20 00 0f lis r9,15 ffc07f00: 61 29 42 40 ori r9,r9,16960 adjustment += delta->tv_usec; ffc07f04: 81 7f 00 04 lwz r11,4(r31) olddelta->tv_sec = 0; olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); ffc07f08: 7d 29 01 d6 mullw r9,r9,r0 adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) ffc07f0c: 3d 40 00 00 lis r10,0 ffc07f10: 80 0a 20 ac lwz r0,8364(r10) olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); adjustment += delta->tv_usec; ffc07f14: 7d 29 5a 14 add r9,r9,r11 /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) ffc07f18: 7f 89 00 40 cmplw cr7,r9,r0 ffc07f1c: 41 bc 00 bc blt+ cr7,ffc07fd8 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc07f20: 3d 20 00 00 lis r9,0 ffc07f24: 81 69 28 b0 lwz r11,10416(r9) ffc07f28: 38 0b 00 01 addi r0,r11,1 ffc07f2c: 90 09 28 b0 stw r0,10416(r9) * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); ffc07f30: 38 61 00 08 addi r3,r1,8 ffc07f34: 48 00 1c 8d bl ffc09bc0 <_TOD_Get> ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; ffc07f38: 81 3f 00 04 lwz r9,4(r31) ffc07f3c: 80 01 00 0c lwz r0,12(r1) /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc07f40: 3d 60 3b 9a lis r11,15258 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; ffc07f44: 1d 29 03 e8 mulli r9,r9,1000 ffc07f48: 81 41 00 08 lwz r10,8(r1) ffc07f4c: 7d 29 02 14 add r9,r9,r0 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ffc07f50: 80 1f 00 00 lwz r0,0(r31) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc07f54: 61 6b ca 00 ori r11,r11,51712 ffc07f58: 7d 69 5b 96 divwu r11,r9,r11 ffc07f5c: 39 6b 00 01 addi r11,r11,1 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; ffc07f60: 7d 4a 02 14 add r10,r10,r0 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ffc07f64: 7d 69 03 a6 mtctr r11 ffc07f68: 48 00 00 08 b ffc07f70 ffc07f6c: 39 28 36 00 addi r9,r8,13824 ffc07f70: 7d 4b 53 78 mr r11,r10 ffc07f74: 3d 09 c4 65 addis r8,r9,-15259 ffc07f78: 39 4a 00 01 addi r10,r10,1 ffc07f7c: 42 00 ff f0 bdnz+ ffc07f6c 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) ) { ffc07f80: 3d 40 c4 65 lis r10,-15259 ffc07f84: 61 4a 36 00 ori r10,r10,13824 ffc07f88: 48 00 00 08 b ffc07f90 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 ) { ffc07f8c: 39 28 ca 00 addi r9,r8,-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) ) { ffc07f90: 7f 89 50 40 cmplw cr7,r9,r10 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 ) { ffc07f94: 7d 60 5b 78 mr r0,r11 ffc07f98: 3d 09 3b 9b addis r8,r9,15259 ffc07f9c: 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) ) { ffc07fa0: 40 9d ff ec ble+ cr7,ffc07f8c ffc07fa4: 7c 23 0b 78 mr r3,r1 ffc07fa8: 91 21 00 0c stw r9,12(r1) ffc07fac: 94 03 00 08 stwu r0,8(r3) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); ffc07fb0: 48 00 1c ed bl ffc09c9c <_TOD_Set> _Thread_Enable_dispatch(); ffc07fb4: 48 00 32 fd bl ffc0b2b0 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) ffc07fb8: 2f 9e 00 00 cmpwi cr7,r30,0 ffc07fbc: 41 9e 00 1c beq- cr7,ffc07fd8 <== NEVER TAKEN *olddelta = *delta; ffc07fc0: 81 3f 00 00 lwz r9,0(r31) ffc07fc4: 38 60 00 00 li r3,0 ffc07fc8: 81 5f 00 04 lwz r10,4(r31) ffc07fcc: 91 3e 00 00 stw r9,0(r30) ffc07fd0: 91 5e 00 04 stw r10,4(r30) ffc07fd4: 48 00 00 08 b ffc07fdc ffc07fd8: 38 60 00 00 li r3,0 return 0; } ffc07fdc: 80 01 00 24 lwz r0,36(r1) ffc07fe0: 83 c1 00 18 lwz r30,24(r1) ffc07fe4: 7c 08 03 a6 mtlr r0 ffc07fe8: 83 e1 00 1c lwz r31,28(r1) ffc07fec: 38 21 00 20 addi r1,r1,32 ffc07ff0: 4e 80 00 20 blr =============================================================================== ffc057a4 : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); ffc057a4: 94 21 ff f0 stwu r1,-16(r1) ffc057a8: 7c 08 02 a6 mflr r0 ffc057ac: 3d 20 00 00 lis r9,0 ffc057b0: 90 01 00 14 stw r0,20(r1) ffc057b4: 39 29 2b c0 addi r9,r9,11200 ffc057b8: 81 69 00 14 lwz r11,20(r9) ffc057bc: 93 c1 00 08 stw r30,8(r1) length = nelem * elsize; ffc057c0: 7f c4 19 d6 mullw r30,r4,r3 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); ffc057c4: 38 0b 00 01 addi r0,r11,1 ffc057c8: 93 e1 00 0c stw r31,12(r1) length = nelem * elsize; cptr = malloc( length ); ffc057cc: 7f c3 f3 78 mr r3,r30 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); ffc057d0: 90 09 00 14 stw r0,20(r9) length = nelem * elsize; cptr = malloc( length ); ffc057d4: 48 00 06 d5 bl ffc05ea8 if ( cptr ) ffc057d8: 7c 7f 1b 79 mr. r31,r3 ffc057dc: 41 82 00 10 beq- ffc057ec <== NEVER TAKEN memset( cptr, '\0', length ); ffc057e0: 7f c5 f3 78 mr r5,r30 ffc057e4: 38 80 00 00 li r4,0 ffc057e8: 48 01 35 6d bl ffc18d54 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ ffc057ec: 3d 20 00 00 lis r9,0 return cptr; } ffc057f0: 83 c1 00 08 lwz r30,8(r1) length = nelem * elsize; cptr = malloc( length ); if ( cptr ) memset( cptr, '\0', length ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ ffc057f4: 39 29 2b c0 addi r9,r9,11200 ffc057f8: 81 69 00 04 lwz r11,4(r9) return cptr; } ffc057fc: 7f e3 fb 78 mr r3,r31 ffc05800: 83 e1 00 0c lwz r31,12(r1) length = nelem * elsize; cptr = malloc( length ); if ( cptr ) memset( cptr, '\0', length ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ ffc05804: 38 0b ff ff addi r0,r11,-1 ffc05808: 90 09 00 04 stw r0,4(r9) return cptr; } ffc0580c: 80 01 00 14 lwz r0,20(r1) ffc05810: 38 21 00 10 addi r1,r1,16 ffc05814: 7c 08 03 a6 mtlr r0 ffc05818: 4e 80 00 20 blr =============================================================================== ffc0ef7c : #include int chdir( const char *pathname ) { ffc0ef7c: 94 21 ff d0 stwu r1,-48(r1) ffc0ef80: 7c 08 02 a6 mflr r0 ffc0ef84: 93 c1 00 28 stw r30,40(r1) rtems_filesystem_location_info_t loc; int result; if ( !pathname ) ffc0ef88: 7c 7e 1b 79 mr. r30,r3 #include int chdir( const char *pathname ) { ffc0ef8c: 90 01 00 34 stw r0,52(r1) ffc0ef90: 93 e1 00 2c stw r31,44(r1) rtems_filesystem_location_info_t loc; int result; if ( !pathname ) ffc0ef94: 40 a2 00 10 bne+ ffc0efa4 rtems_set_errno_and_return_minus_one( EFAULT ); ffc0ef98: 48 00 4d 01 bl ffc13c98 <__errno> ffc0ef9c: 38 00 00 0e li r0,14 ffc0efa0: 48 00 00 60 b ffc0f000 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); ffc0efa4: 48 00 5f b5 bl ffc14f58 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( ffc0efa8: 3b e1 00 08 addi r31,r1,8 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); ffc0efac: 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( ffc0efb0: 38 a0 00 01 li r5,1 ffc0efb4: 7f c3 f3 78 mr r3,r30 ffc0efb8: 7f e6 fb 78 mr r6,r31 ffc0efbc: 38 e0 00 01 li r7,1 ffc0efc0: 4b ff 5a 5d bl ffc04a1c pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) ffc0efc4: 2f 83 00 00 cmpwi cr7,r3,0 ffc0efc8: 38 60 ff ff li r3,-1 ffc0efcc: 40 9e 00 e4 bne- cr7,ffc0f0b0 return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { ffc0efd0: 81 21 00 14 lwz r9,20(r1) ffc0efd4: 80 09 00 10 lwz r0,16(r9) ffc0efd8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0efdc: 40 be 00 30 bne+ cr7,ffc0f00c <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); ffc0efe0: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc0efe4: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0efe8: 41 9e 00 10 beq- cr7,ffc0eff8 <== NOT EXECUTED ffc0efec: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0eff0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0eff4: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc0eff8: 48 00 4c a1 bl ffc13c98 <__errno> <== NOT EXECUTED ffc0effc: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc0f000: 90 03 00 00 stw r0,0(r3) ffc0f004: 38 60 ff ff li r3,-1 ffc0f008: 48 00 00 a8 b ffc0f0b0 } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { ffc0f00c: 7f e3 fb 78 mr r3,r31 ffc0f010: 7c 09 03 a6 mtctr r0 ffc0f014: 4e 80 04 21 bctrl ffc0f018: 2f 83 00 01 cmpwi cr7,r3,1 ffc0f01c: 41 be 00 34 beq+ cr7,ffc0f050 rtems_filesystem_freenode( &loc ); ffc0f020: 81 21 00 14 lwz r9,20(r1) ffc0f024: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f028: 41 9e 00 1c beq- cr7,ffc0f044 <== NEVER TAKEN ffc0f02c: 80 09 00 1c lwz r0,28(r9) ffc0f030: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f034: 41 9e 00 10 beq- cr7,ffc0f044 <== NEVER TAKEN ffc0f038: 7f e3 fb 78 mr r3,r31 ffc0f03c: 7c 09 03 a6 mtctr r0 ffc0f040: 4e 80 04 21 bctrl rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc0f044: 48 00 4c 55 bl ffc13c98 <__errno> ffc0f048: 38 00 00 14 li r0,20 ffc0f04c: 4b ff ff b4 b ffc0f000 } rtems_filesystem_freenode( &rtems_filesystem_current ); ffc0f050: 3d 20 00 00 lis r9,0 ffc0f054: 80 69 26 b4 lwz r3,9908(r9) ffc0f058: 81 23 00 10 lwz r9,16(r3) ffc0f05c: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f060: 41 9e 00 1c beq- cr7,ffc0f07c <== NEVER TAKEN ffc0f064: 80 09 00 1c lwz r0,28(r9) ffc0f068: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f06c: 41 9e 00 10 beq- cr7,ffc0f07c <== NEVER TAKEN ffc0f070: 38 63 00 04 addi r3,r3,4 ffc0f074: 7c 09 03 a6 mtctr r0 ffc0f078: 4e 80 04 21 bctrl rtems_filesystem_current = loc; ffc0f07c: 3d 20 00 00 lis r9,0 ffc0f080: 80 01 00 14 lwz r0,20(r1) ffc0f084: 81 29 26 b4 lwz r9,9908(r9) ffc0f088: 38 60 00 00 li r3,0 ffc0f08c: 81 41 00 0c lwz r10,12(r1) ffc0f090: 81 61 00 10 lwz r11,16(r1) ffc0f094: 81 01 00 08 lwz r8,8(r1) ffc0f098: 91 49 00 08 stw r10,8(r9) ffc0f09c: 91 09 00 04 stw r8,4(r9) ffc0f0a0: 91 69 00 0c stw r11,12(r9) ffc0f0a4: 90 09 00 10 stw r0,16(r9) ffc0f0a8: 80 01 00 18 lwz r0,24(r1) ffc0f0ac: 90 09 00 14 stw r0,20(r9) return 0; } ffc0f0b0: 80 01 00 34 lwz r0,52(r1) ffc0f0b4: 83 c1 00 28 lwz r30,40(r1) ffc0f0b8: 7c 08 03 a6 mtlr r0 ffc0f0bc: 83 e1 00 2c lwz r31,44(r1) ffc0f0c0: 38 21 00 30 addi r1,r1,48 ffc0f0c4: 4e 80 00 20 blr =============================================================================== ffc06b3c : int chmod( const char *path, mode_t mode ) { ffc06b3c: 94 21 ff c8 stwu r1,-56(r1) ffc06b40: 7c 08 02 a6 mflr r0 ffc06b44: 93 a1 00 2c stw r29,44(r1) ffc06b48: 7c 7d 1b 78 mr r29,r3 ffc06b4c: 90 01 00 3c stw r0,60(r1) ffc06b50: 93 c1 00 30 stw r30,48(r1) ffc06b54: 7c 9e 23 78 mr r30,r4 ffc06b58: 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 ); ffc06b5c: 48 01 23 49 bl ffc18ea4 ffc06b60: 3b e1 00 08 addi r31,r1,8 ffc06b64: 7c 64 1b 78 mr r4,r3 ffc06b68: 38 a0 00 00 li r5,0 ffc06b6c: 7f a3 eb 78 mr r3,r29 ffc06b70: 7f e6 fb 78 mr r6,r31 ffc06b74: 38 e0 00 01 li r7,1 ffc06b78: 48 00 03 8d bl ffc06f04 if ( status != 0 ) ffc06b7c: 3b a0 ff ff li r29,-1 ffc06b80: 2f 83 00 00 cmpwi cr7,r3,0 ffc06b84: 40 9e 00 bc bne- cr7,ffc06c40 return -1; if ( !loc.handlers ){ ffc06b88: 81 21 00 10 lwz r9,16(r1) ffc06b8c: 2f 89 00 00 cmpwi cr7,r9,0 ffc06b90: 40 be 00 34 bne+ cr7,ffc06bc4 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); ffc06b94: 81 21 00 14 lwz r9,20(r1) <== NOT EXECUTED ffc06b98: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc06b9c: 41 9e 00 1c beq- cr7,ffc06bb8 <== NOT EXECUTED ffc06ba0: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc06ba4: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc06ba8: 41 9e 00 10 beq- cr7,ffc06bb8 <== NOT EXECUTED ffc06bac: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc06bb0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06bb4: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); ffc06bb8: 48 01 02 fd bl ffc16eb4 <__errno> <== NOT EXECUTED ffc06bbc: 38 00 00 09 li r0,9 <== NOT EXECUTED ffc06bc0: 48 00 00 3c b ffc06bfc <== NOT EXECUTED } if ( !loc.handlers->fchmod_h ){ ffc06bc4: 80 09 00 1c lwz r0,28(r9) ffc06bc8: 2f 80 00 00 cmpwi cr7,r0,0 ffc06bcc: 40 be 00 3c bne+ cr7,ffc06c08 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); ffc06bd0: 81 21 00 14 lwz r9,20(r1) <== NOT EXECUTED ffc06bd4: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc06bd8: 41 9e 00 1c beq- cr7,ffc06bf4 <== NOT EXECUTED ffc06bdc: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc06be0: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc06be4: 41 9e 00 10 beq- cr7,ffc06bf4 <== NOT EXECUTED ffc06be8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc06bec: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06bf0: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc06bf4: 48 01 02 c1 bl ffc16eb4 <__errno> <== NOT EXECUTED ffc06bf8: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc06bfc: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc06c00: 3b a0 ff ff li r29,-1 <== NOT EXECUTED ffc06c04: 48 00 00 3c b ffc06c40 <== NOT EXECUTED } result = (*loc.handlers->fchmod_h)( &loc, mode ); ffc06c08: 7f c4 f3 78 mr r4,r30 ffc06c0c: 7c 09 03 a6 mtctr r0 ffc06c10: 7f e3 fb 78 mr r3,r31 ffc06c14: 4e 80 04 21 bctrl rtems_filesystem_freenode( &loc ); ffc06c18: 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 ); ffc06c1c: 7c 7d 1b 78 mr r29,r3 rtems_filesystem_freenode( &loc ); ffc06c20: 2f 89 00 00 cmpwi cr7,r9,0 ffc06c24: 41 9e 00 1c beq- cr7,ffc06c40 <== NEVER TAKEN ffc06c28: 80 09 00 1c lwz r0,28(r9) ffc06c2c: 2f 80 00 00 cmpwi cr7,r0,0 ffc06c30: 41 9e 00 10 beq- cr7,ffc06c40 <== NEVER TAKEN ffc06c34: 7f e3 fb 78 mr r3,r31 ffc06c38: 7c 09 03 a6 mtctr r0 ffc06c3c: 4e 80 04 21 bctrl return result; } ffc06c40: 80 01 00 3c lwz r0,60(r1) ffc06c44: 7f a3 eb 78 mr r3,r29 ffc06c48: 83 c1 00 30 lwz r30,48(r1) ffc06c4c: 7c 08 03 a6 mtlr r0 ffc06c50: 83 a1 00 2c lwz r29,44(r1) ffc06c54: 83 e1 00 34 lwz r31,52(r1) ffc06c58: 38 21 00 38 addi r1,r1,56 ffc06c5c: 4e 80 00 20 blr =============================================================================== ffc06c60 : int chown( const char *path, uid_t owner, gid_t group ) { ffc06c60: 94 21 ff c8 stwu r1,-56(r1) ffc06c64: 7c 08 02 a6 mflr r0 ffc06c68: 93 81 00 28 stw r28,40(r1) ffc06c6c: 7c 7c 1b 78 mr r28,r3 ffc06c70: 90 01 00 3c stw r0,60(r1) ffc06c74: 93 a1 00 2c stw r29,44(r1) ffc06c78: 7c 9d 23 78 mr r29,r4 ffc06c7c: 93 c1 00 30 stw r30,48(r1) ffc06c80: 7c be 2b 78 mr r30,r5 ffc06c84: 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 ) ) ffc06c88: 48 01 22 1d bl ffc18ea4 ffc06c8c: 3b e1 00 08 addi r31,r1,8 ffc06c90: 7c 64 1b 78 mr r4,r3 ffc06c94: 38 a0 00 00 li r5,0 ffc06c98: 7f 83 e3 78 mr r3,r28 ffc06c9c: 7f e6 fb 78 mr r6,r31 ffc06ca0: 38 e0 00 01 li r7,1 ffc06ca4: 48 00 02 61 bl ffc06f04 ffc06ca8: 3b 80 ff ff li r28,-1 ffc06cac: 2f 83 00 00 cmpwi cr7,r3,0 ffc06cb0: 40 9e 00 7c bne- cr7,ffc06d2c return -1; if ( !loc.ops->chown_h ) { ffc06cb4: 81 21 00 14 lwz r9,20(r1) ffc06cb8: 80 09 00 18 lwz r0,24(r9) ffc06cbc: 2f 80 00 00 cmpwi cr7,r0,0 ffc06cc0: 40 be 00 30 bne+ cr7,ffc06cf0 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); ffc06cc4: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc06cc8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc06ccc: 41 9e 00 10 beq- cr7,ffc06cdc <== NOT EXECUTED ffc06cd0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc06cd4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06cd8: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc06cdc: 48 01 01 d9 bl ffc16eb4 <__errno> <== NOT EXECUTED ffc06ce0: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc06ce4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc06ce8: 3b 80 ff ff li r28,-1 <== NOT EXECUTED ffc06cec: 48 00 00 40 b ffc06d2c <== NOT EXECUTED } result = (*loc.ops->chown_h)( &loc, owner, group ); ffc06cf0: 7f a4 eb 78 mr r4,r29 ffc06cf4: 7c 09 03 a6 mtctr r0 ffc06cf8: 7f c5 f3 78 mr r5,r30 ffc06cfc: 7f e3 fb 78 mr r3,r31 ffc06d00: 4e 80 04 21 bctrl rtems_filesystem_freenode( &loc ); ffc06d04: 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 ); ffc06d08: 7c 7c 1b 78 mr r28,r3 rtems_filesystem_freenode( &loc ); ffc06d0c: 2f 89 00 00 cmpwi cr7,r9,0 ffc06d10: 41 9e 00 1c beq- cr7,ffc06d2c <== NEVER TAKEN ffc06d14: 80 09 00 1c lwz r0,28(r9) ffc06d18: 2f 80 00 00 cmpwi cr7,r0,0 ffc06d1c: 41 9e 00 10 beq- cr7,ffc06d2c <== NEVER TAKEN ffc06d20: 7f e3 fb 78 mr r3,r31 ffc06d24: 7c 09 03 a6 mtctr r0 ffc06d28: 4e 80 04 21 bctrl return result; } ffc06d2c: 80 01 00 3c lwz r0,60(r1) ffc06d30: 7f 83 e3 78 mr r3,r28 ffc06d34: 83 a1 00 2c lwz r29,44(r1) ffc06d38: 7c 08 03 a6 mtlr r0 ffc06d3c: 83 81 00 28 lwz r28,40(r1) ffc06d40: 83 c1 00 30 lwz r30,48(r1) ffc06d44: 83 e1 00 34 lwz r31,52(r1) ffc06d48: 38 21 00 38 addi r1,r1,56 ffc06d4c: 4e 80 00 20 blr =============================================================================== ffc0467c : #include int chroot( const char *pathname ) { ffc0467c: 94 21 ff c8 stwu r1,-56(r1) ffc04680: 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) { ffc04684: 3d 20 00 00 lis r9,0 #include int chroot( const char *pathname ) { ffc04688: 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) { ffc0468c: 3f c0 00 00 lis r30,0 #include int chroot( const char *pathname ) { ffc04690: 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) { ffc04694: 83 fe 26 b4 lwz r31,9908(r30) #include int chroot( const char *pathname ) { ffc04698: 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) { ffc0469c: 38 09 2b 1c addi r0,r9,11036 ffc046a0: 7f 9f 00 00 cmpw cr7,r31,r0 #include int chroot( const char *pathname ) { ffc046a4: 93 a1 00 2c stw r29,44(r1) ffc046a8: 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) { ffc046ac: 40 be 00 28 bne+ cr7,ffc046d4 <== NEVER TAKEN rtems_libio_set_private_env(); /* try to set a new private env*/ ffc046b0: 48 00 19 dd bl ffc0608c if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ ffc046b4: 80 1e 26 b4 lwz r0,9908(r30) ffc046b8: 7f 80 f8 00 cmpw cr7,r0,r31 ffc046bc: 40 be 00 18 bne+ cr7,ffc046d4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc046c0: 48 00 f5 d9 bl ffc13c98 <__errno> <== NOT EXECUTED ffc046c4: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc046c8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc046cc: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc046d0: 48 00 00 b4 b ffc04784 <== NOT EXECUTED } result = chdir(pathname); ffc046d4: 7f a3 eb 78 mr r3,r29 ffc046d8: 48 00 a8 a5 bl ffc0ef7c if (result) { ffc046dc: 2f 83 00 00 cmpwi cr7,r3,0 ffc046e0: 40 9e 00 28 bne- cr7,ffc04708 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { ffc046e4: 3c 60 ff c2 lis r3,-62 ffc046e8: 38 63 0a ba addi r3,r3,2746 ffc046ec: 38 80 00 01 li r4,1 ffc046f0: 38 a0 00 00 li r5,0 ffc046f4: 38 c1 00 08 addi r6,r1,8 ffc046f8: 38 e0 00 00 li r7,0 ffc046fc: 48 00 03 21 bl ffc04a1c ffc04700: 2f 83 00 00 cmpwi cr7,r3,0 ffc04704: 41 be 00 20 beq+ cr7,ffc04724 <== ALWAYS TAKEN /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); ffc04708: 48 00 f5 91 bl ffc13c98 <__errno> <== NOT EXECUTED ffc0470c: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED ffc04710: 48 00 f5 89 bl ffc13c98 <__errno> <== NOT EXECUTED ffc04714: 80 03 00 00 lwz r0,0(r3) <== NOT EXECUTED ffc04718: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0471c: 90 1f 00 00 stw r0,0(r31) <== NOT EXECUTED ffc04720: 48 00 00 64 b ffc04784 <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); ffc04724: 3d 20 00 00 lis r9,0 ffc04728: 80 69 26 b4 lwz r3,9908(r9) ffc0472c: 81 23 00 24 lwz r9,36(r3) ffc04730: 2f 89 00 00 cmpwi cr7,r9,0 ffc04734: 41 9e 00 1c beq- cr7,ffc04750 <== NEVER TAKEN ffc04738: 80 09 00 1c lwz r0,28(r9) ffc0473c: 2f 80 00 00 cmpwi cr7,r0,0 ffc04740: 41 9e 00 10 beq- cr7,ffc04750 <== NEVER TAKEN ffc04744: 38 63 00 18 addi r3,r3,24 ffc04748: 7c 09 03 a6 mtctr r0 ffc0474c: 4e 80 04 21 bctrl rtems_filesystem_root = loc; ffc04750: 3d 20 00 00 lis r9,0 ffc04754: 80 01 00 14 lwz r0,20(r1) ffc04758: 81 29 26 b4 lwz r9,9908(r9) ffc0475c: 38 60 00 00 li r3,0 ffc04760: 81 41 00 0c lwz r10,12(r1) ffc04764: 81 61 00 10 lwz r11,16(r1) ffc04768: 81 01 00 08 lwz r8,8(r1) ffc0476c: 91 49 00 1c stw r10,28(r9) ffc04770: 91 09 00 18 stw r8,24(r9) ffc04774: 91 69 00 20 stw r11,32(r9) ffc04778: 90 09 00 24 stw r0,36(r9) ffc0477c: 80 01 00 18 lwz r0,24(r1) ffc04780: 90 09 00 28 stw r0,40(r9) return 0; } ffc04784: 80 01 00 3c lwz r0,60(r1) ffc04788: 83 a1 00 2c lwz r29,44(r1) ffc0478c: 7c 08 03 a6 mtlr r0 ffc04790: 83 c1 00 30 lwz r30,48(r1) ffc04794: 83 e1 00 34 lwz r31,52(r1) ffc04798: 38 21 00 38 addi r1,r1,56 ffc0479c: 4e 80 00 20 blr =============================================================================== ffc07d88 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { if ( !tp ) ffc07d88: 2c 04 00 00 cmpwi r4,0 int clock_gettime( clockid_t clock_id, struct timespec *tp ) { ffc07d8c: 94 21 ff f8 stwu r1,-8(r1) ffc07d90: 7c 08 02 a6 mflr r0 ffc07d94: 90 01 00 0c stw r0,12(r1) if ( !tp ) ffc07d98: 41 82 00 4c beq- ffc07de4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { ffc07d9c: 2f 83 00 01 cmpwi cr7,r3,1 ffc07da0: 40 be 00 10 bne+ cr7,ffc07db0 _TOD_Get(tp); ffc07da4: 7c 83 23 78 mr r3,r4 ffc07da8: 48 00 25 a1 bl ffc0a348 <_TOD_Get> ffc07dac: 48 00 00 1c b ffc07dc8 return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { ffc07db0: 2f 83 00 04 cmpwi cr7,r3,4 ffc07db4: 41 9e 00 0c beq- cr7,ffc07dc0 <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { ffc07db8: 2f 83 00 02 cmpwi cr7,r3,2 ffc07dbc: 40 be 00 14 bne+ cr7,ffc07dd0 _TOD_Get_uptime_as_timespec( tp ); ffc07dc0: 7c 83 23 78 mr r3,r4 ffc07dc4: 48 00 26 29 bl ffc0a3ec <_TOD_Get_uptime_as_timespec> ffc07dc8: 38 60 00 00 li r3,0 return 0; ffc07dcc: 48 00 00 28 b ffc07df4 } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) ffc07dd0: 2f 83 00 03 cmpwi cr7,r3,3 ffc07dd4: 40 be 00 10 bne+ cr7,ffc07de4 rtems_set_errno_and_return_minus_one( ENOSYS ); ffc07dd8: 48 00 b1 d5 bl ffc12fac <__errno> ffc07ddc: 38 00 00 58 li r0,88 ffc07de0: 48 00 00 0c b ffc07dec #endif rtems_set_errno_and_return_minus_one( EINVAL ); ffc07de4: 48 00 b1 c9 bl ffc12fac <__errno> ffc07de8: 38 00 00 16 li r0,22 ffc07dec: 90 03 00 00 stw r0,0(r3) ffc07df0: 38 60 ff ff li r3,-1 return 0; } ffc07df4: 80 01 00 0c lwz r0,12(r1) ffc07df8: 38 21 00 08 addi r1,r1,8 ffc07dfc: 7c 08 03 a6 mtlr r0 ffc07e00: 4e 80 00 20 blr =============================================================================== ffc07e04 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { if ( !tp ) ffc07e04: 2c 04 00 00 cmpwi r4,0 int clock_settime( clockid_t clock_id, const struct timespec *tp ) { ffc07e08: 94 21 ff f8 stwu r1,-8(r1) ffc07e0c: 7c 08 02 a6 mflr r0 ffc07e10: 90 01 00 0c stw r0,12(r1) if ( !tp ) ffc07e14: 41 82 00 60 beq- ffc07e74 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { ffc07e18: 2f 83 00 01 cmpwi cr7,r3,1 ffc07e1c: 40 be 00 3c bne+ cr7,ffc07e58 if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) ffc07e20: 81 24 00 00 lwz r9,0(r4) ffc07e24: 3c 00 21 da lis r0,8666 ffc07e28: 60 00 e4 ff ori r0,r0,58623 ffc07e2c: 7f 89 00 40 cmplw cr7,r9,r0 ffc07e30: 40 9d 00 44 ble- cr7,ffc07e74 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc07e34: 3d 20 00 00 lis r9,0 ffc07e38: 81 69 28 00 lwz r11,10240(r9) ffc07e3c: 38 0b 00 01 addi r0,r11,1 ffc07e40: 90 09 28 00 stw r0,10240(r9) rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); ffc07e44: 7c 83 23 78 mr r3,r4 ffc07e48: 48 00 26 1d bl ffc0a464 <_TOD_Set> _Thread_Enable_dispatch(); ffc07e4c: 48 00 3c 2d bl ffc0ba78 <_Thread_Enable_dispatch> ffc07e50: 38 60 00 00 li r3,0 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; ffc07e54: 48 00 00 30 b ffc07e84 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) ffc07e58: 2f 83 00 02 cmpwi cr7,r3,2 ffc07e5c: 41 9e 00 0c beq- cr7,ffc07e68 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) ffc07e60: 2f 83 00 03 cmpwi cr7,r3,3 ffc07e64: 40 be 00 10 bne+ cr7,ffc07e74 rtems_set_errno_and_return_minus_one( ENOSYS ); ffc07e68: 48 00 b1 45 bl ffc12fac <__errno> ffc07e6c: 38 00 00 58 li r0,88 ffc07e70: 48 00 00 0c b ffc07e7c #endif else rtems_set_errno_and_return_minus_one( EINVAL ); ffc07e74: 48 00 b1 39 bl ffc12fac <__errno> ffc07e78: 38 00 00 16 li r0,22 ffc07e7c: 90 03 00 00 stw r0,0(r3) ffc07e80: 38 60 ff ff li r3,-1 return 0; } ffc07e84: 80 01 00 0c lwz r0,12(r1) ffc07e88: 38 21 00 08 addi r1,r1,8 ffc07e8c: 7c 08 03 a6 mtlr r0 ffc07e90: 4e 80 00 20 blr =============================================================================== ffc12e78 : #include int close( int fd ) { ffc12e78: 94 21 ff f0 stwu r1,-16(r1) ffc12e7c: 7c 08 02 a6 mflr r0 rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); ffc12e80: 3d 20 00 00 lis r9,0 #include int close( int fd ) { ffc12e84: 90 01 00 14 stw r0,20(r1) rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); ffc12e88: 80 09 26 ac lwz r0,9900(r9) #include int close( int fd ) { ffc12e8c: 93 c1 00 08 stw r30,8(r1) rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); ffc12e90: 7f 83 00 40 cmplw cr7,r3,r0 #include int close( int fd ) { ffc12e94: 93 e1 00 0c stw r31,12(r1) rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); ffc12e98: 40 9c 00 20 bge- cr7,ffc12eb8 iop = rtems_libio_iop(fd); ffc12e9c: 3d 20 00 00 lis r9,0 ffc12ea0: 83 e9 27 6c lwz r31,10092(r9) ffc12ea4: 1c 63 00 48 mulli r3,r3,72 ffc12ea8: 7f ff 1a 14 add r31,r31,r3 rtems_libio_check_is_open(iop); ffc12eac: 80 1f 00 18 lwz r0,24(r31) ffc12eb0: 70 09 01 00 andi. r9,r0,256 ffc12eb4: 40 a2 00 18 bne+ ffc12ecc ffc12eb8: 48 00 51 b5 bl ffc1806c <__errno> ffc12ebc: 38 00 00 09 li r0,9 ffc12ec0: 90 03 00 00 stw r0,0(r3) ffc12ec4: 38 60 ff ff li r3,-1 ffc12ec8: 48 00 00 58 b ffc12f20 rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) ffc12ecc: 81 3f 00 40 lwz r9,64(r31) ffc12ed0: 3b c0 00 00 li r30,0 ffc12ed4: 80 09 00 04 lwz r0,4(r9) ffc12ed8: 2f 80 00 00 cmpwi cr7,r0,0 ffc12edc: 41 9e 00 14 beq- cr7,ffc12ef0 <== NEVER TAKEN rc = (*iop->handlers->close_h)( iop ); ffc12ee0: 7f e3 fb 78 mr r3,r31 ffc12ee4: 7c 09 03 a6 mtctr r0 ffc12ee8: 4e 80 04 21 bctrl ffc12eec: 7c 7e 1b 78 mr r30,r3 rtems_filesystem_freenode( &iop->pathinfo ); ffc12ef0: 81 3f 00 28 lwz r9,40(r31) ffc12ef4: 2f 89 00 00 cmpwi cr7,r9,0 ffc12ef8: 41 9e 00 1c beq- cr7,ffc12f14 <== NEVER TAKEN ffc12efc: 80 09 00 1c lwz r0,28(r9) ffc12f00: 2f 80 00 00 cmpwi cr7,r0,0 ffc12f04: 41 9e 00 10 beq- cr7,ffc12f14 ffc12f08: 38 7f 00 1c addi r3,r31,28 ffc12f0c: 7c 09 03 a6 mtctr r0 ffc12f10: 4e 80 04 21 bctrl rtems_libio_free( iop ); ffc12f14: 7f e3 fb 78 mr r3,r31 ffc12f18: 48 00 03 01 bl ffc13218 return rc; ffc12f1c: 7f c3 f3 78 mr r3,r30 } ffc12f20: 80 01 00 14 lwz r0,20(r1) ffc12f24: 83 c1 00 08 lwz r30,8(r1) ffc12f28: 7c 08 03 a6 mtlr r0 ffc12f2c: 83 e1 00 0c lwz r31,12(r1) ffc12f30: 38 21 00 10 addi r1,r1,16 ffc12f34: 4e 80 00 20 blr =============================================================================== ffc0bdb8 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { ffc0bdb8: 94 21 ff e8 stwu r1,-24(r1) ffc0bdbc: 7c 08 02 a6 mflr r0 ffc0bdc0: 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; ffc0bdc4: 38 00 00 00 li r0,0 args.mode = 0; status = rtems_io_close( ffc0bdc8: 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; ffc0bdcc: 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; ffc0bdd0: 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; ffc0bdd4: 81 23 00 3c lwz r9,60(r3) args.iop = iop; ffc0bdd8: 90 61 00 08 stw r3,8(r1) args.flags = 0; args.mode = 0; status = rtems_io_close( ffc0bddc: 80 89 00 0c lwz r4,12(r9) ffc0bde0: 80 69 00 08 lwz r3,8(r9) ffc0bde4: 48 00 15 ed bl ffc0d3d0 np->major, np->minor, (void *) &args ); if ( status ) { ffc0bde8: 38 00 00 00 li r0,0 ffc0bdec: 2f 83 00 00 cmpwi cr7,r3,0 ffc0bdf0: 41 be 00 0c beq+ cr7,ffc0bdfc <== ALWAYS TAKEN return rtems_deviceio_errno(status); ffc0bdf4: 48 00 01 35 bl ffc0bf28 <== NOT EXECUTED ffc0bdf8: 7c 60 1b 78 mr r0,r3 <== NOT EXECUTED } return 0; } ffc0bdfc: 7c 03 03 78 mr r3,r0 ffc0be00: 80 01 00 1c lwz r0,28(r1) ffc0be04: 38 21 00 18 addi r1,r1,24 ffc0be08: 7c 08 03 a6 mtlr r0 ffc0be0c: 4e 80 00 20 blr =============================================================================== ffc0be1c : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { ffc0be1c: 94 21 ff d8 stwu r1,-40(r1) ffc0be20: 7c 08 02 a6 mflr r0 ffc0be24: 93 c1 00 20 stw r30,32(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; ffc0be28: 83 c6 00 00 lwz r30,0(r6) const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { ffc0be2c: 93 21 00 0c stw r25,12(r1) ffc0be30: 7c 79 1b 78 mr r25,r3 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) ffc0be34: 2f 9e 00 00 cmpwi cr7,r30,0 const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { ffc0be38: 93 61 00 14 stw r27,20(r1) ffc0be3c: 7c 9b 23 78 mr r27,r4 ffc0be40: 93 e1 00 24 stw r31,36(r1) ffc0be44: 7c df 33 78 mr r31,r6 ffc0be48: 90 01 00 2c stw r0,44(r1) ffc0be4c: 93 41 00 10 stw r26,16(r1) ffc0be50: 93 81 00 18 stw r28,24(r1) ffc0be54: 93 a1 00 1c stw r29,28(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) ffc0be58: 41 9e 00 14 beq- cr7,ffc0be6c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { ffc0be5c: 3f 40 00 00 lis r26,0 ffc0be60: 3b 5a 26 b0 addi r26,r26,9904 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) ffc0be64: 3b a0 00 00 li r29,0 ffc0be68: 48 00 00 6c b ffc0bed4 rtems_set_errno_and_return_minus_one( EFAULT ); ffc0be6c: 48 00 2a e5 bl ffc0e950 <__errno> <== NOT EXECUTED ffc0be70: 38 00 00 0e li r0,14 <== NOT EXECUTED ffc0be74: 48 00 00 80 b ffc0bef4 <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) ffc0be78: 83 9e 00 00 lwz r28,0(r30) ffc0be7c: 2f 9c 00 00 cmpwi cr7,r28,0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) ffc0be80: 7f 84 e3 78 mr r4,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) ffc0be84: 41 9e 00 4c beq- cr7,ffc0bed0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) ffc0be88: 48 00 3b c9 bl ffc0fa50 ffc0be8c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0be90: 40 9e 00 40 bne- cr7,ffc0bed0 <== NEVER TAKEN continue; if (device_name_table[i].device_name[pathnamelen] != '\0') ffc0be94: 7c 1c d8 ae lbzx r0,r28,r27 ffc0be98: 2f 80 00 00 cmpwi cr7,r0,0 ffc0be9c: 40 be 00 34 bne+ cr7,ffc0bed0 <== NEVER TAKEN /* 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; ffc0bea0: 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]; ffc0bea4: 93 df 00 00 stw r30,0(r31) pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; ffc0bea8: 81 29 26 f8 lwz r9,9976(r9) ffc0beac: 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; ffc0beb0: 3d 20 00 00 lis r9,0 pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; ffc0beb4: 90 1f 00 10 stw r0,16(r31) 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; ffc0beb8: 38 09 21 48 addi r0,r9,8520 pathloc->ops = &devFS_ops; ffc0bebc: 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; ffc0bec0: 90 1f 00 08 stw r0,8(r31) pathloc->ops = &devFS_ops; ffc0bec4: 38 09 21 80 addi r0,r9,8576 ffc0bec8: 90 1f 00 0c stw r0,12(r31) pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; ffc0becc: 48 00 00 30 b ffc0befc /* 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++) { ffc0bed0: 3b de 00 14 addi r30,r30,20 ffc0bed4: 80 1a 00 00 lwz r0,0(r26) if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) ffc0bed8: 7f 23 cb 78 mr r3,r25 ffc0bedc: 7f 65 db 78 mr r5,r27 /* 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++) { ffc0bee0: 7f 9d 00 40 cmplw cr7,r29,r0 ffc0bee4: 3b bd 00 01 addi r29,r29,1 ffc0bee8: 41 9c ff 90 blt+ cr7,ffc0be78 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); ffc0beec: 48 00 2a 65 bl ffc0e950 <__errno> ffc0bef0: 38 00 00 02 li r0,2 ffc0bef4: 90 03 00 00 stw r0,0(r3) ffc0bef8: 38 60 ff ff li r3,-1 } ffc0befc: 80 01 00 2c lwz r0,44(r1) ffc0bf00: 83 21 00 0c lwz r25,12(r1) ffc0bf04: 7c 08 03 a6 mtlr r0 ffc0bf08: 83 41 00 10 lwz r26,16(r1) ffc0bf0c: 83 61 00 14 lwz r27,20(r1) ffc0bf10: 83 81 00 18 lwz r28,24(r1) ffc0bf14: 83 a1 00 1c lwz r29,28(r1) ffc0bf18: 83 c1 00 20 lwz r30,32(r1) ffc0bf1c: 83 e1 00 24 lwz r31,36(r1) ffc0bf20: 38 21 00 28 addi r1,r1,40 ffc0bf24: 4e 80 00 20 blr =============================================================================== ffc03858 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc03858: 94 21 ff e8 stwu r1,-24(r1) ffc0385c: 7c 08 02 a6 mflr r0 ffc03860: 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( ffc03864: 3f a0 00 00 lis r29,0 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc03868: 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( ffc0386c: 80 1d 26 b0 lwz r0,9904(r29) int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc03870: 93 e1 00 14 stw r31,20(r1) ffc03874: 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( ffc03878: 1c 60 00 14 mulli r3,r0,20 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { ffc0387c: 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( ffc03880: 48 00 84 55 bl ffc0bcd4 <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) ffc03884: 7c 7e 1b 79 mr. r30,r3 ffc03888: 40 a2 00 18 bne+ ffc038a0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); ffc0388c: 48 00 b0 c5 bl ffc0e950 <__errno> <== NOT EXECUTED ffc03890: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc03894: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc03898: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc0389c: 48 00 00 30 b ffc038cc <== NOT EXECUTED memset( ffc038a0: 80 bd 26 b0 lwz r5,9904(r29) ffc038a4: 38 80 00 00 li r4,0 ffc038a8: 1c a5 00 14 mulli r5,r5,20 ffc038ac: 48 00 bc 7d bl ffc0f528 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; ffc038b0: 3d 20 00 00 lis r9,0 ffc038b4: 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; ffc038b8: 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; ffc038bc: 38 09 00 38 addi r0,r9,56 ffc038c0: 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; ffc038c4: 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; ffc038c8: 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; } ffc038cc: 80 01 00 1c lwz r0,28(r1) ffc038d0: 83 a1 00 0c lwz r29,12(r1) ffc038d4: 7c 08 03 a6 mtlr r0 ffc038d8: 83 c1 00 10 lwz r30,16(r1) ffc038dc: 83 e1 00 14 lwz r31,20(r1) ffc038e0: 38 21 00 18 addi r1,r1,24 ffc038e4: 4e 80 00 20 blr =============================================================================== ffc03a78 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { ffc03a78: 94 21 ff e8 stwu r1,-24(r1) ffc03a7c: 7c 08 02 a6 mflr r0 ffc03a80: 7c 69 1b 78 mr r9,r3 ffc03a84: 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; ffc03a88: 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; ffc03a8c: 81 63 00 3c lwz r11,60(r3) args.iop = iop; args.command = command; args.buffer = buffer; ffc03a90: 90 a1 00 10 stw r5,16(r1) status = rtems_io_control( ffc03a94: 38 a1 00 08 addi r5,r1,8 ffc03a98: 80 8b 00 0c lwz r4,12(r11) ffc03a9c: 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; ffc03aa0: 91 21 00 08 stw r9,8(r1) args.command = command; args.buffer = buffer; status = rtems_io_control( ffc03aa4: 48 00 4a f5 bl ffc08598 np->major, np->minor, (void *) &args ); if ( status ) ffc03aa8: 2f 83 00 00 cmpwi cr7,r3,0 ffc03aac: 41 be 00 0c beq+ cr7,ffc03ab8 <== ALWAYS TAKEN return rtems_deviceio_errno(status); ffc03ab0: 48 00 84 79 bl ffc0bf28 <== NOT EXECUTED ffc03ab4: 48 00 00 08 b ffc03abc <== NOT EXECUTED return args.ioctl_return; ffc03ab8: 80 61 00 14 lwz r3,20(r1) } ffc03abc: 80 01 00 1c lwz r0,28(r1) ffc03ac0: 38 21 00 18 addi r1,r1,24 ffc03ac4: 7c 08 03 a6 mtlr r0 ffc03ac8: 4e 80 00 20 blr =============================================================================== ffc038e8 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { ffc038e8: 94 21 ff d8 stwu r1,-40(r1) ffc038ec: 7c 08 02 a6 mflr r0 ffc038f0: 93 81 00 18 stw r28,24(r1) ffc038f4: 7c dc 33 78 mr r28,r6 ffc038f8: 93 a1 00 1c stw r29,28(r1) ffc038fc: 7c bd 2b 78 mr r29,r5 ffc03900: 93 c1 00 20 stw r30,32(r1) ffc03904: 7c 9e 23 78 mr r30,r4 ffc03908: 93 e1 00 24 stw r31,36(r1) ffc0390c: 7c 7f 1b 78 mr r31,r3 ffc03910: 90 01 00 2c stw r0,44(r1) ffc03914: 93 01 00 08 stw r24,8(r1) ffc03918: 93 21 00 0c stw r25,12(r1) ffc0391c: 93 41 00 10 stw r26,16(r1) ffc03920: 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') && ffc03924: 88 03 00 00 lbz r0,0(r3) ffc03928: 2f 80 00 64 cmpwi cr7,r0,100 ffc0392c: 40 be 00 2c bne+ cr7,ffc03958 <== NEVER TAKEN ffc03930: 88 03 00 01 lbz r0,1(r3) ffc03934: 2f 80 00 65 cmpwi cr7,r0,101 ffc03938: 40 be 00 20 bne+ cr7,ffc03958 <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) ffc0393c: 88 03 00 02 lbz r0,2(r3) ffc03940: 2f 80 00 76 cmpwi cr7,r0,118 ffc03944: 40 be 00 14 bne+ cr7,ffc03958 <== NEVER TAKEN ffc03948: 88 03 00 03 lbz r0,3(r3) ffc0394c: 38 60 00 00 li r3,0 ffc03950: 2f 80 00 00 cmpwi cr7,r0,0 ffc03954: 41 9e 00 ec beq- cr7,ffc03a40 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) ffc03958: 57 c0 04 26 rlwinm r0,r30,0,16,19 ffc0395c: 2f 80 60 00 cmpwi cr7,r0,24576 ffc03960: 41 9e 00 18 beq- cr7,ffc03978 <== NEVER TAKEN ffc03964: 2f 80 20 00 cmpwi cr7,r0,8192 ffc03968: 41 be 00 10 beq+ cr7,ffc03978 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ffc0396c: 48 00 af e5 bl ffc0e950 <__errno> <== NOT EXECUTED ffc03970: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc03974: 48 00 00 2c b ffc039a0 <== NOT EXECUTED 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; ffc03978: 83 47 00 00 lwz r26,0(r7) if (!device_name_table) ffc0397c: 2f 9a 00 00 cmpwi cr7,r26,0 ffc03980: 41 9e 00 18 beq- cr7,ffc03998 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ ffc03984: 3f 00 00 00 lis r24,0 ffc03988: 3b 18 26 b0 addi r24,r24,9904 else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) ffc0398c: 3b 20 ff ff li r25,-1 ffc03990: 3b 60 00 00 li r27,0 ffc03994: 48 00 00 48 b ffc039dc rtems_set_errno_and_return_minus_one( EFAULT ); ffc03998: 48 00 af b9 bl ffc0e950 <__errno> <== NOT EXECUTED ffc0399c: 38 00 00 0e li r0,14 <== NOT EXECUTED ffc039a0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc039a4: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc039a8: 48 00 00 98 b ffc03a40 <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) ffc039ac: 7c 1a 48 2e lwzx r0,r26,r9 ffc039b0: 2f 80 00 00 cmpwi cr7,r0,0 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) ffc039b4: 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) ffc039b8: 41 9e 00 1c beq- cr7,ffc039d4 <== ALWAYS TAKEN slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) ffc039bc: 48 00 be d9 bl ffc0f894 <== NOT EXECUTED ffc039c0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc039c4: 40 be 00 14 bne+ cr7,ffc039d8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EEXIST ); ffc039c8: 48 00 af 89 bl ffc0e950 <__errno> <== NOT EXECUTED ffc039cc: 38 00 00 11 li r0,17 <== NOT EXECUTED ffc039d0: 4b ff ff d0 b ffc039a0 <== NOT EXECUTED ffc039d4: 7f 79 db 78 mr r25,r27 /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ ffc039d8: 3b 7b 00 01 addi r27,r27,1 ffc039dc: 80 18 00 00 lwz r0,0(r24) if (device_name_table[i].device_name == NULL) ffc039e0: 1d 3b 00 14 mulli r9,r27,20 /* 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++){ ffc039e4: 7f 9b 00 40 cmplw cr7,r27,r0 if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) ffc039e8: 7f e3 fb 78 mr r3,r31 /* 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++){ ffc039ec: 41 9c ff c0 blt+ cr7,ffc039ac else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) ffc039f0: 2f 99 ff ff cmpwi cr7,r25,-1 ffc039f4: 40 be 00 10 bne+ cr7,ffc03a04 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); ffc039f8: 48 00 af 59 bl ffc0e950 <__errno> <== NOT EXECUTED ffc039fc: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc03a00: 4b ff ff a0 b ffc039a0 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc03a04: 7f 60 00 a6 mfmsr r27 ffc03a08: 7c 10 42 a6 mfsprg r0,0 ffc03a0c: 7f 60 00 78 andc r0,r27,r0 ffc03a10: 7c 00 01 24 mtmsr r0 _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; ffc03a14: 1f 39 00 14 mulli r25,r25,20 ffc03a18: 7f fa c9 2e stwx r31,r26,r25 device_name_table[slot].device_name_length = strlen(path); ffc03a1c: 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; ffc03a20: 7f 5a ca 14 add r26,r26,r25 device_name_table[slot].device_name_length = strlen(path); ffc03a24: 48 00 bf 91 bl ffc0f9b4 device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; ffc03a28: 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); ffc03a2c: 90 7a 00 04 stw r3,4(r26) device_name_table[slot].major = major; ffc03a30: 93 ba 00 08 stw r29,8(r26) device_name_table[slot].minor = minor; ffc03a34: 93 9a 00 0c stw r28,12(r26) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc03a38: 7f 60 01 24 mtmsr r27 ffc03a3c: 38 60 00 00 li r3,0 device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } ffc03a40: 80 01 00 2c lwz r0,44(r1) ffc03a44: 83 01 00 08 lwz r24,8(r1) ffc03a48: 7c 08 03 a6 mtlr r0 ffc03a4c: 83 21 00 0c lwz r25,12(r1) ffc03a50: 83 41 00 10 lwz r26,16(r1) ffc03a54: 83 61 00 14 lwz r27,20(r1) ffc03a58: 83 81 00 18 lwz r28,24(r1) ffc03a5c: 83 a1 00 1c lwz r29,28(r1) ffc03a60: 83 c1 00 20 lwz r30,32(r1) ffc03a64: 83 e1 00 24 lwz r31,36(r1) ffc03a68: 38 21 00 28 addi r1,r1,40 ffc03a6c: 4e 80 00 20 blr =============================================================================== ffc03acc : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc03acc: 94 21 ff e8 stwu r1,-24(r1) ffc03ad0: 7c 08 02 a6 mflr r0 ffc03ad4: 90 01 00 1c stw r0,28(r1) args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( ffc03ad8: 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; ffc03adc: 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; ffc03ae0: 81 23 00 3c lwz r9,60(r3) args.iop = iop; args.flags = iop->flags; ffc03ae4: 90 01 00 0c stw r0,12(r1) args.mode = mode; ffc03ae8: 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; ffc03aec: 90 61 00 08 stw r3,8(r1) args.flags = iop->flags; args.mode = mode; status = rtems_io_open( ffc03af0: 80 89 00 0c lwz r4,12(r9) ffc03af4: 80 69 00 08 lwz r3,8(r9) ffc03af8: 48 00 4c 61 bl ffc08758 np->major, np->minor, (void *) &args ); if ( status ) ffc03afc: 38 00 00 00 li r0,0 ffc03b00: 2f 83 00 00 cmpwi cr7,r3,0 ffc03b04: 41 be 00 0c beq+ cr7,ffc03b10 <== ALWAYS TAKEN return rtems_deviceio_errno(status); ffc03b08: 48 00 84 21 bl ffc0bf28 <== NOT EXECUTED ffc03b0c: 7c 60 1b 78 mr r0,r3 <== NOT EXECUTED return 0; } ffc03b10: 7c 03 03 78 mr r3,r0 ffc03b14: 80 01 00 1c lwz r0,28(r1) ffc03b18: 38 21 00 18 addi r1,r1,24 ffc03b1c: 7c 08 03 a6 mtlr r0 ffc03b20: 4e 80 00 20 blr =============================================================================== ffc03b24 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc03b24: 94 21 ff d8 stwu r1,-40(r1) <== NOT EXECUTED ffc03b28: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc03b2c: 7c 69 1b 78 mr r9,r3 <== NOT EXECUTED ffc03b30: 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; ffc03b34: 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; ffc03b38: 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; ffc03b3c: 90 01 00 20 stw r0,32(r1) <== NOT EXECUTED args.bytes_moved = 0; ffc03b40: 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; ffc03b44: 90 a1 00 1c stw r5,28(r1) <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( ffc03b48: 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; ffc03b4c: 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; ffc03b50: 81 63 00 10 lwz r11,16(r3) <== NOT EXECUTED ffc03b54: 81 83 00 14 lwz r12,20(r3) <== NOT EXECUTED args.buffer = buffer; ffc03b58: 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( ffc03b5c: 80 6a 00 08 lwz r3,8(r10) <== NOT EXECUTED ffc03b60: 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; ffc03b64: 91 61 00 10 stw r11,16(r1) <== NOT EXECUTED ffc03b68: 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; ffc03b6c: 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( ffc03b70: 48 00 4c 49 bl ffc087b8 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) ffc03b74: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc03b78: 41 be 00 0c beq+ cr7,ffc03b84 <== NOT EXECUTED return rtems_deviceio_errno(status); ffc03b7c: 48 00 83 ad bl ffc0bf28 <== NOT EXECUTED ffc03b80: 48 00 00 08 b ffc03b88 <== NOT EXECUTED return (ssize_t) args.bytes_moved; ffc03b84: 80 61 00 24 lwz r3,36(r1) <== NOT EXECUTED } ffc03b88: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc03b8c: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc03b90: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc03b94: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc03b98 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { ffc03b98: 94 21 ff f8 stwu r1,-8(r1) ffc03b9c: 7c 08 02 a6 mflr r0 ffc03ba0: 90 01 00 0c stw r0,12(r1) rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; ffc03ba4: 81 23 00 00 lwz r9,0(r3) if (!the_dev) ffc03ba8: 2f 89 00 00 cmpwi cr7,r9,0 ffc03bac: 40 be 00 18 bne+ cr7,ffc03bc4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); ffc03bb0: 48 00 ad a1 bl ffc0e950 <__errno> <== NOT EXECUTED ffc03bb4: 38 00 00 0e li r0,14 <== NOT EXECUTED ffc03bb8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc03bbc: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc03bc0: 48 00 00 20 b ffc03be0 <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); ffc03bc4: 80 09 00 0c lwz r0,12(r9) buf->st_mode = the_dev->mode; ffc03bc8: 38 60 00 00 li r3,0 ffc03bcc: 81 69 00 10 lwz r11,16(r9) rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; ffc03bd0: 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 ); ffc03bd4: 90 04 00 1c stw r0,28(r4) buf->st_mode = the_dev->mode; ffc03bd8: 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 ); ffc03bdc: 91 24 00 18 stw r9,24(r4) buf->st_mode = the_dev->mode; return 0; } ffc03be0: 80 01 00 0c lwz r0,12(r1) ffc03be4: 38 21 00 08 addi r1,r1,8 ffc03be8: 7c 08 03 a6 mtlr r0 ffc03bec: 4e 80 00 20 blr =============================================================================== ffc03bf0 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { ffc03bf0: 94 21 ff d8 stwu r1,-40(r1) ffc03bf4: 7c 08 02 a6 mflr r0 ffc03bf8: 7c 69 1b 78 mr r9,r3 ffc03bfc: 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; ffc03c00: 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; ffc03c04: 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; ffc03c08: 90 01 00 20 stw r0,32(r1) args.bytes_moved = 0; ffc03c0c: 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; ffc03c10: 90 a1 00 1c stw r5,28(r1) args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( ffc03c14: 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; ffc03c18: 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; ffc03c1c: 81 63 00 10 lwz r11,16(r3) ffc03c20: 81 83 00 14 lwz r12,20(r3) args.buffer = (void *) buffer; ffc03c24: 90 81 00 18 stw r4,24(r1) args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( ffc03c28: 80 6a 00 08 lwz r3,8(r10) ffc03c2c: 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; ffc03c30: 91 61 00 10 stw r11,16(r1) ffc03c34: 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; ffc03c38: 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( ffc03c3c: 48 00 4b dd bl ffc08818 np->major, np->minor, (void *) &args ); if ( status ) ffc03c40: 2f 83 00 00 cmpwi cr7,r3,0 ffc03c44: 41 be 00 0c beq+ cr7,ffc03c50 <== ALWAYS TAKEN return rtems_deviceio_errno(status); ffc03c48: 48 00 82 e1 bl ffc0bf28 <== NOT EXECUTED ffc03c4c: 48 00 00 08 b ffc03c54 <== NOT EXECUTED return (ssize_t) args.bytes_moved; ffc03c50: 80 61 00 24 lwz r3,36(r1) } ffc03c54: 80 01 00 2c lwz r0,44(r1) ffc03c58: 38 21 00 28 addi r1,r1,40 ffc03c5c: 7c 08 03 a6 mtlr r0 ffc03c60: 4e 80 00 20 blr =============================================================================== ffc16b84 : */ int device_close( rtems_libio_t *iop ) { ffc16b84: 94 21 ff e8 stwu r1,-24(r1) ffc16b88: 7c 08 02 a6 mflr r0 ffc16b8c: 90 01 00 1c stw r0,28(r1) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = 0; ffc16b90: 38 00 00 00 li r0,0 args.mode = 0; status = rtems_io_close( ffc16b94: 38 a1 00 08 addi r5,r1,8 the_jnode = iop->file_info; args.iop = iop; args.flags = 0; args.mode = 0; ffc16b98: 90 01 00 10 stw r0,16(r1) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = 0; ffc16b9c: 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; ffc16ba0: 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; ffc16ba4: 81 23 00 3c lwz r9,60(r3) args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close( ffc16ba8: 80 89 00 54 lwz r4,84(r9) ffc16bac: 80 69 00 50 lwz r3,80(r9) ffc16bb0: 48 00 0f e9 bl ffc17b98 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { ffc16bb4: 38 00 00 00 li r0,0 ffc16bb8: 2f 83 00 00 cmpwi cr7,r3,0 ffc16bbc: 41 be 00 0c beq+ cr7,ffc16bc8 <== ALWAYS TAKEN return rtems_deviceio_errno(status); ffc16bc0: 48 00 13 31 bl ffc17ef0 <== NOT EXECUTED ffc16bc4: 7c 60 1b 78 mr r0,r3 <== NOT EXECUTED } return 0; } ffc16bc8: 7c 03 03 78 mr r3,r0 ffc16bcc: 80 01 00 1c lwz r0,28(r1) ffc16bd0: 38 21 00 18 addi r1,r1,24 ffc16bd4: 7c 08 03 a6 mtlr r0 ffc16bd8: 4e 80 00 20 blr =============================================================================== ffc16a54 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { ffc16a54: 94 21 ff e8 stwu r1,-24(r1) ffc16a58: 7c 08 02 a6 mflr r0 rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; args.buffer = buffer; ffc16a5c: 90 a1 00 10 stw r5,16(r1) the_jnode = iop->file_info; status = rtems_io_control( ffc16a60: 38 a1 00 08 addi r5,r1,8 int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { ffc16a64: 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; ffc16a68: 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; ffc16a6c: 90 61 00 08 stw r3,8(r1) args.command = command; args.buffer = buffer; the_jnode = iop->file_info; ffc16a70: 81 23 00 3c lwz r9,60(r3) status = rtems_io_control( ffc16a74: 80 89 00 54 lwz r4,84(r9) ffc16a78: 80 69 00 50 lwz r3,80(r9) ffc16a7c: 48 00 11 7d bl ffc17bf8 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) ffc16a80: 2f 83 00 00 cmpwi cr7,r3,0 ffc16a84: 41 be 00 0c beq+ cr7,ffc16a90 <== ALWAYS TAKEN return rtems_deviceio_errno(status); ffc16a88: 48 00 14 69 bl ffc17ef0 <== NOT EXECUTED ffc16a8c: 48 00 00 08 b ffc16a94 <== NOT EXECUTED return args.ioctl_return; ffc16a90: 80 61 00 14 lwz r3,20(r1) } ffc16a94: 80 01 00 1c lwz r0,28(r1) ffc16a98: 38 21 00 18 addi r1,r1,24 ffc16a9c: 7c 08 03 a6 mtlr r0 ffc16aa0: 4e 80 00 20 blr =============================================================================== ffc16bdc : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc16bdc: 94 21 ff e8 stwu r1,-24(r1) ffc16be0: 7c 08 02 a6 mflr r0 ffc16be4: 90 01 00 1c stw r0,28(r1) args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( ffc16be8: 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; ffc16bec: 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; ffc16bf0: 90 61 00 08 stw r3,8(r1) args.flags = iop->flags; ffc16bf4: 90 01 00 0c stw r0,12(r1) args.mode = mode; ffc16bf8: 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; ffc16bfc: 81 23 00 3c lwz r9,60(r3) args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( ffc16c00: 80 89 00 54 lwz r4,84(r9) ffc16c04: 80 69 00 50 lwz r3,80(r9) ffc16c08: 48 00 10 51 bl ffc17c58 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) ffc16c0c: 38 00 00 00 li r0,0 ffc16c10: 2f 83 00 00 cmpwi cr7,r3,0 ffc16c14: 41 be 00 0c beq+ cr7,ffc16c20 <== ALWAYS TAKEN return rtems_deviceio_errno(status); ffc16c18: 48 00 12 d9 bl ffc17ef0 <== NOT EXECUTED ffc16c1c: 7c 60 1b 78 mr r0,r3 <== NOT EXECUTED return 0; } ffc16c20: 7c 03 03 78 mr r3,r0 ffc16c24: 80 01 00 1c lwz r0,28(r1) ffc16c28: 38 21 00 18 addi r1,r1,24 ffc16c2c: 7c 08 03 a6 mtlr r0 ffc16c30: 4e 80 00 20 blr =============================================================================== ffc16b14 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { ffc16b14: 94 21 ff d8 stwu r1,-40(r1) <== NOT EXECUTED ffc16b18: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc16b1c: 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; ffc16b20: 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; ffc16b24: 81 23 00 10 lwz r9,16(r3) <== NOT EXECUTED ffc16b28: 81 43 00 14 lwz r10,20(r3) <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; ffc16b2c: 90 01 00 20 stw r0,32(r1) <== NOT EXECUTED args.bytes_moved = 0; ffc16b30: 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; ffc16b34: 90 a1 00 1c stw r5,28(r1) <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( ffc16b38: 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; ffc16b3c: 91 21 00 10 stw r9,16(r1) <== NOT EXECUTED ffc16b40: 91 41 00 14 stw r10,20(r1) <== NOT EXECUTED args.buffer = buffer; ffc16b44: 90 81 00 18 stw r4,24(r1) <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; ffc16b48: 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; ffc16b4c: 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; ffc16b50: 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( ffc16b54: 80 89 00 54 lwz r4,84(r9) <== NOT EXECUTED ffc16b58: 80 69 00 50 lwz r3,80(r9) <== NOT EXECUTED ffc16b5c: 48 00 11 5d bl ffc17cb8 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) ffc16b60: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc16b64: 41 be 00 0c beq+ cr7,ffc16b70 <== NOT EXECUTED return rtems_deviceio_errno(status); ffc16b68: 48 00 13 89 bl ffc17ef0 <== NOT EXECUTED ffc16b6c: 48 00 00 08 b ffc16b74 <== NOT EXECUTED return (ssize_t) args.bytes_moved; ffc16b70: 80 61 00 24 lwz r3,36(r1) <== NOT EXECUTED } ffc16b74: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc16b78: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc16b7c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc16b80: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc16aa4 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { ffc16aa4: 94 21 ff d8 stwu r1,-40(r1) ffc16aa8: 7c 08 02 a6 mflr r0 ffc16aac: 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; ffc16ab0: 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; ffc16ab4: 81 23 00 10 lwz r9,16(r3) ffc16ab8: 81 43 00 14 lwz r10,20(r3) args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; ffc16abc: 90 01 00 20 stw r0,32(r1) args.bytes_moved = 0; ffc16ac0: 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; ffc16ac4: 90 a1 00 1c stw r5,28(r1) args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( ffc16ac8: 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; ffc16acc: 91 21 00 10 stw r9,16(r1) ffc16ad0: 91 41 00 14 stw r10,20(r1) args.buffer = (void *) buffer; ffc16ad4: 90 81 00 18 stw r4,24(r1) args.count = count; args.flags = iop->flags; args.bytes_moved = 0; ffc16ad8: 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; ffc16adc: 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; ffc16ae0: 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( ffc16ae4: 80 89 00 54 lwz r4,84(r9) ffc16ae8: 80 69 00 50 lwz r3,80(r9) ffc16aec: 48 00 12 2d bl ffc17d18 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) ffc16af0: 2f 83 00 00 cmpwi cr7,r3,0 ffc16af4: 41 be 00 0c beq+ cr7,ffc16b00 <== ALWAYS TAKEN return rtems_deviceio_errno(status); ffc16af8: 48 00 13 f9 bl ffc17ef0 <== NOT EXECUTED ffc16afc: 48 00 00 08 b ffc16b04 <== NOT EXECUTED return (ssize_t) args.bytes_moved; ffc16b00: 80 61 00 24 lwz r3,36(r1) } ffc16b04: 80 01 00 2c lwz r0,44(r1) ffc16b08: 38 21 00 28 addi r1,r1,40 ffc16b0c: 7c 08 03 a6 mtlr r0 ffc16b10: 4e 80 00 20 blr =============================================================================== ffc07cc4 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { ffc07cc4: 94 21 ff f0 stwu r1,-16(r1) ffc07cc8: 7c 08 02 a6 mflr r0 ffc07ccc: 90 01 00 14 stw r0,20(r1) rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { ffc07cd0: 80 03 00 b4 lwz r0,180(r3) /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { ffc07cd4: 93 e1 00 0c stw r31,12(r1) ffc07cd8: 7c 7f 1b 78 mr r31,r3 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { ffc07cdc: 2f 80 00 00 cmpwi cr7,r0,0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { ffc07ce0: 93 c1 00 08 stw r30,8(r1) rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { ffc07ce4: 41 9e 00 64 beq- cr7,ffc07d48 <== ALWAYS TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc07ce8: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc07cec: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED ffc07cf0: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED ffc07cf4: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; ffc07cf8: 3b c0 00 02 li r30,2 <== 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) { ffc07cfc: 48 00 00 38 b ffc07d34 <== NOT EXECUTED tty->rawOutBufState = rob_wait; ffc07d00: 93 df 00 94 stw r30,148(r31) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc07d04: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, ffc07d08: 80 7f 00 8c lwz r3,140(r31) <== NOT EXECUTED ffc07d0c: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc07d10: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc07d14: 48 00 1d 55 bl ffc09a68 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) ffc07d18: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc07d1c: 41 be 00 08 beq+ cr7,ffc07d24 <== NOT EXECUTED rtems_fatal_error_occurred (sc); ffc07d20: 48 00 25 75 bl ffc0a294 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc07d24: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc07d28: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED ffc07d2c: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED ffc07d30: 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) { ffc07d34: 81 7f 00 84 lwz r11,132(r31) <== NOT EXECUTED ffc07d38: 81 3f 00 80 lwz r9,128(r31) <== NOT EXECUTED ffc07d3c: 7f 8b 48 00 cmpw cr7,r11,r9 <== NOT EXECUTED ffc07d40: 40 9e ff c0 bne+ cr7,ffc07d00 <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc07d44: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); } } ffc07d48: 80 01 00 14 lwz r0,20(r1) ffc07d4c: 83 c1 00 08 lwz r30,8(r1) ffc07d50: 7c 08 03 a6 mtlr r0 ffc07d54: 83 e1 00 0c lwz r31,12(r1) ffc07d58: 38 21 00 10 addi r1,r1,16 ffc07d5c: 4e 80 00 20 blr =============================================================================== ffc05240 : int dup2( int fildes, int fildes2 ) { ffc05240: 94 21 ff 98 stwu r1,-104(r1) ffc05244: 7c 08 02 a6 mflr r0 ffc05248: 93 c1 00 60 stw r30,96(r1) /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); ffc0524c: 3b c1 00 08 addi r30,r1,8 int dup2( int fildes, int fildes2 ) { ffc05250: 93 e1 00 64 stw r31,100(r1) ffc05254: 7c 9f 23 78 mr r31,r4 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); ffc05258: 7f c4 f3 78 mr r4,r30 int dup2( int fildes, int fildes2 ) { ffc0525c: 93 a1 00 5c stw r29,92(r1) ffc05260: 7c 7d 1b 78 mr r29,r3 ffc05264: 90 01 00 6c stw r0,108(r1) /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); ffc05268: 48 00 08 19 bl ffc05a80 if ( status == -1 ) ffc0526c: 2f 83 ff ff cmpwi cr7,r3,-1 ffc05270: 41 be 00 30 beq+ cr7,ffc052a0 <== NEVER TAKEN /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); ffc05274: 7f c4 f3 78 mr r4,r30 ffc05278: 7f e3 fb 78 mr r3,r31 ffc0527c: 48 00 08 05 bl ffc05a80 if ( status == -1 ) ffc05280: 2f 83 ff ff cmpwi cr7,r3,-1 ffc05284: 41 9e 00 1c beq- cr7,ffc052a0 <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); ffc05288: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc0528c: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED ffc05290: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc05294: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc05298: 48 00 02 ed bl ffc05584 <== NOT EXECUTED ffc0529c: 48 00 00 08 b ffc052a4 <== NOT EXECUTED ffc052a0: 38 60 ff ff li r3,-1 } ffc052a4: 80 01 00 6c lwz r0,108(r1) ffc052a8: 83 a1 00 5c lwz r29,92(r1) ffc052ac: 7c 08 03 a6 mtlr r0 ffc052b0: 83 c1 00 60 lwz r30,96(r1) ffc052b4: 83 e1 00 64 lwz r31,100(r1) ffc052b8: 38 21 00 68 addi r1,r1,104 ffc052bc: 4e 80 00 20 blr =============================================================================== ffc07694 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { ffc07694: 94 21 ff e0 stwu r1,-32(r1) <== NOT EXECUTED ffc07698: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc0769c: 90 01 00 24 stw r0,36(r1) <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { ffc076a0: 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) { ffc076a4: 93 e1 00 1c stw r31,28(r1) <== NOT EXECUTED ffc076a8: 7c 9f 23 78 mr r31,r4 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { ffc076ac: 71 20 02 00 andi. r0,r9,512 <== NOT EXECUTED ffc076b0: 41 82 00 5c beq- ffc0770c <== NOT EXECUTED ffc076b4: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc076b8: 81 29 26 f8 lwz r9,9976(r9) <== NOT EXECUTED ffc076bc: 7d 29 1a 14 add r9,r9,r3 <== NOT EXECUTED ffc076c0: 88 09 00 01 lbz r0,1(r9) <== NOT EXECUTED ffc076c4: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED ffc076c8: 41 82 00 44 beq- ffc0770c <== NOT EXECUTED ffc076cc: 2f 83 00 09 cmpwi cr7,r3,9 <== NOT EXECUTED ffc076d0: 41 9e 00 3c beq- cr7,ffc0770c <== NOT EXECUTED ffc076d4: 2f 83 00 0a cmpwi cr7,r3,10 <== NOT EXECUTED ffc076d8: 41 be 00 34 beq+ cr7,ffc0770c <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; ffc076dc: 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] = '^'; ffc076e0: 39 20 00 5e li r9,94 <== NOT EXECUTED echobuf[1] = c ^ 0x40; ffc076e4: 98 01 00 09 stb r0,9(r1) <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); ffc076e8: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED ffc076ec: 38 80 00 02 li r4,2 <== 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] = '^'; ffc076f0: 99 21 00 08 stb r9,8(r1) <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); ffc076f4: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED ffc076f8: 4b ff fc a5 bl ffc0739c <== NOT EXECUTED tty->column += 2; ffc076fc: 81 3f 00 28 lwz r9,40(r31) <== NOT EXECUTED ffc07700: 38 09 00 02 addi r0,r9,2 <== NOT EXECUTED ffc07704: 90 1f 00 28 stw r0,40(r31) <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { ffc07708: 48 00 00 0c b ffc07714 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); ffc0770c: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc07710: 4b ff fe 05 bl ffc07514 <== NOT EXECUTED } } ffc07714: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED ffc07718: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc0771c: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc07720: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc07724: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc04bdc : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) ffc04bdc: 3d 20 00 00 lis r9,0 <== NOT EXECUTED fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { ffc04be0: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED ffc04be4: 7c 08 02 a6 mflr r0 <== NOT EXECUTED if (group_fp != NULL) ffc04be8: 80 69 28 8c lwz r3,10380(r9) <== NOT EXECUTED fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { ffc04bec: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED if (group_fp != NULL) ffc04bf0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc04bf4: 41 9e 00 08 beq- cr7,ffc04bfc <== NOT EXECUTED fclose(group_fp); ffc04bf8: 48 00 fa 95 bl ffc1468c <== NOT EXECUTED } ffc04bfc: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc04c00: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc04c04: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc04c08: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc04c0c : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) ffc04c0c: 3d 20 00 00 lis r9,0 <== NOT EXECUTED fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { ffc04c10: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED ffc04c14: 7c 08 02 a6 mflr r0 <== NOT EXECUTED if (passwd_fp != NULL) ffc04c18: 80 69 28 90 lwz r3,10384(r9) <== NOT EXECUTED fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { ffc04c1c: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED if (passwd_fp != NULL) ffc04c20: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc04c24: 41 9e 00 08 beq- cr7,ffc04c2c <== NOT EXECUTED fclose(passwd_fp); ffc04c28: 48 00 fa 65 bl ffc1468c <== NOT EXECUTED } ffc04c2c: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc04c30: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc04c34: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc04c38: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc07728 : * 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) { ffc07728: 94 21 ff e0 stwu r1,-32(r1) <== NOT EXECUTED ffc0772c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc07730: 7d 80 00 26 mfcr r12 <== NOT EXECUTED ffc07734: 90 01 00 24 stw r0,36(r1) <== NOT EXECUTED if (tty->ccount == 0) ffc07738: 80 03 00 20 lwz r0,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) { ffc0773c: 93 e1 00 1c stw r31,28(r1) <== NOT EXECUTED ffc07740: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED if (tty->ccount == 0) ffc07744: 2f 80 00 00 cmpwi cr7,r0,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) { ffc07748: 93 61 00 0c stw r27,12(r1) <== NOT EXECUTED ffc0774c: 93 81 00 10 stw r28,16(r1) <== NOT EXECUTED ffc07750: 93 a1 00 14 stw r29,20(r1) <== NOT EXECUTED ffc07754: 93 c1 00 18 stw r30,24(r1) <== NOT EXECUTED ffc07758: 91 81 00 08 stw r12,8(r1) <== NOT EXECUTED if (tty->ccount == 0) ffc0775c: 41 9e 01 f4 beq- cr7,ffc07950 <== NOT EXECUTED return; if (lineFlag) { ffc07760: 2f 84 00 00 cmpwi cr7,r4,0 <== NOT EXECUTED ffc07764: 41 9e 01 c4 beq- cr7,ffc07928 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { ffc07768: 80 03 00 3c lwz r0,60(r3) <== NOT EXECUTED ffc0776c: 70 09 00 08 andi. r9,r0,8 <== NOT EXECUTED ffc07770: 40 a2 00 0c bne+ ffc0777c <== NOT EXECUTED tty->ccount = 0; ffc07774: 91 23 00 20 stw r9,32(r3) <== NOT EXECUTED return; ffc07778: 48 00 01 d8 b ffc07950 <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { ffc0777c: 70 00 00 10 andi. r0,r0,16 <== NOT EXECUTED ffc07780: 40 a2 01 a8 bne+ ffc07928 <== NOT EXECUTED tty->ccount = 0; ffc07784: 90 03 00 20 stw r0,32(r3) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); ffc07788: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED ffc0778c: 88 63 00 44 lbz r3,68(r3) <== NOT EXECUTED ffc07790: 4b ff ff 05 bl ffc07694 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) ffc07794: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED echo ('\n', tty); ffc07798: 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) ffc0779c: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED echo ('\n', tty); ffc077a0: 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) ffc077a4: 41 a2 01 ac beq+ ffc07950 <== NOT EXECUTED ffc077a8: 48 00 00 34 b ffc077dc <== NOT EXECUTED } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { ffc077ac: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; ffc077b0: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED ffc077b4: 91 3f 00 20 stw r9,32(r31) <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { ffc077b8: 70 0a 00 08 andi. r10,r0,8 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; ffc077bc: 81 7f 00 1c lwz r11,28(r31) <== NOT EXECUTED ffc077c0: 7f cb 48 ae lbzx r30,r11,r9 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { ffc077c4: 41 82 01 5c beq- ffc07920 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { ffc077c8: 40 92 00 40 bne- cr4,ffc07808 <== NOT EXECUTED ffc077cc: 70 0b 00 10 andi. r11,r0,16 <== NOT EXECUTED ffc077d0: 40 a2 00 38 bne+ ffc07808 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); ffc077d4: 88 7f 00 43 lbz r3,67(r31) <== NOT EXECUTED ffc077d8: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED } } if (!lineFlag) break; } } ffc077dc: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED ffc077e0: 81 81 00 08 lwz r12,8(r1) <== NOT EXECUTED ffc077e4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc077e8: 83 61 00 0c lwz r27,12(r1) <== NOT EXECUTED ffc077ec: 83 81 00 10 lwz r28,16(r1) <== NOT EXECUTED ffc077f0: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED ffc077f4: 83 a1 00 14 lwz r29,20(r1) <== NOT EXECUTED ffc077f8: 83 c1 00 18 lwz r30,24(r1) <== NOT EXECUTED ffc077fc: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc07800: 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); ffc07804: 4b ff fe 90 b ffc07694 <== NOT EXECUTED } else if (c == '\t') { ffc07808: 2f 9e 00 09 cmpwi cr7,r30,9 <== NOT EXECUTED ffc0780c: 40 be 00 94 bne+ cr7,ffc078a0 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) ffc07810: 39 29 00 01 addi r9,r9,1 <== 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; ffc07814: 83 df 00 2c lwz r30,44(r31) <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) ffc07818: 7d 29 03 a6 mtctr r9 <== NOT EXECUTED ffc0781c: 70 0a 02 00 andi. r10,r0,512 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { ffc07820: 81 7d 00 00 lwz r11,0(r29) <== NOT EXECUTED ffc07824: 39 20 00 00 li r9,0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc07828: 48 00 00 44 b ffc0786c <== NOT EXECUTED c = tty->cbuf[i++]; ffc0782c: 81 5f 00 1c lwz r10,28(r31) <== NOT EXECUTED ffc07830: 7c 0a 48 ae lbzx r0,r10,r9 <== NOT EXECUTED if (c == '\t') { ffc07834: 2f 80 00 09 cmpwi cr7,r0,9 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { ffc07838: 7d 4b 02 14 add r10,r11,r0 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { ffc0783c: 40 be 00 0c bne+ cr7,ffc07848 <== NOT EXECUTED col = (col | 7) + 1; ffc07840: 63 de 00 07 ori r30,r30,7 <== NOT EXECUTED ffc07844: 48 00 00 20 b ffc07864 <== NOT EXECUTED } else if (iscntrl (c)) { ffc07848: 88 0a 00 01 lbz r0,1(r10) <== NOT EXECUTED ffc0784c: 54 0a df fe rlwinm r10,r0,27,31,31 <== NOT EXECUTED ffc07850: 2f 8a 00 00 cmpwi cr7,r10,0 <== NOT EXECUTED ffc07854: 41 9e 00 10 beq- cr7,ffc07864 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) ffc07858: 41 82 00 10 beq- ffc07868 <== NOT EXECUTED col += 2; ffc0785c: 3b de 00 02 addi r30,r30,2 <== NOT EXECUTED ffc07860: 48 00 00 08 b ffc07868 <== NOT EXECUTED } else { col++; ffc07864: 3b de 00 01 addi r30,r30,1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; ffc07868: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { ffc0786c: 42 00 ff c0 bdnz+ ffc0782c <== NOT EXECUTED ffc07870: 48 00 00 14 b ffc07884 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); ffc07874: 4b ff fb 29 bl ffc0739c <== NOT EXECUTED tty->column--; ffc07878: 81 3f 00 28 lwz r9,40(r31) <== NOT EXECUTED ffc0787c: 38 09 ff ff addi r0,r9,-1 <== NOT EXECUTED ffc07880: 90 1f 00 28 stw r0,40(r31) <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { ffc07884: 80 1f 00 28 lwz r0,40(r31) <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); ffc07888: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc0788c: 38 80 00 01 li r4,1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { ffc07890: 7f 80 f0 00 cmpw cr7,r0,r30 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); ffc07894: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { ffc07898: 41 9d ff dc bgt+ cr7,ffc07874 <== NOT EXECUTED ffc0789c: 48 00 00 84 b ffc07920 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { ffc078a0: 81 3d 00 00 lwz r9,0(r29) <== NOT EXECUTED ffc078a4: 3b de 00 01 addi r30,r30,1 <== NOT EXECUTED ffc078a8: 7d 29 f0 ae lbzx r9,r9,r30 <== NOT EXECUTED ffc078ac: 71 2b 00 20 andi. r11,r9,32 <== NOT EXECUTED ffc078b0: 41 82 00 30 beq- ffc078e0 <== NOT EXECUTED ffc078b4: 70 09 02 00 andi. r9,r0,512 <== NOT EXECUTED ffc078b8: 41 a2 00 28 beq+ ffc078e0 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); ffc078bc: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc078c0: 38 80 00 03 li r4,3 <== NOT EXECUTED ffc078c4: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED ffc078c8: 4b ff fa d5 bl ffc0739c <== NOT EXECUTED if (tty->column) ffc078cc: 81 3f 00 28 lwz r9,40(r31) <== NOT EXECUTED ffc078d0: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc078d4: 41 9e 00 0c beq- cr7,ffc078e0 <== NOT EXECUTED tty->column--; ffc078d8: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED ffc078dc: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { ffc078e0: 81 3d 00 00 lwz r9,0(r29) <== NOT EXECUTED ffc078e4: 7c 09 f0 ae lbzx r0,r9,r30 <== NOT EXECUTED ffc078e8: 70 0a 00 20 andi. r10,r0,32 <== NOT EXECUTED ffc078ec: 41 82 00 10 beq- ffc078fc <== NOT EXECUTED ffc078f0: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED ffc078f4: 70 0b 02 00 andi. r11,r0,512 <== NOT EXECUTED ffc078f8: 41 82 00 28 beq- ffc07920 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); ffc078fc: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc07900: 38 80 00 03 li r4,3 <== NOT EXECUTED ffc07904: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED ffc07908: 4b ff fa 95 bl ffc0739c <== NOT EXECUTED if (tty->column) ffc0790c: 81 3f 00 28 lwz r9,40(r31) <== NOT EXECUTED ffc07910: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc07914: 41 9e 00 0c beq- cr7,ffc07920 <== NOT EXECUTED tty->column--; ffc07918: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED ffc0791c: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED } } } if (!lineFlag) ffc07920: 40 b2 00 24 bne+ cr4,ffc07944 <== NOT EXECUTED ffc07924: 48 00 00 2c b ffc07950 <== 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)) { ffc07928: 2e 04 00 00 cmpwi cr4,r4,0 <== NOT EXECUTED ffc0792c: 3f a0 00 00 lis r29,0 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); ffc07930: 3f 80 ff c2 lis r28,-62 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); ffc07934: 3f 60 ff c2 lis r27,-62 <== NOT EXECUTED ffc07938: 3b bd 26 f8 addi r29,r29,9976 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); ffc0793c: 3b 9c 48 97 addi r28,r28,18583 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); ffc07940: 3b 7b 48 99 addi r27,r27,18585 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { ffc07944: 81 3f 00 20 lwz r9,32(r31) <== NOT EXECUTED ffc07948: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc0794c: 40 9e fe 60 bne+ cr7,ffc077ac <== NOT EXECUTED } } if (!lineFlag) break; } } ffc07950: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED ffc07954: 81 81 00 08 lwz r12,8(r1) <== NOT EXECUTED ffc07958: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0795c: 83 61 00 0c lwz r27,12(r1) <== NOT EXECUTED ffc07960: 83 81 00 10 lwz r28,16(r1) <== NOT EXECUTED ffc07964: 7d 80 81 20 mtcrf 8,r12 <== NOT EXECUTED ffc07968: 83 a1 00 14 lwz r29,20(r1) <== NOT EXECUTED ffc0796c: 83 c1 00 18 lwz r30,24(r1) <== NOT EXECUTED ffc07970: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED ffc07974: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED ffc07978: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc05584 : int fcntl( int fd, int cmd, ... ) { ffc05584: 94 21 ff c8 stwu r1,-56(r1) ffc05588: 7c 08 02 a6 mflr r0 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc0558c: 3d 20 00 00 lis r9,0 int fcntl( int fd, int cmd, ... ) { ffc05590: 90 01 00 3c stw r0,60(r1) int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc05594: 80 09 26 8c lwz r0,9868(r9) ... ) { int ret; va_list ap; va_start( ap, cmd ); ffc05598: 39 20 00 02 li r9,2 ffc0559c: 99 21 00 08 stb r9,8(r1) ffc055a0: 39 21 00 40 addi r9,r1,64 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc055a4: 7f 83 00 40 cmplw cr7,r3,r0 ... ) { int ret; va_list ap; va_start( ap, cmd ); ffc055a8: 91 21 00 0c stw r9,12(r1) ffc055ac: 39 21 00 10 addi r9,r1,16 int fcntl( int fd, int cmd, ... ) { ffc055b0: 93 e1 00 34 stw r31,52(r1) ffc055b4: 7c 9f 23 78 mr r31,r4 ffc055b8: 93 a1 00 2c stw r29,44(r1) ffc055bc: 93 c1 00 30 stw r30,48(r1) ffc055c0: 90 a1 00 18 stw r5,24(r1) ffc055c4: 90 c1 00 1c stw r6,28(r1) ffc055c8: 90 e1 00 20 stw r7,32(r1) int ret; va_list ap; va_start( ap, cmd ); ffc055cc: 91 21 00 10 stw r9,16(r1) int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); ffc055d0: 40 9c 00 20 bge- cr7,ffc055f0 <== NEVER TAKEN iop = rtems_libio_iop( fd ); ffc055d4: 3d 20 00 00 lis r9,0 ffc055d8: 81 69 27 50 lwz r11,10064(r9) ffc055dc: 1c 63 00 48 mulli r3,r3,72 ffc055e0: 7f ab 1a 14 add r29,r11,r3 rtems_libio_check_is_open(iop); ffc055e4: 80 7d 00 18 lwz r3,24(r29) ffc055e8: 70 69 01 00 andi. r9,r3,256 ffc055ec: 40 a2 00 10 bne+ ffc055fc <== ALWAYS TAKEN ffc055f0: 48 00 f7 fd bl ffc14dec <__errno> <== NOT EXECUTED ffc055f4: 38 00 00 09 li r0,9 <== NOT EXECUTED ffc055f8: 48 00 01 c0 b ffc057b8 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { ffc055fc: 2b 84 00 09 cmplwi cr7,r4,9 ffc05600: 41 9d 01 b0 bgt- cr7,ffc057b0 ffc05604: 3d 20 ff c2 lis r9,-62 ffc05608: 39 29 26 c4 addi r9,r9,9924 ffc0560c: 54 8a 10 3a rlwinm r10,r4,2,0,29 ffc05610: 7d 49 50 2e lwzx r10,r9,r10 ffc05614: 7d 2a 4a 14 add r9,r10,r9 ffc05618: 7d 29 03 a6 mtctr r9 ffc0561c: 4e 80 04 20 bctr case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); ffc05620: 89 21 00 08 lbz r9,8(r1) ffc05624: 2b 89 00 07 cmplwi cr7,r9,7 ffc05628: 41 9d 00 1c bgt- cr7,ffc05644 <== NEVER TAKEN ffc0562c: 81 01 00 10 lwz r8,16(r1) ffc05630: 39 49 00 01 addi r10,r9,1 ffc05634: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc05638: 99 41 00 08 stb r10,8(r1) ffc0563c: 7d 28 4a 14 add r9,r8,r9 ffc05640: 48 00 00 10 b ffc05650 ffc05644: 81 21 00 0c lwz r9,12(r1) <== NOT EXECUTED ffc05648: 39 49 00 04 addi r10,r9,4 <== NOT EXECUTED ffc0564c: 91 41 00 0c stw r10,12(r1) <== NOT EXECUTED ffc05650: 81 29 00 00 lwz r9,0(r9) if ( fd2 ) ffc05654: 2f 89 00 00 cmpwi cr7,r9,0 ffc05658: 41 9e 00 1c beq- cr7,ffc05674 <== ALWAYS TAKEN diop = rtems_libio_iop( fd2 ); ffc0565c: 1c 69 00 48 mulli r3,r9,72 <== NOT EXECUTED ffc05660: 7c 00 48 10 subfc r0,r0,r9 <== NOT EXECUTED ffc05664: 7c 00 01 10 subfe r0,r0,r0 <== NOT EXECUTED ffc05668: 7c 6b 1a 14 add r3,r11,r3 <== NOT EXECUTED ffc0566c: 7c 63 00 38 and r3,r3,r0 <== NOT EXECUTED ffc05670: 48 00 00 14 b ffc05684 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); ffc05674: 48 00 08 e5 bl ffc05f58 if ( diop == 0 ) { ffc05678: 3b c0 ff ff li r30,-1 ffc0567c: 2c 03 00 00 cmpwi r3,0 ffc05680: 41 82 01 7c beq- ffc057fc <== NEVER TAKEN } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc05684: 81 3d 00 24 lwz r9,36(r29) ffc05688: 81 5d 00 1c lwz r10,28(r29) ffc0568c: 81 7d 00 20 lwz r11,32(r29) ffc05690: 80 1d 00 28 lwz r0,40(r29) ffc05694: 91 23 00 24 stw r9,36(r3) ret = (int) (diop - rtems_libio_iops); ffc05698: 3d 20 00 00 lis r9,0 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc0569c: 91 43 00 1c stw r10,28(r3) ffc056a0: 91 63 00 20 stw r11,32(r3) ret = (int) (diop - rtems_libio_iops); ffc056a4: 83 c9 27 50 lwz r30,10064(r9) ret = -1; break; } } diop->handlers = iop->handlers; ffc056a8: 81 5d 00 40 lwz r10,64(r29) diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ffc056ac: 90 03 00 28 stw r0,40(r3) ret = (int) (diop - rtems_libio_iops); ffc056b0: 7f de 18 50 subf r30,r30,r3 ffc056b4: 7f de 1e 70 srawi r30,r30,3 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; ffc056b8: 81 7d 00 3c lwz r11,60(r29) diop->flags = iop->flags; ffc056bc: 81 3d 00 18 lwz r9,24(r29) diop->pathinfo = iop->pathinfo; ffc056c0: 80 1d 00 2c lwz r0,44(r29) ret = -1; break; } } diop->handlers = iop->handlers; ffc056c4: 91 43 00 40 stw r10,64(r3) diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); ffc056c8: 3d 40 38 e3 lis r10,14563 ffc056cc: 61 4a 8e 39 ori r10,r10,36409 ffc056d0: 7f de 51 d6 mullw r30,r30,r10 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; ffc056d4: 91 63 00 3c stw r11,60(r3) diop->flags = iop->flags; ffc056d8: 91 23 00 18 stw r9,24(r3) diop->pathinfo = iop->pathinfo; ffc056dc: 90 03 00 2c stw r0,44(r3) ffc056e0: 48 00 00 e0 b ffc057c0 ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); ffc056e4: 54 7e af fe rlwinm r30,r3,21,31,31 ffc056e8: 48 00 00 e0 b ffc057c8 * 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 ) ) ffc056ec: 89 21 00 08 lbz r9,8(r1) ffc056f0: 2b 89 00 07 cmplwi cr7,r9,7 ffc056f4: 41 9d 00 1c bgt- cr7,ffc05710 <== NEVER TAKEN ffc056f8: 81 61 00 10 lwz r11,16(r1) ffc056fc: 38 09 00 01 addi r0,r9,1 ffc05700: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc05704: 98 01 00 08 stb r0,8(r1) ffc05708: 7d 2b 4a 14 add r9,r11,r9 ffc0570c: 48 00 00 10 b ffc0571c ffc05710: 81 21 00 0c lwz r9,12(r1) <== NOT EXECUTED ffc05714: 38 09 00 04 addi r0,r9,4 <== NOT EXECUTED ffc05718: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc0571c: 80 09 00 00 lwz r0,0(r9) ffc05720: 2f 80 00 00 cmpwi cr7,r0,0 ffc05724: 41 9e 00 0c beq- cr7,ffc05730 <== NEVER TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; ffc05728: 60 63 08 00 ori r3,r3,2048 ffc0572c: 48 00 00 08 b ffc05734 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; ffc05730: 54 63 05 66 rlwinm r3,r3,0,21,19 <== NOT EXECUTED ffc05734: 90 7d 00 18 stw r3,24(r29) ffc05738: 3b c0 00 00 li r30,0 ffc0573c: 48 00 00 8c b ffc057c8 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); ffc05740: 48 00 06 15 bl ffc05d54 ffc05744: 7c 7e 1b 78 mr r30,r3 ffc05748: 48 00 00 78 b ffc057c0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); ffc0574c: 89 21 00 08 lbz r9,8(r1) ffc05750: 2b 89 00 07 cmplwi cr7,r9,7 ffc05754: 41 9d 00 1c bgt- cr7,ffc05770 <== NEVER TAKEN ffc05758: 81 61 00 10 lwz r11,16(r1) ffc0575c: 38 09 00 01 addi r0,r9,1 ffc05760: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc05764: 98 01 00 08 stb r0,8(r1) ffc05768: 7d 2b 4a 14 add r9,r11,r9 ffc0576c: 48 00 00 10 b ffc0577c ffc05770: 81 21 00 0c lwz r9,12(r1) <== NOT EXECUTED ffc05774: 38 09 00 04 addi r0,r9,4 <== NOT EXECUTED ffc05778: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc0577c: 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); ffc05780: 3b c0 00 00 li r30,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 ) ); ffc05784: 48 00 08 b1 bl ffc06034 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); ffc05788: 80 1d 00 18 lwz r0,24(r29) ffc0578c: 70 63 02 01 andi. r3,r3,513 ffc05790: 39 20 fd fe li r9,-514 ffc05794: 7d 20 00 38 and r0,r9,r0 ffc05798: 7c 63 03 78 or r3,r3,r0 ffc0579c: 90 7d 00 18 stw r3,24(r29) ffc057a0: 48 00 00 28 b ffc057c8 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; ffc057a4: 48 00 f6 49 bl ffc14dec <__errno> ffc057a8: 38 00 00 86 li r0,134 ffc057ac: 48 00 00 0c b ffc057b8 ret = -1; break; default: errno = EINVAL; ffc057b0: 48 00 f6 3d bl ffc14dec <__errno> ffc057b4: 38 00 00 16 li r0,22 ffc057b8: 90 03 00 00 stw r0,0(r3) ffc057bc: 48 00 00 3c b ffc057f8 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { ffc057c0: 2f 9e 00 00 cmpwi cr7,r30,0 ffc057c4: 41 9c 00 38 blt- cr7,ffc057fc <== NEVER TAKEN if (iop->handlers->fcntl_h) { ffc057c8: 81 3d 00 40 lwz r9,64(r29) ffc057cc: 80 09 00 30 lwz r0,48(r9) ffc057d0: 2f 80 00 00 cmpwi cr7,r0,0 ffc057d4: 41 9e 00 28 beq- cr7,ffc057fc <== NEVER TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); ffc057d8: 7f e3 fb 78 mr r3,r31 ffc057dc: 7c 09 03 a6 mtctr r0 ffc057e0: 7f a4 eb 78 mr r4,r29 ffc057e4: 4e 80 04 21 bctrl if (err) { ffc057e8: 7c 7f 1b 79 mr. r31,r3 ffc057ec: 41 a2 00 10 beq+ ffc057fc <== ALWAYS TAKEN errno = err; ffc057f0: 48 00 f5 fd bl ffc14dec <__errno> <== NOT EXECUTED ffc057f4: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED ffc057f8: 3b c0 ff ff li r30,-1 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } ffc057fc: 80 01 00 3c lwz r0,60(r1) ffc05800: 7f c3 f3 78 mr r3,r30 ffc05804: 83 a1 00 2c lwz r29,44(r1) ffc05808: 7c 08 03 a6 mtlr r0 ffc0580c: 83 c1 00 30 lwz r30,48(r1) ffc05810: 83 e1 00 34 lwz r31,52(r1) ffc05814: 38 21 00 38 addi r1,r1,56 ffc05818: 4e 80 00 20 blr =============================================================================== ffc05830 : #include int fdatasync( int fd ) { ffc05830: 7c 08 02 a6 mflr r0 ffc05834: 94 21 ff f8 stwu r1,-8(r1) rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc05838: 3d 20 00 00 lis r9,0 #include int fdatasync( int fd ) { ffc0583c: 90 01 00 0c stw r0,12(r1) rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc05840: 80 09 26 8c lwz r0,9868(r9) ffc05844: 7f 83 00 40 cmplw cr7,r3,r0 ffc05848: 40 9c 00 20 bge- cr7,ffc05868 iop = rtems_libio_iop( fd ); ffc0584c: 3d 20 00 00 lis r9,0 ffc05850: 80 09 27 50 lwz r0,10064(r9) ffc05854: 1c 63 00 48 mulli r3,r3,72 ffc05858: 7c 60 1a 14 add r3,r0,r3 rtems_libio_check_is_open(iop); ffc0585c: 80 03 00 18 lwz r0,24(r3) ffc05860: 70 09 01 00 andi. r9,r0,256 ffc05864: 40 a2 00 10 bne+ ffc05874 <== ALWAYS TAKEN ffc05868: 48 00 f5 85 bl ffc14dec <__errno> ffc0586c: 38 00 00 09 li r0,9 ffc05870: 48 00 00 30 b ffc058a0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); ffc05874: 70 09 00 04 andi. r9,r0,4 ffc05878: 40 a2 00 10 bne+ ffc05888 ffc0587c: 48 00 f5 71 bl ffc14dec <__errno> ffc05880: 38 00 00 16 li r0,22 ffc05884: 48 00 00 1c b ffc058a0 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) ffc05888: 81 23 00 40 lwz r9,64(r3) ffc0588c: 80 09 00 2c lwz r0,44(r9) ffc05890: 2f 80 00 00 cmpwi cr7,r0,0 ffc05894: 40 be 00 18 bne+ cr7,ffc058ac rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc05898: 48 00 f5 55 bl ffc14dec <__errno> ffc0589c: 38 00 00 86 li r0,134 ffc058a0: 90 03 00 00 stw r0,0(r3) ffc058a4: 38 60 ff ff li r3,-1 ffc058a8: 48 00 00 0c b ffc058b4 return (*iop->handlers->fdatasync_h)( iop ); ffc058ac: 7c 09 03 a6 mtctr r0 ffc058b0: 4e 80 04 21 bctrl } ffc058b4: 80 01 00 0c lwz r0,12(r1) ffc058b8: 38 21 00 08 addi r1,r1,8 ffc058bc: 7c 08 03 a6 mtlr r0 ffc058c0: 4e 80 00 20 blr =============================================================================== ffc116d8 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc116d8: 94 21 ff d0 stwu r1,-48(r1) ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, ffc116dc: 3d 20 00 00 lis r9,0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc116e0: 7c 08 02 a6 mflr r0 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, ffc116e4: 38 a0 00 00 li r5,0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc116e8: 93 81 00 20 stw r28,32(r1) ffc116ec: 7c 7c 1b 78 mr r28,r3 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, ffc116f0: 80 69 2a 50 lwz r3,10832(r9) */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc116f4: 93 61 00 1c stw r27,28(r1) ffc116f8: 7c 9b 23 78 mr r27,r4 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, ffc116fc: 38 80 00 00 li r4,0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc11700: 93 a1 00 24 stw r29,36(r1) ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, ffc11704: 3b a0 ff fc li r29,-4 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc11708: 90 01 00 34 stw r0,52(r1) ffc1170c: 93 41 00 18 stw r26,24(r1) ffc11710: 93 c1 00 28 stw r30,40(r1) ffc11714: 93 e1 00 2c stw r31,44(r1) ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, ffc11718: 4b ff 83 51 bl ffc09a68 ffc1171c: 2f 83 00 00 cmpwi cr7,r3,0 ffc11720: 40 9e 03 74 bne- cr7,ffc11a94 <== ALWAYS TAKEN RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; ffc11724: 83 fc 00 00 lwz r31,0(r28) <== NOT EXECUTED if (pipe == NULL) { ffc11728: 2f 9f 00 00 cmpwi cr7,r31,0 <== NOT EXECUTED ffc1172c: 40 be 01 50 bne+ cr7,ffc1187c <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); ffc11730: 38 60 00 34 li r3,52 <== NOT EXECUTED ffc11734: 4b ff 47 75 bl ffc05ea8 <== NOT EXECUTED if (pipe == NULL) ffc11738: 3b a0 ff f4 li r29,-12 <== NOT EXECUTED ffc1173c: 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)); ffc11740: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED ffc11744: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED if (pipe == NULL) ffc11748: 41 9e 01 78 beq- cr7,ffc118c0 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); ffc1174c: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc11750: 38 a0 00 34 li r5,52 <== NOT EXECUTED ffc11754: 48 00 76 01 bl ffc18d54 <== NOT EXECUTED pipe->Size = PIPE_BUF; ffc11758: 38 00 02 00 li r0,512 <== NOT EXECUTED ffc1175c: 90 1e 00 04 stw r0,4(r30) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); ffc11760: 38 60 02 00 li r3,512 <== NOT EXECUTED ffc11764: 4b ff 47 45 bl ffc05ea8 <== NOT EXECUTED if (! pipe->Buffer) ffc11768: 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); ffc1176c: 90 7e 00 00 stw r3,0(r30) <== NOT EXECUTED if (! pipe->Buffer) ffc11770: 41 9e 01 00 beq- cr7,ffc11870 <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( ffc11774: 3f a0 00 00 lis r29,0 <== NOT EXECUTED ffc11778: 88 7d 21 90 lbz r3,8592(r29) <== NOT EXECUTED ffc1177c: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc11780: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc11784: 64 63 50 49 oris r3,r3,20553 <== NOT EXECUTED ffc11788: 60 63 72 00 ori r3,r3,29184 <== NOT EXECUTED ffc1178c: 38 de 00 2c addi r6,r30,44 <== NOT EXECUTED ffc11790: 48 00 25 e9 bl ffc13d78 <== NOT EXECUTED ffc11794: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc11798: 40 9e 00 cc bne- cr7,ffc11864 <== 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( ffc1179c: 88 7d 21 90 lbz r3,8592(r29) <== NOT EXECUTED ffc117a0: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc117a4: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc117a8: 64 63 50 49 oris r3,r3,20553 <== NOT EXECUTED ffc117ac: 60 63 77 00 ori r3,r3,30464 <== NOT EXECUTED ffc117b0: 38 de 00 30 addi r6,r30,48 <== NOT EXECUTED ffc117b4: 48 00 25 c5 bl ffc13d78 <== NOT EXECUTED ffc117b8: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc117bc: 40 9e 00 a0 bne- cr7,ffc1185c <== 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( ffc117c0: 88 7d 21 90 lbz r3,8592(r29) <== NOT EXECUTED ffc117c4: 38 80 00 01 li r4,1 <== NOT EXECUTED ffc117c8: 38 a0 00 10 li r5,16 <== NOT EXECUTED ffc117cc: 64 63 50 49 oris r3,r3,20553 <== NOT EXECUTED ffc117d0: 60 63 73 00 ori r3,r3,29440 <== NOT EXECUTED ffc117d4: 38 c0 00 00 li r6,0 <== NOT EXECUTED ffc117d8: 38 fe 00 28 addi r7,r30,40 <== NOT EXECUTED ffc117dc: 4b ff 7f bd bl ffc09798 <== NOT EXECUTED ffc117e0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc117e4: 40 9e 00 70 bne- cr7,ffc11854 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) ffc117e8: 3f 40 00 00 lis r26,0 <== NOT EXECUTED ffc117ec: 80 9e 00 2c lwz r4,44(r30) <== NOT EXECUTED ffc117f0: 3b 5a 35 cc addi r26,r26,13772 <== NOT EXECUTED ffc117f4: 3b c1 00 0c addi r30,r1,12 <== NOT EXECUTED ffc117f8: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED ffc117fc: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED ffc11800: 4b ff a1 39 bl ffc0b938 <_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 ffc11804: 80 03 00 4c lwz r0,76(r3) <== NOT EXECUTED ffc11808: 64 00 10 00 oris r0,r0,4096 <== NOT EXECUTED ffc1180c: 90 03 00 4c stw r0,76(r3) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); ffc11810: 4b ff ad 0d bl ffc0c51c <_Thread_Enable_dispatch> <== NOT EXECUTED ffc11814: 80 9f 00 30 lwz r4,48(r31) <== NOT EXECUTED ffc11818: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED ffc1181c: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED ffc11820: 4b ff a1 19 bl ffc0b938 <_Objects_Get> <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state ffc11824: 80 03 00 4c lwz r0,76(r3) <== NOT EXECUTED ffc11828: 64 00 10 00 oris r0,r0,4096 <== NOT EXECUTED ffc1182c: 90 03 00 4c stw r0,76(r3) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); ffc11830: 4b ff ac ed bl ffc0c51c <_Thread_Enable_dispatch> <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') ffc11834: 89 3d 21 90 lbz r9,8592(r29) <== NOT EXECUTED ffc11838: 2f 89 00 7a cmpwi cr7,r9,122 <== NOT EXECUTED ffc1183c: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED ffc11840: 99 3d 21 90 stb r9,8592(r29) <== NOT EXECUTED ffc11844: 40 be 00 38 bne+ cr7,ffc1187c <== NOT EXECUTED c = 'a'; ffc11848: 38 00 00 61 li r0,97 <== NOT EXECUTED ffc1184c: 98 1d 21 90 stb r0,8592(r29) <== NOT EXECUTED ffc11850: 48 00 00 2c b ffc1187c <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); ffc11854: 80 7e 00 30 lwz r3,48(r30) <== NOT EXECUTED ffc11858: 48 00 26 11 bl ffc13e68 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); ffc1185c: 80 7e 00 2c lwz r3,44(r30) <== NOT EXECUTED ffc11860: 48 00 26 09 bl ffc13e68 <== NOT EXECUTED err_rbar: free(pipe->Buffer); ffc11864: 80 7e 00 00 lwz r3,0(r30) <== NOT EXECUTED ffc11868: 3b a0 ff fc li r29,-4 <== NOT EXECUTED ffc1186c: 4b ff 42 49 bl ffc05ab4 <== NOT EXECUTED err_buf: free(pipe); ffc11870: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc11874: 4b ff 42 41 bl ffc05ab4 <== NOT EXECUTED ffc11878: 48 00 00 48 b ffc118c0 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) ffc1187c: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED ffc11880: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc11884: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc11888: 4b ff 81 e1 bl ffc09a68 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { ffc1188c: 80 1c 00 00 lwz r0,0(r28) <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) ffc11890: 30 63 ff ff addic r3,r3,-1 <== NOT EXECUTED ffc11894: 7c 63 19 10 subfe r3,r3,r3 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { ffc11898: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) ffc1189c: 54 7d 07 7a rlwinm r29,r3,0,29,29 <== NOT EXECUTED ffc118a0: 3b bd ff fc addi r29,r29,-4 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { ffc118a4: 40 be 00 1c bne+ cr7,ffc118c0 <== NOT EXECUTED if (err) ffc118a8: 2f 9d 00 00 cmpwi cr7,r29,0 <== NOT EXECUTED ffc118ac: 41 be 00 10 beq+ cr7,ffc118bc <== NOT EXECUTED pipe_free(pipe); ffc118b0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc118b4: 4b ff fc b5 bl ffc11568 <== NOT EXECUTED ffc118b8: 48 00 00 08 b ffc118c0 <== NOT EXECUTED else *pipep = pipe; ffc118bc: 93 fc 00 00 stw r31,0(r28) <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); ffc118c0: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc118c4: 80 69 2a 50 lwz r3,10832(r9) <== NOT EXECUTED ffc118c8: 4b ff 82 e5 bl ffc09bac <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) ffc118cc: 2f 9d 00 00 cmpwi cr7,r29,0 <== NOT EXECUTED ffc118d0: 40 9e 01 c4 bne- cr7,ffc11a94 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { ffc118d4: 81 3b 00 18 lwz r9,24(r27) <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; ffc118d8: 83 fc 00 00 lwz r31,0(r28) <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { ffc118dc: 55 20 07 7c rlwinm r0,r9,0,29,30 <== NOT EXECUTED ffc118e0: 2f 80 00 04 cmpwi cr7,r0,4 <== NOT EXECUTED ffc118e4: 41 9e 00 a0 beq- cr7,ffc11984 <== NOT EXECUTED ffc118e8: 2f 80 00 06 cmpwi cr7,r0,6 <== NOT EXECUTED ffc118ec: 41 9e 01 34 beq- cr7,ffc11a20 <== NOT EXECUTED ffc118f0: 2f 80 00 02 cmpwi cr7,r0,2 <== NOT EXECUTED ffc118f4: 40 be 01 84 bne+ cr7,ffc11a78 <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) ffc118f8: 81 3f 00 10 lwz r9,16(r31) <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc118fc: 81 7f 00 20 lwz r11,32(r31) <== NOT EXECUTED if (pipe->Readers ++ == 0) ffc11900: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc11904: 38 0b 00 01 addi r0,r11,1 <== NOT EXECUTED if (pipe->Readers ++ == 0) ffc11908: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; ffc1190c: 90 1f 00 20 stw r0,32(r31) <== NOT EXECUTED if (pipe->Readers ++ == 0) ffc11910: 91 3f 00 10 stw r9,16(r31) <== NOT EXECUTED ffc11914: 40 be 00 10 bne+ cr7,ffc11924 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); ffc11918: 80 7f 00 30 lwz r3,48(r31) <== NOT EXECUTED ffc1191c: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED ffc11920: 48 00 26 15 bl ffc13f34 <== NOT EXECUTED if (pipe->Writers == 0) { ffc11924: 80 1f 00 14 lwz r0,20(r31) <== NOT EXECUTED ffc11928: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc1192c: 40 9e 01 4c bne- cr7,ffc11a78 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) ffc11930: 80 1b 00 18 lwz r0,24(r27) <== NOT EXECUTED ffc11934: 70 09 00 01 andi. r9,r0,1 <== NOT EXECUTED ffc11938: 40 82 01 40 bne- ffc11a78 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; ffc1193c: 83 df 00 24 lwz r30,36(r31) <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); ffc11940: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED ffc11944: 4b ff 82 69 bl ffc09bac <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) ffc11948: 80 7f 00 2c lwz r3,44(r31) <== NOT EXECUTED ffc1194c: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc11950: 48 00 26 65 bl ffc13fb4 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) ffc11954: 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)) ffc11958: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) ffc1195c: 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)) ffc11960: 40 9e 01 24 bne- cr7,ffc11a84 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) ffc11964: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED ffc11968: 4b ff 81 01 bl ffc09a68 <== NOT EXECUTED ffc1196c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc11970: 40 9e 01 14 bne- cr7,ffc11a84 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); ffc11974: 80 1f 00 24 lwz r0,36(r31) <== NOT EXECUTED ffc11978: 7f 9e 00 00 cmpw cr7,r30,r0 <== NOT EXECUTED ffc1197c: 41 9e ff c4 beq+ cr7,ffc11940 <== NOT EXECUTED ffc11980: 48 00 00 f8 b ffc11a78 <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { ffc11984: 80 1f 00 10 lwz r0,16(r31) <== NOT EXECUTED ffc11988: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc1198c: 40 9e 00 14 bne- cr7,ffc119a0 <== NOT EXECUTED ffc11990: 71 20 00 01 andi. r0,r9,1 <== NOT EXECUTED ffc11994: 41 82 00 0c beq- ffc119a0 <== NOT EXECUTED ffc11998: 3b a0 ff fa li r29,-6 <== NOT EXECUTED ffc1199c: 48 00 00 ec b ffc11a88 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) ffc119a0: 81 3f 00 14 lwz r9,20(r31) <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; ffc119a4: 81 7f 00 24 lwz r11,36(r31) <== NOT EXECUTED if (pipe->Writers ++ == 0) ffc119a8: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; ffc119ac: 38 0b 00 01 addi r0,r11,1 <== NOT EXECUTED if (pipe->Writers ++ == 0) ffc119b0: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; ffc119b4: 90 1f 00 24 stw r0,36(r31) <== NOT EXECUTED if (pipe->Writers ++ == 0) ffc119b8: 91 3f 00 14 stw r9,20(r31) <== NOT EXECUTED ffc119bc: 40 be 00 10 bne+ cr7,ffc119cc <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); ffc119c0: 80 7f 00 2c lwz r3,44(r31) <== NOT EXECUTED ffc119c4: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED ffc119c8: 48 00 25 6d bl ffc13f34 <== NOT EXECUTED if (pipe->Readers == 0) { ffc119cc: 80 1f 00 10 lwz r0,16(r31) <== NOT EXECUTED ffc119d0: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc119d4: 40 9e 00 a4 bne- cr7,ffc11a78 <== NOT EXECUTED prevCounter = pipe->readerCounter; ffc119d8: 83 df 00 20 lwz r30,32(r31) <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); ffc119dc: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED ffc119e0: 4b ff 81 cd bl ffc09bac <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) ffc119e4: 80 7f 00 30 lwz r3,48(r31) <== NOT EXECUTED ffc119e8: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc119ec: 48 00 25 c9 bl ffc13fb4 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) ffc119f0: 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)) ffc119f4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) ffc119f8: 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)) ffc119fc: 40 9e 00 88 bne- cr7,ffc11a84 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) ffc11a00: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED ffc11a04: 4b ff 80 65 bl ffc09a68 <== NOT EXECUTED ffc11a08: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc11a0c: 40 9e 00 78 bne- cr7,ffc11a84 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); ffc11a10: 80 1f 00 20 lwz r0,32(r31) <== NOT EXECUTED ffc11a14: 7f 9e 00 00 cmpw cr7,r30,r0 <== NOT EXECUTED ffc11a18: 41 9e ff c4 beq+ cr7,ffc119dc <== NOT EXECUTED ffc11a1c: 48 00 00 5c b ffc11a78 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) ffc11a20: 81 3f 00 10 lwz r9,16(r31) <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc11a24: 81 7f 00 20 lwz r11,32(r31) <== NOT EXECUTED if (pipe->Readers ++ == 0) ffc11a28: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc11a2c: 38 0b 00 01 addi r0,r11,1 <== NOT EXECUTED if (pipe->Readers ++ == 0) ffc11a30: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ffc11a34: 90 1f 00 20 stw r0,32(r31) <== NOT EXECUTED if (pipe->Readers ++ == 0) ffc11a38: 91 3f 00 10 stw r9,16(r31) <== NOT EXECUTED ffc11a3c: 40 be 00 10 bne+ cr7,ffc11a4c <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); ffc11a40: 80 7f 00 30 lwz r3,48(r31) <== NOT EXECUTED ffc11a44: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED ffc11a48: 48 00 24 ed bl ffc13f34 <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) ffc11a4c: 81 3f 00 14 lwz r9,20(r31) <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; ffc11a50: 81 7f 00 24 lwz r11,36(r31) <== NOT EXECUTED if (pipe->Writers ++ == 0) ffc11a54: 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 ++; ffc11a58: 38 0b 00 01 addi r0,r11,1 <== NOT EXECUTED if (pipe->Writers ++ == 0) ffc11a5c: 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 ++; ffc11a60: 90 1f 00 24 stw r0,36(r31) <== NOT EXECUTED if (pipe->Writers ++ == 0) ffc11a64: 91 3f 00 14 stw r9,20(r31) <== NOT EXECUTED ffc11a68: 40 be 00 10 bne+ cr7,ffc11a78 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); ffc11a6c: 80 7f 00 2c lwz r3,44(r31) <== NOT EXECUTED ffc11a70: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED ffc11a74: 48 00 24 c1 bl ffc13f34 <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); ffc11a78: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED ffc11a7c: 4b ff 81 31 bl ffc09bac <== NOT EXECUTED return 0; ffc11a80: 48 00 00 14 b ffc11a94 <== NOT EXECUTED ffc11a84: 3b a0 ff fc li r29,-4 <== NOT EXECUTED out_error: pipe_release(pipep, iop); ffc11a88: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc11a8c: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED ffc11a90: 4b ff fb 29 bl ffc115b8 <== NOT EXECUTED return err; } ffc11a94: 80 01 00 34 lwz r0,52(r1) ffc11a98: 7f a3 eb 78 mr r3,r29 ffc11a9c: 83 41 00 18 lwz r26,24(r1) ffc11aa0: 7c 08 03 a6 mtlr r0 ffc11aa4: 83 61 00 1c lwz r27,28(r1) ffc11aa8: 83 81 00 20 lwz r28,32(r1) ffc11aac: 83 a1 00 24 lwz r29,36(r1) ffc11ab0: 83 c1 00 28 lwz r30,40(r1) ffc11ab4: 83 e1 00 2c lwz r31,44(r1) ffc11ab8: 38 21 00 30 addi r1,r1,48 ffc11abc: 4e 80 00 20 blr =============================================================================== ffc0c020 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; ffc0c020: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0c024: 3d 60 00 00 lis r11,0 <== NOT EXECUTED ffc0c028: 81 29 34 40 lwz r9,13376(r9) <== NOT EXECUTED ffc0c02c: 38 0b 34 44 addi r0,r11,13380 <== NOT EXECUTED ffc0c030: 48 00 00 20 b ffc0c050 <== 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 ) { ffc0c034: 81 49 00 18 lwz r10,24(r9) <== NOT EXECUTED ffc0c038: 81 64 00 10 lwz r11,16(r4) <== NOT EXECUTED ffc0c03c: 7f 8a 58 00 cmpw cr7,r10,r11 <== NOT EXECUTED ffc0c040: 40 be 00 0c bne+ cr7,ffc0c04c <== NOT EXECUTED ffc0c044: 38 60 00 01 li r3,1 <== NOT EXECUTED ffc0c048: 4e 80 00 20 blr <== 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 ) { ffc0c04c: 81 29 00 00 lwz r9,0(r9) <== NOT EXECUTED ffc0c050: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc0c054: 40 9e ff e0 bne+ cr7,ffc0c034 <== NOT EXECUTED ffc0c058: 38 60 00 00 li r3,0 <== NOT EXECUTED return true; } } return false; } ffc0c05c: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc058c4 : long fpathconf( int fd, int name ) { ffc058c4: 7c 08 02 a6 mflr r0 ffc058c8: 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); ffc058cc: 3d 20 00 00 lis r9,0 long fpathconf( int fd, int name ) { ffc058d0: 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); ffc058d4: 80 09 26 8c lwz r0,9868(r9) ffc058d8: 7f 83 00 40 cmplw cr7,r3,r0 ffc058dc: 40 9c 00 20 bge- cr7,ffc058fc iop = rtems_libio_iop(fd); ffc058e0: 3d 20 00 00 lis r9,0 ffc058e4: 80 09 27 50 lwz r0,10064(r9) ffc058e8: 1c 63 00 48 mulli r3,r3,72 ffc058ec: 7c 60 1a 14 add r3,r0,r3 rtems_libio_check_is_open(iop); ffc058f0: 80 03 00 18 lwz r0,24(r3) ffc058f4: 70 09 01 00 andi. r9,r0,256 ffc058f8: 40 a2 00 10 bne+ ffc05908 <== ALWAYS TAKEN ffc058fc: 48 00 f4 f1 bl ffc14dec <__errno> ffc05900: 38 00 00 09 li r0,9 ffc05904: 48 00 00 9c b ffc059a0 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); ffc05908: 70 09 00 02 andi. r9,r0,2 ffc0590c: 41 82 00 8c beq- ffc05998 <== NEVER TAKEN * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { ffc05910: 2b 84 00 0b cmplwi cr7,r4,11 /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; ffc05914: 81 23 00 2c lwz r9,44(r3) switch ( name ) { ffc05918: 41 9d 00 80 bgt- cr7,ffc05998 ffc0591c: 3d 60 ff c2 lis r11,-62 ffc05920: 39 6b 26 ec addi r11,r11,9964 ffc05924: 54 84 10 3a rlwinm r4,r4,2,0,29 ffc05928: 7c 0b 20 2e lwzx r0,r11,r4 ffc0592c: 7d 60 5a 14 add r11,r0,r11 ffc05930: 7d 69 03 a6 mtctr r11 ffc05934: 4e 80 04 20 bctr case _PC_LINK_MAX: return_value = the_limits->link_max; ffc05938: 80 69 00 38 lwz r3,56(r9) break; ffc0593c: 48 00 00 6c b ffc059a8 case _PC_MAX_CANON: return_value = the_limits->max_canon; ffc05940: 80 69 00 3c lwz r3,60(r9) break; ffc05944: 48 00 00 64 b ffc059a8 case _PC_MAX_INPUT: return_value = the_limits->max_input; ffc05948: 80 69 00 40 lwz r3,64(r9) break; ffc0594c: 48 00 00 5c b ffc059a8 case _PC_NAME_MAX: return_value = the_limits->name_max; ffc05950: 80 69 00 44 lwz r3,68(r9) break; ffc05954: 48 00 00 54 b ffc059a8 case _PC_PATH_MAX: return_value = the_limits->path_max; ffc05958: 80 69 00 48 lwz r3,72(r9) break; ffc0595c: 48 00 00 4c b ffc059a8 case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; ffc05960: 80 69 00 4c lwz r3,76(r9) break; ffc05964: 48 00 00 44 b ffc059a8 case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; ffc05968: 80 69 00 54 lwz r3,84(r9) break; ffc0596c: 48 00 00 3c b ffc059a8 case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; ffc05970: 80 69 00 58 lwz r3,88(r9) break; ffc05974: 48 00 00 34 b ffc059a8 case _PC_VDISABLE: return_value = the_limits->posix_vdisable; ffc05978: 80 69 00 64 lwz r3,100(r9) break; ffc0597c: 48 00 00 2c b ffc059a8 case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; ffc05980: 80 69 00 50 lwz r3,80(r9) break; ffc05984: 48 00 00 24 b ffc059a8 case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; ffc05988: 80 69 00 5c lwz r3,92(r9) break; ffc0598c: 48 00 00 1c b ffc059a8 case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; ffc05990: 80 69 00 60 lwz r3,96(r9) break; ffc05994: 48 00 00 14 b ffc059a8 default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc05998: 48 00 f4 55 bl ffc14dec <__errno> ffc0599c: 38 00 00 16 li r0,22 ffc059a0: 90 03 00 00 stw r0,0(r3) ffc059a4: 38 60 ff ff li r3,-1 break; } return return_value; } ffc059a8: 80 01 00 0c lwz r0,12(r1) ffc059ac: 38 21 00 08 addi r1,r1,8 ffc059b0: 7c 08 03 a6 mtlr r0 ffc059b4: 4e 80 00 20 blr =============================================================================== ffc05ab4 : void free( void *ptr ) { MSBUMP(free_calls, 1); ffc05ab4: 94 21 ff f0 stwu r1,-16(r1) ffc05ab8: 7c 08 02 a6 mflr r0 ffc05abc: 3d 20 00 00 lis r9,0 ffc05ac0: 90 01 00 14 stw r0,20(r1) ffc05ac4: 39 29 2b c0 addi r9,r9,11200 ffc05ac8: 93 e1 00 0c stw r31,12(r1) if ( !ptr ) ffc05acc: 7c 7f 1b 79 mr. r31,r3 void free( void *ptr ) { MSBUMP(free_calls, 1); ffc05ad0: 81 69 00 0c lwz r11,12(r9) ffc05ad4: 93 c1 00 08 stw r30,8(r1) ffc05ad8: 38 0b 00 01 addi r0,r11,1 ffc05adc: 90 09 00 0c stw r0,12(r9) if ( !ptr ) ffc05ae0: 41 82 00 84 beq- ffc05b64 /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && ffc05ae4: 3d 20 00 00 lis r9,0 ffc05ae8: 80 09 27 f4 lwz r0,10228(r9) ffc05aec: 2f 80 00 03 cmpwi cr7,r0,3 ffc05af0: 40 be 00 1c bne+ cr7,ffc05b0c <== NEVER TAKEN ffc05af4: 48 00 01 e9 bl ffc05cdc ffc05af8: 2f 83 00 00 cmpwi cr7,r3,0 ffc05afc: 40 be 00 10 bne+ cr7,ffc05b0c <== ALWAYS TAKEN !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); ffc05b00: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc05b04: 48 00 02 21 bl ffc05d24 <== NOT EXECUTED return; ffc05b08: 48 00 00 5c b ffc05b64 <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) ffc05b0c: 3d 20 00 00 lis r9,0 ffc05b10: 81 29 27 28 lwz r9,10024(r9) ffc05b14: 2f 89 00 00 cmpwi cr7,r9,0 ffc05b18: 41 9e 00 14 beq- cr7,ffc05b2c <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_free)(ptr); ffc05b1c: 80 09 00 08 lwz r0,8(r9) <== NOT EXECUTED ffc05b20: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc05b24: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc05b28: 4e 80 04 21 bctrl <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { ffc05b2c: 3f c0 00 00 lis r30,0 ffc05b30: 80 7e 26 bc lwz r3,9916(r30) ffc05b34: 7f e4 fb 78 mr r4,r31 ffc05b38: 48 00 61 bd bl ffc0bcf4 <_Protected_heap_Free> ffc05b3c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05b40: 40 be 00 24 bne+ cr7,ffc05b64 <== ALWAYS TAKEN printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, ffc05b44: 81 3e 26 bc lwz r9,9916(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", ffc05b48: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc05b4c: 38 63 48 5b addi r3,r3,18523 <== NOT EXECUTED ffc05b50: 80 c9 00 1c lwz r6,28(r9) <== NOT EXECUTED ffc05b54: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc05b58: 80 a9 00 18 lwz r5,24(r9) <== NOT EXECUTED ffc05b5c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc05b60: 48 00 0f bd bl ffc06b1c <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } ffc05b64: 80 01 00 14 lwz r0,20(r1) ffc05b68: 83 c1 00 08 lwz r30,8(r1) ffc05b6c: 7c 08 03 a6 mtlr r0 ffc05b70: 83 e1 00 0c lwz r31,12(r1) ffc05b74: 38 21 00 10 addi r1,r1,16 ffc05b78: 4e 80 00 20 blr =============================================================================== ffc05f2c : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { ffc05f2c: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc05f30: 7c 08 02 a6 mflr r0 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env ffc05f34: 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) { ffc05f38: 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 ffc05f3c: 38 09 2b 1c addi r0,r9,11036 <== NOT EXECUTED ffc05f40: 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) { ffc05f44: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED ffc05f48: 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 ffc05f4c: 41 9e 00 54 beq- cr7,ffc05fa0 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); ffc05f50: 81 23 00 10 lwz r9,16(r3) <== NOT EXECUTED ffc05f54: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc05f58: 41 9e 00 1c beq- cr7,ffc05f74 <== NOT EXECUTED ffc05f5c: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc05f60: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc05f64: 41 9e 00 10 beq- cr7,ffc05f74 <== NOT EXECUTED ffc05f68: 38 63 00 04 addi r3,r3,4 <== NOT EXECUTED ffc05f6c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc05f70: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); ffc05f74: 81 3f 00 24 lwz r9,36(r31) <== NOT EXECUTED ffc05f78: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc05f7c: 41 9e 00 1c beq- cr7,ffc05f98 <== NOT EXECUTED ffc05f80: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc05f84: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc05f88: 41 9e 00 10 beq- cr7,ffc05f98 <== NOT EXECUTED ffc05f8c: 38 7f 00 18 addi r3,r31,24 <== NOT EXECUTED ffc05f90: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc05f94: 4e 80 04 21 bctrl <== NOT EXECUTED free(env); ffc05f98: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc05f9c: 4b ff eb 65 bl ffc04b00 <== NOT EXECUTED } } ffc05fa0: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc05fa4: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc05fa8: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc05fac: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05fb0: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc23360 : int fstat( int fd, struct stat *sbuf ) { ffc23360: 94 21 ff f0 stwu r1,-16(r1) ffc23364: 7c 08 02 a6 mflr r0 ffc23368: 93 c1 00 08 stw r30,8(r1) /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) ffc2336c: 7c 9e 23 79 mr. r30,r4 int fstat( int fd, struct stat *sbuf ) { ffc23370: 90 01 00 14 stw r0,20(r1) ffc23374: 93 e1 00 0c stw r31,12(r1) /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) ffc23378: 40 a2 00 10 bne+ ffc23388 rtems_set_errno_and_return_minus_one( EFAULT ); ffc2337c: 4b ff 4c f1 bl ffc1806c <__errno> ffc23380: 38 00 00 0e li r0,14 ffc23384: 48 00 00 38 b ffc233bc /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); ffc23388: 3d 20 00 00 lis r9,0 ffc2338c: 80 09 26 ac lwz r0,9900(r9) ffc23390: 7f 83 00 40 cmplw cr7,r3,r0 ffc23394: 40 9c 00 20 bge- cr7,ffc233b4 ffc23398: 3d 20 00 00 lis r9,0 ffc2339c: 83 e9 27 6c lwz r31,10092(r9) ffc233a0: 1c 63 00 48 mulli r3,r3,72 ffc233a4: 7f ff 1a 14 add r31,r31,r3 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); ffc233a8: 80 1f 00 18 lwz r0,24(r31) ffc233ac: 70 09 01 00 andi. r9,r0,256 ffc233b0: 40 a2 00 18 bne+ ffc233c8 <== ALWAYS TAKEN /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); ffc233b4: 4b ff 4c b9 bl ffc1806c <__errno> ffc233b8: 38 00 00 09 li r0,9 ffc233bc: 90 03 00 00 stw r0,0(r3) ffc233c0: 38 60 ff ff li r3,-1 ffc233c4: 48 00 00 50 b ffc23414 rtems_libio_check_is_open(iop); if ( !iop->handlers ) ffc233c8: 81 3f 00 40 lwz r9,64(r31) ffc233cc: 2f 89 00 00 cmpwi cr7,r9,0 ffc233d0: 41 be ff e4 beq- cr7,ffc233b4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) ffc233d4: 80 09 00 18 lwz r0,24(r9) ffc233d8: 2f 80 00 00 cmpwi cr7,r0,0 ffc233dc: 40 be 00 10 bne+ cr7,ffc233ec <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc233e0: 4b ff 4c 8d bl ffc1806c <__errno> <== NOT EXECUTED ffc233e4: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc233e8: 4b ff ff d4 b ffc233bc <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); ffc233ec: 38 80 00 00 li r4,0 ffc233f0: 38 a0 00 48 li r5,72 ffc233f4: 7f c3 f3 78 mr r3,r30 ffc233f8: 4b ff 59 5d bl ffc18d54 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); ffc233fc: 81 3f 00 40 lwz r9,64(r31) ffc23400: 38 7f 00 1c addi r3,r31,28 ffc23404: 80 09 00 18 lwz r0,24(r9) ffc23408: 7f c4 f3 78 mr r4,r30 ffc2340c: 7c 09 03 a6 mtctr r0 ffc23410: 4e 80 04 21 bctrl } ffc23414: 80 01 00 14 lwz r0,20(r1) ffc23418: 83 c1 00 08 lwz r30,8(r1) ffc2341c: 7c 08 03 a6 mtlr r0 ffc23420: 83 e1 00 0c lwz r31,12(r1) ffc23424: 38 21 00 10 addi r1,r1,16 ffc23428: 4e 80 00 20 blr =============================================================================== ffc05b58 : #include int fsync( int fd ) { ffc05b58: 7c 08 02 a6 mflr r0 ffc05b5c: 94 21 ff f8 stwu r1,-8(r1) rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc05b60: 3d 20 00 00 lis r9,0 #include int fsync( int fd ) { ffc05b64: 90 01 00 0c stw r0,12(r1) rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc05b68: 80 09 26 8c lwz r0,9868(r9) ffc05b6c: 7f 83 00 40 cmplw cr7,r3,r0 ffc05b70: 40 9c 00 40 bge- cr7,ffc05bb0 <== NEVER TAKEN iop = rtems_libio_iop( fd ); ffc05b74: 3d 20 00 00 lis r9,0 ffc05b78: 80 09 27 50 lwz r0,10064(r9) ffc05b7c: 1c 63 00 48 mulli r3,r3,72 ffc05b80: 7c 60 1a 14 add r3,r0,r3 rtems_libio_check_is_open(iop); ffc05b84: 80 03 00 18 lwz r0,24(r3) ffc05b88: 70 09 01 00 andi. r9,r0,256 ffc05b8c: 41 82 00 24 beq- ffc05bb0 <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); ffc05b90: 70 09 00 04 andi. r9,r0,4 ffc05b94: 40 a2 00 10 bne+ ffc05ba4 ffc05b98: 48 00 f2 55 bl ffc14dec <__errno> ffc05b9c: 38 00 00 16 li r0,22 ffc05ba0: 48 00 00 30 b ffc05bd0 /* * Now process the fsync(). */ if ( !iop->handlers ) ffc05ba4: 81 23 00 40 lwz r9,64(r3) ffc05ba8: 2f 89 00 00 cmpwi cr7,r9,0 ffc05bac: 40 be 00 10 bne+ cr7,ffc05bbc <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); ffc05bb0: 48 00 f2 3d bl ffc14dec <__errno> <== NOT EXECUTED ffc05bb4: 38 00 00 09 li r0,9 <== NOT EXECUTED ffc05bb8: 48 00 00 18 b ffc05bd0 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) ffc05bbc: 80 09 00 28 lwz r0,40(r9) ffc05bc0: 2f 80 00 00 cmpwi cr7,r0,0 ffc05bc4: 40 be 00 18 bne+ cr7,ffc05bdc rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc05bc8: 48 00 f2 25 bl ffc14dec <__errno> ffc05bcc: 38 00 00 86 li r0,134 ffc05bd0: 90 03 00 00 stw r0,0(r3) ffc05bd4: 38 60 ff ff li r3,-1 ffc05bd8: 48 00 00 0c b ffc05be4 return (*iop->handlers->fsync_h)( iop ); ffc05bdc: 7c 09 03 a6 mtctr r0 ffc05be0: 4e 80 04 21 bctrl } ffc05be4: 80 01 00 0c lwz r0,12(r1) ffc05be8: 38 21 00 08 addi r1,r1,8 ffc05bec: 7c 08 03 a6 mtlr r0 ffc05bf0: 4e 80 00 20 blr =============================================================================== ffc12f40 : int ftruncate( int fd, off_t length ) { ffc12f40: 94 21 ff c8 stwu r1,-56(r1) ffc12f44: 7c 08 02 a6 mflr r0 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); ffc12f48: 3d 20 00 00 lis r9,0 int ftruncate( int fd, off_t length ) { ffc12f4c: 90 01 00 3c stw r0,60(r1) rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); ffc12f50: 80 09 26 ac lwz r0,9900(r9) int ftruncate( int fd, off_t length ) { ffc12f54: 93 a1 00 2c stw r29,44(r1) ffc12f58: 7c bd 2b 78 mr r29,r5 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); ffc12f5c: 7f 83 00 40 cmplw cr7,r3,r0 int ftruncate( int fd, off_t length ) { ffc12f60: 93 c1 00 30 stw r30,48(r1) ffc12f64: 7c de 33 78 mr r30,r6 ffc12f68: 93 e1 00 34 stw r31,52(r1) rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); ffc12f6c: 40 9c 00 20 bge- cr7,ffc12f8c <== NEVER TAKEN iop = rtems_libio_iop( fd ); ffc12f70: 3d 20 00 00 lis r9,0 ffc12f74: 83 e9 27 6c lwz r31,10092(r9) ffc12f78: 1c 63 00 48 mulli r3,r3,72 ffc12f7c: 7f ff 1a 14 add r31,r31,r3 rtems_libio_check_is_open(iop); ffc12f80: 80 1f 00 18 lwz r0,24(r31) ffc12f84: 70 09 01 00 andi. r9,r0,256 ffc12f88: 40 a2 00 10 bne+ ffc12f98 <== ALWAYS TAKEN ffc12f8c: 48 00 50 e1 bl ffc1806c <__errno> <== NOT EXECUTED ffc12f90: 38 00 00 09 li r0,9 <== NOT EXECUTED ffc12f94: 48 00 00 88 b ffc1301c <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; ffc12f98: 81 3f 00 28 lwz r9,40(r31) ffc12f9c: 81 1f 00 1c lwz r8,28(r31) if ( !loc.ops->node_type_h ) ffc12fa0: 80 09 00 10 lwz r0,16(r9) /* * Make sure we are not working on a directory */ loc = iop->pathinfo; ffc12fa4: 81 5f 00 20 lwz r10,32(r31) ffc12fa8: 81 7f 00 24 lwz r11,36(r31) if ( !loc.ops->node_type_h ) ffc12fac: 2f 80 00 00 cmpwi cr7,r0,0 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; ffc12fb0: 91 01 00 08 stw r8,8(r1) ffc12fb4: 91 41 00 0c stw r10,12(r1) ffc12fb8: 91 61 00 10 stw r11,16(r1) ffc12fbc: 91 21 00 14 stw r9,20(r1) ffc12fc0: 81 3f 00 2c lwz r9,44(r31) ffc12fc4: 91 21 00 18 stw r9,24(r1) if ( !loc.ops->node_type_h ) ffc12fc8: 41 9e 00 4c beq- cr7,ffc13014 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) ffc12fcc: 38 61 00 08 addi r3,r1,8 ffc12fd0: 7c 09 03 a6 mtctr r0 ffc12fd4: 4e 80 04 21 bctrl ffc12fd8: 2f 83 00 01 cmpwi cr7,r3,1 ffc12fdc: 40 be 00 10 bne+ cr7,ffc12fec rtems_set_errno_and_return_minus_one( EISDIR ); ffc12fe0: 48 00 50 8d bl ffc1806c <__errno> ffc12fe4: 38 00 00 15 li r0,21 ffc12fe8: 48 00 00 34 b ffc1301c rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); ffc12fec: 80 1f 00 18 lwz r0,24(r31) ffc12ff0: 70 09 00 04 andi. r9,r0,4 ffc12ff4: 40 a2 00 10 bne+ ffc13004 <== ALWAYS TAKEN ffc12ff8: 48 00 50 75 bl ffc1806c <__errno> <== NOT EXECUTED ffc12ffc: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc13000: 48 00 00 1c b ffc1301c <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) ffc13004: 81 3f 00 40 lwz r9,64(r31) ffc13008: 80 09 00 20 lwz r0,32(r9) ffc1300c: 2f 80 00 00 cmpwi cr7,r0,0 ffc13010: 40 be 00 18 bne+ cr7,ffc13028 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc13014: 48 00 50 59 bl ffc1806c <__errno> <== NOT EXECUTED ffc13018: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc1301c: 90 03 00 00 stw r0,0(r3) ffc13020: 38 60 ff ff li r3,-1 ffc13024: 48 00 00 18 b ffc1303c return (*iop->handlers->ftruncate_h)( iop, length ); ffc13028: 7f e3 fb 78 mr r3,r31 ffc1302c: 7c 09 03 a6 mtctr r0 ffc13030: 7f a5 eb 78 mr r5,r29 ffc13034: 7f c6 f3 78 mr r6,r30 ffc13038: 4e 80 04 21 bctrl } ffc1303c: 80 01 00 3c lwz r0,60(r1) ffc13040: 83 a1 00 2c lwz r29,44(r1) ffc13044: 7c 08 03 a6 mtlr r0 ffc13048: 83 c1 00 30 lwz r30,48(r1) ffc1304c: 83 e1 00 34 lwz r31,52(r1) ffc13050: 38 21 00 38 addi r1,r1,56 ffc13054: 4e 80 00 20 blr =============================================================================== ffc20e24 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc20e24: 94 21 ff c8 stwu r1,-56(r1) ffc20e28: 7c 08 02 a6 mflr r0 /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); ffc20e2c: 3d 20 00 00 lis r9,0 int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc20e30: 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 ); ffc20e34: 80 09 27 0c lwz r0,9996(r9) int getdents( int dd_fd, char *dd_buf, int dd_len ) { ffc20e38: 93 e1 00 34 stw r31,52(r1) /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); ffc20e3c: 3b e0 00 00 li r31,0 ffc20e40: 7f 83 00 40 cmplw cr7,r3,r0 ffc20e44: 40 9c 00 14 bge- cr7,ffc20e58 <== NEVER TAKEN ffc20e48: 3d 60 00 00 lis r11,0 ffc20e4c: 1d 23 00 48 mulli r9,r3,72 ffc20e50: 83 eb 27 dc lwz r31,10204(r11) ffc20e54: 7f ff 4a 14 add r31,r31,r9 /* * Make sure we are working on a directory */ loc = iop->pathinfo; ffc20e58: 81 3f 00 28 lwz r9,40(r31) ffc20e5c: 81 1f 00 1c lwz r8,28(r31) if ( !loc.ops->node_type_h ) ffc20e60: 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; ffc20e64: 81 5f 00 20 lwz r10,32(r31) ffc20e68: 81 7f 00 24 lwz r11,36(r31) if ( !loc.ops->node_type_h ) ffc20e6c: 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; ffc20e70: 91 01 00 08 stw r8,8(r1) ffc20e74: 91 41 00 0c stw r10,12(r1) ffc20e78: 91 61 00 10 stw r11,16(r1) ffc20e7c: 91 21 00 14 stw r9,20(r1) ffc20e80: 81 3f 00 2c lwz r9,44(r31) ffc20e84: 91 21 00 18 stw r9,24(r1) if ( !loc.ops->node_type_h ) ffc20e88: 41 9e 00 4c beq- cr7,ffc20ed4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) ffc20e8c: 90 81 00 28 stw r4,40(r1) ffc20e90: 38 61 00 08 addi r3,r1,8 ffc20e94: 7c 09 03 a6 mtctr r0 ffc20e98: 90 a1 00 2c stw r5,44(r1) ffc20e9c: 4e 80 04 21 bctrl ffc20ea0: 80 81 00 28 lwz r4,40(r1) ffc20ea4: 2f 83 00 01 cmpwi cr7,r3,1 ffc20ea8: 80 a1 00 2c lwz r5,44(r1) ffc20eac: 41 be 00 18 beq+ cr7,ffc20ec4 rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc20eb0: 4b ff 3d 3d bl ffc14bec <__errno> ffc20eb4: 38 00 00 14 li r0,20 ffc20eb8: 90 03 00 00 stw r0,0(r3) ffc20ebc: 38 60 ff ff li r3,-1 ffc20ec0: 48 00 00 2c b ffc20eec /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) ffc20ec4: 81 3f 00 40 lwz r9,64(r31) ffc20ec8: 80 09 00 08 lwz r0,8(r9) ffc20ecc: 2f 80 00 00 cmpwi cr7,r0,0 ffc20ed0: 40 be 00 10 bne+ cr7,ffc20ee0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc20ed4: 4b ff 3d 19 bl ffc14bec <__errno> <== NOT EXECUTED ffc20ed8: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc20edc: 4b ff ff dc b ffc20eb8 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); ffc20ee0: 7f e3 fb 78 mr r3,r31 ffc20ee4: 7c 09 03 a6 mtctr r0 ffc20ee8: 4e 80 04 21 bctrl } ffc20eec: 80 01 00 3c lwz r0,60(r1) ffc20ef0: 83 e1 00 34 lwz r31,52(r1) ffc20ef4: 38 21 00 38 addi r1,r1,56 ffc20ef8: 7c 08 03 a6 mtlr r0 ffc20efc: 4e 80 00 20 blr =============================================================================== ffc05364 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { ffc05364: 94 21 ff d8 stwu r1,-40(r1) ffc05368: 7d 80 00 26 mfcr r12 ffc0536c: 7c 08 02 a6 mflr r0 ffc05370: 93 21 00 0c stw r25,12(r1) ffc05374: 7d 19 43 78 mr r25,r8 ffc05378: 90 01 00 2c stw r0,44(r1) ffc0537c: 93 41 00 10 stw r26,16(r1) ffc05380: 93 61 00 14 stw r27,20(r1) ffc05384: 7c fb 3b 78 mr r27,r7 ffc05388: 93 81 00 18 stw r28,24(r1) ffc0538c: 7c dc 33 78 mr r28,r6 ffc05390: 93 a1 00 1c stw r29,28(r1) ffc05394: 7c 9d 23 78 mr r29,r4 ffc05398: 93 c1 00 20 stw r30,32(r1) ffc0539c: 7c 7e 1b 78 mr r30,r3 ffc053a0: 93 e1 00 24 stw r31,36(r1) ffc053a4: 7c bf 2b 78 mr r31,r5 ffc053a8: 91 81 00 08 stw r12,8(r1) FILE *fp; int match; init_etc_passwd_group(); ffc053ac: 4b ff fe 79 bl ffc05224 if ((fp = fopen("/etc/group", "r")) == NULL) { ffc053b0: 3c 60 ff c2 lis r3,-62 ffc053b4: 3c 80 ff c2 lis r4,-62 ffc053b8: 38 63 1d c7 addi r3,r3,7623 ffc053bc: 38 84 15 f4 addi r4,r4,5620 ffc053c0: 48 00 fc 09 bl ffc14fc8 ffc053c4: 7c 7a 1b 79 mr. r26,r3 ffc053c8: 40 a2 00 14 bne+ ffc053dc <== ALWAYS TAKEN errno = EINVAL; ffc053cc: 48 00 f1 21 bl ffc144ec <__errno> <== NOT EXECUTED ffc053d0: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc053d4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc053d8: 48 00 00 3c b ffc05414 <== NOT EXECUTED if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; fclose(fp); return -1; } if (name) { ffc053dc: 2e 1e 00 00 cmpwi cr4,r30,0 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { ffc053e0: 7f e4 fb 78 mr r4,r31 ffc053e4: 7f 85 e3 78 mr r5,r28 ffc053e8: 7f 66 db 78 mr r6,r27 ffc053ec: 7f 43 d3 78 mr r3,r26 ffc053f0: 4b ff fa b9 bl ffc04ea8 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); ffc053f4: 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)) { ffc053f8: 2f 83 00 00 cmpwi cr7,r3,0 ffc053fc: 40 be 00 20 bne+ cr7,ffc0541c <== ALWAYS TAKEN errno = EINVAL; ffc05400: 48 00 f0 ed bl ffc144ec <__errno> <== NOT EXECUTED ffc05404: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc05408: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED fclose(fp); ffc0540c: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED ffc05410: 48 00 f2 7d bl ffc1468c <== NOT EXECUTED ffc05414: 38 60 ff ff li r3,-1 <== NOT EXECUTED return -1; ffc05418: 48 00 00 3c b ffc05454 <== NOT EXECUTED } if (name) { ffc0541c: 41 92 00 10 beq- cr4,ffc0542c <== NEVER TAKEN match = (strcmp(grp->gr_name, name) == 0); ffc05420: 80 7f 00 00 lwz r3,0(r31) ffc05424: 48 01 16 31 bl ffc16a54 ffc05428: 48 00 00 0c b ffc05434 } else { match = (grp->gr_gid == gid); ffc0542c: a0 7f 00 08 lhz r3,8(r31) <== NOT EXECUTED ffc05430: 7c 63 ea 78 xor r3,r3,r29 <== NOT EXECUTED ffc05434: 7c 63 00 34 cntlzw r3,r3 ffc05438: 54 63 d9 7e rlwinm r3,r3,27,5,31 } if (match) { ffc0543c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05440: 41 9e ff a0 beq+ cr7,ffc053e0 fclose(fp); ffc05444: 7f 43 d3 78 mr r3,r26 ffc05448: 48 00 f2 45 bl ffc1468c *result = grp; ffc0544c: 93 f9 00 00 stw r31,0(r25) ffc05450: 38 60 00 00 li r3,0 } } fclose(fp); errno = EINVAL; return -1; } ffc05454: 80 01 00 2c lwz r0,44(r1) ffc05458: 81 81 00 08 lwz r12,8(r1) ffc0545c: 7c 08 03 a6 mtlr r0 ffc05460: 83 21 00 0c lwz r25,12(r1) ffc05464: 83 41 00 10 lwz r26,16(r1) ffc05468: 7d 80 81 20 mtcrf 8,r12 ffc0546c: 83 61 00 14 lwz r27,20(r1) ffc05470: 83 81 00 18 lwz r28,24(r1) ffc05474: 83 a1 00 1c lwz r29,28(r1) ffc05478: 83 c1 00 20 lwz r30,32(r1) ffc0547c: 83 e1 00 24 lwz r31,36(r1) ffc05480: 38 21 00 28 addi r1,r1,40 ffc05484: 4e 80 00 20 blr =============================================================================== ffc0501c : return p; } struct group *getgrent(void) { if (group_fp == NULL) ffc0501c: 3c a0 00 00 lis r5,0 <== NOT EXECUTED return NULL; return p; } struct group *getgrent(void) { ffc05020: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc05024: 7c 08 02 a6 mflr r0 <== NOT EXECUTED if (group_fp == NULL) ffc05028: 80 65 28 8c lwz r3,10380(r5) <== NOT EXECUTED ffc0502c: 38 a5 28 8c addi r5,r5,10380 <== NOT EXECUTED return NULL; return p; } struct group *getgrent(void) { ffc05030: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED if (group_fp == NULL) ffc05034: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED return NULL; return p; } struct group *getgrent(void) { ffc05038: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED if (group_fp == NULL) ffc0503c: 41 be 00 24 beq+ cr7,ffc05060 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) ffc05040: 3b e5 00 08 addi r31,r5,8 <== NOT EXECUTED ffc05044: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc05048: 38 a5 00 18 addi r5,r5,24 <== NOT EXECUTED ffc0504c: 38 c0 00 c8 li r6,200 <== NOT EXECUTED ffc05050: 4b ff fe 59 bl ffc04ea8 <== NOT EXECUTED ffc05054: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc05058: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0505c: 40 be 00 08 bne+ cr7,ffc05064 <== NOT EXECUTED ffc05060: 38 60 00 00 li r3,0 <== NOT EXECUTED return NULL; return &grent; } ffc05064: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc05068: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc0506c: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc05070: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05074: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc054b0 : } struct group *getgrgid( gid_t gid ) { ffc054b0: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) ffc054b4: 3c 80 00 00 lis r4,0 <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { ffc054b8: 7c 08 02 a6 mflr r0 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) ffc054bc: 38 84 28 8c addi r4,r4,10380 <== NOT EXECUTED ffc054c0: 38 a4 00 18 addi r5,r4,24 <== NOT EXECUTED ffc054c4: 38 c0 00 c8 li r6,200 <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { ffc054c8: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) ffc054cc: 38 84 00 08 addi r4,r4,8 <== NOT EXECUTED ffc054d0: 38 e1 00 08 addi r7,r1,8 <== NOT EXECUTED ffc054d4: 4b ff ff b5 bl ffc05488 <== NOT EXECUTED ffc054d8: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc054dc: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc054e0: 40 9e 00 08 bne- cr7,ffc054e8 <== NOT EXECUTED return NULL; return p; ffc054e4: 80 61 00 08 lwz r3,8(r1) <== NOT EXECUTED } ffc054e8: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc054ec: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc054f0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc054f4: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc05488 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { ffc05488: 7c 8b 23 78 mr r11,r4 <== NOT EXECUTED ffc0548c: 7c a9 2b 78 mr r9,r5 <== NOT EXECUTED ffc05490: 7c c0 33 78 mr r0,r6 <== NOT EXECUTED ffc05494: 7c e8 3b 78 mr r8,r7 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); ffc05498: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED ffc0549c: 7d 65 5b 78 mr r5,r11 <== NOT EXECUTED ffc054a0: 7d 26 4b 78 mr r6,r9 <== NOT EXECUTED ffc054a4: 7c 07 03 78 mr r7,r0 <== NOT EXECUTED ffc054a8: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc054ac: 4b ff fe b8 b ffc05364 <== NOT EXECUTED =============================================================================== ffc05518 : } struct group *getgrnam( const char *name ) { ffc05518: 94 21 ff e8 stwu r1,-24(r1) struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) ffc0551c: 3c 80 00 00 lis r4,0 } struct group *getgrnam( const char *name ) { ffc05520: 7c 08 02 a6 mflr r0 struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) ffc05524: 38 84 28 8c addi r4,r4,10380 ffc05528: 38 a4 00 18 addi r5,r4,24 ffc0552c: 38 c0 00 c8 li r6,200 } struct group *getgrnam( const char *name ) { ffc05530: 90 01 00 1c stw r0,28(r1) struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) ffc05534: 38 84 00 08 addi r4,r4,8 ffc05538: 38 e1 00 08 addi r7,r1,8 ffc0553c: 4b ff ff bd bl ffc054f8 ffc05540: 2f 83 00 00 cmpwi cr7,r3,0 ffc05544: 38 60 00 00 li r3,0 ffc05548: 40 9e 00 08 bne- cr7,ffc05550 <== NEVER TAKEN return NULL; return p; ffc0554c: 80 61 00 08 lwz r3,8(r1) } ffc05550: 80 01 00 1c lwz r0,28(r1) ffc05554: 38 21 00 18 addi r1,r1,24 ffc05558: 7c 08 03 a6 mtlr r0 ffc0555c: 4e 80 00 20 blr =============================================================================== ffc055b0 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { ffc055b0: 94 21 ff d8 stwu r1,-40(r1) ffc055b4: 7d 80 00 26 mfcr r12 ffc055b8: 7c 08 02 a6 mflr r0 ffc055bc: 93 21 00 0c stw r25,12(r1) ffc055c0: 7d 19 43 78 mr r25,r8 ffc055c4: 90 01 00 2c stw r0,44(r1) ffc055c8: 93 41 00 10 stw r26,16(r1) ffc055cc: 93 61 00 14 stw r27,20(r1) ffc055d0: 7c fb 3b 78 mr r27,r7 ffc055d4: 93 81 00 18 stw r28,24(r1) ffc055d8: 7c dc 33 78 mr r28,r6 ffc055dc: 93 a1 00 1c stw r29,28(r1) ffc055e0: 7c 9d 23 78 mr r29,r4 ffc055e4: 93 c1 00 20 stw r30,32(r1) ffc055e8: 7c 7e 1b 78 mr r30,r3 ffc055ec: 93 e1 00 24 stw r31,36(r1) ffc055f0: 7c bf 2b 78 mr r31,r5 ffc055f4: 91 81 00 08 stw r12,8(r1) FILE *fp; int match; init_etc_passwd_group(); ffc055f8: 4b ff fc 2d bl ffc05224 if ((fp = fopen("/etc/passwd", "r")) == NULL) { ffc055fc: 3c 60 ff c2 lis r3,-62 ffc05600: 3c 80 ff c2 lis r4,-62 ffc05604: 38 63 1d 54 addi r3,r3,7508 ffc05608: 38 84 15 f4 addi r4,r4,5620 ffc0560c: 48 00 f9 bd bl ffc14fc8 ffc05610: 7c 7a 1b 79 mr. r26,r3 ffc05614: 40 a2 00 14 bne+ ffc05628 <== ALWAYS TAKEN errno = EINVAL; ffc05618: 48 00 ee d5 bl ffc144ec <__errno> <== NOT EXECUTED ffc0561c: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc05620: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc05624: 48 00 00 3c b ffc05660 <== NOT EXECUTED if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; fclose(fp); return -1; } if (name) { ffc05628: 2e 1e 00 00 cmpwi cr4,r30,0 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { ffc0562c: 7f e4 fb 78 mr r4,r31 ffc05630: 7f 85 e3 78 mr r5,r28 ffc05634: 7f 66 db 78 mr r6,r27 ffc05638: 7f 43 d3 78 mr r3,r26 ffc0563c: 4b ff fa 3d bl ffc05078 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); ffc05640: 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)) { ffc05644: 2f 83 00 00 cmpwi cr7,r3,0 ffc05648: 40 be 00 20 bne+ cr7,ffc05668 <== ALWAYS TAKEN errno = EINVAL; ffc0564c: 48 00 ee a1 bl ffc144ec <__errno> <== NOT EXECUTED ffc05650: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc05654: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED fclose(fp); ffc05658: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED ffc0565c: 48 00 f0 31 bl ffc1468c <== NOT EXECUTED ffc05660: 38 60 ff ff li r3,-1 <== NOT EXECUTED return -1; ffc05664: 48 00 00 3c b ffc056a0 <== NOT EXECUTED } if (name) { ffc05668: 41 92 00 10 beq- cr4,ffc05678 <== NEVER TAKEN match = (strcmp(pwd->pw_name, name) == 0); ffc0566c: 80 7f 00 00 lwz r3,0(r31) ffc05670: 48 01 13 e5 bl ffc16a54 ffc05674: 48 00 00 0c b ffc05680 } else { match = (pwd->pw_uid == uid); ffc05678: a0 7f 00 08 lhz r3,8(r31) <== NOT EXECUTED ffc0567c: 7c 63 ea 78 xor r3,r3,r29 <== NOT EXECUTED ffc05680: 7c 63 00 34 cntlzw r3,r3 ffc05684: 54 63 d9 7e rlwinm r3,r3,27,5,31 } if (match) { ffc05688: 2f 83 00 00 cmpwi cr7,r3,0 ffc0568c: 41 9e ff a0 beq+ cr7,ffc0562c fclose(fp); ffc05690: 7f 43 d3 78 mr r3,r26 ffc05694: 48 00 ef f9 bl ffc1468c *result = pwd; ffc05698: 93 f9 00 00 stw r31,0(r25) ffc0569c: 38 60 00 00 li r3,0 } } fclose(fp); errno = EINVAL; return -1; } ffc056a0: 80 01 00 2c lwz r0,44(r1) ffc056a4: 81 81 00 08 lwz r12,8(r1) ffc056a8: 7c 08 03 a6 mtlr r0 ffc056ac: 83 21 00 0c lwz r25,12(r1) ffc056b0: 83 41 00 10 lwz r26,16(r1) ffc056b4: 7d 80 81 20 mtcrf 8,r12 ffc056b8: 83 61 00 14 lwz r27,20(r1) ffc056bc: 83 81 00 18 lwz r28,24(r1) ffc056c0: 83 a1 00 1c lwz r29,28(r1) ffc056c4: 83 c1 00 20 lwz r30,32(r1) ffc056c8: 83 e1 00 24 lwz r31,36(r1) ffc056cc: 38 21 00 28 addi r1,r1,40 ffc056d0: 4e 80 00 20 blr =============================================================================== ffc051c8 : return NULL; return p; } struct passwd *getpwent(void) { ffc051c8: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc051cc: 7c 08 02 a6 mflr r0 <== NOT EXECUTED if (passwd_fp == NULL) ffc051d0: 3c a0 00 00 lis r5,0 <== NOT EXECUTED return NULL; return p; } struct passwd *getpwent(void) { ffc051d4: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED if (passwd_fp == NULL) ffc051d8: 38 a5 28 8c addi r5,r5,10380 <== NOT EXECUTED ffc051dc: 80 65 00 04 lwz r3,4(r5) <== NOT EXECUTED return NULL; return p; } struct passwd *getpwent(void) { ffc051e0: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED if (passwd_fp == NULL) ffc051e4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc051e8: 41 be 00 24 beq+ cr7,ffc0520c <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) ffc051ec: 3b e5 00 e0 addi r31,r5,224 <== NOT EXECUTED ffc051f0: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc051f4: 38 a5 00 fc addi r5,r5,252 <== NOT EXECUTED ffc051f8: 38 c0 00 c8 li r6,200 <== NOT EXECUTED ffc051fc: 4b ff fe 7d bl ffc05078 <== NOT EXECUTED ffc05200: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc05204: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc05208: 40 be 00 08 bne+ cr7,ffc05210 <== NOT EXECUTED ffc0520c: 38 60 00 00 li r3,0 <== NOT EXECUTED return NULL; return &pwent; } ffc05210: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc05214: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc05218: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc0521c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05220: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc05764 : } struct passwd *getpwnam( const char *name ) { ffc05764: 94 21 ff e8 stwu r1,-24(r1) struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) ffc05768: 3c 80 00 00 lis r4,0 } struct passwd *getpwnam( const char *name ) { ffc0576c: 7c 08 02 a6 mflr r0 struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) ffc05770: 38 84 28 8c addi r4,r4,10380 ffc05774: 38 a4 00 fc addi r5,r4,252 ffc05778: 38 c0 00 c8 li r6,200 } struct passwd *getpwnam( const char *name ) { ffc0577c: 90 01 00 1c stw r0,28(r1) struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) ffc05780: 38 84 00 e0 addi r4,r4,224 ffc05784: 38 e1 00 08 addi r7,r1,8 ffc05788: 4b ff ff bd bl ffc05744 ffc0578c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05790: 38 60 00 00 li r3,0 ffc05794: 40 9e 00 08 bne- cr7,ffc0579c <== NEVER TAKEN return NULL; return p; ffc05798: 80 61 00 08 lwz r3,8(r1) } ffc0579c: 80 01 00 1c lwz r0,28(r1) ffc057a0: 38 21 00 18 addi r1,r1,24 ffc057a4: 7c 08 03 a6 mtlr r0 ffc057a8: 4e 80 00 20 blr =============================================================================== ffc056fc : } struct passwd *getpwuid( uid_t uid ) { ffc056fc: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) ffc05700: 3c 80 00 00 lis r4,0 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { ffc05704: 7c 08 02 a6 mflr r0 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) ffc05708: 38 84 28 8c addi r4,r4,10380 <== NOT EXECUTED ffc0570c: 38 a4 00 fc addi r5,r4,252 <== NOT EXECUTED ffc05710: 38 c0 00 c8 li r6,200 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { ffc05714: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) ffc05718: 38 84 00 e0 addi r4,r4,224 <== NOT EXECUTED ffc0571c: 38 e1 00 08 addi r7,r1,8 <== NOT EXECUTED ffc05720: 4b ff ff b5 bl ffc056d4 <== NOT EXECUTED ffc05724: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc05728: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc0572c: 40 9e 00 08 bne- cr7,ffc05734 <== NOT EXECUTED return NULL; return p; ffc05730: 80 61 00 08 lwz r3,8(r1) <== NOT EXECUTED } ffc05734: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc05738: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc0573c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05740: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc056d4 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { ffc056d4: 7c 8b 23 78 mr r11,r4 <== NOT EXECUTED ffc056d8: 7c a9 2b 78 mr r9,r5 <== NOT EXECUTED ffc056dc: 7c c0 33 78 mr r0,r6 <== NOT EXECUTED ffc056e0: 7c e8 3b 78 mr r8,r7 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); ffc056e4: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED ffc056e8: 7d 65 5b 78 mr r5,r11 <== NOT EXECUTED ffc056ec: 7d 26 4b 78 mr r6,r9 <== NOT EXECUTED ffc056f0: 7c 07 03 78 mr r7,r0 <== NOT EXECUTED ffc056f4: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc056f8: 4b ff fe b8 b ffc055b0 <== NOT EXECUTED =============================================================================== ffc05b7c : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { ffc05b7c: 94 21 ff e0 stwu r1,-32(r1) ffc05b80: 7c 08 02 a6 mflr r0 ffc05b84: 93 e1 00 1c stw r31,28(r1) /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { ffc05b88: 7c 7f 1b 79 mr. r31,r3 */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { ffc05b8c: 90 01 00 24 stw r0,36(r1) ffc05b90: 93 c1 00 18 stw r30,24(r1) /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { ffc05b94: 40 a2 00 18 bne+ ffc05bac <== ALWAYS TAKEN errno = EFAULT; ffc05b98: 48 01 24 d5 bl ffc1806c <__errno> <== NOT EXECUTED ffc05b9c: 38 00 00 0e li r0,14 <== NOT EXECUTED ffc05ba0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc05ba4: 38 60 ff ff li r3,-1 <== NOT EXECUTED return -1; ffc05ba8: 48 00 00 3c b ffc05be4 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc05bac: 7f c0 00 a6 mfmsr r30 ffc05bb0: 7c 10 42 a6 mfsprg r0,0 ffc05bb4: 7f c0 00 78 andc r0,r30,r0 ffc05bb8: 7c 00 01 24 mtmsr r0 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); ffc05bbc: 38 61 00 08 addi r3,r1,8 ffc05bc0: 48 00 52 c9 bl ffc0ae88 <_TOD_Get> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc05bc4: 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; ffc05bc8: 81 21 00 0c lwz r9,12(r1) ffc05bcc: 38 00 03 e8 li r0,1000 ffc05bd0: 38 60 00 00 li r3,0 ffc05bd4: 7c 09 03 d6 divw r0,r9,r0 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; ffc05bd8: 81 21 00 08 lwz r9,8(r1) ffc05bdc: 91 3f 00 00 stw r9,0(r31) time->tv_usec = useconds; ffc05be0: 90 1f 00 04 stw r0,4(r31) * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } ffc05be4: 80 01 00 24 lwz r0,36(r1) ffc05be8: 83 c1 00 18 lwz r30,24(r1) ffc05bec: 7c 08 03 a6 mtlr r0 ffc05bf0: 83 e1 00 1c lwz r31,28(r1) ffc05bf4: 38 21 00 20 addi r1,r1,32 ffc05bf8: 4e 80 00 20 blr =============================================================================== ffc16c34 : ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; ffc16c34: 81 23 00 3c lwz r9,60(r3) ffc16c38: 38 00 ff ff li r0,-1 ffc16c3c: 81 29 00 4c lwz r9,76(r9) ffc16c40: 2f 89 00 01 cmpwi cr7,r9,1 ffc16c44: 40 be 00 18 bne+ cr7,ffc16c5c <== NEVER TAKEN if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; ffc16c48: 39 20 00 00 li r9,0 ffc16c4c: 39 40 00 00 li r10,0 ffc16c50: 91 23 00 10 stw r9,16(r3) ffc16c54: 38 00 00 00 li r0,0 ffc16c58: 91 43 00 14 stw r10,20(r3) return 0; } ffc16c5c: 7c 03 03 78 mr r3,r0 ffc16c60: 4e 80 00 20 blr =============================================================================== ffc16d9c : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { ffc16d9c: 94 21 ff d8 stwu r1,-40(r1) ffc16da0: 7c 08 02 a6 mflr r0 ffc16da4: 90 01 00 2c stw r0,44(r1) ffc16da8: 93 c1 00 20 stw r30,32(r1) ffc16dac: 7c 9e 23 78 mr r30,r4 ffc16db0: 93 e1 00 24 stw r31,36(r1) ffc16db4: 93 a1 00 1c stw r29,28(r1) IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; ffc16db8: 83 e4 00 00 lwz r31,0(r4) ffc16dbc: 81 3f 00 50 lwz r9,80(r31) ffc16dc0: 38 1f 00 54 addi r0,r31,84 ffc16dc4: 7f 89 00 00 cmpw cr7,r9,r0 ffc16dc8: 41 be 00 10 beq+ cr7,ffc16dd8 /* * 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 ); ffc16dcc: 48 00 12 a1 bl ffc1806c <__errno> ffc16dd0: 38 00 00 5a li r0,90 ffc16dd4: 48 00 00 28 b ffc16dfc /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) ffc16dd8: 81 24 00 10 lwz r9,16(r4) ffc16ddc: 80 09 00 1c lwz r0,28(r9) ffc16de0: 7f 80 f8 00 cmpw cr7,r0,r31 ffc16de4: 41 9e 00 10 beq- cr7,ffc16df4 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) ffc16de8: 83 bf 00 5c lwz r29,92(r31) ffc16dec: 2f 9d 00 00 cmpwi cr7,r29,0 ffc16df0: 41 be 00 18 beq+ cr7,ffc16e08 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); ffc16df4: 48 00 12 79 bl ffc1806c <__errno> ffc16df8: 38 00 00 10 li r0,16 ffc16dfc: 90 03 00 00 stw r0,0(r3) ffc16e00: 38 60 ff ff li r3,-1 ffc16e04: 48 00 00 80 b ffc16e84 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { ffc16e08: 80 1f 00 08 lwz r0,8(r31) ffc16e0c: 2f 80 00 00 cmpwi cr7,r0,0 ffc16e10: 41 9e 00 10 beq- cr7,ffc16e20 ffc16e14: 7f e3 fb 78 mr r3,r31 ffc16e18: 4b ff 3b 6d bl ffc0a984 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; ffc16e1c: 93 bf 00 08 stw r29,8(r31) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; ffc16e20: a1 3f 00 34 lhz r9,52(r31) IMFS_update_ctime( the_jnode ); ffc16e24: 38 80 00 00 li r4,0 ffc16e28: 38 61 00 08 addi r3,r1,8 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; ffc16e2c: 38 09 ff ff addi r0,r9,-1 ffc16e30: b0 1f 00 34 sth r0,52(r31) IMFS_update_ctime( the_jnode ); ffc16e34: 4b fe ed 49 bl ffc05b7c ffc16e38: 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) ) { ffc16e3c: 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 ); ffc16e40: 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) ) { ffc16e44: 4b ff c2 95 bl ffc130d8 ffc16e48: 2f 83 00 00 cmpwi cr7,r3,0 ffc16e4c: 40 9e 00 34 bne- cr7,ffc16e80 ffc16e50: a0 1f 00 34 lhz r0,52(r31) ffc16e54: 2f 80 00 00 cmpwi cr7,r0,0 ffc16e58: 40 9e 00 28 bne- cr7,ffc16e80 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) ffc16e5c: 3d 20 00 00 lis r9,0 ffc16e60: 81 7e 00 00 lwz r11,0(r30) ffc16e64: 81 29 26 f4 lwz r9,9972(r9) ffc16e68: 81 49 00 04 lwz r10,4(r9) ffc16e6c: 7f 8a 58 00 cmpw cr7,r10,r11 ffc16e70: 40 be 00 08 bne+ cr7,ffc16e78 <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; ffc16e74: 90 09 00 04 stw r0,4(r9) <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); ffc16e78: 7f e3 fb 78 mr r3,r31 ffc16e7c: 4b fe ec 39 bl ffc05ab4 ffc16e80: 38 60 00 00 li r3,0 } return 0; } ffc16e84: 80 01 00 2c lwz r0,44(r1) ffc16e88: 83 a1 00 1c lwz r29,28(r1) ffc16e8c: 7c 08 03 a6 mtlr r0 ffc16e90: 83 c1 00 20 lwz r30,32(r1) ffc16e94: 83 e1 00 24 lwz r31,36(r1) ffc16e98: 38 21 00 28 addi r1,r1,40 ffc16e9c: 4e 80 00 20 blr =============================================================================== ffc05224 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc05224: 94 21 ff f0 stwu r1,-16(r1) ffc05228: 7c 08 02 a6 mflr r0 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc0522c: 3d 20 00 00 lis r9,0 /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc05230: 90 01 00 14 stw r0,20(r1) FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc05234: 39 29 28 8c addi r9,r9,10380 /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { ffc05238: 93 e1 00 0c stw r31,12(r1) FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) ffc0523c: 88 09 01 c4 lbz r0,452(r9) ffc05240: 2f 80 00 00 cmpwi cr7,r0,0 ffc05244: 40 be 00 bc bne+ cr7,ffc05300 return; etc_passwd_initted = 1; ffc05248: 38 00 00 01 li r0,1 ffc0524c: 98 09 01 c4 stb r0,452(r9) mkdir("/etc", 0777); ffc05250: 3c 60 ff c2 lis r3,-62 ffc05254: 38 80 01 ff li r4,511 ffc05258: 38 63 1d 4f addi r3,r3,7503 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc0525c: 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); ffc05260: 48 00 09 a1 bl ffc05c00 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { ffc05264: 3b ff 1d 54 addi r31,r31,7508 ffc05268: 3c 80 ff c2 lis r4,-62 ffc0526c: 38 84 15 f4 addi r4,r4,5620 ffc05270: 7f e3 fb 78 mr r3,r31 ffc05274: 48 00 fd 55 bl ffc14fc8 ffc05278: 2f 83 00 00 cmpwi cr7,r3,0 ffc0527c: 40 be 00 30 bne+ cr7,ffc052ac <== NEVER TAKEN fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { ffc05280: 3c 80 ff c2 lis r4,-62 ffc05284: 7f e3 fb 78 mr r3,r31 ffc05288: 38 84 12 b2 addi r4,r4,4786 ffc0528c: 48 00 fd 3d bl ffc14fc8 ffc05290: 7c 7f 1b 79 mr. r31,r3 ffc05294: 41 82 00 1c beq- ffc052b0 <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" ffc05298: 3c 60 ff c2 lis r3,-62 ffc0529c: 38 63 1d 60 addi r3,r3,7520 ffc052a0: 7f e4 fb 78 mr r4,r31 ffc052a4: 48 00 fd e5 bl ffc15088 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); ffc052a8: 7f e3 fb 78 mr r3,r31 ffc052ac: 48 00 f3 e1 bl ffc1468c } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { ffc052b0: 3f e0 ff c2 lis r31,-62 ffc052b4: 3b ff 1d c7 addi r31,r31,7623 ffc052b8: 3c 80 ff c2 lis r4,-62 ffc052bc: 38 84 15 f4 addi r4,r4,5620 ffc052c0: 7f e3 fb 78 mr r3,r31 ffc052c4: 48 00 fd 05 bl ffc14fc8 ffc052c8: 2f 83 00 00 cmpwi cr7,r3,0 ffc052cc: 40 be 00 30 bne+ cr7,ffc052fc <== NEVER TAKEN fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { ffc052d0: 3c 80 ff c2 lis r4,-62 ffc052d4: 7f e3 fb 78 mr r3,r31 ffc052d8: 38 84 12 b2 addi r4,r4,4786 ffc052dc: 48 00 fc ed bl ffc14fc8 ffc052e0: 7c 7f 1b 79 mr. r31,r3 ffc052e4: 41 82 00 1c beq- ffc05300 <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" ffc052e8: 3c 60 ff c2 lis r3,-62 ffc052ec: 38 63 1d d2 addi r3,r3,7634 ffc052f0: 7f e4 fb 78 mr r4,r31 ffc052f4: 48 00 fd 95 bl ffc15088 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); ffc052f8: 7f e3 fb 78 mr r3,r31 ffc052fc: 48 00 f3 91 bl ffc1468c } } ffc05300: 80 01 00 14 lwz r0,20(r1) ffc05304: 83 e1 00 0c lwz r31,12(r1) ffc05308: 38 21 00 10 addi r1,r1,16 ffc0530c: 7c 08 03 a6 mtlr r0 ffc05310: 4e 80 00 20 blr =============================================================================== ffc0881c : int ioctl( int fd, ioctl_command_t command, ... ) { ffc0881c: 94 21 ff e0 stwu r1,-32(r1) ffc08820: 7c 08 02 a6 mflr r0 va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); ffc08824: 3d 20 00 00 lis r9,0 int ioctl( int fd, ioctl_command_t command, ... ) { ffc08828: 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 ); ffc0882c: 80 09 26 ac lwz r0,9900(r9) int ioctl( int fd, ioctl_command_t command, ... ) { ffc08830: 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 ); ffc08834: 7f 83 00 40 cmplw cr7,r3,r0 ffc08838: 40 9c 00 48 bge- cr7,ffc08880 iop = rtems_libio_iop( fd ); ffc0883c: 3d 20 00 00 lis r9,0 ffc08840: 80 09 27 6c lwz r0,10092(r9) ffc08844: 1c 63 00 48 mulli r3,r3,72 ffc08848: 7c 60 1a 14 add r3,r0,r3 rtems_libio_check_is_open(iop); ffc0884c: 80 03 00 18 lwz r0,24(r3) ffc08850: 70 09 01 00 andi. r9,r0,256 ffc08854: 41 82 00 2c beq- ffc08880 <== NEVER TAKEN va_start(ap, command); buffer = va_arg(ap, void *); ffc08858: 38 00 00 03 li r0,3 ffc0885c: 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); ffc08860: 39 61 00 10 addi r11,r1,16 ffc08864: 38 01 00 28 addi r0,r1,40 /* * Now process the ioctl(). */ if ( !iop->handlers ) ffc08868: 81 23 00 40 lwz r9,64(r3) rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); ffc0886c: 90 01 00 0c stw r0,12(r1) /* * Now process the ioctl(). */ if ( !iop->handlers ) ffc08870: 2f 89 00 00 cmpwi cr7,r9,0 rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); ffc08874: 91 61 00 10 stw r11,16(r1) buffer = va_arg(ap, void *); ffc08878: 80 ab 00 08 lwz r5,8(r11) /* * Now process the ioctl(). */ if ( !iop->handlers ) ffc0887c: 40 be 00 10 bne+ cr7,ffc0888c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); ffc08880: 48 00 fa b9 bl ffc18338 <__errno> ffc08884: 38 00 00 09 li r0,9 ffc08888: 48 00 00 18 b ffc088a0 if ( !iop->handlers->ioctl_h ) ffc0888c: 80 09 00 10 lwz r0,16(r9) ffc08890: 2f 80 00 00 cmpwi cr7,r0,0 ffc08894: 40 be 00 18 bne+ cr7,ffc088ac <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc08898: 48 00 fa a1 bl ffc18338 <__errno> <== NOT EXECUTED ffc0889c: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc088a0: 90 03 00 00 stw r0,0(r3) ffc088a4: 38 60 ff ff li r3,-1 ffc088a8: 48 00 00 0c b ffc088b4 rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); ffc088ac: 7c 09 03 a6 mtctr r0 ffc088b0: 4e 80 04 21 bctrl return rc; } ffc088b4: 80 01 00 24 lwz r0,36(r1) ffc088b8: 38 21 00 20 addi r1,r1,32 ffc088bc: 7c 08 03 a6 mtlr r0 ffc088c0: 4e 80 00 20 blr =============================================================================== ffc0797c : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { ffc0797c: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc07980: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc07984: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) ffc07988: 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) { ffc0798c: 93 c1 00 08 stw r30,8(r1) <== NOT EXECUTED ffc07990: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) ffc07994: 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) { ffc07998: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED ffc0799c: 7c 9f 23 78 mr r31,r4 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) ffc079a0: 41 82 00 08 beq- ffc079a8 <== NOT EXECUTED c &= 0x7f; ffc079a4: 54 7e 06 7e clrlwi r30,r3,25 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) ffc079a8: 70 09 02 00 andi. r9,r0,512 <== NOT EXECUTED ffc079ac: 41 82 00 2c beq- ffc079d8 <== NOT EXECUTED c = tolower (c); ffc079b0: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc079b4: 81 69 26 f8 lwz r11,9976(r9) <== NOT EXECUTED ffc079b8: 7f c9 f3 78 mr r9,r30 <== NOT EXECUTED ffc079bc: 7f cb f2 14 add r30,r11,r30 <== NOT EXECUTED ffc079c0: 89 7e 00 01 lbz r11,1(r30) <== NOT EXECUTED ffc079c4: 55 6b 07 be clrlwi r11,r11,30 <== NOT EXECUTED ffc079c8: 2f 8b 00 01 cmpwi cr7,r11,1 <== NOT EXECUTED ffc079cc: 40 be 00 08 bne+ cr7,ffc079d4 <== NOT EXECUTED ffc079d0: 39 29 00 20 addi r9,r9,32 <== NOT EXECUTED ffc079d4: 55 3e 06 3e clrlwi r30,r9,24 <== NOT EXECUTED if (c == '\r') { ffc079d8: 2f 9e 00 0d cmpwi cr7,r30,13 <== NOT EXECUTED ffc079dc: 40 be 00 1c bne+ cr7,ffc079f8 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) ffc079e0: 70 09 00 80 andi. r9,r0,128 <== NOT EXECUTED ffc079e4: 40 82 01 44 bne- ffc07b28 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) ffc079e8: 70 09 01 00 andi. r9,r0,256 <== NOT EXECUTED ffc079ec: 41 82 00 2c beq- ffc07a18 <== NOT EXECUTED ffc079f0: 3b c0 00 0a li r30,10 <== NOT EXECUTED ffc079f4: 48 00 00 24 b ffc07a18 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { ffc079f8: 2f 9e 00 0a cmpwi cr7,r30,10 <== NOT EXECUTED ffc079fc: 40 be 00 14 bne+ cr7,ffc07a10 <== NOT EXECUTED ffc07a00: 70 09 00 40 andi. r9,r0,64 <== NOT EXECUTED ffc07a04: 41 82 00 14 beq- ffc07a18 <== NOT EXECUTED ffc07a08: 3b c0 00 0d li r30,13 <== NOT EXECUTED ffc07a0c: 48 00 00 0c b ffc07a18 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { ffc07a10: 2f 9e 00 00 cmpwi cr7,r30,0 <== NOT EXECUTED ffc07a14: 41 be 00 c8 beq+ cr7,ffc07adc <== NOT EXECUTED ffc07a18: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED ffc07a1c: 70 09 00 02 andi. r9,r0,2 <== NOT EXECUTED ffc07a20: 41 82 00 bc beq- ffc07adc <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { ffc07a24: 89 3f 00 43 lbz r9,67(r31) <== NOT EXECUTED erase (tty, 0); ffc07a28: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc07a2c: 38 80 00 00 li r4,0 <== 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]) { ffc07a30: 7f 89 f0 00 cmpw cr7,r9,r30 <== NOT EXECUTED ffc07a34: 41 9e 00 18 beq- cr7,ffc07a4c <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { ffc07a38: 89 3f 00 44 lbz r9,68(r31) <== NOT EXECUTED ffc07a3c: 7f 89 f0 00 cmpw cr7,r9,r30 <== NOT EXECUTED ffc07a40: 40 be 00 14 bne+ cr7,ffc07a54 <== NOT EXECUTED erase (tty, 1); ffc07a44: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc07a48: 38 80 00 01 li r4,1 <== NOT EXECUTED ffc07a4c: 4b ff fc dd bl ffc07728 <== NOT EXECUTED ffc07a50: 48 00 00 d8 b ffc07b28 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { ffc07a54: 89 3f 00 45 lbz r9,69(r31) <== NOT EXECUTED ffc07a58: 38 60 00 01 li r3,1 <== NOT EXECUTED ffc07a5c: 7f 89 f0 00 cmpw cr7,r9,r30 <== NOT EXECUTED ffc07a60: 41 9e 00 cc beq- cr7,ffc07b2c <== NOT EXECUTED return 1; } else if (c == '\n') { ffc07a64: 2f 9e 00 0a cmpwi cr7,r30,10 <== NOT EXECUTED ffc07a68: 40 be 00 30 bne+ cr7,ffc07a98 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) ffc07a6c: 70 09 00 48 andi. r9,r0,72 <== NOT EXECUTED ffc07a70: 41 a2 00 10 beq+ ffc07a80 <== NOT EXECUTED echo (c, tty); ffc07a74: 38 60 00 0a li r3,10 <== NOT EXECUTED ffc07a78: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc07a7c: 4b ff fc 19 bl ffc07694 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; ffc07a80: 81 3f 00 20 lwz r9,32(r31) <== NOT EXECUTED ffc07a84: 39 40 00 0a li r10,10 <== NOT EXECUTED ffc07a88: 81 7f 00 1c lwz r11,28(r31) <== NOT EXECUTED ffc07a8c: 38 09 00 01 addi r0,r9,1 <== NOT EXECUTED ffc07a90: 7d 4b 49 ae stbx r10,r11,r9 <== NOT EXECUTED ffc07a94: 48 00 00 40 b ffc07ad4 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) ffc07a98: 89 3f 00 4c lbz r9,76(r31) <== NOT EXECUTED ffc07a9c: 7f 89 f0 00 cmpw cr7,r9,r30 <== NOT EXECUTED ffc07aa0: 41 9e 00 10 beq- cr7,ffc07ab0 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { ffc07aa4: 89 3f 00 51 lbz r9,81(r31) <== NOT EXECUTED ffc07aa8: 7f 89 f0 00 cmpw cr7,r9,r30 <== NOT EXECUTED ffc07aac: 40 be 00 30 bne+ cr7,ffc07adc <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) ffc07ab0: 70 09 00 08 andi. r9,r0,8 <== NOT EXECUTED ffc07ab4: 41 a2 00 10 beq+ ffc07ac4 <== NOT EXECUTED echo (c, tty); ffc07ab8: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc07abc: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc07ac0: 4b ff fb d5 bl ffc07694 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; ffc07ac4: 81 3f 00 20 lwz r9,32(r31) <== NOT EXECUTED ffc07ac8: 81 7f 00 1c lwz r11,28(r31) <== NOT EXECUTED ffc07acc: 38 09 00 01 addi r0,r9,1 <== NOT EXECUTED ffc07ad0: 7f cb 49 ae stbx r30,r11,r9 <== NOT EXECUTED ffc07ad4: 38 60 00 01 li r3,1 <== NOT EXECUTED ffc07ad8: 48 00 00 48 b ffc07b20 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { ffc07adc: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc07ae0: 81 69 21 48 lwz r11,8520(r9) <== NOT EXECUTED ffc07ae4: 81 3f 00 20 lwz r9,32(r31) <== NOT EXECUTED ffc07ae8: 38 0b ff ff addi r0,r11,-1 <== NOT EXECUTED ffc07aec: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc07af0: 40 9c 00 38 bge- cr7,ffc07b28 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) ffc07af4: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED ffc07af8: 70 09 00 08 andi. r9,r0,8 <== NOT EXECUTED ffc07afc: 41 a2 00 10 beq+ ffc07b0c <== NOT EXECUTED echo (c, tty); ffc07b00: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc07b04: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc07b08: 4b ff fb 8d bl ffc07694 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; ffc07b0c: 81 3f 00 20 lwz r9,32(r31) <== NOT EXECUTED ffc07b10: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc07b14: 81 7f 00 1c lwz r11,28(r31) <== NOT EXECUTED ffc07b18: 38 09 00 01 addi r0,r9,1 <== NOT EXECUTED ffc07b1c: 7f cb 49 ae stbx r30,r11,r9 <== NOT EXECUTED ffc07b20: 90 1f 00 20 stw r0,32(r31) <== NOT EXECUTED ffc07b24: 48 00 00 08 b ffc07b2c <== NOT EXECUTED ffc07b28: 38 60 00 00 li r3,0 <== NOT EXECUTED } return 0; } ffc07b2c: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc07b30: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc07b34: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc07b38: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc07b3c: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc07b40: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc05f40 : int link( const char *existing, const char *new ) { ffc05f40: 94 21 ff c0 stwu r1,-64(r1) ffc05f44: 7c 08 02 a6 mflr r0 ffc05f48: 93 c1 00 38 stw r30,56(r1) ffc05f4c: 7c 7e 1b 78 mr r30,r3 ffc05f50: 90 01 00 44 stw r0,68(r1) ffc05f54: 93 e1 00 3c stw r31,60(r1) ffc05f58: 7c 9f 23 78 mr r31,r4 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), ffc05f5c: 48 01 04 55 bl ffc163b0 ffc05f60: 38 a0 00 00 li r5,0 ffc05f64: 7c 64 1b 78 mr r4,r3 ffc05f68: 38 c1 00 0c addi r6,r1,12 ffc05f6c: 7f c3 f3 78 mr r3,r30 ffc05f70: 38 e0 00 01 li r7,1 ffc05f74: 4b ff f9 81 bl ffc058f4 0, &existing_loc, true ); if ( result != 0 ) ffc05f78: 3b c0 ff ff li r30,-1 ffc05f7c: 2f 83 00 00 cmpwi cr7,r3,0 ffc05f80: 40 9e 02 3c bne- cr7,ffc061bc /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); ffc05f84: 88 1f 00 00 lbz r0,0(r31) ffc05f88: 2f 80 00 2f cmpwi cr7,r0,47 ffc05f8c: 41 9e 00 14 beq- cr7,ffc05fa0 ffc05f90: 2f 80 00 5c cmpwi cr7,r0,92 ffc05f94: 41 9e 00 0c beq- cr7,ffc05fa0 <== NEVER TAKEN ffc05f98: 2f 80 00 00 cmpwi cr7,r0,0 ffc05f9c: 40 9e 00 38 bne- cr7,ffc05fd4 <== ALWAYS TAKEN ffc05fa0: 3d 20 00 00 lis r9,0 ffc05fa4: 81 29 27 54 lwz r9,10068(r9) ffc05fa8: 38 60 00 01 li r3,1 ffc05fac: 80 09 00 24 lwz r0,36(r9) ffc05fb0: 81 09 00 18 lwz r8,24(r9) ffc05fb4: 81 49 00 1c lwz r10,28(r9) ffc05fb8: 81 69 00 20 lwz r11,32(r9) ffc05fbc: 91 01 00 20 stw r8,32(r1) ffc05fc0: 91 41 00 24 stw r10,36(r1) ffc05fc4: 91 61 00 28 stw r11,40(r1) ffc05fc8: 90 01 00 2c stw r0,44(r1) ffc05fcc: 80 09 00 28 lwz r0,40(r9) ffc05fd0: 48 00 00 34 b ffc06004 ffc05fd4: 3d 20 00 00 lis r9,0 ffc05fd8: 81 29 27 54 lwz r9,10068(r9) ffc05fdc: 38 60 00 00 li r3,0 ffc05fe0: 80 09 00 10 lwz r0,16(r9) ffc05fe4: 81 09 00 04 lwz r8,4(r9) ffc05fe8: 81 49 00 08 lwz r10,8(r9) ffc05fec: 81 69 00 0c lwz r11,12(r9) ffc05ff0: 91 01 00 20 stw r8,32(r1) ffc05ff4: 91 41 00 24 stw r10,36(r1) ffc05ff8: 91 61 00 28 stw r11,40(r1) ffc05ffc: 90 01 00 2c stw r0,44(r1) ffc06000: 80 09 00 14 lwz r0,20(r9) if ( !parent_loc.ops->evalformake_h ) { ffc06004: 81 21 00 2c lwz r9,44(r1) /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); ffc06008: 90 01 00 30 stw r0,48(r1) if ( !parent_loc.ops->evalformake_h ) { ffc0600c: 80 09 00 04 lwz r0,4(r9) ffc06010: 2f 80 00 00 cmpwi cr7,r0,0 ffc06014: 40 be 00 24 bne+ cr7,ffc06038 <== ALWAYS TAKEN rtems_filesystem_freenode( &existing_loc ); ffc06018: 81 21 00 18 lwz r9,24(r1) <== NOT EXECUTED ffc0601c: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc06020: 41 9e 01 28 beq- cr7,ffc06148 <== NOT EXECUTED ffc06024: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc06028: 38 61 00 0c addi r3,r1,12 <== NOT EXECUTED ffc0602c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc06030: 40 be 01 10 bne+ cr7,ffc06140 <== NOT EXECUTED ffc06034: 48 00 01 14 b ffc06148 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); ffc06038: 3b c1 00 20 addi r30,r1,32 ffc0603c: 7c 09 03 a6 mtctr r0 ffc06040: 7c 7f 1a 14 add r3,r31,r3 ffc06044: 7f c4 f3 78 mr r4,r30 ffc06048: 38 a1 00 08 addi r5,r1,8 ffc0604c: 4e 80 04 21 bctrl if ( result != 0 ) { ffc06050: 7c 7f 1b 79 mr. r31,r3 ffc06054: 41 a2 00 38 beq+ ffc0608c rtems_filesystem_freenode( &existing_loc ); ffc06058: 81 21 00 18 lwz r9,24(r1) ffc0605c: 2f 89 00 00 cmpwi cr7,r9,0 ffc06060: 41 9e 00 1c beq- cr7,ffc0607c <== NEVER TAKEN ffc06064: 80 09 00 1c lwz r0,28(r9) ffc06068: 2f 80 00 00 cmpwi cr7,r0,0 ffc0606c: 41 9e 00 10 beq- cr7,ffc0607c <== NEVER TAKEN ffc06070: 38 61 00 0c addi r3,r1,12 ffc06074: 7c 09 03 a6 mtctr r0 ffc06078: 4e 80 04 21 bctrl rtems_set_errno_and_return_minus_one( result ); ffc0607c: 48 00 eb 71 bl ffc14bec <__errno> ffc06080: 93 e3 00 00 stw r31,0(r3) ffc06084: 3b c0 ff ff li r30,-1 ffc06088: 48 00 01 34 b ffc061bc /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { ffc0608c: 80 01 00 1c lwz r0,28(r1) ffc06090: 81 21 00 30 lwz r9,48(r1) ffc06094: 7f 89 00 00 cmpw cr7,r9,r0 ffc06098: 41 be 00 58 beq+ cr7,ffc060f0 rtems_filesystem_freenode( &existing_loc ); ffc0609c: 81 21 00 18 lwz r9,24(r1) ffc060a0: 2f 89 00 00 cmpwi cr7,r9,0 ffc060a4: 41 9e 00 1c beq- cr7,ffc060c0 <== NEVER TAKEN ffc060a8: 80 09 00 1c lwz r0,28(r9) ffc060ac: 2f 80 00 00 cmpwi cr7,r0,0 ffc060b0: 41 9e 00 10 beq- cr7,ffc060c0 <== NEVER TAKEN ffc060b4: 38 61 00 0c addi r3,r1,12 ffc060b8: 7c 09 03 a6 mtctr r0 ffc060bc: 4e 80 04 21 bctrl rtems_filesystem_freenode( &parent_loc ); ffc060c0: 81 21 00 2c lwz r9,44(r1) ffc060c4: 2f 89 00 00 cmpwi cr7,r9,0 ffc060c8: 41 9e 00 1c beq- cr7,ffc060e4 <== NEVER TAKEN ffc060cc: 80 09 00 1c lwz r0,28(r9) ffc060d0: 2f 80 00 00 cmpwi cr7,r0,0 ffc060d4: 41 9e 00 10 beq- cr7,ffc060e4 <== NEVER TAKEN ffc060d8: 38 61 00 20 addi r3,r1,32 ffc060dc: 7c 09 03 a6 mtctr r0 ffc060e0: 4e 80 04 21 bctrl rtems_set_errno_and_return_minus_one( EXDEV ); ffc060e4: 48 00 eb 09 bl ffc14bec <__errno> ffc060e8: 38 00 00 12 li r0,18 ffc060ec: 48 00 00 64 b ffc06150 } if ( !parent_loc.ops->link_h ) { ffc060f0: 81 21 00 2c lwz r9,44(r1) ffc060f4: 80 09 00 08 lwz r0,8(r9) ffc060f8: 2f 80 00 00 cmpwi cr7,r0,0 ffc060fc: 40 be 00 5c bne+ cr7,ffc06158 <== ALWAYS TAKEN rtems_filesystem_freenode( &existing_loc ); ffc06100: 81 21 00 18 lwz r9,24(r1) <== NOT EXECUTED ffc06104: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc06108: 41 9e 00 1c beq- cr7,ffc06124 <== NOT EXECUTED ffc0610c: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc06110: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc06114: 41 9e 00 10 beq- cr7,ffc06124 <== NOT EXECUTED ffc06118: 38 61 00 0c addi r3,r1,12 <== NOT EXECUTED ffc0611c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06120: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); ffc06124: 81 21 00 2c lwz r9,44(r1) <== NOT EXECUTED ffc06128: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc0612c: 41 9e 00 1c beq- cr7,ffc06148 <== NOT EXECUTED ffc06130: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc06134: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc06138: 41 9e 00 10 beq- cr7,ffc06148 <== NOT EXECUTED ffc0613c: 38 61 00 20 addi r3,r1,32 <== NOT EXECUTED ffc06140: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06144: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc06148: 48 00 ea a5 bl ffc14bec <__errno> <== NOT EXECUTED ffc0614c: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc06150: 90 03 00 00 stw r0,0(r3) ffc06154: 4b ff ff 30 b ffc06084 } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); ffc06158: 3b e1 00 0c addi r31,r1,12 ffc0615c: 80 a1 00 08 lwz r5,8(r1) ffc06160: 7f c4 f3 78 mr r4,r30 ffc06164: 7c 09 03 a6 mtctr r0 ffc06168: 7f e3 fb 78 mr r3,r31 ffc0616c: 4e 80 04 21 bctrl rtems_filesystem_freenode( &existing_loc ); ffc06170: 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 ); ffc06174: 7c 7e 1b 78 mr r30,r3 rtems_filesystem_freenode( &existing_loc ); ffc06178: 2f 89 00 00 cmpwi cr7,r9,0 ffc0617c: 41 9e 00 1c beq- cr7,ffc06198 <== NEVER TAKEN ffc06180: 80 09 00 1c lwz r0,28(r9) ffc06184: 2f 80 00 00 cmpwi cr7,r0,0 ffc06188: 41 9e 00 10 beq- cr7,ffc06198 <== NEVER TAKEN ffc0618c: 7f e3 fb 78 mr r3,r31 ffc06190: 7c 09 03 a6 mtctr r0 ffc06194: 4e 80 04 21 bctrl rtems_filesystem_freenode( &parent_loc ); ffc06198: 81 21 00 2c lwz r9,44(r1) ffc0619c: 2f 89 00 00 cmpwi cr7,r9,0 ffc061a0: 41 9e 00 1c beq- cr7,ffc061bc <== NEVER TAKEN ffc061a4: 80 09 00 1c lwz r0,28(r9) ffc061a8: 2f 80 00 00 cmpwi cr7,r0,0 ffc061ac: 41 9e 00 10 beq- cr7,ffc061bc <== NEVER TAKEN ffc061b0: 38 61 00 20 addi r3,r1,32 ffc061b4: 7c 09 03 a6 mtctr r0 ffc061b8: 4e 80 04 21 bctrl return result; } ffc061bc: 80 01 00 44 lwz r0,68(r1) ffc061c0: 7f c3 f3 78 mr r3,r30 ffc061c4: 83 e1 00 3c lwz r31,60(r1) ffc061c8: 7c 08 03 a6 mtlr r0 ffc061cc: 83 c1 00 38 lwz r30,56(r1) ffc061d0: 38 21 00 40 addi r1,r1,64 ffc061d4: 4e 80 00 20 blr =============================================================================== ffc2345c : off_t lseek( int fd, off_t offset, int whence ) { ffc2345c: 94 21 ff e8 stwu r1,-24(r1) ffc23460: 7c 08 02 a6 mflr r0 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); ffc23464: 3d 20 00 00 lis r9,0 off_t lseek( int fd, off_t offset, int whence ) { ffc23468: 90 01 00 1c stw r0,28(r1) rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); ffc2346c: 80 09 26 ac lwz r0,9900(r9) off_t lseek( int fd, off_t offset, int whence ) { ffc23470: 93 a1 00 0c stw r29,12(r1) rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); ffc23474: 7f 83 00 40 cmplw cr7,r3,r0 off_t lseek( int fd, off_t offset, int whence ) { ffc23478: 93 c1 00 10 stw r30,16(r1) ffc2347c: 93 e1 00 14 stw r31,20(r1) rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); ffc23480: 40 9c 00 20 bge- cr7,ffc234a0 <== NEVER TAKEN iop = rtems_libio_iop( fd ); ffc23484: 3d 20 00 00 lis r9,0 ffc23488: 83 e9 27 6c lwz r31,10092(r9) ffc2348c: 1c 63 00 48 mulli r3,r3,72 ffc23490: 7f ff 1a 14 add r31,r31,r3 rtems_libio_check_is_open(iop); ffc23494: 80 1f 00 18 lwz r0,24(r31) ffc23498: 70 09 01 00 andi. r9,r0,256 ffc2349c: 40 a2 00 10 bne+ ffc234ac <== ALWAYS TAKEN ffc234a0: 4b ff 4b cd bl ffc1806c <__errno> <== NOT EXECUTED ffc234a4: 38 00 00 09 li r0,9 <== NOT EXECUTED ffc234a8: 48 00 00 7c b ffc23524 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) ffc234ac: 81 3f 00 40 lwz r9,64(r31) ffc234b0: 80 09 00 14 lwz r0,20(r9) ffc234b4: 2f 80 00 00 cmpwi cr7,r0,0 ffc234b8: 40 be 00 10 bne+ cr7,ffc234c8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc234bc: 4b ff 4b b1 bl ffc1806c <__errno> <== NOT EXECUTED ffc234c0: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc234c4: 48 00 00 60 b ffc23524 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { ffc234c8: 2f 87 00 01 cmpwi cr7,r7,1 /* * Now process the lseek(). */ old_offset = iop->offset; ffc234cc: 83 bf 00 10 lwz r29,16(r31) ffc234d0: 83 df 00 14 lwz r30,20(r31) switch ( whence ) { ffc234d4: 41 9e 00 20 beq- cr7,ffc234f4 ffc234d8: 2f 87 00 02 cmpwi cr7,r7,2 ffc234dc: 41 9e 00 24 beq- cr7,ffc23500 ffc234e0: 2f 87 00 00 cmpwi cr7,r7,0 ffc234e4: 40 9e 00 38 bne- cr7,ffc2351c case SEEK_SET: iop->offset = offset; ffc234e8: 90 bf 00 10 stw r5,16(r31) ffc234ec: 90 df 00 14 stw r6,20(r31) break; ffc234f0: 48 00 00 44 b ffc23534 case SEEK_CUR: iop->offset += offset; ffc234f4: 7d 46 f0 14 addc r10,r6,r30 ffc234f8: 7d 25 e9 14 adde r9,r5,r29 ffc234fc: 48 00 00 14 b ffc23510 break; case SEEK_END: iop->offset = iop->size + offset; ffc23500: 81 7f 00 08 lwz r11,8(r31) ffc23504: 81 9f 00 0c lwz r12,12(r31) ffc23508: 7d 46 60 14 addc r10,r6,r12 ffc2350c: 7d 25 59 14 adde r9,r5,r11 ffc23510: 91 3f 00 10 stw r9,16(r31) ffc23514: 91 5f 00 14 stw r10,20(r31) break; ffc23518: 48 00 00 1c b ffc23534 default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc2351c: 4b ff 4b 51 bl ffc1806c <__errno> ffc23520: 38 00 00 16 li r0,22 ffc23524: 90 03 00 00 stw r0,0(r3) ffc23528: 39 20 ff ff li r9,-1 ffc2352c: 39 40 ff ff li r10,-1 ffc23530: 48 00 00 38 b ffc23568 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); ffc23534: 81 3f 00 40 lwz r9,64(r31) ffc23538: 7f e3 fb 78 mr r3,r31 ffc2353c: 80 09 00 14 lwz r0,20(r9) ffc23540: 7c 09 03 a6 mtctr r0 ffc23544: 4e 80 04 21 bctrl ffc23548: 7c 69 1b 78 mr r9,r3 if ( status == (off_t) -1 ) ffc2354c: 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 ); ffc23550: 7c 8a 23 78 mr r10,r4 if ( status == (off_t) -1 ) ffc23554: 40 be 00 14 bne+ cr7,ffc23568 ffc23558: 2f 84 ff ff cmpwi cr7,r4,-1 ffc2355c: 40 be 00 0c bne+ cr7,ffc23568 <== NEVER TAKEN iop->offset = old_offset; ffc23560: 93 bf 00 10 stw r29,16(r31) ffc23564: 93 df 00 14 stw r30,20(r31) /* * So if the operation failed, we have to restore iop->offset. */ return status; } ffc23568: 80 01 00 1c lwz r0,28(r1) ffc2356c: 7d 44 53 78 mr r4,r10 ffc23570: 7d 23 4b 78 mr r3,r9 ffc23574: 83 a1 00 0c lwz r29,12(r1) ffc23578: 7c 08 03 a6 mtlr r0 ffc2357c: 83 c1 00 10 lwz r30,16(r1) ffc23580: 83 e1 00 14 lwz r31,20(r1) ffc23584: 38 21 00 18 addi r1,r1,24 ffc23588: 4e 80 00 20 blr =============================================================================== ffc05ea8 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); ffc05ea8: 94 21 ff e8 stwu r1,-24(r1) ffc05eac: 7c 08 02 a6 mflr r0 ffc05eb0: 3d 20 00 00 lis r9,0 ffc05eb4: 90 01 00 1c stw r0,28(r1) ffc05eb8: 39 29 2b c0 addi r9,r9,11200 ffc05ebc: 81 69 00 04 lwz r11,4(r9) ffc05ec0: 93 e1 00 14 stw r31,20(r1) ffc05ec4: 7c 7f 1b 78 mr r31,r3 ffc05ec8: 39 6b 00 01 addi r11,r11,1 ffc05ecc: 91 69 00 04 stw r11,4(r9) ffc05ed0: 93 a1 00 0c stw r29,12(r1) ffc05ed4: 93 c1 00 10 stw r30,16(r1) /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); ffc05ed8: 4b ff fe 79 bl ffc05d50 /* * Validate the parameters */ if ( !size ) ffc05edc: 2f 9f 00 00 cmpwi cr7,r31,0 ffc05ee0: 41 9e 00 cc beq- cr7,ffc05fac <== 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()) && ffc05ee4: 3d 20 00 00 lis r9,0 ffc05ee8: 80 09 27 f4 lwz r0,10228(r9) ffc05eec: 2f 80 00 03 cmpwi cr7,r0,3 ffc05ef0: 40 be 00 10 bne+ cr7,ffc05f00 ffc05ef4: 4b ff fd e9 bl ffc05cdc ffc05ef8: 2f 83 00 00 cmpwi cr7,r3,0 ffc05efc: 41 9e 00 b0 beq- cr7,ffc05fac <== NEVER TAKEN RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); ffc05f00: 3d 20 00 00 lis r9,0 ffc05f04: 80 69 26 bc lwz r3,9916(r9) ffc05f08: 7f e4 fb 78 mr r4,r31 ffc05f0c: 38 a0 00 00 li r5,0 ffc05f10: 38 c0 00 00 li r6,0 ffc05f14: 48 00 5d 75 bl ffc0bc88 <_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 ) { ffc05f18: 2f 83 00 00 cmpwi cr7,r3,0 ffc05f1c: 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; ffc05f20: 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 ) { ffc05f24: 40 be 00 3c bne+ cr7,ffc05f60 if (rtems_malloc_sbrk_helpers) ffc05f28: 3d 20 00 00 lis r9,0 ffc05f2c: 81 29 27 2c lwz r9,10028(r9) ffc05f30: 2f 89 00 00 cmpwi cr7,r9,0 ffc05f34: 41 9e 00 1c beq- cr7,ffc05f50 <== ALWAYS TAKEN return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); ffc05f38: 80 09 00 04 lwz r0,4(r9) <== NOT EXECUTED ffc05f3c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc05f40: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc05f44: 4e 80 04 21 bctrl <== NOT EXECUTED if ( !return_this ) { ffc05f48: 7c 7e 1b 79 mr. r30,r3 <== NOT EXECUTED ffc05f4c: 40 a2 00 14 bne+ ffc05f60 <== NOT EXECUTED errno = ENOMEM; ffc05f50: 48 01 21 1d bl ffc1806c <__errno> ffc05f54: 38 00 00 0c li r0,12 ffc05f58: 90 03 00 00 stw r0,0(r3) return (void *) 0; ffc05f5c: 48 00 00 54 b ffc05fb0 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) ffc05f60: 3d 20 00 00 lis r9,0 ffc05f64: 81 29 27 30 lwz r9,10032(r9) ffc05f68: 2f 89 00 00 cmpwi cr7,r9,0 ffc05f6c: 41 9e 00 18 beq- cr7,ffc05f84 <== ALWAYS TAKEN (*rtems_malloc_dirty_helper)( return_this, size ); ffc05f70: 80 09 00 00 lwz r0,0(r9) <== NOT EXECUTED ffc05f74: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc05f78: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc05f7c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc05f80: 4e 80 04 21 bctrl <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) ffc05f84: 3d 20 00 00 lis r9,0 ffc05f88: 81 29 27 28 lwz r9,10024(r9) ffc05f8c: 7f dd f3 78 mr r29,r30 ffc05f90: 2f 89 00 00 cmpwi cr7,r9,0 ffc05f94: 41 9e 00 1c beq- cr7,ffc05fb0 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(return_this); ffc05f98: 80 09 00 04 lwz r0,4(r9) <== NOT EXECUTED ffc05f9c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc05fa0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc05fa4: 4e 80 04 21 bctrl <== NOT EXECUTED ffc05fa8: 48 00 00 08 b ffc05fb0 <== NOT EXECUTED ffc05fac: 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; } ffc05fb0: 80 01 00 1c lwz r0,28(r1) ffc05fb4: 7f a3 eb 78 mr r3,r29 ffc05fb8: 83 c1 00 10 lwz r30,16(r1) ffc05fbc: 7c 08 03 a6 mtlr r0 ffc05fc0: 83 a1 00 0c lwz r29,12(r1) ffc05fc4: 83 e1 00 14 lwz r31,20(r1) ffc05fc8: 38 21 00 18 addi r1,r1,24 ffc05fcc: 4e 80 00 20 blr =============================================================================== ffc05d24 : } void malloc_deferred_free( void *pointer ) { ffc05d24: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED ffc05d28: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc05d2c: 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 ); ffc05d30: 3c 60 00 00 lis r3,0 <== NOT EXECUTED ffc05d34: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc05d38: 38 63 2b b0 addi r3,r3,11184 <== NOT EXECUTED ffc05d3c: 48 00 4c 19 bl ffc0a954 <_Chain_Append> <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } ffc05d40: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc05d44: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc05d48: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05d4c: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc05d50 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { ffc05d50: 94 21 ff f0 stwu r1,-16(r1) ffc05d54: 7c 08 02 a6 mflr r0 ffc05d58: 93 e1 00 0c stw r31,12(r1) */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); ffc05d5c: 3f e0 00 00 lis r31,0 ffc05d60: 3b ff 2b b0 addi r31,r31,11184 ffc05d64: 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) ffc05d68: 48 00 00 08 b ffc05d70 free(to_be_freed); ffc05d6c: 4b ff fd 49 bl ffc05ab4 <== NOT EXECUTED ffc05d70: 7f e3 fb 78 mr r3,r31 ffc05d74: 48 00 4c 39 bl ffc0a9ac <_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) ffc05d78: 2f 83 00 00 cmpwi cr7,r3,0 ffc05d7c: 40 9e ff f0 bne+ cr7,ffc05d6c <== NEVER TAKEN free(to_be_freed); } ffc05d80: 80 01 00 14 lwz r0,20(r1) ffc05d84: 83 e1 00 0c lwz r31,12(r1) ffc05d88: 38 21 00 10 addi r1,r1,16 ffc05d8c: 7c 08 03 a6 mtlr r0 ffc05d90: 4e 80 00 20 blr =============================================================================== ffc156bc : void *memfile_alloc_block(void) { void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); ffc156bc: 3d 20 00 00 lis r9,0 */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { ffc156c0: 94 21 ff f8 stwu r1,-8(r1) ffc156c4: 7c 08 02 a6 mflr r0 void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); ffc156c8: 38 60 00 01 li r3,1 ffc156cc: 80 89 27 68 lwz r4,10088(r9) */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { ffc156d0: 90 01 00 0c stw r0,12(r1) void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); ffc156d4: 4b ff 00 d1 bl ffc057a4 if ( memory ) ffc156d8: 2c 03 00 00 cmpwi r3,0 ffc156dc: 41 82 00 14 beq- ffc156f0 <== NEVER TAKEN memfile_blocks_allocated++; ffc156e0: 3d 20 00 00 lis r9,0 ffc156e4: 81 69 28 10 lwz r11,10256(r9) ffc156e8: 38 0b 00 01 addi r0,r11,1 ffc156ec: 90 09 28 10 stw r0,10256(r9) return memory; } ffc156f0: 80 01 00 0c lwz r0,12(r1) ffc156f4: 38 21 00 08 addi r1,r1,8 ffc156f8: 7c 08 03 a6 mtlr r0 ffc156fc: 4e 80 00 20 blr =============================================================================== ffc15c2c : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ ffc15c2c: 94 21 ff f0 stwu r1,-16(r1) ffc15c30: 7c 08 02 a6 mflr r0 ffc15c34: 93 e1 00 0c stw r31,12(r1) ffc15c38: 7c 7f 1b 78 mr r31,r3 ffc15c3c: 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) ) { ffc15c40: 4b ff d4 99 bl ffc130d8 ffc15c44: 2f 83 00 00 cmpwi cr7,r3,0 ffc15c48: 40 9e 00 44 bne- cr7,ffc15c8c ffc15c4c: a0 1f 00 34 lhz r0,52(r31) ffc15c50: 2f 80 00 00 cmpwi cr7,r0,0 ffc15c54: 40 9e 00 38 bne- cr7,ffc15c8c <== NEVER TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) ffc15c58: 3d 20 00 00 lis r9,0 ffc15c5c: 81 29 26 f4 lwz r9,9972(r9) ffc15c60: 81 69 00 04 lwz r11,4(r9) ffc15c64: 7f 8b f8 00 cmpw cr7,r11,r31 ffc15c68: 40 be 00 08 bne+ cr7,ffc15c70 <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; ffc15c6c: 90 09 00 04 stw r0,4(r9) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) ffc15c70: 80 1f 00 4c lwz r0,76(r31) ffc15c74: 2f 80 00 06 cmpwi cr7,r0,6 ffc15c78: 41 9e 00 0c beq- cr7,ffc15c84 <== NEVER TAKEN IMFS_memfile_remove( the_jnode ); ffc15c7c: 7f e3 fb 78 mr r3,r31 ffc15c80: 4b ff fd e1 bl ffc15a60 free( the_jnode ); ffc15c84: 7f e3 fb 78 mr r3,r31 ffc15c88: 4b fe fe 2d bl ffc05ab4 } return 0; } ffc15c8c: 80 01 00 14 lwz r0,20(r1) ffc15c90: 38 60 00 00 li r3,0 ffc15c94: 83 e1 00 0c lwz r31,12(r1) ffc15c98: 38 21 00 10 addi r1,r1,16 ffc15c9c: 7c 08 03 a6 mtlr r0 ffc15ca0: 4e 80 00 20 blr =============================================================================== ffc15944 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { ffc15944: 94 21 ff e0 stwu r1,-32(r1) ffc15948: 7c 08 02 a6 mflr r0 ffc1594c: 93 e1 00 1c stw r31,28(r1) /* * Perform internal consistency checks */ assert( block_table ); ffc15950: 7c 7f 1b 79 mr. r31,r3 void memfile_free_blocks_in_table( block_p **block_table, int entries ) { ffc15954: 93 61 00 0c stw r27,12(r1) ffc15958: 7c 9b 23 78 mr r27,r4 ffc1595c: 90 01 00 24 stw r0,36(r1) ffc15960: 93 81 00 10 stw r28,16(r1) ffc15964: 93 a1 00 14 stw r29,20(r1) ffc15968: 93 c1 00 18 stw r30,24(r1) /* * Perform internal consistency checks */ assert( block_table ); ffc1596c: 40 a2 00 28 bne+ ffc15994 <== ALWAYS TAKEN ffc15970: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc15974: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc15978: 38 a5 4e a4 addi r5,r5,20132 <== NOT EXECUTED ffc1597c: 3c c0 ff c2 lis r6,-62 <== NOT EXECUTED ffc15980: 38 63 4f 66 addi r3,r3,20326 <== NOT EXECUTED ffc15984: 38 a5 00 20 addi r5,r5,32 <== NOT EXECUTED ffc15988: 38 c6 4f da addi r6,r6,20442 <== NOT EXECUTED ffc1598c: 38 80 01 b3 li r4,435 <== NOT EXECUTED ffc15990: 4b fe fc 3d bl ffc055cc <__assert_func> <== NOT EXECUTED ffc15994: 83 df 00 00 lwz r30,0(r31) ffc15998: 3b a0 00 00 li r29,0 b = *block_table; for ( i=0 ; i if ( b[i] ) { ffc159a4: 80 7e 00 00 lwz r3,0(r30) ffc159a8: 2f 83 00 00 cmpwi cr7,r3,0 ffc159ac: 41 9e 00 0c beq- cr7,ffc159b8 memfile_free_block( b[i] ); ffc159b0: 4b ff fc dd bl ffc1568c b[i] = 0; ffc159b4: 93 9e 00 00 stw r28,0(r30) * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); ffc159c8: 80 7f 00 00 lwz r3,0(r31) ffc159cc: 4b ff fc c1 bl ffc1568c *block_table = 0; ffc159d0: 38 00 00 00 li r0,0 ffc159d4: 90 1f 00 00 stw r0,0(r31) } ffc159d8: 80 01 00 24 lwz r0,36(r1) ffc159dc: 83 61 00 0c lwz r27,12(r1) ffc159e0: 7c 08 03 a6 mtlr r0 ffc159e4: 83 81 00 10 lwz r28,16(r1) ffc159e8: 83 a1 00 14 lwz r29,20(r1) ffc159ec: 83 c1 00 18 lwz r30,24(r1) ffc159f0: 83 e1 00 1c lwz r31,28(r1) ffc159f4: 38 21 00 20 addi r1,r1,32 ffc159f8: 4e 80 00 20 blr =============================================================================== ffc15fd0 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { ffc15fd0: 94 21 ff e0 stwu r1,-32(r1) ffc15fd4: 7c 08 02 a6 mflr r0 ffc15fd8: 7c 69 1b 78 mr r9,r3 ffc15fdc: 90 01 00 24 stw r0,36(r1) ffc15fe0: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; ffc15fe4: 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 ) ffc15fe8: 80 1f 00 50 lwz r0,80(r31) ffc15fec: 7f 80 28 00 cmpw cr7,r0,r5 ffc15ff0: 41 9c 00 14 blt- cr7,ffc16004 <== NEVER TAKEN ffc15ff4: 40 be 00 1c bne+ cr7,ffc16010 <== NEVER TAKEN ffc15ff8: 80 1f 00 54 lwz r0,84(r31) ffc15ffc: 7f 80 30 40 cmplw cr7,r0,r6 ffc16000: 40 bc 00 10 bge+ cr7,ffc16010 <== ALWAYS TAKEN return IMFS_memfile_extend( the_jnode, length ); ffc16004: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc16008: 4b ff fe 05 bl ffc15e0c <== NOT EXECUTED ffc1600c: 48 00 00 2c b ffc16038 <== NOT EXECUTED * 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; ffc16010: 90 bf 00 50 stw r5,80(r31) iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); ffc16014: 38 61 00 08 addi r3,r1,8 ffc16018: 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; ffc1601c: 90 df 00 54 stw r6,84(r31) iop->size = the_jnode->info.file.size; ffc16020: 90 c9 00 0c stw r6,12(r9) ffc16024: 90 a9 00 08 stw r5,8(r9) IMFS_update_atime( the_jnode ); ffc16028: 4b fe fb 55 bl ffc05b7c ffc1602c: 80 01 00 08 lwz r0,8(r1) ffc16030: 38 60 00 00 li r3,0 ffc16034: 90 1f 00 40 stw r0,64(r31) return 0; } ffc16038: 80 01 00 24 lwz r0,36(r1) ffc1603c: 83 e1 00 1c lwz r31,28(r1) ffc16040: 38 21 00 20 addi r1,r1,32 ffc16044: 7c 08 03 a6 mtlr r0 ffc16048: 4e 80 00 20 blr =============================================================================== ffc1604c : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { ffc1604c: 94 21 ff f0 stwu r1,-16(r1) ffc16050: 7c 08 02 a6 mflr r0 ffc16054: 90 01 00 14 stw r0,20(r1) ffc16058: 93 c1 00 08 stw r30,8(r1) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; ffc1605c: 83 c3 00 3c lwz r30,60(r3) rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { ffc16060: 93 e1 00 0c stw r31,12(r1) ffc16064: 7c 7f 1b 78 mr r31,r3 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { ffc16068: 80 1e 00 4c lwz r0,76(r30) ffc1606c: 2f 80 00 06 cmpwi cr7,r0,6 ffc16070: 40 9e 00 34 bne- cr7,ffc160a4 <== ALWAYS TAKEN if (iop->offset > the_jnode->info.linearfile.size) ffc16074: 81 3e 00 50 lwz r9,80(r30) <== NOT EXECUTED ffc16078: 81 63 00 10 lwz r11,16(r3) <== NOT EXECUTED ffc1607c: 80 1e 00 54 lwz r0,84(r30) <== NOT EXECUTED ffc16080: 7f 8b 48 00 cmpw cr7,r11,r9 <== NOT EXECUTED ffc16084: 41 9d 00 14 bgt- cr7,ffc16098 <== NOT EXECUTED ffc16088: 40 9e 00 5c bne- cr7,ffc160e4 <== NOT EXECUTED ffc1608c: 81 63 00 14 lwz r11,20(r3) <== NOT EXECUTED ffc16090: 7f 8b 00 40 cmplw cr7,r11,r0 <== NOT EXECUTED ffc16094: 40 9d 00 50 ble- cr7,ffc160e4 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; ffc16098: 91 3f 00 10 stw r9,16(r31) <== NOT EXECUTED ffc1609c: 90 1f 00 14 stw r0,20(r31) <== NOT EXECUTED ffc160a0: 48 00 00 44 b ffc160e4 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) ffc160a4: 80 a3 00 10 lwz r5,16(r3) ffc160a8: 80 c3 00 14 lwz r6,20(r3) ffc160ac: 7f c3 f3 78 mr r3,r30 ffc160b0: 4b ff fd 5d bl ffc15e0c ffc160b4: 2f 83 00 00 cmpwi cr7,r3,0 ffc160b8: 41 be 00 1c beq+ cr7,ffc160d4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); ffc160bc: 48 00 1f b1 bl ffc1806c <__errno> <== NOT EXECUTED ffc160c0: 38 00 00 1c li r0,28 <== NOT EXECUTED ffc160c4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc160c8: 39 20 ff ff li r9,-1 <== NOT EXECUTED ffc160cc: 39 40 ff ff li r10,-1 <== NOT EXECUTED ffc160d0: 48 00 00 1c b ffc160ec <== NOT EXECUTED iop->size = the_jnode->info.file.size; ffc160d4: 81 3e 00 50 lwz r9,80(r30) ffc160d8: 81 5e 00 54 lwz r10,84(r30) ffc160dc: 91 3f 00 08 stw r9,8(r31) ffc160e0: 91 5f 00 0c stw r10,12(r31) } return iop->offset; ffc160e4: 81 3f 00 10 lwz r9,16(r31) ffc160e8: 81 5f 00 14 lwz r10,20(r31) } ffc160ec: 80 01 00 14 lwz r0,20(r1) ffc160f0: 7d 44 53 78 mr r4,r10 ffc160f4: 7d 23 4b 78 mr r3,r9 ffc160f8: 83 c1 00 08 lwz r30,8(r1) ffc160fc: 7c 08 03 a6 mtlr r0 ffc16100: 83 e1 00 0c lwz r31,12(r1) ffc16104: 38 21 00 10 addi r1,r1,16 ffc16108: 4e 80 00 20 blr =============================================================================== ffc16458 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc16458: 94 21 ff f0 stwu r1,-16(r1) ffc1645c: 7c 08 02 a6 mflr r0 ffc16460: 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)) ffc16464: 80 03 00 18 lwz r0,24(r3) rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc16468: 93 c1 00 08 stw r30,8(r1) ffc1646c: 7c 7e 1b 78 mr r30,r3 the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) ffc16470: 70 09 02 04 andi. r9,r0,516 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { ffc16474: 93 e1 00 0c stw r31,12(r1) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; ffc16478: 83 e3 00 3c lwz r31,60(r3) /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) ffc1647c: 41 82 00 64 beq- ffc164e0 && (the_jnode->type == IMFS_LINEAR_FILE)) { ffc16480: 80 1f 00 4c lwz r0,76(r31) ffc16484: 2f 80 00 06 cmpwi cr7,r0,6 ffc16488: 40 be 00 58 bne+ cr7,ffc164e0 <== ALWAYS TAKEN uint32_t count = the_jnode->info.linearfile.size; ffc1648c: 81 1f 00 54 lwz r8,84(r31) <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; ffc16490: 39 20 00 05 li r9,5 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; ffc16494: 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; ffc16498: 91 3f 00 4c stw r9,76(r31) <== 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) ffc1649c: 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; ffc164a0: 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; ffc164a4: 80 ff 00 58 lwz r7,88(r31) <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; ffc164a8: 39 40 00 00 li r10,0 <== NOT EXECUTED ffc164ac: 91 3f 00 50 stw r9,80(r31) <== NOT EXECUTED ffc164b0: 91 5f 00 54 stw r10,84(r31) <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; ffc164b4: 90 1f 00 60 stw r0,96(r31) <== 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; ffc164b8: 90 1f 00 5c stw r0,92(r31) <== 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; ffc164bc: 90 1f 00 58 stw r0,88(r31) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) ffc164c0: 41 be 00 20 beq+ cr7,ffc164e0 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) ffc164c4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc164c8: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc164cc: 38 c0 00 00 li r6,0 <== NOT EXECUTED ffc164d0: 4b ff fc 3d bl ffc1610c <== 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) ffc164d4: 2f 83 ff ff cmpwi cr7,r3,-1 <== NOT EXECUTED ffc164d8: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc164dc: 41 9e 00 34 beq- cr7,ffc16510 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) ffc164e0: 80 1e 00 18 lwz r0,24(r30) ffc164e4: 70 09 02 00 andi. r9,r0,512 ffc164e8: 41 82 00 14 beq- ffc164fc iop->offset = the_jnode->info.file.size; ffc164ec: 81 3f 00 50 lwz r9,80(r31) ffc164f0: 81 5f 00 54 lwz r10,84(r31) ffc164f4: 91 3e 00 10 stw r9,16(r30) ffc164f8: 91 5e 00 14 stw r10,20(r30) iop->size = the_jnode->info.file.size; ffc164fc: 81 3f 00 50 lwz r9,80(r31) ffc16500: 38 60 00 00 li r3,0 ffc16504: 81 5f 00 54 lwz r10,84(r31) ffc16508: 91 3e 00 08 stw r9,8(r30) ffc1650c: 91 5e 00 0c stw r10,12(r30) return 0; } ffc16510: 80 01 00 14 lwz r0,20(r1) ffc16514: 83 c1 00 08 lwz r30,8(r1) ffc16518: 7c 08 03 a6 mtlr r0 ffc1651c: 83 e1 00 0c lwz r31,12(r1) ffc16520: 38 21 00 10 addi r1,r1,16 ffc16524: 4e 80 00 20 blr =============================================================================== ffc15ca4 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { ffc15ca4: 94 21 ff e0 stwu r1,-32(r1) ffc15ca8: 7c 08 02 a6 mflr r0 ffc15cac: 90 01 00 24 stw r0,36(r1) ffc15cb0: 93 e1 00 1c stw r31,28(r1) IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; ffc15cb4: 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 ) { ffc15cb8: 80 1f 00 08 lwz r0,8(r31) ffc15cbc: 2f 80 00 00 cmpwi cr7,r0,0 ffc15cc0: 41 9e 00 14 beq- cr7,ffc15cd4 <== NEVER TAKEN ffc15cc4: 7f e3 fb 78 mr r3,r31 ffc15cc8: 4b ff 4c bd bl ffc0a984 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; ffc15ccc: 38 00 00 00 li r0,0 ffc15cd0: 90 1f 00 08 stw r0,8(r31) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; ffc15cd4: a1 3f 00 34 lhz r9,52(r31) IMFS_update_ctime( the_jnode ); ffc15cd8: 38 61 00 08 addi r3,r1,8 ffc15cdc: 38 80 00 00 li r4,0 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; ffc15ce0: 38 09 ff ff addi r0,r9,-1 ffc15ce4: b0 1f 00 34 sth r0,52(r31) IMFS_update_ctime( the_jnode ); ffc15ce8: 4b fe fe 95 bl ffc05b7c ffc15cec: 80 01 00 08 lwz r0,8(r1) return memfile_check_rmnod( the_jnode ); ffc15cf0: 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 ); ffc15cf4: 90 1f 00 48 stw r0,72(r31) return memfile_check_rmnod( the_jnode ); ffc15cf8: 4b ff ff 35 bl ffc15c2c } ffc15cfc: 80 01 00 24 lwz r0,36(r1) ffc15d00: 83 e1 00 1c lwz r31,28(r1) ffc15d04: 38 21 00 20 addi r1,r1,32 ffc15d08: 7c 08 03 a6 mtlr r0 ffc15d0c: 4e 80 00 20 blr =============================================================================== ffc05ffc : int mknod( const char *pathname, mode_t mode, dev_t dev ) { ffc05ffc: 94 21 ff c0 stwu r1,-64(r1) ffc06000: 7c 08 02 a6 mflr r0 ffc06004: 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) ) ) ffc06008: 70 80 f0 00 andi. r0,r4,61440 int mknod( const char *pathname, mode_t mode, dev_t dev ) { ffc0600c: 93 61 00 2c stw r27,44(r1) ffc06010: 7c bb 2b 78 mr r27,r5 ffc06014: 93 81 00 30 stw r28,48(r1) ffc06018: 7c dc 33 78 mr r28,r6 ffc0601c: 93 c1 00 38 stw r30,56(r1) ffc06020: 7c 9e 23 78 mr r30,r4 ffc06024: 93 a1 00 34 stw r29,52(r1) ffc06028: 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) ) ) ffc0602c: 40 a2 00 10 bne+ ffc0603c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ffc06030: 48 01 20 3d bl ffc1806c <__errno> <== NOT EXECUTED ffc06034: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc06038: 48 00 00 a0 b ffc060d8 <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); ffc0603c: 88 03 00 00 lbz r0,0(r3) ffc06040: 2f 80 00 2f cmpwi cr7,r0,47 ffc06044: 41 9e 00 14 beq- cr7,ffc06058 ffc06048: 2f 80 00 5c cmpwi cr7,r0,92 ffc0604c: 41 9e 00 0c beq- cr7,ffc06058 <== NEVER TAKEN ffc06050: 2f 80 00 00 cmpwi cr7,r0,0 ffc06054: 40 9e 00 38 bne- cr7,ffc0608c <== ALWAYS TAKEN ffc06058: 3d 20 00 00 lis r9,0 ffc0605c: 81 29 26 f4 lwz r9,9972(r9) ffc06060: 39 60 00 01 li r11,1 ffc06064: 80 09 00 24 lwz r0,36(r9) ffc06068: 80 e9 00 18 lwz r7,24(r9) ffc0606c: 81 09 00 1c lwz r8,28(r9) ffc06070: 81 49 00 20 lwz r10,32(r9) ffc06074: 90 e1 00 0c stw r7,12(r1) ffc06078: 91 01 00 10 stw r8,16(r1) ffc0607c: 91 41 00 14 stw r10,20(r1) ffc06080: 90 01 00 18 stw r0,24(r1) ffc06084: 80 09 00 28 lwz r0,40(r9) ffc06088: 48 00 00 34 b ffc060bc ffc0608c: 3d 20 00 00 lis r9,0 ffc06090: 81 29 26 f4 lwz r9,9972(r9) ffc06094: 39 60 00 00 li r11,0 ffc06098: 80 09 00 10 lwz r0,16(r9) ffc0609c: 80 e9 00 04 lwz r7,4(r9) ffc060a0: 81 09 00 08 lwz r8,8(r9) ffc060a4: 81 49 00 0c lwz r10,12(r9) ffc060a8: 90 e1 00 0c stw r7,12(r1) ffc060ac: 91 01 00 10 stw r8,16(r1) ffc060b0: 91 41 00 14 stw r10,20(r1) ffc060b4: 90 01 00 18 stw r0,24(r1) ffc060b8: 80 09 00 14 lwz r0,20(r9) if ( !temp_loc.ops->evalformake_h ) { ffc060bc: 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 ); ffc060c0: 90 01 00 1c stw r0,28(r1) if ( !temp_loc.ops->evalformake_h ) { ffc060c4: 80 09 00 04 lwz r0,4(r9) ffc060c8: 2f 80 00 00 cmpwi cr7,r0,0 ffc060cc: 40 be 00 18 bne+ cr7,ffc060e4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc060d0: 48 01 1f 9d bl ffc1806c <__errno> <== NOT EXECUTED ffc060d4: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc060d8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc060dc: 3b a0 ff ff li r29,-1 <== NOT EXECUTED ffc060e0: 48 00 00 98 b ffc06178 <== NOT EXECUTED } result = (*temp_loc.ops->evalformake_h)( ffc060e4: 3b e1 00 0c addi r31,r1,12 ffc060e8: 7c 09 03 a6 mtctr r0 ffc060ec: 7c 63 5a 14 add r3,r3,r11 ffc060f0: 7f e4 fb 78 mr r4,r31 ffc060f4: 38 a1 00 08 addi r5,r1,8 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) ffc060f8: 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)( ffc060fc: 4e 80 04 21 bctrl &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) ffc06100: 2f 83 00 00 cmpwi cr7,r3,0 ffc06104: 40 9e 00 74 bne- cr7,ffc06178 return -1; if ( !temp_loc.ops->mknod_h ) { ffc06108: 81 21 00 18 lwz r9,24(r1) ffc0610c: 80 09 00 14 lwz r0,20(r9) ffc06110: 2f 80 00 00 cmpwi cr7,r0,0 ffc06114: 40 be 00 20 bne+ cr7,ffc06134 <== ALWAYS TAKEN rtems_filesystem_freenode( &temp_loc ); ffc06118: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc0611c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc06120: 41 be ff b0 beq- cr7,ffc060d0 <== NOT EXECUTED ffc06124: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc06128: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0612c: 4e 80 04 21 bctrl <== NOT EXECUTED ffc06130: 4b ff ff a0 b ffc060d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); ffc06134: 7f c4 f3 78 mr r4,r30 ffc06138: 80 61 00 08 lwz r3,8(r1) ffc0613c: 7f 65 db 78 mr r5,r27 ffc06140: 7c 09 03 a6 mtctr r0 ffc06144: 7f 86 e3 78 mr r6,r28 ffc06148: 7f e7 fb 78 mr r7,r31 ffc0614c: 4e 80 04 21 bctrl rtems_filesystem_freenode( &temp_loc ); ffc06150: 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 ); ffc06154: 7c 7d 1b 78 mr r29,r3 rtems_filesystem_freenode( &temp_loc ); ffc06158: 2f 89 00 00 cmpwi cr7,r9,0 ffc0615c: 41 9e 00 1c beq- cr7,ffc06178 <== NEVER TAKEN ffc06160: 80 09 00 1c lwz r0,28(r9) ffc06164: 2f 80 00 00 cmpwi cr7,r0,0 ffc06168: 41 9e 00 10 beq- cr7,ffc06178 ffc0616c: 7f e3 fb 78 mr r3,r31 ffc06170: 7c 09 03 a6 mtctr r0 ffc06174: 4e 80 04 21 bctrl return result; } ffc06178: 80 01 00 44 lwz r0,68(r1) ffc0617c: 7f a3 eb 78 mr r3,r29 ffc06180: 83 61 00 2c lwz r27,44(r1) ffc06184: 7c 08 03 a6 mtlr r0 ffc06188: 83 81 00 30 lwz r28,48(r1) ffc0618c: 83 a1 00 34 lwz r29,52(r1) ffc06190: 83 c1 00 38 lwz r30,56(r1) ffc06194: 83 e1 00 3c lwz r31,60(r1) ffc06198: 38 21 00 40 addi r1,r1,64 ffc0619c: 4e 80 00 20 blr =============================================================================== ffc061c4 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { ffc061c4: 94 21 ff b8 stwu r1,-72(r1) ffc061c8: 7c 08 02 a6 mflr r0 ffc061cc: 93 61 00 34 stw r27,52(r1) /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { ffc061d0: 7c 9b 23 79 mr. r27,r4 const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { ffc061d4: 93 21 00 2c stw r25,44(r1) ffc061d8: 7c d9 33 78 mr r25,r6 ffc061dc: 93 41 00 30 stw r26,48(r1) ffc061e0: 7c fa 3b 78 mr r26,r7 ffc061e4: 93 81 00 38 stw r28,56(r1) ffc061e8: 7c 7c 1b 78 mr r28,r3 ffc061ec: 93 c1 00 40 stw r30,64(r1) ffc061f0: 7c be 2b 78 mr r30,r5 ffc061f4: 90 01 00 4c stw r0,76(r1) ffc061f8: 93 a1 00 3c stw r29,60(r1) ffc061fc: 93 e1 00 44 stw r31,68(r1) /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { ffc06200: 41 82 00 0c beq- ffc0620c /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && ffc06204: 2b 85 00 01 cmplwi cr7,r5,1 ffc06208: 40 bd 00 10 ble+ cr7,ffc06218 options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; ffc0620c: 48 01 1e 61 bl ffc1806c <__errno> ffc06210: 38 00 00 16 li r0,22 ffc06214: 48 00 00 5c b ffc06270 return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { ffc06218: 80 1b 00 24 lwz r0,36(r27) ffc0621c: 2f 80 00 00 cmpwi cr7,r0,0 ffc06220: 40 be 00 1c bne+ cr7,ffc0623c <== ALWAYS TAKEN errno = ENOTSUP; ffc06224: 48 01 1e 49 bl ffc1806c <__errno> <== NOT EXECUTED ffc06228: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc0622c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc06230: 3b c0 00 00 li r30,0 <== NOT EXECUTED ffc06234: 3b a0 00 00 li r29,0 <== NOT EXECUTED goto cleanup_and_bail; ffc06238: 48 00 01 d0 b ffc06408 <== NOT EXECUTED /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) ffc0623c: 2f 86 00 00 cmpwi cr7,r6,0 ffc06240: 38 60 00 6c li r3,108 ffc06244: 41 9e 00 10 beq- cr7,ffc06254 <== ALWAYS TAKEN size += strlen( device ) + 1; ffc06248: 7c c3 33 78 mr r3,r6 <== NOT EXECUTED ffc0624c: 48 01 30 e1 bl ffc1932c <== NOT EXECUTED ffc06250: 38 63 00 6d addi r3,r3,109 <== NOT EXECUTED temp_mt_entry = malloc( size ); ffc06254: 4b ff fc 55 bl ffc05ea8 if ( !temp_mt_entry ) { ffc06258: 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 ); ffc0625c: 7c 7f 1b 78 mr r31,r3 ffc06260: 7c 7d 1b 78 mr r29,r3 if ( !temp_mt_entry ) { ffc06264: 40 be 00 14 bne+ cr7,ffc06278 <== ALWAYS TAKEN errno = ENOMEM; ffc06268: 48 01 1e 05 bl ffc1806c <__errno> <== NOT EXECUTED ffc0626c: 38 00 00 0c li r0,12 <== NOT EXECUTED ffc06270: 90 03 00 00 stw r0,0(r3) ffc06274: 48 00 01 c8 b ffc0643c return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { ffc06278: 2f 99 00 00 cmpwi cr7,r25,0 errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; ffc0627c: 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; ffc06280: 90 7f 00 2c stw r3,44(r31) temp_mt_entry->options = options; if ( device ) { ffc06284: 41 9e 00 1c beq- cr7,ffc062a0 <== ALWAYS TAKEN temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); ffc06288: 38 03 00 6c addi r0,r3,108 <== NOT EXECUTED strcpy( temp_mt_entry->dev, device ); ffc0628c: 7c 03 03 78 mr r3,r0 <== NOT EXECUTED } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = ffc06290: 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 ); ffc06294: 7f 24 cb 78 mr r4,r25 <== NOT EXECUTED ffc06298: 48 01 2f 85 bl ffc1921c <== NOT EXECUTED ffc0629c: 48 00 00 08 b ffc062a4 <== NOT EXECUTED } else temp_mt_entry->dev = 0; ffc062a0: 93 23 00 68 stw r25,104(r3) /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { ffc062a4: 2f 9a 00 00 cmpwi cr7,r26,0 ffc062a8: 41 9e 00 e0 beq- cr7,ffc06388 if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) ffc062ac: 7f 43 d3 78 mr r3,r26 ffc062b0: 48 01 30 7d bl ffc1932c * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( ffc062b4: 3b c1 00 08 addi r30,r1,8 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) ffc062b8: 7c 64 1b 78 mr r4,r3 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( ffc062bc: 38 a0 00 07 li r5,7 ffc062c0: 7f 43 d3 78 mr r3,r26 ffc062c4: 7f c6 f3 78 mr r6,r30 ffc062c8: 38 e0 00 01 li r7,1 ffc062cc: 4b ff f7 05 bl ffc059d0 ffc062d0: 2f 83 ff ff cmpwi cr7,r3,-1 ffc062d4: 41 9e 01 30 beq- cr7,ffc06404 <== NEVER TAKEN /* * Test for node_type_h */ if (!loc.ops->node_type_h) { ffc062d8: 81 21 00 14 lwz r9,20(r1) ffc062dc: 80 09 00 10 lwz r0,16(r9) ffc062e0: 2f 80 00 00 cmpwi cr7,r0,0 ffc062e4: 40 be 00 10 bne+ cr7,ffc062f4 <== ALWAYS TAKEN errno = ENOTSUP; ffc062e8: 48 01 1d 85 bl ffc1806c <__errno> <== NOT EXECUTED ffc062ec: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc062f0: 48 00 00 20 b ffc06310 <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { ffc062f4: 7f c3 f3 78 mr r3,r30 ffc062f8: 7c 09 03 a6 mtctr r0 ffc062fc: 4e 80 04 21 bctrl ffc06300: 2f 83 00 01 cmpwi cr7,r3,1 ffc06304: 41 be 00 14 beq+ cr7,ffc06318 errno = ENOTDIR; ffc06308: 48 01 1d 65 bl ffc1806c <__errno> ffc0630c: 38 00 00 14 li r0,20 ffc06310: 90 03 00 00 stw r0,0(r3) goto cleanup_and_bail; ffc06314: 48 00 00 f4 b ffc06408 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; ffc06318: 3d 60 00 00 lis r11,0 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; ffc0631c: 3d 20 00 00 lis r9,0 ffc06320: 38 0b 2b f4 addi r0,r11,11252 ffc06324: 81 29 2b f0 lwz r9,11248(r9) !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 ) ffc06328: 81 61 00 08 lwz r11,8(r1) ffc0632c: 48 00 00 14 b ffc06340 ffc06330: 81 49 00 1c lwz r10,28(r9) ffc06334: 7f 8a 58 00 cmpw cr7,r10,r11 ffc06338: 41 9e 00 14 beq- cr7,ffc0634c * 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 ) { ffc0633c: 81 29 00 00 lwz r9,0(r9) ffc06340: 7f 89 00 00 cmpw cr7,r9,r0 ffc06344: 40 9e ff ec bne+ cr7,ffc06330 ffc06348: 48 00 01 24 b ffc0646c /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; ffc0634c: 48 01 1d 21 bl ffc1806c <__errno> ffc06350: 38 00 00 10 li r0,16 ffc06354: 48 00 00 0c b ffc06360 * 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; ffc06358: 48 01 1d 15 bl ffc1806c <__errno> <== NOT EXECUTED ffc0635c: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc06360: 90 03 00 00 stw r0,0(r3) ffc06364: 3b c1 00 08 addi r30,r1,8 goto cleanup_and_bail; ffc06368: 48 00 00 a0 b ffc06408 } if ( loc.ops->mount_h( temp_mt_entry ) ) { ffc0636c: 7f e3 fb 78 mr r3,r31 ffc06370: 7c 09 03 a6 mtctr r0 ffc06374: 3b c1 00 08 addi r30,r1,8 ffc06378: 4e 80 04 21 bctrl ffc0637c: 2f 83 00 00 cmpwi cr7,r3,0 ffc06380: 41 be 00 28 beq+ cr7,ffc063a8 <== ALWAYS TAKEN ffc06384: 48 00 00 84 b ffc06408 <== NOT EXECUTED 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; ffc06388: 93 5f 00 18 stw r26,24(r31) ffc0638c: 3b c0 00 00 li r30,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; ffc06390: 93 5f 00 1c stw r26,28(r31) temp_mt_entry->mt_fs_root.handlers = NULL; ffc06394: 93 5f 00 24 stw r26,36(r31) temp_mt_entry->mt_fs_root.ops = NULL; ffc06398: 93 5f 00 28 stw r26,40(r31) temp_mt_entry->mt_point_node.node_access = NULL; ffc0639c: 93 5f 00 08 stw r26,8(r31) temp_mt_entry->mt_point_node.handlers = NULL; ffc063a0: 93 5f 00 10 stw r26,16(r31) temp_mt_entry->mt_point_node.ops = NULL; ffc063a4: 93 5f 00 14 stw r26,20(r31) temp_mt_entry->mt_point_node.mt_entry = NULL; } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { ffc063a8: 80 1b 00 24 lwz r0,36(r27) ffc063ac: 7f e3 fb 78 mr r3,r31 ffc063b0: 7c 09 03 a6 mtctr r0 ffc063b4: 4e 80 04 21 bctrl ffc063b8: 2f 83 00 00 cmpwi cr7,r3,0 ffc063bc: 41 be 00 24 beq+ cr7,ffc063e0 <== ALWAYS TAKEN /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { ffc063c0: 81 21 00 14 lwz r9,20(r1) <== NOT EXECUTED ffc063c4: 80 09 00 28 lwz r0,40(r9) <== NOT EXECUTED ffc063c8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc063cc: 41 9e 00 3c beq- cr7,ffc06408 <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); ffc063d0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc063d4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc063d8: 4e 80 04 21 bctrl <== NOT EXECUTED ffc063dc: 48 00 00 2c b ffc06408 <== 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 ); ffc063e0: 3c 60 00 00 lis r3,0 ffc063e4: 38 63 2b f0 addi r3,r3,11248 ffc063e8: 7f e4 fb 78 mr r4,r31 ffc063ec: 48 00 45 69 bl ffc0a954 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) ffc063f0: 2f 9c 00 00 cmpwi cr7,r28,0 ffc063f4: 38 60 00 00 li r3,0 ffc063f8: 41 9e 00 48 beq- cr7,ffc06440 <== NEVER TAKEN *mt_entry = temp_mt_entry; ffc063fc: 93 fc 00 00 stw r31,0(r28) ffc06400: 48 00 00 40 b ffc06440 ffc06404: 3b c0 00 00 li r30,0 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); ffc06408: 7f a3 eb 78 mr r3,r29 ffc0640c: 4b ff f6 a9 bl ffc05ab4 if ( loc_to_free ) ffc06410: 2f 9e 00 00 cmpwi cr7,r30,0 ffc06414: 41 be 00 28 beq+ cr7,ffc0643c <== NEVER TAKEN rtems_filesystem_freenode( loc_to_free ); ffc06418: 81 3e 00 0c lwz r9,12(r30) ffc0641c: 2f 89 00 00 cmpwi cr7,r9,0 ffc06420: 41 be 00 1c beq+ cr7,ffc0643c <== NEVER TAKEN ffc06424: 80 09 00 1c lwz r0,28(r9) ffc06428: 2f 80 00 00 cmpwi cr7,r0,0 ffc0642c: 41 be 00 10 beq+ cr7,ffc0643c <== NEVER TAKEN ffc06430: 7f c3 f3 78 mr r3,r30 ffc06434: 7c 09 03 a6 mtctr r0 ffc06438: 4e 80 04 21 bctrl ffc0643c: 38 60 ff ff li r3,-1 return -1; } ffc06440: 80 01 00 4c lwz r0,76(r1) ffc06444: 83 21 00 2c lwz r25,44(r1) ffc06448: 7c 08 03 a6 mtlr r0 ffc0644c: 83 41 00 30 lwz r26,48(r1) ffc06450: 83 61 00 34 lwz r27,52(r1) ffc06454: 83 81 00 38 lwz r28,56(r1) ffc06458: 83 a1 00 3c lwz r29,60(r1) ffc0645c: 83 c1 00 40 lwz r30,64(r1) ffc06460: 83 e1 00 44 lwz r31,68(r1) ffc06464: 38 21 00 48 addi r1,r1,72 ffc06468: 4e 80 00 20 blr * 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; ffc0646c: 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; ffc06470: 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 ){ ffc06474: 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; ffc06478: 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 ){ ffc0647c: 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; ffc06480: 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; ffc06484: 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; ffc06488: 81 61 00 18 lwz r11,24(r1) ffc0648c: 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 ){ ffc06490: 40 9e fe dc bne+ cr7,ffc0636c <== ALWAYS TAKEN ffc06494: 4b ff fe c4 b ffc06358 <== NOT EXECUTED =============================================================================== ffc1d9a4 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { ffc1d9a4: 94 21 ff e8 stwu r1,-24(r1) ffc1d9a8: 7d 80 00 26 mfcr r12 ffc1d9ac: 7c 08 02 a6 mflr r0 ffc1d9b0: 93 c1 00 10 stw r30,16(r1) ffc1d9b4: 7c 9e 23 78 mr r30,r4 ffc1d9b8: 93 e1 00 14 stw r31,20(r1) ffc1d9bc: 7c 7f 1b 78 mr r31,r3 ffc1d9c0: 90 01 00 1c stw r0,28(r1) ffc1d9c4: 93 a1 00 0c stw r29,12(r1) ffc1d9c8: 91 81 00 08 stw r12,8(r1) Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) ffc1d9cc: 48 00 01 a5 bl ffc1db70 <_Timespec_Is_valid> ffc1d9d0: 2f 83 00 00 cmpwi cr7,r3,0 ffc1d9d4: 41 9e 00 1c beq- cr7,ffc1d9f0 * 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 ) ffc1d9d8: 80 1f 00 00 lwz r0,0(r31) ffc1d9dc: 2f 80 00 00 cmpwi cr7,r0,0 ffc1d9e0: 41 9c 00 10 blt- cr7,ffc1d9f0 <== NEVER TAKEN ffc1d9e4: 80 1f 00 04 lwz r0,4(r31) ffc1d9e8: 2f 80 00 00 cmpwi cr7,r0,0 ffc1d9ec: 40 bc 00 10 bge+ cr7,ffc1d9fc <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ffc1d9f0: 4b ff 48 0d bl ffc121fc <__errno> ffc1d9f4: 38 00 00 16 li r0,22 ffc1d9f8: 48 00 00 d4 b ffc1dacc ticks = _Timespec_To_ticks( rqtp ); ffc1d9fc: 7f e3 fb 78 mr r3,r31 ffc1da00: 4b ff 1d 51 bl ffc0f750 <_Timespec_To_ticks> ffc1da04: 2e 1e 00 00 cmpwi cr4,r30,0 * 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 ) { ffc1da08: 7c 7f 1b 79 mr. r31,r3 ffc1da0c: 3d 20 00 00 lis r9,0 ffc1da10: 40 82 00 2c bne- ffc1da3c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc1da14: 81 69 27 d0 lwz r11,10192(r9) ffc1da18: 38 0b 00 01 addi r0,r11,1 ffc1da1c: 90 09 27 d0 stw r0,10192(r9) _Thread_Disable_dispatch(); _Thread_Yield_processor(); ffc1da20: 4b fe e0 95 bl ffc0bab4 <_Thread_Yield_processor> _Thread_Enable_dispatch(); ffc1da24: 4b fe d0 d5 bl ffc0aaf8 <_Thread_Enable_dispatch> if ( rmtp ) { ffc1da28: 41 92 00 b0 beq- cr4,ffc1dad8 rmtp->tv_sec = 0; rmtp->tv_nsec = 0; ffc1da2c: 93 fe 00 04 stw r31,4(r30) ffc1da30: 38 60 00 00 li r3,0 if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { rmtp->tv_sec = 0; ffc1da34: 93 fe 00 00 stw r31,0(r30) ffc1da38: 48 00 00 a4 b ffc1dadc ffc1da3c: 81 69 27 d0 lwz r11,10192(r9) ffc1da40: 38 0b 00 01 addi r0,r11,1 ffc1da44: 90 09 27 d0 stw r0,10192(r9) /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( ffc1da48: 3f a0 00 00 lis r29,0 ffc1da4c: 80 7d 28 10 lwz r3,10256(r29) ffc1da50: 3c 80 10 00 lis r4,4096 ffc1da54: 60 84 00 08 ori r4,r4,8 ffc1da58: 4b fe db 39 bl ffc0b590 <_Thread_Set_state> _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( &_Thread_Executing->Timer, ffc1da5c: 81 3d 28 10 lwz r9,10256(r29) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc1da60: 3d 40 ff c1 lis r10,-63 _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( ffc1da64: 81 69 00 08 lwz r11,8(r9) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc1da68: 38 00 00 00 li r0,0 the_watchdog->routine = routine; ffc1da6c: 39 4a a8 bc addi r10,r10,-22340 the_watchdog->id = id; the_watchdog->user_data = user_data; ffc1da70: 90 09 00 6c stw r0,108(r9) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc1da74: 3c 60 00 00 lis r3,0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc1da78: 91 49 00 64 stw r10,100(r9) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc1da7c: 38 63 2d c8 addi r3,r3,11720 ffc1da80: 38 89 00 48 addi r4,r9,72 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc1da84: 91 69 00 68 stw r11,104(r9) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc1da88: 90 09 00 50 stw r0,80(r9) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc1da8c: 93 e9 00 54 stw r31,84(r9) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc1da90: 4b fe e6 c5 bl ffc0c154 <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); ffc1da94: 4b fe d0 65 bl ffc0aaf8 <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { ffc1da98: 41 92 00 40 beq- cr4,ffc1dad8 ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; ffc1da9c: 81 3d 28 10 lwz r9,10256(r29) _Timespec_From_ticks( ticks, rmtp ); ffc1daa0: 7f c4 f3 78 mr r4,r30 _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= ffc1daa4: 80 09 00 60 lwz r0,96(r9) ffc1daa8: 81 29 00 5c lwz r9,92(r9) ffc1daac: 7c 00 48 50 subf r0,r0,r9 ffc1dab0: 7f e0 fa 14 add r31,r0,r31 _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); ffc1dab4: 7f e3 fb 78 mr r3,r31 ffc1dab8: 48 00 00 89 bl ffc1db40 <_Timespec_From_ticks> */ #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) ffc1dabc: 2f 9f 00 00 cmpwi cr7,r31,0 ffc1dac0: 41 be 00 18 beq+ cr7,ffc1dad8 rtems_set_errno_and_return_minus_one( EINTR ); ffc1dac4: 4b ff 47 39 bl ffc121fc <__errno> ffc1dac8: 38 00 00 04 li r0,4 ffc1dacc: 90 03 00 00 stw r0,0(r3) ffc1dad0: 38 60 ff ff li r3,-1 ffc1dad4: 48 00 00 08 b ffc1dadc ffc1dad8: 38 60 00 00 li r3,0 #endif } return 0; } ffc1dadc: 80 01 00 1c lwz r0,28(r1) ffc1dae0: 81 81 00 08 lwz r12,8(r1) ffc1dae4: 7c 08 03 a6 mtlr r0 ffc1dae8: 83 a1 00 0c lwz r29,12(r1) ffc1daec: 83 c1 00 10 lwz r30,16(r1) ffc1daf0: 7d 80 81 20 mtcrf 8,r12 ffc1daf4: 83 e1 00 14 lwz r31,20(r1) ffc1daf8: 38 21 00 18 addi r1,r1,24 ffc1dafc: 4e 80 00 20 blr =============================================================================== ffc0649c : /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ffc0649c: 7f 83 20 00 cmpw cr7,r3,r4 void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { ffc064a0: 94 21 ff e8 stwu r1,-24(r1) ffc064a4: 7c 08 02 a6 mflr r0 ffc064a8: 93 a1 00 0c stw r29,12(r1) ffc064ac: 7c 7d 1b 78 mr r29,r3 ffc064b0: 93 c1 00 10 stw r30,16(r1) ffc064b4: 7c 9e 23 78 mr r30,r4 ffc064b8: 90 01 00 1c stw r0,28(r1) ffc064bc: 93 e1 00 14 stw r31,20(r1) /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ffc064c0: 40 be 00 10 bne+ cr7,ffc064d0 ptr = _REENT; ffc064c4: 3d 20 00 00 lis r9,0 ffc064c8: 83 e9 26 fc lwz r31,9980(r9) ffc064cc: 48 00 00 08 b ffc064d4 } else { ptr = deleted_task->libc_reent; ffc064d0: 83 e4 01 40 lwz r31,320(r4) } if (ptr && ptr != _global_impure_ptr) { ffc064d4: 2f 9f 00 00 cmpwi cr7,r31,0 ffc064d8: 41 9e 00 2c beq- cr7,ffc06504 <== NEVER TAKEN ffc064dc: 3d 20 00 00 lis r9,0 ffc064e0: 80 09 27 00 lwz r0,9984(r9) ffc064e4: 7f 9f 00 00 cmpw cr7,r31,r0 ffc064e8: 41 9e 00 1c beq- cr7,ffc06504 _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); ffc064ec: 3c 80 ff c0 lis r4,-64 ffc064f0: 38 84 65 38 addi r4,r4,25912 ffc064f4: 7f e3 fb 78 mr r3,r31 ffc064f8: 48 01 26 09 bl ffc18b00 <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); ffc064fc: 7f e3 fb 78 mr r3,r31 ffc06500: 48 00 77 65 bl ffc0dc64 <_Workspace_Free> /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { ffc06504: 7f 9d f0 00 cmpw cr7,r29,r30 #else _Workspace_Free(ptr); #endif } deleted_task->libc_reent = NULL; ffc06508: 38 00 00 00 li r0,0 ffc0650c: 90 1e 01 40 stw r0,320(r30) /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { ffc06510: 40 be 00 0c bne+ cr7,ffc0651c _REENT = 0; ffc06514: 3d 20 00 00 lis r9,0 ffc06518: 90 09 26 fc stw r0,9980(r9) } } ffc0651c: 80 01 00 1c lwz r0,28(r1) ffc06520: 83 a1 00 0c lwz r29,12(r1) ffc06524: 7c 08 03 a6 mtlr r0 ffc06528: 83 c1 00 10 lwz r30,16(r1) ffc0652c: 83 e1 00 14 lwz r31,20(r1) ffc06530: 38 21 00 18 addi r1,r1,24 ffc06534: 4e 80 00 20 blr =============================================================================== ffc06538 : */ int newlib_free_buffers( FILE *fp ) { ffc06538: 94 21 ff f0 stwu r1,-16(r1) ffc0653c: 7c 08 02 a6 mflr r0 ffc06540: 93 e1 00 0c stw r31,12(r1) ffc06544: 7c 7f 1b 78 mr r31,r3 ffc06548: 90 01 00 14 stw r0,20(r1) switch ( fileno(fp) ) { ffc0654c: 48 01 1f f5 bl ffc18540 ffc06550: 2b 83 00 02 cmplwi cr7,r3,2 ffc06554: 41 9d 00 34 bgt- cr7,ffc06588 <== NEVER TAKEN case 0: case 1: case 2: if (fp->_flags & __SMBF) { ffc06558: a0 1f 00 0c lhz r0,12(r31) ffc0655c: 70 09 00 80 andi. r9,r0,128 ffc06560: 41 a2 00 30 beq+ ffc06590 <== ALWAYS TAKEN free( fp->_bf._base ); ffc06564: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc06568: 4b ff f5 4d bl ffc05ab4 <== NOT EXECUTED fp->_flags &= ~__SMBF; ffc0656c: a1 3f 00 0c lhz r9,12(r31) <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; ffc06570: 38 00 00 00 li r0,0 <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; ffc06574: 55 29 06 6e rlwinm r9,r9,0,25,23 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; ffc06578: 90 1f 00 10 stw r0,16(r31) <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; ffc0657c: b1 3f 00 0c sth r9,12(r31) <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; ffc06580: 90 1f 00 00 stw r0,0(r31) <== NOT EXECUTED ffc06584: 48 00 00 0c b ffc06590 <== NOT EXECUTED } break; default: fclose(fp); ffc06588: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc0658c: 48 01 1c 81 bl ffc1820c <== NOT EXECUTED } return 0; } ffc06590: 80 01 00 14 lwz r0,20(r1) ffc06594: 38 60 00 00 li r3,0 ffc06598: 83 e1 00 0c lwz r31,12(r1) ffc0659c: 38 21 00 10 addi r1,r1,16 ffc065a0: 7c 08 03 a6 mtlr r0 ffc065a4: 4e 80 00 20 blr =============================================================================== ffc04a70 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { ffc04a70: 94 21 ff f0 stwu r1,-16(r1) ffc04a74: 7c 08 02 a6 mflr r0 rtems_device_driver status; if ( !initialized ) { ffc04a78: 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)) ) { ffc04a7c: 90 01 00 14 stw r0,20(r1) rtems_device_driver status; if ( !initialized ) { ffc04a80: 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)) ) { ffc04a84: 93 e1 00 0c stw r31,12(r1) ffc04a88: 7c 7f 1b 78 mr r31,r3 rtems_device_driver status; if ( !initialized ) { ffc04a8c: 2f 80 00 00 cmpwi cr7,r0,0 ffc04a90: 40 be 00 34 bne+ cr7,ffc04ac4 initialized = 1; status = rtems_io_register_name( ffc04a94: 3c 60 ff c2 lis r3,-62 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; ffc04a98: 38 00 00 01 li r0,1 status = rtems_io_register_name( ffc04a9c: 38 63 23 e6 addi r3,r3,9190 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; ffc04aa0: 98 09 29 20 stb r0,10528(r9) status = rtems_io_register_name( ffc04aa4: 7f e4 fb 78 mr r4,r31 ffc04aa8: 38 a0 00 00 li r5,0 ffc04aac: 48 00 01 79 bl ffc04c24 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) ffc04ab0: 2f 83 00 00 cmpwi cr7,r3,0 ffc04ab4: 41 be 00 08 beq+ cr7,ffc04abc <== ALWAYS TAKEN rtems_fatal_error_occurred(status); ffc04ab8: 48 00 4d d1 bl ffc09888 <== NOT EXECUTED NULL_major = major; ffc04abc: 3d 20 00 00 lis r9,0 ffc04ac0: 93 e9 27 cc stw r31,10188(r9) } return RTEMS_SUCCESSFUL; } ffc04ac4: 80 01 00 14 lwz r0,20(r1) ffc04ac8: 38 60 00 00 li r3,0 ffc04acc: 83 e1 00 0c lwz r31,12(r1) ffc04ad0: 38 21 00 10 addi r1,r1,16 ffc04ad4: 7c 08 03 a6 mtlr r0 ffc04ad8: 4e 80 00 20 blr =============================================================================== ffc04a50 : void *pargp ) { rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) ffc04a50: 2c 05 00 00 cmpwi r5,0 ffc04a54: 41 82 00 0c beq- ffc04a60 <== ALWAYS TAKEN rw_args->bytes_moved = rw_args->count; ffc04a58: 80 05 00 14 lwz r0,20(r5) <== NOT EXECUTED ffc04a5c: 90 05 00 1c stw r0,28(r5) <== NOT EXECUTED return NULL_SUCCESSFUL; } ffc04a60: 38 60 00 00 li r3,0 ffc04a64: 4e 80 00 20 blr =============================================================================== ffc06814 : int open( const char *pathname, int flags, ... ) { ffc06814: 94 21 ff b0 stwu r1,-80(r1) ffc06818: 7c 08 02 a6 mflr r0 ffc0681c: 93 41 00 38 stw r26,56(r1) /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; ffc06820: 3b 44 00 01 addi r26,r4,1 int open( const char *pathname, int flags, ... ) { ffc06824: 90 01 00 54 stw r0,84(r1) eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) ffc06828: 73 40 00 02 andi. r0,r26,2 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) ffc0682c: 57 5a 17 7a rlwinm r26,r26,2,29,29 int open( const char *pathname, int flags, ... ) { ffc06830: 93 a1 00 44 stw r29,68(r1) ffc06834: 7c 7d 1b 78 mr r29,r3 ffc06838: 93 c1 00 48 stw r30,72(r1) ffc0683c: 7c 9e 23 78 mr r30,r4 ffc06840: 93 21 00 34 stw r25,52(r1) ffc06844: 93 61 00 3c stw r27,60(r1) ffc06848: 93 81 00 40 stw r28,64(r1) ffc0684c: 93 e1 00 4c stw r31,76(r1) ffc06850: 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 ) ffc06854: 41 82 00 08 beq- ffc0685c eval_flags |= RTEMS_LIBIO_PERMS_WRITE; ffc06858: 63 5a 00 02 ori r26,r26,2 va_start(ap, flags); ffc0685c: 38 01 00 58 addi r0,r1,88 ffc06860: 39 21 00 20 addi r9,r1,32 ffc06864: 90 01 00 0c stw r0,12(r1) mode = va_arg( ap, int ); ffc06868: 38 00 00 03 li r0,3 ffc0686c: 98 01 00 08 stb r0,8(r1) * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { ffc06870: 3b 20 00 17 li r25,23 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); ffc06874: 91 21 00 10 stw r9,16(r1) mode = va_arg( ap, int ); ffc06878: 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(); ffc0687c: 48 00 ca 11 bl ffc1328c if ( iop == 0 ) { ffc06880: 7c 7f 1b 79 mr. r31,r3 ffc06884: 41 82 02 20 beq- ffc06aa4 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); ffc06888: 7f a3 eb 78 mr r3,r29 ffc0688c: 48 01 2a a1 bl ffc1932c /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( ffc06890: 3b 81 00 14 addi r28,r1,20 pathname, strlen( pathname ), eval_flags, &loc, true ); ffc06894: 7c 64 1b 78 mr r4,r3 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( ffc06898: 7f 45 d3 78 mr r5,r26 ffc0689c: 7f a3 eb 78 mr r3,r29 ffc068a0: 7f 86 e3 78 mr r6,r28 ffc068a4: 38 e0 00 01 li r7,1 ffc068a8: 4b ff f1 29 bl ffc059d0 pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { ffc068ac: 2f 83 ff ff cmpwi cr7,r3,-1 ffc068b0: 40 be 00 90 bne+ cr7,ffc06940 if ( errno != ENOENT ) { ffc068b4: 48 01 17 b9 bl ffc1806c <__errno> ffc068b8: 80 03 00 00 lwz r0,0(r3) ffc068bc: 2f 80 00 02 cmpwi cr7,r0,2 ffc068c0: 41 9e 00 14 beq- cr7,ffc068d4 rc = errno; ffc068c4: 48 01 17 a9 bl ffc1806c <__errno> ffc068c8: 3b 40 00 00 li r26,0 ffc068cc: 83 23 00 00 lwz r25,0(r3) goto done; ffc068d0: 48 00 01 90 b ffc06a60 } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { ffc068d4: 73 c0 02 00 andi. r0,r30,512 ffc068d8: 3b 40 00 00 li r26,0 ffc068dc: 3b 20 00 02 li r25,2 ffc068e0: 41 a2 01 88 beq+ ffc06a68 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); ffc068e4: 7f a3 eb 78 mr r3,r29 ffc068e8: 63 64 80 00 ori r4,r27,32768 ffc068ec: 38 a0 00 00 li r5,0 ffc068f0: 38 c0 00 00 li r6,0 ffc068f4: 4b ff f7 09 bl ffc05ffc if ( rc ) { ffc068f8: 2f 83 00 00 cmpwi cr7,r3,0 ffc068fc: 41 9e 00 10 beq- cr7,ffc0690c <== ALWAYS TAKEN rc = errno; ffc06900: 48 01 17 6d bl ffc1806c <__errno> <== NOT EXECUTED ffc06904: 83 23 00 00 lwz r25,0(r3) <== NOT EXECUTED goto done; ffc06908: 48 00 01 58 b ffc06a60 <== 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 ); ffc0690c: 7f a3 eb 78 mr r3,r29 ffc06910: 48 01 2a 1d bl ffc1932c ffc06914: 7f 86 e3 78 mr r6,r28 ffc06918: 7c 64 1b 78 mr r4,r3 ffc0691c: 38 a0 00 00 li r5,0 ffc06920: 7f a3 eb 78 mr r3,r29 ffc06924: 38 e0 00 01 li r7,1 ffc06928: 4b ff f0 a9 bl ffc059d0 if ( status != 0 ) { /* The file did not exist */ ffc0692c: 3b 40 00 00 li r26,0 ffc06930: 2f 83 00 00 cmpwi cr7,r3,0 ffc06934: 3b 20 00 0d li r25,13 ffc06938: 40 9e 01 30 bne- cr7,ffc06a68 <== NEVER TAKEN ffc0693c: 48 00 00 18 b ffc06954 rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { ffc06940: 73 c0 0a 00 andi. r0,r30,2560 ffc06944: 7f 9a e3 78 mr r26,r28 ffc06948: 3b 20 00 11 li r25,17 ffc0694c: 2f 80 0a 00 cmpwi cr7,r0,2560 ffc06950: 41 9e 01 18 beq- cr7,ffc06a68 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; ffc06954: 80 01 00 1c lwz r0,28(r1) iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); ffc06958: 7f c3 f3 78 mr r3,r30 ffc0695c: 83 9f 00 18 lwz r28,24(r31) /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; ffc06960: 90 1f 00 40 stw r0,64(r31) iop->file_info = loc.node_access; ffc06964: 80 01 00 14 lwz r0,20(r1) ffc06968: 90 1f 00 3c stw r0,60(r31) iop->flags |= rtems_libio_fcntl_flags( flags ); ffc0696c: 48 00 c9 fd bl ffc13368 iop->pathinfo = loc; if ( !iop->handlers || !iop->handlers->open_h ) { ffc06970: 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; ffc06974: 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 ); ffc06978: 7c 63 e3 78 or r3,r3,r28 iop->pathinfo = loc; ffc0697c: 81 41 00 18 lwz r10,24(r1) if ( !iop->handlers || !iop->handlers->open_h ) { ffc06980: 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; ffc06984: 81 61 00 1c lwz r11,28(r1) ffc06988: 81 01 00 14 lwz r8,20(r1) ffc0698c: 91 5f 00 20 stw r10,32(r31) ffc06990: 91 1f 00 1c stw r8,28(r31) ffc06994: 91 7f 00 24 stw r11,36(r31) ffc06998: 90 1f 00 28 stw r0,40(r31) ffc0699c: 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 ); ffc069a0: 90 7f 00 18 stw r3,24(r31) iop->pathinfo = loc; ffc069a4: 90 1f 00 2c stw r0,44(r31) if ( !iop->handlers || !iop->handlers->open_h ) { ffc069a8: 41 9e 01 54 beq- cr7,ffc06afc <== NEVER TAKEN ffc069ac: 80 09 00 00 lwz r0,0(r9) ffc069b0: 2f 80 00 00 cmpwi cr7,r0,0 ffc069b4: 41 9e 01 48 beq- cr7,ffc06afc <== NEVER TAKEN rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); ffc069b8: 7f a4 eb 78 mr r4,r29 ffc069bc: 7c 09 03 a6 mtctr r0 ffc069c0: 7f 66 db 78 mr r6,r27 ffc069c4: 7f e3 fb 78 mr r3,r31 ffc069c8: 7f c5 f3 78 mr r5,r30 ffc069cc: 4e 80 04 21 bctrl if ( rc ) { ffc069d0: 2f 83 00 00 cmpwi cr7,r3,0 ffc069d4: 41 be 00 14 beq+ cr7,ffc069e8 rc = errno; ffc069d8: 48 01 16 95 bl ffc1806c <__errno> ffc069dc: 3b 41 00 14 addi r26,r1,20 ffc069e0: 83 23 00 00 lwz r25,0(r3) goto done; ffc069e4: 48 00 00 7c b ffc06a60 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { ffc069e8: 73 c0 04 00 andi. r0,r30,1024 ffc069ec: 41 a2 00 c8 beq+ ffc06ab4 rc = ftruncate( iop - rtems_libio_iops, 0 ); ffc069f0: 3d 20 00 00 lis r9,0 ffc069f4: 80 69 27 6c lwz r3,10092(r9) ffc069f8: 3c 00 38 e3 lis r0,14563 ffc069fc: 60 00 8e 39 ori r0,r0,36409 ffc06a00: 7c 63 f8 50 subf r3,r3,r31 ffc06a04: 7c 63 1e 70 srawi r3,r3,3 ffc06a08: 7c 63 01 d6 mullw r3,r3,r0 ffc06a0c: 38 a0 00 00 li r5,0 ffc06a10: 38 c0 00 00 li r6,0 ffc06a14: 48 00 c5 2d bl ffc12f40 if ( rc ) { ffc06a18: 7c 79 1b 79 mr. r25,r3 ffc06a1c: 41 a2 00 98 beq+ ffc06ab4 <== ALWAYS TAKEN if(errno) rc = errno; ffc06a20: 48 01 16 4d bl ffc1806c <__errno> <== NOT EXECUTED ffc06a24: 80 03 00 00 lwz r0,0(r3) <== NOT EXECUTED ffc06a28: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc06a2c: 41 be 00 0c beq+ cr7,ffc06a38 <== NOT EXECUTED ffc06a30: 48 01 16 3d bl ffc1806c <__errno> <== NOT EXECUTED ffc06a34: 83 23 00 00 lwz r25,0(r3) <== NOT EXECUTED close( iop - rtems_libio_iops ); ffc06a38: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc06a3c: 80 69 27 6c lwz r3,10092(r9) <== NOT EXECUTED ffc06a40: 3c 00 38 e3 lis r0,14563 <== NOT EXECUTED ffc06a44: 60 00 8e 39 ori r0,r0,36409 <== NOT EXECUTED ffc06a48: 7f e3 f8 50 subf r31,r3,r31 <== NOT EXECUTED ffc06a4c: 7f e3 1e 70 srawi r3,r31,3 <== NOT EXECUTED ffc06a50: 7c 63 01 d6 mullw r3,r3,r0 <== NOT EXECUTED ffc06a54: 3b 40 00 00 li r26,0 <== NOT EXECUTED ffc06a58: 48 00 c4 21 bl ffc12e78 <== NOT EXECUTED ffc06a5c: 3b e0 00 00 li r31,0 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { ffc06a60: 2f 99 00 00 cmpwi cr7,r25,0 ffc06a64: 41 be 00 50 beq+ cr7,ffc06ab4 <== NEVER TAKEN if ( iop ) ffc06a68: 2f 9f 00 00 cmpwi cr7,r31,0 ffc06a6c: 41 9e 00 0c beq- cr7,ffc06a78 <== NEVER TAKEN rtems_libio_free( iop ); ffc06a70: 7f e3 fb 78 mr r3,r31 ffc06a74: 48 00 c7 a5 bl ffc13218 if ( loc_to_free ) ffc06a78: 2f 9a 00 00 cmpwi cr7,r26,0 ffc06a7c: 41 9e 00 28 beq- cr7,ffc06aa4 rtems_filesystem_freenode( loc_to_free ); ffc06a80: 81 3a 00 0c lwz r9,12(r26) ffc06a84: 2f 89 00 00 cmpwi cr7,r9,0 ffc06a88: 41 9e 00 1c beq- cr7,ffc06aa4 <== NEVER TAKEN ffc06a8c: 80 09 00 1c lwz r0,28(r9) ffc06a90: 2f 80 00 00 cmpwi cr7,r0,0 ffc06a94: 41 9e 00 10 beq- cr7,ffc06aa4 <== NEVER TAKEN ffc06a98: 7f 43 d3 78 mr r3,r26 ffc06a9c: 7c 09 03 a6 mtctr r0 ffc06aa0: 4e 80 04 21 bctrl rtems_set_errno_and_return_minus_one( rc ); ffc06aa4: 48 01 15 c9 bl ffc1806c <__errno> ffc06aa8: 93 23 00 00 stw r25,0(r3) ffc06aac: 38 60 ff ff li r3,-1 ffc06ab0: 48 00 00 20 b ffc06ad0 } return iop - rtems_libio_iops; ffc06ab4: 3d 20 00 00 lis r9,0 ffc06ab8: 80 69 27 6c lwz r3,10092(r9) ffc06abc: 3c 00 38 e3 lis r0,14563 ffc06ac0: 60 00 8e 39 ori r0,r0,36409 ffc06ac4: 7c 63 f8 50 subf r3,r3,r31 ffc06ac8: 7c 63 1e 70 srawi r3,r3,3 ffc06acc: 7c 63 01 d6 mullw r3,r3,r0 } ffc06ad0: 80 01 00 54 lwz r0,84(r1) ffc06ad4: 83 21 00 34 lwz r25,52(r1) ffc06ad8: 7c 08 03 a6 mtlr r0 ffc06adc: 83 41 00 38 lwz r26,56(r1) ffc06ae0: 83 61 00 3c lwz r27,60(r1) ffc06ae4: 83 81 00 40 lwz r28,64(r1) ffc06ae8: 83 a1 00 44 lwz r29,68(r1) ffc06aec: 83 c1 00 48 lwz r30,72(r1) ffc06af0: 83 e1 00 4c lwz r31,76(r1) ffc06af4: 38 21 00 50 addi r1,r1,80 ffc06af8: 4e 80 00 20 blr if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; ffc06afc: 3b 41 00 14 addi r26,r1,20 <== NOT EXECUTED ffc06b00: 3b 20 00 86 li r25,134 <== NOT EXECUTED ffc06b04: 4b ff ff 64 b ffc06a68 <== NOT EXECUTED =============================================================================== ffc0677c : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { ffc0677c: 94 21 ff f0 stwu r1,-16(r1) ffc06780: 7c 08 02 a6 mflr r0 int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { ffc06784: 38 80 00 00 li r4,0 /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { ffc06788: 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) { ffc0678c: 3f e0 ff c2 lis r31,-62 ffc06790: 3b ff 40 18 addi r31,r31,16408 ffc06794: 7f e3 fb 78 mr r3,r31 /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { ffc06798: 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) { ffc0679c: 38 a0 00 00 li r5,0 ffc067a0: 4c c6 31 82 crclr 4*cr1+eq ffc067a4: 48 00 00 71 bl ffc06814 ffc067a8: 2f 83 ff ff cmpwi cr7,r3,-1 ffc067ac: 41 9e 00 54 beq- cr7,ffc06800 /* * 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) ffc067b0: 7f e3 fb 78 mr r3,r31 ffc067b4: 38 80 00 01 li r4,1 ffc067b8: 38 a0 00 00 li r5,0 ffc067bc: 4c c6 31 82 crclr 4*cr1+eq ffc067c0: 48 00 00 55 bl ffc06814 ffc067c4: 2f 83 ff ff cmpwi cr7,r3,-1 ffc067c8: 40 be 00 10 bne+ cr7,ffc067d8 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ ffc067cc: 3c 60 55 54 lis r3,21844 <== NOT EXECUTED ffc067d0: 60 63 44 31 ori r3,r3,17457 <== NOT EXECUTED ffc067d4: 48 00 00 28 b ffc067fc <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) ffc067d8: 7f e3 fb 78 mr r3,r31 ffc067dc: 38 80 00 01 li r4,1 ffc067e0: 38 a0 00 00 li r5,0 ffc067e4: 4c c6 31 82 crclr 4*cr1+eq ffc067e8: 48 00 00 2d bl ffc06814 ffc067ec: 2f 83 ff ff cmpwi cr7,r3,-1 ffc067f0: 40 be 00 10 bne+ cr7,ffc06800 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ ffc067f4: 3c 60 55 54 lis r3,21844 <== NOT EXECUTED ffc067f8: 60 63 44 32 ori r3,r3,17458 <== NOT EXECUTED ffc067fc: 48 00 3a 99 bl ffc0a294 <== NOT EXECUTED } ffc06800: 80 01 00 14 lwz r0,20(r1) ffc06804: 83 e1 00 0c lwz r31,12(r1) ffc06808: 38 21 00 10 addi r1,r1,16 ffc0680c: 7c 08 03 a6 mtlr r0 ffc06810: 4e 80 00 20 blr =============================================================================== ffc07514 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { ffc07514: 94 21 ff e8 stwu r1,-24(r1) ffc07518: 7c 08 02 a6 mflr r0 ffc0751c: 90 01 00 1c stw r0,28(r1) int i; if (tty->termios.c_oflag & OPOST) { ffc07520: 80 04 00 34 lwz r0,52(r4) /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { ffc07524: 93 e1 00 14 stw r31,20(r1) ffc07528: 7c 9f 23 78 mr r31,r4 int i; if (tty->termios.c_oflag & OPOST) { ffc0752c: 70 09 00 01 andi. r9,r0,1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { ffc07530: 98 61 00 08 stb r3,8(r1) int i; if (tty->termios.c_oflag & OPOST) { ffc07534: 41 82 01 3c beq- ffc07670 <== NEVER TAKEN switch (c) { ffc07538: 2f 83 00 09 cmpwi cr7,r3,9 ffc0753c: 41 9e 00 94 beq- cr7,ffc075d0 ffc07540: 2b 83 00 09 cmplwi cr7,r3,9 ffc07544: 41 9d 00 10 bgt- cr7,ffc07554 <== ALWAYS TAKEN ffc07548: 2f 83 00 08 cmpwi cr7,r3,8 <== NOT EXECUTED ffc0754c: 40 be 00 cc bne+ cr7,ffc07618 <== NOT EXECUTED ffc07550: 48 00 00 b0 b ffc07600 <== NOT EXECUTED ffc07554: 2f 83 00 0a cmpwi cr7,r3,10 ffc07558: 41 9e 00 10 beq- cr7,ffc07568 ffc0755c: 2f 83 00 0d cmpwi cr7,r3,13 ffc07560: 40 be 00 b8 bne+ cr7,ffc07618 <== ALWAYS TAKEN ffc07564: 48 00 00 38 b ffc0759c <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) ffc07568: 70 09 00 20 andi. r9,r0,32 ffc0756c: 41 82 00 0c beq- ffc07578 <== ALWAYS TAKEN tty->column = 0; ffc07570: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc07574: 90 04 00 28 stw r0,40(r4) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { ffc07578: 80 1f 00 34 lwz r0,52(r31) ffc0757c: 70 09 00 04 andi. r9,r0,4 ffc07580: 41 a2 00 f0 beq+ ffc07670 <== NEVER TAKEN rtems_termios_puts ("\r", 1, tty); ffc07584: 3c 60 ff c2 lis r3,-62 ffc07588: 38 63 48 95 addi r3,r3,18581 ffc0758c: 38 80 00 01 li r4,1 ffc07590: 7f e5 fb 78 mr r5,r31 ffc07594: 4b ff fe 09 bl ffc0739c ffc07598: 48 00 00 30 b ffc075c8 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) ffc0759c: 70 09 00 10 andi. r9,r0,16 <== NOT EXECUTED ffc075a0: 41 82 00 10 beq- ffc075b0 <== NOT EXECUTED ffc075a4: 81 24 00 28 lwz r9,40(r4) <== NOT EXECUTED ffc075a8: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc075ac: 41 9e 00 d4 beq- cr7,ffc07680 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { ffc075b0: 70 09 00 08 andi. r9,r0,8 <== NOT EXECUTED ffc075b4: 41 82 00 5c beq- ffc07610 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) ffc075b8: 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'; ffc075bc: 38 00 00 0a li r0,10 <== NOT EXECUTED ffc075c0: 98 01 00 08 stb r0,8(r1) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) ffc075c4: 41 82 00 ac beq- ffc07670 <== NOT EXECUTED tty->column = 0; ffc075c8: 38 00 00 00 li r0,0 ffc075cc: 48 00 00 a0 b ffc0766c tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { ffc075d0: 54 00 04 e8 rlwinm r0,r0,0,19,20 ffc075d4: 2f 80 18 00 cmpwi cr7,r0,6144 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); ffc075d8: 80 04 00 28 lwz r0,40(r4) ffc075dc: 54 04 07 7e clrlwi r4,r0,29 ffc075e0: 20 84 00 08 subfic r4,r4,8 ffc075e4: 7c 04 02 14 add r0,r4,r0 if ((tty->termios.c_oflag & TABDLY) == XTABS) { ffc075e8: 40 be 00 84 bne+ cr7,ffc0766c <== NEVER TAKEN tty->column += i; rtems_termios_puts ( " ", i, tty); ffc075ec: 3c 60 ff c2 lis r3,-62 break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; ffc075f0: 90 1f 00 28 stw r0,40(r31) rtems_termios_puts ( " ", i, tty); ffc075f4: 38 63 45 6a addi r3,r3,17770 ffc075f8: 7f e5 fb 78 mr r5,r31 ffc075fc: 48 00 00 80 b ffc0767c } tty->column += i; break; case '\b': if (tty->column > 0) ffc07600: 81 24 00 28 lwz r9,40(r4) <== NOT EXECUTED ffc07604: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc07608: 40 9d 00 68 ble- cr7,ffc07670 <== NOT EXECUTED tty->column--; ffc0760c: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED ffc07610: 91 3f 00 28 stw r9,40(r31) <== NOT EXECUTED ffc07614: 48 00 00 5c b ffc07670 <== NOT EXECUTED break; default: if (tty->termios.c_oflag & OLCUC) ffc07618: 70 09 00 02 andi. r9,r0,2 ffc0761c: 41 82 00 2c beq- ffc07648 <== ALWAYS TAKEN c = toupper(c); ffc07620: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc07624: 80 09 26 f8 lwz r0,9976(r9) <== NOT EXECUTED ffc07628: 7c 69 1b 78 mr r9,r3 <== NOT EXECUTED ffc0762c: 7c 60 1a 14 add r3,r0,r3 <== NOT EXECUTED ffc07630: 88 03 00 01 lbz r0,1(r3) <== NOT EXECUTED ffc07634: 54 00 07 be clrlwi r0,r0,30 <== NOT EXECUTED ffc07638: 2f 80 00 02 cmpwi cr7,r0,2 <== NOT EXECUTED ffc0763c: 40 be 00 08 bne+ cr7,ffc07644 <== NOT EXECUTED ffc07640: 39 29 ff e0 addi r9,r9,-32 <== NOT EXECUTED ffc07644: 99 21 00 08 stb r9,8(r1) <== NOT EXECUTED if (!iscntrl(c)) ffc07648: 3d 20 00 00 lis r9,0 ffc0764c: 88 01 00 08 lbz r0,8(r1) ffc07650: 81 29 26 f8 lwz r9,9976(r9) ffc07654: 7d 29 02 14 add r9,r9,r0 ffc07658: 88 09 00 01 lbz r0,1(r9) ffc0765c: 70 09 00 20 andi. r9,r0,32 ffc07660: 40 82 00 10 bne- ffc07670 <== NEVER TAKEN tty->column++; ffc07664: 81 3f 00 28 lwz r9,40(r31) ffc07668: 38 09 00 01 addi r0,r9,1 ffc0766c: 90 1f 00 28 stw r0,40(r31) break; } } rtems_termios_puts (&c, 1, tty); ffc07670: 7f e5 fb 78 mr r5,r31 ffc07674: 38 61 00 08 addi r3,r1,8 ffc07678: 38 80 00 01 li r4,1 ffc0767c: 4b ff fd 21 bl ffc0739c } ffc07680: 80 01 00 1c lwz r0,28(r1) ffc07684: 83 e1 00 14 lwz r31,20(r1) ffc07688: 38 21 00 18 addi r1,r1,24 ffc0768c: 7c 08 03 a6 mtlr r0 ffc07690: 4e 80 00 20 blr =============================================================================== ffc16888 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc16888: 94 21 ff b8 stwu r1,-72(r1) ffc1688c: 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) ffc16890: 38 80 00 03 li r4,3 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc16894: 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) ffc16898: 3f a0 ff c2 lis r29,-62 ffc1689c: 3b bd 50 70 addi r29,r29,20592 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc168a0: 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) ffc168a4: 3b c1 00 18 addi r30,r1,24 ffc168a8: 38 a0 00 07 li r5,7 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc168ac: 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) ffc168b0: 7f c6 f3 78 mr r6,r30 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc168b4: 7c 7f 1b 78 mr r31,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) ffc168b8: 38 e0 00 01 li r7,1 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { ffc168bc: 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) ffc168c0: 7f a3 eb 78 mr r3,r29 ffc168c4: 4b fe f1 0d bl ffc059d0 ffc168c8: 2f 83 00 00 cmpwi cr7,r3,0 ffc168cc: 41 be 00 2c beq+ cr7,ffc168f8 <== NEVER TAKEN != 0) { if (errno != ENOENT) ffc168d0: 48 00 17 9d bl ffc1806c <__errno> ffc168d4: 80 03 00 00 lwz r0,0(r3) ffc168d8: 2f 80 00 02 cmpwi cr7,r0,2 ffc168dc: 40 be 01 44 bne+ cr7,ffc16a20 <== NEVER TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) ffc168e0: 7f a3 eb 78 mr r3,r29 ffc168e4: 38 80 03 ff li r4,1023 ffc168e8: 4b fe f6 e9 bl ffc05fd0 ffc168ec: 2f 83 00 00 cmpwi cr7,r3,0 ffc168f0: 41 be 00 2c beq+ cr7,ffc1691c <== ALWAYS TAKEN ffc168f4: 48 00 01 2c b ffc16a20 <== NOT EXECUTED return -1; } else rtems_filesystem_freenode(&loc); ffc168f8: 81 21 00 24 lwz r9,36(r1) <== NOT EXECUTED ffc168fc: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc16900: 41 9e 00 1c beq- cr7,ffc1691c <== NOT EXECUTED ffc16904: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc16908: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc1690c: 41 9e 00 10 beq- cr7,ffc1691c <== NOT EXECUTED ffc16910: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc16914: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc16918: 4e 80 04 21 bctrl <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc1691c: 3d 20 00 00 lis r9,0 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); ffc16920: 3d 40 ff c2 lis r10,-62 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc16924: a1 09 28 14 lhz r8,10260(r9) else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); ffc16928: 39 6a 50 75 addi r11,r10,20597 ffc1692c: 81 4a 50 75 lwz r10,20597(r10) ffc16930: a0 0b 00 08 lhz r0,8(r11) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc16934: 3c 80 ff c2 lis r4,-62 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); ffc16938: 81 6b 00 04 lwz r11,4(r11) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc1693c: 7d 05 43 78 mr r5,r8 ffc16940: 38 84 50 80 addi r4,r4,20608 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); ffc16944: 91 41 00 08 stw r10,8(r1) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc16948: 39 08 00 01 addi r8,r8,1 ffc1694c: 38 61 00 12 addi r3,r1,18 ffc16950: b1 09 28 14 sth r8,10260(r9) /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { ffc16954: 3b c1 00 08 addi r30,r1,8 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); ffc16958: 91 61 00 0c stw r11,12(r1) ffc1695c: b0 01 00 10 sth r0,16(r1) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); ffc16960: 4c c6 31 82 crclr 4*cr1+eq ffc16964: 48 00 24 fd bl ffc18e60 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { ffc16968: 7f c3 f3 78 mr r3,r30 ffc1696c: 38 80 01 80 li r4,384 ffc16970: 48 00 08 4d bl ffc171bc ffc16974: 2f 83 00 00 cmpwi cr7,r3,0 ffc16978: 41 be 00 0c beq+ cr7,ffc16984 <== ALWAYS TAKEN if (errno != EEXIST){ ffc1697c: 48 00 16 f1 bl ffc1806c <__errno> <== NOT EXECUTED ffc16980: 48 00 00 a0 b ffc16a20 <== NOT EXECUTED 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); ffc16984: 7f c3 f3 78 mr r3,r30 ffc16988: 38 80 40 00 li r4,16384 ffc1698c: 4c c6 31 82 crclr 4*cr1+eq ffc16990: 4b fe fe 85 bl ffc06814 if (filsdes[0] < 0) { ffc16994: 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); ffc16998: 90 7f 00 00 stw r3,0(r31) if (filsdes[0] < 0) { ffc1699c: 40 bc 00 14 bge+ cr7,ffc169b0 <== NEVER TAKEN err = errno; ffc169a0: 48 00 16 cd bl ffc1806c <__errno> ffc169a4: 83 a3 00 00 lwz r29,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); ffc169a8: 7f c3 f3 78 mr r3,r30 ffc169ac: 48 00 00 68 b ffc16a14 } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); ffc169b0: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc169b4: 80 09 26 ac lwz r0,9900(r9) <== NOT EXECUTED ffc169b8: 39 20 00 00 li r9,0 <== NOT EXECUTED ffc169bc: 7f 83 00 40 cmplw cr7,r3,r0 <== NOT EXECUTED ffc169c0: 40 9c 00 14 bge- cr7,ffc169d4 <== NOT EXECUTED ffc169c4: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc169c8: 1c 63 00 48 mulli r3,r3,72 <== NOT EXECUTED ffc169cc: 81 29 27 6c lwz r9,10092(r9) <== NOT EXECUTED ffc169d0: 7d 29 1a 14 add r9,r9,r3 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; ffc169d4: 80 09 00 18 lwz r0,24(r9) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); ffc169d8: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED ffc169dc: 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; ffc169e0: 54 00 00 3c rlwinm r0,r0,0,0,30 <== NOT EXECUTED ffc169e4: 90 09 00 18 stw r0,24(r9) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { ffc169e8: 3b a0 00 00 li r29,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); ffc169ec: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc169f0: 4b fe fe 25 bl ffc06814 <== NOT EXECUTED if (filsdes[1] < 0) { ffc169f4: 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); ffc169f8: 90 7f 00 04 stw r3,4(r31) <== NOT EXECUTED if (filsdes[1] < 0) { ffc169fc: 40 bc 00 14 bge+ cr7,ffc16a10 <== NOT EXECUTED err = errno; ffc16a00: 48 00 16 6d bl ffc1806c <__errno> <== NOT EXECUTED ffc16a04: 83 a3 00 00 lwz r29,0(r3) <== NOT EXECUTED close(filsdes[0]); ffc16a08: 80 7f 00 00 lwz r3,0(r31) <== NOT EXECUTED ffc16a0c: 4b ff c4 6d bl ffc12e78 <== NOT EXECUTED } unlink(fifopath); ffc16a10: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED ffc16a14: 4b ff 22 b1 bl ffc08cc4 } rtems_set_errno_and_return_minus_one(err); ffc16a18: 48 00 16 55 bl ffc1806c <__errno> ffc16a1c: 93 a3 00 00 stw r29,0(r3) } ffc16a20: 80 01 00 4c lwz r0,76(r1) ffc16a24: 38 60 ff ff li r3,-1 ffc16a28: 83 a1 00 3c lwz r29,60(r1) ffc16a2c: 7c 08 03 a6 mtlr r0 ffc16a30: 83 c1 00 40 lwz r30,64(r1) ffc16a34: 83 e1 00 44 lwz r31,68(r1) ffc16a38: 38 21 00 48 addi r1,r1,72 ffc16a3c: 4e 80 00 20 blr =============================================================================== ffc11568 : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { ffc11568: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc1156c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc11570: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED ffc11574: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED ffc11578: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); ffc1157c: 80 63 00 2c lwz r3,44(r3) <== NOT EXECUTED ffc11580: 48 00 28 e9 bl ffc13e68 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); ffc11584: 80 7f 00 30 lwz r3,48(r31) <== NOT EXECUTED ffc11588: 48 00 28 e1 bl ffc13e68 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); ffc1158c: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED ffc11590: 4b ff 84 0d bl ffc0999c <== NOT EXECUTED free(pipe->Buffer); ffc11594: 80 7f 00 00 lwz r3,0(r31) <== NOT EXECUTED ffc11598: 4b ff 45 1d bl ffc05ab4 <== NOT EXECUTED free(pipe); ffc1159c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc115a0: 4b ff 45 15 bl ffc05ab4 <== NOT EXECUTED } ffc115a4: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc115a8: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc115ac: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc115b0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc115b4: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc110c0 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { ffc110c0: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc110c4: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc110c8: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED if (cmd == FIONREAD) { ffc110cc: 3c 00 40 04 lis r0,16388 <== NOT EXECUTED ffc110d0: 60 00 66 7f ori r0,r0,26239 <== NOT EXECUTED ffc110d4: 7f 84 00 00 cmpw cr7,r4,r0 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { ffc110d8: 93 c1 00 08 stw r30,8(r1) <== NOT EXECUTED ffc110dc: 7c be 2b 78 mr r30,r5 <== NOT EXECUTED ffc110e0: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED ffc110e4: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED if (cmd == FIONREAD) { ffc110e8: 38 60 ff ea li r3,-22 <== NOT EXECUTED ffc110ec: 40 be 00 40 bne+ cr7,ffc1112c <== NOT EXECUTED if (buffer == NULL) ffc110f0: 2f 85 00 00 cmpwi cr7,r5,0 <== NOT EXECUTED ffc110f4: 38 60 ff f2 li r3,-14 <== NOT EXECUTED ffc110f8: 41 be 00 34 beq+ cr7,ffc1112c <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) ffc110fc: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED ffc11100: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc11104: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc11108: 4b ff 89 61 bl ffc09a68 <== NOT EXECUTED ffc1110c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc11110: 38 60 ff fc li r3,-4 <== NOT EXECUTED ffc11114: 40 be 00 18 bne+ cr7,ffc1112c <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; ffc11118: 80 1f 00 0c lwz r0,12(r31) <== NOT EXECUTED PIPE_UNLOCK(pipe); ffc1111c: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; ffc11120: 90 1e 00 00 stw r0,0(r30) <== NOT EXECUTED PIPE_UNLOCK(pipe); ffc11124: 4b ff 8a 89 bl ffc09bac <== NOT EXECUTED ffc11128: 38 60 00 00 li r3,0 <== NOT EXECUTED return 0; } return -EINVAL; } ffc1112c: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc11130: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc11134: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc11138: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc1113c: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc11140: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc11048 : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } ffc11048: 38 60 ff e3 li r3,-29 <== NOT EXECUTED ffc1104c: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc11144 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc11144: 94 21 ff c8 stwu r1,-56(r1) <== NOT EXECUTED ffc11148: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc1114c: 90 01 00 3c stw r0,60(r1) <== NOT EXECUTED ffc11150: 93 e1 00 34 stw r31,52(r1) <== NOT EXECUTED ffc11154: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc11158: 80 63 00 28 lwz r3,40(r3) <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc1115c: 93 a1 00 2c stw r29,44(r1) <== NOT EXECUTED ffc11160: 7c 9d 23 78 mr r29,r4 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc11164: 38 80 00 00 li r4,0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc11168: 93 c1 00 30 stw r30,48(r1) <== NOT EXECUTED ffc1116c: 7c be 2b 78 mr r30,r5 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc11170: 38 a0 00 00 li r5,0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc11174: 93 01 00 18 stw r24,24(r1) <== NOT EXECUTED ffc11178: 7c d8 33 78 mr r24,r6 <== NOT EXECUTED ffc1117c: 93 21 00 1c stw r25,28(r1) <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); ffc11180: 3b 21 00 08 addi r25,r1,8 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc11184: 93 81 00 28 stw r28,40(r1) <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc11188: 3b 80 00 00 li r28,0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ffc1118c: 93 41 00 20 stw r26,32(r1) <== NOT EXECUTED ffc11190: 93 61 00 24 stw r27,36(r1) <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ffc11194: 4b ff 88 d5 bl ffc09a68 <== NOT EXECUTED ffc11198: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc1119c: 41 be 01 44 beq+ cr7,ffc112e0 <== NOT EXECUTED ffc111a0: 3b 80 ff fc li r28,-4 <== NOT EXECUTED ffc111a4: 48 00 01 5c b ffc11300 <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) ffc111a8: 80 1f 00 14 lwz r0,20(r31) <== NOT EXECUTED ffc111ac: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc111b0: 41 9e 01 38 beq- cr7,ffc112e8 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { ffc111b4: 80 18 00 18 lwz r0,24(r24) <== NOT EXECUTED ffc111b8: 70 09 00 01 andi. r9,r0,1 <== NOT EXECUTED ffc111bc: 41 a2 00 0c beq+ ffc111c8 <== NOT EXECUTED ffc111c0: 3b 60 ff f5 li r27,-11 <== NOT EXECUTED ffc111c4: 48 00 01 28 b ffc112ec <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; ffc111c8: 81 3f 00 18 lwz r9,24(r31) <== NOT EXECUTED PIPE_UNLOCK(pipe); ffc111cc: 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 ++; ffc111d0: 38 09 00 01 addi r0,r9,1 <== NOT EXECUTED ffc111d4: 90 1f 00 18 stw r0,24(r31) <== NOT EXECUTED PIPE_UNLOCK(pipe); ffc111d8: 4b ff 89 d5 bl ffc09bac <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) ffc111dc: 80 7f 00 2c lwz r3,44(r31) <== NOT EXECUTED ffc111e0: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc111e4: 48 00 2d d1 bl ffc13fb4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ffc111e8: 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)) ffc111ec: 33 63 ff ff addic r27,r3,-1 <== NOT EXECUTED ffc111f0: 7f 7b d9 10 subfe r27,r27,r27 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ffc111f4: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED ffc111f8: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc111fc: 4b ff 88 6d bl ffc09a68 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ffc11200: 57 7b 07 7a rlwinm r27,r27,0,29,29 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ffc11204: 2f 03 00 00 cmpwi cr6,r3,0 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ffc11208: 3b 7b ff fc addi r27,r27,-4 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) ffc1120c: 2f 9b 00 00 cmpwi cr7,r27,0 <== 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)) { ffc11210: 41 ba 00 0c beq+ cr6,ffc1121c <== NOT EXECUTED ffc11214: 3b 60 ff fc li r27,-4 <== NOT EXECUTED ffc11218: 48 00 00 dc b ffc112f4 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; ffc1121c: 81 3f 00 18 lwz r9,24(r31) <== NOT EXECUTED ffc11220: 38 09 ff ff addi r0,r9,-1 <== NOT EXECUTED ffc11224: 90 1f 00 18 stw r0,24(r31) <== NOT EXECUTED if (ret != 0) ffc11228: 40 9e 00 c4 bne- cr7,ffc112ec <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { ffc1122c: 83 7f 00 0c lwz r27,12(r31) <== NOT EXECUTED ffc11230: 2f 9b 00 00 cmpwi cr7,r27,0 <== NOT EXECUTED ffc11234: 41 9e ff 74 beq+ cr7,ffc111a8 <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); ffc11238: 7c 1c f0 50 subf r0,r28,r30 <== NOT EXECUTED ffc1123c: 7f 9b 00 40 cmplw cr7,r27,r0 <== NOT EXECUTED ffc11240: 40 9d 00 08 ble- cr7,ffc11248 <== NOT EXECUTED ffc11244: 7c 1b 03 78 mr r27,r0 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; ffc11248: 80 1f 00 08 lwz r0,8(r31) <== NOT EXECUTED ffc1124c: 7c 7d e2 14 add r3,r29,r28 <== NOT EXECUTED ffc11250: 83 5f 00 04 lwz r26,4(r31) <== NOT EXECUTED ffc11254: 80 9f 00 00 lwz r4,0(r31) <== NOT EXECUTED ffc11258: 7f 40 d0 50 subf r26,r0,r26 <== NOT EXECUTED if (chunk > chunk1) { ffc1125c: 7f 9b d0 00 cmpw cr7,r27,r26 <== NOT EXECUTED ffc11260: 40 9d 00 24 ble- cr7,ffc11284 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); ffc11264: 7c 84 02 14 add r4,r4,r0 <== NOT EXECUTED ffc11268: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED ffc1126c: 48 00 79 e9 bl ffc18c54 <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); ffc11270: 7c 7c d2 14 add r3,r28,r26 <== NOT EXECUTED ffc11274: 80 9f 00 00 lwz r4,0(r31) <== NOT EXECUTED ffc11278: 7c 7d 1a 14 add r3,r29,r3 <== NOT EXECUTED ffc1127c: 7c ba d8 50 subf r5,r26,r27 <== NOT EXECUTED ffc11280: 48 00 00 0c b ffc1128c <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); ffc11284: 7c 84 02 14 add r4,r4,r0 <== NOT EXECUTED ffc11288: 7f 65 db 78 mr r5,r27 <== NOT EXECUTED ffc1128c: 48 00 79 c9 bl ffc18c54 <== NOT EXECUTED pipe->Start += chunk; ffc11290: 81 3f 00 08 lwz r9,8(r31) <== NOT EXECUTED pipe->Start %= pipe->Size; ffc11294: 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; ffc11298: 7d 3b 4a 14 add r9,r27,r9 <== NOT EXECUTED pipe->Start %= pipe->Size; pipe->Length -= chunk; ffc1129c: 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; ffc112a0: 7d 49 5b 96 divwu r10,r9,r11 <== NOT EXECUTED pipe->Length -= chunk; ffc112a4: 7c 1b 00 50 subf r0,r27,r0 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) ffc112a8: 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; ffc112ac: 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; ffc112b0: 7d 6a 59 d6 mullw r11,r10,r11 <== NOT EXECUTED ffc112b4: 7d 2b 48 50 subf r9,r11,r9 <== NOT EXECUTED ffc112b8: 91 3f 00 08 stw r9,8(r31) <== NOT EXECUTED pipe->Length -= chunk; /* For buffering optimization */ if (PIPE_EMPTY(pipe)) ffc112bc: 40 9e 00 08 bne- cr7,ffc112c4 <== NOT EXECUTED pipe->Start = 0; ffc112c0: 90 1f 00 08 stw r0,8(r31) <== NOT EXECUTED if (pipe->waitingWriters > 0) ffc112c4: 80 1f 00 1c lwz r0,28(r31) <== NOT EXECUTED ffc112c8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc112cc: 41 be 00 10 beq+ cr7,ffc112dc <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); ffc112d0: 80 7f 00 30 lwz r3,48(r31) <== NOT EXECUTED ffc112d4: 7f 24 cb 78 mr r4,r25 <== NOT EXECUTED ffc112d8: 48 00 2c 5d bl ffc13f34 <== NOT EXECUTED read += chunk; ffc112dc: 7f 9c da 14 add r28,r28,r27 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { ffc112e0: 7f 9c f0 40 cmplw cr7,r28,r30 <== NOT EXECUTED ffc112e4: 41 9c ff 48 blt+ cr7,ffc1122c <== NOT EXECUTED ffc112e8: 3b 60 00 00 li r27,0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); ffc112ec: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED ffc112f0: 4b ff 88 bd bl ffc09bac <== NOT EXECUTED out_nolock: if (read > 0) ffc112f4: 2f 9c 00 00 cmpwi cr7,r28,0 <== NOT EXECUTED ffc112f8: 41 bd 00 08 bgt+ cr7,ffc11300 <== NOT EXECUTED ffc112fc: 7f 7c db 78 mr r28,r27 <== NOT EXECUTED return read; return ret; } ffc11300: 80 01 00 3c lwz r0,60(r1) <== NOT EXECUTED ffc11304: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc11308: 83 01 00 18 lwz r24,24(r1) <== NOT EXECUTED ffc1130c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc11310: 83 21 00 1c lwz r25,28(r1) <== NOT EXECUTED ffc11314: 83 41 00 20 lwz r26,32(r1) <== NOT EXECUTED ffc11318: 83 61 00 24 lwz r27,36(r1) <== NOT EXECUTED ffc1131c: 83 81 00 28 lwz r28,40(r1) <== NOT EXECUTED ffc11320: 83 a1 00 2c lwz r29,44(r1) <== NOT EXECUTED ffc11324: 83 c1 00 30 lwz r30,48(r1) <== NOT EXECUTED ffc11328: 83 e1 00 34 lwz r31,52(r1) <== NOT EXECUTED ffc1132c: 38 21 00 38 addi r1,r1,56 <== NOT EXECUTED ffc11330: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc115b8 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc115b8: 94 21 ff d8 stwu r1,-40(r1) <== NOT EXECUTED ffc115bc: 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, ffc115c0: 38 a0 00 00 li r5,0 <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc115c4: 90 01 00 2c stw r0,44(r1) <== NOT EXECUTED ffc115c8: 93 e1 00 24 stw r31,36(r1) <== NOT EXECUTED pipe_control_t *pipe = *pipep; ffc115cc: 83 e3 00 00 lwz r31,0(r3) <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc115d0: 93 a1 00 1c stw r29,28(r1) <== NOT EXECUTED ffc115d4: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, ffc115d8: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc115dc: 93 c1 00 20 stw r30,32(r1) <== NOT EXECUTED ffc115e0: 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, ffc115e4: 38 80 00 00 li r4,0 <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ffc115e8: 93 81 00 18 stw r28,24(r1) <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, ffc115ec: 4b ff 84 7d bl ffc09a68 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) ffc115f0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc115f4: 40 9e 00 50 bne- cr7,ffc11644 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); ffc115f8: 83 de 00 18 lwz r30,24(r30) <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) ffc115fc: 73 c0 00 02 andi. r0,r30,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); ffc11600: 57 de 07 7c rlwinm r30,r30,0,29,30 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) ffc11604: 41 82 00 10 beq- ffc11614 <== NOT EXECUTED pipe->Readers --; ffc11608: 81 3f 00 10 lwz r9,16(r31) <== NOT EXECUTED ffc1160c: 38 09 ff ff addi r0,r9,-1 <== NOT EXECUTED ffc11610: 90 1f 00 10 stw r0,16(r31) <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) ffc11614: 73 c0 00 04 andi. r0,r30,4 <== NOT EXECUTED ffc11618: 41 82 00 10 beq- ffc11628 <== NOT EXECUTED pipe->Writers --; ffc1161c: 81 3f 00 14 lwz r9,20(r31) <== NOT EXECUTED ffc11620: 38 09 ff ff addi r0,r9,-1 <== NOT EXECUTED ffc11624: 90 1f 00 14 stw r0,20(r31) <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, ffc11628: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc1162c: 80 69 2a 50 lwz r3,10832(r9) <== NOT EXECUTED ffc11630: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc11634: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc11638: 4b ff 84 31 bl ffc09a68 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) ffc1163c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc11640: 41 be 00 08 beq+ cr7,ffc11648 <== NOT EXECUTED rtems_fatal_error_occurred(sc); ffc11644: 4b ff 8c 51 bl ffc0a294 <== NOT EXECUTED PIPE_UNLOCK(pipe); ffc11648: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED ffc1164c: 4b ff 85 61 bl ffc09bac <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { ffc11650: 80 1f 00 10 lwz r0,16(r31) <== NOT EXECUTED ffc11654: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc11658: 40 9e 00 30 bne- cr7,ffc11688 <== NOT EXECUTED ffc1165c: 83 9f 00 14 lwz r28,20(r31) <== NOT EXECUTED ffc11660: 2f 9c 00 00 cmpwi cr7,r28,0 <== NOT EXECUTED ffc11664: 40 be 00 14 bne+ cr7,ffc11678 <== NOT EXECUTED #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); ffc11668: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc1166c: 4b ff fe fd bl ffc11568 <== NOT EXECUTED *pipep = NULL; ffc11670: 93 9d 00 00 stw r28,0(r29) <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { ffc11674: 48 00 00 34 b ffc116a8 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) ffc11678: 2f 9e 00 04 cmpwi cr7,r30,4 <== NOT EXECUTED ffc1167c: 41 be 00 0c beq+ cr7,ffc11688 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); ffc11680: 80 7f 00 30 lwz r3,48(r31) <== NOT EXECUTED ffc11684: 48 00 00 1c b ffc116a0 <== NOT EXECUTED else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) ffc11688: 80 1f 00 14 lwz r0,20(r31) <== NOT EXECUTED ffc1168c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc11690: 40 9e 00 18 bne- cr7,ffc116a8 <== NOT EXECUTED ffc11694: 2f 9e 00 02 cmpwi cr7,r30,2 <== NOT EXECUTED ffc11698: 41 9e 00 10 beq- cr7,ffc116a8 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); ffc1169c: 80 7f 00 2c lwz r3,44(r31) <== NOT EXECUTED ffc116a0: 38 81 00 08 addi r4,r1,8 <== NOT EXECUTED ffc116a4: 48 00 28 91 bl ffc13f34 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); ffc116a8: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc116ac: 80 69 2a 50 lwz r3,10832(r9) <== NOT EXECUTED ffc116b0: 4b ff 84 fd bl ffc09bac <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } ffc116b4: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc116b8: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc116bc: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc116c0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc116c4: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc116c8: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc116cc: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc116d0: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc116d4: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc11334 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { ffc11334: 94 21 ff c0 stwu r1,-64(r1) <== NOT EXECUTED ffc11338: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc1133c: 93 c1 00 38 stw r30,56(r1) <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) ffc11340: 7c be 2b 79 mr. r30,r5 <== NOT EXECUTED pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { ffc11344: 92 e1 00 1c stw r23,28(r1) <== NOT EXECUTED ffc11348: 7c d7 33 78 mr r23,r6 <== NOT EXECUTED ffc1134c: 93 81 00 30 stw r28,48(r1) <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) ffc11350: 3b 80 00 00 li r28,0 <== NOT EXECUTED pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { ffc11354: 93 a1 00 34 stw r29,52(r1) <== NOT EXECUTED ffc11358: 7c 9d 23 78 mr r29,r4 <== NOT EXECUTED ffc1135c: 93 e1 00 3c stw r31,60(r1) <== NOT EXECUTED ffc11360: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED ffc11364: 90 01 00 44 stw r0,68(r1) <== NOT EXECUTED ffc11368: 93 01 00 20 stw r24,32(r1) <== NOT EXECUTED ffc1136c: 93 21 00 24 stw r25,36(r1) <== NOT EXECUTED ffc11370: 93 41 00 28 stw r26,40(r1) <== NOT EXECUTED ffc11374: 93 61 00 2c stw r27,44(r1) <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) ffc11378: 41 a2 01 b8 beq+ ffc11530 <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) ffc1137c: 80 63 00 28 lwz r3,40(r3) <== NOT EXECUTED ffc11380: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc11384: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc11388: 4b ff 86 e1 bl ffc09a68 <== NOT EXECUTED ffc1138c: 3b 80 ff fc li r28,-4 <== NOT EXECUTED ffc11390: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc11394: 40 9e 01 9c bne- cr7,ffc11530 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { ffc11398: 80 1f 00 10 lwz r0,16(r31) <== NOT EXECUTED ffc1139c: 3b 60 ff e0 li r27,-32 <== NOT EXECUTED ffc113a0: 3b 80 00 00 li r28,0 <== NOT EXECUTED ffc113a4: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc113a8: 41 9e 01 60 beq- cr7,ffc11508 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; ffc113ac: 80 1f 00 04 lwz r0,4(r31) <== NOT EXECUTED ffc113b0: 7f d9 f3 78 mr r25,r30 <== NOT EXECUTED ffc113b4: 7f 9e 00 40 cmplw cr7,r30,r0 <== NOT EXECUTED ffc113b8: 40 9d 00 08 ble- cr7,ffc113c0 <== NOT EXECUTED ffc113bc: 3b 20 00 01 li r25,1 <== NOT EXECUTED ffc113c0: 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); ffc113c4: 3b 01 00 08 addi r24,r1,8 <== NOT EXECUTED ffc113c8: 48 00 01 34 b ffc114fc <== 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)) { ffc113cc: 80 17 00 18 lwz r0,24(r23) <== NOT EXECUTED ffc113d0: 70 09 00 01 andi. r9,r0,1 <== NOT EXECUTED ffc113d4: 41 a2 00 0c beq+ ffc113e0 <== NOT EXECUTED ffc113d8: 3b 60 ff f5 li r27,-11 <== NOT EXECUTED ffc113dc: 48 00 01 2c b ffc11508 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; ffc113e0: 81 3f 00 1c lwz r9,28(r31) <== NOT EXECUTED PIPE_UNLOCK(pipe); ffc113e4: 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 ++; ffc113e8: 38 09 00 01 addi r0,r9,1 <== NOT EXECUTED ffc113ec: 90 1f 00 1c stw r0,28(r31) <== NOT EXECUTED PIPE_UNLOCK(pipe); ffc113f0: 4b ff 87 bd bl ffc09bac <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) ffc113f4: 80 7f 00 30 lwz r3,48(r31) <== NOT EXECUTED ffc113f8: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc113fc: 48 00 2b b9 bl ffc13fb4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ffc11400: 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)) ffc11404: 33 63 ff ff addic r27,r3,-1 <== NOT EXECUTED ffc11408: 7f 7b d9 10 subfe r27,r27,r27 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ffc1140c: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED ffc11410: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc11414: 4b ff 86 55 bl ffc09a68 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ffc11418: 57 7b 07 7a rlwinm r27,r27,0,29,29 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ffc1141c: 2f 03 00 00 cmpwi cr6,r3,0 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ffc11420: 3b 7b ff fc addi r27,r27,-4 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; if (ret != 0) ffc11424: 2f 9b 00 00 cmpwi cr7,r27,0 <== 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)) { ffc11428: 41 ba 00 0c beq+ cr6,ffc11434 <== NOT EXECUTED ffc1142c: 3b 60 ff fc li r27,-4 <== NOT EXECUTED ffc11430: 48 00 00 f4 b ffc11524 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; ffc11434: 81 3f 00 1c lwz r9,28(r31) <== NOT EXECUTED ffc11438: 38 09 ff ff addi r0,r9,-1 <== NOT EXECUTED ffc1143c: 90 1f 00 1c stw r0,28(r31) <== NOT EXECUTED if (ret != 0) ffc11440: 40 9e 00 c8 bne- cr7,ffc11508 <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { ffc11444: 80 1f 00 10 lwz r0,16(r31) <== NOT EXECUTED ffc11448: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc1144c: 40 be 00 0c bne+ cr7,ffc11458 <== NOT EXECUTED ffc11450: 3b 60 ff e0 li r27,-32 <== NOT EXECUTED ffc11454: 48 00 00 b4 b ffc11508 <== 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) { ffc11458: 83 5f 00 04 lwz r26,4(r31) <== NOT EXECUTED ffc1145c: 80 1f 00 0c lwz r0,12(r31) <== NOT EXECUTED ffc11460: 7f 60 d0 50 subf r27,r0,r26 <== NOT EXECUTED ffc11464: 7f 9b c8 40 cmplw cr7,r27,r25 <== NOT EXECUTED ffc11468: 41 9c ff 64 blt+ cr7,ffc113cc <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); ffc1146c: 7d 3c f0 50 subf r9,r28,r30 <== NOT EXECUTED ffc11470: 7f 9b 48 40 cmplw cr7,r27,r9 <== NOT EXECUTED ffc11474: 40 9d 00 08 ble- cr7,ffc1147c <== NOT EXECUTED ffc11478: 7d 3b 4b 78 mr r27,r9 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); ffc1147c: 81 3f 00 08 lwz r9,8(r31) <== NOT EXECUTED ffc11480: 7c 9d e2 14 add r4,r29,r28 <== NOT EXECUTED ffc11484: 80 7f 00 00 lwz r3,0(r31) <== NOT EXECUTED ffc11488: 7d 20 4a 14 add r9,r0,r9 <== NOT EXECUTED ffc1148c: 7c 09 d3 96 divwu r0,r9,r26 <== NOT EXECUTED ffc11490: 7c 00 d1 d6 mullw r0,r0,r26 <== NOT EXECUTED ffc11494: 7c 00 48 50 subf r0,r0,r9 <== NOT EXECUTED ffc11498: 7f 40 d0 50 subf r26,r0,r26 <== NOT EXECUTED if (chunk > chunk1) { ffc1149c: 7f 9b d0 00 cmpw cr7,r27,r26 <== NOT EXECUTED ffc114a0: 40 9d 00 24 ble- cr7,ffc114c4 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); ffc114a4: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED ffc114a8: 7c 63 02 14 add r3,r3,r0 <== NOT EXECUTED ffc114ac: 48 00 77 a9 bl ffc18c54 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); ffc114b0: 7c 9a e2 14 add r4,r26,r28 <== NOT EXECUTED ffc114b4: 80 7f 00 00 lwz r3,0(r31) <== NOT EXECUTED ffc114b8: 7c 9d 22 14 add r4,r29,r4 <== NOT EXECUTED ffc114bc: 7c ba d8 50 subf r5,r26,r27 <== NOT EXECUTED ffc114c0: 48 00 00 0c b ffc114cc <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); ffc114c4: 7c 63 02 14 add r3,r3,r0 <== NOT EXECUTED ffc114c8: 7f 65 db 78 mr r5,r27 <== NOT EXECUTED ffc114cc: 48 00 77 89 bl ffc18c54 <== NOT EXECUTED pipe->Length += chunk; if (pipe->waitingReaders > 0) ffc114d0: 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; ffc114d4: 80 1f 00 0c lwz r0,12(r31) <== NOT EXECUTED if (pipe->waitingReaders > 0) ffc114d8: 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; ffc114dc: 7c 00 da 14 add r0,r0,r27 <== NOT EXECUTED ffc114e0: 90 1f 00 0c stw r0,12(r31) <== NOT EXECUTED if (pipe->waitingReaders > 0) ffc114e4: 41 be 00 10 beq+ cr7,ffc114f4 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); ffc114e8: 80 7f 00 2c lwz r3,44(r31) <== NOT EXECUTED ffc114ec: 7f 04 c3 78 mr r4,r24 <== NOT EXECUTED ffc114f0: 48 00 2a 45 bl ffc13f34 <== NOT EXECUTED written += chunk; ffc114f4: 7f 9c da 14 add r28,r28,r27 <== NOT EXECUTED ffc114f8: 3b 20 00 01 li r25,1 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { ffc114fc: 7f 9c f0 40 cmplw cr7,r28,r30 <== NOT EXECUTED ffc11500: 41 9c ff 58 blt+ cr7,ffc11458 <== NOT EXECUTED ffc11504: 3b 60 00 00 li r27,0 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); ffc11508: 80 7f 00 28 lwz r3,40(r31) <== NOT EXECUTED ffc1150c: 4b ff 86 a1 bl ffc09bac <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) ffc11510: 2f 9b ff e0 cmpwi cr7,r27,-32 <== NOT EXECUTED ffc11514: 40 be 00 10 bne+ cr7,ffc11524 <== NOT EXECUTED kill(getpid(), SIGPIPE); ffc11518: 48 00 1b 61 bl ffc13078 <== NOT EXECUTED ffc1151c: 38 80 00 0d li r4,13 <== NOT EXECUTED ffc11520: 48 00 1f f1 bl ffc13510 <== NOT EXECUTED #endif if (written > 0) ffc11524: 2f 9c 00 00 cmpwi cr7,r28,0 <== NOT EXECUTED ffc11528: 41 bd 00 08 bgt+ cr7,ffc11530 <== NOT EXECUTED ffc1152c: 7f 7c db 78 mr r28,r27 <== NOT EXECUTED return written; return ret; } ffc11530: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED ffc11534: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc11538: 82 e1 00 1c lwz r23,28(r1) <== NOT EXECUTED ffc1153c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc11540: 83 01 00 20 lwz r24,32(r1) <== NOT EXECUTED ffc11544: 83 21 00 24 lwz r25,36(r1) <== NOT EXECUTED ffc11548: 83 41 00 28 lwz r26,40(r1) <== NOT EXECUTED ffc1154c: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc11550: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc11554: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc11558: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc1155c: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc11560: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc11564: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc088a4 : int posix_memalign( void **pointer, size_t alignment, size_t size ) { ffc088a4: 7c 08 02 a6 mflr r0 ffc088a8: 94 21 ff f8 stwu r1,-8(r1) ffc088ac: 90 01 00 0c stw r0,12(r1) /* * Update call statistics */ MSBUMP(memalign_calls, 1); if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) ffc088b0: 38 04 ff ff addi r0,r4,-1 ffc088b4: 7c 0b 20 39 and. r11,r0,r4 ) { /* * Update call statistics */ MSBUMP(memalign_calls, 1); ffc088b8: 3d 60 00 00 lis r11,0 ffc088bc: 39 6b 34 28 addi r11,r11,13352 ffc088c0: 81 4b 00 08 lwz r10,8(r11) ffc088c4: 38 0a 00 01 addi r0,r10,1 ffc088c8: 90 0b 00 08 stw r0,8(r11) if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) ffc088cc: 40 82 00 14 bne- ffc088e0 <== NEVER TAKEN ffc088d0: 2b 84 00 03 cmplwi cr7,r4,3 ffc088d4: 40 bd 00 0c ble+ cr7,ffc088e0 /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); ffc088d8: 48 00 02 75 bl ffc08b4c ffc088dc: 48 00 00 08 b ffc088e4 ffc088e0: 38 60 00 16 li r3,22 } ffc088e4: 80 01 00 0c lwz r0,12(r1) ffc088e8: 38 21 00 08 addi r1,r1,8 ffc088ec: 7c 08 03 a6 mtlr r0 ffc088f0: 4e 80 00 20 blr =============================================================================== ffc06b1c : * printk * * Kernel printf function requiring minimal infrastrure. */ void printk(const char *fmt, ...) { ffc06b1c: 94 21 ff 88 stwu r1,-120(r1) ffc06b20: 7c 08 02 a6 mflr r0 ffc06b24: 90 81 00 1c stw r4,28(r1) ffc06b28: 90 01 00 7c stw r0,124(r1) ffc06b2c: 90 a1 00 20 stw r5,32(r1) ffc06b30: 90 c1 00 24 stw r6,36(r1) ffc06b34: 90 e1 00 28 stw r7,40(r1) ffc06b38: 91 01 00 2c stw r8,44(r1) ffc06b3c: 91 21 00 30 stw r9,48(r1) ffc06b40: 91 41 00 34 stw r10,52(r1) ffc06b44: 40 86 00 24 bne- cr1,ffc06b68 <== ALWAYS TAKEN ffc06b48: d8 21 00 38 stfd f1,56(r1) <== NOT EXECUTED ffc06b4c: d8 41 00 40 stfd f2,64(r1) <== NOT EXECUTED ffc06b50: d8 61 00 48 stfd f3,72(r1) <== NOT EXECUTED ffc06b54: d8 81 00 50 stfd f4,80(r1) <== NOT EXECUTED ffc06b58: d8 a1 00 58 stfd f5,88(r1) <== NOT EXECUTED ffc06b5c: d8 c1 00 60 stfd f6,96(r1) <== NOT EXECUTED ffc06b60: d8 e1 00 68 stfd f7,104(r1) <== NOT EXECUTED ffc06b64: 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 */ ffc06b68: 38 00 00 01 li r0,1 ffc06b6c: 98 01 00 08 stb r0,8(r1) ffc06b70: 38 00 00 00 li r0,0 vprintk(fmt, ap); ffc06b74: 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 */ ffc06b78: 98 01 00 09 stb r0,9(r1) ffc06b7c: 38 01 00 80 addi r0,r1,128 ffc06b80: 90 01 00 0c stw r0,12(r1) ffc06b84: 38 01 00 18 addi r0,r1,24 ffc06b88: 90 01 00 10 stw r0,16(r1) vprintk(fmt, ap); ffc06b8c: 48 00 24 1d bl ffc08fa8 va_end(ap); /* clean up when done */ } ffc06b90: 80 01 00 7c lwz r0,124(r1) ffc06b94: 38 21 00 78 addi r1,r1,120 ffc06b98: 7c 08 03 a6 mtlr r0 ffc06b9c: 4e 80 00 20 blr =============================================================================== ffc06a90 : int printk_plugin( void *ignored __attribute__((unused)), const char *format, ... ) { ffc06a90: 94 21 ff 90 stwu r1,-112(r1) ffc06a94: 7c 08 02 a6 mflr r0 ffc06a98: 90 a1 00 18 stw r5,24(r1) ffc06a9c: 90 01 00 74 stw r0,116(r1) ffc06aa0: 90 c1 00 1c stw r6,28(r1) ffc06aa4: 90 e1 00 20 stw r7,32(r1) ffc06aa8: 91 01 00 24 stw r8,36(r1) ffc06aac: 91 21 00 28 stw r9,40(r1) ffc06ab0: 91 41 00 2c stw r10,44(r1) ffc06ab4: 40 86 00 24 bne- cr1,ffc06ad8 <== ALWAYS TAKEN ffc06ab8: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc06abc: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc06ac0: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc06ac4: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc06ac8: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc06acc: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc06ad0: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc06ad4: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list arg_pointer; va_start (arg_pointer, format); ffc06ad8: 38 00 00 02 li r0,2 ffc06adc: 98 01 00 08 stb r0,8(r1) ffc06ae0: 38 00 00 00 li r0,0 vprintk( format, arg_pointer ); ffc06ae4: 7c 83 23 78 mr r3,r4 ... ) { va_list arg_pointer; va_start (arg_pointer, format); ffc06ae8: 98 01 00 09 stb r0,9(r1) ffc06aec: 38 01 00 78 addi r0,r1,120 vprintk( format, arg_pointer ); ffc06af0: 38 81 00 08 addi r4,r1,8 ... ) { va_list arg_pointer; va_start (arg_pointer, format); ffc06af4: 90 01 00 0c stw r0,12(r1) ffc06af8: 38 01 00 10 addi r0,r1,16 ffc06afc: 90 01 00 10 stw r0,16(r1) vprintk( format, arg_pointer ); ffc06b00: 48 00 1f f1 bl ffc08af0 va_end(arg_pointer); /* clean up when done */ return 0; } ffc06b04: 38 60 00 00 li r3,0 ffc06b08: 80 01 00 74 lwz r0,116(r1) ffc06b0c: 38 21 00 70 addi r1,r1,112 ffc06b10: 7c 08 03 a6 mtlr r0 ffc06b14: 4e 80 00 20 blr =============================================================================== ffc0ceb4 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) ffc0ceb4: 2c 03 00 00 cmpwi r3,0 ffc0ceb8: 41 82 00 3c beq- ffc0cef4 ffc0cebc: 80 03 00 00 lwz r0,0(r3) ffc0cec0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cec4: 41 9e 00 30 beq- cr7,ffc0cef4 return EINVAL; switch ( policy ) { ffc0cec8: 2b 84 00 04 cmplwi cr7,r4,4 ffc0cecc: 41 9d 00 14 bgt- cr7,ffc0cee0 ffc0ced0: 38 00 00 01 li r0,1 ffc0ced4: 7c 00 20 30 slw r0,r0,r4 ffc0ced8: 70 09 00 17 andi. r9,r0,23 ffc0cedc: 40 82 00 0c bne- ffc0cee8 <== ALWAYS TAKEN ffc0cee0: 38 60 00 86 li r3,134 ffc0cee4: 4e 80 00 20 blr case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; ffc0cee8: 90 83 00 14 stw r4,20(r3) ffc0ceec: 38 60 00 00 li r3,0 return 0; ffc0cef0: 4e 80 00 20 blr ffc0cef4: 38 60 00 16 li r3,22 default: return ENOTSUP; } } ffc0cef8: 4e 80 00 20 blr =============================================================================== ffc08520 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { ffc08520: 94 21 ff d8 stwu r1,-40(r1) ffc08524: 7c 08 02 a6 mflr r0 ffc08528: 93 e1 00 24 stw r31,36(r1) const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) ffc0852c: 7c 7f 1b 79 mr. r31,r3 int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { ffc08530: 93 c1 00 20 stw r30,32(r1) ffc08534: 7c be 2b 78 mr r30,r5 ffc08538: 90 01 00 2c stw r0,44(r1) ffc0853c: 93 81 00 18 stw r28,24(r1) ffc08540: 93 a1 00 1c stw r29,28(r1) const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) ffc08544: 41 82 00 a8 beq- ffc085ec return EINVAL; if ( count == 0 ) ffc08548: 2f 85 00 00 cmpwi cr7,r5,0 ffc0854c: 41 9e 00 a0 beq- cr7,ffc085ec return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { ffc08550: 2f 84 00 00 cmpwi cr7,r4,0 ffc08554: 7c 9d 23 78 mr r29,r4 ffc08558: 40 be 00 10 bne+ cr7,ffc08568 the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); ffc0855c: 3b a1 00 10 addi r29,r1,16 ffc08560: 7f a3 eb 78 mr r3,r29 ffc08564: 4b ff fe cd bl ffc08430 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) ffc08568: 80 1d 00 00 lwz r0,0(r29) ffc0856c: 2f 80 00 00 cmpwi cr7,r0,0 ffc08570: 41 9e 00 7c beq- cr7,ffc085ec return EINVAL; switch ( the_attr->process_shared ) { ffc08574: 83 bd 00 04 lwz r29,4(r29) ffc08578: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0857c: 40 9e 00 70 bne- cr7,ffc085ec <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc08580: 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; ffc08584: 93 c1 00 0c stw r30,12(r1) ffc08588: 81 69 27 bc lwz r11,10172(r9) } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; ffc0858c: 93 a1 00 08 stw r29,8(r1) ffc08590: 38 0b 00 01 addi r0,r11,1 ffc08594: 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 *) ffc08598: 3f 80 00 00 lis r28,0 ffc0859c: 3b 9c 2f f8 addi r28,r28,12280 ffc085a0: 7f 83 e3 78 mr r3,r28 ffc085a4: 48 00 26 b1 bl ffc0ac54 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { ffc085a8: 7c 7e 1b 79 mr. r30,r3 ffc085ac: 40 a2 00 10 bne+ ffc085bc _Thread_Enable_dispatch(); ffc085b0: 48 00 37 61 bl ffc0bd10 <_Thread_Enable_dispatch> ffc085b4: 38 60 00 0b li r3,11 return EAGAIN; ffc085b8: 48 00 00 38 b ffc085f0 } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); ffc085bc: 38 7e 00 10 addi r3,r30,16 ffc085c0: 38 81 00 08 addi r4,r1,8 ffc085c4: 48 00 1c 19 bl ffc0a1dc <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc085c8: 80 1e 00 08 lwz r0,8(r30) ffc085cc: 81 7c 00 1c lwz r11,28(r28) ffc085d0: 54 09 13 ba rlwinm r9,r0,2,14,29 ffc085d4: 7f cb 49 2e stwx r30,r11,r9 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; ffc085d8: 93 be 00 0c stw r29,12(r30) ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; ffc085dc: 90 1f 00 00 stw r0,0(r31) _Thread_Enable_dispatch(); ffc085e0: 48 00 37 31 bl ffc0bd10 <_Thread_Enable_dispatch> ffc085e4: 38 60 00 00 li r3,0 return 0; ffc085e8: 48 00 00 08 b ffc085f0 ffc085ec: 38 60 00 16 li r3,22 } ffc085f0: 80 01 00 2c lwz r0,44(r1) ffc085f4: 83 81 00 18 lwz r28,24(r1) ffc085f8: 7c 08 03 a6 mtlr r0 ffc085fc: 83 a1 00 1c lwz r29,28(r1) ffc08600: 83 c1 00 20 lwz r30,32(r1) ffc08604: 83 e1 00 24 lwz r31,36(r1) ffc08608: 38 21 00 28 addi r1,r1,40 ffc0860c: 4e 80 00 20 blr =============================================================================== ffc07b08 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { ffc07b08: 94 21 ff f0 stwu r1,-16(r1) ffc07b0c: 7c 08 02 a6 mflr r0 ffc07b10: 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 ) ffc07b14: 7c 7e 1b 79 mr. r30,r3 void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { ffc07b18: 93 e1 00 0c stw r31,12(r1) ffc07b1c: 7c 9f 23 78 mr r31,r4 ffc07b20: 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 ) ffc07b24: 41 82 00 48 beq- ffc07b6c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc07b28: 3d 20 00 00 lis r9,0 ffc07b2c: 81 69 27 94 lwz r11,10132(r9) ffc07b30: 38 0b 00 01 addi r0,r11,1 ffc07b34: 90 09 27 94 stw r0,10132(r9) return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); ffc07b38: 38 60 00 10 li r3,16 ffc07b3c: 48 00 51 b5 bl ffc0ccf0 <_Workspace_Allocate> if ( handler ) { ffc07b40: 7c 69 1b 79 mr. r9,r3 ffc07b44: 41 82 00 24 beq- ffc07b68 <== NEVER TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; ffc07b48: 3d 60 00 00 lis r11,0 handler->routine = routine; ffc07b4c: 93 c9 00 08 stw r30,8(r9) handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); ffc07b50: 7d 24 4b 78 mr r4,r9 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; ffc07b54: 81 6b 27 d4 lwz r11,10196(r11) ffc07b58: 80 6b 01 48 lwz r3,328(r11) handler->routine = routine; handler->arg = arg; ffc07b5c: 93 e9 00 0c stw r31,12(r9) _Chain_Append( handler_stack, &handler->Node ); ffc07b60: 38 63 00 e0 addi r3,r3,224 ffc07b64: 48 00 1d 65 bl ffc098c8 <_Chain_Append> } _Thread_Enable_dispatch(); ffc07b68: 48 00 38 25 bl ffc0b38c <_Thread_Enable_dispatch> } ffc07b6c: 80 01 00 14 lwz r0,20(r1) ffc07b70: 83 c1 00 08 lwz r30,8(r1) ffc07b74: 7c 08 03 a6 mtlr r0 ffc07b78: 83 e1 00 0c lwz r31,12(r1) ffc07b7c: 38 21 00 10 addi r1,r1,16 ffc07b80: 4e 80 00 20 blr =============================================================================== ffc08fb8 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { ffc08fb8: 94 21 ff e8 stwu r1,-24(r1) ffc08fbc: 7c 08 02 a6 mflr r0 ffc08fc0: 93 c1 00 10 stw r30,16(r1) POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; ffc08fc4: 7c 9e 23 79 mr. r30,r4 int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { ffc08fc8: 93 81 00 08 stw r28,8(r1) ffc08fcc: 7c 7c 1b 78 mr r28,r3 ffc08fd0: 90 01 00 1c stw r0,28(r1) ffc08fd4: 93 a1 00 0c stw r29,12(r1) ffc08fd8: 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; ffc08fdc: 40 a2 00 0c bne+ ffc08fe8 ffc08fe0: 3f c0 00 00 lis r30,0 ffc08fe4: 3b de 27 08 addi r30,r30,9992 /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) ffc08fe8: 80 1e 00 04 lwz r0,4(r30) ffc08fec: 2f 80 00 01 cmpwi cr7,r0,1 ffc08ff0: 41 9e 00 8c beq- cr7,ffc0907c <== NEVER TAKEN return EINVAL; if ( !the_attr->is_initialized ) ffc08ff4: 80 1e 00 00 lwz r0,0(r30) ffc08ff8: 2f 80 00 00 cmpwi cr7,r0,0 ffc08ffc: 41 be 00 80 beq+ cr7,ffc0907c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc09000: 3d 20 00 00 lis r9,0 ffc09004: 81 69 27 c8 lwz r11,10184(r9) ffc09008: 38 0b 00 01 addi r0,r11,1 ffc0900c: 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 *) ffc09010: 3f a0 00 00 lis r29,0 ffc09014: 3b bd 30 90 addi r29,r29,12432 ffc09018: 7f a3 eb 78 mr r3,r29 ffc0901c: 48 00 2e c1 bl ffc0bedc <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { ffc09020: 7c 7f 1b 79 mr. r31,r3 ffc09024: 40 a2 00 10 bne+ ffc09034 _Thread_Enable_dispatch(); ffc09028: 48 00 3f 71 bl ffc0cf98 <_Thread_Enable_dispatch> ffc0902c: 38 60 00 0c li r3,12 return ENOMEM; ffc09030: 48 00 00 50 b ffc09080 } the_cond->process_shared = the_attr->process_shared; ffc09034: 80 1e 00 04 lwz r0,4(r30) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; ffc09038: 3b c0 00 00 li r30,0 ffc0903c: 93 df 00 14 stw r30,20(r31) /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( ffc09040: 38 7f 00 18 addi r3,r31,24 ffc09044: 38 80 00 00 li r4,0 if ( !the_cond ) { _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; ffc09048: 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( ffc0904c: 38 a0 08 00 li r5,2048 ffc09050: 38 c0 00 74 li r6,116 ffc09054: 48 00 48 dd bl ffc0d930 <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc09058: 80 1f 00 08 lwz r0,8(r31) ffc0905c: 81 7d 00 1c lwz r11,28(r29) ffc09060: 54 09 13 ba rlwinm r9,r0,2,14,29 ffc09064: 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; ffc09068: 93 df 00 0c stw r30,12(r31) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; ffc0906c: 90 1c 00 00 stw r0,0(r28) _Thread_Enable_dispatch(); ffc09070: 48 00 3f 29 bl ffc0cf98 <_Thread_Enable_dispatch> ffc09074: 38 60 00 00 li r3,0 return 0; ffc09078: 48 00 00 08 b ffc09080 ffc0907c: 38 60 00 16 li r3,22 } ffc09080: 80 01 00 1c lwz r0,28(r1) ffc09084: 83 81 00 08 lwz r28,8(r1) ffc09088: 7c 08 03 a6 mtlr r0 ffc0908c: 83 a1 00 0c lwz r29,12(r1) ffc09090: 83 c1 00 10 lwz r30,16(r1) ffc09094: 83 e1 00 14 lwz r31,20(r1) ffc09098: 38 21 00 18 addi r1,r1,24 ffc0909c: 4e 80 00 20 blr =============================================================================== ffc08dec : int pthread_condattr_destroy( pthread_condattr_t *attr ) { if ( !attr || attr->is_initialized == false ) ffc08dec: 2c 03 00 00 cmpwi r3,0 ffc08df0: 41 82 00 20 beq- ffc08e10 ffc08df4: 80 03 00 00 lwz r0,0(r3) ffc08df8: 2f 80 00 00 cmpwi cr7,r0,0 ffc08dfc: 41 9e 00 14 beq- cr7,ffc08e10 <== NEVER TAKEN return EINVAL; attr->is_initialized = false; ffc08e00: 38 00 00 00 li r0,0 ffc08e04: 90 03 00 00 stw r0,0(r3) ffc08e08: 38 60 00 00 li r3,0 return 0; ffc08e0c: 4e 80 00 20 blr ffc08e10: 38 60 00 16 li r3,22 } ffc08e14: 4e 80 00 20 blr =============================================================================== ffc080ec : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { ffc080ec: 94 21 ff 80 stwu r1,-128(r1) ffc080f0: 7c 08 02 a6 mflr r0 ffc080f4: 93 01 00 60 stw r24,96(r1) int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) ffc080f8: 7c b8 2b 79 mr. r24,r5 pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { ffc080fc: 93 21 00 64 stw r25,100(r1) ffc08100: 7c d9 33 78 mr r25,r6 ffc08104: 93 41 00 68 stw r26,104(r1) ffc08108: 7c 7a 1b 78 mr r26,r3 ffc0810c: 93 c1 00 78 stw r30,120(r1) int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) ffc08110: 3b c0 00 0e li r30,14 pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { ffc08114: 90 01 00 84 stw r0,132(r1) ffc08118: 92 a1 00 54 stw r21,84(r1) ffc0811c: 92 c1 00 58 stw r22,88(r1) ffc08120: 92 e1 00 5c stw r23,92(r1) ffc08124: 93 61 00 6c stw r27,108(r1) ffc08128: 93 81 00 70 stw r28,112(r1) ffc0812c: 93 a1 00 74 stw r29,116(r1) ffc08130: 93 e1 00 7c stw r31,124(r1) int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) ffc08134: 41 82 02 80 beq- ffc083b4 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; ffc08138: 2f 84 00 00 cmpwi cr7,r4,0 ffc0813c: 7c 9f 23 78 mr r31,r4 ffc08140: 40 be 00 0c bne+ cr7,ffc0814c ffc08144: 3f e0 ff c2 lis r31,-62 ffc08148: 3b ff f4 e4 addi r31,r31,-2844 if ( !the_attr->is_initialized ) ffc0814c: 80 1f 00 00 lwz r0,0(r31) ffc08150: 2f 80 00 00 cmpwi cr7,r0,0 ffc08154: 41 9e 02 5c beq- cr7,ffc083b0 * 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) ) ffc08158: 80 1f 00 04 lwz r0,4(r31) ffc0815c: 2f 80 00 00 cmpwi cr7,r0,0 ffc08160: 41 9e 00 18 beq- cr7,ffc08178 ffc08164: 3d 20 00 00 lis r9,0 ffc08168: 80 09 26 c8 lwz r0,9928(r9) ffc0816c: 81 3f 00 08 lwz r9,8(r31) ffc08170: 7f 89 00 40 cmplw cr7,r9,r0 ffc08174: 41 9c 02 3c blt- cr7,ffc083b0 * 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 ) { ffc08178: 80 1f 00 10 lwz r0,16(r31) ffc0817c: 2f 80 00 01 cmpwi cr7,r0,1 ffc08180: 41 9e 00 10 beq- cr7,ffc08190 ffc08184: 2f 80 00 02 cmpwi cr7,r0,2 ffc08188: 40 be 02 28 bne+ cr7,ffc083b0 ffc0818c: 48 00 00 44 b ffc081d0 case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; ffc08190: 3d 20 00 00 lis r9,0 ffc08194: 81 29 27 d8 lwz r9,10200(r9) ffc08198: 81 29 01 48 lwz r9,328(r9) schedpolicy = api->schedpolicy; schedparam = api->schedparam; ffc0819c: 81 69 00 8c lwz r11,140(r9) ffc081a0: 80 09 00 90 lwz r0,144(r9) ffc081a4: 81 09 00 84 lwz r8,132(r9) ffc081a8: 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; ffc081ac: 83 89 00 80 lwz r28,128(r9) schedparam = api->schedparam; ffc081b0: 91 01 00 20 stw r8,32(r1) ffc081b4: 91 41 00 24 stw r10,36(r1) ffc081b8: 91 61 00 28 stw r11,40(r1) ffc081bc: 90 01 00 2c stw r0,44(r1) ffc081c0: 80 09 00 9c lwz r0,156(r9) ffc081c4: 81 69 00 94 lwz r11,148(r9) ffc081c8: 81 29 00 98 lwz r9,152(r9) ffc081cc: 48 00 00 34 b ffc08200 break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; schedparam = the_attr->schedparam; ffc081d0: 81 7f 00 1c lwz r11,28(r31) ffc081d4: 81 3f 00 20 lwz r9,32(r31) ffc081d8: 80 1f 00 24 lwz r0,36(r31) ffc081dc: 81 5f 00 18 lwz r10,24(r31) schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; ffc081e0: 83 9f 00 14 lwz r28,20(r31) schedparam = the_attr->schedparam; ffc081e4: 91 41 00 20 stw r10,32(r1) ffc081e8: 91 61 00 24 stw r11,36(r1) ffc081ec: 91 21 00 28 stw r9,40(r1) ffc081f0: 90 01 00 2c stw r0,44(r1) ffc081f4: 81 7f 00 28 lwz r11,40(r31) ffc081f8: 81 3f 00 2c lwz r9,44(r31) ffc081fc: 80 1f 00 30 lwz r0,48(r31) ffc08200: 91 61 00 30 stw r11,48(r1) /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) ffc08204: 3b c0 00 86 li r30,134 schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; schedparam = the_attr->schedparam; ffc08208: 91 21 00 34 stw r9,52(r1) ffc0820c: 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 ) ffc08210: 80 1f 00 0c lwz r0,12(r31) ffc08214: 2f 80 00 00 cmpwi cr7,r0,0 ffc08218: 40 9e 01 9c bne- cr7,ffc083b4 return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) ffc0821c: 80 61 00 20 lwz r3,32(r1) ffc08220: 48 00 71 b1 bl ffc0f3d0 <_POSIX_Priority_Is_valid> ffc08224: 2f 83 00 00 cmpwi cr7,r3,0 ffc08228: 41 be 01 88 beq+ cr7,ffc083b0 <== NEVER TAKEN return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); ffc0822c: 7c 24 0b 78 mr r4,r1 ffc08230: 86 e4 00 20 lwzu r23,32(r4) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); ffc08234: 3d 20 00 00 lis r9,0 /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( ffc08238: 7f 83 e3 78 mr r3,r28 ffc0823c: 8a c9 26 cc lbz r22,9932(r9) ffc08240: 38 a1 00 18 addi r5,r1,24 ffc08244: 38 c1 00 1c addi r6,r1,28 ffc08248: 48 00 71 ad bl ffc0f3f4 <_POSIX_Thread_Translate_sched_param> schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) ffc0824c: 7c 7e 1b 79 mr. r30,r3 ffc08250: 40 a2 01 64 bne+ ffc083b4 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); ffc08254: 3e a0 00 00 lis r21,0 ffc08258: 80 75 27 d0 lwz r3,10192(r21) * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); ffc0825c: 3f 60 00 00 lis r27,0 ffc08260: 3b 7b 2e 58 addi r27,r27,11864 ffc08264: 48 00 1c f9 bl ffc09f5c <_API_Mutex_Lock> ffc08268: 7f 63 db 78 mr r3,r27 ffc0826c: 48 00 27 b9 bl ffc0aa24 <_Objects_Allocate> * Allocate the thread control block. * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { ffc08270: 7c 7d 1b 79 mr. r29,r3 ffc08274: 40 a2 00 0c bne+ ffc08280 _RTEMS_Unlock_allocator(); ffc08278: 80 75 27 d0 lwz r3,10192(r21) ffc0827c: 48 00 00 78 b ffc082f4 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( ffc08280: 3d 20 00 00 lis r9,0 ffc08284: 80 1f 00 08 lwz r0,8(r31) ffc08288: 80 c9 26 c8 lwz r6,9928(r9) ffc0828c: 93 c1 00 48 stw r30,72(r1) ffc08290: 54 c6 08 3c rlwinm r6,r6,1,0,30 ffc08294: 7f 86 00 40 cmplw cr7,r6,r0 ffc08298: 80 bf 00 04 lwz r5,4(r31) ffc0829c: 40 9c 00 08 bge- cr7,ffc082a4 ffc082a0: 7c 06 03 78 mr r6,r0 ffc082a4: 80 01 00 1c lwz r0,28(r1) ffc082a8: 7d 17 b0 50 subf r8,r23,r22 ffc082ac: 81 41 00 18 lwz r10,24(r1) ffc082b0: 7f 63 db 78 mr r3,r27 ffc082b4: 90 01 00 08 stw r0,8(r1) ffc082b8: 38 00 00 00 li r0,0 ffc082bc: 7f a4 eb 78 mr r4,r29 ffc082c0: 90 01 00 0c stw r0,12(r1) ffc082c4: 38 e0 00 01 li r7,1 ffc082c8: 38 01 00 48 addi r0,r1,72 ffc082cc: 39 20 00 01 li r9,1 ffc082d0: 90 01 00 10 stw r0,16(r1) ffc082d4: 48 00 39 2d bl ffc0bc00 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { ffc082d8: 2f 83 00 00 cmpwi cr7,r3,0 ffc082dc: 40 9e 00 20 bne- cr7,ffc082fc RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); ffc082e0: 7f 63 db 78 mr r3,r27 ffc082e4: 7f a4 eb 78 mr r4,r29 ffc082e8: 48 00 2b 29 bl ffc0ae10 <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); ffc082ec: 3d 20 00 00 lis r9,0 ffc082f0: 80 69 27 d0 lwz r3,10192(r9) ffc082f4: 3b c0 00 0b li r30,11 ffc082f8: 48 00 00 b0 b ffc083a8 } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc082fc: 83 7d 01 48 lwz r27,328(r29) api->Attributes = *the_attr; ffc08300: 7f e4 fb 78 mr r4,r31 ffc08304: 38 a0 00 3c li r5,60 ffc08308: 7f 63 db 78 mr r3,r27 ffc0830c: 48 00 b6 6d bl ffc13978 api->detachstate = the_attr->detachstate; ffc08310: 80 1f 00 38 lwz r0,56(r31) api->schedpolicy = schedpolicy; ffc08314: 93 9b 00 80 stw r28,128(r27) the_thread->do_post_task_switch_extension = true; /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( ffc08318: 7f 05 c3 78 mr r5,r24 ffc0831c: 7f 26 cb 78 mr r6,r25 * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; ffc08320: 90 1b 00 3c stw r0,60(r27) the_thread->do_post_task_switch_extension = true; /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( ffc08324: 7f a3 eb 78 mr r3,r29 ffc08328: 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; ffc0832c: 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( ffc08330: 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; ffc08334: 81 21 00 28 lwz r9,40(r1) ffc08338: 80 01 00 2c lwz r0,44(r1) ffc0833c: 81 41 00 20 lwz r10,32(r1) ffc08340: 91 7b 00 88 stw r11,136(r27) * 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; ffc08344: 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; ffc08348: 91 5b 00 84 stw r10,132(r27) ffc0834c: 91 3b 00 8c stw r9,140(r27) ffc08350: 90 1b 00 90 stw r0,144(r27) * 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; ffc08354: 99 7d 00 74 stb r11,116(r29) api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; ffc08358: 81 21 00 34 lwz r9,52(r1) ffc0835c: 80 01 00 38 lwz r0,56(r1) ffc08360: 81 61 00 30 lwz r11,48(r1) ffc08364: 91 3b 00 98 stw r9,152(r27) ffc08368: 91 7b 00 94 stw r11,148(r27) ffc0836c: 90 1b 00 9c stw r0,156(r27) the_thread->do_post_task_switch_extension = true; /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( ffc08370: 48 00 45 49 bl ffc0c8b8 <_Thread_Start> _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { ffc08374: 2f 9c 00 04 cmpwi cr7,r28,4 ffc08378: 40 be 00 20 bne+ cr7,ffc08398 _Watchdog_Insert_ticks( ffc0837c: 38 7b 00 8c addi r3,r27,140 ffc08380: 48 00 48 c9 bl ffc0cc48 <_Timespec_To_ticks> ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc08384: 38 9b 00 a4 addi r4,r27,164 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc08388: 90 7b 00 b0 stw r3,176(r27) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0838c: 3c 60 00 00 lis r3,0 ffc08390: 38 63 2d 28 addi r3,r3,11560 ffc08394: 48 00 4e 0d bl ffc0d1a0 <_Watchdog_Insert> } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; ffc08398: 80 1d 00 08 lwz r0,8(r29) _RTEMS_Unlock_allocator(); ffc0839c: 3d 20 00 00 lis r9,0 ffc083a0: 80 69 27 d0 lwz r3,10192(r9) } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; ffc083a4: 90 1a 00 00 stw r0,0(r26) _RTEMS_Unlock_allocator(); ffc083a8: 48 00 1c 35 bl ffc09fdc <_API_Mutex_Unlock> return 0; ffc083ac: 48 00 00 08 b ffc083b4 ffc083b0: 3b c0 00 16 li r30,22 } ffc083b4: 80 01 00 84 lwz r0,132(r1) ffc083b8: 7f c3 f3 78 mr r3,r30 ffc083bc: 82 a1 00 54 lwz r21,84(r1) ffc083c0: 7c 08 03 a6 mtlr r0 ffc083c4: 82 c1 00 58 lwz r22,88(r1) ffc083c8: 82 e1 00 5c lwz r23,92(r1) ffc083cc: 83 01 00 60 lwz r24,96(r1) ffc083d0: 83 21 00 64 lwz r25,100(r1) ffc083d4: 83 41 00 68 lwz r26,104(r1) ffc083d8: 83 61 00 6c lwz r27,108(r1) ffc083dc: 83 81 00 70 lwz r28,112(r1) ffc083e0: 83 a1 00 74 lwz r29,116(r1) ffc083e4: 83 c1 00 78 lwz r30,120(r1) ffc083e8: 83 e1 00 7c lwz r31,124(r1) ffc083ec: 38 21 00 80 addi r1,r1,128 ffc083f0: 4e 80 00 20 blr =============================================================================== ffc076b8 : int pthread_mutexattr_gettype( const pthread_mutexattr_t *attr, int *type ) { if ( !attr ) ffc076b8: 2c 03 00 00 cmpwi r3,0 ffc076bc: 41 82 00 28 beq- ffc076e4 return EINVAL; if ( !attr->is_initialized ) ffc076c0: 80 03 00 00 lwz r0,0(r3) ffc076c4: 2f 80 00 00 cmpwi cr7,r0,0 ffc076c8: 41 9e 00 1c beq- cr7,ffc076e4 return EINVAL; if ( !type ) ffc076cc: 2f 84 00 00 cmpwi cr7,r4,0 ffc076d0: 41 9e 00 14 beq- cr7,ffc076e4 <== NEVER TAKEN return EINVAL; *type = attr->type; ffc076d4: 80 03 00 10 lwz r0,16(r3) ffc076d8: 38 60 00 00 li r3,0 ffc076dc: 90 04 00 00 stw r0,0(r4) return 0; ffc076e0: 4e 80 00 20 blr ffc076e4: 38 60 00 16 li r3,22 } ffc076e8: 4e 80 00 20 blr =============================================================================== ffc0a544 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) ffc0a544: 2c 03 00 00 cmpwi r3,0 ffc0a548: 41 82 00 24 beq- ffc0a56c ffc0a54c: 80 03 00 00 lwz r0,0(r3) ffc0a550: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a554: 41 9e 00 18 beq- cr7,ffc0a56c return EINVAL; switch ( pshared ) { ffc0a558: 2b 84 00 01 cmplwi cr7,r4,1 ffc0a55c: 41 9d 00 10 bgt- cr7,ffc0a56c <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; ffc0a560: 90 83 00 04 stw r4,4(r3) ffc0a564: 38 60 00 00 li r3,0 return 0; ffc0a568: 4e 80 00 20 blr ffc0a56c: 38 60 00 16 li r3,22 default: return EINVAL; } } ffc0a570: 4e 80 00 20 blr =============================================================================== ffc07738 : int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { if ( !attr || !attr->is_initialized ) ffc07738: 2c 03 00 00 cmpwi r3,0 ffc0773c: 41 82 00 24 beq- ffc07760 ffc07740: 80 03 00 00 lwz r0,0(r3) ffc07744: 2f 80 00 00 cmpwi cr7,r0,0 ffc07748: 41 9e 00 18 beq- cr7,ffc07760 <== NEVER TAKEN return EINVAL; switch ( type ) { ffc0774c: 2b 84 00 03 cmplwi cr7,r4,3 ffc07750: 41 9d 00 10 bgt- cr7,ffc07760 case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; ffc07754: 90 83 00 10 stw r4,16(r3) ffc07758: 38 60 00 00 li r3,0 return 0; ffc0775c: 4e 80 00 20 blr ffc07760: 38 60 00 16 li r3,22 default: return EINVAL; } } ffc07764: 4e 80 00 20 blr =============================================================================== ffc0892c : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { ffc0892c: 94 21 ff e0 stwu r1,-32(r1) ffc08930: 7c 08 02 a6 mflr r0 ffc08934: 93 e1 00 1c stw r31,28(r1) if ( !once_control || !init_routine ) ffc08938: 7c 7f 1b 79 mr. r31,r3 int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { ffc0893c: 93 c1 00 18 stw r30,24(r1) ffc08940: 7c 9e 23 78 mr r30,r4 ffc08944: 90 01 00 24 stw r0,36(r1) if ( !once_control || !init_routine ) ffc08948: 41 82 00 64 beq- ffc089ac ffc0894c: 2f 84 00 00 cmpwi cr7,r4,0 ffc08950: 41 9e 00 5c beq- cr7,ffc089ac return EINVAL; if ( !once_control->init_executed ) { ffc08954: 80 1f 00 04 lwz r0,4(r31) ffc08958: 38 60 00 00 li r3,0 ffc0895c: 2f 80 00 00 cmpwi cr7,r0,0 ffc08960: 40 be 00 50 bne+ cr7,ffc089b0 rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); ffc08964: 38 60 01 00 li r3,256 ffc08968: 38 80 01 00 li r4,256 ffc0896c: 38 a1 00 08 addi r5,r1,8 ffc08970: 48 00 0d 9d bl ffc0970c if ( !once_control->init_executed ) { ffc08974: 80 1f 00 04 lwz r0,4(r31) ffc08978: 2f 80 00 00 cmpwi cr7,r0,0 ffc0897c: 40 be 00 18 bne+ cr7,ffc08994 <== NEVER TAKEN once_control->is_initialized = true; ffc08980: 38 00 00 01 li r0,1 once_control->init_executed = true; (*init_routine)(); ffc08984: 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; ffc08988: 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; ffc0898c: 90 1f 00 00 stw r0,0(r31) once_control->init_executed = true; (*init_routine)(); ffc08990: 4e 80 04 21 bctrl } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); ffc08994: 7c 25 0b 78 mr r5,r1 ffc08998: 84 65 00 08 lwzu r3,8(r5) ffc0899c: 38 80 01 00 li r4,256 ffc089a0: 48 00 0d 6d bl ffc0970c ffc089a4: 38 60 00 00 li r3,0 ffc089a8: 48 00 00 08 b ffc089b0 ffc089ac: 38 60 00 16 li r3,22 } return 0; } ffc089b0: 80 01 00 24 lwz r0,36(r1) ffc089b4: 83 c1 00 18 lwz r30,24(r1) ffc089b8: 7c 08 03 a6 mtlr r0 ffc089bc: 83 e1 00 1c lwz r31,28(r1) ffc089c0: 38 21 00 20 addi r1,r1,32 ffc089c4: 4e 80 00 20 blr =============================================================================== ffc09288 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { ffc09288: 94 21 ff d8 stwu r1,-40(r1) ffc0928c: 7c 08 02 a6 mflr r0 ffc09290: 93 81 00 18 stw r28,24(r1) const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) ffc09294: 7c 7c 1b 79 mr. r28,r3 int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { ffc09298: 90 01 00 2c stw r0,44(r1) ffc0929c: 93 a1 00 1c stw r29,28(r1) ffc092a0: 93 c1 00 20 stw r30,32(r1) ffc092a4: 93 e1 00 24 stw r31,36(r1) const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) ffc092a8: 41 82 00 98 beq- ffc09340 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { ffc092ac: 2f 84 00 00 cmpwi cr7,r4,0 ffc092b0: 7c 9f 23 78 mr r31,r4 ffc092b4: 40 be 00 10 bne+ cr7,ffc092c4 the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); ffc092b8: 3b e1 00 0c addi r31,r1,12 ffc092bc: 7f e3 fb 78 mr r3,r31 ffc092c0: 48 00 0b ed bl ffc09eac } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) ffc092c4: 80 1f 00 00 lwz r0,0(r31) ffc092c8: 2f 80 00 00 cmpwi cr7,r0,0 ffc092cc: 41 9e 00 74 beq- cr7,ffc09340 <== NEVER TAKEN return EINVAL; switch ( the_attr->process_shared ) { ffc092d0: 83 df 00 04 lwz r30,4(r31) ffc092d4: 2f 9e 00 00 cmpwi cr7,r30,0 ffc092d8: 40 9e 00 68 bne- cr7,ffc09340 <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc092dc: 3d 20 00 00 lis r9,0 ffc092e0: 81 69 27 bc lwz r11,10172(r9) ffc092e4: 38 0b 00 01 addi r0,r11,1 ffc092e8: 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 *) ffc092ec: 3f a0 00 00 lis r29,0 ffc092f0: 3b bd 2e 38 addi r29,r29,11832 ffc092f4: 7f a3 eb 78 mr r3,r29 ffc092f8: 48 00 2e 55 bl ffc0c14c <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { ffc092fc: 7c 7f 1b 79 mr. r31,r3 ffc09300: 40 a2 00 10 bne+ ffc09310 _Thread_Enable_dispatch(); ffc09304: 48 00 3f 05 bl ffc0d208 <_Thread_Enable_dispatch> ffc09308: 38 60 00 0b li r3,11 return EAGAIN; ffc0930c: 48 00 00 38 b ffc09344 } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); ffc09310: 38 7f 00 10 addi r3,r31,16 ffc09314: 38 81 00 08 addi r4,r1,8 ffc09318: 48 00 24 41 bl ffc0b758 <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0931c: 80 1f 00 08 lwz r0,8(r31) ffc09320: 81 7d 00 1c lwz r11,28(r29) ffc09324: 54 09 13 ba rlwinm r9,r0,2,14,29 ffc09328: 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; ffc0932c: 93 df 00 0c stw r30,12(r31) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; ffc09330: 90 1c 00 00 stw r0,0(r28) _Thread_Enable_dispatch(); ffc09334: 48 00 3e d5 bl ffc0d208 <_Thread_Enable_dispatch> ffc09338: 38 60 00 00 li r3,0 return 0; ffc0933c: 48 00 00 08 b ffc09344 ffc09340: 38 60 00 16 li r3,22 } ffc09344: 80 01 00 2c lwz r0,44(r1) ffc09348: 83 81 00 18 lwz r28,24(r1) ffc0934c: 7c 08 03 a6 mtlr r0 ffc09350: 83 a1 00 1c lwz r29,28(r1) ffc09354: 83 c1 00 20 lwz r30,32(r1) ffc09358: 83 e1 00 24 lwz r31,36(r1) ffc0935c: 38 21 00 28 addi r1,r1,40 ffc09360: 4e 80 00 20 blr =============================================================================== ffc093e4 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { ffc093e4: 94 21 ff d8 stwu r1,-40(r1) ffc093e8: 7c 08 02 a6 mflr r0 ffc093ec: 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 ) ffc093f0: 7c 7d 1b 79 mr. r29,r3 int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { ffc093f4: 90 01 00 2c stw r0,44(r1) ffc093f8: 93 c1 00 20 stw r30,32(r1) ffc093fc: 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 ) ffc09400: 41 82 00 a0 beq- ffc094a0 * * 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 ); ffc09404: 7c 83 23 78 mr r3,r4 ffc09408: 38 81 00 0c addi r4,r1,12 ffc0940c: 48 00 76 11 bl ffc10a1c <_POSIX_Absolute_timeout_to_ticks> ffc09410: 80 9d 00 00 lwz r4,0(r29) ffc09414: 7c 7e 1b 78 mr r30,r3 ffc09418: 3c 60 00 00 lis r3,0 ffc0941c: 38 63 2e 38 addi r3,r3,11832 ffc09420: 38 a1 00 08 addi r5,r1,8 ffc09424: 48 00 32 d5 bl ffc0c6f8 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { ffc09428: 80 01 00 08 lwz r0,8(r1) ffc0942c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09430: 40 9e 00 70 bne- cr7,ffc094a0 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, ffc09434: 6b df 00 03 xori r31,r30,3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( ffc09438: 80 9d 00 00 lwz r4,0(r29) ffc0943c: 7f ff 00 34 cntlzw r31,r31 ffc09440: 80 c1 00 0c lwz r6,12(r1) ffc09444: 57 ff d9 7e rlwinm r31,r31,27,5,31 ffc09448: 38 63 00 10 addi r3,r3,16 ffc0944c: 7f e5 fb 78 mr r5,r31 ffc09450: 38 e0 00 00 li r7,0 ffc09454: 48 00 23 45 bl ffc0b798 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); ffc09458: 48 00 3d b1 bl ffc0d208 <_Thread_Enable_dispatch> if ( !do_wait ) { ffc0945c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc09460: 40 9e 00 2c bne- cr7,ffc0948c if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { ffc09464: 3d 20 00 00 lis r9,0 ffc09468: 81 29 27 fc lwz r9,10236(r9) ffc0946c: 80 09 00 34 lwz r0,52(r9) ffc09470: 2f 80 00 02 cmpwi cr7,r0,2 ffc09474: 40 be 00 18 bne+ cr7,ffc0948c switch (status) { ffc09478: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0947c: 41 9e 00 24 beq- cr7,ffc094a0 <== NEVER TAKEN ffc09480: 2b 9e 00 02 cmplwi cr7,r30,2 ffc09484: 38 60 00 74 li r3,116 ffc09488: 40 9d 00 1c ble- cr7,ffc094a4 <== ALWAYS TAKEN break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( ffc0948c: 3d 20 00 00 lis r9,0 ffc09490: 81 29 27 fc lwz r9,10236(r9) ffc09494: 80 69 00 34 lwz r3,52(r9) ffc09498: 48 00 01 05 bl ffc0959c <_POSIX_RWLock_Translate_core_RWLock_return_code> ffc0949c: 48 00 00 08 b ffc094a4 ffc094a0: 38 60 00 16 li r3,22 case OBJECTS_ERROR: break; } return EINVAL; } ffc094a4: 80 01 00 2c lwz r0,44(r1) ffc094a8: 83 a1 00 1c lwz r29,28(r1) ffc094ac: 7c 08 03 a6 mtlr r0 ffc094b0: 83 c1 00 20 lwz r30,32(r1) ffc094b4: 83 e1 00 24 lwz r31,36(r1) ffc094b8: 38 21 00 28 addi r1,r1,40 ffc094bc: 4e 80 00 20 blr =============================================================================== ffc094c0 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { ffc094c0: 94 21 ff d8 stwu r1,-40(r1) ffc094c4: 7c 08 02 a6 mflr r0 ffc094c8: 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 ) ffc094cc: 7c 7d 1b 79 mr. r29,r3 int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { ffc094d0: 90 01 00 2c stw r0,44(r1) ffc094d4: 93 c1 00 20 stw r30,32(r1) ffc094d8: 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 ) ffc094dc: 41 82 00 a0 beq- ffc0957c * * 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 ); ffc094e0: 7c 83 23 78 mr r3,r4 ffc094e4: 38 81 00 0c addi r4,r1,12 ffc094e8: 48 00 75 35 bl ffc10a1c <_POSIX_Absolute_timeout_to_ticks> ffc094ec: 80 9d 00 00 lwz r4,0(r29) ffc094f0: 7c 7e 1b 78 mr r30,r3 ffc094f4: 3c 60 00 00 lis r3,0 ffc094f8: 38 63 2e 38 addi r3,r3,11832 ffc094fc: 38 a1 00 08 addi r5,r1,8 ffc09500: 48 00 31 f9 bl ffc0c6f8 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { ffc09504: 80 01 00 08 lwz r0,8(r1) ffc09508: 2f 80 00 00 cmpwi cr7,r0,0 ffc0950c: 40 9e 00 70 bne- cr7,ffc0957c (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, ffc09510: 6b df 00 03 xori r31,r30,3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( ffc09514: 80 9d 00 00 lwz r4,0(r29) ffc09518: 7f ff 00 34 cntlzw r31,r31 ffc0951c: 80 c1 00 0c lwz r6,12(r1) ffc09520: 57 ff d9 7e rlwinm r31,r31,27,5,31 ffc09524: 38 63 00 10 addi r3,r3,16 ffc09528: 7f e5 fb 78 mr r5,r31 ffc0952c: 38 e0 00 00 li r7,0 ffc09530: 48 00 23 7d bl ffc0b8ac <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); ffc09534: 48 00 3c d5 bl ffc0d208 <_Thread_Enable_dispatch> if ( !do_wait && ffc09538: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0953c: 40 9e 00 2c bne- cr7,ffc09568 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { ffc09540: 3d 20 00 00 lis r9,0 ffc09544: 81 29 27 fc lwz r9,10236(r9) ffc09548: 80 09 00 34 lwz r0,52(r9) ffc0954c: 2f 80 00 02 cmpwi cr7,r0,2 ffc09550: 40 be 00 18 bne+ cr7,ffc09568 switch (status) { ffc09554: 2f 9e 00 00 cmpwi cr7,r30,0 ffc09558: 41 9e 00 24 beq- cr7,ffc0957c <== NEVER TAKEN ffc0955c: 2b 9e 00 02 cmplwi cr7,r30,2 ffc09560: 38 60 00 74 li r3,116 ffc09564: 40 9d 00 1c ble- cr7,ffc09580 <== ALWAYS TAKEN case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( ffc09568: 3d 20 00 00 lis r9,0 ffc0956c: 81 29 27 fc lwz r9,10236(r9) ffc09570: 80 69 00 34 lwz r3,52(r9) ffc09574: 48 00 00 29 bl ffc0959c <_POSIX_RWLock_Translate_core_RWLock_return_code> ffc09578: 48 00 00 08 b ffc09580 ffc0957c: 38 60 00 16 li r3,22 case OBJECTS_ERROR: break; } return EINVAL; } ffc09580: 80 01 00 2c lwz r0,44(r1) ffc09584: 83 a1 00 1c lwz r29,28(r1) ffc09588: 7c 08 03 a6 mtlr r0 ffc0958c: 83 c1 00 20 lwz r30,32(r1) ffc09590: 83 e1 00 24 lwz r31,36(r1) ffc09594: 38 21 00 28 addi r1,r1,40 ffc09598: 4e 80 00 20 blr =============================================================================== ffc09ed0 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { if ( !attr ) ffc09ed0: 2c 03 00 00 cmpwi r3,0 ffc09ed4: 41 82 00 24 beq- ffc09ef8 return EINVAL; if ( !attr->is_initialized ) ffc09ed8: 80 03 00 00 lwz r0,0(r3) ffc09edc: 2f 80 00 00 cmpwi cr7,r0,0 ffc09ee0: 41 9e 00 18 beq- cr7,ffc09ef8 return EINVAL; switch ( pshared ) { ffc09ee4: 2b 84 00 01 cmplwi cr7,r4,1 ffc09ee8: 41 9d 00 10 bgt- cr7,ffc09ef8 <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; ffc09eec: 90 83 00 04 stw r4,4(r3) ffc09ef0: 38 60 00 00 li r3,0 return 0; ffc09ef4: 4e 80 00 20 blr ffc09ef8: 38 60 00 16 li r3,22 default: return EINVAL; } } ffc09efc: 4e 80 00 20 blr =============================================================================== ffc0b530 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { ffc0b530: 94 21 ff d0 stwu r1,-48(r1) ffc0b534: 7c 08 02 a6 mflr r0 ffc0b538: 93 e1 00 2c stw r31,44(r1) int rc; /* * Check all the parameters */ if ( !param ) ffc0b53c: 7c bf 2b 79 mr. r31,r5 int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { ffc0b540: 93 81 00 20 stw r28,32(r1) int rc; /* * Check all the parameters */ if ( !param ) ffc0b544: 3b 80 00 16 li r28,22 int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { ffc0b548: 93 a1 00 24 stw r29,36(r1) ffc0b54c: 7c 7d 1b 78 mr r29,r3 ffc0b550: 93 c1 00 28 stw r30,40(r1) ffc0b554: 7c 9e 23 78 mr r30,r4 ffc0b558: 90 01 00 34 stw r0,52(r1) ffc0b55c: 93 61 00 1c stw r27,28(r1) int rc; /* * Check all the parameters */ if ( !param ) ffc0b560: 41 82 01 18 beq- ffc0b678 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( ffc0b564: 7c 83 23 78 mr r3,r4 ffc0b568: 38 a1 00 08 addi r5,r1,8 ffc0b56c: 7f e4 fb 78 mr r4,r31 ffc0b570: 38 c1 00 0c addi r6,r1,12 ffc0b574: 48 00 6a 29 bl ffc11f9c <_POSIX_Thread_Translate_sched_param> policy, param, &budget_algorithm, &budget_callout ); if ( rc ) ffc0b578: 7c 7c 1b 79 mr. r28,r3 ffc0b57c: 40 82 00 fc bne- ffc0b678 ffc0b580: 3c 60 00 00 lis r3,0 ffc0b584: 38 63 2e d8 addi r3,r3,11992 ffc0b588: 7f a4 eb 78 mr r4,r29 ffc0b58c: 38 a1 00 10 addi r5,r1,16 ffc0b590: 48 00 25 bd bl ffc0db4c <_Objects_Get> /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { ffc0b594: 80 01 00 10 lwz r0,16(r1) ffc0b598: 7c 7b 1b 78 mr r27,r3 ffc0b59c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b5a0: 41 9e 00 0c beq- cr7,ffc0b5ac ffc0b5a4: 3b 80 00 03 li r28,3 ffc0b5a8: 48 00 00 d0 b ffc0b678 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0b5ac: 83 a3 01 48 lwz r29,328(r3) if ( api->schedpolicy == SCHED_SPORADIC ) ffc0b5b0: 80 1d 00 80 lwz r0,128(r29) ffc0b5b4: 2f 80 00 04 cmpwi cr7,r0,4 ffc0b5b8: 40 be 00 0c bne+ cr7,ffc0b5c4 (void) _Watchdog_Remove( &api->Sporadic_timer ); ffc0b5bc: 38 7d 00 a4 addi r3,r29,164 ffc0b5c0: 48 00 49 95 bl ffc0ff54 <_Watchdog_Remove> api->schedpolicy = policy; ffc0b5c4: 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 ) { ffc0b5c8: 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; ffc0b5cc: 81 5f 00 04 lwz r10,4(r31) ffc0b5d0: 81 7f 00 08 lwz r11,8(r31) ffc0b5d4: 81 3f 00 0c lwz r9,12(r31) ffc0b5d8: 80 1f 00 00 lwz r0,0(r31) ffc0b5dc: 91 5d 00 88 stw r10,136(r29) ffc0b5e0: 91 7d 00 8c stw r11,140(r29) ffc0b5e4: 91 3d 00 90 stw r9,144(r29) ffc0b5e8: 90 1d 00 84 stw r0,132(r29) ffc0b5ec: 81 3f 00 18 lwz r9,24(r31) ffc0b5f0: 81 5f 00 10 lwz r10,16(r31) ffc0b5f4: 81 7f 00 14 lwz r11,20(r31) ffc0b5f8: 91 3d 00 9c stw r9,156(r29) the_thread->budget_algorithm = budget_algorithm; ffc0b5fc: 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; ffc0b600: 91 5d 00 94 stw r10,148(r29) the_thread->budget_algorithm = budget_algorithm; ffc0b604: 91 3b 00 7c stw r9,124(r27) the_thread->budget_callout = budget_callout; ffc0b608: 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; ffc0b60c: 91 7d 00 98 stw r11,152(r29) the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; ffc0b610: 91 3b 00 80 stw r9,128(r27) switch ( api->schedpolicy ) { ffc0b614: 41 9c 00 60 blt- cr7,ffc0b674 <== NEVER TAKEN ffc0b618: 2f 9e 00 02 cmpwi cr7,r30,2 ffc0b61c: 40 9d 00 10 ble- cr7,ffc0b62c ffc0b620: 2f 9e 00 04 cmpwi cr7,r30,4 ffc0b624: 40 be 00 50 bne+ cr7,ffc0b674 <== NEVER TAKEN ffc0b628: 48 00 00 34 b ffc0b65c ffc0b62c: 3d 20 00 00 lis r9,0 ffc0b630: 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; ffc0b634: 3d 60 00 00 lis r11,0 ffc0b638: 81 3d 00 84 lwz r9,132(r29) the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( ffc0b63c: 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; ffc0b640: 80 0b 28 08 lwz r0,10248(r11) the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( ffc0b644: 38 a0 00 01 li r5,1 ffc0b648: 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; ffc0b64c: 90 1b 00 78 stw r0,120(r27) the_thread->real_priority = ffc0b650: 90 9b 00 18 stw r4,24(r27) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( ffc0b654: 48 00 29 81 bl ffc0dfd4 <_Thread_Change_priority> the_thread, the_thread->real_priority, true ); break; ffc0b658: 48 00 00 1c b ffc0b674 case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; ffc0b65c: 90 1d 00 a0 stw r0,160(r29) _Watchdog_Remove( &api->Sporadic_timer ); ffc0b660: 38 7d 00 a4 addi r3,r29,164 ffc0b664: 48 00 48 f1 bl ffc0ff54 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); ffc0b668: 7f 64 db 78 mr r4,r27 ffc0b66c: 38 60 00 00 li r3,0 ffc0b670: 4b ff fe 1d bl ffc0b48c <_POSIX_Threads_Sporadic_budget_TSR> break; } _Thread_Enable_dispatch(); ffc0b674: 48 00 2f e9 bl ffc0e65c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } ffc0b678: 80 01 00 34 lwz r0,52(r1) ffc0b67c: 7f 83 e3 78 mr r3,r28 ffc0b680: 83 61 00 1c lwz r27,28(r1) ffc0b684: 7c 08 03 a6 mtlr r0 ffc0b688: 83 81 00 20 lwz r28,32(r1) ffc0b68c: 83 a1 00 24 lwz r29,36(r1) ffc0b690: 83 c1 00 28 lwz r30,40(r1) ffc0b694: 83 e1 00 2c lwz r31,44(r1) ffc0b698: 38 21 00 30 addi r1,r1,48 ffc0b69c: 4e 80 00 20 blr =============================================================================== ffc084d4 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { ffc084d4: 94 21 ff f0 stwu r1,-16(r1) ffc084d8: 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() ) ffc084dc: 3d 20 00 00 lis r9,0 * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { ffc084e0: 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() ) ffc084e4: 80 09 27 bc lwz r0,10172(r9) * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { ffc084e8: 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() ) ffc084ec: 2f 80 00 00 cmpwi cr7,r0,0 ffc084f0: 40 9e 00 58 bne- cr7,ffc08548 <== NEVER TAKEN ffc084f4: 3d 20 00 00 lis r9,0 ffc084f8: 81 49 27 94 lwz r10,10132(r9) return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; ffc084fc: 3d 60 00 00 lis r11,0 ffc08500: 81 6b 27 d4 lwz r11,10196(r11) ffc08504: 38 0a 00 01 addi r0,r10,1 ffc08508: 90 09 27 94 stw r0,10132(r9) ffc0850c: 81 2b 01 48 lwz r9,328(r11) _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && ffc08510: 80 09 00 d4 lwz r0,212(r9) ffc08514: 3b e0 00 00 li r31,0 ffc08518: 2f 80 00 00 cmpwi cr7,r0,0 ffc0851c: 40 9e 00 10 bne- cr7,ffc0852c <== NEVER TAKEN /* Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ int _EXFUN(pthread_setcancelstate, (int __state, int *__oldstate)); int _EXFUN(pthread_setcanceltype, (int __type, int *__oldtype)); void _EXFUN(pthread_testcancel, (void)); ffc08520: 80 09 00 dc lwz r0,220(r9) ffc08524: 31 20 ff ff addic r9,r0,-1 ffc08528: 7f e9 01 10 subfe r31,r9,r0 thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); ffc0852c: 48 00 2e 61 bl ffc0b38c <_Thread_Enable_dispatch> if ( cancel ) ffc08530: 2f 9f 00 00 cmpwi cr7,r31,0 ffc08534: 41 be 00 14 beq+ cr7,ffc08548 _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); ffc08538: 3d 20 00 00 lis r9,0 ffc0853c: 80 69 27 d4 lwz r3,10196(r9) ffc08540: 38 80 ff ff li r4,-1 ffc08544: 48 00 69 21 bl ffc0ee64 <_POSIX_Thread_Exit> } ffc08548: 80 01 00 14 lwz r0,20(r1) ffc0854c: 83 e1 00 0c lwz r31,12(r1) ffc08550: 38 21 00 10 addi r1,r1,16 ffc08554: 7c 08 03 a6 mtlr r0 ffc08558: 4e 80 00 20 blr =============================================================================== ffc23664 : ssize_t read( int fd, void *buffer, size_t count ) { ffc23664: 94 21 ff f0 stwu r1,-16(r1) ffc23668: 7c 08 02 a6 mflr r0 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc2366c: 3d 20 00 00 lis r9,0 ssize_t read( int fd, void *buffer, size_t count ) { ffc23670: 90 01 00 14 stw r0,20(r1) ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc23674: 80 09 26 ac lwz r0,9900(r9) ssize_t read( int fd, void *buffer, size_t count ) { ffc23678: 93 e1 00 0c stw r31,12(r1) ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc2367c: 7f 83 00 40 cmplw cr7,r3,r0 ffc23680: 40 9c 00 20 bge- cr7,ffc236a0 <== NEVER TAKEN iop = rtems_libio_iop( fd ); ffc23684: 3d 40 00 00 lis r10,0 ffc23688: 83 ea 27 6c lwz r31,10092(r10) ffc2368c: 1c 63 00 48 mulli r3,r3,72 ffc23690: 7f ff 1a 14 add r31,r31,r3 rtems_libio_check_is_open( iop ); ffc23694: 80 1f 00 18 lwz r0,24(r31) ffc23698: 70 0a 01 00 andi. r10,r0,256 ffc2369c: 40 a2 00 10 bne+ ffc236ac ffc236a0: 4b ff 49 cd bl ffc1806c <__errno> ffc236a4: 38 00 00 09 li r0,9 ffc236a8: 48 00 00 44 b ffc236ec rtems_libio_check_buffer( buffer ); ffc236ac: 2f 84 00 00 cmpwi cr7,r4,0 ffc236b0: 41 9e 00 18 beq- cr7,ffc236c8 <== NEVER TAKEN rtems_libio_check_count( count ); ffc236b4: 2f 85 00 00 cmpwi cr7,r5,0 ffc236b8: 38 60 00 00 li r3,0 ffc236bc: 41 9e 00 70 beq- cr7,ffc2372c <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); ffc236c0: 70 09 00 02 andi. r9,r0,2 ffc236c4: 40 a2 00 10 bne+ ffc236d4 <== ALWAYS TAKEN ffc236c8: 4b ff 49 a5 bl ffc1806c <__errno> <== NOT EXECUTED ffc236cc: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc236d0: 48 00 00 1c b ffc236ec <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) ffc236d4: 81 3f 00 40 lwz r9,64(r31) ffc236d8: 80 09 00 08 lwz r0,8(r9) ffc236dc: 2f 80 00 00 cmpwi cr7,r0,0 ffc236e0: 40 be 00 18 bne+ cr7,ffc236f8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc236e4: 4b ff 49 89 bl ffc1806c <__errno> <== NOT EXECUTED ffc236e8: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc236ec: 90 03 00 00 stw r0,0(r3) ffc236f0: 38 60 ff ff li r3,-1 ffc236f4: 48 00 00 38 b ffc2372c rc = (*iop->handlers->read_h)( iop, buffer, count ); ffc236f8: 7f e3 fb 78 mr r3,r31 ffc236fc: 7c 09 03 a6 mtctr r0 ffc23700: 4e 80 04 21 bctrl if ( rc > 0 ) ffc23704: 2c 03 00 00 cmpwi r3,0 ffc23708: 40 81 00 24 ble- ffc2372c iop->offset += rc; ffc2370c: 80 ff 00 10 lwz r7,16(r31) ffc23710: 7c 6a 1b 78 mr r10,r3 ffc23714: 81 1f 00 14 lwz r8,20(r31) ffc23718: 7c 69 fe 70 srawi r9,r3,31 ffc2371c: 7d 88 50 14 addc r12,r8,r10 ffc23720: 7d 67 49 14 adde r11,r7,r9 ffc23724: 91 7f 00 10 stw r11,16(r31) ffc23728: 91 9f 00 14 stw r12,20(r31) return rc; } ffc2372c: 80 01 00 14 lwz r0,20(r1) ffc23730: 83 e1 00 0c lwz r31,12(r1) ffc23734: 38 21 00 10 addi r1,r1,16 ffc23738: 7c 08 03 a6 mtlr r0 ffc2373c: 4e 80 00 20 blr =============================================================================== ffc08470 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { ffc08470: 94 21 ff c8 stwu r1,-56(r1) ffc08474: 7c 08 02 a6 mflr r0 ffc08478: 93 a1 00 2c stw r29,44(r1) rtems_filesystem_location_info_t loc; int result; if (!buf) ffc0847c: 7c 9d 23 79 mr. r29,r4 ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { ffc08480: 93 81 00 28 stw r28,40(r1) ffc08484: 7c 7c 1b 78 mr r28,r3 ffc08488: 93 c1 00 30 stw r30,48(r1) ffc0848c: 7c be 2b 78 mr r30,r5 ffc08490: 90 01 00 3c stw r0,60(r1) ffc08494: 93 e1 00 34 stw r31,52(r1) rtems_filesystem_location_info_t loc; int result; if (!buf) ffc08498: 40 a2 00 10 bne+ ffc084a8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); ffc0849c: 48 00 ea 19 bl ffc16eb4 <__errno> <== NOT EXECUTED ffc084a0: 38 00 00 0e li r0,14 <== NOT EXECUTED ffc084a4: 48 00 00 60 b ffc08504 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), ffc084a8: 48 01 09 fd bl ffc18ea4 ffc084ac: 3b e1 00 08 addi r31,r1,8 ffc084b0: 7c 64 1b 78 mr r4,r3 ffc084b4: 38 a0 00 00 li r5,0 ffc084b8: 7f 83 e3 78 mr r3,r28 ffc084bc: 7f e6 fb 78 mr r6,r31 ffc084c0: 38 e0 00 00 li r7,0 ffc084c4: 4b ff ea 41 bl ffc06f04 0, &loc, false ); if ( result != 0 ) ffc084c8: 3b 80 ff ff li r28,-1 ffc084cc: 2f 83 00 00 cmpwi cr7,r3,0 ffc084d0: 40 9e 00 cc bne- cr7,ffc0859c <== NEVER TAKEN return -1; if ( !loc.ops->node_type_h ){ ffc084d4: 81 21 00 14 lwz r9,20(r1) ffc084d8: 80 09 00 10 lwz r0,16(r9) ffc084dc: 2f 80 00 00 cmpwi cr7,r0,0 ffc084e0: 40 be 00 30 bne+ cr7,ffc08510 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); ffc084e4: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc084e8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc084ec: 41 9e 00 10 beq- cr7,ffc084fc <== NOT EXECUTED ffc084f0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc084f4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc084f8: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc084fc: 48 00 e9 b9 bl ffc16eb4 <__errno> <== NOT EXECUTED ffc08500: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc08504: 90 03 00 00 stw r0,0(r3) ffc08508: 3b 80 ff ff li r28,-1 ffc0850c: 48 00 00 90 b ffc0859c } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ ffc08510: 7f e3 fb 78 mr r3,r31 ffc08514: 7c 09 03 a6 mtctr r0 ffc08518: 4e 80 04 21 bctrl ffc0851c: 81 21 00 14 lwz r9,20(r1) ffc08520: 2f 83 00 04 cmpwi cr7,r3,4 ffc08524: 41 be 00 30 beq+ cr7,ffc08554 rtems_filesystem_freenode( &loc ); ffc08528: 2f 89 00 00 cmpwi cr7,r9,0 ffc0852c: 41 9e 00 1c beq- cr7,ffc08548 <== NEVER TAKEN ffc08530: 80 09 00 1c lwz r0,28(r9) ffc08534: 2f 80 00 00 cmpwi cr7,r0,0 ffc08538: 41 9e 00 10 beq- cr7,ffc08548 <== NEVER TAKEN ffc0853c: 7f e3 fb 78 mr r3,r31 ffc08540: 7c 09 03 a6 mtctr r0 ffc08544: 4e 80 04 21 bctrl rtems_set_errno_and_return_minus_one( EINVAL ); ffc08548: 48 00 e9 6d bl ffc16eb4 <__errno> ffc0854c: 38 00 00 16 li r0,22 ffc08550: 4b ff ff b4 b ffc08504 } if ( !loc.ops->readlink_h ){ ffc08554: 80 09 00 3c lwz r0,60(r9) ffc08558: 2f 80 00 00 cmpwi cr7,r0,0 ffc0855c: 41 be ff 88 beq- cr7,ffc084e4 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); ffc08560: 7f a4 eb 78 mr r4,r29 ffc08564: 7c 09 03 a6 mtctr r0 ffc08568: 7f c5 f3 78 mr r5,r30 ffc0856c: 7f e3 fb 78 mr r3,r31 ffc08570: 4e 80 04 21 bctrl rtems_filesystem_freenode( &loc ); ffc08574: 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 ); ffc08578: 7c 7c 1b 78 mr r28,r3 rtems_filesystem_freenode( &loc ); ffc0857c: 2f 89 00 00 cmpwi cr7,r9,0 ffc08580: 41 9e 00 1c beq- cr7,ffc0859c <== NEVER TAKEN ffc08584: 80 09 00 1c lwz r0,28(r9) ffc08588: 2f 80 00 00 cmpwi cr7,r0,0 ffc0858c: 41 9e 00 10 beq- cr7,ffc0859c <== NEVER TAKEN ffc08590: 7f e3 fb 78 mr r3,r31 ffc08594: 7c 09 03 a6 mtctr r0 ffc08598: 4e 80 04 21 bctrl return result; } ffc0859c: 80 01 00 3c lwz r0,60(r1) ffc085a0: 7f 83 e3 78 mr r3,r28 ffc085a4: 83 a1 00 2c lwz r29,44(r1) ffc085a8: 7c 08 03 a6 mtlr r0 ffc085ac: 83 81 00 28 lwz r28,40(r1) ffc085b0: 83 c1 00 30 lwz r30,48(r1) ffc085b4: 83 e1 00 34 lwz r31,52(r1) ffc085b8: 38 21 00 38 addi r1,r1,56 ffc085bc: 4e 80 00 20 blr =============================================================================== ffc067b4 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { ffc067b4: 94 21 ff d8 stwu r1,-40(r1) ffc067b8: 7c 08 02 a6 mflr r0 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); ffc067bc: 3d 20 00 00 lis r9,0 ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { ffc067c0: 90 01 00 2c stw r0,44(r1) int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); ffc067c4: 80 09 26 8c lwz r0,9868(r9) ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { ffc067c8: 93 81 00 18 stw r28,24(r1) ffc067cc: 7c bc 2b 78 mr r28,r5 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); ffc067d0: 7f 83 00 40 cmplw cr7,r3,r0 ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { ffc067d4: 93 21 00 0c stw r25,12(r1) ffc067d8: 93 41 00 10 stw r26,16(r1) ffc067dc: 93 61 00 14 stw r27,20(r1) ffc067e0: 93 a1 00 1c stw r29,28(r1) ffc067e4: 93 c1 00 20 stw r30,32(r1) ffc067e8: 93 e1 00 24 stw r31,36(r1) int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); ffc067ec: 40 9c 00 20 bge- cr7,ffc0680c <== NEVER TAKEN iop = rtems_libio_iop( fd ); ffc067f0: 3d 20 00 00 lis r9,0 ffc067f4: 83 a9 27 50 lwz r29,10064(r9) ffc067f8: 1c 63 00 48 mulli r3,r3,72 ffc067fc: 7f bd 1a 14 add r29,r29,r3 rtems_libio_check_is_open( iop ); ffc06800: 80 1d 00 18 lwz r0,24(r29) ffc06804: 70 09 01 00 andi. r9,r0,256 ffc06808: 40 a2 00 10 bne+ ffc06818 <== ALWAYS TAKEN ffc0680c: 48 00 e0 29 bl ffc14834 <__errno> <== NOT EXECUTED ffc06810: 38 00 00 09 li r0,9 <== NOT EXECUTED ffc06814: 48 00 00 14 b ffc06828 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); ffc06818: 70 09 00 02 andi. r9,r0,2 ffc0681c: 40 a2 00 14 bne+ ffc06830 <== ALWAYS TAKEN ffc06820: 48 00 e0 15 bl ffc14834 <__errno> ffc06824: 38 00 00 16 li r0,22 ffc06828: 90 03 00 00 stw r0,0(r3) ffc0682c: 48 00 00 bc b ffc068e8 /* * Argument validation on IO vector */ if ( !iov ) ffc06830: 2f 84 00 00 cmpwi cr7,r4,0 ffc06834: 41 be ff ec beq- cr7,ffc06820 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) ffc06838: 2f 85 00 00 cmpwi cr7,r5,0 ffc0683c: 40 bd ff e4 ble- cr7,ffc06820 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) ffc06840: 2f 85 04 00 cmpwi cr7,r5,1024 ffc06844: 41 bd ff dc bgt- cr7,ffc06820 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) ffc06848: 81 3d 00 40 lwz r9,64(r29) ffc0684c: 80 09 00 08 lwz r0,8(r9) ffc06850: 2f 80 00 00 cmpwi cr7,r0,0 ffc06854: 40 be 00 10 bne+ cr7,ffc06864 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc06858: 48 00 df dd bl ffc14834 <__errno> <== NOT EXECUTED ffc0685c: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc06860: 4b ff ff c8 b ffc06828 <== NOT EXECUTED ffc06864: 7c a9 03 a6 mtctr r5 ffc06868: 7c 9e 23 78 mr r30,r4 ffc0686c: 7c 89 23 78 mr r9,r4 ffc06870: 38 00 00 01 li r0,1 ffc06874: 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 ) ffc06878: 81 49 00 00 lwz r10,0(r9) ffc0687c: 2f 8a 00 00 cmpwi cr7,r10,0 ffc06880: 41 be ff a0 beq- cr7,ffc06820 if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; ffc06884: 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++ ) { ffc06888: 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; ffc0688c: 7d 4b 42 14 add r10,r11,r8 if ( total < old ) ffc06890: 7f 8a 58 00 cmpw cr7,r10,r11 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) ffc06894: 31 08 ff ff addic r8,r8,-1 ffc06898: 7d 08 41 10 subfe r8,r8,r8 ffc0689c: 7c 00 40 38 and r0,r0,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++ ) { ffc068a0: 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 ) ffc068a4: 41 bc ff 7c blt- cr7,ffc06820 * 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++ ) { ffc068a8: 42 00 ff d0 bdnz+ ffc06878 /* * 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 ) { ffc068ac: 2f 80 00 00 cmpwi cr7,r0,0 ffc068b0: 3b 60 00 00 li r27,0 ffc068b4: 3b e0 00 00 li r31,0 ffc068b8: 40 9e 00 74 bne- cr7,ffc0692c /* * 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 ); ffc068bc: 81 3d 00 40 lwz r9,64(r29) ffc068c0: 7f a3 eb 78 mr r3,r29 ffc068c4: 80 9e 00 00 lwz r4,0(r30) } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc068c8: 3b 7b 00 01 addi r27,r27,1 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); ffc068cc: 80 09 00 08 lwz r0,8(r9) ffc068d0: 80 be 00 04 lwz r5,4(r30) ffc068d4: 7c 09 03 a6 mtctr r0 ffc068d8: 4e 80 04 21 bctrl } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc068dc: 7f 9b e0 00 cmpw cr7,r27,r28 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) ffc068e0: 2c 03 00 00 cmpwi r3,0 ffc068e4: 40 a0 00 0c bge+ ffc068f0 <== ALWAYS TAKEN ffc068e8: 3b e0 ff ff li r31,-1 ffc068ec: 48 00 00 40 b ffc0692c return -1; if ( bytes > 0 ) { ffc068f0: 41 82 00 28 beq- ffc06918 <== NEVER TAKEN iop->offset += bytes; ffc068f4: 81 7d 00 10 lwz r11,16(r29) ffc068f8: 7c 7a 1b 78 mr r26,r3 ffc068fc: 81 9d 00 14 lwz r12,20(r29) ffc06900: 7c 79 fe 70 srawi r25,r3,31 total += bytes; ffc06904: 7f ff 1a 14 add r31,r31,r3 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; ffc06908: 7d 4c d0 14 addc r10,r12,r26 ffc0690c: 7d 2b c9 14 adde r9,r11,r25 ffc06910: 91 3d 00 10 stw r9,16(r29) ffc06914: 91 5d 00 14 stw r10,20(r29) total += bytes; } if (bytes != iov[ v ].iov_len) ffc06918: 80 1e 00 04 lwz r0,4(r30) } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc0691c: 3b de 00 08 addi r30,r30,8 if ( bytes > 0 ) { iop->offset += bytes; total += bytes; } if (bytes != iov[ v ].iov_len) ffc06920: 7f 03 00 00 cmpw cr6,r3,r0 ffc06924: 40 9a 00 08 bne- cr6,ffc0692c <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc06928: 41 9c ff 94 blt+ cr7,ffc068bc if (bytes != iov[ v ].iov_len) break; } return total; } ffc0692c: 80 01 00 2c lwz r0,44(r1) ffc06930: 7f e3 fb 78 mr r3,r31 ffc06934: 83 21 00 0c lwz r25,12(r1) ffc06938: 7c 08 03 a6 mtlr r0 ffc0693c: 83 41 00 10 lwz r26,16(r1) ffc06940: 83 61 00 14 lwz r27,20(r1) ffc06944: 83 81 00 18 lwz r28,24(r1) ffc06948: 83 a1 00 1c lwz r29,28(r1) ffc0694c: 83 c1 00 20 lwz r30,32(r1) ffc06950: 83 e1 00 24 lwz r31,36(r1) ffc06954: 38 21 00 28 addi r1,r1,40 ffc06958: 4e 80 00 20 blr =============================================================================== ffc06ba0 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); ffc06ba0: 94 21 ff d8 stwu r1,-40(r1) ffc06ba4: 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())) { ffc06ba8: 3d 20 00 00 lis r9,0 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); ffc06bac: 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())) { ffc06bb0: 80 09 27 f4 lwz r0,10228(r9) { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); ffc06bb4: 3d 20 00 00 lis r9,0 ffc06bb8: 39 29 2b c0 addi r9,r9,11200 ffc06bbc: 93 c1 00 20 stw r30,32(r1) /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { ffc06bc0: 2f 80 00 03 cmpwi cr7,r0,3 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); ffc06bc4: 81 69 00 10 lwz r11,16(r9) ffc06bc8: 7c 9e 23 78 mr r30,r4 ffc06bcc: 93 e1 00 24 stw r31,36(r1) ffc06bd0: 7c 7f 1b 78 mr r31,r3 ffc06bd4: 39 6b 00 01 addi r11,r11,1 ffc06bd8: 93 a1 00 1c stw r29,28(r1) ffc06bdc: 91 69 00 10 stw r11,16(r9) /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { ffc06be0: 40 be 00 24 bne+ cr7,ffc06c04 <== NEVER TAKEN if (_Thread_Dispatch_disable_level > 0) ffc06be4: 3d 20 00 00 lis r9,0 ffc06be8: 80 09 27 90 lwz r0,10128(r9) ffc06bec: 2f 80 00 00 cmpwi cr7,r0,0 ffc06bf0: 40 be 00 d8 bne+ cr7,ffc06cc8 <== NEVER TAKEN return (void *) 0; if (_ISR_Nest_level > 0) ffc06bf4: 3d 20 00 00 lis r9,0 ffc06bf8: 80 09 27 b8 lwz r0,10168(r9) ffc06bfc: 2f 80 00 00 cmpwi cr7,r0,0 ffc06c00: 40 9e 00 c8 bne- cr7,ffc06cc8 <== NEVER TAKEN } /* * Continue with realloc(). */ if ( !ptr ) ffc06c04: 2f 9f 00 00 cmpwi cr7,r31,0 ffc06c08: 40 be 00 14 bne+ cr7,ffc06c1c return malloc( size ); ffc06c0c: 7f c3 f3 78 mr r3,r30 ffc06c10: 4b ff f2 99 bl ffc05ea8 ffc06c14: 7c 7f 1b 78 mr r31,r3 ffc06c18: 48 00 00 b4 b ffc06ccc if ( !size ) { ffc06c1c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc06c20: 40 be 00 10 bne+ cr7,ffc06c30 <== ALWAYS TAKEN free( ptr ); ffc06c24: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc06c28: 4b ff ee 8d bl ffc05ab4 <== NOT EXECUTED ffc06c2c: 48 00 00 9c b ffc06cc8 <== NOT EXECUTED return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { ffc06c30: 3f a0 00 00 lis r29,0 ffc06c34: 80 7d 26 bc lwz r3,9916(r29) ffc06c38: 7f e4 fb 78 mr r4,r31 ffc06c3c: 38 a1 00 08 addi r5,r1,8 ffc06c40: 48 00 51 11 bl ffc0bd50 <_Protected_heap_Get_block_size> ffc06c44: 2f 83 00 00 cmpwi cr7,r3,0 ffc06c48: 40 be 00 14 bne+ cr7,ffc06c5c errno = EINVAL; ffc06c4c: 48 01 14 21 bl ffc1806c <__errno> ffc06c50: 38 00 00 16 li r0,22 ffc06c54: 90 03 00 00 stw r0,0(r3) ffc06c58: 48 00 00 70 b ffc06cc8 #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 ) ) { ffc06c5c: 80 7d 26 bc lwz r3,9916(r29) ffc06c60: 7f e4 fb 78 mr r4,r31 ffc06c64: 7f c5 f3 78 mr r5,r30 ffc06c68: 48 00 51 55 bl ffc0bdbc <_Protected_heap_Resize_block> ffc06c6c: 2f 83 00 00 cmpwi cr7,r3,0 ffc06c70: 40 be 00 5c bne+ cr7,ffc06ccc * 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 ); ffc06c74: 7f c3 f3 78 mr r3,r30 ffc06c78: 4b ff f2 31 bl ffc05ea8 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ ffc06c7c: 3d 20 00 00 lis r9,0 if ( !new_area ) { ffc06c80: 7c 7d 1b 79 mr. r29,r3 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ ffc06c84: 39 29 2b c0 addi r9,r9,11200 ffc06c88: 81 69 00 04 lwz r11,4(r9) ffc06c8c: 38 0b ff ff addi r0,r11,-1 ffc06c90: 90 09 00 04 stw r0,4(r9) if ( !new_area ) { ffc06c94: 41 82 00 34 beq- ffc06cc8 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); ffc06c98: 80 01 00 08 lwz r0,8(r1) ffc06c9c: 7f c5 f3 78 mr r5,r30 ffc06ca0: 7f 9e 00 40 cmplw cr7,r30,r0 ffc06ca4: 40 9d 00 08 ble- cr7,ffc06cac <== NEVER TAKEN ffc06ca8: 7c 05 03 78 mr r5,r0 ffc06cac: 7f e4 fb 78 mr r4,r31 ffc06cb0: 7f a3 eb 78 mr r3,r29 ffc06cb4: 48 01 1f a1 bl ffc18c54 free( ptr ); ffc06cb8: 7f e3 fb 78 mr r3,r31 ffc06cbc: 4b ff ed f9 bl ffc05ab4 ffc06cc0: 7f bf eb 78 mr r31,r29 return new_area; ffc06cc4: 48 00 00 08 b ffc06ccc ffc06cc8: 3b e0 00 00 li r31,0 } ffc06ccc: 80 01 00 2c lwz r0,44(r1) ffc06cd0: 7f e3 fb 78 mr r3,r31 ffc06cd4: 83 a1 00 1c lwz r29,28(r1) ffc06cd8: 7c 08 03 a6 mtlr r0 ffc06cdc: 83 c1 00 20 lwz r30,32(r1) ffc06ce0: 83 e1 00 24 lwz r31,36(r1) ffc06ce4: 38 21 00 28 addi r1,r1,40 ffc06ce8: 4e 80 00 20 blr =============================================================================== ffc09898 : #include int rmdir( const char *pathname ) { ffc09898: 94 21 ff b8 stwu r1,-72(r1) ffc0989c: 7c 08 02 a6 mflr r0 ffc098a0: 93 a1 00 3c stw r29,60(r1) ffc098a4: 93 c1 00 40 stw r30,64(r1) ffc098a8: 7c 7e 1b 78 mr r30,r3 ffc098ac: 90 01 00 4c stw r0,76(r1) ffc098b0: 93 e1 00 44 stw r31,68(r1) /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); ffc098b4: 4b ff e2 99 bl ffc07b4c if ( parentpathlen == 0 ) ffc098b8: 7c 7d 1b 79 mr. r29,r3 ffc098bc: 40 82 00 8c bne- ffc09948 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); ffc098c0: 88 1e 00 00 lbz r0,0(r30) ffc098c4: 2f 80 00 2f cmpwi cr7,r0,47 ffc098c8: 41 9e 00 14 beq- cr7,ffc098dc <== ALWAYS TAKEN ffc098cc: 2f 80 00 5c cmpwi cr7,r0,92 <== NOT EXECUTED ffc098d0: 41 9e 00 0c beq- cr7,ffc098dc <== NOT EXECUTED ffc098d4: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc098d8: 40 9e 00 38 bne- cr7,ffc09910 <== NOT EXECUTED ffc098dc: 3d 20 00 00 lis r9,0 ffc098e0: 81 29 27 3c lwz r9,10044(r9) ffc098e4: 3b e0 00 00 li r31,0 ffc098e8: 80 09 00 24 lwz r0,36(r9) ffc098ec: 81 09 00 18 lwz r8,24(r9) ffc098f0: 81 49 00 1c lwz r10,28(r9) ffc098f4: 81 69 00 20 lwz r11,32(r9) ffc098f8: 91 01 00 08 stw r8,8(r1) ffc098fc: 91 41 00 0c stw r10,12(r1) ffc09900: 91 61 00 10 stw r11,16(r1) ffc09904: 90 01 00 14 stw r0,20(r1) ffc09908: 80 09 00 28 lwz r0,40(r9) ffc0990c: 48 00 00 34 b ffc09940 ffc09910: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc09914: 81 29 27 3c lwz r9,10044(r9) <== NOT EXECUTED ffc09918: 3b e0 00 00 li r31,0 <== NOT EXECUTED ffc0991c: 80 09 00 10 lwz r0,16(r9) <== NOT EXECUTED ffc09920: 81 09 00 04 lwz r8,4(r9) <== NOT EXECUTED ffc09924: 81 49 00 08 lwz r10,8(r9) <== NOT EXECUTED ffc09928: 81 69 00 0c lwz r11,12(r9) <== NOT EXECUTED ffc0992c: 91 01 00 08 stw r8,8(r1) <== NOT EXECUTED ffc09930: 91 41 00 0c stw r10,12(r1) <== NOT EXECUTED ffc09934: 91 61 00 10 stw r11,16(r1) <== NOT EXECUTED ffc09938: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED ffc0993c: 80 09 00 14 lwz r0,20(r9) <== NOT EXECUTED ffc09940: 90 01 00 18 stw r0,24(r1) ffc09944: 48 00 00 28 b ffc0996c else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, ffc09948: 7f c3 f3 78 mr r3,r30 ffc0994c: 7f a4 eb 78 mr r4,r29 ffc09950: 38 a0 00 02 li r5,2 ffc09954: 38 c1 00 08 addi r6,r1,8 ffc09958: 38 e0 00 00 li r7,0 ffc0995c: 4b ff e3 69 bl ffc07cc4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) ffc09960: 2f 83 00 00 cmpwi cr7,r3,0 ffc09964: 40 9e 01 fc bne- cr7,ffc09b60 <== NEVER TAKEN ffc09968: 3b e0 00 01 li r31,1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc0996c: 80 01 00 08 lwz r0,8(r1) name = pathname + parentpathlen; ffc09970: 7f be ea 14 add r29,r30,r29 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc09974: 7f a3 eb 78 mr r3,r29 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc09978: 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 ), ffc0997c: 3b c1 00 1c addi r30,r1,28 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc09980: 80 01 00 0c lwz r0,12(r1) ffc09984: 90 01 00 20 stw r0,32(r1) ffc09988: 80 01 00 10 lwz r0,16(r1) ffc0998c: 90 01 00 24 stw r0,36(r1) ffc09990: 80 01 00 14 lwz r0,20(r1) ffc09994: 90 01 00 28 stw r0,40(r1) ffc09998: 80 01 00 18 lwz r0,24(r1) ffc0999c: 90 01 00 2c stw r0,44(r1) name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc099a0: 48 01 1d 25 bl ffc1b6c4 ffc099a4: 7c 64 1b 78 mr r4,r3 ffc099a8: 7f a3 eb 78 mr r3,r29 ffc099ac: 4b ff e1 65 bl ffc07b10 ffc099b0: 7f bd 1a 14 add r29,r29,r3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc099b4: 7f a3 eb 78 mr r3,r29 ffc099b8: 48 01 1d 0d bl ffc1b6c4 ffc099bc: 38 a0 00 00 li r5,0 ffc099c0: 7c 64 1b 78 mr r4,r3 ffc099c4: 7f c6 f3 78 mr r6,r30 ffc099c8: 7f a3 eb 78 mr r3,r29 ffc099cc: 38 e0 00 00 li r7,0 ffc099d0: 4b ff e1 e1 bl ffc07bb0 0, &loc, false ); if ( result != 0 ) { ffc099d4: 2f 83 00 00 cmpwi cr7,r3,0 ffc099d8: 41 be 00 30 beq+ cr7,ffc09a08 if ( free_parentloc ) ffc099dc: 2f 9f 00 00 cmpwi cr7,r31,0 ffc099e0: 41 be 01 80 beq+ cr7,ffc09b60 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); ffc099e4: 81 21 00 14 lwz r9,20(r1) <== NOT EXECUTED ffc099e8: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc099ec: 41 be 01 74 beq+ cr7,ffc09b60 <== NOT EXECUTED ffc099f0: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc099f4: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED ffc099f8: 3b a0 ff ff li r29,-1 <== NOT EXECUTED ffc099fc: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc09a00: 41 be 01 60 beq+ cr7,ffc09b60 <== NOT EXECUTED ffc09a04: 48 00 01 50 b ffc09b54 <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ ffc09a08: 81 21 00 28 lwz r9,40(r1) ffc09a0c: 80 09 00 10 lwz r0,16(r9) ffc09a10: 2f 80 00 00 cmpwi cr7,r0,0 ffc09a14: 41 9e 00 90 beq- cr7,ffc09aa4 <== 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 ){ ffc09a18: 7f c3 f3 78 mr r3,r30 ffc09a1c: 7c 09 03 a6 mtctr r0 ffc09a20: 4e 80 04 21 bctrl ffc09a24: 2f 83 00 01 cmpwi cr7,r3,1 ffc09a28: 41 be 00 60 beq+ cr7,ffc09a88 rtems_filesystem_freenode( &loc ); ffc09a2c: 81 21 00 28 lwz r9,40(r1) ffc09a30: 2f 89 00 00 cmpwi cr7,r9,0 ffc09a34: 41 9e 00 1c beq- cr7,ffc09a50 <== NEVER TAKEN ffc09a38: 80 09 00 1c lwz r0,28(r9) ffc09a3c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09a40: 41 9e 00 10 beq- cr7,ffc09a50 <== NEVER TAKEN ffc09a44: 7f c3 f3 78 mr r3,r30 ffc09a48: 7c 09 03 a6 mtctr r0 ffc09a4c: 4e 80 04 21 bctrl if ( free_parentloc ) ffc09a50: 2f 9f 00 00 cmpwi cr7,r31,0 ffc09a54: 41 9e 00 28 beq- cr7,ffc09a7c <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); ffc09a58: 81 21 00 14 lwz r9,20(r1) ffc09a5c: 2f 89 00 00 cmpwi cr7,r9,0 ffc09a60: 41 9e 00 1c beq- cr7,ffc09a7c <== NEVER TAKEN ffc09a64: 80 09 00 1c lwz r0,28(r9) ffc09a68: 2f 80 00 00 cmpwi cr7,r0,0 ffc09a6c: 41 9e 00 10 beq- cr7,ffc09a7c <== NEVER TAKEN ffc09a70: 38 61 00 08 addi r3,r1,8 ffc09a74: 7c 09 03 a6 mtctr r0 ffc09a78: 4e 80 04 21 bctrl rtems_set_errno_and_return_minus_one( ENOTDIR ); ffc09a7c: 48 00 e1 e9 bl ffc17c64 <__errno> ffc09a80: 38 00 00 14 li r0,20 ffc09a84: 48 00 00 6c b ffc09af0 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ ffc09a88: 81 21 00 24 lwz r9,36(r1) ffc09a8c: 80 09 00 34 lwz r0,52(r9) ffc09a90: 2f 80 00 00 cmpwi cr7,r0,0 ffc09a94: 40 be 00 64 bne+ cr7,ffc09af8 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); ffc09a98: 81 21 00 28 lwz r9,40(r1) <== NOT EXECUTED ffc09a9c: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc09aa0: 41 9e 00 1c beq- cr7,ffc09abc <== NOT EXECUTED ffc09aa4: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc09aa8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc09aac: 41 9e 00 10 beq- cr7,ffc09abc <== NOT EXECUTED ffc09ab0: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc09ab4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc09ab8: 4e 80 04 21 bctrl <== NOT EXECUTED if ( free_parentloc ) ffc09abc: 2f 9f 00 00 cmpwi cr7,r31,0 <== NOT EXECUTED ffc09ac0: 41 9e 00 28 beq- cr7,ffc09ae8 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); ffc09ac4: 81 21 00 14 lwz r9,20(r1) <== NOT EXECUTED ffc09ac8: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc09acc: 41 9e 00 1c beq- cr7,ffc09ae8 <== NOT EXECUTED ffc09ad0: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc09ad4: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc09ad8: 41 9e 00 10 beq- cr7,ffc09ae8 <== NOT EXECUTED ffc09adc: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED ffc09ae0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc09ae4: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc09ae8: 48 00 e1 7d bl ffc17c64 <__errno> <== NOT EXECUTED ffc09aec: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc09af0: 90 03 00 00 stw r0,0(r3) ffc09af4: 48 00 00 6c b ffc09b60 } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); ffc09af8: 38 61 00 08 addi r3,r1,8 ffc09afc: 7c 09 03 a6 mtctr r0 ffc09b00: 7f c4 f3 78 mr r4,r30 ffc09b04: 4e 80 04 21 bctrl rtems_filesystem_freenode( &loc ); ffc09b08: 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 ); ffc09b0c: 7c 7d 1b 78 mr r29,r3 rtems_filesystem_freenode( &loc ); ffc09b10: 2f 89 00 00 cmpwi cr7,r9,0 ffc09b14: 41 9e 00 1c beq- cr7,ffc09b30 <== NEVER TAKEN ffc09b18: 80 09 00 1c lwz r0,28(r9) ffc09b1c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09b20: 41 9e 00 10 beq- cr7,ffc09b30 <== NEVER TAKEN ffc09b24: 7f c3 f3 78 mr r3,r30 ffc09b28: 7c 09 03 a6 mtctr r0 ffc09b2c: 4e 80 04 21 bctrl if ( free_parentloc ) ffc09b30: 2f 9f 00 00 cmpwi cr7,r31,0 ffc09b34: 41 9e 00 30 beq- cr7,ffc09b64 rtems_filesystem_freenode( &parentloc ); ffc09b38: 81 21 00 14 lwz r9,20(r1) ffc09b3c: 2f 89 00 00 cmpwi cr7,r9,0 ffc09b40: 41 9e 00 24 beq- cr7,ffc09b64 <== NEVER TAKEN ffc09b44: 80 09 00 1c lwz r0,28(r9) ffc09b48: 2f 80 00 00 cmpwi cr7,r0,0 ffc09b4c: 41 9e 00 18 beq- cr7,ffc09b64 <== NEVER TAKEN ffc09b50: 38 61 00 08 addi r3,r1,8 ffc09b54: 7c 09 03 a6 mtctr r0 ffc09b58: 4e 80 04 21 bctrl ffc09b5c: 48 00 00 08 b ffc09b64 ffc09b60: 3b a0 ff ff li r29,-1 return result; } ffc09b64: 80 01 00 4c lwz r0,76(r1) ffc09b68: 7f a3 eb 78 mr r3,r29 ffc09b6c: 83 c1 00 40 lwz r30,64(r1) ffc09b70: 7c 08 03 a6 mtlr r0 ffc09b74: 83 a1 00 3c lwz r29,60(r1) ffc09b78: 83 e1 00 44 lwz r31,68(r1) ffc09b7c: 38 21 00 48 addi r1,r1,72 ffc09b80: 4e 80 00 20 blr =============================================================================== ffc190cc : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { ffc190cc: 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; } ffc190d0: 38 63 22 50 addi r3,r3,8784 <== NOT EXECUTED ffc190d4: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc15000 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { ffc15000: 94 21 ff f0 stwu r1,-16(r1) ffc15004: 7c 08 02 a6 mflr r0 ffc15008: 93 e1 00 0c stw r31,12(r1) ffc1500c: 7c 9f 23 78 mr r31,r4 ffc15010: 90 01 00 14 stw r0,20(r1) const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); ffc15014: 48 00 00 31 bl ffc15044 if (nap) ffc15018: 2c 03 00 00 cmpwi r3,0 ffc1501c: 41 82 00 0c beq- ffc15028 <== NEVER TAKEN return nap->name; ffc15020: 80 63 00 00 lwz r3,0(r3) ffc15024: 48 00 00 0c b ffc15030 return rtems_assoc_name_bad(local_value); ffc15028: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc1502c: 48 00 40 a1 bl ffc190cc <== NOT EXECUTED } ffc15030: 80 01 00 14 lwz r0,20(r1) ffc15034: 83 e1 00 0c lwz r31,12(r1) ffc15038: 38 21 00 10 addi r1,r1,16 ffc1503c: 7c 08 03 a6 mtlr r0 ffc15040: 4e 80 00 20 blr =============================================================================== ffc17fe8 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { ffc17fe8: 94 21 ff f0 stwu r1,-16(r1) ffc17fec: 7c 08 02 a6 mflr r0 ffc17ff0: 90 01 00 14 stw r0,20(r1) ffc17ff4: 93 e1 00 0c stw r31,12(r1) ffc17ff8: 7c 7f 1b 78 mr r31,r3 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc17ffc: 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 ) { ffc18000: 93 c1 00 08 stw r30,8(r1) ffc18004: 7c 9e 23 78 mr r30,r4 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc18008: 2f 83 00 00 cmpwi cr7,r3,0 ffc1800c: 41 9e 00 1c beq- cr7,ffc18028 <== NEVER TAKEN ffc18010: 3c 80 ff c2 lis r4,-62 ffc18014: 38 84 50 85 addi r4,r4,20613 ffc18018: 48 00 11 5d bl ffc19174 default_ap = ap++; ffc1801c: 7f e0 fb 78 mr r0,r31 uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc18020: 2f 83 00 00 cmpwi cr7,r3,0 ffc18024: 41 9e 00 18 beq- cr7,ffc1803c <== NEVER TAKEN default_ap = ap++; ffc18028: 38 00 00 00 li r0,0 ffc1802c: 48 00 00 14 b ffc18040 for ( ; ap->name; ap++) if (ap->local_value == local_value) ffc18030: 81 3f 00 04 lwz r9,4(r31) ffc18034: 7f 89 f0 00 cmpw cr7,r9,r30 ffc18038: 41 9e 00 18 beq- cr7,ffc18050 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc1803c: 3b ff 00 0c addi r31,r31,12 ffc18040: 81 3f 00 00 lwz r9,0(r31) ffc18044: 2f 89 00 00 cmpwi cr7,r9,0 ffc18048: 40 9e ff e8 bne+ cr7,ffc18030 ffc1804c: 7c 1f 03 78 mr r31,r0 if (ap->local_value == local_value) return ap; return default_ap; } ffc18050: 80 01 00 14 lwz r0,20(r1) ffc18054: 7f e3 fb 78 mr r3,r31 ffc18058: 83 c1 00 08 lwz r30,8(r1) ffc1805c: 7c 08 03 a6 mtlr r0 ffc18060: 83 e1 00 0c lwz r31,12(r1) ffc18064: 38 21 00 10 addi r1,r1,16 ffc18068: 4e 80 00 20 blr =============================================================================== ffc17138 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { ffc17138: 94 21 ff f0 stwu r1,-16(r1) ffc1713c: 7c 08 02 a6 mflr r0 ffc17140: 90 01 00 14 stw r0,20(r1) ffc17144: 93 e1 00 0c stw r31,12(r1) ffc17148: 7c 7f 1b 78 mr r31,r3 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc1714c: 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 ) { ffc17150: 93 c1 00 08 stw r30,8(r1) ffc17154: 7c 9e 23 78 mr r30,r4 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc17158: 2f 83 00 00 cmpwi cr7,r3,0 ffc1715c: 41 9e 00 1c beq- cr7,ffc17178 <== NEVER TAKEN ffc17160: 3c 80 ff c2 lis r4,-62 ffc17164: 38 84 50 85 addi r4,r4,20613 ffc17168: 48 00 20 0d bl ffc19174 default_ap = ap++; ffc1716c: 7f e0 fb 78 mr r0,r31 uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) ffc17170: 2f 83 00 00 cmpwi cr7,r3,0 ffc17174: 41 9e 00 18 beq- cr7,ffc1718c <== NEVER TAKEN default_ap = ap++; ffc17178: 38 00 00 00 li r0,0 ffc1717c: 48 00 00 14 b ffc17190 for ( ; ap->name; ap++) if (ap->remote_value == remote_value) ffc17180: 81 3f 00 08 lwz r9,8(r31) ffc17184: 7f 89 f0 00 cmpw cr7,r9,r30 ffc17188: 41 9e 00 18 beq- cr7,ffc171a0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) ffc1718c: 3b ff 00 0c addi r31,r31,12 ffc17190: 81 3f 00 00 lwz r9,0(r31) ffc17194: 2f 89 00 00 cmpwi cr7,r9,0 ffc17198: 40 9e ff e8 bne+ cr7,ffc17180 ffc1719c: 7c 1f 03 78 mr r31,r0 if (ap->remote_value == remote_value) return ap; return default_ap; } ffc171a0: 80 01 00 14 lwz r0,20(r1) ffc171a4: 7f e3 fb 78 mr r3,r31 ffc171a8: 83 c1 00 08 lwz r30,8(r1) ffc171ac: 7c 08 03 a6 mtlr r0 ffc171b0: 83 e1 00 0c lwz r31,12(r1) ffc171b4: 38 21 00 10 addi r1,r1,16 ffc171b8: 4e 80 00 20 blr =============================================================================== ffc17f38 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { ffc17f38: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED ffc17f3c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc17f40: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); ffc17f44: 48 00 00 a5 bl ffc17fe8 <== NOT EXECUTED if (nap) ffc17f48: 7c 69 1b 79 mr. r9,r3 <== NOT EXECUTED ffc17f4c: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc17f50: 41 82 00 08 beq- ffc17f58 <== NOT EXECUTED return nap->remote_value; ffc17f54: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED return 0; } ffc17f58: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc17f5c: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc17f60: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc17f64: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc03f3c : size_t length ) { const char *p; if ( !name ) ffc03f3c: 2f 83 00 00 cmpwi cr7,r3,0 const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { ffc03f40: 94 21 ff f0 stwu r1,-16(r1) ffc03f44: 7c 08 02 a6 mflr r0 ffc03f48: 93 c1 00 08 stw r30,8(r1) ffc03f4c: 7c be 2b 78 mr r30,r5 ffc03f50: 93 e1 00 0c stw r31,12(r1) ffc03f54: 7c 9f 23 78 mr r31,r4 ffc03f58: 90 01 00 14 stw r0,20(r1) const char *p; if ( !name ) ffc03f5c: 41 be 00 7c beq+ cr7,ffc03fd8 return NULL; if ( !value ) ffc03f60: 2f 84 00 00 cmpwi cr7,r4,0 ffc03f64: 41 be 00 78 beq+ cr7,ffc03fdc return NULL; if ( !length ) ffc03f68: 2f 85 00 00 cmpwi cr7,r5,0 ffc03f6c: 41 be 00 6c beq+ cr7,ffc03fd8 return NULL; value[0] = '\0'; ffc03f70: 38 00 00 00 li r0,0 ffc03f74: 98 04 00 00 stb r0,0(r4) p = rtems_bsp_cmdline_get_param_raw( name ); ffc03f78: 48 00 00 81 bl ffc03ff8 if ( !p ) ffc03f7c: 2c 03 00 00 cmpwi r3,0 ffc03f80: 41 82 00 58 beq- ffc03fd8 if ( *p == '\"' ) { quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) break; value[i++] = *p++; value[i] = '\0'; ffc03f84: 7f c9 03 a6 mtctr r30 value[0] = '\0'; p = rtems_bsp_cmdline_get_param_raw( name ); if ( !p ) ffc03f88: 39 60 00 00 li r11,0 ffc03f8c: 39 20 00 00 li r9,0 if ( *p == '\"' ) { quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) break; value[i++] = *p++; value[i] = '\0'; ffc03f90: 39 40 00 00 li r10,0 ffc03f94: 48 00 00 28 b ffc03fbc int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i quotes++; ffc03f9c: 39 6b 00 01 addi r11,r11,1 ffc03fa0: 48 00 00 10 b ffc03fb0 } else if ( ((quotes % 2) == 0) && *p == ' ' ) ffc03fa4: 2f 80 00 20 cmpwi cr7,r0,32 ffc03fa8: 40 82 00 08 bne- ffc03fb0 ffc03fac: 41 9e 00 30 beq- cr7,ffc03fdc break; value[i++] = *p++; ffc03fb0: 7c 1f 49 ae stbx r0,r31,r9 ffc03fb4: 39 29 00 01 addi r9,r9,1 value[i] = '\0'; ffc03fb8: 7d 5f 49 ae stbx r10,r31,r9 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i ffc03fd0: 42 00 ff c8 bdnz+ ffc03f98 ffc03fd4: 48 00 00 08 b ffc03fdc <== NOT EXECUTED ffc03fd8: 3b e0 00 00 li r31,0 return NULL; copy_string( p, value, length ); return value; } ffc03fdc: 80 01 00 14 lwz r0,20(r1) ffc03fe0: 7f e3 fb 78 mr r3,r31 ffc03fe4: 83 c1 00 08 lwz r30,8(r1) ffc03fe8: 7c 08 03 a6 mtlr r0 ffc03fec: 83 e1 00 0c lwz r31,12(r1) ffc03ff0: 38 21 00 10 addi r1,r1,16 ffc03ff4: 4e 80 00 20 blr =============================================================================== ffc04038 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { ffc04038: 94 21 ff e8 stwu r1,-24(r1) ffc0403c: 7c 08 02 a6 mflr r0 ffc04040: 93 a1 00 0c stw r29,12(r1) ffc04044: 93 c1 00 10 stw r30,16(r1) ffc04048: 7c 7e 1b 78 mr r30,r3 ffc0404c: 93 e1 00 14 stw r31,20(r1) ffc04050: 7c 9f 23 78 mr r31,r4 ffc04054: 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 ); ffc04058: 4b ff fe e5 bl ffc03f3c if ( !p ) ffc0405c: 7c 7d 1b 79 mr. r29,r3 ffc04060: 41 a2 00 74 beq+ ffc040d4 return NULL; rhs = &p[strlen(name)]; ffc04064: 7f c3 f3 78 mr r3,r30 ffc04068: 48 00 ef 0d bl ffc12f74 if ( *rhs != '=' ) ffc0406c: 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)]; ffc04070: 7f bd 1a 14 add r29,r29,r3 if ( *rhs != '=' ) ffc04074: 2f 80 00 3d cmpwi cr7,r0,61 ffc04078: 40 be 00 5c bne+ cr7,ffc040d4 <== NEVER TAKEN return NULL; rhs++; if ( *rhs == '\"' ) ffc0407c: 88 1d 00 01 lbz r0,1(r29) rhs = &p[strlen(name)]; if ( *rhs != '=' ) return NULL; rhs++; ffc04080: 3b bd 00 01 addi r29,r29,1 if ( *rhs == '\"' ) rhs++; ffc04084: 68 09 00 22 xori r9,r0,34 ffc04088: 21 29 00 00 subfic r9,r9,0 ffc0408c: 7d 3d 01 94 addze r9,r29 ffc04090: 7d 3d 4b 78 mr r29,r9 ffc04094: 7f e9 fb 78 mr r9,r31 ffc04098: 48 00 00 0c b ffc040a4 for ( d=value ; *rhs ; ) *d++ = *rhs++; ffc0409c: 98 09 00 00 stb r0,0(r9) ffc040a0: 39 29 00 01 addi r9,r9,1 return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) ffc040a4: 88 1d 00 00 lbz r0,0(r29) *d++ = *rhs++; ffc040a8: 3b bd 00 01 addi r29,r29,1 return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) ffc040ac: 2f 80 00 00 cmpwi cr7,r0,0 ffc040b0: 40 9e ff ec bne+ cr7,ffc0409c *d++ = *rhs++; if ( *(d-1) == '\"' ) ffc040b4: 89 69 ff ff lbz r11,-1(r9) ffc040b8: 38 09 ff ff addi r0,r9,-1 ffc040bc: 2f 8b 00 22 cmpwi cr7,r11,34 ffc040c0: 40 be 00 08 bne+ cr7,ffc040c8 ffc040c4: 7c 09 03 78 mr r9,r0 d--; *d = '\0'; ffc040c8: 38 00 00 00 li r0,0 ffc040cc: 98 09 00 00 stb r0,0(r9) return value; ffc040d0: 48 00 00 08 b ffc040d8 ffc040d4: 3b e0 00 00 li r31,0 } ffc040d8: 80 01 00 1c lwz r0,28(r1) ffc040dc: 7f e3 fb 78 mr r3,r31 ffc040e0: 83 a1 00 0c lwz r29,12(r1) ffc040e4: 7c 08 03 a6 mtlr r0 ffc040e8: 83 c1 00 10 lwz r30,16(r1) ffc040ec: 83 e1 00 14 lwz r31,20(r1) ffc040f0: 38 21 00 18 addi r1,r1,24 ffc040f4: 4e 80 00 20 blr =============================================================================== ffc04d78 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc04d78: 94 21 ff 68 stwu r1,-152(r1) ffc04d7c: 7c 08 02 a6 mflr r0 ffc04d80: 90 01 00 9c stw r0,156(r1) Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) ffc04d84: 7c 80 23 79 mr. r0,r4 void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc04d88: 93 c1 00 90 stw r30,144(r1) ffc04d8c: 7c 7e 1b 78 mr r30,r3 ffc04d90: 91 c1 00 50 stw r14,80(r1) ffc04d94: 91 e1 00 54 stw r15,84(r1) ffc04d98: 92 01 00 58 stw r16,88(r1) ffc04d9c: 92 21 00 5c stw r17,92(r1) ffc04da0: 92 41 00 60 stw r18,96(r1) ffc04da4: 92 61 00 64 stw r19,100(r1) ffc04da8: 92 81 00 68 stw r20,104(r1) ffc04dac: 92 a1 00 6c stw r21,108(r1) ffc04db0: 92 c1 00 70 stw r22,112(r1) ffc04db4: 92 e1 00 74 stw r23,116(r1) ffc04db8: 93 01 00 78 stw r24,120(r1) ffc04dbc: 93 21 00 7c stw r25,124(r1) ffc04dc0: 93 41 00 80 stw r26,128(r1) ffc04dc4: 93 61 00 84 stw r27,132(r1) ffc04dc8: 93 81 00 88 stw r28,136(r1) ffc04dcc: 93 a1 00 8c stw r29,140(r1) ffc04dd0: 93 e1 00 94 stw r31,148(r1) Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) ffc04dd4: 90 01 00 48 stw r0,72(r1) ffc04dd8: 41 82 01 b4 beq- ffc04f8c <== 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 ); ffc04ddc: 3a 21 00 10 addi r17,r1,16 ffc04de0: 7e 23 8b 78 mr r3,r17 ffc04de4: 48 00 60 d5 bl ffc0aeb8 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); ffc04de8: 3a 01 00 18 addi r16,r1,24 ffc04dec: 3c 60 00 00 lis r3,0 ffc04df0: 38 63 28 ac addi r3,r3,10412 ffc04df4: 7e 24 8b 78 mr r4,r17 ffc04df8: 7e 05 83 78 mr r5,r16 ffc04dfc: 48 00 8c 51 bl ffc0da4c <_Timespec_Subtract> } } } #endif (*print)( ffc04e00: 80 01 00 48 lwz r0,72(r1) ffc04e04: 3c 80 ff c2 lis r4,-62 ffc04e08: 38 84 36 6e addi r4,r4,13934 ffc04e0c: 7c 09 03 a6 mtctr r0 ffc04e10: 7f c3 f3 78 mr r3,r30 ffc04e14: 3f e0 00 01 lis r31,1 ffc04e18: 3b ff aa 44 addi r31,r31,-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 ) { ffc04e1c: 3e 40 00 00 lis r18,0 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( ffc04e20: 3e 60 ff c2 lis r19,-62 } } } #endif (*print)( ffc04e24: 4c c6 31 82 crclr 4*cr1+eq ffc04e28: 4e 80 04 21 bctrl /* * Print the information */ (*print)( context, ffc04e2c: 3e 80 ff c2 lis r20,-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( ffc04e30: 3e a0 00 00 lis r21,0 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); ffc04e34: 3b 41 00 30 addi r26,r1,48 /* * 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 ) { ffc04e38: 3a 52 28 7c addi r18,r18,10364 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( ffc04e3c: 3a 73 37 e0 addi r19,r19,14304 /* * Print the information */ (*print)( context, ffc04e40: 3a 94 37 f3 addi r20,r20,14323 * 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( ffc04e44: 3a b5 28 84 addi r21,r21,10372 /*PAGE * * rtems_cpu_usage_report */ void rtems_cpu_usage_report_with_plugin( ffc04e48: 3a df 00 10 addi r22,r31,16 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); ffc04e4c: 3b 61 00 20 addi r27,r1,32 ffc04e50: 3a e1 00 0c addi r23,r1,12 ffc04e54: 3b 01 00 08 addi r24,r1,8 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) ffc04e58: 81 3f 00 00 lwz r9,0(r31) ffc04e5c: 2f 89 00 00 cmpwi cr7,r9,0 ffc04e60: 41 9e 00 f4 beq- cr7,ffc04f54 continue; information = _Objects_Information_table[ api_index ][ 1 ]; ffc04e64: 83 89 00 04 lwz r28,4(r9) if ( information ) { ffc04e68: 2f 9c 00 00 cmpwi cr7,r28,0 ffc04e6c: 41 9e 00 e8 beq- cr7,ffc04f54 <== NEVER TAKEN ffc04e70: 3b a0 00 01 li r29,1 /* * Print the information */ (*print)( context, ffc04e74: 39 e0 03 e8 li r15,1000 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( ffc04e78: 3b 21 00 28 addi r25,r1,40 ffc04e7c: 48 00 00 bc b ffc04f38 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 ]; ffc04e80: 81 7c 00 1c lwz r11,28(r28) ffc04e84: 7d cb 48 2e lwzx r14,r11,r9 if ( !the_thread ) ffc04e88: 2f 8e 00 00 cmpwi cr7,r14,0 ffc04e8c: 41 9e 00 ac beq- cr7,ffc04f38 <== NEVER TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); ffc04e90: 80 6e 00 08 lwz r3,8(r14) ffc04e94: 48 00 47 91 bl ffc09624 (*print)( ffc04e98: 80 01 00 48 lwz r0,72(r1) ffc04e9c: 7f c3 f3 78 mr r3,r30 ffc04ea0: 80 ae 00 08 lwz r5,8(r14) ffc04ea4: 7c 09 03 a6 mtctr r0 ffc04ea8: 7e 64 9b 78 mr r4,r19 ffc04eac: 7f 46 d3 78 mr r6,r26 ffc04eb0: 4c c6 31 82 crclr 4*cr1+eq ffc04eb4: 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; ffc04eb8: 81 2e 00 84 lwz r9,132(r14) ffc04ebc: 81 4e 00 88 lwz r10,136(r14) ffc04ec0: 91 21 00 20 stw r9,32(r1) ffc04ec4: 91 41 00 24 stw r10,36(r1) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { ffc04ec8: 81 32 00 00 lwz r9,0(r18) ffc04ecc: 80 0e 00 08 lwz r0,8(r14) ffc04ed0: 81 29 00 08 lwz r9,8(r9) ffc04ed4: 7f 89 00 00 cmpw cr7,r9,r0 ffc04ed8: 40 be 00 20 bne+ cr7,ffc04ef8 Timestamp_Control used; _Timestamp_Subtract( ffc04edc: 7e a3 ab 78 mr r3,r21 ffc04ee0: 7e 24 8b 78 mr r4,r17 ffc04ee4: 7f 25 cb 78 mr r5,r25 ffc04ee8: 48 00 8b 65 bl ffc0da4c <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); ffc04eec: 7f 63 db 78 mr r3,r27 ffc04ef0: 7f 24 cb 78 mr r4,r25 ffc04ef4: 48 00 8a 0d bl ffc0d900 <_Timespec_Add_to> }; _Timestamp_Divide( &ran, &total, &ival, &fval ); ffc04ef8: 7f 63 db 78 mr r3,r27 ffc04efc: 7e 04 83 78 mr r4,r16 ffc04f00: 7f 05 c3 78 mr r5,r24 ffc04f04: 7e e6 bb 78 mr r6,r23 ffc04f08: 48 00 8a 55 bl ffc0d95c <_Timespec_Divide> /* * Print the information */ (*print)( context, ffc04f0c: 80 c1 00 24 lwz r6,36(r1) ffc04f10: 80 01 00 48 lwz r0,72(r1) ffc04f14: 7f c3 f3 78 mr r3,r30 ffc04f18: 7c c6 7b 96 divwu r6,r6,r15 ffc04f1c: 80 a1 00 20 lwz r5,32(r1) ffc04f20: 80 e1 00 08 lwz r7,8(r1) ffc04f24: 7c 09 03 a6 mtctr r0 ffc04f28: 81 01 00 0c lwz r8,12(r1) ffc04f2c: 7e 84 a3 78 mr r4,r20 ffc04f30: 4c c6 31 82 crclr 4*cr1+eq ffc04f34: 4e 80 04 21 bctrl 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++ ) { ffc04f38: a0 1c 00 10 lhz r0,16(r28) the_thread = (Thread_Control *)information->local_table[ i ]; ffc04f3c: 57 a9 10 3a rlwinm r9,r29,2,0,29 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); ffc04f40: 7f 45 d3 78 mr r5,r26 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++ ) { ffc04f44: 7f 9d 00 40 cmplw cr7,r29,r0 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); ffc04f48: 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++ ) { ffc04f4c: 3b bd 00 01 addi r29,r29,1 ffc04f50: 40 9d ff 30 ble+ cr7,ffc04e80 ffc04f54: 3b ff 00 04 addi r31,r31,4 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; ffc04f58: 7f 9f b0 00 cmpw cr7,r31,r22 ffc04f5c: 40 9e fe fc bne+ cr7,ffc04e58 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( ffc04f60: 80 c1 00 1c lwz r6,28(r1) ffc04f64: 38 00 03 e8 li r0,1000 ffc04f68: 3c 80 ff c2 lis r4,-62 ffc04f6c: 80 a1 00 18 lwz r5,24(r1) ffc04f70: 7c c6 03 96 divwu r6,r6,r0 ffc04f74: 80 01 00 48 lwz r0,72(r1) ffc04f78: 7c 09 03 a6 mtctr r0 ffc04f7c: 7f c3 f3 78 mr r3,r30 ffc04f80: 38 84 38 0b addi r4,r4,14347 ffc04f84: 4c c6 31 82 crclr 4*cr1+eq ffc04f88: 4e 80 04 21 bctrl "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } ffc04f8c: 80 01 00 9c lwz r0,156(r1) ffc04f90: 81 c1 00 50 lwz r14,80(r1) ffc04f94: 7c 08 03 a6 mtlr r0 ffc04f98: 81 e1 00 54 lwz r15,84(r1) ffc04f9c: 82 01 00 58 lwz r16,88(r1) ffc04fa0: 82 21 00 5c lwz r17,92(r1) ffc04fa4: 82 41 00 60 lwz r18,96(r1) ffc04fa8: 82 61 00 64 lwz r19,100(r1) ffc04fac: 82 81 00 68 lwz r20,104(r1) ffc04fb0: 82 a1 00 6c lwz r21,108(r1) ffc04fb4: 82 c1 00 70 lwz r22,112(r1) ffc04fb8: 82 e1 00 74 lwz r23,116(r1) ffc04fbc: 83 01 00 78 lwz r24,120(r1) ffc04fc0: 83 21 00 7c lwz r25,124(r1) ffc04fc4: 83 41 00 80 lwz r26,128(r1) ffc04fc8: 83 61 00 84 lwz r27,132(r1) ffc04fcc: 83 81 00 88 lwz r28,136(r1) ffc04fd0: 83 a1 00 8c lwz r29,140(r1) ffc04fd4: 83 c1 00 90 lwz r30,144(r1) ffc04fd8: 83 e1 00 94 lwz r31,148(r1) ffc04fdc: 38 21 00 98 addi r1,r1,152 ffc04fe0: 4e 80 00 20 blr =============================================================================== ffc17ef0 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { ffc17ef0: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc17ef4: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc17ef8: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) ffc17efc: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { ffc17f00: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) ffc17f04: 38 63 50 90 addi r3,r3,20624 <== NOT EXECUTED { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { ffc17f08: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) ffc17f0c: 48 00 00 2d bl ffc17f38 <== NOT EXECUTED ffc17f10: 7c 7f 1b 79 mr. r31,r3 <== NOT EXECUTED ffc17f14: 41 a2 00 0c beq+ ffc17f20 <== NOT EXECUTED { errno = rc; ffc17f18: 48 00 01 55 bl ffc1806c <__errno> <== NOT EXECUTED ffc17f1c: 93 e3 00 00 stw r31,0(r3) <== NOT EXECUTED return -1; } return -1; } ffc17f20: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc17f24: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc17f28: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc17f2c: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc17f30: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc17f34: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0a544 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { ffc0a544: 94 21 ff 90 stwu r1,-112(r1) <== NOT EXECUTED ffc0a548: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc0a54c: 90 a1 00 18 stw r5,24(r1) <== NOT EXECUTED ffc0a550: 90 01 00 74 stw r0,116(r1) <== NOT EXECUTED ffc0a554: 90 c1 00 1c stw r6,28(r1) <== NOT EXECUTED ffc0a558: 90 e1 00 20 stw r7,32(r1) <== NOT EXECUTED ffc0a55c: 91 01 00 24 stw r8,36(r1) <== NOT EXECUTED ffc0a560: 91 21 00 28 stw r9,40(r1) <== NOT EXECUTED ffc0a564: 91 41 00 2c stw r10,44(r1) <== NOT EXECUTED ffc0a568: 40 86 00 24 bne- cr1,ffc0a58c <== NOT EXECUTED ffc0a56c: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc0a570: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc0a574: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc0a578: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc0a57c: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc0a580: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc0a584: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc0a588: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); ffc0a58c: 38 00 00 02 li r0,2 <== NOT EXECUTED ffc0a590: 98 01 00 08 stb r0,8(r1) <== NOT EXECUTED ffc0a594: 38 00 00 00 li r0,0 <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); ffc0a598: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED ) { va_list arglist; int chars_written; va_start(arglist, printf_format); ffc0a59c: 98 01 00 09 stb r0,9(r1) <== NOT EXECUTED ffc0a5a0: 38 01 00 78 addi r0,r1,120 <== NOT EXECUTED ffc0a5a4: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED ffc0a5a8: 38 01 00 10 addi r0,r1,16 <== NOT EXECUTED ffc0a5ac: 90 01 00 10 stw r0,16(r1) <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); ffc0a5b0: 4b ff fd 0d bl ffc0a2bc <== NOT EXECUTED va_end(arglist); return chars_written; } ffc0a5b4: 80 01 00 74 lwz r0,116(r1) <== NOT EXECUTED ffc0a5b8: 38 21 00 70 addi r1,r1,112 <== NOT EXECUTED ffc0a5bc: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0a5c0: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc05858 : } int rtems_filesystem_dirname( const char *pathname ) { ffc05858: 94 21 ff f0 stwu r1,-16(r1) ffc0585c: 7c 08 02 a6 mflr r0 ffc05860: 93 e1 00 0c stw r31,12(r1) ffc05864: 7c 7f 1b 78 mr r31,r3 ffc05868: 90 01 00 14 stw r0,20(r1) int len = strlen( pathname ); ffc0586c: 48 01 3a c1 bl ffc1932c ffc05870: 38 03 00 01 addi r0,r3,1 ffc05874: 7f ff 1a 14 add r31,r31,r3 ffc05878: 7c 09 03 a6 mtctr r0 while ( len ) { ffc0587c: 48 00 00 28 b ffc058a4 len--; if ( rtems_filesystem_is_separator( pathname[len] ) ) ffc05880: 88 1f ff ff lbz r0,-1(r31) ) { int len = strlen( pathname ); while ( len ) { len--; ffc05884: 38 63 ff ff addi r3,r3,-1 if ( rtems_filesystem_is_separator( pathname[len] ) ) ffc05888: 3b ff ff ff addi r31,r31,-1 ffc0588c: 2c 80 00 2f cmpwi cr1,r0,47 ffc05890: 2f 80 00 00 cmpwi cr7,r0,0 ffc05894: 2f 00 00 5c cmpwi cr6,r0,92 ffc05898: 41 86 00 10 beq- cr1,ffc058a8 ffc0589c: 41 9a 00 0c beq- cr6,ffc058a8 <== NEVER TAKEN ffc058a0: 41 9e 00 08 beq- cr7,ffc058a8 <== NEVER TAKEN const char *pathname ) { int len = strlen( pathname ); while ( len ) { ffc058a4: 42 00 ff dc bdnz+ ffc05880 if ( rtems_filesystem_is_separator( pathname[len] ) ) break; } return len; } ffc058a8: 80 01 00 14 lwz r0,20(r1) ffc058ac: 83 e1 00 0c lwz r31,12(r1) ffc058b0: 38 21 00 10 addi r1,r1,16 ffc058b4: 7c 08 03 a6 mtlr r0 ffc058b8: 4e 80 00 20 blr =============================================================================== ffc059d0 : /* * Verify Input parameters. */ if ( !pathname ) ffc059d0: 2c 03 00 00 cmpwi r3,0 int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { ffc059d4: 94 21 ff f8 stwu r1,-8(r1) ffc059d8: 7c 08 02 a6 mflr r0 ffc059dc: 90 01 00 0c stw r0,12(r1) /* * Verify Input parameters. */ if ( !pathname ) ffc059e0: 40 a2 00 10 bne+ ffc059f0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); ffc059e4: 48 01 26 89 bl ffc1806c <__errno> <== NOT EXECUTED ffc059e8: 38 00 00 0e li r0,14 <== NOT EXECUTED ffc059ec: 48 00 00 14 b ffc05a00 <== NOT EXECUTED if ( !pathloc ) ffc059f0: 2f 86 00 00 cmpwi cr7,r6,0 ffc059f4: 40 be 00 24 bne+ cr7,ffc05a18 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ ffc059f8: 48 01 26 75 bl ffc1806c <__errno> <== NOT EXECUTED ffc059fc: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc05a00: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } ffc05a04: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc05a08: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc05a0c: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc05a10: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05a14: 4e 80 00 20 blr <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); ffc05a18: 88 03 00 00 lbz r0,0(r3) ffc05a1c: 2f 80 00 2f cmpwi cr7,r0,47 ffc05a20: 41 9e 00 14 beq- cr7,ffc05a34 ffc05a24: 2f 80 00 5c cmpwi cr7,r0,92 ffc05a28: 41 9e 00 0c beq- cr7,ffc05a34 <== NEVER TAKEN ffc05a2c: 2f 80 00 00 cmpwi cr7,r0,0 ffc05a30: 40 9e 00 38 bne- cr7,ffc05a68 <== ALWAYS TAKEN ffc05a34: 3d 20 00 00 lis r9,0 ffc05a38: 81 29 26 f4 lwz r9,9972(r9) ffc05a3c: 38 00 00 01 li r0,1 ffc05a40: 81 89 00 18 lwz r12,24(r9) ffc05a44: 81 09 00 1c lwz r8,28(r9) ffc05a48: 81 49 00 20 lwz r10,32(r9) ffc05a4c: 81 69 00 24 lwz r11,36(r9) ffc05a50: 91 86 00 00 stw r12,0(r6) ffc05a54: 91 06 00 04 stw r8,4(r6) ffc05a58: 91 46 00 08 stw r10,8(r6) ffc05a5c: 91 66 00 0c stw r11,12(r6) ffc05a60: 81 29 00 28 lwz r9,40(r9) ffc05a64: 48 00 00 34 b ffc05a98 ffc05a68: 3d 20 00 00 lis r9,0 ffc05a6c: 81 29 26 f4 lwz r9,9972(r9) ffc05a70: 38 00 00 00 li r0,0 ffc05a74: 81 89 00 04 lwz r12,4(r9) ffc05a78: 81 09 00 08 lwz r8,8(r9) ffc05a7c: 81 49 00 0c lwz r10,12(r9) ffc05a80: 81 69 00 10 lwz r11,16(r9) ffc05a84: 91 86 00 00 stw r12,0(r6) ffc05a88: 91 06 00 04 stw r8,4(r6) ffc05a8c: 91 46 00 08 stw r10,8(r6) ffc05a90: 91 66 00 0c stw r11,12(r6) ffc05a94: 81 29 00 14 lwz r9,20(r9) /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], ffc05a98: 7c 80 20 50 subf r4,r0,r4 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); ffc05a9c: 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], ffc05aa0: 7c 63 02 14 add r3,r3,r0 pathnamelen - i, flags, pathloc, follow_link ); } ffc05aa4: 80 01 00 0c lwz r0,12(r1) ffc05aa8: 38 21 00 08 addi r1,r1,8 ffc05aac: 7c 08 03 a6 mtlr r0 rtems_filesystem_get_start_loc( pathname, &i, pathloc ); /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], ffc05ab0: 4b ff fe 0c b ffc058bc =============================================================================== ffc058bc : /* * Verify Input parameters. */ if ( !pathname ) ffc058bc: 2f 83 00 00 cmpwi cr7,r3,0 int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { ffc058c0: 94 21 ff e8 stwu r1,-24(r1) ffc058c4: 7c 08 02 a6 mflr r0 ffc058c8: 93 a1 00 0c stw r29,12(r1) ffc058cc: 7c fd 3b 78 mr r29,r7 ffc058d0: 93 c1 00 10 stw r30,16(r1) ffc058d4: 7c be 2b 78 mr r30,r5 ffc058d8: 93 e1 00 14 stw r31,20(r1) ffc058dc: 7c df 33 78 mr r31,r6 ffc058e0: 90 01 00 1c stw r0,28(r1) ffc058e4: 93 81 00 08 stw r28,8(r1) /* * Verify Input parameters. */ if ( !pathname ) ffc058e8: 40 be 00 10 bne+ cr7,ffc058f8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); ffc058ec: 48 01 27 81 bl ffc1806c <__errno> <== NOT EXECUTED ffc058f0: 38 00 00 0e li r0,14 <== NOT EXECUTED ffc058f4: 48 00 00 14 b ffc05908 <== NOT EXECUTED if ( !pathloc ) ffc058f8: 2f 86 00 00 cmpwi cr7,r6,0 ffc058fc: 40 be 00 18 bne+ cr7,ffc05914 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ ffc05900: 48 01 27 6d bl ffc1806c <__errno> <== NOT EXECUTED ffc05904: 38 00 00 05 li r0,5 <== NOT EXECUTED ffc05908: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0590c: 3b 80 ff ff li r28,-1 <== NOT EXECUTED ffc05910: 48 00 00 9c b ffc059ac <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) ffc05914: 81 26 00 0c lwz r9,12(r6) ffc05918: 80 09 00 00 lwz r0,0(r9) ffc0591c: 2f 80 00 00 cmpwi cr7,r0,0 ffc05920: 41 9e 00 6c beq- cr7,ffc0598c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); ffc05924: 7c 09 03 a6 mtctr r0 ffc05928: 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 ) { ffc0592c: 7c 7c 1b 79 mr. r28,r3 ffc05930: 40 82 00 7c bne- ffc059ac ffc05934: 2f 9d 00 00 cmpwi cr7,r29,0 ffc05938: 41 9e 00 74 beq- cr7,ffc059ac if ( !pathloc->ops->node_type_h ){ ffc0593c: 81 3f 00 0c lwz r9,12(r31) ffc05940: 80 09 00 10 lwz r0,16(r9) ffc05944: 2f 80 00 00 cmpwi cr7,r0,0 ffc05948: 41 9e 00 2c beq- cr7,ffc05974 <== NEVER TAKEN rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); ffc0594c: 7f e3 fb 78 mr r3,r31 ffc05950: 7c 09 03 a6 mtctr r0 ffc05954: 4e 80 04 21 bctrl if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ffc05958: 38 63 ff fd addi r3,r3,-3 ffc0595c: 2b 83 00 01 cmplwi cr7,r3,1 ffc05960: 41 bd 00 4c bgt+ cr7,ffc059ac ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ ffc05964: 81 3f 00 0c lwz r9,12(r31) ffc05968: 80 09 00 34 lwz r0,52(r9) ffc0596c: 2f 80 00 00 cmpwi cr7,r0,0 ffc05970: 40 be 00 28 bne+ cr7,ffc05998 <== ALWAYS TAKEN rtems_filesystem_freenode( pathloc ); ffc05974: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc05978: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0597c: 41 9e 00 10 beq- cr7,ffc0598c <== NOT EXECUTED ffc05980: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc05984: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc05988: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc0598c: 48 01 26 e1 bl ffc1806c <__errno> <== NOT EXECUTED ffc05990: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc05994: 4b ff ff 74 b ffc05908 <== NOT EXECUTED * 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 ); ffc05998: 7f e3 fb 78 mr r3,r31 ffc0599c: 7c 09 03 a6 mtctr r0 ffc059a0: 7f c4 f3 78 mr r4,r30 ffc059a4: 4e 80 04 21 bctrl ffc059a8: 7c 7c 1b 78 mr r28,r3 } } return result; } ffc059ac: 80 01 00 1c lwz r0,28(r1) ffc059b0: 7f 83 e3 78 mr r3,r28 ffc059b4: 83 a1 00 0c lwz r29,12(r1) ffc059b8: 7c 08 03 a6 mtlr r0 ffc059bc: 83 81 00 08 lwz r28,8(r1) ffc059c0: 83 c1 00 10 lwz r30,16(r1) ffc059c4: 83 e1 00 14 lwz r31,20(r1) ffc059c8: 38 21 00 18 addi r1,r1,24 ffc059cc: 4e 80 00 20 blr =============================================================================== ffc05620 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { ffc05620: 94 21 ff c8 stwu r1,-56(r1) ffc05624: 7c 08 02 a6 mflr r0 ffc05628: 93 e1 00 34 stw r31,52(r1) /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; ffc0562c: 3f e0 00 00 lis r31,0 ffc05630: 81 3f 26 f4 lwz r9,9972(r31) * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { ffc05634: 90 01 00 3c stw r0,60(r1) /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; ffc05638: 38 00 00 12 li r0,18 ffc0563c: 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 ) { ffc05640: 93 a1 00 2c stw r29,44(r1) ffc05644: 93 c1 00 30 stw r30,48(r1) */ rtems_filesystem_umask = 022; init_fs_mount_table(); ffc05648: 48 00 0b 59 bl ffc061a0 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) ffc0564c: 3d 20 00 00 lis r9,0 ffc05650: 80 09 26 b8 lwz r0,9912(r9) rtems_fatal_error_occurred( 0xABCD0001 ); ffc05654: 3c 60 ab cd lis r3,-21555 ffc05658: 60 63 00 01 ori r3,r3,1 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) ffc0565c: 2f 80 00 00 cmpwi cr7,r0,0 ffc05660: 41 9e 00 34 beq- cr7,ffc05694 <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; ffc05664: 3d 20 00 00 lis r9,0 ffc05668: 81 29 26 b4 lwz r9,9908(r9) status = mount( ffc0566c: 38 61 00 08 addi r3,r1,8 ffc05670: 80 e9 00 0c lwz r7,12(r9) ffc05674: 80 89 00 00 lwz r4,0(r9) ffc05678: 80 a9 00 04 lwz r5,4(r9) ffc0567c: 80 c9 00 08 lwz r6,8(r9) ffc05680: 48 00 0b 45 bl ffc061c4 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) ffc05684: 2f 83 ff ff cmpwi cr7,r3,-1 ffc05688: 40 be 00 10 bne+ cr7,ffc05698 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); ffc0568c: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED ffc05690: 60 63 00 02 ori r3,r3,2 <== NOT EXECUTED ffc05694: 48 00 4c 01 bl ffc0a294 <== NOT EXECUTED * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; ffc05698: 81 61 00 08 lwz r11,8(r1) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc0569c: 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; ffc056a0: 81 3f 26 f4 lwz r9,9972(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); ffc056a4: 3b de 48 54 addi r30,r30,18516 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; ffc056a8: 80 eb 00 1c lwz r7,28(r11) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc056ac: 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; ffc056b0: 81 0b 00 20 lwz r8,32(r11) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc056b4: 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; ffc056b8: 81 4b 00 24 lwz r10,36(r11) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc056bc: 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; ffc056c0: 80 0b 00 28 lwz r0,40(r11) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc056c4: 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; ffc056c8: 90 e9 00 18 stw r7,24(r9) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc056cc: 7f c3 f3 78 mr r3,r30 ffc056d0: 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; ffc056d4: 91 09 00 1c stw r8,28(r9) ffc056d8: 91 49 00 20 stw r10,32(r9) ffc056dc: 90 09 00 24 stw r0,36(r9) ffc056e0: 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; ffc056e4: 39 60 00 00 li r11,0 ffc056e8: 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; ffc056ec: 90 09 00 28 stw r0,40(r9) /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc056f0: 48 00 02 e1 bl ffc059d0 rtems_filesystem_root = loc; ffc056f4: 81 3f 26 f4 lwz r9,9972(r31) ffc056f8: 81 41 00 10 lwz r10,16(r1) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc056fc: 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; ffc05700: 81 61 00 14 lwz r11,20(r1) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc05704: 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; ffc05708: 80 01 00 18 lwz r0,24(r1) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc0570c: 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; ffc05710: 81 01 00 0c lwz r8,12(r1) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc05714: 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; ffc05718: 91 49 00 1c stw r10,28(r9) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc0571c: 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; ffc05720: 91 09 00 18 stw r8,24(r9) ffc05724: 91 69 00 20 stw r11,32(r9) ffc05728: 90 09 00 24 stw r0,36(r9) ffc0572c: 80 01 00 1c lwz r0,28(r1) ffc05730: 90 09 00 28 stw r0,40(r9) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc05734: 48 00 02 9d bl ffc059d0 rtems_filesystem_current = loc; ffc05738: 80 01 00 18 lwz r0,24(r1) ffc0573c: 81 3f 26 f4 lwz r9,9972(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); ffc05740: 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; ffc05744: 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); ffc05748: 38 63 48 56 addi r3,r3,18518 /* 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; ffc0574c: 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); ffc05750: 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; ffc05754: 81 01 00 0c lwz r8,12(r1) ffc05758: 91 49 00 08 stw r10,8(r9) ffc0575c: 91 09 00 04 stw r8,4(r9) ffc05760: 91 69 00 0c stw r11,12(r9) ffc05764: 90 09 00 10 stw r0,16(r9) ffc05768: 80 01 00 1c lwz r0,28(r1) ffc0576c: 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); ffc05770: 48 00 08 61 bl ffc05fd0 if ( status != 0 ) ffc05774: 2f 83 00 00 cmpwi cr7,r3,0 ffc05778: 41 be 00 10 beq+ cr7,ffc05788 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0003 ); ffc0577c: 3c 60 ab cd lis r3,-21555 <== NOT EXECUTED ffc05780: 60 63 00 03 ori r3,r3,3 <== NOT EXECUTED ffc05784: 4b ff ff 10 b ffc05694 <== NOT EXECUTED * it will be mounted onto is created. Moreover, if it is going to * use a device, then it is REALLY unfair to attempt this * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ } ffc05788: 80 01 00 3c lwz r0,60(r1) ffc0578c: 83 a1 00 2c lwz r29,44(r1) ffc05790: 7c 08 03 a6 mtlr r0 ffc05794: 83 c1 00 30 lwz r30,48(r1) ffc05798: 83 e1 00 34 lwz r31,52(r1) ffc0579c: 38 21 00 38 addi r1,r1,56 ffc057a0: 4e 80 00 20 blr =============================================================================== ffc0c008 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ ffc0c008: 80 03 00 00 lwz r0,0(r3) <== NOT EXECUTED ffc0c00c: 80 64 00 00 lwz r3,0(r4) <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } ffc0c010: 7c 03 1a 78 xor r3,r0,r3 <== NOT EXECUTED ffc0c014: 7c 63 00 34 cntlzw r3,r3 <== NOT EXECUTED ffc0c018: 54 63 d9 7e rlwinm r3,r3,27,5,31 <== NOT EXECUTED ffc0c01c: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0581c : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { ffc0581c: 38 84 00 01 addi r4,r4,1 ffc05820: 7c 69 1b 78 mr r9,r3 ffc05824: 7c 89 03 a6 mtctr r4 ffc05828: 38 60 00 00 li r3,0 /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) ffc0582c: 48 00 00 08 b ffc05834 { pathname++; pathnamelen--; stripped++; ffc05830: 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 ) ) ffc05834: 7c 09 18 ae lbzx r0,r9,r3 ffc05838: 2c 80 00 00 cmpwi cr1,r0,0 ffc0583c: 2f 80 00 5c cmpwi cr7,r0,92 ffc05840: 2f 00 00 2f cmpwi cr6,r0,47 ffc05844: 4d 86 00 20 beqlr cr1 ffc05848: 42 40 00 0c bdz- ffc05854 ffc0584c: 41 ba ff e4 beq- cr6,ffc05830 ffc05850: 41 be ff e0 beq- cr7,ffc05830 <== NEVER TAKEN pathname++; pathnamelen--; stripped++; } return stripped; } ffc05854: 4e 80 00 20 blr =============================================================================== ffc05444 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { ffc05444: 94 21 ff c0 stwu r1,-64(r1) <== NOT EXECUTED ffc05448: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc0544c: 93 61 00 2c stw r27,44(r1) <== NOT EXECUTED ffc05450: 90 01 00 44 stw r0,68(r1) <== NOT EXECUTED ffc05454: 93 81 00 30 stw r28,48(r1) <== NOT EXECUTED ffc05458: 93 a1 00 34 stw r29,52(r1) <== NOT EXECUTED ffc0545c: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED ffc05460: 93 c1 00 38 stw r30,56(r1) <== NOT EXECUTED ffc05464: 7c 9e 23 78 mr r30,r4 <== NOT EXECUTED ffc05468: 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 ); ffc0546c: 48 01 3e c1 bl ffc1932c <== NOT EXECUTED ffc05470: 3b e1 00 08 addi r31,r1,8 <== NOT EXECUTED ffc05474: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED ffc05478: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc0547c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc05480: 7f e6 fb 78 mr r6,r31 <== NOT EXECUTED ffc05484: 38 e0 00 01 li r7,1 <== NOT EXECUTED ffc05488: 48 00 05 49 bl ffc059d0 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { ffc0548c: 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 ); ffc05490: 7c 7b 1b 78 mr r27,r3 <== NOT EXECUTED the_jnode = loc.node_access; ffc05494: 83 81 00 08 lwz r28,8(r1) <== NOT EXECUTED if ( !loc.ops->node_type_h ) { ffc05498: 80 09 00 10 lwz r0,16(r9) <== NOT EXECUTED ffc0549c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc054a0: 40 9e 00 30 bne- cr7,ffc054d0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); ffc054a4: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc054a8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc054ac: 41 9e 00 10 beq- cr7,ffc054bc <== NOT EXECUTED ffc054b0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc054b4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc054b8: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc054bc: 48 01 2b b1 bl ffc1806c <__errno> <== NOT EXECUTED ffc054c0: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc054c4: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc054c8: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc054cc: 48 00 00 9c b ffc05568 <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); ffc054d0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc054d4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc054d8: 4e 80 04 21 bctrl <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { ffc054dc: 2f 9b 00 00 cmpwi cr7,r27,0 <== NOT EXECUTED ffc054e0: 40 be 00 0c bne+ cr7,ffc054ec <== NOT EXECUTED ffc054e4: 2f 83 00 02 cmpwi cr7,r3,2 <== NOT EXECUTED ffc054e8: 41 9e 00 2c beq- cr7,ffc05514 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); ffc054ec: 81 21 00 14 lwz r9,20(r1) <== NOT EXECUTED ffc054f0: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc054f4: 41 9e 00 68 beq- cr7,ffc0555c <== NOT EXECUTED ffc054f8: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc054fc: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc05500: 41 9e 00 5c beq- cr7,ffc0555c <== NOT EXECUTED ffc05504: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED ffc05508: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0550c: 4e 80 04 21 bctrl <== NOT EXECUTED ffc05510: 48 00 00 4c b ffc0555c <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; ffc05514: 93 be 00 00 stw r29,0(r30) <== NOT EXECUTED device_info->device_name_length = strlen( name ); ffc05518: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc0551c: 48 01 3e 11 bl ffc1932c <== NOT EXECUTED device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); ffc05520: 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 ); ffc05524: 90 7e 00 04 stw r3,4(r30) <== NOT EXECUTED device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); ffc05528: 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; ffc0552c: 80 1c 00 50 lwz r0,80(r28) <== NOT EXECUTED ffc05530: 90 1e 00 08 stw r0,8(r30) <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; ffc05534: 80 1c 00 54 lwz r0,84(r28) <== NOT EXECUTED ffc05538: 90 1e 00 0c stw r0,12(r30) <== NOT EXECUTED rtems_filesystem_freenode( &loc ); ffc0553c: 41 9e 00 28 beq- cr7,ffc05564 <== NOT EXECUTED ffc05540: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc05544: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc05548: 41 9e 00 1c beq- cr7,ffc05564 <== NOT EXECUTED ffc0554c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc05550: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc05554: 4e 80 04 21 bctrl <== NOT EXECUTED ffc05558: 48 00 00 0c b ffc05564 <== NOT EXECUTED ffc0555c: 38 60 00 0d li r3,13 <== NOT EXECUTED ffc05560: 48 00 00 08 b ffc05568 <== NOT EXECUTED ffc05564: 38 60 00 00 li r3,0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } ffc05568: 80 01 00 44 lwz r0,68(r1) <== NOT EXECUTED ffc0556c: 83 61 00 2c lwz r27,44(r1) <== NOT EXECUTED ffc05570: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc05574: 83 81 00 30 lwz r28,48(r1) <== NOT EXECUTED ffc05578: 83 a1 00 34 lwz r29,52(r1) <== NOT EXECUTED ffc0557c: 83 c1 00 38 lwz r30,56(r1) <== NOT EXECUTED ffc05580: 83 e1 00 3c lwz r31,60(r1) <== NOT EXECUTED ffc05584: 38 21 00 40 addi r1,r1,64 <== NOT EXECUTED ffc05588: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc0a410 : 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 ) { ffc0a410: 94 21 ff f0 stwu r1,-16(r1) ffc0a414: 7c 08 02 a6 mflr r0 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0a418: 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 ) { ffc0a41c: 90 01 00 14 stw r0,20(r1) rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0a420: 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; ffc0a424: 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 ) { ffc0a428: 93 e1 00 0c stw r31,12(r1) ffc0a42c: 7c 7f 1b 78 mr r31,r3 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc0a430: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a434: 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; ffc0a438: 80 09 28 08 lwz r0,10248(r9) if ( rtems_interrupt_is_in_progress() ) ffc0a43c: 40 9e 01 40 bne- cr7,ffc0a57c return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) ffc0a440: 2f 85 00 00 cmpwi cr7,r5,0 ffc0a444: 41 9e 01 34 beq- cr7,ffc0a578 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) ffc0a448: 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; ffc0a44c: 90 05 00 00 stw r0,0(r5) if ( driver_table == NULL ) ffc0a450: 41 9e 01 28 beq- cr7,ffc0a578 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0a454: 81 24 00 00 lwz r9,0(r4) ffc0a458: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a45c: 40 be 01 34 bne+ cr7,ffc0a590 ffc0a460: 81 24 00 04 lwz r9,4(r4) ffc0a464: 2f 89 00 00 cmpwi cr7,r9,0 ffc0a468: 40 be 01 28 bne+ cr7,ffc0a590 ffc0a46c: 48 00 01 0c b ffc0a578 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0a470: 3d 20 00 00 lis r9,0 ffc0a474: 81 69 27 90 lwz r11,10128(r9) ffc0a478: 38 0b 00 01 addi r0,r11,1 ffc0a47c: 90 09 27 90 stw r0,10128(r9) if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { ffc0a480: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0a484: 3d 20 00 00 lis r9,0 ffc0a488: 40 9e 00 58 bne- cr7,ffc0a4e0 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; ffc0a48c: 3d 60 00 00 lis r11,0 ffc0a490: 81 29 28 0c lwz r9,10252(r9) ffc0a494: 81 6b 28 08 lwz r11,10248(r11) ffc0a498: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0a49c: 38 0b 00 01 addi r0,r11,1 ffc0a4a0: 40 be 00 28 bne+ cr7,ffc0a4c8 <== ALWAYS TAKEN ffc0a4a4: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0a4a8: 48 00 00 20 b ffc0a4c8 <== NOT EXECUTED static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0a4ac: 81 49 00 00 lwz r10,0(r9) ffc0a4b0: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0a4b4: 40 be 00 ec bne+ cr7,ffc0a5a0 ffc0a4b8: 81 49 00 04 lwz r10,4(r9) ffc0a4bc: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0a4c0: 40 be 00 e0 bne+ cr7,ffc0a5a0 ffc0a4c4: 48 00 00 0c b ffc0a4d0 rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { ffc0a4c8: 34 00 ff ff addic. r0,r0,-1 ffc0a4cc: 40 82 ff e0 bne+ ffc0a4ac } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) ffc0a4d0: 7f 9f 58 00 cmpw cr7,r31,r11 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; ffc0a4d4: 93 e5 00 00 stw r31,0(r5) if ( m != n ) ffc0a4d8: 40 be 00 48 bne+ cr7,ffc0a520 ffc0a4dc: 48 00 00 d0 b ffc0a5ac _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; ffc0a4e0: 1c 1f 00 18 mulli r0,r31,24 ffc0a4e4: 81 29 28 0c lwz r9,10252(r9) static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc0a4e8: 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; ffc0a4ec: 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; ffc0a4f0: 38 00 00 00 li r0,0 ffc0a4f4: 2f 8b 00 00 cmpwi cr7,r11,0 ffc0a4f8: 40 be 00 10 bne+ cr7,ffc0a508 ffc0a4fc: 80 09 00 04 lwz r0,4(r9) ffc0a500: 7c 00 00 34 cntlzw r0,r0 ffc0a504: 54 00 d9 7e rlwinm r0,r0,27,5,31 } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { ffc0a508: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a50c: 40 9e 00 10 bne- cr7,ffc0a51c _Thread_Enable_dispatch(); ffc0a510: 48 00 20 0d bl ffc0c51c <_Thread_Enable_dispatch> ffc0a514: 38 60 00 0c li r3,12 return RTEMS_RESOURCE_IN_USE; ffc0a518: 48 00 00 64 b ffc0a57c } *registered_major = major; ffc0a51c: 93 e5 00 00 stw r31,0(r5) } _IO_Driver_address_table [major] = *driver_table; ffc0a520: 3d 20 00 00 lis r9,0 ffc0a524: 80 c4 00 00 lwz r6,0(r4) ffc0a528: 81 69 28 0c lwz r11,10252(r9) ffc0a52c: 1c 1f 00 18 mulli r0,r31,24 ffc0a530: 80 e4 00 04 lwz r7,4(r4) ffc0a534: 81 04 00 08 lwz r8,8(r4) ffc0a538: 7d 2b 02 14 add r9,r11,r0 ffc0a53c: 81 44 00 0c lwz r10,12(r4) ffc0a540: 7c cb 01 2e stwx r6,r11,r0 ffc0a544: 90 e9 00 04 stw r7,4(r9) ffc0a548: 91 09 00 08 stw r8,8(r9) ffc0a54c: 91 49 00 0c stw r10,12(r9) ffc0a550: 81 64 00 14 lwz r11,20(r4) ffc0a554: 80 04 00 10 lwz r0,16(r4) ffc0a558: 91 69 00 14 stw r11,20(r9) ffc0a55c: 90 09 00 10 stw r0,16(r9) _Thread_Enable_dispatch(); ffc0a560: 48 00 1f bd bl ffc0c51c <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); ffc0a564: 7f e3 fb 78 mr r3,r31 ffc0a568: 38 80 00 00 li r4,0 ffc0a56c: 38 a0 00 00 li r5,0 ffc0a570: 48 00 a2 69 bl ffc147d8 ffc0a574: 48 00 00 08 b ffc0a57c ffc0a578: 38 60 00 09 li r3,9 } ffc0a57c: 80 01 00 14 lwz r0,20(r1) ffc0a580: 83 e1 00 0c lwz r31,12(r1) ffc0a584: 38 21 00 10 addi r1,r1,16 ffc0a588: 7c 08 03 a6 mtlr r0 ffc0a58c: 4e 80 00 20 blr return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) ffc0a590: 7f 9f 00 40 cmplw cr7,r31,r0 ffc0a594: 38 60 00 0a li r3,10 ffc0a598: 41 9c fe d8 blt+ cr7,ffc0a470 ffc0a59c: 4b ff ff e0 b ffc0a57c rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { ffc0a5a0: 3b ff 00 01 addi r31,r31,1 ffc0a5a4: 39 29 00 18 addi r9,r9,24 ffc0a5a8: 4b ff ff 20 b ffc0a4c8 if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); ffc0a5ac: 48 00 1f 71 bl ffc0c51c <_Thread_Enable_dispatch> ffc0a5b0: 38 60 00 05 li r3,5 return sc; ffc0a5b4: 4b ff ff c8 b ffc0a57c =============================================================================== ffc0b4ec : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { ffc0b4ec: 94 21 ff e0 stwu r1,-32(r1) ffc0b4f0: 7c 08 02 a6 mflr r0 ffc0b4f4: 93 61 00 0c stw r27,12(r1) uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) ffc0b4f8: 7c 7b 1b 79 mr. r27,r3 #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { ffc0b4fc: 90 01 00 24 stw r0,36(r1) ffc0b500: 93 81 00 10 stw r28,16(r1) ffc0b504: 93 a1 00 14 stw r29,20(r1) ffc0b508: 93 c1 00 18 stw r30,24(r1) ffc0b50c: 93 e1 00 1c stw r31,28(r1) uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) ffc0b510: 41 82 00 68 beq- ffc0b578 <== NEVER TAKEN ffc0b514: 3f e0 00 01 lis r31,1 ffc0b518: 3b ff aa 44 addi r31,r31,-21948 #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) ffc0b51c: 3b 9f 00 10 addi r28,r31,16 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) ffc0b520: 81 3f 00 00 lwz r9,0(r31) ffc0b524: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b528: 41 9e 00 44 beq- cr7,ffc0b56c continue; information = _Objects_Information_table[ api_index ][ 1 ]; ffc0b52c: 83 a9 00 04 lwz r29,4(r9) if ( !information ) ffc0b530: 3b c0 00 01 li r30,1 ffc0b534: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0b538: 40 be 00 20 bne+ cr7,ffc0b558 ffc0b53c: 48 00 00 30 b ffc0b56c continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; ffc0b540: 81 7d 00 1c lwz r11,28(r29) ffc0b544: 7c 6b 48 2e lwzx r3,r11,r9 if ( !the_thread ) ffc0b548: 2f 83 00 00 cmpwi cr7,r3,0 ffc0b54c: 41 9e 00 0c beq- cr7,ffc0b558 <== NEVER TAKEN continue; (*routine)(the_thread); ffc0b550: 7f 69 03 a6 mtctr r27 ffc0b554: 4e 80 04 21 bctrl information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0b558: a0 1d 00 10 lhz r0,16(r29) the_thread = (Thread_Control *)information->local_table[ i ]; ffc0b55c: 57 c9 10 3a rlwinm r9,r30,2,0,29 information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0b560: 7f 9e 00 40 cmplw cr7,r30,r0 ffc0b564: 3b de 00 01 addi r30,r30,1 ffc0b568: 40 9d ff d8 ble+ cr7,ffc0b540 ffc0b56c: 3b ff 00 04 addi r31,r31,4 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { ffc0b570: 7f 9f e0 00 cmpw cr7,r31,r28 ffc0b574: 40 9e ff ac bne+ cr7,ffc0b520 (*routine)(the_thread); } } } ffc0b578: 80 01 00 24 lwz r0,36(r1) ffc0b57c: 83 61 00 0c lwz r27,12(r1) ffc0b580: 7c 08 03 a6 mtlr r0 ffc0b584: 83 81 00 10 lwz r28,16(r1) ffc0b588: 83 a1 00 14 lwz r29,20(r1) ffc0b58c: 83 c1 00 18 lwz r30,24(r1) ffc0b590: 83 e1 00 1c lwz r31,28(r1) ffc0b594: 38 21 00 20 addi r1,r1,32 ffc0b598: 4e 80 00 20 blr =============================================================================== ffc1328c : * 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 ) { ffc1328c: 94 21 ff d8 stwu r1,-40(r1) 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 ); ffc13290: 3d 20 00 00 lis r9,0 ffc13294: 7c 08 02 a6 mflr r0 ffc13298: 38 80 00 00 li r4,0 ffc1329c: 80 69 27 74 lwz r3,10100(r9) ffc132a0: 38 a0 00 00 li r5,0 ffc132a4: 93 e1 00 24 stw r31,36(r1) rtems_status_code rc; rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) { ffc132a8: 3f e0 00 00 lis r31,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 ) { ffc132ac: 90 01 00 2c stw r0,44(r1) ffc132b0: 93 a1 00 1c stw r29,28(r1) ffc132b4: 93 c1 00 20 stw r30,32(r1) ffc132b8: 4b ff 67 b1 bl ffc09a68 rtems_status_code rc; rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) { ffc132bc: 80 1f 27 70 lwz r0,10096(r31) ffc132c0: 2f 80 00 00 cmpwi cr7,r0,0 ffc132c4: 41 be 00 74 beq+ cr7,ffc13338 rc = rtems_semaphore_create( ffc132c8: 3d 20 00 00 lis r9,0 ffc132cc: 80 69 27 6c lwz r3,10092(r9) ffc132d0: 3d 20 38 e3 lis r9,14563 ffc132d4: 61 29 8e 39 ori r9,r9,36409 ffc132d8: 7c 63 00 50 subf r3,r3,r0 ffc132dc: 7c 63 1e 70 srawi r3,r3,3 ffc132e0: 7c 63 49 d6 mullw r3,r3,r9 ffc132e4: 38 80 00 01 li r4,1 ffc132e8: 64 63 4c 42 oris r3,r3,19522 ffc132ec: 60 63 49 00 ori r3,r3,18688 ffc132f0: 38 a0 00 54 li r5,84 ffc132f4: 38 c0 00 00 li r6,0 ffc132f8: 38 e1 00 08 addi r7,r1,8 ffc132fc: 4b ff 64 9d bl ffc09798 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 0, &sema ); if (rc != RTEMS_SUCCESSFUL) ffc13300: 2f 83 00 00 cmpwi cr7,r3,0 ffc13304: 40 be 00 34 bne+ cr7,ffc13338 <== NEVER TAKEN goto failed; iop = rtems_libio_iop_freelist; ffc13308: 83 df 27 70 lwz r30,10096(r31) next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); ffc1330c: 38 80 00 00 li r4,0 ffc13310: 38 a0 00 48 li r5,72 ffc13314: 7f c3 f3 78 mr r3,r30 &sema ); if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; ffc13318: 83 be 00 38 lwz r29,56(r30) (void) memset( iop, 0, sizeof(rtems_libio_t) ); ffc1331c: 48 00 5a 39 bl ffc18d54 iop->flags = LIBIO_FLAGS_OPEN; ffc13320: 38 00 01 00 li r0,256 ffc13324: 90 1e 00 18 stw r0,24(r30) iop->sem = sema; ffc13328: 80 01 00 08 lwz r0,8(r1) rtems_libio_iop_freelist = next; ffc1332c: 93 bf 27 70 stw r29,10096(r31) 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; ffc13330: 90 1e 00 30 stw r0,48(r30) rtems_libio_iop_freelist = next; goto done; ffc13334: 48 00 00 08 b ffc1333c ffc13338: 3b c0 00 00 li r30,0 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc1333c: 3d 20 00 00 lis r9,0 ffc13340: 80 69 27 74 lwz r3,10100(r9) ffc13344: 4b ff 68 69 bl ffc09bac iop = 0; done: rtems_libio_unlock(); return iop; } ffc13348: 80 01 00 2c lwz r0,44(r1) ffc1334c: 7f c3 f3 78 mr r3,r30 ffc13350: 83 a1 00 1c lwz r29,28(r1) ffc13354: 7c 08 03 a6 mtlr r0 ffc13358: 83 c1 00 20 lwz r30,32(r1) ffc1335c: 83 e1 00 24 lwz r31,36(r1) ffc13360: 38 21 00 28 addi r1,r1,40 ffc13364: 4e 80 00 20 blr =============================================================================== ffc13218 : */ void rtems_libio_free( rtems_libio_t *iop ) { ffc13218: 94 21 ff f0 stwu r1,-16(r1) 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 ); ffc1321c: 3d 20 00 00 lis r9,0 ffc13220: 7c 08 02 a6 mflr r0 ffc13224: 38 80 00 00 li r4,0 ffc13228: 93 e1 00 0c stw r31,12(r1) ffc1322c: 7c 7f 1b 78 mr r31,r3 ffc13230: 38 a0 00 00 li r5,0 ffc13234: 80 69 27 74 lwz r3,10100(r9) ffc13238: 90 01 00 14 stw r0,20(r1) ffc1323c: 4b ff 68 2d bl ffc09a68 rtems_libio_lock(); if (iop->sem) ffc13240: 80 7f 00 30 lwz r3,48(r31) ffc13244: 2f 83 00 00 cmpwi cr7,r3,0 ffc13248: 41 be 00 08 beq+ cr7,ffc13250 <== NEVER TAKEN rtems_semaphore_delete(iop->sem); ffc1324c: 4b ff 67 51 bl ffc0999c iop->flags &= ~LIBIO_FLAGS_OPEN; ffc13250: 81 7f 00 18 lwz r11,24(r31) iop->data1 = rtems_libio_iop_freelist; ffc13254: 3d 20 00 00 lis r9,0 ffc13258: 80 09 27 70 lwz r0,10096(r9) rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; ffc1325c: 55 6b 06 2c rlwinm r11,r11,0,24,22 iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; ffc13260: 93 e9 27 70 stw r31,10096(r9) rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; ffc13264: 91 7f 00 18 stw r11,24(r31) } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc13268: 3d 60 00 00 lis r11,0 iop->data1 = rtems_libio_iop_freelist; ffc1326c: 90 1f 00 38 stw r0,56(r31) ffc13270: 80 6b 27 74 lwz r3,10100(r11) ffc13274: 4b ff 69 39 bl ffc09bac rtems_libio_iop_freelist = iop; rtems_libio_unlock(); } ffc13278: 80 01 00 14 lwz r0,20(r1) ffc1327c: 83 e1 00 0c lwz r31,12(r1) ffc13280: 38 21 00 10 addi r1,r1,16 ffc13284: 7c 08 03 a6 mtlr r0 ffc13288: 4e 80 00 20 blr =============================================================================== ffc05c0c : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { ffc05c0c: 94 21 ff f0 stwu r1,-16(r1) ffc05c10: 7c 08 02 a6 mflr r0 ffc05c14: 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) ffc05c18: 3f e0 00 00 lis r31,0 ffc05c1c: 80 7f 26 ac lwz r3,9900(r31) * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { ffc05c20: 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) ffc05c24: 2f 83 00 00 cmpwi cr7,r3,0 ffc05c28: 41 9e 00 5c beq- cr7,ffc05c84 <== NEVER TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, ffc05c2c: 38 80 00 48 li r4,72 ffc05c30: 4b ff fb 75 bl ffc057a4 ffc05c34: 3d 20 00 00 lis r9,0 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) ffc05c38: 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, ffc05c3c: 90 69 27 6c stw r3,10092(r9) sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) ffc05c40: 40 be 00 0c bne+ cr7,ffc05c4c <== ALWAYS TAKEN rtems_fatal_error_occurred(RTEMS_NO_MEMORY); ffc05c44: 38 60 00 1a li r3,26 <== NOT EXECUTED ffc05c48: 48 00 00 64 b ffc05cac <== NOT EXECUTED iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) ffc05c4c: 80 1f 26 ac lwz r0,9900(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; ffc05c50: 3d 20 00 00 lis r9,0 ffc05c54: 90 69 27 70 stw r3,10096(r9) ffc05c58: 2f 80 00 00 cmpwi cr7,r0,0 ffc05c5c: 40 be 00 10 bne+ cr7,ffc05c6c <== ALWAYS TAKEN ffc05c60: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc05c64: 48 00 00 08 b ffc05c6c <== NOT EXECUTED for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) iop->data1 = iop + 1; ffc05c68: 90 63 ff f0 stw r3,-16(r3) 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++) ffc05c6c: 34 00 ff ff addic. r0,r0,-1 iop->data1 = iop + 1; ffc05c70: 7c 69 1b 78 mr r9,r3 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++) ffc05c74: 38 63 00 48 addi r3,r3,72 ffc05c78: 40 82 ff f0 bne+ ffc05c68 iop->data1 = iop + 1; iop->data1 = NULL; ffc05c7c: 38 00 00 00 li r0,0 ffc05c80: 90 09 00 38 stw r0,56(r9) /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( ffc05c84: 3c 60 4c 42 lis r3,19522 ffc05c88: 3c e0 00 00 lis r7,0 ffc05c8c: 60 63 49 4f ori r3,r3,18767 ffc05c90: 38 e7 27 74 addi r7,r7,10100 ffc05c94: 38 80 00 01 li r4,1 ffc05c98: 38 a0 00 54 li r5,84 ffc05c9c: 38 c0 00 00 li r6,0 ffc05ca0: 48 00 3a f9 bl ffc09798 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) ffc05ca4: 2f 83 00 00 cmpwi cr7,r3,0 ffc05ca8: 41 be 00 08 beq+ cr7,ffc05cb0 <== ALWAYS TAKEN rtems_fatal_error_occurred( rc ); ffc05cac: 48 00 45 e9 bl ffc0a294 <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) ffc05cb0: 3d 20 00 00 lis r9,0 ffc05cb4: 80 09 26 a8 lwz r0,9896(r9) ffc05cb8: 2f 80 00 00 cmpwi cr7,r0,0 ffc05cbc: 41 9e 00 0c beq- cr7,ffc05cc8 <== NEVER TAKEN (* rtems_fs_init_helper)(); ffc05cc0: 7c 09 03 a6 mtctr r0 ffc05cc4: 4e 80 04 21 bctrl } ffc05cc8: 80 01 00 14 lwz r0,20(r1) ffc05ccc: 83 e1 00 0c lwz r31,12(r1) ffc05cd0: 38 21 00 10 addi r1,r1,16 ffc05cd4: 7c 08 03 a6 mtlr r0 ffc05cd8: 4e 80 00 20 blr =============================================================================== ffc130d8 : */ int rtems_libio_is_file_open( void *node_access ) { ffc130d8: 94 21 ff f0 stwu r1,-16(r1) 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 ); ffc130dc: 3d 20 00 00 lis r9,0 ffc130e0: 7c 08 02 a6 mflr r0 ffc130e4: 38 80 00 00 li r4,0 ffc130e8: 93 e1 00 0c stw r31,12(r1) ffc130ec: 7c 7f 1b 78 mr r31,r3 ffc130f0: 38 a0 00 00 li r5,0 ffc130f4: 80 69 27 74 lwz r3,10100(r9) ffc130f8: 90 01 00 14 stw r0,20(r1) ffc130fc: 4b ff 69 6d bl ffc09a68 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc13100: 3d 20 00 00 lis r9,0 ffc13104: 81 69 26 ac lwz r11,9900(r9) ffc13108: 3d 20 00 00 lis r9,0 ffc1310c: 81 29 27 6c lwz r9,10092(r9) ffc13110: 2f 8b 00 00 cmpwi cr7,r11,0 ffc13114: 38 0b 00 01 addi r0,r11,1 ffc13118: 40 be 00 30 bne+ cr7,ffc13148 <== ALWAYS TAKEN ffc1311c: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc13120: 48 00 00 28 b ffc13148 <== NOT EXECUTED if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { ffc13124: 81 69 00 18 lwz r11,24(r9) ffc13128: 71 6a 01 00 andi. r10,r11,256 ffc1312c: 41 82 00 18 beq- ffc13144 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { ffc13130: 81 69 00 1c lwz r11,28(r9) ffc13134: 7f 8b f8 00 cmpw cr7,r11,r31 ffc13138: 40 be 00 0c bne+ cr7,ffc13144 ffc1313c: 3b e0 00 01 li r31,1 ffc13140: 48 00 00 14 b ffc13154 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc13144: 39 29 00 48 addi r9,r9,72 ffc13148: 34 00 ff ff addic. r0,r0,-1 ffc1314c: 40 82 ff d8 bne+ ffc13124 ffc13150: 3b e0 00 00 li r31,0 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc13154: 3d 20 00 00 lis r9,0 ffc13158: 80 69 27 74 lwz r3,10100(r9) ffc1315c: 4b ff 6a 51 bl ffc09bac } rtems_libio_unlock(); return result; } ffc13160: 80 01 00 14 lwz r0,20(r1) ffc13164: 7f e3 fb 78 mr r3,r31 ffc13168: 83 e1 00 0c lwz r31,12(r1) ffc1316c: 7c 08 03 a6 mtlr r0 ffc13170: 38 21 00 10 addi r1,r1,16 ffc13174: 4e 80 00 20 blr =============================================================================== ffc13178 : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { ffc13178: 94 21 ff f0 stwu r1,-16(r1) 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 ); ffc1317c: 3d 20 00 00 lis r9,0 ffc13180: 7c 08 02 a6 mflr r0 ffc13184: 38 80 00 00 li r4,0 ffc13188: 93 e1 00 0c stw r31,12(r1) ffc1318c: 7c 7f 1b 78 mr r31,r3 ffc13190: 38 a0 00 00 li r5,0 ffc13194: 80 69 27 74 lwz r3,10100(r9) ffc13198: 90 01 00 14 stw r0,20(r1) ffc1319c: 4b ff 68 cd bl ffc09a68 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc131a0: 3d 20 00 00 lis r9,0 ffc131a4: 81 69 26 ac lwz r11,9900(r9) ffc131a8: 3d 20 00 00 lis r9,0 ffc131ac: 81 29 27 6c lwz r9,10092(r9) ffc131b0: 2f 8b 00 00 cmpwi cr7,r11,0 ffc131b4: 38 0b 00 01 addi r0,r11,1 ffc131b8: 40 be 00 30 bne+ cr7,ffc131e8 <== ALWAYS TAKEN ffc131bc: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc131c0: 48 00 00 28 b ffc131e8 <== NOT EXECUTED if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { ffc131c4: 81 69 00 18 lwz r11,24(r9) ffc131c8: 71 6a 01 00 andi. r10,r11,256 ffc131cc: 41 82 00 18 beq- ffc131e4 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { ffc131d0: 81 69 00 2c lwz r11,44(r9) ffc131d4: 7f 8b f8 00 cmpw cr7,r11,r31 ffc131d8: 40 be 00 0c bne+ cr7,ffc131e4 ffc131dc: 3b e0 00 01 li r31,1 ffc131e0: 48 00 00 14 b ffc131f4 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ ffc131e4: 39 29 00 48 addi r9,r9,72 ffc131e8: 34 00 ff ff addic. r0,r0,-1 ffc131ec: 40 82 ff d8 bne+ ffc131c4 ffc131f0: 3b e0 00 00 li r31,0 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); ffc131f4: 3d 20 00 00 lis r9,0 ffc131f8: 80 69 27 74 lwz r3,10100(r9) ffc131fc: 4b ff 69 b1 bl ffc09bac } rtems_libio_unlock(); return result; } ffc13200: 80 01 00 14 lwz r0,20(r1) ffc13204: 7f e3 fb 78 mr r3,r31 ffc13208: 83 e1 00 0c lwz r31,12(r1) ffc1320c: 7c 08 03 a6 mtlr r0 ffc13210: 38 21 00 10 addi r1,r1,16 ffc13214: 4e 80 00 20 blr =============================================================================== ffc0608c : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { ffc0608c: 94 21 ff c0 stwu r1,-64(r1) ffc06090: 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); ffc06094: 38 60 00 00 li r3,0 ffc06098: 38 80 00 00 li r4,0 rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { ffc0609c: 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); ffc060a0: 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) { ffc060a4: 90 01 00 44 stw r0,68(r1) ffc060a8: 93 61 00 2c stw r27,44(r1) ffc060ac: 93 81 00 30 stw r28,48(r1) ffc060b0: 93 a1 00 34 stw r29,52(r1) ffc060b4: 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); ffc060b8: 48 00 31 55 bl ffc0920c if (sc != RTEMS_SUCCESSFUL) return sc; ffc060bc: 7c 7f 1b 79 mr. r31,r3 ffc060c0: 40 82 01 50 bne- ffc06210 <== NEVER TAKEN /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { ffc060c4: 3f c0 00 00 lis r30,0 ffc060c8: 81 3e 26 b4 lwz r9,9908(r30) ffc060cc: 3d 60 00 00 lis r11,0 ffc060d0: 38 0b 2b 1c addi r0,r11,11036 ffc060d4: 7f 89 00 00 cmpw cr7,r9,r0 ffc060d8: 3b 9e 26 b4 addi r28,r30,9908 ffc060dc: 40 be 00 4c bne+ cr7,ffc06128 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); ffc060e0: 38 60 00 48 li r3,72 ffc060e4: 4b ff f1 51 bl ffc05234 if (!tmp) ffc060e8: 7c 7d 1b 79 mr. r29,r3 ffc060ec: 40 a2 00 0c bne+ ffc060f8 <== ALWAYS TAKEN ffc060f0: 3b e0 00 1a li r31,26 <== NOT EXECUTED ffc060f4: 48 00 01 1c b ffc06210 <== NOT EXECUTED #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); ffc060f8: 3c a0 ff c0 lis r5,-64 ffc060fc: 7f 84 e3 78 mr r4,r28 ffc06100: 38 a5 5f 2c addi r5,r5,24364 ffc06104: 38 60 00 00 li r3,0 ffc06108: 48 00 33 11 bl ffc09418 if (sc != RTEMS_SUCCESSFUL) { ffc0610c: 7c 7c 1b 79 mr. r28,r3 ffc06110: 41 a2 00 14 beq+ ffc06124 <== ALWAYS TAKEN /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); ffc06114: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc06118: 4b ff e9 e9 bl ffc04b00 <== NOT EXECUTED ffc0611c: 7f 9f e3 78 mr r31,r28 <== NOT EXECUTED return sc; ffc06120: 48 00 00 f0 b ffc06210 <== NOT EXECUTED } rtems_current_user_env = tmp; ffc06124: 93 be 26 b4 stw r29,9908(r30) }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ ffc06128: 3f c0 00 00 lis r30,0 ffc0612c: 83 7e 26 b4 lwz r27,9908(r30) ffc06130: 3c 80 00 00 lis r4,0 ffc06134: 38 84 2b 1c addi r4,r4,11036 ffc06138: 38 a0 00 48 li r5,72 ffc0613c: 7f 63 db 78 mr r3,r27 ffc06140: 48 00 e7 41 bl ffc14880 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; ffc06144: 3d 20 00 00 lis r9,0 ffc06148: 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); ffc0614c: 3f 80 ff c2 lis r28,-62 ffc06150: 3b 9c 07 c8 addi r28,r28,1992 *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; ffc06154: 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); ffc06158: 3b a1 00 0c addi r29,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; ffc0615c: 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); ffc06160: 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; ffc06164: 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); ffc06168: 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; ffc0616c: 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); ffc06170: 7f a6 eb 78 mr r6,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; ffc06174: 91 1b 00 18 stw r8,24(r27) * 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); ffc06178: 38 e0 00 00 li r7,0 ffc0617c: 7f 83 e3 78 mr r3,r28 *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; ffc06180: 91 5b 00 1c stw r10,28(r27) ffc06184: 91 7b 00 20 stw r11,32(r27) ffc06188: 90 1b 00 24 stw r0,36(r27) ffc0618c: 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*/ ffc06190: 81 21 00 08 lwz r9,8(r1) /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; ffc06194: 90 1b 00 28 stw r0,40(r27) } 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*/ ffc06198: 91 3b 00 00 stw r9,0(r27) * 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); ffc0619c: 4b ff e8 81 bl ffc04a1c rtems_filesystem_root = loc; ffc061a0: 81 3e 26 b4 lwz r9,9908(r30) ffc061a4: 81 41 00 10 lwz r10,16(r1) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc061a8: 7f 83 e3 78 mr r3,r28 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; ffc061ac: 81 61 00 14 lwz r11,20(r1) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc061b0: 7f a6 eb 78 mr r6,r29 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; ffc061b4: 80 01 00 18 lwz r0,24(r1) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc061b8: 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; ffc061bc: 81 01 00 0c lwz r8,12(r1) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc061c0: 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; ffc061c4: 91 49 00 1c stw r10,28(r9) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc061c8: 38 e0 00 00 li r7,0 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; ffc061cc: 91 09 00 18 stw r8,24(r9) ffc061d0: 91 69 00 20 stw r11,32(r9) ffc061d4: 90 09 00 24 stw r0,36(r9) ffc061d8: 80 01 00 1c lwz r0,28(r1) ffc061dc: 90 09 00 28 stw r0,40(r9) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); ffc061e0: 4b ff e8 3d bl ffc04a1c rtems_filesystem_current = loc; ffc061e4: 80 01 00 18 lwz r0,24(r1) ffc061e8: 81 3e 26 b4 lwz r9,9908(r30) ffc061ec: 81 41 00 10 lwz r10,16(r1) ffc061f0: 81 61 00 14 lwz r11,20(r1) ffc061f4: 81 01 00 0c lwz r8,12(r1) ffc061f8: 91 49 00 08 stw r10,8(r9) ffc061fc: 91 09 00 04 stw r8,4(r9) ffc06200: 91 69 00 0c stw r11,12(r9) ffc06204: 90 09 00 10 stw r0,16(r9) ffc06208: 80 01 00 1c lwz r0,28(r1) ffc0620c: 90 09 00 14 stw r0,20(r9) return RTEMS_SUCCESSFUL; } ffc06210: 80 01 00 44 lwz r0,68(r1) ffc06214: 7f e3 fb 78 mr r3,r31 ffc06218: 83 61 00 2c lwz r27,44(r1) ffc0621c: 7c 08 03 a6 mtlr r0 ffc06220: 83 81 00 30 lwz r28,48(r1) ffc06224: 83 a1 00 34 lwz r29,52(r1) ffc06228: 83 c1 00 38 lwz r30,56(r1) ffc0622c: 83 e1 00 3c lwz r31,60(r1) ffc06230: 38 21 00 40 addi r1,r1,64 ffc06234: 4e 80 00 20 blr =============================================================================== ffc05fb4 : * 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) { ffc05fb4: 94 21 ff d8 stwu r1,-40(r1) <== NOT EXECUTED ffc05fb8: 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); ffc05fbc: 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) { ffc05fc0: 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); ffc05fc4: 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) { ffc05fc8: 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); ffc05fcc: 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) { ffc05fd0: 90 01 00 2c stw r0,44(r1) <== NOT EXECUTED ffc05fd4: 93 c1 00 20 stw r30,32(r1) <== NOT EXECUTED ffc05fd8: 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); ffc05fdc: 48 00 32 31 bl ffc0920c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; ffc05fe0: 7c 60 1b 79 mr. r0,r3 <== NOT EXECUTED ffc05fe4: 40 82 00 88 bne- ffc0606c <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { ffc05fe8: 3c 80 00 00 lis r4,0 <== NOT EXECUTED ffc05fec: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc05ff0: 83 e4 26 b4 lwz r31,9908(r4) <== NOT EXECUTED ffc05ff4: 38 84 26 b4 addi r4,r4,9908 <== NOT EXECUTED ffc05ff8: 81 3f 00 00 lwz r9,0(r31) <== NOT EXECUTED ffc05ffc: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc06000: 40 be 00 18 bne+ cr7,ffc06018 <== NOT EXECUTED /* 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); ffc06004: 48 00 34 e1 bl ffc094e4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; ffc06008: 7c 60 1b 79 mr. r0,r3 <== NOT EXECUTED ffc0600c: 40 a2 00 60 bne+ ffc0606c <== NOT EXECUTED free_user_env(tmp); ffc06010: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc06014: 4b ff ff 19 bl ffc05f2c <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, ffc06018: 3f e0 00 00 lis r31,0 <== NOT EXECUTED ffc0601c: 3b df 26 b4 addi r30,r31,9908 <== NOT EXECUTED ffc06020: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc06024: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc06028: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED ffc0602c: 48 00 35 59 bl ffc09584 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) ffc06030: 7c 60 1b 79 mr. r0,r3 <== NOT EXECUTED ffc06034: 40 a2 00 28 bne+ ffc0605c <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); ffc06038: 3c a0 ff c0 lis r5,-64 <== NOT EXECUTED ffc0603c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc06040: 38 a5 5f 2c addi r5,r5,24364 <== NOT EXECUTED ffc06044: 48 00 33 d5 bl ffc09418 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) ffc06048: 7c 60 1b 79 mr. r0,r3 <== NOT EXECUTED ffc0604c: 40 a2 00 10 bne+ ffc0605c <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; ffc06050: 81 21 00 08 lwz r9,8(r1) <== NOT EXECUTED ffc06054: 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; ffc06058: 48 00 00 14 b ffc0606c <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; ffc0605c: 3d 60 00 00 lis r11,0 <== NOT EXECUTED ffc06060: 39 6b 2b 1c addi r11,r11,11036 <== NOT EXECUTED ffc06064: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc06068: 91 69 26 b4 stw r11,9908(r9) <== NOT EXECUTED return sc; } ffc0606c: 7c 03 03 78 mr r3,r0 <== NOT EXECUTED ffc06070: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc06074: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc06078: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0607c: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc06080: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc06084: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc06088: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc13088 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { ffc13088: 54 60 07 7c rlwinm r0,r3,0,29,30 ffc1308c: 2f 80 00 06 cmpwi cr7,r0,6 ffc13090: 38 00 00 02 li r0,2 ffc13094: 41 9e 00 18 beq- cr7,ffc130ac <== NEVER TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { ffc13098: 54 69 ff fe rlwinm r9,r3,31,31,31 ffc1309c: 31 29 ff ff addic r9,r9,-1 ffc130a0: 7d 29 49 10 subfe r9,r9,r9 ffc130a4: 54 60 f7 fe rlwinm r0,r3,30,31,31 ffc130a8: 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 ) { ffc130ac: 70 69 00 01 andi. r9,r3,1 ffc130b0: 41 82 00 08 beq- ffc130b8 fcntl_flags |= O_NONBLOCK; ffc130b4: 60 00 40 00 ori r0,r0,16384 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { ffc130b8: 70 69 02 00 andi. r9,r3,512 ffc130bc: 41 82 00 08 beq- ffc130c4 fcntl_flags |= O_APPEND; ffc130c0: 60 00 00 08 ori r0,r0,8 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { ffc130c4: 70 69 04 00 andi. r9,r3,1024 ffc130c8: 41 82 00 08 beq- ffc130d0 fcntl_flags |= O_CREAT; ffc130cc: 60 00 02 00 ori r0,r0,512 } return fcntl_flags; } ffc130d0: 7c 03 03 78 mr r3,r0 ffc130d4: 4e 80 00 20 blr =============================================================================== ffc133c8 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { ffc133c8: 94 21 ff e8 stwu r1,-24(r1) ffc133cc: 7c 08 02 a6 mflr r0 ffc133d0: 93 e1 00 14 stw r31,20(r1) void *return_this; /* * Parameter error checks */ if ( !pointer ) ffc133d4: 7c 7f 1b 79 mr. r31,r3 int rtems_memalign( void **pointer, size_t alignment, size_t size ) { ffc133d8: 93 a1 00 0c stw r29,12(r1) ffc133dc: 7c bd 2b 78 mr r29,r5 ffc133e0: 93 c1 00 10 stw r30,16(r1) ffc133e4: 7c 9e 23 78 mr r30,r4 ffc133e8: 90 01 00 1c stw r0,28(r1) void *return_this; /* * Parameter error checks */ if ( !pointer ) ffc133ec: 41 82 00 7c beq- ffc13468 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && ffc133f0: 3d 20 00 00 lis r9,0 ffc133f4: 80 09 27 f4 lwz r0,10228(r9) ffc133f8: 2f 80 00 03 cmpwi cr7,r0,3 * Parameter error checks */ if ( !pointer ) return EINVAL; *pointer = NULL; ffc133fc: 38 00 00 00 li r0,0 ffc13400: 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()) && ffc13404: 40 be 00 10 bne+ cr7,ffc13414 <== NEVER TAKEN ffc13408: 4b ff 28 d5 bl ffc05cdc ffc1340c: 2f 83 00 00 cmpwi cr7,r3,0 ffc13410: 41 9e 00 58 beq- cr7,ffc13468 <== NEVER TAKEN /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); ffc13414: 4b ff 29 3d bl ffc05d50 uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); ffc13418: 3d 20 00 00 lis r9,0 ffc1341c: 80 69 26 bc lwz r3,9916(r9) ffc13420: 7f c5 f3 78 mr r5,r30 ffc13424: 7f a4 eb 78 mr r4,r29 ffc13428: 38 c0 00 00 li r6,0 ffc1342c: 4b ff 88 5d bl ffc0bc88 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) ffc13430: 7c 7e 1b 79 mr. r30,r3 ffc13434: 38 60 00 0c li r3,12 ffc13438: 41 82 00 34 beq- ffc1346c return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) ffc1343c: 3d 20 00 00 lis r9,0 ffc13440: 81 29 27 28 lwz r9,10024(r9) ffc13444: 2f 89 00 00 cmpwi cr7,r9,0 ffc13448: 41 9e 00 14 beq- cr7,ffc1345c <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(pointer); ffc1344c: 80 09 00 04 lwz r0,4(r9) <== NOT EXECUTED ffc13450: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc13454: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc13458: 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; ffc1345c: 93 df 00 00 stw r30,0(r31) ffc13460: 38 60 00 00 li r3,0 return 0; ffc13464: 48 00 00 08 b ffc1346c ffc13468: 38 60 00 16 li r3,22 } ffc1346c: 80 01 00 1c lwz r0,28(r1) ffc13470: 83 a1 00 0c lwz r29,12(r1) ffc13474: 7c 08 03 a6 mtlr r0 ffc13478: 83 c1 00 10 lwz r30,16(r1) ffc1347c: 83 e1 00 14 lwz r31,20(r1) ffc13480: 38 21 00 18 addi r1,r1,24 ffc13484: 4e 80 00 20 blr =============================================================================== ffc0a4b8 : void rtems_panic( const char *printf_format, ... ) { ffc0a4b8: 94 21 ff 88 stwu r1,-120(r1) <== NOT EXECUTED ffc0a4bc: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc0a4c0: 90 81 00 1c stw r4,28(r1) <== NOT EXECUTED ffc0a4c4: 90 01 00 7c stw r0,124(r1) <== NOT EXECUTED ffc0a4c8: 90 a1 00 20 stw r5,32(r1) <== NOT EXECUTED ffc0a4cc: 90 c1 00 24 stw r6,36(r1) <== NOT EXECUTED ffc0a4d0: 90 e1 00 28 stw r7,40(r1) <== NOT EXECUTED ffc0a4d4: 91 01 00 2c stw r8,44(r1) <== NOT EXECUTED ffc0a4d8: 91 21 00 30 stw r9,48(r1) <== NOT EXECUTED ffc0a4dc: 91 41 00 34 stw r10,52(r1) <== NOT EXECUTED ffc0a4e0: 40 86 00 24 bne- cr1,ffc0a504 <== NOT EXECUTED ffc0a4e4: d8 21 00 38 stfd f1,56(r1) <== NOT EXECUTED ffc0a4e8: d8 41 00 40 stfd f2,64(r1) <== NOT EXECUTED ffc0a4ec: d8 61 00 48 stfd f3,72(r1) <== NOT EXECUTED ffc0a4f0: d8 81 00 50 stfd f4,80(r1) <== NOT EXECUTED ffc0a4f4: d8 a1 00 58 stfd f5,88(r1) <== NOT EXECUTED ffc0a4f8: d8 c1 00 60 stfd f6,96(r1) <== NOT EXECUTED ffc0a4fc: d8 e1 00 68 stfd f7,104(r1) <== NOT EXECUTED ffc0a500: d9 01 00 70 stfd f8,112(r1) <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); ffc0a504: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0a508: 98 01 00 08 stb r0,8(r1) <== NOT EXECUTED ffc0a50c: 38 00 00 00 li r0,0 <== NOT EXECUTED void rtems_panic( const char *printf_format, ... ) { ffc0a510: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); ffc0a514: 98 01 00 09 stb r0,9(r1) <== NOT EXECUTED ffc0a518: 38 01 00 80 addi r0,r1,128 <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); ffc0a51c: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); ffc0a520: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); ffc0a524: 3c 60 20 00 lis r3,8192 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); ffc0a528: 38 01 00 18 addi r0,r1,24 <== NOT EXECUTED ffc0a52c: 90 01 00 10 stw r0,16(r1) <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); ffc0a530: 4b ff fd 8d bl ffc0a2bc <== NOT EXECUTED va_end(arglist); } ffc0a534: 80 01 00 7c lwz r0,124(r1) <== NOT EXECUTED ffc0a538: 38 21 00 78 addi r1,r1,120 <== NOT EXECUTED ffc0a53c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0a540: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc16c0c : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { ffc16c0c: 94 21 ff d0 stwu r1,-48(r1) ffc16c10: 7c 08 02 a6 mflr r0 ffc16c14: 93 e1 00 2c stw r31,44(r1) register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) ffc16c18: 7c 7f 1b 79 mr. r31,r3 ffc16c1c: 38 60 00 03 li r3,3 uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { ffc16c20: 93 41 00 18 stw r26,24(r1) ffc16c24: 7c fa 3b 78 mr r26,r7 ffc16c28: 93 81 00 20 stw r28,32(r1) ffc16c2c: 7d 1c 43 78 mr r28,r8 ffc16c30: 93 c1 00 28 stw r30,40(r1) ffc16c34: 7c be 2b 78 mr r30,r5 ffc16c38: 90 01 00 34 stw r0,52(r1) ffc16c3c: 93 21 00 14 stw r25,20(r1) ffc16c40: 93 61 00 1c stw r27,28(r1) ffc16c44: 93 a1 00 24 stw r29,36(r1) register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) ffc16c48: 41 82 00 d0 beq- ffc16d18 return RTEMS_INVALID_NAME; if ( !starting_address ) ffc16c4c: 2f 84 00 00 cmpwi cr7,r4,0 ffc16c50: 41 9e 00 bc beq- cr7,ffc16d0c return RTEMS_INVALID_ADDRESS; if ( !id ) ffc16c54: 2f 88 00 00 cmpwi cr7,r8,0 ffc16c58: 41 9e 00 b4 beq- cr7,ffc16d0c <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || ffc16c5c: 2f 85 00 00 cmpwi cr7,r5,0 ffc16c60: 41 9e 00 b4 beq- cr7,ffc16d14 ffc16c64: 2f 86 00 00 cmpwi cr7,r6,0 ffc16c68: 41 9e 00 ac beq- cr7,ffc16d14 ffc16c6c: 7f 85 30 40 cmplw cr7,r5,r6 ffc16c70: 41 9c 00 a4 blt- cr7,ffc16d14 ffc16c74: 70 c0 00 07 andi. r0,r6,7 ffc16c78: 40 82 00 9c bne- ffc16d14 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) ffc16c7c: 70 99 00 07 andi. r25,r4,7 ffc16c80: 40 a2 00 8c bne+ ffc16d0c ffc16c84: 3d 20 00 00 lis r9,0 ffc16c88: 81 69 28 68 lwz r11,10344(r9) ffc16c8c: 38 0b 00 01 addi r0,r11,1 ffc16c90: 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 ); ffc16c94: 3f 60 00 00 lis r27,0 ffc16c98: 90 81 00 08 stw r4,8(r1) ffc16c9c: 3b 7b 6e ec addi r27,r27,28396 ffc16ca0: 7f 63 db 78 mr r3,r27 ffc16ca4: 90 c1 00 0c stw r6,12(r1) ffc16ca8: 48 00 55 c9 bl ffc1c270 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { ffc16cac: 7c 7d 1b 79 mr. r29,r3 ffc16cb0: 80 81 00 08 lwz r4,8(r1) ffc16cb4: 80 c1 00 0c lwz r6,12(r1) ffc16cb8: 40 a2 00 10 bne+ ffc16cc8 _Thread_Enable_dispatch(); ffc16cbc: 48 00 67 71 bl ffc1d42c <_Thread_Enable_dispatch> ffc16cc0: 38 60 00 05 li r3,5 return RTEMS_TOO_MANY; ffc16cc4: 48 00 00 54 b ffc16d18 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, ffc16cc8: 7c be 33 96 divwu r5,r30,r6 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; ffc16ccc: 90 9d 00 10 stw r4,16(r29) the_partition->length = length; the_partition->buffer_size = buffer_size; ffc16cd0: 90 dd 00 18 stw r6,24(r29) the_partition->attribute_set = attribute_set; ffc16cd4: 93 5d 00 1c stw r26,28(r29) the_partition->number_of_used_blocks = 0; ffc16cd8: 93 3d 00 20 stw r25,32(r29) return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; ffc16cdc: 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, ffc16ce0: 38 7d 00 24 addi r3,r29,36 ffc16ce4: 48 00 3c f1 bl ffc1a9d4 <_Chain_Initialize> ffc16ce8: 80 1d 00 08 lwz r0,8(r29) ffc16cec: 81 7b 00 1c lwz r11,28(r27) ffc16cf0: 54 09 13 ba rlwinm r9,r0,2,14,29 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc16cf4: 93 fd 00 0c stw r31,12(r29) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc16cf8: 7f ab 49 2e stwx r29,r11,r9 &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; ffc16cfc: 90 1c 00 00 stw r0,0(r28) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); ffc16d00: 48 00 67 2d bl ffc1d42c <_Thread_Enable_dispatch> ffc16d04: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc16d08: 48 00 00 10 b ffc16d18 ffc16d0c: 38 60 00 09 li r3,9 ffc16d10: 48 00 00 08 b ffc16d18 ffc16d14: 38 60 00 08 li r3,8 } ffc16d18: 80 01 00 34 lwz r0,52(r1) ffc16d1c: 83 21 00 14 lwz r25,20(r1) ffc16d20: 7c 08 03 a6 mtlr r0 ffc16d24: 83 41 00 18 lwz r26,24(r1) ffc16d28: 83 61 00 1c lwz r27,28(r1) ffc16d2c: 83 81 00 20 lwz r28,32(r1) ffc16d30: 83 a1 00 24 lwz r29,36(r1) ffc16d34: 83 c1 00 28 lwz r30,40(r1) ffc16d38: 83 e1 00 2c lwz r31,44(r1) ffc16d3c: 38 21 00 30 addi r1,r1,48 ffc16d40: 4e 80 00 20 blr =============================================================================== ffc16ebc : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { ffc16ebc: 94 21 ff e0 stwu r1,-32(r1) ffc16ec0: 7c 08 02 a6 mflr r0 ffc16ec4: 90 01 00 24 stw r0,36(r1) ffc16ec8: 7c 60 1b 78 mr r0,r3 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) ffc16ecc: 3c 60 00 00 lis r3,0 ffc16ed0: 93 e1 00 1c stw r31,28(r1) ffc16ed4: 38 63 6e ec addi r3,r3,28396 ffc16ed8: 7c 9f 23 78 mr r31,r4 ffc16edc: 38 a1 00 08 addi r5,r1,8 ffc16ee0: 93 c1 00 18 stw r30,24(r1) ffc16ee4: 7c 04 03 78 mr r4,r0 ffc16ee8: 48 00 59 7d bl ffc1c864 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { ffc16eec: 80 01 00 08 lwz r0,8(r1) ffc16ef0: 7c 7e 1b 78 mr r30,r3 ffc16ef4: 2f 80 00 00 cmpwi cr7,r0,0 ffc16ef8: 38 60 00 04 li r3,4 ffc16efc: 40 9e 00 58 bne- cr7,ffc16f54 ) { void *starting; void *ending; starting = the_partition->starting_address; ffc16f00: 80 1e 00 10 lwz r0,16(r30) ending = _Addresses_Add_offset( starting, the_partition->length ); ffc16f04: 81 3e 00 14 lwz r9,20(r30) const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); ffc16f08: 7f 9f 00 40 cmplw cr7,r31,r0 ffc16f0c: 41 9c 00 60 blt- cr7,ffc16f6c ffc16f10: 7d 20 4a 14 add r9,r0,r9 ffc16f14: 7f 9f 48 40 cmplw cr7,r31,r9 ffc16f18: 41 9d 00 54 bgt- cr7,ffc16f6c <== NEVER TAKEN return ( ffc16f1c: 81 3e 00 18 lwz r9,24(r30) ffc16f20: 7c 00 f8 50 subf r0,r0,r31 ffc16f24: 7d 60 4b 96 divwu r11,r0,r9 ffc16f28: 7d 2b 49 d6 mullw r9,r11,r9 ffc16f2c: 7f 80 48 00 cmpw cr7,r0,r9 ffc16f30: 40 9e 00 3c bne- cr7,ffc16f6c RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); ffc16f34: 38 7e 00 24 addi r3,r30,36 ffc16f38: 7f e4 fb 78 mr r4,r31 ffc16f3c: 48 00 3a 29 bl ffc1a964 <_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; ffc16f40: 81 3e 00 20 lwz r9,32(r30) ffc16f44: 38 09 ff ff addi r0,r9,-1 ffc16f48: 90 1e 00 20 stw r0,32(r30) _Thread_Enable_dispatch(); ffc16f4c: 48 00 64 e1 bl ffc1d42c <_Thread_Enable_dispatch> ffc16f50: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc16f54: 80 01 00 24 lwz r0,36(r1) ffc16f58: 83 c1 00 18 lwz r30,24(r1) ffc16f5c: 7c 08 03 a6 mtlr r0 ffc16f60: 83 e1 00 1c lwz r31,28(r1) ffc16f64: 38 21 00 20 addi r1,r1,32 ffc16f68: 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(); ffc16f6c: 48 00 64 c1 bl ffc1d42c <_Thread_Enable_dispatch> ffc16f70: 38 60 00 09 li r3,9 return RTEMS_INVALID_ADDRESS; ffc16f74: 4b ff ff e0 b ffc16f54 =============================================================================== ffc11050 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { ffc11050: 7c 08 02 a6 mflr r0 ffc11054: 94 21 ff f8 stwu r1,-8(r1) if (!rtems_pipe_configured) ffc11058: 3d 20 00 00 lis r9,0 /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { ffc1105c: 90 01 00 0c stw r0,12(r1) if (!rtems_pipe_configured) ffc11060: 88 09 27 24 lbz r0,10020(r9) ffc11064: 2f 80 00 00 cmpwi cr7,r0,0 ffc11068: 41 9e 00 48 beq- cr7,ffc110b0 <== ALWAYS TAKEN return; if (rtems_pipe_semaphore) ffc1106c: 3c e0 00 00 lis r7,0 <== NOT EXECUTED ffc11070: 80 07 2a 50 lwz r0,10832(r7) <== NOT EXECUTED ffc11074: 38 e7 2a 50 addi r7,r7,10832 <== NOT EXECUTED ffc11078: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc1107c: 40 be 00 34 bne+ cr7,ffc110b0 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( ffc11080: 3c 60 50 49 lis r3,20553 <== NOT EXECUTED ffc11084: 60 63 50 45 ori r3,r3,20549 <== NOT EXECUTED ffc11088: 38 80 00 01 li r4,1 <== NOT EXECUTED ffc1108c: 38 a0 00 54 li r5,84 <== NOT EXECUTED ffc11090: 38 c0 00 00 li r6,0 <== NOT EXECUTED ffc11094: 4b ff 87 05 bl ffc09798 <== 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) ffc11098: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc1109c: 41 be 00 08 beq+ cr7,ffc110a4 <== NOT EXECUTED rtems_fatal_error_occurred (sc); ffc110a0: 4b ff 91 f5 bl ffc0a294 <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); ffc110a4: 4b ff 82 f5 bl ffc09398 <== NOT EXECUTED rtems_pipe_no = now; ffc110a8: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc110ac: b0 69 28 14 sth r3,10260(r9) <== NOT EXECUTED } ffc110b0: 80 01 00 0c lwz r0,12(r1) ffc110b4: 38 21 00 08 addi r1,r1,8 ffc110b8: 7c 08 03 a6 mtlr r0 ffc110bc: 4e 80 00 20 blr =============================================================================== ffc092d8 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { ffc092d8: 94 21 ff d8 stwu r1,-40(r1) ffc092dc: 7c 08 02 a6 mflr r0 ffc092e0: 93 c1 00 20 stw r30,32(r1) ffc092e4: 7c 7e 1b 78 mr r30,r3 RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) ffc092e8: 3c 60 00 00 lis r3,0 ffc092ec: 93 e1 00 24 stw r31,36(r1) ffc092f0: 38 63 2c 64 addi r3,r3,11364 ffc092f4: 7c 9f 23 78 mr r31,r4 ffc092f8: 38 a1 00 08 addi r5,r1,8 ffc092fc: 90 01 00 2c stw r0,44(r1) ffc09300: 7f c4 f3 78 mr r4,r30 ffc09304: 93 a1 00 1c stw r29,28(r1) ffc09308: 93 81 00 18 stw r28,24(r1) ffc0930c: 48 00 29 19 bl ffc0bc24 <_Objects_Get> ffc09310: 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 ) { ffc09314: 80 01 00 08 lwz r0,8(r1) ffc09318: 2f 80 00 00 cmpwi cr7,r0,0 ffc0931c: 40 9e 01 70 bne- cr7,ffc0948c case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { ffc09320: 3d 20 00 00 lis r9,0 ffc09324: 80 09 28 34 lwz r0,10292(r9) ffc09328: 81 23 00 40 lwz r9,64(r3) ffc0932c: 7f 89 00 00 cmpw cr7,r9,r0 ffc09330: 41 9e 00 10 beq- cr7,ffc09340 _Thread_Enable_dispatch(); ffc09334: 48 00 34 01 bl ffc0c734 <_Thread_Enable_dispatch> ffc09338: 3b c0 00 17 li r30,23 return RTEMS_NOT_OWNER_OF_RESOURCE; ffc0933c: 48 00 01 54 b ffc09490 } if ( length == RTEMS_PERIOD_STATUS ) { ffc09340: 2f 9f 00 00 cmpwi cr7,r31,0 ffc09344: 40 be 00 28 bne+ cr7,ffc0936c switch ( the_period->state ) { ffc09348: 80 03 00 38 lwz r0,56(r3) ffc0934c: 3b c0 00 00 li r30,0 ffc09350: 2b 80 00 04 cmplwi cr7,r0,4 ffc09354: 41 9d 01 30 bgt- cr7,ffc09484 <== NEVER TAKEN ffc09358: 3d 20 ff c2 lis r9,-62 ffc0935c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc09360: 39 29 33 b4 addi r9,r9,13236 ffc09364: 7f c9 00 2e lwzx r30,r9,r0 ffc09368: 48 00 01 1c b ffc09484 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0936c: 7f 80 00 a6 mfmsr r28 ffc09370: 7c 10 42 a6 mfsprg r0,0 ffc09374: 7f 80 00 78 andc r0,r28,r0 ffc09378: 7c 00 01 24 mtmsr r0 _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); switch ( the_period->state ) { ffc0937c: 80 03 00 38 lwz r0,56(r3) ffc09380: 2f 80 00 02 cmpwi cr7,r0,2 ffc09384: 41 9e 00 60 beq- cr7,ffc093e4 ffc09388: 2f 80 00 04 cmpwi cr7,r0,4 ffc0938c: 41 9e 00 cc beq- cr7,ffc09458 ffc09390: 2f 80 00 00 cmpwi cr7,r0,0 ffc09394: 40 9e 00 f8 bne- cr7,ffc0948c <== NEVER TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09398: 7f 80 01 24 mtmsr r28 _ISR_Enable( level ); /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); ffc0939c: 4b ff fc 99 bl ffc09034 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; ffc093a0: 39 20 00 02 li r9,2 ffc093a4: 91 3d 00 38 stw r9,56(r29) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc093a8: 3d 20 ff c1 lis r9,-63 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc093ac: 38 00 00 00 li r0,0 the_watchdog->routine = routine; ffc093b0: 39 29 98 44 addi r9,r9,-26556 the_watchdog->id = id; ffc093b4: 93 dd 00 30 stw r30,48(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc093b8: 3c 60 00 00 lis r3,0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc093bc: 91 3d 00 2c stw r9,44(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc093c0: 38 63 2e 68 addi r3,r3,11880 ffc093c4: 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; ffc093c8: 90 1d 00 34 stw r0,52(r29) ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc093cc: 3b c0 00 00 li r30,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc093d0: 93 fd 00 1c stw r31,28(r29) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc093d4: 90 1d 00 18 stw r0,24(r29) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; ffc093d8: 93 fd 00 3c stw r31,60(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc093dc: 48 00 4a 41 bl ffc0de1c <_Watchdog_Insert> ffc093e0: 48 00 00 a4 b ffc09484 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); ffc093e4: 4b ff fd d9 bl ffc091bc <_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; ffc093e8: 38 00 00 01 li r0,1 the_period->next_length = length; ffc093ec: 93 fd 00 3c stw r31,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; ffc093f0: 90 1d 00 38 stw r0,56(r29) ffc093f4: 7f 80 01 24 mtmsr r28 the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; ffc093f8: 3d 20 00 00 lis r9,0 ffc093fc: 80 1d 00 08 lwz r0,8(r29) ffc09400: 81 29 28 34 lwz r9,10292(r9) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc09404: 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; ffc09408: 90 09 00 20 stw r0,32(r9) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc0940c: 7d 23 4b 78 mr r3,r9 ffc09410: 48 00 3e 09 bl ffc0d218 <_Thread_Set_state> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc09414: 7d 20 00 a6 mfmsr r9 ffc09418: 7c 10 42 a6 mfsprg r0,0 ffc0941c: 7d 20 00 78 andc r0,r9,r0 ffc09420: 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; ffc09424: 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; ffc09428: 80 1d 00 38 lwz r0,56(r29) the_period->state = RATE_MONOTONIC_ACTIVE; ffc0942c: 91 7d 00 38 stw r11,56(r29) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09430: 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 ) ffc09434: 2f 80 00 03 cmpwi cr7,r0,3 ffc09438: 40 be 00 14 bne+ cr7,ffc0944c <== ALWAYS TAKEN _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc0943c: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc09440: 80 69 28 34 lwz r3,10292(r9) <== NOT EXECUTED ffc09444: 38 80 40 00 li r4,16384 <== NOT EXECUTED ffc09448: 48 00 2e 09 bl ffc0c250 <_Thread_Clear_state> <== NOT EXECUTED _Thread_Enable_dispatch(); ffc0944c: 48 00 32 e9 bl ffc0c734 <_Thread_Enable_dispatch> ffc09450: 3b c0 00 00 li r30,0 return RTEMS_SUCCESSFUL; ffc09454: 48 00 00 3c b ffc09490 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); ffc09458: 4b ff fd 65 bl ffc091bc <_Rate_monotonic_Update_statistics> ffc0945c: 7f 80 01 24 mtmsr r28 _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; ffc09460: 38 00 00 02 li r0,2 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc09464: 93 fd 00 1c stw r31,28(r29) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc09468: 3c 60 00 00 lis r3,0 ffc0946c: 90 1d 00 38 stw r0,56(r29) ffc09470: 38 63 2e 68 addi r3,r3,11880 ffc09474: 38 9d 00 10 addi r4,r29,16 the_period->next_length = length; ffc09478: 93 fd 00 3c stw r31,60(r29) _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc0947c: 3b c0 00 06 li r30,6 ffc09480: 48 00 49 9d bl ffc0de1c <_Watchdog_Insert> ffc09484: 48 00 32 b1 bl ffc0c734 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; ffc09488: 48 00 00 08 b ffc09490 ffc0948c: 3b c0 00 04 li r30,4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc09490: 80 01 00 2c lwz r0,44(r1) ffc09494: 7f c3 f3 78 mr r3,r30 ffc09498: 83 81 00 18 lwz r28,24(r1) ffc0949c: 7c 08 03 a6 mtlr r0 ffc094a0: 83 a1 00 1c lwz r29,28(r1) ffc094a4: 83 c1 00 20 lwz r30,32(r1) ffc094a8: 83 e1 00 24 lwz r31,36(r1) ffc094ac: 38 21 00 28 addi r1,r1,40 ffc094b0: 4e 80 00 20 blr =============================================================================== ffc094b4 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc094b4: 94 21 ff 58 stwu r1,-168(r1) ffc094b8: 7c 08 02 a6 mflr r0 ffc094bc: 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 ) ffc094c0: 7c 80 23 79 mr. r0,r4 */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc094c4: 93 e1 00 a4 stw r31,164(r1) ffc094c8: 7c 7f 1b 78 mr r31,r3 ffc094cc: 92 41 00 70 stw r18,112(r1) ffc094d0: 92 61 00 74 stw r19,116(r1) ffc094d4: 92 81 00 78 stw r20,120(r1) ffc094d8: 92 a1 00 7c stw r21,124(r1) ffc094dc: 92 c1 00 80 stw r22,128(r1) ffc094e0: 92 e1 00 84 stw r23,132(r1) ffc094e4: 93 01 00 88 stw r24,136(r1) ffc094e8: 93 21 00 8c stw r25,140(r1) ffc094ec: 93 41 00 90 stw r26,144(r1) ffc094f0: 93 61 00 94 stw r27,148(r1) ffc094f4: 93 81 00 98 stw r28,152(r1) ffc094f8: 93 a1 00 9c stw r29,156(r1) ffc094fc: 93 c1 00 a0 stw r30,160(r1) rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) ffc09500: 90 01 00 68 stw r0,104(r1) ffc09504: 41 82 02 00 beq- ffc09704 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); ffc09508: 3c 80 ff c2 lis r4,-62 ffc0950c: 7c 09 03 a6 mtctr r0 ffc09510: 38 84 33 c8 addi r4,r4,13256 rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc09514: 3f 00 ff c2 lis r24,-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, ffc09518: 3f 20 ff c2 lis r25,-62 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, ffc0951c: 3f 40 ff c2 lis r26,-62 char name[5]; if ( !print ) return; (*print)( context, "Period information by period\n" ); ffc09520: 4c c6 31 82 crclr 4*cr1+eq ffc09524: 4e 80 04 21 bctrl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); ffc09528: 80 01 00 68 lwz r0,104(r1) ffc0952c: 3c 80 ff c2 lis r4,-62 ffc09530: 7c 09 03 a6 mtctr r0 ffc09534: 38 84 33 e6 addi r4,r4,13286 ffc09538: 7f e3 fb 78 mr r3,r31 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc0953c: 3e 40 ff c2 lis r18,-62 * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); ffc09540: 3a 61 00 30 addi r19,r1,48 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 ); ffc09544: 3a 81 00 18 addi r20,r1,24 if ( !print ) return; (*print)( context, "Period information by period\n" ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); ffc09548: 4c c6 31 82 crclr 4*cr1+eq ffc0954c: 4e 80 04 21 bctrl (*print)( context, "--- Wall times are in seconds ---\n" ); ffc09550: 80 01 00 68 lwz r0,104(r1) ffc09554: 3c 80 ff c2 lis r4,-62 ffc09558: 7c 09 03 a6 mtctr r0 ffc0955c: 38 84 34 08 addi r4,r4,13320 ffc09560: 7f e3 fb 78 mr r3,r31 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); ffc09564: 3b 61 00 08 addi r27,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 ); ffc09568: 3a a1 00 48 addi r21,r1,72 ffc0956c: 3b 81 00 10 addi r28,r1,16 return; (*print)( context, "Period information by period\n" ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); (*print)( context, "--- Wall times are in seconds ---\n" ); ffc09570: 4c c6 31 82 crclr 4*cr1+eq ffc09574: 4e 80 04 21 bctrl Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " ffc09578: 80 01 00 68 lwz r0,104(r1) ffc0957c: 3c 80 ff c2 lis r4,-62 ffc09580: 7c 09 03 a6 mtctr r0 ffc09584: 38 84 34 2b addi r4,r4,13355 ffc09588: 7f e3 fb 78 mr r3,r31 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, ffc0958c: 3b a0 03 e8 li r29,1000 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); ffc09590: 3a c1 00 60 addi r22,r1,96 rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc09594: 3b 18 34 c2 addi r24,r24,13506 Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " ffc09598: 4c c6 31 82 crclr 4*cr1+eq ffc0959c: 4e 80 04 21 bctrl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " ffc095a0: 80 01 00 68 lwz r0,104(r1) ffc095a4: 3c 80 ff c2 lis r4,-62 ffc095a8: 38 84 34 76 addi r4,r4,13430 ffc095ac: 7c 09 03 a6 mtctr r0 ffc095b0: 7f e3 fb 78 mr r3,r31 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, ffc095b4: 3b 39 34 d9 addi r25,r25,13529 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, ffc095b8: 3b 5a 34 f8 addi r26,r26,13560 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc095bc: 3a 52 33 96 addi r18,r18,13206 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " ffc095c0: 4c c6 31 82 crclr 4*cr1+eq ffc095c4: 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 ; ffc095c8: 3d 20 00 00 lis r9,0 ffc095cc: 39 29 2c 64 addi r9,r9,11364 ffc095d0: 7d 37 4b 78 mr r23,r9 ffc095d4: 83 c9 00 08 lwz r30,8(r9) ffc095d8: 48 00 01 18 b ffc096f0 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); ffc095dc: 48 00 6f dd bl ffc105b8 if ( status != RTEMS_SUCCESSFUL ) ffc095e0: 2f 83 00 00 cmpwi cr7,r3,0 ffc095e4: 40 be 01 08 bne+ cr7,ffc096ec continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); ffc095e8: 7e 84 a3 78 mr r4,r20 ffc095ec: 7f c3 f3 78 mr r3,r30 ffc095f0: 48 00 70 99 bl ffc10688 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); ffc095f4: 80 61 00 18 lwz r3,24(r1) ffc095f8: 7f 65 db 78 mr r5,r27 ffc095fc: 38 80 00 05 li r4,5 ffc09600: 48 00 03 0d bl ffc0990c /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc09604: 80 01 00 68 lwz r0,104(r1) ffc09608: 7f 04 c3 78 mr r4,r24 ffc0960c: 80 e1 00 30 lwz r7,48(r1) ffc09610: 7f c5 f3 78 mr r5,r30 ffc09614: 7c 09 03 a6 mtctr r0 ffc09618: 7f e3 fb 78 mr r3,r31 ffc0961c: 81 01 00 34 lwz r8,52(r1) ffc09620: 7f 66 db 78 mr r6,r27 ffc09624: 4c c6 31 82 crclr 4*cr1+eq ffc09628: 4e 80 04 21 bctrl ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc0962c: 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 ); ffc09630: 7e a3 ab 78 mr r3,r21 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc09634: 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 ); ffc09638: 7f 85 e3 78 mr r5,r28 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc0963c: 7e 44 93 78 mr r4,r18 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc09640: 40 9e 00 1c bne- cr7,ffc0965c (*print)( context, "\n" ); ffc09644: 80 01 00 68 lwz r0,104(r1) ffc09648: 7f e3 fb 78 mr r3,r31 ffc0964c: 7c 09 03 a6 mtctr r0 ffc09650: 4c c6 31 82 crclr 4*cr1+eq ffc09654: 4e 80 04 21 bctrl continue; ffc09658: 48 00 00 94 b ffc096ec 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 ); ffc0965c: 7c 04 03 78 mr r4,r0 ffc09660: 48 00 41 d5 bl ffc0d834 <_Timespec_Divide_by_integer> (*print)( context, ffc09664: 80 01 00 68 lwz r0,104(r1) ffc09668: 80 c1 00 3c lwz r6,60(r1) ffc0966c: 7f 24 cb 78 mr r4,r25 ffc09670: 81 01 00 44 lwz r8,68(r1) ffc09674: 7c 09 03 a6 mtctr r0 ffc09678: 81 41 00 14 lwz r10,20(r1) ffc0967c: 7c c6 eb d6 divw r6,r6,r29 ffc09680: 80 e1 00 40 lwz r7,64(r1) ffc09684: 81 21 00 10 lwz r9,16(r1) ffc09688: 80 a1 00 38 lwz r5,56(r1) ffc0968c: 7d 08 eb d6 divw r8,r8,r29 ffc09690: 7d 4a eb d6 divw r10,r10,r29 ffc09694: 7f e3 fb 78 mr r3,r31 ffc09698: 4c c6 31 82 crclr 4*cr1+eq ffc0969c: 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); ffc096a0: 80 81 00 30 lwz r4,48(r1) ffc096a4: 7e c3 b3 78 mr r3,r22 ffc096a8: 7f 85 e3 78 mr r5,r28 ffc096ac: 48 00 41 89 bl ffc0d834 <_Timespec_Divide_by_integer> (*print)( context, ffc096b0: 80 c1 00 54 lwz r6,84(r1) ffc096b4: 81 01 00 5c lwz r8,92(r1) ffc096b8: 7f e3 fb 78 mr r3,r31 ffc096bc: 81 41 00 14 lwz r10,20(r1) ffc096c0: 7c c6 eb d6 divw r6,r6,r29 ffc096c4: 80 01 00 68 lwz r0,104(r1) ffc096c8: 80 a1 00 50 lwz r5,80(r1) ffc096cc: 80 e1 00 58 lwz r7,88(r1) ffc096d0: 7c 09 03 a6 mtctr r0 ffc096d4: 81 21 00 10 lwz r9,16(r1) ffc096d8: 7d 08 eb d6 divw r8,r8,r29 ffc096dc: 7d 4a eb d6 divw r10,r10,r29 ffc096e0: 7f 44 d3 78 mr r4,r26 ffc096e4: 4c c6 31 82 crclr 4*cr1+eq ffc096e8: 4e 80 04 21 bctrl * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { ffc096ec: 3b de 00 01 addi r30,r30,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 ; ffc096f0: 80 17 00 0c lwz r0,12(r23) id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); ffc096f4: 7f c3 f3 78 mr r3,r30 ffc096f8: 7e 64 9b 78 mr r4,r19 /* * 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 ; ffc096fc: 7f 9e 00 40 cmplw cr7,r30,r0 ffc09700: 40 9d fe dc ble+ cr7,ffc095dc the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } ffc09704: 80 01 00 ac lwz r0,172(r1) ffc09708: 82 41 00 70 lwz r18,112(r1) ffc0970c: 7c 08 03 a6 mtlr r0 ffc09710: 82 61 00 74 lwz r19,116(r1) ffc09714: 82 81 00 78 lwz r20,120(r1) ffc09718: 82 a1 00 7c lwz r21,124(r1) ffc0971c: 82 c1 00 80 lwz r22,128(r1) ffc09720: 82 e1 00 84 lwz r23,132(r1) ffc09724: 83 01 00 88 lwz r24,136(r1) ffc09728: 83 21 00 8c lwz r25,140(r1) ffc0972c: 83 41 00 90 lwz r26,144(r1) ffc09730: 83 61 00 94 lwz r27,148(r1) ffc09734: 83 81 00 98 lwz r28,152(r1) ffc09738: 83 a1 00 9c lwz r29,156(r1) ffc0973c: 83 c1 00 a0 lwz r30,160(r1) ffc09740: 83 e1 00 a4 lwz r31,164(r1) ffc09744: 38 21 00 a8 addi r1,r1,168 ffc09748: 4e 80 00 20 blr =============================================================================== ffc186fc : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { ffc186fc: 94 21 ff e0 stwu r1,-32(r1) ffc18700: 7c 08 02 a6 mflr r0 ffc18704: 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 ) ffc18708: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { ffc1870c: 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 ) ffc18710: 38 00 00 0a li r0,10 ffc18714: 41 82 00 c0 beq- ffc187d4 return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); ffc18718: 38 81 00 08 addi r4,r1,8 ffc1871c: 48 00 4d 7d bl ffc1d498 <_Thread_Get> switch ( location ) { ffc18720: 81 21 00 08 lwz r9,8(r1) ffc18724: 38 00 00 04 li r0,4 ffc18728: 2f 89 00 00 cmpwi cr7,r9,0 ffc1872c: 40 9e 00 a8 bne- cr7,ffc187d4 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; ffc18730: 81 23 01 44 lwz r9,324(r3) asr = &api->Signal; ffc18734: 80 09 00 0c lwz r0,12(r9) ffc18738: 2f 80 00 00 cmpwi cr7,r0,0 ffc1873c: 41 9e 00 90 beq- cr7,ffc187cc if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { ffc18740: 88 09 00 08 lbz r0,8(r9) ffc18744: 2f 80 00 00 cmpwi cr7,r0,0 ffc18748: 41 9e 00 58 beq- cr7,ffc187a0 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1874c: 7c 00 00 a6 mfmsr r0 ffc18750: 7d 70 42 a6 mfsprg r11,0 ffc18754: 7c 0b 58 78 andc r11,r0,r11 ffc18758: 7d 60 01 24 mtmsr r11 ) { ISR_Level _level; _ISR_Disable( _level ); *signal_set |= signals; ffc1875c: 81 69 00 14 lwz r11,20(r9) ffc18760: 7d 7f fb 78 or r31,r11,r31 ffc18764: 93 e9 00 14 stw r31,20(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc18768: 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 ) ) ffc1876c: 3d 20 00 00 lis r9,0 ffc18770: 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; ffc18774: 38 00 00 01 li r0,1 ffc18778: 98 03 00 74 stb r0,116(r3) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) ffc1877c: 2f 89 00 00 cmpwi cr7,r9,0 ffc18780: 41 9e 00 40 beq- cr7,ffc187c0 ffc18784: 3d 20 00 00 lis r9,0 ffc18788: 81 29 28 a8 lwz r9,10408(r9) ffc1878c: 7f 83 48 00 cmpw cr7,r3,r9 ffc18790: 40 be 00 30 bne+ cr7,ffc187c0 <== NEVER TAKEN _ISR_Signals_to_thread_executing = true; ffc18794: 3d 20 00 00 lis r9,0 ffc18798: 98 09 28 c4 stb r0,10436(r9) ffc1879c: 48 00 00 24 b ffc187c0 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc187a0: 7c 00 00 a6 mfmsr r0 ffc187a4: 7d 70 42 a6 mfsprg r11,0 ffc187a8: 7c 0b 58 78 andc r11,r0,r11 ffc187ac: 7d 60 01 24 mtmsr r11 ffc187b0: 81 69 00 18 lwz r11,24(r9) ffc187b4: 7d 7f fb 78 or r31,r11,r31 ffc187b8: 93 e9 00 18 stw r31,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc187bc: 7c 00 01 24 mtmsr r0 } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); ffc187c0: 48 00 4c 6d bl ffc1d42c <_Thread_Enable_dispatch> ffc187c4: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; ffc187c8: 48 00 00 0c b ffc187d4 } _Thread_Enable_dispatch(); ffc187cc: 48 00 4c 61 bl ffc1d42c <_Thread_Enable_dispatch> ffc187d0: 38 00 00 0b li r0,11 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc187d4: 7c 03 03 78 mr r3,r0 ffc187d8: 80 01 00 24 lwz r0,36(r1) ffc187dc: 83 e1 00 1c lwz r31,28(r1) ffc187e0: 38 21 00 20 addi r1,r1,32 ffc187e4: 7c 08 03 a6 mtlr r0 ffc187e8: 4e 80 00 20 blr =============================================================================== ffc0392c : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { ffc0392c: 7c 08 02 a6 mflr r0 ffc03930: 94 21 ff f8 stwu r1,-8(r1) ffc03934: 90 01 00 0c stw r0,12(r1) Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ ffc03938: 80 03 00 08 lwz r0,8(r3) ffc0393c: 2f 80 00 00 cmpwi cr7,r0,0 ffc03940: 41 9e 00 1c beq- cr7,ffc0395c <== NEVER TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; ffc03944: 80 63 00 d0 lwz r3,208(r3) ffc03948: 3c 80 00 00 lis r4,0 ffc0394c: 38 84 2a fc addi r4,r4,11004 ffc03950: 38 63 00 08 addi r3,r3,8 ffc03954: 38 a0 00 80 li r5,128 ffc03958: 48 00 f0 15 bl ffc1296c } ffc0395c: 80 01 00 0c lwz r0,12(r1) ffc03960: 38 21 00 08 addi r1,r1,8 ffc03964: 7c 08 03 a6 mtlr r0 ffc03968: 4e 80 00 20 blr =============================================================================== ffc03e54 : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { ffc03e54: 94 21 ff f0 stwu r1,-16(r1) ffc03e58: 7c 08 02 a6 mflr r0 ffc03e5c: 93 e1 00 0c stw r31,12(r1) ffc03e60: 7c 9f 23 78 mr r31,r4 ffc03e64: 90 01 00 14 stw r0,20(r1) Stack_check_Initialize(); ffc03e68: 4b ff fa 71 bl ffc038d8 if (the_thread) ffc03e6c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc03e70: 41 9e 00 14 beq- cr7,ffc03e84 <== NEVER TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); ffc03e74: 80 bf 00 cc lwz r5,204(r31) ffc03e78: 38 80 00 a5 li r4,165 ffc03e7c: 80 7f 00 d0 lwz r3,208(r31) ffc03e80: 48 00 eb ed bl ffc12a6c return true; } ffc03e84: 80 01 00 14 lwz r0,20(r1) ffc03e88: 38 60 00 01 li r3,1 ffc03e8c: 83 e1 00 0c lwz r31,12(r1) ffc03e90: 38 21 00 10 addi r1,r1,16 ffc03e94: 7c 08 03 a6 mtlr r0 ffc03e98: 4e 80 00 20 blr =============================================================================== ffc03cec : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { ffc03cec: 94 21 ff f0 stwu r1,-16(r1) ffc03cf0: 7c 08 02 a6 mflr r0 Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; ffc03cf4: 3d 20 00 00 lis r9,0 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { ffc03cf8: 90 01 00 14 stw r0,20(r1) Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; ffc03cfc: 81 29 27 b4 lwz r9,10164(r9) /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { ffc03d00: 93 e1 00 0c stw r31,12(r1) ffc03d04: 7c 3f 0b 78 mr r31,r1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { ffc03d08: 80 69 00 d0 lwz r3,208(r9) /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { ffc03d0c: 93 c1 00 08 stw r30,8(r1) ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { ffc03d10: 3b c0 00 00 li r30,0 ffc03d14: 7f 9f 18 40 cmplw cr7,r31,r3 ffc03d18: 41 9c 00 18 blt- cr7,ffc03d30 <== NEVER TAKEN } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) ffc03d1c: 83 c9 00 cc lwz r30,204(r9) ffc03d20: 7f c3 f2 14 add r30,r3,r30 ffc03d24: 7f df f0 10 subfc r30,r31,r30 ffc03d28: 3b c0 00 00 li r30,0 ffc03d2c: 7f de f1 14 adde r30,r30,r30 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { ffc03d30: 3d 20 00 00 lis r9,0 ffc03d34: 80 09 28 84 lwz r0,10372(r9) ffc03d38: 38 80 00 01 li r4,1 ffc03d3c: 2f 80 00 00 cmpwi cr7,r0,0 ffc03d40: 41 9e 00 20 beq- cr7,ffc03d60 <== NEVER TAKEN pattern_ok = (!memcmp( ffc03d44: 3c 80 00 00 lis r4,0 ffc03d48: 38 84 2a fc addi r4,r4,11004 ffc03d4c: 38 63 00 08 addi r3,r3,8 ffc03d50: 38 a0 00 80 li r5,128 ffc03d54: 48 00 eb 75 bl ffc128c8 ffc03d58: 7c 64 00 34 cntlzw r4,r3 ffc03d5c: 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 ) ffc03d60: 2f 9e 00 00 cmpwi cr7,r30,0 ffc03d64: 41 9e 00 10 beq- cr7,ffc03d74 <== NEVER TAKEN ffc03d68: 2f 84 00 00 cmpwi cr7,r4,0 ffc03d6c: 38 60 00 00 li r3,0 ffc03d70: 40 9e 00 14 bne- cr7,ffc03d84 <== ALWAYS TAKEN return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); ffc03d74: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc03d78: 80 69 27 b4 lwz r3,10164(r9) <== NOT EXECUTED ffc03d7c: 4b ff fe 95 bl ffc03c10 <== NOT EXECUTED ffc03d80: 38 60 00 01 li r3,1 <== NOT EXECUTED return true; } ffc03d84: 39 7f 00 10 addi r11,r31,16 ffc03d88: 80 0b 00 04 lwz r0,4(r11) ffc03d8c: 83 cb ff f8 lwz r30,-8(r11) ffc03d90: 7c 08 03 a6 mtlr r0 ffc03d94: 83 eb ff fc lwz r31,-4(r11) ffc03d98: 7d 61 5b 78 mr r1,r11 ffc03d9c: 4e 80 00 20 blr =============================================================================== ffc03c00 : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); ffc03c00: 3c 80 ff c0 lis r4,-64 <== NOT EXECUTED ffc03c04: 38 84 54 f0 addi r4,r4,21744 <== NOT EXECUTED ffc03c08: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc03c0c: 4b ff ff 5c b ffc03b68 <== NOT EXECUTED =============================================================================== ffc03b68 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc03b68: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED ffc03b6c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc03b70: 93 e1 00 14 stw r31,20(r1) <== NOT EXECUTED print_context = context; ffc03b74: 3f e0 00 00 lis r31,0 <== NOT EXECUTED ffc03b78: 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 ) { ffc03b7c: 93 c1 00 10 stw r30,16(r1) <== NOT EXECUTED ffc03b80: 7c 9e 23 78 mr r30,r4 <== NOT EXECUTED print_context = context; print_handler = print; (*print)( context, "Stack usage by thread\n"); ffc03b84: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc03b88: 7f c9 03 a6 mtctr r30 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc03b8c: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED print_context = context; print_handler = print; (*print)( context, "Stack usage by thread\n"); ffc03b90: 38 84 de f4 addi r4,r4,-8460 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc03b94: 93 a1 00 0c stw r29,12(r1) <== NOT EXECUTED ffc03b98: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED print_context = context; print_handler = print; ffc03b9c: 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; ffc03ba0: 90 7f 00 08 stw r3,8(r31) <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); ffc03ba4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc03ba8: 4e 80 04 21 bctrl <== NOT EXECUTED (*print)( context, ffc03bac: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc03bb0: 7f c9 03 a6 mtctr r30 <== NOT EXECUTED ffc03bb4: 38 84 df 0b addi r4,r4,-8437 <== NOT EXECUTED ffc03bb8: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc03bbc: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc03bc0: 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 ); ffc03bc4: 3c 60 ff c0 lis r3,-64 <== NOT EXECUTED ffc03bc8: 38 63 39 a4 addi r3,r3,14756 <== NOT EXECUTED ffc03bcc: 48 00 5a 99 bl ffc09664 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); ffc03bd0: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc03bd4: 4b ff fd d1 bl ffc039a4 <== NOT EXECUTED print_context = NULL; ffc03bd8: 38 00 00 00 li r0,0 <== NOT EXECUTED print_handler = NULL; ffc03bdc: 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; ffc03be0: 90 1f 00 08 stw r0,8(r31) <== NOT EXECUTED print_handler = NULL; } ffc03be4: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc03be8: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc03bec: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc03bf0: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc03bf4: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc03bf8: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc03bfc: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc03da0 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { ffc03da0: 94 21 ff e8 stwu r1,-24(r1) ffc03da4: 7c 08 02 a6 mflr r0 ffc03da8: 90 01 00 1c stw r0,28(r1) ffc03dac: 93 c1 00 10 stw r30,16(r1) ffc03db0: 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; ffc03db4: 80 63 00 d0 lwz r3,208(r3) */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { ffc03db8: 93 e1 00 14 stw r31,20(r1) ffc03dbc: 7c 3f 0b 78 mr r31,r1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { ffc03dc0: 7f 9f 18 40 cmplw cr7,r31,r3 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { ffc03dc4: 93 a1 00 0c stw r29,12(r1) ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { ffc03dc8: 3b a0 00 00 li r29,0 ffc03dcc: 41 9c 00 18 blt- cr7,ffc03de4 <== NEVER TAKEN } /* * rtems_stack_checker_switch_extension */ void rtems_stack_checker_switch_extension( ffc03dd0: 83 be 00 cc lwz r29,204(r30) ffc03dd4: 7f a3 ea 14 add r29,r3,r29 ffc03dd8: 7f bf e8 10 subfc r29,r31,r29 ffc03ddc: 3b a0 00 00 li r29,0 ffc03de0: 7f bd e9 14 adde r29,r29,r29 /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, ffc03de4: 3c 80 00 00 lis r4,0 ffc03de8: 38 84 2a fc addi r4,r4,11004 ffc03dec: 38 63 00 08 addi r3,r3,8 ffc03df0: 38 a0 00 80 li r5,128 ffc03df4: 48 00 ea d5 bl ffc128c8 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { ffc03df8: 2f 9d 00 00 cmpwi cr7,r29,0 /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, ffc03dfc: 7c 64 00 34 cntlzw r4,r3 ffc03e00: 54 84 d9 7e rlwinm r4,r4,27,5,31 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { ffc03e04: 41 9e 00 0c beq- cr7,ffc03e10 <== NEVER TAKEN ffc03e08: 2f 84 00 00 cmpwi cr7,r4,0 ffc03e0c: 40 9e 00 28 bne- cr7,ffc03e34 Stack_check_report_blown_task( running, pattern_ok ); } } ffc03e10: 39 7f 00 18 addi r11,r31,24 ffc03e14: 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 ); ffc03e18: 7f c3 f3 78 mr r3,r30 } } ffc03e1c: 83 ab ff f4 lwz r29,-12(r11) ffc03e20: 7c 08 03 a6 mtlr r0 ffc03e24: 83 cb ff f8 lwz r30,-8(r11) ffc03e28: 83 eb ff fc lwz r31,-4(r11) ffc03e2c: 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 ); ffc03e30: 4b ff fd e0 b ffc03c10 } } ffc03e34: 39 7f 00 18 addi r11,r31,24 ffc03e38: 80 0b 00 04 lwz r0,4(r11) ffc03e3c: 83 ab ff f4 lwz r29,-12(r11) ffc03e40: 7c 08 03 a6 mtlr r0 ffc03e44: 83 cb ff f8 lwz r30,-8(r11) ffc03e48: 83 eb ff fc lwz r31,-4(r11) ffc03e4c: 7d 61 5b 78 mr r1,r11 ffc03e50: 4e 80 00 20 blr =============================================================================== ffc0efd4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0efd4: 94 21 ff d0 stwu r1,-48(r1) ffc0efd8: 7c 08 02 a6 mflr r0 ffc0efdc: 93 e1 00 24 stw r31,36(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0efe0: 7c 9f 23 79 mr. r31,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0efe4: 93 a1 00 1c stw r29,28(r1) ffc0efe8: 7c bd 2b 78 mr r29,r5 ffc0efec: 93 c1 00 20 stw r30,32(r1) ffc0eff0: 7c 7e 1b 78 mr r30,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0eff4: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0eff8: 90 01 00 34 stw r0,52(r1) ffc0effc: db e1 00 28 stfd f31,40(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f000: 41 82 00 78 beq- ffc0f078 return RTEMS_INVALID_ADDRESS; errno = 0; ffc0f004: 48 00 33 8d bl ffc12390 <__errno> *n = 0; ffc0f008: 3d 20 ff c2 lis r9,-62 ffc0f00c: c8 09 f9 58 lfd f0,-1704(r9) char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; ffc0f010: 38 00 00 00 li r0,0 ffc0f014: 90 03 00 00 stw r0,0(r3) *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ffc0f018: 38 81 00 08 addi r4,r1,8 ffc0f01c: 7f c3 f3 78 mr r3,r30 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc0f020: d8 1f 00 00 stfd f0,0(r31) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ffc0f024: 48 00 60 a1 bl ffc150c4 #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 ) ffc0f028: 2f 9d 00 00 cmpwi cr7,r29,0 errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ffc0f02c: ff e0 08 90 fmr f31,f1 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0f030: 41 9e 00 0c beq- cr7,ffc0f03c *endptr = end; ffc0f034: 80 01 00 08 lwz r0,8(r1) ffc0f038: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc0f03c: 80 01 00 08 lwz r0,8(r1) ffc0f040: 38 60 00 0b li r3,11 ffc0f044: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0f048: 41 9e 00 30 beq- cr7,ffc0f078 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc0f04c: 3d 20 ff c2 lis r9,-62 ffc0f050: c8 09 1c 58 lfd f0,7256(r9) ffc0f054: ff 9f 00 00 fcmpu cr7,f31,f0 ffc0f058: 40 9d 00 18 ble- cr7,ffc0f070 ffc0f05c: 48 00 33 35 bl ffc12390 <__errno> ffc0f060: 80 03 00 00 lwz r0,0(r3) ffc0f064: 38 60 00 0a li r3,10 ffc0f068: 2f 80 00 22 cmpwi cr7,r0,34 ffc0f06c: 41 9e 00 0c beq- cr7,ffc0f078 <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc0f070: db ff 00 00 stfd f31,0(r31) ffc0f074: 38 60 00 00 li r3,0 #endif return RTEMS_SUCCESSFUL; } ffc0f078: 80 01 00 34 lwz r0,52(r1) ffc0f07c: 83 a1 00 1c lwz r29,28(r1) ffc0f080: 7c 08 03 a6 mtlr r0 ffc0f084: 83 c1 00 20 lwz r30,32(r1) ffc0f088: 83 e1 00 24 lwz r31,36(r1) ffc0f08c: cb e1 00 28 lfd f31,40(r1) ffc0f090: 38 21 00 30 addi r1,r1,48 ffc0f094: 4e 80 00 20 blr =============================================================================== ffc0f098 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f098: 94 21 ff d0 stwu r1,-48(r1) ffc0f09c: 7c 08 02 a6 mflr r0 ffc0f0a0: 93 e1 00 24 stw r31,36(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f0a4: 7c 9f 23 79 mr. r31,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f0a8: 93 a1 00 1c stw r29,28(r1) ffc0f0ac: 7c bd 2b 78 mr r29,r5 ffc0f0b0: 93 c1 00 20 stw r30,32(r1) ffc0f0b4: 7c 7e 1b 78 mr r30,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f0b8: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f0bc: 90 01 00 34 stw r0,52(r1) ffc0f0c0: db e1 00 28 stfd f31,40(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f0c4: 41 82 00 74 beq- ffc0f138 return RTEMS_INVALID_ADDRESS; errno = 0; ffc0f0c8: 48 00 32 c9 bl ffc12390 <__errno> ffc0f0cc: 38 00 00 00 li r0,0 ffc0f0d0: 90 03 00 00 stw r0,0(r3) *n = 0; ffc0f0d4: 38 00 00 00 li r0,0 #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ffc0f0d8: 7f c3 f3 78 mr r3,r30 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc0f0dc: 90 1f 00 00 stw r0,0(r31) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ffc0f0e0: 38 81 00 08 addi r4,r1,8 ffc0f0e4: 48 00 5f 79 bl ffc1505c #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 ) ffc0f0e8: 2f 9d 00 00 cmpwi cr7,r29,0 errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); ffc0f0ec: ff e0 08 90 fmr f31,f1 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0f0f0: 41 9e 00 0c beq- cr7,ffc0f0fc *endptr = end; ffc0f0f4: 80 01 00 08 lwz r0,8(r1) ffc0f0f8: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc0f0fc: 80 01 00 08 lwz r0,8(r1) ffc0f100: 38 60 00 0b li r3,11 ffc0f104: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0f108: 41 9e 00 30 beq- cr7,ffc0f138 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc0f10c: 3d 20 ff c2 lis r9,-62 ffc0f110: c0 09 1c 60 lfs f0,7264(r9) ffc0f114: ff 9f 00 00 fcmpu cr7,f31,f0 ffc0f118: 40 9d 00 18 ble- cr7,ffc0f130 ffc0f11c: 48 00 32 75 bl ffc12390 <__errno> ffc0f120: 80 03 00 00 lwz r0,0(r3) ffc0f124: 38 60 00 0a li r3,10 ffc0f128: 2f 80 00 22 cmpwi cr7,r0,34 ffc0f12c: 41 9e 00 0c beq- cr7,ffc0f138 <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc0f130: d3 ff 00 00 stfs f31,0(r31) ffc0f134: 38 60 00 00 li r3,0 #endif return RTEMS_SUCCESSFUL; } ffc0f138: 80 01 00 34 lwz r0,52(r1) ffc0f13c: 83 a1 00 1c lwz r29,28(r1) ffc0f140: 7c 08 03 a6 mtlr r0 ffc0f144: 83 c1 00 20 lwz r30,32(r1) ffc0f148: 83 e1 00 24 lwz r31,36(r1) ffc0f14c: cb e1 00 28 lfd f31,40(r1) ffc0f150: 38 21 00 30 addi r1,r1,48 ffc0f154: 4e 80 00 20 blr =============================================================================== ffc0f158 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f158: 94 21 ff d8 stwu r1,-40(r1) ffc0f15c: 7c 08 02 a6 mflr r0 ffc0f160: 93 e1 00 24 stw r31,36(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f164: 7c 9f 23 79 mr. r31,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f168: 93 81 00 18 stw r28,24(r1) ffc0f16c: 7c dc 33 78 mr r28,r6 ffc0f170: 93 a1 00 1c stw r29,28(r1) ffc0f174: 7c bd 2b 78 mr r29,r5 ffc0f178: 93 c1 00 20 stw r30,32(r1) ffc0f17c: 7c 7e 1b 78 mr r30,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f180: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f184: 90 01 00 2c stw r0,44(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f188: 41 82 00 70 beq- ffc0f1f8 return RTEMS_INVALID_ADDRESS; errno = 0; ffc0f18c: 48 00 32 05 bl ffc12390 <__errno> ffc0f190: 38 00 00 00 li r0,0 ffc0f194: 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 ); ffc0f198: 7f 85 e3 78 mr r5,r28 ffc0f19c: 7f c3 f3 78 mr r3,r30 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc0f1a0: 90 1f 00 00 stw r0,0(r31) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc0f1a4: 38 81 00 08 addi r4,r1,8 ffc0f1a8: 48 00 61 35 bl ffc152dc #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0f1ac: 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 ); ffc0f1b0: 7c 7c 1b 78 mr r28,r3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0f1b4: 41 9e 00 0c beq- cr7,ffc0f1c0 *endptr = end; ffc0f1b8: 80 01 00 08 lwz r0,8(r1) ffc0f1bc: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc0f1c0: 80 01 00 08 lwz r0,8(r1) ffc0f1c4: 38 60 00 0b li r3,11 ffc0f1c8: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0f1cc: 41 9e 00 2c beq- cr7,ffc0f1f8 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc0f1d0: 6f 80 80 00 xoris r0,r28,32768 ffc0f1d4: 2f 80 ff ff cmpwi cr7,r0,-1 ffc0f1d8: 40 9e 00 18 bne- cr7,ffc0f1f0 ffc0f1dc: 48 00 31 b5 bl ffc12390 <__errno> ffc0f1e0: 80 03 00 00 lwz r0,0(r3) ffc0f1e4: 38 60 00 0a li r3,10 ffc0f1e8: 2f 80 00 22 cmpwi cr7,r0,34 ffc0f1ec: 41 9e 00 0c beq- cr7,ffc0f1f8 <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc0f1f0: 93 9f 00 00 stw r28,0(r31) ffc0f1f4: 38 60 00 00 li r3,0 #endif return RTEMS_SUCCESSFUL; } ffc0f1f8: 80 01 00 2c lwz r0,44(r1) ffc0f1fc: 83 81 00 18 lwz r28,24(r1) ffc0f200: 7c 08 03 a6 mtlr r0 ffc0f204: 83 a1 00 1c lwz r29,28(r1) ffc0f208: 83 c1 00 20 lwz r30,32(r1) ffc0f20c: 83 e1 00 24 lwz r31,36(r1) ffc0f210: 38 21 00 28 addi r1,r1,40 ffc0f214: 4e 80 00 20 blr =============================================================================== ffc0f310 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f310: 94 21 ff d8 stwu r1,-40(r1) ffc0f314: 7c 08 02 a6 mflr r0 ffc0f318: 93 e1 00 24 stw r31,36(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f31c: 7c 9f 23 79 mr. r31,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f320: 93 81 00 18 stw r28,24(r1) ffc0f324: 7c dc 33 78 mr r28,r6 ffc0f328: 93 a1 00 1c stw r29,28(r1) ffc0f32c: 7c bd 2b 78 mr r29,r5 ffc0f330: 93 c1 00 20 stw r30,32(r1) ffc0f334: 7c 7e 1b 78 mr r30,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f338: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f33c: 90 01 00 2c stw r0,44(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f340: 41 82 00 7c beq- ffc0f3bc return RTEMS_INVALID_ADDRESS; errno = 0; ffc0f344: 48 00 30 4d bl ffc12390 <__errno> ffc0f348: 38 00 00 00 li r0,0 ffc0f34c: 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 ); ffc0f350: 7f 85 e3 78 mr r5,r28 ffc0f354: 7f c3 f3 78 mr r3,r30 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc0f358: 90 1f 00 00 stw r0,0(r31) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc0f35c: 38 81 00 08 addi r4,r1,8 ffc0f360: 48 00 5f 7d bl ffc152dc #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0f364: 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 ); ffc0f368: 7c 7c 1b 78 mr r28,r3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0f36c: 41 9e 00 0c beq- cr7,ffc0f378 *endptr = end; ffc0f370: 80 01 00 08 lwz r0,8(r1) ffc0f374: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc0f378: 80 01 00 08 lwz r0,8(r1) ffc0f37c: 38 60 00 0b li r3,11 ffc0f380: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0f384: 41 9e 00 38 beq- cr7,ffc0f3bc return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc0f388: 6f 80 80 00 xoris r0,r28,32768 ffc0f38c: 2f 80 ff ff cmpwi cr7,r0,-1 ffc0f390: 41 9e 00 10 beq- cr7,ffc0f3a0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) ffc0f394: 3c 00 80 00 lis r0,-32768 ffc0f398: 7f 9c 00 00 cmpw cr7,r28,r0 ffc0f39c: 40 be 00 18 bne+ cr7,ffc0f3b4 ffc0f3a0: 48 00 2f f1 bl ffc12390 <__errno> ffc0f3a4: 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; ffc0f3a8: 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)) ffc0f3ac: 2f 80 00 22 cmpwi cr7,r0,34 ffc0f3b0: 41 9e 00 0c beq- cr7,ffc0f3bc <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc0f3b4: 93 9f 00 00 stw r28,0(r31) ffc0f3b8: 38 60 00 00 li r3,0 #endif return RTEMS_SUCCESSFUL; } ffc0f3bc: 80 01 00 2c lwz r0,44(r1) ffc0f3c0: 83 81 00 18 lwz r28,24(r1) ffc0f3c4: 7c 08 03 a6 mtlr r0 ffc0f3c8: 83 a1 00 1c lwz r29,28(r1) ffc0f3cc: 83 c1 00 20 lwz r30,32(r1) ffc0f3d0: 83 e1 00 24 lwz r31,36(r1) ffc0f3d4: 38 21 00 28 addi r1,r1,40 ffc0f3d8: 4e 80 00 20 blr =============================================================================== ffc0f218 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f218: 94 21 ff d0 stwu r1,-48(r1) ffc0f21c: 7c 08 02 a6 mflr r0 ffc0f220: 93 e1 00 2c stw r31,44(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f224: 7c 9f 23 79 mr. r31,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f228: 93 81 00 20 stw r28,32(r1) ffc0f22c: 7c dc 33 78 mr r28,r6 ffc0f230: 93 a1 00 24 stw r29,36(r1) ffc0f234: 7c bd 2b 78 mr r29,r5 ffc0f238: 93 c1 00 28 stw r30,40(r1) ffc0f23c: 7c 7e 1b 78 mr r30,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f240: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f244: 90 01 00 34 stw r0,52(r1) ffc0f248: 93 61 00 1c stw r27,28(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f24c: 41 82 00 a0 beq- ffc0f2ec return RTEMS_INVALID_ADDRESS; errno = 0; ffc0f250: 48 00 31 41 bl ffc12390 <__errno> ffc0f254: 38 00 00 00 li r0,0 *n = 0; ffc0f258: 39 20 00 00 li r9,0 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; ffc0f25c: 90 03 00 00 stw r0,0(r3) *n = 0; ffc0f260: 39 40 00 00 li r10,0 ffc0f264: 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 ); ffc0f268: 7f 85 e3 78 mr r5,r28 ffc0f26c: 7f c3 f3 78 mr r3,r30 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc0f270: 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 ); ffc0f274: 38 81 00 08 addi r4,r1,8 ffc0f278: 48 00 60 85 bl ffc152fc #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0f27c: 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 ); ffc0f280: 7c 7c 1b 78 mr r28,r3 ffc0f284: 7c 9b 23 78 mr r27,r4 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0f288: 41 9e 00 0c beq- cr7,ffc0f294 *endptr = end; ffc0f28c: 80 01 00 08 lwz r0,8(r1) ffc0f290: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc0f294: 80 01 00 08 lwz r0,8(r1) ffc0f298: 38 60 00 0b li r3,11 ffc0f29c: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0f2a0: 41 9e 00 4c beq- cr7,ffc0f2ec return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc0f2a4: 6f 80 80 00 xoris r0,r28,32768 ffc0f2a8: 2f 80 ff ff cmpwi cr7,r0,-1 ffc0f2ac: 40 9e 00 0c bne- cr7,ffc0f2b8 ffc0f2b0: 2f 9b ff ff cmpwi cr7,r27,-1 ffc0f2b4: 41 9e 00 18 beq- cr7,ffc0f2cc <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) ffc0f2b8: 3c 00 80 00 lis r0,-32768 ffc0f2bc: 7f 9c 00 00 cmpw cr7,r28,r0 ffc0f2c0: 40 be 00 20 bne+ cr7,ffc0f2e0 ffc0f2c4: 2f 9b 00 00 cmpwi cr7,r27,0 ffc0f2c8: 40 be 00 18 bne+ cr7,ffc0f2e0 <== NEVER TAKEN ffc0f2cc: 48 00 30 c5 bl ffc12390 <__errno> ffc0f2d0: 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; ffc0f2d4: 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)) ffc0f2d8: 2f 80 00 22 cmpwi cr7,r0,34 ffc0f2dc: 41 9e 00 10 beq- cr7,ffc0f2ec <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc0f2e0: 93 7f 00 04 stw r27,4(r31) ffc0f2e4: 38 60 00 00 li r3,0 ffc0f2e8: 93 9f 00 00 stw r28,0(r31) #endif return RTEMS_SUCCESSFUL; } ffc0f2ec: 80 01 00 34 lwz r0,52(r1) ffc0f2f0: 83 61 00 1c lwz r27,28(r1) ffc0f2f4: 7c 08 03 a6 mtlr r0 ffc0f2f8: 83 81 00 20 lwz r28,32(r1) ffc0f2fc: 83 a1 00 24 lwz r29,36(r1) ffc0f300: 83 c1 00 28 lwz r30,40(r1) ffc0f304: 83 e1 00 2c lwz r31,44(r1) ffc0f308: 38 21 00 30 addi r1,r1,48 ffc0f30c: 4e 80 00 20 blr =============================================================================== ffc0f3dc : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f3dc: 94 21 ff d8 stwu r1,-40(r1) ffc0f3e0: 7c 08 02 a6 mflr r0 ffc0f3e4: 93 e1 00 24 stw r31,36(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f3e8: 7c 9f 23 79 mr. r31,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f3ec: 93 a1 00 1c stw r29,28(r1) ffc0f3f0: 7c bd 2b 78 mr r29,r5 ffc0f3f4: 93 c1 00 20 stw r30,32(r1) ffc0f3f8: 7c 7e 1b 78 mr r30,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f3fc: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f400: 90 01 00 2c stw r0,44(r1) ffc0f404: 93 81 00 18 stw r28,24(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f408: 41 82 00 6c beq- ffc0f474 return RTEMS_INVALID_ADDRESS; errno = 0; ffc0f40c: 48 00 2f 85 bl ffc12390 <__errno> ffc0f410: 38 00 00 00 li r0,0 ffc0f414: 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 ); ffc0f418: 38 81 00 08 addi r4,r1,8 ffc0f41c: 7f c3 f3 78 mr r3,r30 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc0f420: 90 1f 00 00 stw r0,0(r31) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); ffc0f424: 38 a0 00 10 li r5,16 ffc0f428: 48 00 64 01 bl ffc15828 #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 ) ffc0f42c: 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 ); ffc0f430: 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 ) ffc0f434: 41 9e 00 0c beq- cr7,ffc0f440 *endptr = end; ffc0f438: 80 01 00 08 lwz r0,8(r1) ffc0f43c: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc0f440: 80 01 00 08 lwz r0,8(r1) ffc0f444: 38 60 00 0b li r3,11 ffc0f448: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0f44c: 41 9e 00 28 beq- cr7,ffc0f474 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc0f450: 2f 9c ff ff cmpwi cr7,r28,-1 ffc0f454: 40 be 00 18 bne+ cr7,ffc0f46c <== ALWAYS TAKEN ffc0f458: 48 00 2f 39 bl ffc12390 <__errno> <== NOT EXECUTED ffc0f45c: 80 03 00 00 lwz r0,0(r3) <== NOT EXECUTED ffc0f460: 38 60 00 0a li r3,10 <== NOT EXECUTED ffc0f464: 2f 80 00 22 cmpwi cr7,r0,34 <== NOT EXECUTED ffc0f468: 41 9e 00 0c beq- cr7,ffc0f474 <== NOT EXECUTED if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; ffc0f46c: 93 9f 00 00 stw r28,0(r31) ffc0f470: 38 60 00 00 li r3,0 #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } ffc0f474: 80 01 00 2c lwz r0,44(r1) ffc0f478: 83 81 00 18 lwz r28,24(r1) ffc0f47c: 7c 08 03 a6 mtlr r0 ffc0f480: 83 a1 00 1c lwz r29,28(r1) ffc0f484: 83 c1 00 20 lwz r30,32(r1) ffc0f488: 83 e1 00 24 lwz r31,36(r1) ffc0f48c: 38 21 00 28 addi r1,r1,40 ffc0f490: 4e 80 00 20 blr =============================================================================== ffc0f534 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f534: 94 21 ff d8 stwu r1,-40(r1) ffc0f538: 7c 08 02 a6 mflr r0 ffc0f53c: 93 e1 00 24 stw r31,36(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f540: 7c 9f 23 79 mr. r31,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f544: 93 81 00 18 stw r28,24(r1) ffc0f548: 7c dc 33 78 mr r28,r6 ffc0f54c: 93 a1 00 1c stw r29,28(r1) ffc0f550: 7c bd 2b 78 mr r29,r5 ffc0f554: 93 c1 00 20 stw r30,32(r1) ffc0f558: 7c 7e 1b 78 mr r30,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f55c: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f560: 90 01 00 2c stw r0,44(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f564: 41 82 00 6c beq- ffc0f5d0 return RTEMS_INVALID_ADDRESS; errno = 0; ffc0f568: 48 00 2e 29 bl ffc12390 <__errno> ffc0f56c: 38 00 00 00 li r0,0 ffc0f570: 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 ); ffc0f574: 7f 85 e3 78 mr r5,r28 ffc0f578: 7f c3 f3 78 mr r3,r30 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc0f57c: 90 1f 00 00 stw r0,0(r31) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc0f580: 38 81 00 08 addi r4,r1,8 ffc0f584: 48 00 62 a5 bl ffc15828 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0f588: 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 ); ffc0f58c: 7c 7c 1b 78 mr r28,r3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0f590: 41 9e 00 0c beq- cr7,ffc0f59c *endptr = end; ffc0f594: 80 01 00 08 lwz r0,8(r1) ffc0f598: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc0f59c: 80 01 00 08 lwz r0,8(r1) ffc0f5a0: 38 60 00 0b li r3,11 ffc0f5a4: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0f5a8: 41 9e 00 28 beq- cr7,ffc0f5d0 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc0f5ac: 2f 9c ff ff cmpwi cr7,r28,-1 ffc0f5b0: 40 be 00 18 bne+ cr7,ffc0f5c8 ffc0f5b4: 48 00 2d dd bl ffc12390 <__errno> ffc0f5b8: 80 03 00 00 lwz r0,0(r3) ffc0f5bc: 38 60 00 0a li r3,10 ffc0f5c0: 2f 80 00 22 cmpwi cr7,r0,34 ffc0f5c4: 41 9e 00 0c beq- cr7,ffc0f5d0 <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc0f5c8: 93 9f 00 00 stw r28,0(r31) ffc0f5cc: 38 60 00 00 li r3,0 #endif return RTEMS_SUCCESSFUL; } ffc0f5d0: 80 01 00 2c lwz r0,44(r1) ffc0f5d4: 83 81 00 18 lwz r28,24(r1) ffc0f5d8: 7c 08 03 a6 mtlr r0 ffc0f5dc: 83 a1 00 1c lwz r29,28(r1) ffc0f5e0: 83 c1 00 20 lwz r30,32(r1) ffc0f5e4: 83 e1 00 24 lwz r31,36(r1) ffc0f5e8: 38 21 00 28 addi r1,r1,40 ffc0f5ec: 4e 80 00 20 blr =============================================================================== ffc0f6d0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f6d0: 94 21 ff d8 stwu r1,-40(r1) ffc0f6d4: 7c 08 02 a6 mflr r0 ffc0f6d8: 93 e1 00 24 stw r31,36(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f6dc: 7c 9f 23 79 mr. r31,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f6e0: 93 81 00 18 stw r28,24(r1) ffc0f6e4: 7c dc 33 78 mr r28,r6 ffc0f6e8: 93 a1 00 1c stw r29,28(r1) ffc0f6ec: 7c bd 2b 78 mr r29,r5 ffc0f6f0: 93 c1 00 20 stw r30,32(r1) ffc0f6f4: 7c 7e 1b 78 mr r30,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f6f8: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f6fc: 90 01 00 2c stw r0,44(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f700: 41 82 00 6c beq- ffc0f76c return RTEMS_INVALID_ADDRESS; errno = 0; ffc0f704: 48 00 2c 8d bl ffc12390 <__errno> ffc0f708: 38 00 00 00 li r0,0 ffc0f70c: 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 ); ffc0f710: 7f 85 e3 78 mr r5,r28 ffc0f714: 7f c3 f3 78 mr r3,r30 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc0f718: 90 1f 00 00 stw r0,0(r31) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); ffc0f71c: 38 81 00 08 addi r4,r1,8 ffc0f720: 48 00 61 09 bl ffc15828 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0f724: 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 ); ffc0f728: 7c 7c 1b 78 mr r28,r3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0f72c: 41 9e 00 0c beq- cr7,ffc0f738 *endptr = end; ffc0f730: 80 01 00 08 lwz r0,8(r1) ffc0f734: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc0f738: 80 01 00 08 lwz r0,8(r1) ffc0f73c: 38 60 00 0b li r3,11 ffc0f740: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0f744: 41 9e 00 28 beq- cr7,ffc0f76c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc0f748: 2f 9c ff ff cmpwi cr7,r28,-1 ffc0f74c: 40 be 00 18 bne+ cr7,ffc0f764 ffc0f750: 48 00 2c 41 bl ffc12390 <__errno> ffc0f754: 80 03 00 00 lwz r0,0(r3) ffc0f758: 38 60 00 0a li r3,10 ffc0f75c: 2f 80 00 22 cmpwi cr7,r0,34 ffc0f760: 41 9e 00 0c beq- cr7,ffc0f76c <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc0f764: 93 9f 00 00 stw r28,0(r31) ffc0f768: 38 60 00 00 li r3,0 #endif return RTEMS_SUCCESSFUL; } ffc0f76c: 80 01 00 2c lwz r0,44(r1) ffc0f770: 83 81 00 18 lwz r28,24(r1) ffc0f774: 7c 08 03 a6 mtlr r0 ffc0f778: 83 a1 00 1c lwz r29,28(r1) ffc0f77c: 83 c1 00 20 lwz r30,32(r1) ffc0f780: 83 e1 00 24 lwz r31,36(r1) ffc0f784: 38 21 00 28 addi r1,r1,40 ffc0f788: 4e 80 00 20 blr =============================================================================== ffc0f5f0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f5f0: 94 21 ff d0 stwu r1,-48(r1) ffc0f5f4: 7c 08 02 a6 mflr r0 ffc0f5f8: 93 e1 00 2c stw r31,44(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f5fc: 7c 9f 23 79 mr. r31,r4 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f600: 93 81 00 20 stw r28,32(r1) ffc0f604: 7c dc 33 78 mr r28,r6 ffc0f608: 93 a1 00 24 stw r29,36(r1) ffc0f60c: 7c bd 2b 78 mr r29,r5 ffc0f610: 93 c1 00 28 stw r30,40(r1) ffc0f614: 7c 7e 1b 78 mr r30,r3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f618: 38 60 00 09 li r3,9 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ffc0f61c: 90 01 00 34 stw r0,52(r1) ffc0f620: 93 61 00 1c stw r27,28(r1) STRING_TO_INPUT_TYPE result; char *end; if ( !n ) ffc0f624: 41 82 00 88 beq- ffc0f6ac return RTEMS_INVALID_ADDRESS; errno = 0; ffc0f628: 48 00 2d 69 bl ffc12390 <__errno> ffc0f62c: 38 00 00 00 li r0,0 *n = 0; ffc0f630: 39 20 00 00 li r9,0 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; ffc0f634: 90 03 00 00 stw r0,0(r3) *n = 0; ffc0f638: 39 40 00 00 li r10,0 ffc0f63c: 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 ); ffc0f640: 7f 85 e3 78 mr r5,r28 ffc0f644: 7f c3 f3 78 mr r3,r30 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; ffc0f648: 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 ); ffc0f64c: 38 81 00 08 addi r4,r1,8 ffc0f650: 48 00 61 f9 bl ffc15848 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0f654: 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 ); ffc0f658: 7c 7c 1b 78 mr r28,r3 ffc0f65c: 7c 9b 23 78 mr r27,r4 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) ffc0f660: 41 9e 00 0c beq- cr7,ffc0f66c *endptr = end; ffc0f664: 80 01 00 08 lwz r0,8(r1) ffc0f668: 90 1d 00 00 stw r0,0(r29) /* nothing was converted */ if ( end == s ) ffc0f66c: 80 01 00 08 lwz r0,8(r1) ffc0f670: 38 60 00 0b li r3,11 ffc0f674: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0f678: 41 9e 00 34 beq- cr7,ffc0f6ac return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ffc0f67c: 2f 9c ff ff cmpwi cr7,r28,-1 ffc0f680: 40 be 00 20 bne+ cr7,ffc0f6a0 ffc0f684: 2f 9b ff ff cmpwi cr7,r27,-1 ffc0f688: 40 be 00 18 bne+ cr7,ffc0f6a0 <== NEVER TAKEN ffc0f68c: 48 00 2d 05 bl ffc12390 <__errno> ffc0f690: 80 03 00 00 lwz r0,0(r3) ffc0f694: 38 60 00 0a li r3,10 ffc0f698: 2f 80 00 22 cmpwi cr7,r0,34 ffc0f69c: 41 9e 00 10 beq- cr7,ffc0f6ac <== ALWAYS TAKEN #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; ffc0f6a0: 93 7f 00 04 stw r27,4(r31) ffc0f6a4: 38 60 00 00 li r3,0 ffc0f6a8: 93 9f 00 00 stw r28,0(r31) #endif return RTEMS_SUCCESSFUL; } ffc0f6ac: 80 01 00 34 lwz r0,52(r1) ffc0f6b0: 83 61 00 1c lwz r27,28(r1) ffc0f6b4: 7c 08 03 a6 mtlr r0 ffc0f6b8: 83 81 00 20 lwz r28,32(r1) ffc0f6bc: 83 a1 00 24 lwz r29,36(r1) ffc0f6c0: 83 c1 00 28 lwz r30,40(r1) ffc0f6c4: 83 e1 00 2c lwz r31,44(r1) ffc0f6c8: 38 21 00 30 addi r1,r1,48 ffc0f6cc: 4e 80 00 20 blr =============================================================================== ffc142b0 : ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) ffc142b0: 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 ) { ffc142b4: 94 21 ff f0 stwu r1,-16(r1) ffc142b8: 7c 08 02 a6 mflr r0 ffc142bc: 93 e1 00 0c stw r31,12(r1) ffc142c0: 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 ) ffc142c4: 38 00 00 09 li r0,9 ffc142c8: 41 82 01 5c beq- ffc14424 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; ffc142cc: 3d 20 00 00 lis r9,0 ffc142d0: 81 29 27 d0 lwz r9,10192(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 ) ffc142d4: 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; ffc142d8: 89 49 00 75 lbz r10,117(r9) if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc142dc: 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 ]; ffc142e0: 81 69 01 44 lwz r11,324(r9) asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; ffc142e4: 7d 4a 00 34 cntlzw r10,r10 ffc142e8: 55 4a d9 7e rlwinm r10,r10,27,5,31 ffc142ec: 55 4a 40 2e rlwinm r10,r10,8,0,23 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc142f0: 41 9e 00 08 beq- cr7,ffc142f8 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; ffc142f4: 61 4a 02 00 ori r10,r10,512 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; ffc142f8: 89 0b 00 08 lbz r8,8(r11) #ifndef ASM static inline uint32_t _CPU_ISR_Get_level( void ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc142fc: 38 00 00 00 li r0,0 ffc14300: 7d 08 00 34 cntlzw r8,r8 ffc14304: 55 08 d9 7e rlwinm r8,r8,27,5,31 ffc14308: 55 08 50 2a rlwinm r8,r8,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; ffc1430c: 7d 0a 53 78 or r10,r8,r10 ffc14310: 7c 00 00 a6 mfmsr r0 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc14314: 70 88 01 00 andi. r8,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; ffc14318: 68 00 80 00 xori r0,r0,32768 ffc1431c: 54 00 8f fe rlwinm r0,r0,17,31,31 ffc14320: 7d 4a 03 78 or r10,r10,r0 ffc14324: 91 45 00 00 stw r10,0(r5) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc14328: 41 82 00 10 beq- ffc14338 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; ffc1432c: 68 60 01 00 xori r0,r3,256 ffc14330: 54 00 c7 fe rlwinm r0,r0,24,31,31 ffc14334: 98 09 00 75 stb r0,117(r9) if ( mask & RTEMS_TIMESLICE_MASK ) { ffc14338: 70 8a 02 00 andi. r10,r4,512 ffc1433c: 41 82 00 28 beq- ffc14364 if ( _Modes_Is_timeslice(mode_set) ) { ffc14340: 70 60 02 00 andi. r0,r3,512 ffc14344: 41 82 00 1c beq- ffc14360 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc14348: 3d 40 00 00 lis r10,0 ffc1434c: 80 0a 27 88 lwz r0,10120(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; ffc14350: 39 40 00 01 li r10,1 ffc14354: 91 49 00 7c stw r10,124(r9) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc14358: 90 09 00 78 stw r0,120(r9) ffc1435c: 48 00 00 08 b ffc14364 } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; ffc14360: 90 09 00 7c stw r0,124(r9) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc14364: 70 80 00 01 andi. r0,r4,1 ffc14368: 41 82 00 2c beq- ffc14394 } static inline void _CPU_ISR_Set_level( uint32_t level ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc1436c: 38 00 00 00 li r0,0 ffc14370: 7c 00 00 a6 mfmsr r0 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc14374: 70 68 00 01 andi. r8,r3,1 ffc14378: 40 82 00 10 bne- ffc14388 static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; asm volatile ( ffc1437c: 7d 50 42 a6 mfsprg r10,0 msr |= ppc_interrupt_get_disable_mask(); ffc14380: 7d 40 03 78 or r0,r10,r0 ffc14384: 48 00 00 0c b ffc14390 ffc14388: 7d 50 42 a6 mfsprg r10,0 } else { msr &= ~ppc_interrupt_get_disable_mask(); ffc1438c: 7c 00 50 78 andc r0,r0,r10 } _CPU_MSR_SET(msr); ffc14390: 7c 00 01 24 mtmsr r0 */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { ffc14394: 70 8a 04 00 andi. r10,r4,1024 ffc14398: 41 82 00 5c beq- ffc143f4 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( ffc1439c: 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; ffc143a0: 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( ffc143a4: 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; ffc143a8: 7f 80 18 00 cmpw cr7,r0,r3 ffc143ac: 41 9e 00 48 beq- cr7,ffc143f4 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; ffc143b0: 98 6b 00 08 stb r3,8(r11) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc143b4: 7c 00 00 a6 mfmsr r0 ffc143b8: 7d 50 42 a6 mfsprg r10,0 ffc143bc: 7c 0a 50 78 andc r10,r0,r10 ffc143c0: 7d 40 01 24 mtmsr r10 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; ffc143c4: 81 0b 00 18 lwz r8,24(r11) information->signals_pending = information->signals_posted; ffc143c8: 81 4b 00 14 lwz r10,20(r11) information->signals_posted = _signals; ffc143cc: 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; ffc143d0: 91 4b 00 18 stw r10,24(r11) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc143d4: 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; ffc143d8: 80 0b 00 14 lwz r0,20(r11) ffc143dc: 2f 80 00 00 cmpwi cr7,r0,0 ffc143e0: 41 9e 00 14 beq- cr7,ffc143f4 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; ffc143e4: 38 00 00 01 li r0,1 ffc143e8: 98 09 00 74 stb r0,116(r9) ffc143ec: 3b e0 00 01 li r31,1 ffc143f0: 48 00 00 08 b ffc143f8 ffc143f4: 3b e0 00 00 li r31,0 } } } if ( _System_state_Is_up( _System_state_Get() ) ) ffc143f8: 3d 20 00 00 lis r9,0 ffc143fc: 80 09 27 f4 lwz r0,10228(r9) ffc14400: 2f 80 00 03 cmpwi cr7,r0,3 ffc14404: 40 be 00 1c bne+ cr7,ffc14420 <== NEVER TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) ffc14408: 48 00 0d 61 bl ffc15168 <_Thread_Evaluate_mode> ffc1440c: 2f 83 00 00 cmpwi cr7,r3,0 ffc14410: 40 9e 00 0c bne- cr7,ffc1441c ffc14414: 2f 9f 00 00 cmpwi cr7,r31,0 ffc14418: 41 9e 00 08 beq- cr7,ffc14420 _Thread_Dispatch(); ffc1441c: 4b ff 7f 11 bl ffc0c32c <_Thread_Dispatch> ffc14420: 38 00 00 00 li r0,0 return RTEMS_SUCCESSFUL; } ffc14424: 7c 03 03 78 mr r3,r0 ffc14428: 80 01 00 14 lwz r0,20(r1) ffc1442c: 83 e1 00 0c lwz r31,12(r1) ffc14430: 38 21 00 10 addi r1,r1,16 ffc14434: 7c 08 03 a6 mtlr r0 ffc14438: 4e 80 00 20 blr =============================================================================== ffc0dce8 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { ffc0dce8: 94 21 ff e0 stwu r1,-32(r1) ffc0dcec: 7c 08 02 a6 mflr r0 ffc0dcf0: 93 e1 00 1c stw r31,28(r1) register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0dcf4: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { ffc0dcf8: 93 c1 00 18 stw r30,24(r1) ffc0dcfc: 7c be 2b 78 mr r30,r5 ffc0dd00: 90 01 00 24 stw r0,36(r1) register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0dd04: 41 82 00 18 beq- ffc0dd1c ffc0dd08: 3d 20 00 00 lis r9,0 ffc0dd0c: 89 29 26 e4 lbz r9,9956(r9) ffc0dd10: 38 00 00 13 li r0,19 ffc0dd14: 7f 9f 48 40 cmplw cr7,r31,r9 ffc0dd18: 41 9d 00 68 bgt- cr7,ffc0dd80 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) ffc0dd1c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0dd20: 38 00 00 09 li r0,9 ffc0dd24: 41 9e 00 5c beq- cr7,ffc0dd80 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); ffc0dd28: 38 81 00 08 addi r4,r1,8 ffc0dd2c: 48 00 26 99 bl ffc103c4 <_Thread_Get> switch ( location ) { ffc0dd30: 81 21 00 08 lwz r9,8(r1) ffc0dd34: 38 00 00 04 li r0,4 ffc0dd38: 2f 89 00 00 cmpwi cr7,r9,0 ffc0dd3c: 40 9e 00 44 bne- cr7,ffc0dd80 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; if ( new_priority != RTEMS_CURRENT_PRIORITY ) { ffc0dd40: 2f 9f 00 00 cmpwi cr7,r31,0 the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; ffc0dd44: 80 03 00 14 lwz r0,20(r3) ffc0dd48: 90 1e 00 00 stw r0,0(r30) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { ffc0dd4c: 41 9e 00 2c beq- cr7,ffc0dd78 the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || ffc0dd50: 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; ffc0dd54: 93 e3 00 18 stw r31,24(r3) if ( the_thread->resource_count == 0 || ffc0dd58: 2f 80 00 00 cmpwi cr7,r0,0 ffc0dd5c: 41 9e 00 10 beq- cr7,ffc0dd6c the_thread->current_priority > new_priority ) ffc0dd60: 80 03 00 14 lwz r0,20(r3) ffc0dd64: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0dd68: 40 9d 00 10 ble- cr7,ffc0dd78 <== ALWAYS TAKEN _Thread_Change_priority( the_thread, new_priority, false ); ffc0dd6c: 7f e4 fb 78 mr r4,r31 ffc0dd70: 38 a0 00 00 li r5,0 ffc0dd74: 48 00 1f 5d bl ffc0fcd0 <_Thread_Change_priority> } _Thread_Enable_dispatch(); ffc0dd78: 48 00 25 e1 bl ffc10358 <_Thread_Enable_dispatch> ffc0dd7c: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc0dd80: 7c 03 03 78 mr r3,r0 ffc0dd84: 80 01 00 24 lwz r0,36(r1) ffc0dd88: 83 c1 00 18 lwz r30,24(r1) ffc0dd8c: 7c 08 03 a6 mtlr r0 ffc0dd90: 83 e1 00 1c lwz r31,28(r1) ffc0dd94: 38 21 00 20 addi r1,r1,32 ffc0dd98: 4e 80 00 20 blr =============================================================================== ffc06d14 : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc06d14: 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; ffc06d18: 38 00 00 09 li r0,9 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc06d1c: 41 9e 01 04 beq- cr7,ffc06e20 <== NEVER TAKEN ffc06d20: 41 9d 00 70 bgt- cr7,ffc06d90 <== NEVER TAKEN ffc06d24: 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; ffc06d28: 38 00 00 04 li r0,4 rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc06d2c: 41 9e 00 f4 beq- cr7,ffc06e20 <== NEVER TAKEN ffc06d30: 41 9d 00 38 bgt- cr7,ffc06d68 <== NEVER TAKEN ffc06d34: 2f 83 00 01 cmpwi cr7,r3,1 ffc06d38: 38 00 00 01 li r0,1 ffc06d3c: 41 9e 00 e4 beq- cr7,ffc06e20 <== NEVER TAKEN ffc06d40: 41 bd 00 10 bgt+ cr7,ffc06d50 <== NEVER TAKEN ffc06d44: 2f 83 00 00 cmpwi cr7,r3,0 ffc06d48: 38 00 00 00 li r0,0 ffc06d4c: 48 00 00 b8 b ffc06e04 ffc06d50: 2f 83 00 02 cmpwi cr7,r3,2 <== NOT EXECUTED ffc06d54: 38 00 00 02 li r0,2 <== NOT EXECUTED ffc06d58: 41 9e 00 c8 beq- cr7,ffc06e20 <== NOT EXECUTED ffc06d5c: 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; ffc06d60: 38 00 00 03 li r0,3 <== NOT EXECUTED ffc06d64: 48 00 00 a0 b ffc06e04 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc06d68: 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; ffc06d6c: 38 00 00 06 li r0,6 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc06d70: 41 9e 00 b0 beq- cr7,ffc06e20 <== NOT EXECUTED ffc06d74: 41 9c 00 98 blt- cr7,ffc06e0c <== NOT EXECUTED ffc06d78: 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; ffc06d7c: 38 00 00 07 li r0,7 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc06d80: 41 9e 00 a0 beq- cr7,ffc06e20 <== NOT EXECUTED ffc06d84: 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; ffc06d88: 38 00 00 08 li r0,8 <== NOT EXECUTED ffc06d8c: 48 00 00 78 b ffc06e04 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc06d90: 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; ffc06d94: 38 00 00 0e li r0,14 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc06d98: 41 9e 00 88 beq- cr7,ffc06e20 <== NOT EXECUTED ffc06d9c: 41 9d 00 2c bgt- cr7,ffc06dc8 <== NOT EXECUTED ffc06da0: 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; ffc06da4: 38 00 00 0b li r0,11 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc06da8: 41 9e 00 78 beq- cr7,ffc06e20 <== NOT EXECUTED ffc06dac: 41 9c 00 68 blt- cr7,ffc06e14 <== NOT EXECUTED ffc06db0: 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; ffc06db4: 38 00 00 0c li r0,12 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc06db8: 41 9e 00 68 beq- cr7,ffc06e20 <== NOT EXECUTED ffc06dbc: 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; ffc06dc0: 38 00 00 0d li r0,13 <== NOT EXECUTED ffc06dc4: 48 00 00 40 b ffc06e04 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc06dc8: 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; ffc06dcc: 38 00 00 11 li r0,17 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc06dd0: 41 9e 00 50 beq- cr7,ffc06e20 <== NOT EXECUTED ffc06dd4: 41 9d 00 1c bgt- cr7,ffc06df0 <== NOT EXECUTED ffc06dd8: 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; ffc06ddc: 38 00 00 0f li r0,15 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc06de0: 41 9e 00 40 beq- cr7,ffc06e20 <== NOT EXECUTED ffc06de4: 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; ffc06de8: 38 00 00 10 li r0,16 <== NOT EXECUTED ffc06dec: 48 00 00 18 b ffc06e04 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc06df0: 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; ffc06df4: 38 00 00 12 li r0,18 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc06df8: 41 9e 00 28 beq- cr7,ffc06e20 <== NOT EXECUTED ffc06dfc: 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; ffc06e00: 38 00 00 13 li r0,19 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { ffc06e04: 40 be 00 18 bne+ cr7,ffc06e1c <== ALWAYS TAKEN ffc06e08: 48 00 00 18 b ffc06e20 <== 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; ffc06e0c: 38 00 00 05 li r0,5 <== NOT EXECUTED case B150: baud_index = 5; break; ffc06e10: 48 00 00 10 b ffc06e20 <== 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; ffc06e14: 38 00 00 0a li r0,10 <== NOT EXECUTED case B1800: baud_index = 10; break; ffc06e18: 48 00 00 08 b ffc06e20 <== 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; ffc06e1c: 38 00 ff ff li r0,-1 default: baud_index = -1; break; } return baud_index; } ffc06e20: 7c 03 03 78 mr r3,r0 ffc06e24: 4e 80 00 20 blr =============================================================================== ffc06e28 : int termios_baud ) { int32_t baud; switch (termios_baud) { ffc06e28: 2f 83 00 09 cmpwi cr7,r3,9 #include int32_t rtems_termios_baud_to_number( int termios_baud ) { ffc06e2c: 7c 60 1b 78 mr r0,r3 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; ffc06e30: 38 60 04 b0 li r3,1200 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc06e34: 4d 9e 00 20 beqlr cr7 ffc06e38: 41 9d 00 7c bgt- cr7,ffc06eb4 ffc06e3c: 2f 80 00 04 cmpwi cr7,r0,4 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; ffc06e40: 38 60 00 86 li r3,134 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc06e44: 4d 9e 00 20 beqlr cr7 ffc06e48: 41 9d 00 40 bgt- cr7,ffc06e88 ffc06e4c: 2f 80 00 01 cmpwi cr7,r0,1 ffc06e50: 38 60 00 32 li r3,50 ffc06e54: 4d 9e 00 20 beqlr cr7 ffc06e58: 41 bd 00 14 bgt+ cr7,ffc06e6c ffc06e5c: 2f 80 00 00 cmpwi cr7,r0,0 ffc06e60: 38 60 00 00 li r3,0 ffc06e64: 4d 9e 00 20 beqlr cr7 ffc06e68: 48 00 00 f4 b ffc06f5c ffc06e6c: 2f 80 00 02 cmpwi cr7,r0,2 ffc06e70: 38 60 00 4b li r3,75 ffc06e74: 4d 9e 00 20 beqlr cr7 ffc06e78: 2f 80 00 03 cmpwi cr7,r0,3 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; ffc06e7c: 38 60 00 6e li r3,110 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc06e80: 40 be 00 dc bne+ cr7,ffc06f5c <== NEVER TAKEN ffc06e84: 4e 80 00 20 blr ffc06e88: 2f 80 00 06 cmpwi cr7,r0,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; ffc06e8c: 38 60 00 c8 li r3,200 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc06e90: 4d 9e 00 20 beqlr cr7 ffc06e94: 41 9c 00 b8 blt- cr7,ffc06f4c ffc06e98: 2f 80 00 07 cmpwi cr7,r0,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; ffc06e9c: 38 60 01 2c li r3,300 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc06ea0: 4d 9e 00 20 beqlr cr7 ffc06ea4: 2f 80 00 08 cmpwi cr7,r0,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; ffc06ea8: 38 60 02 58 li r3,600 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc06eac: 40 be 00 b0 bne+ cr7,ffc06f5c <== NEVER TAKEN ffc06eb0: 4e 80 00 20 blr ffc06eb4: 2f 80 00 0e cmpwi cr7,r0,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; ffc06eb8: 38 60 4b 00 li r3,19200 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc06ebc: 4d 9e 00 20 beqlr cr7 ffc06ec0: 41 9d 00 30 bgt- cr7,ffc06ef0 ffc06ec4: 2f 80 00 0b cmpwi cr7,r0,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; ffc06ec8: 38 60 09 60 li r3,2400 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc06ecc: 4d 9e 00 20 beqlr cr7 ffc06ed0: 41 9c 00 84 blt- cr7,ffc06f54 ffc06ed4: 2f 80 00 0c cmpwi cr7,r0,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; ffc06ed8: 38 60 12 c0 li r3,4800 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc06edc: 4d 9e 00 20 beqlr cr7 ffc06ee0: 2f 80 00 0d cmpwi cr7,r0,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; ffc06ee4: 38 60 25 80 li r3,9600 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc06ee8: 40 be 00 74 bne+ cr7,ffc06f5c <== NEVER TAKEN ffc06eec: 4e 80 00 20 blr ffc06ef0: 2f 80 10 02 cmpwi cr7,r0,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; ffc06ef4: 3c 60 00 01 lis r3,1 ffc06ef8: 60 63 c2 00 ori r3,r3,49664 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc06efc: 4d 9e 00 20 beqlr cr7 ffc06f00: 41 9d 00 28 bgt- cr7,ffc06f28 ffc06f04: 2f 80 00 0f cmpwi cr7,r0,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; ffc06f08: 38 60 00 00 li r3,0 ffc06f0c: 60 63 96 00 ori r3,r3,38400 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc06f10: 4d 9e 00 20 beqlr cr7 ffc06f14: 2f 80 10 01 cmpwi cr7,r0,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; ffc06f18: 38 60 00 00 li r3,0 ffc06f1c: 60 63 e1 00 ori r3,r3,57600 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc06f20: 40 be 00 3c bne+ cr7,ffc06f5c <== NEVER TAKEN ffc06f24: 4e 80 00 20 blr ffc06f28: 2f 80 10 03 cmpwi cr7,r0,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; ffc06f2c: 3c 60 00 03 lis r3,3 ffc06f30: 60 63 84 00 ori r3,r3,33792 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc06f34: 4d 9e 00 20 beqlr cr7 ffc06f38: 2f 80 10 04 cmpwi cr7,r0,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; ffc06f3c: 3c 60 00 07 lis r3,7 ffc06f40: 60 63 08 00 ori r3,r3,2048 int termios_baud ) { int32_t baud; switch (termios_baud) { ffc06f44: 40 be 00 18 bne+ cr7,ffc06f5c <== NEVER TAKEN ffc06f48: 4e 80 00 20 blr 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; ffc06f4c: 38 60 00 96 li r3,150 case B150: baud = 150; break; ffc06f50: 4e 80 00 20 blr case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; ffc06f54: 38 60 07 08 li r3,1800 case B1800: baud = 1800; break; ffc06f58: 4e 80 00 20 blr 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; ffc06f5c: 38 60 ff ff li r3,-1 default: baud = -1; break; } return baud; } ffc06f60: 4e 80 00 20 blr =============================================================================== ffc06d40 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; ffc06d40: 3d 60 00 00 lis r11,0 <== NOT EXECUTED ffc06d44: 39 2b 21 48 addi r9,r11,8520 <== NOT EXECUTED ffc06d48: 90 6b 21 48 stw r3,8520(r11) <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } ffc06d4c: 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; ffc06d50: 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; ffc06d54: 90 89 00 04 stw r4,4(r9) <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } ffc06d58: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc08534 : } } rtems_status_code rtems_termios_close (void *arg) { ffc08534: 94 21 ff f0 stwu r1,-16(r1) ffc08538: 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); ffc0853c: 3d 20 00 00 lis r9,0 } } rtems_status_code rtems_termios_close (void *arg) { ffc08540: 90 01 00 14 stw r0,20(r1) rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc08544: 38 80 00 00 li r4,0 ffc08548: 38 a0 00 00 li r5,0 } } rtems_status_code rtems_termios_close (void *arg) { ffc0854c: 93 c1 00 08 stw r30,8(r1) ffc08550: 7c 7e 1b 78 mr r30,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); ffc08554: 80 69 27 78 lwz r3,10104(r9) rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc08558: 81 3e 00 00 lwz r9,0(r30) } } rtems_status_code rtems_termios_close (void *arg) { ffc0855c: 93 e1 00 0c stw r31,12(r1) rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc08560: 83 e9 00 38 lwz r31,56(r9) rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc08564: 48 00 15 05 bl ffc09a68 if (sc != RTEMS_SUCCESSFUL) ffc08568: 2f 83 00 00 cmpwi cr7,r3,0 ffc0856c: 40 9e 00 9c bne- cr7,ffc08608 <== NEVER TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { ffc08570: 81 3f 00 08 lwz r9,8(r31) ffc08574: 38 09 ff ff addi r0,r9,-1 ffc08578: 2f 80 00 00 cmpwi cr7,r0,0 ffc0857c: 90 1f 00 08 stw r0,8(r31) ffc08580: 40 9e 01 5c bne- cr7,ffc086dc if (rtems_termios_linesw[tty->t_line].l_close != NULL) { ffc08584: 80 1f 00 cc lwz r0,204(r31) ffc08588: 3d 20 00 00 lis r9,0 ffc0858c: 39 29 28 b8 addi r9,r9,10424 ffc08590: 54 00 28 34 rlwinm r0,r0,5,0,26 ffc08594: 7d 29 02 14 add r9,r9,r0 ffc08598: 80 09 00 04 lwz r0,4(r9) ffc0859c: 2f 80 00 00 cmpwi cr7,r0,0 ffc085a0: 41 9e 00 14 beq- cr7,ffc085b4 <== ALWAYS TAKEN /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); ffc085a4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc085a8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc085ac: 4e 80 04 21 bctrl <== NOT EXECUTED ffc085b0: 48 00 00 24 b ffc085d4 <== NOT EXECUTED } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc085b4: 80 7f 00 18 lwz r3,24(r31) ffc085b8: 38 80 00 00 li r4,0 ffc085bc: 38 a0 00 00 li r5,0 ffc085c0: 48 00 14 a9 bl ffc09a68 if (sc != RTEMS_SUCCESSFUL) { ffc085c4: 2f 83 00 00 cmpwi cr7,r3,0 ffc085c8: 40 9e 00 40 bne- cr7,ffc08608 <== NEVER TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); ffc085cc: 7f e3 fb 78 mr r3,r31 ffc085d0: 4b ff f6 f5 bl ffc07cc4 } if (tty->device.outputUsesInterrupts ffc085d4: 80 1f 00 b4 lwz r0,180(r31) ffc085d8: 2f 80 00 02 cmpwi cr7,r0,2 ffc085dc: 40 be 00 30 bne+ cr7,ffc0860c <== ALWAYS TAKEN == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( ffc085e0: 80 7f 00 c4 lwz r3,196(r31) <== NOT EXECUTED ffc085e4: 38 80 00 01 li r4,1 <== NOT EXECUTED ffc085e8: 48 00 0f 61 bl ffc09548 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) ffc085ec: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc085f0: 40 9e 00 18 bne- cr7,ffc08608 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( ffc085f4: 80 7f 00 c8 lwz r3,200(r31) <== NOT EXECUTED ffc085f8: 38 80 00 01 li r4,1 <== NOT EXECUTED ffc085fc: 48 00 0f 4d bl ffc09548 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) ffc08600: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc08604: 41 be 00 08 beq+ cr7,ffc0860c <== NOT EXECUTED rtems_fatal_error_occurred (sc); ffc08608: 48 00 1c 8d bl ffc0a294 <== NOT EXECUTED } if (tty->device.lastClose) ffc0860c: 80 1f 00 9c lwz r0,156(r31) ffc08610: 2f 80 00 00 cmpwi cr7,r0,0 ffc08614: 41 9e 00 18 beq- cr7,ffc0862c <== ALWAYS TAKEN (*tty->device.lastClose)(tty->major, tty->minor, arg); ffc08618: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED ffc0861c: 80 7f 00 0c lwz r3,12(r31) <== NOT EXECUTED ffc08620: 80 9f 00 10 lwz r4,16(r31) <== NOT EXECUTED ffc08624: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc08628: 4e 80 04 21 bctrl <== NOT EXECUTED if (tty->forw == NULL) { ffc0862c: 81 7f 00 00 lwz r11,0(r31) ffc08630: 81 3f 00 04 lwz r9,4(r31) ffc08634: 2f 8b 00 00 cmpwi cr7,r11,0 ffc08638: 40 be 00 1c bne+ cr7,ffc08654 rtems_termios_ttyTail = tty->back; if ( rtems_termios_ttyTail != NULL ) { ffc0863c: 2f 89 00 00 cmpwi cr7,r9,0 rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; ffc08640: 3d 40 00 00 lis r10,0 ffc08644: 91 2a 27 7c stw r9,10108(r10) if ( rtems_termios_ttyTail != NULL ) { ffc08648: 41 9e 00 10 beq- cr7,ffc08658 <== ALWAYS TAKEN rtems_termios_ttyTail->forw = NULL; ffc0864c: 91 69 00 00 stw r11,0(r9) <== NOT EXECUTED ffc08650: 48 00 00 08 b ffc08658 <== NOT EXECUTED } } else { tty->forw->back = tty->back; ffc08654: 91 2b 00 04 stw r9,4(r11) } if (tty->back == NULL) { ffc08658: 81 7f 00 04 lwz r11,4(r31) ffc0865c: 81 3f 00 00 lwz r9,0(r31) ffc08660: 2f 8b 00 00 cmpwi cr7,r11,0 ffc08664: 40 be 00 1c bne+ cr7,ffc08680 <== NEVER TAKEN rtems_termios_ttyHead = tty->forw; if ( rtems_termios_ttyHead != NULL ) { ffc08668: 2f 89 00 00 cmpwi cr7,r9,0 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; ffc0866c: 3d 40 00 00 lis r10,0 ffc08670: 91 2a 27 80 stw r9,10112(r10) if ( rtems_termios_ttyHead != NULL ) { ffc08674: 41 9e 00 10 beq- cr7,ffc08684 rtems_termios_ttyHead->back = NULL; ffc08678: 91 69 00 04 stw r11,4(r9) ffc0867c: 48 00 00 08 b ffc08684 } } else { tty->back->forw = tty->forw; ffc08680: 91 2b 00 00 stw r9,0(r11) <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); ffc08684: 80 7f 00 14 lwz r3,20(r31) ffc08688: 48 00 13 15 bl ffc0999c rtems_semaphore_delete (tty->osem); ffc0868c: 80 7f 00 18 lwz r3,24(r31) ffc08690: 48 00 13 0d bl ffc0999c rtems_semaphore_delete (tty->rawOutBuf.Semaphore); ffc08694: 80 7f 00 8c lwz r3,140(r31) ffc08698: 48 00 13 05 bl ffc0999c if ((tty->device.pollRead == NULL) || ffc0869c: 80 1f 00 a0 lwz r0,160(r31) ffc086a0: 2f 80 00 00 cmpwi cr7,r0,0 ffc086a4: 41 9e 00 10 beq- cr7,ffc086b4 <== NEVER TAKEN (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) ffc086a8: 80 1f 00 b4 lwz r0,180(r31) ffc086ac: 2f 80 00 02 cmpwi cr7,r0,2 ffc086b0: 40 be 00 0c bne+ cr7,ffc086bc <== ALWAYS TAKEN rtems_semaphore_delete (tty->rawInBuf.Semaphore); ffc086b4: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED ffc086b8: 48 00 12 e5 bl ffc0999c <== NOT EXECUTED free (tty->rawInBuf.theBuf); ffc086bc: 80 7f 00 58 lwz r3,88(r31) ffc086c0: 4b ff d3 f5 bl ffc05ab4 free (tty->rawOutBuf.theBuf); ffc086c4: 80 7f 00 7c lwz r3,124(r31) ffc086c8: 4b ff d3 ed bl ffc05ab4 free (tty->cbuf); ffc086cc: 80 7f 00 1c lwz r3,28(r31) ffc086d0: 4b ff d3 e5 bl ffc05ab4 free (tty); ffc086d4: 7f e3 fb 78 mr r3,r31 ffc086d8: 4b ff d3 dd bl ffc05ab4 } rtems_semaphore_release (rtems_termios_ttyMutex); ffc086dc: 3d 20 00 00 lis r9,0 ffc086e0: 80 69 27 78 lwz r3,10104(r9) ffc086e4: 48 00 14 c9 bl ffc09bac return RTEMS_SUCCESSFUL; } ffc086e8: 80 01 00 14 lwz r0,20(r1) ffc086ec: 38 60 00 00 li r3,0 ffc086f0: 83 c1 00 08 lwz r30,8(r1) ffc086f4: 7c 08 03 a6 mtlr r0 ffc086f8: 83 e1 00 0c lwz r31,12(r1) ffc086fc: 38 21 00 10 addi r1,r1,16 ffc08700: 4e 80 00 20 blr =============================================================================== ffc06fb8 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { ffc06fb8: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc06fbc: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED ffc06fc0: 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) { ffc06fc4: 81 63 00 b4 lwz r11,180(r3) <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; ffc06fc8: 80 03 00 90 lwz r0,144(r3) <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc06fcc: 2f 8b 00 02 cmpwi cr7,r11,2 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; ffc06fd0: 7c 00 22 14 add r0,r0,r4 <== NOT EXECUTED ffc06fd4: 90 03 00 90 stw r0,144(r3) <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc06fd8: 40 be 00 1c bne+ cr7,ffc06ff4 <== NOT EXECUTED /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, ffc06fdc: 80 63 00 c8 lwz r3,200(r3) <== NOT EXECUTED ffc06fe0: 38 80 00 02 li r4,2 <== NOT EXECUTED ffc06fe4: 48 00 25 65 bl ffc09548 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) ffc06fe8: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc06fec: 41 be 00 40 beq+ cr7,ffc0702c <== NOT EXECUTED rtems_fatal_error_occurred (sc); ffc06ff0: 48 00 32 a5 bl ffc0a294 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { ffc06ff4: 80 03 00 cc lwz r0,204(r3) <== NOT EXECUTED ffc06ff8: 2f 80 00 05 cmpwi cr7,r0,5 <== NOT EXECUTED ffc06ffc: 40 9e 00 20 bne- cr7,ffc0701c <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { ffc07000: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc07004: 80 09 29 6c lwz r0,10604(r9) <== NOT EXECUTED ffc07008: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0700c: 41 9e 00 20 beq- cr7,ffc0702c <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); ffc07010: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07014: 4e 80 04 21 bctrl <== NOT EXECUTED ffc07018: 48 00 00 14 b ffc0702c <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } ffc0701c: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc07020: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc07024: 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); ffc07028: 4b ff fd 5c b ffc06d84 <== NOT EXECUTED } } ffc0702c: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc07030: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc07034: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc07038: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0703c: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc07040 : * 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) { ffc07040: 94 21 ff d0 stwu r1,-48(r1) <== NOT EXECUTED ffc07044: 7c 08 02 a6 mflr r0 <== 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) { ffc07048: 3d 20 00 00 lis r9,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) { ffc0704c: 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) { ffc07050: 39 29 28 b8 addi r9,r9,10424 <== NOT EXECUTED ffc07054: 81 63 00 cc lwz r11,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) { ffc07058: 93 81 00 20 stw r28,32(r1) <== NOT EXECUTED rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); ffc0705c: 7d 3c 4b 78 mr r28,r9 <== 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) { ffc07060: 55 6b 28 34 rlwinm r11,r11,5,0,26 <== NOT EXECUTED ffc07064: 38 0b 00 10 addi r0,r11,16 <== 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) { ffc07068: 93 a1 00 24 stw r29,36(r1) <== NOT EXECUTED ffc0706c: 7c 9d 23 78 mr r29,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) { ffc07070: 7c 09 00 2e lwzx r0,r9,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) { ffc07074: 93 c1 00 28 stw r30,40(r1) <== 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); ffc07078: 7c be 2b 78 mr r30,r5 <== 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) { ffc0707c: 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) { ffc07080: 93 e1 00 2c stw r31,44(r1) <== NOT EXECUTED ffc07084: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED ffc07088: 92 c1 00 08 stw r22,8(r1) <== NOT EXECUTED ffc0708c: 92 e1 00 0c stw r23,12(r1) <== NOT EXECUTED ffc07090: 93 01 00 10 stw r24,16(r1) <== NOT EXECUTED ffc07094: 93 21 00 14 stw r25,20(r1) <== NOT EXECUTED ffc07098: 93 41 00 18 stw r26,24(r1) <== NOT EXECUTED ffc0709c: 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) { ffc070a0: 40 be 00 3c bne+ cr7,ffc070dc <== 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); ffc070a4: 7c bb 2b 78 mr r27,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, ffc070a8: 3a e3 00 4a addi r23,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); ffc070ac: 3b 03 00 30 addi r24,r3,48 <== NOT EXECUTED ffc070b0: 3b 20 00 00 li r25,0 <== NOT EXECUTED ffc070b4: 3b c0 00 00 li r30,0 <== NOT EXECUTED ffc070b8: 48 00 02 84 b ffc0733c <== NOT EXECUTED rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); ffc070bc: 81 3f 00 cc lwz r9,204(r31) <== NOT EXECUTED 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--) { c = *buf++; ffc070c0: 88 7d 00 00 lbz r3,0(r29) <== NOT EXECUTED ffc070c4: 3b bd 00 01 addi r29,r29,1 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); ffc070c8: 55 29 28 34 rlwinm r9,r9,5,0,26 <== NOT EXECUTED ffc070cc: 38 09 00 10 addi r0,r9,16 <== NOT EXECUTED ffc070d0: 7c 1c 00 2e lwzx r0,r28,r0 <== NOT EXECUTED ffc070d4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc070d8: 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--) { ffc070dc: 2f 9e 00 00 cmpwi cr7,r30,0 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); ffc070e0: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc070e4: 3b de ff ff addi r30,r30,-1 <== 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--) { ffc070e8: 40 9e ff d4 bne+ cr7,ffc070bc <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { ffc070ec: 80 1f 00 e4 lwz r0,228(r31) <== NOT EXECUTED ffc070f0: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc070f4: 40 9e 02 68 bne- cr7,ffc0735c <== NOT EXECUTED ffc070f8: 80 1f 00 dc lwz r0,220(r31) <== NOT EXECUTED ffc070fc: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc07100: 41 9e 02 5c beq- cr7,ffc0735c <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); ffc07104: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07108: 38 7f 00 30 addi r3,r31,48 <== NOT EXECUTED ffc0710c: 80 9f 00 e0 lwz r4,224(r31) <== NOT EXECUTED tty->tty_rcvwakeup = 1; ffc07110: 3b c0 00 00 li r30,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); ffc07114: 4e 80 04 21 bctrl <== NOT EXECUTED tty->tty_rcvwakeup = 1; ffc07118: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0711c: 90 1f 00 e4 stw r0,228(r31) <== NOT EXECUTED ffc07120: 48 00 02 40 b ffc07360 <== NOT EXECUTED while (len--) { c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { ffc07124: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; ffc07128: 8b 5d 00 00 lbz r26,0(r29) <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { ffc0712c: 70 09 02 00 andi. r9,r0,512 <== NOT EXECUTED ffc07130: 41 82 00 58 beq- ffc07188 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { ffc07134: 89 3f 00 4a lbz r9,74(r31) <== NOT EXECUTED ffc07138: 88 1f 00 49 lbz r0,73(r31) <== NOT EXECUTED ffc0713c: 7f 89 d0 00 cmpw cr7,r9,r26 <== NOT EXECUTED ffc07140: 40 be 00 30 bne+ cr7,ffc07170 <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { ffc07144: 54 00 06 3e clrlwi r0,r0,24 <== NOT EXECUTED ffc07148: 7f 80 48 00 cmpw cr7,r0,r9 <== NOT EXECUTED ffc0714c: 40 be 00 10 bne+ cr7,ffc0715c <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; ffc07150: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc07154: 68 00 00 10 xori r0,r0,16 <== NOT EXECUTED ffc07158: 48 00 00 0c b ffc07164 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; ffc0715c: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc07160: 60 00 00 10 ori r0,r0,16 <== NOT EXECUTED ffc07164: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; ffc07168: 3b 20 00 01 li r25,1 <== NOT EXECUTED ffc0716c: 48 00 00 24 b ffc07190 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { ffc07170: 54 00 06 3e clrlwi r0,r0,24 <== NOT EXECUTED ffc07174: 7f 80 d0 00 cmpw cr7,r0,r26 <== NOT EXECUTED ffc07178: 40 be 00 10 bne+ cr7,ffc07188 <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; ffc0717c: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc07180: 54 00 07 34 rlwinm r0,r0,0,28,26 <== NOT EXECUTED ffc07184: 4b ff ff e0 b ffc07164 <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { ffc07188: 2f 99 00 00 cmpwi cr7,r25,0 <== NOT EXECUTED ffc0718c: 41 be 00 64 beq+ cr7,ffc071f0 <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { ffc07190: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc07194: 54 00 06 b6 rlwinm r0,r0,0,26,27 <== NOT EXECUTED ffc07198: 2f 80 00 20 cmpwi cr7,r0,32 <== NOT EXECUTED ffc0719c: 40 be 01 98 bne+ cr7,ffc07334 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc071a0: 7f 80 00 a6 mfmsr r28 <== NOT EXECUTED ffc071a4: 7c 10 42 a6 mfsprg r0,0 <== NOT EXECUTED ffc071a8: 7f 80 00 78 andc r0,r28,r0 <== NOT EXECUTED ffc071ac: 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) { ffc071b0: 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; ffc071b4: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { ffc071b8: 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; ffc071bc: 54 00 06 f2 rlwinm r0,r0,0,27,25 <== NOT EXECUTED ffc071c0: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { ffc071c4: 41 be 00 24 beq+ cr7,ffc071e8 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); ffc071c8: 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, ffc071cc: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc071d0: 80 9f 00 7c lwz r4,124(r31) <== NOT EXECUTED ffc071d4: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED ffc071d8: 7c 84 4a 14 add r4,r4,r9 <== NOT EXECUTED ffc071dc: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc071e0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc071e4: 4e 80 04 21 bctrl <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc071e8: 7f 80 01 24 mtmsr r28 <== NOT EXECUTED ffc071ec: 48 00 01 48 b ffc07334 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; ffc071f0: 83 9f 00 60 lwz r28,96(r31) <== NOT EXECUTED ffc071f4: 81 3f 00 64 lwz r9,100(r31) <== NOT EXECUTED ffc071f8: 38 1c 00 01 addi r0,r28,1 <== NOT EXECUTED ffc071fc: 7f 80 4b 96 divwu r28,r0,r9 <== NOT EXECUTED ffc07200: 7f 9c 49 d6 mullw r28,r28,r9 <== NOT EXECUTED ffc07204: 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 ( ffc07208: 7e c0 00 a6 mfmsr r22 <== NOT EXECUTED ffc0720c: 7c 10 42 a6 mfsprg r0,0 <== NOT EXECUTED ffc07210: 7e c0 00 78 andc r0,r22,r0 <== NOT EXECUTED ffc07214: 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) ffc07218: 80 1f 00 5c lwz r0,92(r31) <== NOT EXECUTED ffc0721c: 81 7f 00 64 lwz r11,100(r31) <== NOT EXECUTED ffc07220: 81 3f 00 64 lwz r9,100(r31) <== NOT EXECUTED ffc07224: 7c 00 58 50 subf r0,r0,r11 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && ffc07228: 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) ffc0722c: 7c 00 e2 14 add r0,r0,r28 <== NOT EXECUTED ffc07230: 7d 40 4b 96 divwu r10,r0,r9 <== NOT EXECUTED ffc07234: 7d 2a 49 d6 mullw r9,r10,r9 <== NOT EXECUTED ffc07238: 7c 09 00 50 subf r0,r9,r0 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && ffc0723c: 7f 80 58 40 cmplw cr7,r0,r11 <== NOT EXECUTED ffc07240: 40 9d 00 a0 ble- cr7,ffc072e0 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { ffc07244: 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) ffc07248: 70 09 00 01 andi. r9,r0,1 <== NOT EXECUTED ffc0724c: 40 82 00 94 bne- ffc072e0 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; ffc07250: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc07254: 60 00 00 01 ori r0,r0,1 <== NOT EXECUTED ffc07258: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) ffc0725c: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc07260: 70 00 04 02 andi. r0,r0,1026 <== NOT EXECUTED ffc07264: 2f 80 04 00 cmpwi cr7,r0,1024 <== NOT EXECUTED ffc07268: 40 be 00 44 bne+ cr7,ffc072ac <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || ffc0726c: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc07270: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED ffc07274: 40 82 00 10 bne- ffc07284 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { ffc07278: 80 1f 00 94 lwz r0,148(r31) <== NOT EXECUTED ffc0727c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc07280: 40 9e 00 60 bne- cr7,ffc072e0 <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; ffc07284: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED (*tty->device.write)(tty->minor, ffc07288: 7e e4 bb 78 mr r4,r23 <== NOT EXECUTED ffc0728c: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED ffc07290: 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; ffc07294: 61 29 00 02 ori r9,r9,2 <== NOT EXECUTED (*tty->device.write)(tty->minor, ffc07298: 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; ffc0729c: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED (*tty->device.write)(tty->minor, ffc072a0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc072a4: 4e 80 04 21 bctrl <== NOT EXECUTED ffc072a8: 48 00 00 38 b ffc072e0 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) ffc072ac: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc072b0: 70 00 01 04 andi. r0,r0,260 <== NOT EXECUTED ffc072b4: 2f 80 01 00 cmpwi cr7,r0,256 <== NOT EXECUTED ffc072b8: 40 be 00 28 bne+ cr7,ffc072e0 <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { ffc072bc: 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; ffc072c0: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { ffc072c4: 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; ffc072c8: 61 29 00 04 ori r9,r9,4 <== NOT EXECUTED ffc072cc: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { ffc072d0: 41 9e 00 10 beq- cr7,ffc072e0 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); ffc072d4: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc072d8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc072dc: 4e 80 04 21 bctrl <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc072e0: 7e c0 01 24 mtmsr r22 <== NOT EXECUTED } } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { ffc072e4: 80 1f 00 5c lwz r0,92(r31) <== NOT EXECUTED ffc072e8: 7f 9c 00 00 cmpw cr7,r28,r0 <== NOT EXECUTED ffc072ec: 40 be 00 0c bne+ cr7,ffc072f8 <== NOT EXECUTED dropped++; ffc072f0: 3b de 00 01 addi r30,r30,1 <== NOT EXECUTED ffc072f4: 48 00 00 40 b ffc07334 <== NOT EXECUTED } else { tty->rawInBuf.theBuf[newTail] = c; ffc072f8: 81 3f 00 58 lwz r9,88(r31) <== NOT EXECUTED ffc072fc: 7f 49 e1 ae stbx r26,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 )) { ffc07300: 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; ffc07304: 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 )) { ffc07308: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0730c: 40 9e 00 28 bne- cr7,ffc07334 <== NOT EXECUTED ffc07310: 80 1f 00 dc lwz r0,220(r31) <== NOT EXECUTED ffc07314: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc07318: 41 9e 00 1c beq- cr7,ffc07334 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); ffc0731c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07320: 7f 03 c3 78 mr r3,r24 <== NOT EXECUTED ffc07324: 80 9f 00 e0 lwz r4,224(r31) <== NOT EXECUTED ffc07328: 4e 80 04 21 bctrl <== NOT EXECUTED tty->tty_rcvwakeup = 1; ffc0732c: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc07330: 90 1f 00 e4 stw r0,228(r31) <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; ffc07334: 3b bd 00 01 addi r29,r29,1 <== NOT EXECUTED ffc07338: 3b 7b ff ff addi r27,r27,-1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { ffc0733c: 2f 9b 00 00 cmpwi cr7,r27,0 <== NOT EXECUTED ffc07340: 40 9e fd e4 bne+ cr7,ffc07124 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; ffc07344: 80 1f 00 78 lwz r0,120(r31) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); ffc07348: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; ffc0734c: 7c 00 f2 14 add r0,r0,r30 <== NOT EXECUTED ffc07350: 90 1f 00 78 stw r0,120(r31) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); ffc07354: 48 00 28 59 bl ffc09bac <== NOT EXECUTED return dropped; ffc07358: 48 00 00 08 b ffc07360 <== NOT EXECUTED ffc0735c: 3b c0 00 00 li r30,0 <== NOT EXECUTED } ffc07360: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED ffc07364: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc07368: 82 c1 00 08 lwz r22,8(r1) <== NOT EXECUTED ffc0736c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc07370: 82 e1 00 0c lwz r23,12(r1) <== NOT EXECUTED ffc07374: 83 01 00 10 lwz r24,16(r1) <== NOT EXECUTED ffc07378: 83 21 00 14 lwz r25,20(r1) <== NOT EXECUTED ffc0737c: 83 41 00 18 lwz r26,24(r1) <== NOT EXECUTED ffc07380: 83 61 00 1c lwz r27,28(r1) <== NOT EXECUTED ffc07384: 83 81 00 20 lwz r28,32(r1) <== NOT EXECUTED ffc07388: 83 a1 00 24 lwz r29,36(r1) <== NOT EXECUTED ffc0738c: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc07390: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc07394: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc07398: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc06cec : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { ffc06cec: 7c 08 02 a6 mflr r0 ffc06cf0: 94 21 ff f8 stwu r1,-8(r1) rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { ffc06cf4: 3c e0 00 00 lis r7,0 struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { ffc06cf8: 90 01 00 0c stw r0,12(r1) rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { ffc06cfc: 80 07 27 78 lwz r0,10104(r7) ffc06d00: 38 e7 27 78 addi r7,r7,10104 ffc06d04: 2f 80 00 00 cmpwi cr7,r0,0 ffc06d08: 40 be 00 28 bne+ cr7,ffc06d30 sc = rtems_semaphore_create ( ffc06d0c: 3c 60 54 52 lis r3,21586 ffc06d10: 60 63 6d 69 ori r3,r3,28009 ffc06d14: 38 80 00 01 li r4,1 ffc06d18: 38 a0 00 54 li r5,84 ffc06d1c: 38 c0 00 00 li r6,0 ffc06d20: 48 00 2a 79 bl ffc09798 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) ffc06d24: 2f 83 00 00 cmpwi cr7,r3,0 ffc06d28: 41 be 00 08 beq+ cr7,ffc06d30 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); ffc06d2c: 48 00 35 69 bl ffc0a294 <== NOT EXECUTED } } ffc06d30: 80 01 00 0c lwz r0,12(r1) ffc06d34: 38 21 00 08 addi r1,r1,8 ffc06d38: 7c 08 03 a6 mtlr r0 ffc06d3c: 4e 80 00 20 blr =============================================================================== ffc08120 : } } rtems_status_code rtems_termios_ioctl (void *arg) { ffc08120: 94 21 ff e0 stwu r1,-32(r1) ffc08124: 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); ffc08128: 38 80 00 00 li r4,0 } } rtems_status_code rtems_termios_ioctl (void *arg) { ffc0812c: 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; ffc08130: 38 00 00 00 li r0,0 sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc08134: 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; ffc08138: 81 23 00 00 lwz r9,0(r3) } } rtems_status_code rtems_termios_ioctl (void *arg) { ffc0813c: 93 e1 00 1c stw r31,28(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; ffc08140: 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; ffc08144: 83 e9 00 38 lwz r31,56(r9) } } rtems_status_code rtems_termios_ioctl (void *arg) { ffc08148: 93 c1 00 18 stw r30,24(r1) ffc0814c: 7c 7e 1b 78 mr r30,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); ffc08150: 80 7f 00 18 lwz r3,24(r31) } } rtems_status_code rtems_termios_ioctl (void *arg) { ffc08154: 93 81 00 10 stw r28,16(r1) ffc08158: 93 a1 00 14 stw r29,20(r1) ffc0815c: 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; ffc08160: 83 9e 00 08 lwz r28,8(r30) rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc08164: 48 00 19 05 bl ffc09a68 if (sc != RTEMS_SUCCESSFUL) { ffc08168: 7c 7d 1b 79 mr. r29,r3 ffc0816c: 40 82 03 9c bne- ffc08508 <== NEVER TAKEN args->ioctl_return = sc; return sc; } switch (args->command) { ffc08170: 80 1e 00 04 lwz r0,4(r30) ffc08174: 2f 80 00 04 cmpwi cr7,r0,4 ffc08178: 41 9e 02 c8 beq- cr7,ffc08440 <== NEVER TAKEN ffc0817c: 2b 80 00 04 cmplwi cr7,r0,4 ffc08180: 41 9d 00 20 bgt- cr7,ffc081a0 <== NEVER TAKEN ffc08184: 2f 80 00 02 cmpwi cr7,r0,2 ffc08188: 41 9e 00 a0 beq- cr7,ffc08228 ffc0818c: 2b 80 00 02 cmplwi cr7,r0,2 ffc08190: 41 9d 02 90 bgt- cr7,ffc08420 ffc08194: 2f 80 00 01 cmpwi cr7,r0,1 ffc08198: 40 be 00 44 bne+ cr7,ffc081dc <== NEVER TAKEN ffc0819c: 48 00 00 78 b ffc08214 ffc081a0: 3d 20 40 04 lis r9,16388 <== NOT EXECUTED ffc081a4: 61 29 66 7f ori r9,r9,26239 <== NOT EXECUTED ffc081a8: 7f 80 48 00 cmpw cr7,r0,r9 <== NOT EXECUTED ffc081ac: 41 9e 03 24 beq- cr7,ffc084d0 <== NOT EXECUTED ffc081b0: 7f 80 48 40 cmplw cr7,r0,r9 <== NOT EXECUTED ffc081b4: 41 9d 00 10 bgt- cr7,ffc081c4 <== NOT EXECUTED ffc081b8: 2f 80 00 05 cmpwi cr7,r0,5 <== NOT EXECUTED ffc081bc: 40 be 00 20 bne+ cr7,ffc081dc <== NOT EXECUTED ffc081c0: 48 00 02 6c b ffc0842c <== NOT EXECUTED ffc081c4: 6c 09 40 04 xoris r9,r0,16388 <== NOT EXECUTED ffc081c8: 2f 89 74 1a cmpwi cr7,r9,29722 <== NOT EXECUTED ffc081cc: 41 9e 02 f8 beq- cr7,ffc084c4 <== NOT EXECUTED ffc081d0: 6c 09 80 04 xoris r9,r0,32772 <== NOT EXECUTED ffc081d4: 2f 89 74 1b cmpwi cr7,r9,29723 <== NOT EXECUTED ffc081d8: 41 9e 02 7c beq- cr7,ffc08454 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { ffc081dc: 80 1f 00 cc lwz r0,204(r31) <== NOT EXECUTED ffc081e0: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc081e4: 39 29 28 b8 addi r9,r9,10424 <== NOT EXECUTED ffc081e8: 54 00 28 34 rlwinm r0,r0,5,0,26 <== NOT EXECUTED ffc081ec: 7d 29 02 14 add r9,r9,r0 <== NOT EXECUTED ffc081f0: 80 09 00 18 lwz r0,24(r9) <== NOT EXECUTED ffc081f4: 3b a0 00 0a li r29,10 <== NOT EXECUTED ffc081f8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc081fc: 41 9e 03 04 beq- cr7,ffc08500 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); ffc08200: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc08204: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc08208: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc0820c: 4e 80 04 21 bctrl <== NOT EXECUTED ffc08210: 48 00 02 ac b ffc084bc <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; ffc08214: 80 7e 00 08 lwz r3,8(r30) ffc08218: 38 9f 00 30 addi r4,r31,48 ffc0821c: 38 a0 00 24 li r5,36 ffc08220: 48 01 0a 35 bl ffc18c54 break; ffc08224: 48 00 02 dc b ffc08500 case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; ffc08228: 80 9e 00 08 lwz r4,8(r30) ffc0822c: 38 7f 00 30 addi r3,r31,48 ffc08230: 38 a0 00 24 li r5,36 ffc08234: 48 01 0a 21 bl ffc18c54 /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && ffc08238: 80 1f 00 b8 lwz r0,184(r31) ffc0823c: 70 09 02 00 andi. r9,r0,512 ffc08240: 41 82 00 78 beq- ffc082b8 ffc08244: 80 1f 00 30 lwz r0,48(r31) ffc08248: 70 09 04 00 andi. r9,r0,1024 ffc0824c: 40 82 00 6c bne- ffc082b8 <== ALWAYS TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); ffc08250: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED ffc08254: 38 00 fd ef li r0,-529 <== NOT EXECUTED ffc08258: 7d 20 00 38 and r0,r9,r0 <== NOT EXECUTED ffc0825c: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { ffc08260: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc08264: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED ffc08268: 41 82 00 50 beq- ffc082b8 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0826c: 7f 80 00 a6 mfmsr r28 <== NOT EXECUTED ffc08270: 7c 10 42 a6 mfsprg r0,0 <== NOT EXECUTED ffc08274: 7f 80 00 78 andc r0,r28,r0 <== NOT EXECUTED ffc08278: 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) { ffc0827c: 81 3f 00 94 lwz r9,148(r31) <== 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; ffc08280: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { ffc08284: 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; ffc08288: 54 00 06 f2 rlwinm r0,r0,0,27,25 <== NOT EXECUTED ffc0828c: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { ffc08290: 41 be 00 24 beq+ cr7,ffc082b4 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); ffc08294: 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, ffc08298: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc0829c: 80 9f 00 7c lwz r4,124(r31) <== NOT EXECUTED ffc082a0: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED ffc082a4: 7c 84 4a 14 add r4,r4,r9 <== NOT EXECUTED ffc082a8: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc082ac: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc082b0: 4e 80 04 21 bctrl <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc082b4: 7f 80 01 24 mtmsr r28 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && ffc082b8: 80 1f 00 b8 lwz r0,184(r31) ffc082bc: 70 09 04 00 andi. r9,r0,1024 ffc082c0: 41 82 00 28 beq- ffc082e8 <== ALWAYS TAKEN ffc082c4: 80 1f 00 30 lwz r0,48(r31) <== NOT EXECUTED ffc082c8: 70 09 10 00 andi. r9,r0,4096 <== NOT EXECUTED ffc082cc: 40 82 00 1c bne- ffc082e8 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); ffc082d0: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc082d4: 54 00 05 a8 rlwinm r0,r0,0,22,20 <== NOT EXECUTED ffc082d8: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); ffc082dc: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc082e0: 54 00 07 fa rlwinm r0,r0,0,31,29 <== NOT EXECUTED ffc082e4: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && ffc082e8: 80 1f 00 b8 lwz r0,184(r31) ffc082ec: 70 09 01 00 andi. r9,r0,256 ffc082f0: 41 82 00 4c beq- ffc0833c <== ALWAYS TAKEN ffc082f4: 80 1f 00 38 lwz r0,56(r31) <== NOT EXECUTED ffc082f8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc082fc: 41 9c 00 40 blt- cr7,ffc0833c <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); ffc08300: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc08304: 54 00 06 2c rlwinm r0,r0,0,24,22 <== NOT EXECUTED ffc08308: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && ffc0830c: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc08310: 70 09 00 04 andi. r9,r0,4 <== NOT EXECUTED ffc08314: 41 82 00 1c beq- ffc08330 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { ffc08318: 80 1f 00 b0 lwz r0,176(r31) <== 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) && ffc0831c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc08320: 41 9e 00 10 beq- cr7,ffc08330 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); ffc08324: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc08328: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0832c: 4e 80 04 21 bctrl <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); ffc08330: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc08334: 54 00 07 b8 rlwinm r0,r0,0,30,28 <== NOT EXECUTED ffc08338: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { ffc0833c: 80 1f 00 38 lwz r0,56(r31) ffc08340: 2f 80 00 00 cmpwi cr7,r0,0 ffc08344: 40 bc 00 10 bge+ cr7,ffc08354 <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDRTS; ffc08348: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc0834c: 60 00 01 00 ori r0,r0,256 <== NOT EXECUTED ffc08350: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { ffc08354: 80 1f 00 30 lwz r0,48(r31) ffc08358: 70 09 10 00 andi. r9,r0,4096 ffc0835c: 41 82 00 10 beq- ffc0836c <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDXOF; ffc08360: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc08364: 60 00 04 00 ori r0,r0,1024 <== NOT EXECUTED ffc08368: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { ffc0836c: 80 1f 00 30 lwz r0,48(r31) ffc08370: 70 09 04 00 andi. r9,r0,1024 ffc08374: 41 82 00 10 beq- ffc08384 <== NEVER TAKEN tty->flow_ctrl |= FL_MDXON; ffc08378: 80 1f 00 b8 lwz r0,184(r31) ffc0837c: 60 00 02 00 ori r0,r0,512 ffc08380: 90 1f 00 b8 stw r0,184(r31) tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { ffc08384: 83 9f 00 3c lwz r28,60(r31) ffc08388: 73 9c 00 02 andi. r28,r28,2 ffc0838c: 41 82 00 0c beq- ffc08398 <== NEVER TAKEN tty->rawInBufSemaphoreOptions = RTEMS_WAIT; ffc08390: 38 00 00 00 li r0,0 ffc08394: 48 00 00 54 b ffc083e8 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; ffc08398: 8b 7f 00 46 lbz r27,70(r31) <== NOT EXECUTED ffc0839c: 48 00 0f e5 bl ffc09380 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * ffc083a0: 39 20 00 0a li r9,10 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { ffc083a4: 88 1f 00 46 lbz r0,70(r31) <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * ffc083a8: 7f 63 d9 d6 mullw r27,r3,r27 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { ffc083ac: 2f 80 00 00 cmpwi cr7,r0,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] * ffc083b0: 7f 7b 4b 96 divwu r27,r27,r9 <== NOT EXECUTED ffc083b4: 89 3f 00 47 lbz r9,71(r31) <== NOT EXECUTED ffc083b8: 93 7f 00 54 stw r27,84(r31) <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { ffc083bc: 41 9e 00 24 beq- cr7,ffc083e0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) ffc083c0: 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; ffc083c4: 93 9f 00 6c stw r28,108(r31) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; ffc083c8: 93 7f 00 70 stw r27,112(r31) <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) ffc083cc: 41 9e 00 0c beq- cr7,ffc083d8 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; ffc083d0: 93 9f 00 74 stw r28,116(r31) <== NOT EXECUTED ffc083d4: 48 00 00 2c b ffc08400 <== NOT EXECUTED else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; ffc083d8: 93 7f 00 74 stw r27,116(r31) <== NOT EXECUTED ffc083dc: 48 00 00 24 b ffc08400 <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { ffc083e0: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc083e4: 41 9e 00 14 beq- cr7,ffc083f8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; ffc083e8: 90 1f 00 74 stw r0,116(r31) else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; ffc083ec: 90 1f 00 6c stw r0,108(r31) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; ffc083f0: 90 1f 00 70 stw r0,112(r31) ffc083f4: 48 00 00 0c b ffc08400 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; ffc083f8: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc083fc: 90 1f 00 6c stw r0,108(r31) <== NOT EXECUTED } } } if (tty->device.setAttributes) ffc08400: 80 1f 00 a8 lwz r0,168(r31) ffc08404: 2f 80 00 00 cmpwi cr7,r0,0 ffc08408: 41 9e 00 f8 beq- cr7,ffc08500 <== NEVER TAKEN (*tty->device.setAttributes)(tty->minor, &tty->termios); ffc0840c: 80 7f 00 10 lwz r3,16(r31) ffc08410: 38 9f 00 30 addi r4,r31,48 ffc08414: 7c 09 03 a6 mtctr r0 ffc08418: 4e 80 04 21 bctrl ffc0841c: 48 00 00 e4 b ffc08500 break; case RTEMS_IO_TCDRAIN: drainOutput (tty); ffc08420: 7f e3 fb 78 mr r3,r31 ffc08424: 4b ff f8 a1 bl ffc07cc4 break; ffc08428: 48 00 00 d8 b ffc08500 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; ffc0842c: 81 3c 00 00 lwz r9,0(r28) <== NOT EXECUTED ffc08430: 81 5c 00 04 lwz r10,4(r28) <== NOT EXECUTED ffc08434: 91 3f 00 d4 stw r9,212(r31) <== NOT EXECUTED ffc08438: 91 5f 00 d8 stw r10,216(r31) <== NOT EXECUTED break; ffc0843c: 48 00 00 c4 b ffc08500 <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; ffc08440: 81 3c 00 00 lwz r9,0(r28) <== NOT EXECUTED ffc08444: 81 5c 00 04 lwz r10,4(r28) <== NOT EXECUTED ffc08448: 91 3f 00 dc stw r9,220(r31) <== NOT EXECUTED ffc0844c: 91 5f 00 e0 stw r10,224(r31) <== NOT EXECUTED break; ffc08450: 48 00 00 b0 b ffc08500 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { ffc08454: 80 1f 00 cc lwz r0,204(r31) <== NOT EXECUTED ffc08458: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0845c: 39 29 28 b8 addi r9,r9,10424 <== NOT EXECUTED ffc08460: 54 00 28 34 rlwinm r0,r0,5,0,26 <== NOT EXECUTED ffc08464: 7d 29 02 14 add r9,r9,r0 <== NOT EXECUTED ffc08468: 80 09 00 04 lwz r0,4(r9) <== NOT EXECUTED ffc0846c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc08470: 41 9e 00 14 beq- cr7,ffc08484 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); ffc08474: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc08478: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0847c: 4e 80 04 21 bctrl <== NOT EXECUTED ffc08480: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); ffc08484: 81 3e 00 08 lwz r9,8(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) { ffc08488: 3d 60 00 00 lis r11,0 <== NOT EXECUTED ffc0848c: 39 6b 28 b8 addi r11,r11,10424 <== 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); ffc08490: 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) { ffc08494: 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); ffc08498: 91 3f 00 cc stw r9,204(r31) <== 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) { ffc0849c: 7c 0b 00 2e lwzx r0,r11,r0 <== NOT EXECUTED */ 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); tty->t_sc = NULL; /* ensure that no more valid data */ ffc084a0: 39 60 00 00 li r11,0 <== NOT EXECUTED ffc084a4: 91 7f 00 d0 stw r11,208(r31) <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { ffc084a8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc084ac: 41 9e 00 54 beq- cr7,ffc08500 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); ffc084b0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc084b4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc084b8: 4e 80 04 21 bctrl <== NOT EXECUTED ffc084bc: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED ffc084c0: 48 00 00 40 b ffc08500 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; ffc084c4: 81 3e 00 08 lwz r9,8(r30) <== NOT EXECUTED ffc084c8: 80 1f 00 cc lwz r0,204(r31) <== NOT EXECUTED ffc084cc: 48 00 00 30 b ffc084fc <== NOT EXECUTED break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; ffc084d0: 81 3f 00 60 lwz r9,96(r31) <== NOT EXECUTED ffc084d4: 80 1f 00 5c lwz r0,92(r31) <== NOT EXECUTED if ( rawnc < 0 ) ffc084d8: 7c 00 48 51 subf. r0,r0,r9 <== NOT EXECUTED ffc084dc: 40 a0 00 0c bge+ ffc084e8 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; ffc084e0: 81 3f 00 64 lwz r9,100(r31) <== NOT EXECUTED ffc084e4: 7c 00 4a 14 add r0,r0,r9 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; ffc084e8: 81 5f 00 20 lwz r10,32(r31) <== NOT EXECUTED ffc084ec: 81 7f 00 24 lwz r11,36(r31) <== NOT EXECUTED ffc084f0: 81 3e 00 08 lwz r9,8(r30) <== NOT EXECUTED ffc084f4: 7d 6b 50 50 subf r11,r11,r10 <== NOT EXECUTED ffc084f8: 7c 0b 02 14 add r0,r11,r0 <== NOT EXECUTED ffc084fc: 90 09 00 00 stw r0,0(r9) <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); ffc08500: 80 7f 00 18 lwz r3,24(r31) ffc08504: 48 00 16 a9 bl ffc09bac args->ioctl_return = sc; return sc; } ffc08508: 80 01 00 24 lwz r0,36(r1) ffc0850c: 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; ffc08510: 93 be 00 0c stw r29,12(r30) return sc; } ffc08514: 7c 08 03 a6 mtlr r0 ffc08518: 83 61 00 0c lwz r27,12(r1) ffc0851c: 83 81 00 10 lwz r28,16(r1) ffc08520: 83 a1 00 14 lwz r29,20(r1) ffc08524: 83 c1 00 18 lwz r30,24(r1) ffc08528: 83 e1 00 1c lwz r31,28(r1) ffc0852c: 38 21 00 20 addi r1,r1,32 ffc08530: 4e 80 00 20 blr =============================================================================== ffc08704 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc08704: 94 21 ff d0 stwu r1,-48(r1) struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, ffc08708: 3d 20 00 00 lis r9,0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc0870c: 7c 08 02 a6 mflr r0 ffc08710: 93 61 00 1c stw r27,28(r1) ffc08714: 7c 7b 1b 78 mr r27,r3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, ffc08718: 80 69 27 78 lwz r3,10104(r9) rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc0871c: 93 21 00 14 stw r25,20(r1) ffc08720: 7c b9 2b 78 mr r25,r5 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, ffc08724: 38 a0 00 00 li r5,0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc08728: 93 41 00 18 stw r26,24(r1) ffc0872c: 7c 9a 23 78 mr r26,r4 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, ffc08730: 38 80 00 00 li r4,0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { ffc08734: 93 01 00 10 stw r24,16(r1) ffc08738: 7c d8 33 78 mr r24,r6 ffc0873c: 93 a1 00 24 stw r29,36(r1) ffc08740: 90 01 00 34 stw r0,52(r1) ffc08744: 92 e1 00 0c stw r23,12(r1) ffc08748: 93 81 00 20 stw r28,32(r1) ffc0874c: 93 c1 00 28 stw r30,40(r1) ffc08750: 93 e1 00 2c stw r31,44(r1) struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, ffc08754: 48 00 13 15 bl ffc09a68 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) ffc08758: 7c 7d 1b 79 mr. r29,r3 ffc0875c: 40 82 03 f8 bne- ffc08b54 <== NEVER TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { ffc08760: 3d 20 00 00 lis r9,0 ffc08764: 83 c9 27 80 lwz r30,10112(r9) ffc08768: 48 00 00 20 b ffc08788 if ((tty->major == major) && (tty->minor == minor)) ffc0876c: 80 1e 00 0c lwz r0,12(r30) ffc08770: 7f 80 d8 00 cmpw cr7,r0,r27 ffc08774: 40 be 00 10 bne+ cr7,ffc08784 ffc08778: 80 1e 00 10 lwz r0,16(r30) ffc0877c: 7f 80 d0 00 cmpw cr7,r0,r26 ffc08780: 41 9e 03 44 beq- cr7,ffc08ac4 <== ALWAYS TAKEN */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { ffc08784: 83 de 00 00 lwz r30,0(r30) ffc08788: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0878c: 40 9e ff e0 bne+ cr7,ffc0876c ffc08790: 48 00 03 fc b ffc08b8c return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; ffc08794: 3f 80 00 00 lis r28,0 ffc08798: 3a fc 21 48 addi r23,r28,8520 ffc0879c: 80 17 00 04 lwz r0,4(r23) ffc087a0: 90 1e 00 64 stw r0,100(r30) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); ffc087a4: 80 7e 00 64 lwz r3,100(r30) ffc087a8: 4b ff d7 01 bl ffc05ea8 if (tty->rawInBuf.theBuf == NULL) { ffc087ac: 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); ffc087b0: 90 7e 00 58 stw r3,88(r30) if (tty->rawInBuf.theBuf == NULL) { ffc087b4: 40 be 00 1c bne+ cr7,ffc087d0 <== ALWAYS TAKEN free(tty); ffc087b8: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc087bc: 4b ff d2 f9 bl ffc05ab4 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); ffc087c0: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc087c4: 80 69 27 78 lwz r3,10104(r9) <== NOT EXECUTED ffc087c8: 3b a0 00 1a li r29,26 <== NOT EXECUTED ffc087cc: 48 00 03 84 b ffc08b50 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; ffc087d0: 80 17 00 08 lwz r0,8(r23) ffc087d4: 90 1e 00 88 stw r0,136(r30) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); ffc087d8: 80 7e 00 88 lwz r3,136(r30) ffc087dc: 4b ff d6 cd bl ffc05ea8 if (tty->rawOutBuf.theBuf == NULL) { ffc087e0: 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); ffc087e4: 90 7e 00 7c stw r3,124(r30) if (tty->rawOutBuf.theBuf == NULL) { ffc087e8: 40 be 00 10 bne+ cr7,ffc087f8 <== ALWAYS TAKEN free((void *)(tty->rawInBuf.theBuf)); ffc087ec: 80 7e 00 58 lwz r3,88(r30) <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); ffc087f0: 3b a0 00 1a li r29,26 <== NOT EXECUTED ffc087f4: 48 00 00 28 b ffc0881c <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); ffc087f8: 80 7c 21 48 lwz r3,8520(r28) ffc087fc: 4b ff d6 ad bl ffc05ea8 if (tty->cbuf == NULL) { ffc08800: 2f 83 00 00 cmpwi cr7,r3,0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); ffc08804: 90 7e 00 1c stw r3,28(r30) if (tty->cbuf == NULL) { ffc08808: 40 be 00 24 bne+ cr7,ffc0882c <== ALWAYS TAKEN free((void *)(tty->rawOutBuf.theBuf)); ffc0880c: 80 7e 00 7c lwz r3,124(r30) <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); ffc08810: 3b a0 00 1a li r29,26 <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); ffc08814: 4b ff d2 a1 bl ffc05ab4 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); ffc08818: 80 7e 00 58 lwz r3,88(r30) <== NOT EXECUTED ffc0881c: 4b ff d2 99 bl ffc05ab4 <== NOT EXECUTED free(tty); ffc08820: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc08824: 4b ff d2 91 bl ffc05ab4 <== NOT EXECUTED ffc08828: 48 00 03 20 b ffc08b48 <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; ffc0882c: 3d 20 00 00 lis r9,0 ffc08830: 81 29 27 80 lwz r9,10112(r9) return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; ffc08834: 38 00 00 00 li r0,0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; ffc08838: 90 1e 00 04 stw r0,4(r30) if (rtems_termios_ttyHead != NULL) ffc0883c: 2f 89 00 00 cmpwi cr7,r9,0 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; ffc08840: 90 1e 00 d4 stw r0,212(r30) tty->tty_snd.sw_arg = NULL; ffc08844: 90 1e 00 d8 stw r0,216(r30) tty->tty_rcv.sw_pfn = NULL; ffc08848: 90 1e 00 dc stw r0,220(r30) tty->tty_rcv.sw_arg = NULL; ffc0884c: 90 1e 00 e0 stw r0,224(r30) tty->tty_rcvwakeup = 0; ffc08850: 90 1e 00 e4 stw r0,228(r30) /* * link tty */ tty->forw = rtems_termios_ttyHead; ffc08854: 91 3e 00 00 stw r9,0(r30) tty->back = NULL; if (rtems_termios_ttyHead != NULL) ffc08858: 41 9e 00 08 beq- cr7,ffc08860 rtems_termios_ttyHead->back = tty; ffc0885c: 93 c9 00 04 stw r30,4(r9) rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) ffc08860: 3d 20 00 00 lis r9,0 ffc08864: 80 09 27 7c lwz r0,10108(r9) */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; ffc08868: 3d 60 00 00 lis r11,0 ffc0886c: 93 eb 27 80 stw r31,10112(r11) if (rtems_termios_ttyTail == NULL) ffc08870: 2f 80 00 00 cmpwi cr7,r0,0 ffc08874: 40 be 00 08 bne+ cr7,ffc0887c rtems_termios_ttyTail = tty; ffc08878: 93 e9 27 7c stw r31,10108(r9) tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( ffc0887c: 3f 80 00 00 lis r28,0 ffc08880: 3b 9c 21 48 addi r28,r28,8520 ffc08884: 88 7c 00 0c lbz r3,12(r28) ffc08888: 38 80 00 01 li r4,1 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; ffc0888c: 93 5f 00 10 stw r26,16(r31) tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( ffc08890: 38 a0 00 54 li r5,84 ffc08894: 64 63 54 52 oris r3,r3,21586 rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; tty->major = major; ffc08898: 93 7f 00 0c stw r27,12(r31) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( ffc0889c: 60 63 69 00 ori r3,r3,26880 ffc088a0: 38 c0 00 00 li r6,0 ffc088a4: 38 ff 00 14 addi r7,r31,20 ffc088a8: 48 00 0e f1 bl ffc09798 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) ffc088ac: 2f 83 00 00 cmpwi cr7,r3,0 ffc088b0: 40 9e 02 94 bne- cr7,ffc08b44 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( ffc088b4: 88 7c 00 0c lbz r3,12(r28) ffc088b8: 38 80 00 01 li r4,1 ffc088bc: 38 a0 00 54 li r5,84 ffc088c0: 64 63 54 52 oris r3,r3,21586 ffc088c4: 60 63 6f 00 ori r3,r3,28416 ffc088c8: 38 c0 00 00 li r6,0 ffc088cc: 38 ff 00 18 addi r7,r31,24 ffc088d0: 48 00 0e c9 bl ffc09798 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) ffc088d4: 2f 83 00 00 cmpwi cr7,r3,0 ffc088d8: 40 9e 02 6c bne- cr7,ffc08b44 <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( ffc088dc: 88 7c 00 0c lbz r3,12(r28) ffc088e0: 38 80 00 00 li r4,0 ffc088e4: 38 a0 00 20 li r5,32 ffc088e8: 64 63 54 52 oris r3,r3,21586 ffc088ec: 60 63 78 00 ori r3,r3,30720 ffc088f0: 38 c0 00 00 li r6,0 ffc088f4: 38 ff 00 8c addi r7,r31,140 ffc088f8: 48 00 0e a1 bl ffc09798 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) ffc088fc: 7c 60 1b 79 mr. r0,r3 ffc08900: 40 82 02 44 bne- ffc08b44 <== NEVER TAKEN tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; ffc08904: 81 18 00 00 lwz r8,0(r24) ffc08908: 81 58 00 04 lwz r10,4(r24) ffc0890c: 81 78 00 08 lwz r11,8(r24) ffc08910: 81 38 00 0c lwz r9,12(r24) ffc08914: 91 1f 00 98 stw r8,152(r31) ffc08918: 91 5f 00 9c stw r10,156(r31) ffc0891c: 91 7f 00 a0 stw r11,160(r31) ffc08920: 91 3f 00 a4 stw r9,164(r31) ffc08924: 81 38 00 1c lwz r9,28(r24) ffc08928: 81 18 00 10 lwz r8,16(r24) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc0892c: 2f 89 00 02 cmpwi cr7,r9,2 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; ffc08930: 81 58 00 14 lwz r10,20(r24) ffc08934: 81 78 00 18 lwz r11,24(r24) 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; ffc08938: 90 1f 00 94 stw r0,148(r31) /* * Set callbacks */ tty->device = *callbacks; ffc0893c: 91 1f 00 a8 stw r8,168(r31) ffc08940: 91 5f 00 ac stw r10,172(r31) ffc08944: 91 7f 00 b0 stw r11,176(r31) ffc08948: 91 3f 00 b4 stw r9,180(r31) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc0894c: 40 be 00 5c bne+ cr7,ffc089a8 <== ALWAYS TAKEN sc = rtems_task_create ( ffc08950: 88 7c 00 0c lbz r3,12(r28) <== NOT EXECUTED ffc08954: 38 80 00 0a li r4,10 <== NOT EXECUTED ffc08958: 38 a0 04 00 li r5,1024 <== NOT EXECUTED ffc0895c: 64 63 54 78 oris r3,r3,21624 <== NOT EXECUTED ffc08960: 60 63 54 00 ori r3,r3,21504 <== NOT EXECUTED ffc08964: 38 c0 05 00 li r6,1280 <== NOT EXECUTED ffc08968: 38 e0 00 00 li r7,0 <== NOT EXECUTED ffc0896c: 39 1f 00 c8 addi r8,r31,200 <== NOT EXECUTED ffc08970: 48 00 13 05 bl ffc09c74 <== 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) ffc08974: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc08978: 40 9e 01 cc bne- cr7,ffc08b44 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( ffc0897c: 88 7c 00 0c lbz r3,12(r28) <== NOT EXECUTED ffc08980: 38 80 00 09 li r4,9 <== NOT EXECUTED ffc08984: 38 a0 04 00 li r5,1024 <== NOT EXECUTED ffc08988: 64 63 52 78 oris r3,r3,21112 <== NOT EXECUTED ffc0898c: 60 63 54 00 ori r3,r3,21504 <== NOT EXECUTED ffc08990: 38 c0 05 00 li r6,1280 <== NOT EXECUTED ffc08994: 38 e0 00 00 li r7,0 <== NOT EXECUTED ffc08998: 39 1f 00 c4 addi r8,r31,196 <== NOT EXECUTED ffc0899c: 48 00 12 d9 bl ffc09c74 <== 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) ffc089a0: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc089a4: 40 9e 01 a0 bne- cr7,ffc08b44 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || ffc089a8: 80 1f 00 a0 lwz r0,160(r31) ffc089ac: 2f 80 00 00 cmpwi cr7,r0,0 ffc089b0: 41 9e 00 10 beq- cr7,ffc089c0 <== NEVER TAKEN (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ ffc089b4: 80 1f 00 b4 lwz r0,180(r31) ffc089b8: 2f 80 00 02 cmpwi cr7,r0,2 ffc089bc: 40 be 00 30 bne+ cr7,ffc089ec <== ALWAYS TAKEN sc = rtems_semaphore_create ( ffc089c0: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc089c4: 88 69 21 54 lbz r3,8532(r9) <== NOT EXECUTED ffc089c8: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc089cc: 38 a0 00 24 li r5,36 <== NOT EXECUTED ffc089d0: 64 63 54 52 oris r3,r3,21586 <== NOT EXECUTED ffc089d4: 60 63 72 00 ori r3,r3,29184 <== NOT EXECUTED ffc089d8: 38 c0 00 00 li r6,0 <== NOT EXECUTED ffc089dc: 38 ff 00 68 addi r7,r31,104 <== NOT EXECUTED ffc089e0: 48 00 0d b9 bl ffc09798 <== 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) ffc089e4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc089e8: 40 9e 01 5c bne- cr7,ffc08b44 <== NOT EXECUTED tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; ffc089ec: 39 60 00 7f li r11,127 ffc089f0: 99 7f 00 43 stb r11,67(r31) tty->termios.c_cc[VKILL] = '\025'; ffc089f4: 39 60 00 15 li r11,21 tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; ffc089f8: 38 00 00 00 li r0,0 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; ffc089fc: 99 7f 00 44 stb r11,68(r31) tty->termios.c_cc[VEOF] = '\004'; ffc08a00: 39 60 00 04 li r11,4 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; tty->termios.c_cc[VINTR] = '\003'; ffc08a04: 39 20 00 03 li r9,3 tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; ffc08a08: 99 7f 00 45 stb r11,69(r31) tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; ffc08a0c: 39 60 00 11 li r11,17 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; ffc08a10: 39 00 25 02 li r8,9474 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'; tty->termios.c_cc[VSTART] = '\021'; ffc08a14: 99 7f 00 49 stb r11,73(r31) tty->termios.c_cc[VSTOP] = '\023'; ffc08a18: 39 60 00 13 li r11,19 ffc08a1c: 99 7f 00 4a stb r11,74(r31) tty->termios.c_cc[VSUSP] = '\032'; ffc08a20: 39 60 00 1a li r11,26 ffc08a24: 99 7f 00 4b stb r11,75(r31) tty->termios.c_cc[VREPRINT] = '\022'; ffc08a28: 39 60 00 12 li r11,18 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'; ffc08a2c: 98 1f 00 51 stb r0,81(r31) tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; ffc08a30: 99 7f 00 4d stb r11,77(r31) tty->termios.c_cc[VDISCARD] = '\017'; ffc08a34: 39 60 00 0f li r11,15 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'; ffc08a38: 98 1f 00 4c stb r0,76(r31) 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; ffc08a3c: 38 00 00 00 li r0,0 ffc08a40: 90 1f 00 b8 stw r0,184(r31) tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; ffc08a44: 99 7f 00 4e stb r11,78(r31) tty->termios.c_cc[VWERASE] = '\027'; ffc08a48: 39 60 00 17 li r11,23 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; tty->termios.c_cc[VINTR] = '\003'; ffc08a4c: 99 3f 00 41 stb r9,65(r31) tty->termios.c_cc[VQUIT] = '\034'; ffc08a50: 39 20 00 1c li r9,28 tty->termios.c_cc[VSTART] = '\021'; 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'; ffc08a54: 99 7f 00 4f stb r11,79(r31) tty->termios.c_cc[VLNEXT] = '\026'; ffc08a58: 39 60 00 16 li r11,22 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; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; ffc08a5c: 99 3f 00 42 stb r9,66(r31) tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') ffc08a60: 3d 20 00 00 lis r9,0 ffc08a64: 39 29 21 48 addi r9,r9,8520 /* 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; ffc08a68: 80 1f 00 64 lwz r0,100(r31) 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'; ffc08a6c: 99 7f 00 50 stb r11,80(r31) /* 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; ffc08a70: 54 00 f8 7e rlwinm r0,r0,31,1,31 tty->highwater = tty->rawInBuf.Size * 3/4; ffc08a74: 81 5f 00 64 lwz r10,100(r31) /* * Bump name characer */ if (c++ == 'z') ffc08a78: 89 69 00 0c lbz r11,12(r9) 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; ffc08a7c: 1d 4a 00 03 mulli r10,r10,3 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; ffc08a80: 91 1f 00 30 stw r8,48(r31) 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; ffc08a84: 55 4a f0 be rlwinm r10,r10,30,2,31 /* 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; ffc08a88: 90 1f 00 bc stw r0,188(r31) tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') ffc08a8c: 2f 8b 00 7a cmpwi cr7,r11,122 tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; ffc08a90: 91 5f 00 c0 stw r10,192(r31) /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; ffc08a94: 39 40 18 05 li r10,6149 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') ffc08a98: 39 6b 00 01 addi r11,r11,1 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; ffc08a9c: 91 5f 00 34 stw r10,52(r31) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; ffc08aa0: 39 40 08 bd li r10,2237 ffc08aa4: 91 5f 00 38 stw r10,56(r31) tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; ffc08aa8: 39 40 00 00 li r10,0 ffc08aac: 61 4a 82 3b ori r10,r10,33339 ffc08ab0: 91 5f 00 3c stw r10,60(r31) tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') ffc08ab4: 99 69 00 0c stb r11,12(r9) ffc08ab8: 40 be 00 0c bne+ cr7,ffc08ac4 <== ALWAYS TAKEN c = 'a'; ffc08abc: 38 00 00 61 li r0,97 <== NOT EXECUTED ffc08ac0: 98 09 00 0c stb r0,12(r9) <== NOT EXECUTED } args->iop->data1 = tty; if (!tty->refcount++) { ffc08ac4: 81 3e 00 08 lwz r9,8(r30) */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; ffc08ac8: 81 79 00 00 lwz r11,0(r25) if (!tty->refcount++) { ffc08acc: 2f 89 00 00 cmpwi cr7,r9,0 ffc08ad0: 39 29 00 01 addi r9,r9,1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; ffc08ad4: 93 cb 00 38 stw r30,56(r11) if (!tty->refcount++) { ffc08ad8: 91 3e 00 08 stw r9,8(r30) ffc08adc: 40 9e 00 6c bne- cr7,ffc08b48 if (tty->device.firstOpen) ffc08ae0: 80 1e 00 98 lwz r0,152(r30) ffc08ae4: 2f 80 00 00 cmpwi cr7,r0,0 ffc08ae8: 41 9e 00 18 beq- cr7,ffc08b00 <== ALWAYS TAKEN (*tty->device.firstOpen)(major, minor, arg); ffc08aec: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED ffc08af0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc08af4: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED ffc08af8: 7f 25 cb 78 mr r5,r25 <== NOT EXECUTED ffc08afc: 4e 80 04 21 bctrl <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { ffc08b00: 80 1e 00 b4 lwz r0,180(r30) ffc08b04: 2f 80 00 02 cmpwi cr7,r0,2 ffc08b08: 40 be 00 40 bne+ cr7,ffc08b48 <== ALWAYS TAKEN sc = rtems_task_start(tty->rxTaskId, ffc08b0c: 80 7e 00 c4 lwz r3,196(r30) <== NOT EXECUTED ffc08b10: 3c 80 ff c1 lis r4,-63 <== NOT EXECUTED ffc08b14: 38 84 8c 38 addi r4,r4,-29640 <== NOT EXECUTED ffc08b18: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED ffc08b1c: 48 00 14 91 bl ffc09fac <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) ffc08b20: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc08b24: 40 9e 00 20 bne- cr7,ffc08b44 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, ffc08b28: 80 7e 00 c8 lwz r3,200(r30) <== NOT EXECUTED ffc08b2c: 3c 80 ff c1 lis r4,-63 <== NOT EXECUTED ffc08b30: 38 84 8b ac addi r4,r4,-29780 <== NOT EXECUTED ffc08b34: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED ffc08b38: 48 00 14 75 bl ffc09fac <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) ffc08b3c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc08b40: 41 be 00 08 beq+ cr7,ffc08b48 <== NOT EXECUTED rtems_fatal_error_occurred (sc); ffc08b44: 48 00 17 51 bl ffc0a294 <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); ffc08b48: 3d 20 00 00 lis r9,0 ffc08b4c: 80 69 27 78 lwz r3,10104(r9) ffc08b50: 48 00 10 5d bl ffc09bac return RTEMS_SUCCESSFUL; } ffc08b54: 80 01 00 34 lwz r0,52(r1) ffc08b58: 7f a3 eb 78 mr r3,r29 ffc08b5c: 82 e1 00 0c lwz r23,12(r1) ffc08b60: 7c 08 03 a6 mtlr r0 ffc08b64: 83 01 00 10 lwz r24,16(r1) ffc08b68: 83 21 00 14 lwz r25,20(r1) ffc08b6c: 83 41 00 18 lwz r26,24(r1) ffc08b70: 83 61 00 1c lwz r27,28(r1) ffc08b74: 83 81 00 20 lwz r28,32(r1) ffc08b78: 83 a1 00 24 lwz r29,36(r1) ffc08b7c: 83 c1 00 28 lwz r30,40(r1) ffc08b80: 83 e1 00 2c lwz r31,44(r1) ffc08b84: 38 21 00 30 addi r1,r1,48 ffc08b88: 4e 80 00 20 blr static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); ffc08b8c: 38 60 00 01 li r3,1 ffc08b90: 38 80 00 e8 li r4,232 ffc08b94: 4b ff cc 11 bl ffc057a4 if (tty == NULL) { ffc08b98: 2f 83 00 00 cmpwi cr7,r3,0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); ffc08b9c: 7c 7e 1b 78 mr r30,r3 ffc08ba0: 7c 7f 1b 78 mr r31,r3 if (tty == NULL) { ffc08ba4: 40 9e fb f0 bne+ cr7,ffc08794 <== ALWAYS TAKEN ffc08ba8: 4b ff fc 18 b ffc087c0 <== NOT EXECUTED =============================================================================== ffc0739c : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { ffc0739c: 94 21 ff d8 stwu r1,-40(r1) ffc073a0: 7c 08 02 a6 mflr r0 ffc073a4: 90 01 00 2c stw r0,44(r1) ffc073a8: 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) { ffc073ac: 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) { ffc073b0: 93 81 00 18 stw r28,24(r1) const unsigned char *buf = _buf; ffc073b4: 7c 7c 1b 78 mr r28,r3 unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { ffc073b8: 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) { ffc073bc: 93 a1 00 1c stw r29,28(r1) ffc073c0: 7c 9d 23 78 mr r29,r4 ffc073c4: 93 e1 00 24 stw r31,36(r1) ffc073c8: 7c bf 2b 78 mr r31,r5 ffc073cc: 93 21 00 0c stw r25,12(r1) ffc073d0: 93 41 00 10 stw r26,16(r1) ffc073d4: 93 61 00 14 stw r27,20(r1) ffc073d8: 93 c1 00 20 stw r30,32(r1) const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { ffc073dc: 40 be 00 20 bne+ cr7,ffc073fc <== NEVER TAKEN (*tty->device.write)(tty->minor, (void *)buf, len); ffc073e0: 7c 04 03 78 mr r4,r0 ffc073e4: 80 1f 00 a4 lwz r0,164(r31) ffc073e8: 80 65 00 10 lwz r3,16(r5) ffc073ec: 7f a5 eb 78 mr r5,r29 ffc073f0: 7c 09 03 a6 mtctr r0 ffc073f4: 4e 80 04 21 bctrl return; ffc073f8: 48 00 00 f0 b ffc074e8 } newHead = tty->rawOutBuf.Head; ffc073fc: 83 c5 00 80 lwz r30,128(r5) <== NOT EXECUTED * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; ffc07400: 3b 20 00 02 li r25,2 <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; ffc07404: 3b 40 00 01 li r26,1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { ffc07408: 48 00 00 d8 b ffc074e0 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; ffc0740c: 80 1f 00 88 lwz r0,136(r31) <== NOT EXECUTED ffc07410: 3b de 00 01 addi r30,r30,1 <== NOT EXECUTED ffc07414: 7d 3e 03 96 divwu r9,r30,r0 <== NOT EXECUTED ffc07418: 7c 09 01 d6 mullw r0,r9,r0 <== NOT EXECUTED ffc0741c: 7f c0 f0 50 subf r30,r0,r30 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc07420: 7f 60 00 a6 mfmsr r27 <== NOT EXECUTED ffc07424: 7c 10 42 a6 mfsprg r0,0 <== NOT EXECUTED ffc07428: 7f 60 00 78 andc r0,r27,r0 <== NOT EXECUTED ffc0742c: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { ffc07430: 48 00 00 38 b ffc07468 <== NOT EXECUTED tty->rawOutBufState = rob_wait; ffc07434: 93 3f 00 94 stw r25,148(r31) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc07438: 7f 60 01 24 mtmsr r27 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, ffc0743c: 80 7f 00 8c lwz r3,140(r31) <== NOT EXECUTED ffc07440: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc07444: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc07448: 48 00 26 21 bl ffc09a68 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) ffc0744c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc07450: 41 be 00 08 beq+ cr7,ffc07458 <== NOT EXECUTED rtems_fatal_error_occurred (sc); ffc07454: 48 00 2e 41 bl ffc0a294 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc07458: 7f 60 00 a6 mfmsr r27 <== NOT EXECUTED ffc0745c: 7c 10 42 a6 mfsprg r0,0 <== NOT EXECUTED ffc07460: 7f 60 00 78 andc r0,r27,r0 <== NOT EXECUTED ffc07464: 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) { ffc07468: 80 1f 00 84 lwz r0,132(r31) <== NOT EXECUTED ffc0746c: 7f 9e 00 00 cmpw cr7,r30,r0 <== NOT EXECUTED ffc07470: 41 9e ff c4 beq+ cr7,ffc07434 <== 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++; ffc07474: 80 1f 00 80 lwz r0,128(r31) <== NOT EXECUTED ffc07478: 89 7c 00 00 lbz r11,0(r28) <== NOT EXECUTED ffc0747c: 81 3f 00 7c lwz r9,124(r31) <== NOT EXECUTED ffc07480: 7d 69 01 ae stbx r11,r9,r0 <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { ffc07484: 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; ffc07488: 93 df 00 80 stw r30,128(r31) <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { ffc0748c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc07490: 40 9e 00 44 bne- cr7,ffc074d4 <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { ffc07494: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc07498: 70 09 00 10 andi. r9,r0,16 <== NOT EXECUTED ffc0749c: 40 a2 00 28 bne+ ffc074c4 <== NOT EXECUTED (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); ffc074a0: 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, ffc074a4: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc074a8: 80 9f 00 7c lwz r4,124(r31) <== NOT EXECUTED ffc074ac: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED ffc074b0: 7c 84 4a 14 add r4,r4,r9 <== NOT EXECUTED ffc074b4: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc074b8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc074bc: 4e 80 04 21 bctrl <== NOT EXECUTED ffc074c0: 48 00 00 10 b ffc074d0 <== NOT EXECUTED (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; ffc074c4: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc074c8: 60 00 00 20 ori r0,r0,32 <== NOT EXECUTED ffc074cc: 90 1f 00 b8 stw r0,184(r31) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; ffc074d0: 93 5f 00 94 stw r26,148(r31) <== 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++; ffc074d4: 3b 9c 00 01 addi r28,r28,1 <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc074d8: 7f 60 01 24 mtmsr r27 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; ffc074dc: 3b bd ff ff addi r29,r29,-1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { ffc074e0: 2f 9d 00 00 cmpwi cr7,r29,0 <== NOT EXECUTED ffc074e4: 40 9e ff 28 bne+ cr7,ffc0740c <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } ffc074e8: 80 01 00 2c lwz r0,44(r1) ffc074ec: 83 21 00 0c lwz r25,12(r1) ffc074f0: 7c 08 03 a6 mtlr r0 ffc074f4: 83 41 00 10 lwz r26,16(r1) ffc074f8: 83 61 00 14 lwz r27,20(r1) ffc074fc: 83 81 00 18 lwz r28,24(r1) ffc07500: 83 a1 00 1c lwz r29,28(r1) ffc07504: 83 c1 00 20 lwz r30,32(r1) ffc07508: 83 e1 00 24 lwz r31,36(r1) ffc0750c: 38 21 00 28 addi r1,r1,40 ffc07510: 4e 80 00 20 blr =============================================================================== ffc07d60 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc07d60: 94 21 ff d0 stwu r1,-48(r1) <== NOT EXECUTED ffc07d64: 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); ffc07d68: 38 80 00 00 li r4,0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc07d6c: 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); ffc07d70: 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; ffc07d74: 81 23 00 00 lwz r9,0(r3) <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc07d78: 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; ffc07d7c: 83 e9 00 38 lwz r31,56(r9) <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc07d80: 93 c1 00 28 stw r30,40(r1) <== NOT EXECUTED ffc07d84: 7c 7e 1b 78 mr r30,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); ffc07d88: 80 7f 00 14 lwz r3,20(r31) <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { ffc07d8c: 93 61 00 1c stw r27,28(r1) <== NOT EXECUTED ffc07d90: 93 81 00 20 stw r28,32(r1) <== NOT EXECUTED ffc07d94: 93 a1 00 24 stw r29,36(r1) <== NOT EXECUTED ffc07d98: 92 e1 00 0c stw r23,12(r1) <== NOT EXECUTED ffc07d9c: 93 01 00 10 stw r24,16(r1) <== NOT EXECUTED ffc07da0: 93 21 00 14 stw r25,20(r1) <== NOT EXECUTED ffc07da4: 93 41 00 18 stw r26,24(r1) <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; ffc07da8: 83 9e 00 14 lwz r28,20(r30) <== NOT EXECUTED char *buffer = args->buffer; ffc07dac: 83 7e 00 10 lwz r27,16(r30) <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc07db0: 48 00 1c b9 bl ffc09a68 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) ffc07db4: 7c 7d 1b 79 mr. r29,r3 <== NOT EXECUTED ffc07db8: 40 82 03 30 bne- ffc080e8 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { ffc07dbc: 80 1f 00 cc lwz r0,204(r31) <== NOT EXECUTED ffc07dc0: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc07dc4: 39 29 28 b8 addi r9,r9,10424 <== NOT EXECUTED ffc07dc8: 54 00 28 34 rlwinm r0,r0,5,0,26 <== NOT EXECUTED ffc07dcc: 7d 29 02 14 add r9,r9,r0 <== NOT EXECUTED ffc07dd0: 80 09 00 08 lwz r0,8(r9) <== NOT EXECUTED ffc07dd4: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc07dd8: 41 9e 00 1c beq- cr7,ffc07df4 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); ffc07ddc: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc07de0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07de4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc07de8: 4e 80 04 21 bctrl <== NOT EXECUTED ffc07dec: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED ffc07df0: 48 00 02 e8 b ffc080d8 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { ffc07df4: 81 3f 00 24 lwz r9,36(r31) <== NOT EXECUTED ffc07df8: 80 1f 00 20 lwz r0,32(r31) <== NOT EXECUTED ffc07dfc: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc07e00: 40 be 02 ac bne+ cr7,ffc080ac <== NOT EXECUTED tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL ffc07e04: 81 3f 00 a0 lwz r9,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; ffc07e08: 80 1f 00 28 lwz r0,40(r31) <== NOT EXECUTED if (tty->device.pollRead != NULL ffc07e0c: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; ffc07e10: 93 bf 00 20 stw r29,32(r31) <== NOT EXECUTED tty->read_start_column = tty->column; ffc07e14: 90 1f 00 2c stw r0,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; ffc07e18: 93 bf 00 24 stw r29,36(r31) <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL ffc07e1c: 41 9e 00 fc beq- cr7,ffc07f18 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) ffc07e20: 80 1f 00 b4 lwz r0,180(r31) <== NOT EXECUTED ffc07e24: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc07e28: 40 be 00 f0 bne+ cr7,ffc07f18 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { ffc07e2c: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED ffc07e30: 70 09 00 02 andi. r9,r0,2 <== NOT EXECUTED ffc07e34: 41 82 00 40 beq- ffc07e74 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); ffc07e38: 80 1f 00 a0 lwz r0,160(r31) <== NOT EXECUTED ffc07e3c: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc07e40: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07e44: 4e 80 04 21 bctrl <== NOT EXECUTED if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) ffc07e48: 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) { ffc07e4c: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) ffc07e50: 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) { ffc07e54: 40 a0 00 10 bge+ ffc07e64 <== NOT EXECUTED rtems_task_wake_after (1); ffc07e58: 38 60 00 01 li r3,1 <== NOT EXECUTED ffc07e5c: 48 00 22 35 bl ffc0a090 <== NOT EXECUTED ffc07e60: 4b ff ff d8 b ffc07e38 <== NOT EXECUTED } else { if (siproc (n, tty)) ffc07e64: 4b ff fc e1 bl ffc07b44 <== NOT EXECUTED ffc07e68: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc07e6c: 41 9e ff cc beq+ cr7,ffc07e38 <== NOT EXECUTED ffc07e70: 48 00 02 3c b ffc080ac <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); ffc07e74: 48 00 15 25 bl ffc09398 <== NOT EXECUTED ffc07e78: 7c 7a 1b 78 mr r26,r3 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); ffc07e7c: 80 1f 00 a0 lwz r0,160(r31) <== NOT EXECUTED ffc07e80: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc07e84: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07e88: 4e 80 04 21 bctrl <== NOT EXECUTED if (n < 0) { ffc07e8c: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED ffc07e90: 40 80 00 54 bge- ffc07ee4 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { ffc07e94: 89 3f 00 47 lbz r9,71(r31) <== NOT EXECUTED ffc07e98: 88 1f 00 46 lbz r0,70(r31) <== NOT EXECUTED ffc07e9c: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc07ea0: 41 9e 00 1c beq- cr7,ffc07ebc <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { ffc07ea4: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc07ea8: 41 9e 00 30 beq- cr7,ffc07ed8 <== NOT EXECUTED ffc07eac: 80 1f 00 20 lwz r0,32(r31) <== NOT EXECUTED ffc07eb0: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc07eb4: 41 be 00 24 beq+ cr7,ffc07ed8 <== NOT EXECUTED ffc07eb8: 48 00 00 0c b ffc07ec4 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) ffc07ebc: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc07ec0: 41 9e 01 ec beq- cr7,ffc080ac <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); ffc07ec4: 48 00 14 d5 bl ffc09398 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { ffc07ec8: 80 1f 00 54 lwz r0,84(r31) <== NOT EXECUTED ffc07ecc: 7c 7a 18 50 subf r3,r26,r3 <== NOT EXECUTED ffc07ed0: 7f 83 00 40 cmplw cr7,r3,r0 <== NOT EXECUTED ffc07ed4: 41 9d 01 d8 bgt- cr7,ffc080ac <== NOT EXECUTED break; } } rtems_task_wake_after (1); ffc07ed8: 38 60 00 01 li r3,1 <== NOT EXECUTED ffc07edc: 48 00 21 b5 bl ffc0a090 <== NOT EXECUTED ffc07ee0: 4b ff ff 9c b ffc07e7c <== NOT EXECUTED } else { siproc (n, tty); ffc07ee4: 54 63 06 3e clrlwi r3,r3,24 <== NOT EXECUTED ffc07ee8: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc07eec: 4b ff fc 59 bl ffc07b44 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) ffc07ef0: 88 1f 00 47 lbz r0,71(r31) <== NOT EXECUTED ffc07ef4: 81 3f 00 20 lwz r9,32(r31) <== NOT EXECUTED ffc07ef8: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc07efc: 40 9c 01 b0 bge- cr7,ffc080ac <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) ffc07f00: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc07f04: 41 be ff 78 beq- cr7,ffc07e7c <== NOT EXECUTED ffc07f08: 88 1f 00 46 lbz r0,70(r31) <== NOT EXECUTED ffc07f0c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc07f10: 41 9e ff 6c beq+ cr7,ffc07e7c <== NOT EXECUTED ffc07f14: 4b ff ff 60 b ffc07e74 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc07f18: 3e e0 00 00 lis r23,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; ffc07f1c: 83 5f 00 74 lwz r26,116(r31) <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc07f20: 3a f7 21 48 addi r23,r23,8520 <== 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, ffc07f24: 3b 1f 00 49 addi r24,r31,73 <== NOT EXECUTED ffc07f28: 3b 20 00 01 li r25,1 <== NOT EXECUTED ffc07f2c: 48 00 01 1c b ffc08048 <== 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; ffc07f30: 81 3f 00 5c lwz r9,92(r31) <== NOT EXECUTED ffc07f34: 81 7f 00 64 lwz r11,100(r31) <== NOT EXECUTED ffc07f38: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; ffc07f3c: 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; ffc07f40: 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) ffc07f44: 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; ffc07f48: 7c 00 59 d6 mullw r0,r0,r11 <== NOT EXECUTED ffc07f4c: 7c 00 48 50 subf r0,r0,r9 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; ffc07f50: 7f 48 00 ae lbzx r26,r8,r0 <== NOT EXECUTED tty->rawInBuf.Head = newHead; ffc07f54: 90 1f 00 5c stw r0,92(r31) <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) ffc07f58: 81 7f 00 60 lwz r11,96(r31) <== NOT EXECUTED ffc07f5c: 81 1f 00 64 lwz r8,100(r31) <== NOT EXECUTED ffc07f60: 81 3f 00 64 lwz r9,100(r31) <== NOT EXECUTED ffc07f64: 7d 68 5a 14 add r11,r8,r11 <== NOT EXECUTED ffc07f68: 7c 00 58 50 subf r0,r0,r11 <== NOT EXECUTED ffc07f6c: 7d 60 4b 96 divwu r11,r0,r9 <== NOT EXECUTED ffc07f70: 7d 2b 49 d6 mullw r9,r11,r9 <== NOT EXECUTED ffc07f74: 7c 09 00 50 subf r0,r9,r0 <== NOT EXECUTED ffc07f78: 7f 80 50 40 cmplw cr7,r0,r10 <== NOT EXECUTED ffc07f7c: 40 9c 00 84 bge- cr7,ffc08000 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; ffc07f80: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc07f84: 54 00 00 3c rlwinm r0,r0,0,0,30 <== NOT EXECUTED ffc07f88: 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)) ffc07f8c: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc07f90: 70 00 02 02 andi. r0,r0,514 <== NOT EXECUTED ffc07f94: 2f 80 02 02 cmpwi cr7,r0,514 <== NOT EXECUTED ffc07f98: 40 be 00 38 bne+ cr7,ffc07fd0 <== NOT EXECUTED ffc07f9c: 80 1f 00 94 lwz r0,148(r31) <== NOT EXECUTED ffc07fa0: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc07fa4: 41 9e 00 10 beq- cr7,ffc07fb4 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { ffc07fa8: 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)) ffc07fac: 70 09 00 20 andi. r9,r0,32 <== NOT EXECUTED ffc07fb0: 41 82 00 20 beq- ffc07fd0 <== 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, ffc07fb4: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED ffc07fb8: 7f 04 c3 78 mr r4,r24 <== NOT EXECUTED ffc07fbc: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc07fc0: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc07fc4: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07fc8: 4e 80 04 21 bctrl <== NOT EXECUTED ffc07fcc: 48 00 00 34 b ffc08000 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { ffc07fd0: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc07fd4: 70 09 01 00 andi. r9,r0,256 <== NOT EXECUTED ffc07fd8: 41 82 00 28 beq- ffc08000 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { ffc07fdc: 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; ffc07fe0: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { ffc07fe4: 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; ffc07fe8: 55 29 07 b8 rlwinm r9,r9,0,30,28 <== NOT EXECUTED ffc07fec: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { ffc07ff0: 41 9e 00 10 beq- cr7,ffc08000 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); ffc07ff4: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc07ff8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07ffc: 4e 80 04 21 bctrl <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { ffc08000: 80 1f 00 3c lwz r0,60(r31) <== NOT EXECUTED ffc08004: 70 09 00 02 andi. r9,r0,2 <== NOT EXECUTED ffc08008: 41 82 00 1c beq- ffc08024 <== NOT EXECUTED if (siproc (c, tty)) ffc0800c: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED ffc08010: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc08014: 4b ff fb 31 bl ffc07b44 <== NOT EXECUTED ffc08018: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc0801c: 40 9e 00 24 bne- cr7,ffc08040 <== NOT EXECUTED ffc08020: 48 00 00 24 b ffc08044 <== NOT EXECUTED wait = 0; } else { siproc (c, tty); ffc08024: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED ffc08028: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc0802c: 4b ff fb 19 bl ffc07b44 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) ffc08030: 88 1f 00 47 lbz r0,71(r31) <== NOT EXECUTED ffc08034: 81 3f 00 20 lwz r9,32(r31) <== NOT EXECUTED ffc08038: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc0803c: 41 9c 00 08 blt- cr7,ffc08044 <== NOT EXECUTED ffc08040: 3b 20 00 00 li r25,0 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; ffc08044: 83 5f 00 70 lwz r26,112(r31) <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && ffc08048: 81 3f 00 5c lwz r9,92(r31) <== NOT EXECUTED ffc0804c: 80 1f 00 60 lwz r0,96(r31) <== NOT EXECUTED ffc08050: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc08054: 41 9e 00 18 beq- cr7,ffc0806c <== NOT EXECUTED ffc08058: 81 77 00 00 lwz r11,0(r23) <== NOT EXECUTED ffc0805c: 81 3f 00 20 lwz r9,32(r31) <== NOT EXECUTED ffc08060: 38 0b ff ff addi r0,r11,-1 <== NOT EXECUTED ffc08064: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc08068: 41 9c fe c8 blt+ cr7,ffc07f30 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { ffc0806c: 2f 99 00 00 cmpwi cr7,r25,0 <== NOT EXECUTED ffc08070: 41 be 00 3c beq+ cr7,ffc080ac <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, ffc08074: 80 7f 00 68 lwz r3,104(r31) <== NOT EXECUTED ffc08078: 7f 45 d3 78 mr r5,r26 <== NOT EXECUTED ffc0807c: 80 9f 00 6c lwz r4,108(r31) <== NOT EXECUTED ffc08080: 48 00 19 e9 bl ffc09a68 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) ffc08084: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc08088: 41 9e ff c0 beq+ cr7,ffc08048 <== NOT EXECUTED ffc0808c: 48 00 00 20 b ffc080ac <== 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++]; ffc08090: 81 5f 00 1c lwz r10,28(r31) <== NOT EXECUTED count--; ffc08094: 3b 9c ff ff addi r28,r28,-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++]; ffc08098: 7c 0a 48 ae lbzx r0,r10,r9 <== NOT EXECUTED ffc0809c: 98 1b 00 00 stb r0,0(r27) <== NOT EXECUTED ffc080a0: 3b 7b 00 01 addi r27,r27,1 <== NOT EXECUTED ffc080a4: 91 7f 00 24 stw r11,36(r31) <== NOT EXECUTED ffc080a8: 48 00 00 0c b ffc080b4 <== NOT EXECUTED ffc080ac: 38 1c 00 01 addi r0,r28,1 <== NOT EXECUTED ffc080b0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { ffc080b4: 42 40 00 18 bdz- ffc080cc <== NOT EXECUTED ffc080b8: 81 3f 00 24 lwz r9,36(r31) <== NOT EXECUTED ffc080bc: 80 1f 00 20 lwz r0,32(r31) <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; ffc080c0: 39 69 00 01 addi r11,r9,1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { ffc080c4: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc080c8: 41 9c ff c8 blt+ cr7,ffc08090 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; ffc080cc: 80 1e 00 14 lwz r0,20(r30) <== NOT EXECUTED ffc080d0: 7f 9c 00 50 subf r28,r28,r0 <== NOT EXECUTED ffc080d4: 93 9e 00 1c stw r28,28(r30) <== NOT EXECUTED tty->tty_rcvwakeup = 0; ffc080d8: 38 00 00 00 li r0,0 <== NOT EXECUTED rtems_semaphore_release (tty->isem); ffc080dc: 80 7f 00 14 lwz r3,20(r31) <== NOT EXECUTED while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; ffc080e0: 90 1f 00 e4 stw r0,228(r31) <== NOT EXECUTED rtems_semaphore_release (tty->isem); ffc080e4: 48 00 1a c9 bl ffc09bac <== NOT EXECUTED return sc; } ffc080e8: 80 01 00 34 lwz r0,52(r1) <== NOT EXECUTED ffc080ec: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc080f0: 82 e1 00 0c lwz r23,12(r1) <== NOT EXECUTED ffc080f4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc080f8: 83 01 00 10 lwz r24,16(r1) <== NOT EXECUTED ffc080fc: 83 21 00 14 lwz r25,20(r1) <== NOT EXECUTED ffc08100: 83 41 00 18 lwz r26,24(r1) <== NOT EXECUTED ffc08104: 83 61 00 1c lwz r27,28(r1) <== NOT EXECUTED ffc08108: 83 81 00 20 lwz r28,32(r1) <== NOT EXECUTED ffc0810c: 83 a1 00 24 lwz r29,36(r1) <== NOT EXECUTED ffc08110: 83 c1 00 28 lwz r30,40(r1) <== NOT EXECUTED ffc08114: 83 e1 00 2c lwz r31,44(r1) <== NOT EXECUTED ffc08118: 38 21 00 30 addi r1,r1,48 <== NOT EXECUTED ffc0811c: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc06d84 : * 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) { ffc06d84: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED ffc06d88: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc06d8c: 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)) ffc06d90: 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) { ffc06d94: 93 e1 00 14 stw r31,20(r1) <== NOT EXECUTED ffc06d98: 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)) ffc06d9c: 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) { ffc06da0: 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)) ffc06da4: 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) { ffc06da8: 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)) ffc06dac: 40 be 00 48 bne+ cr7,ffc06df4 <== NOT EXECUTED == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, ffc06db0: 80 03 00 a4 lwz r0,164(r3) <== NOT EXECUTED ffc06db4: 38 9f 00 4a addi r4,r31,74 <== NOT EXECUTED ffc06db8: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc06dbc: 80 63 00 10 lwz r3,16(r3) <== NOT EXECUTED ffc06dc0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06dc4: 4e 80 04 21 bctrl <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc06dc8: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc06dcc: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED ffc06dd0: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED ffc06dd4: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; ffc06dd8: 81 3f 00 90 lwz r9,144(r31) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; ffc06ddc: 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--; ffc06de0: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; ffc06de4: 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--; ffc06de8: 91 3f 00 90 stw r9,144(r31) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; ffc06dec: 91 7f 00 b8 stw r11,184(r31) <== NOT EXECUTED rtems_interrupt_enable(level); ffc06df0: 48 00 00 54 b ffc06e44 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) ffc06df4: 80 03 00 b8 lwz r0,184(r3) <== NOT EXECUTED ffc06df8: 54 00 07 be clrlwi r0,r0,30 <== NOT EXECUTED ffc06dfc: 2f 80 00 02 cmpwi cr7,r0,2 <== NOT EXECUTED ffc06e00: 40 be 00 50 bne+ cr7,ffc06e50 <== 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, ffc06e04: 80 03 00 a4 lwz r0,164(r3) <== NOT EXECUTED ffc06e08: 38 9f 00 49 addi r4,r31,73 <== NOT EXECUTED ffc06e0c: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc06e10: 80 63 00 10 lwz r3,16(r3) <== NOT EXECUTED ffc06e14: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06e18: 4e 80 04 21 bctrl <== NOT EXECUTED ffc06e1c: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc06e20: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED ffc06e24: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED ffc06e28: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; ffc06e2c: 81 3f 00 90 lwz r9,144(r31) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; ffc06e30: 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--; ffc06e34: 39 29 ff ff addi r9,r9,-1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; ffc06e38: 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--; ffc06e3c: 91 3f 00 90 stw r9,144(r31) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; ffc06e40: 91 7f 00 b8 stw r11,184(r31) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc06e44: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED ffc06e48: 3b c0 00 01 li r30,1 <== NOT EXECUTED ffc06e4c: 48 00 01 4c b ffc06f98 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { ffc06e50: 81 23 00 80 lwz r9,128(r3) <== NOT EXECUTED ffc06e54: 80 03 00 84 lwz r0,132(r3) <== NOT EXECUTED ffc06e58: 7f 89 00 00 cmpw cr7,r9,r0 <== NOT EXECUTED ffc06e5c: 40 be 00 20 bne+ cr7,ffc06e7c <== NOT EXECUTED /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { ffc06e60: 80 03 00 94 lwz r0,148(r3) <== NOT EXECUTED ffc06e64: 3b c0 00 00 li r30,0 <== NOT EXECUTED ffc06e68: 2f 80 00 02 cmpwi cr7,r0,2 <== NOT EXECUTED ffc06e6c: 40 be 01 2c bne+ cr7,ffc06f98 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); ffc06e70: 80 63 00 8c lwz r3,140(r3) <== NOT EXECUTED ffc06e74: 48 00 2d 39 bl ffc09bac <== NOT EXECUTED ffc06e78: 48 00 01 20 b ffc06f98 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc06e7c: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc06e80: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED ffc06e84: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED ffc06e88: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; ffc06e8c: 39 20 00 00 li r9,0 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; ffc06e90: 83 a3 00 90 lwz r29,144(r3) <== NOT EXECUTED tty->t_dqlen = 0; ffc06e94: 91 23 00 90 stw r9,144(r3) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc06e98: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; ffc06e9c: 80 03 00 84 lwz r0,132(r3) <== NOT EXECUTED ffc06ea0: 81 23 00 88 lwz r9,136(r3) <== NOT EXECUTED ffc06ea4: 7c 1d 02 14 add r0,r29,r0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { ffc06ea8: 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; ffc06eac: 7f a0 4b 96 divwu r29,r0,r9 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { ffc06eb0: 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; ffc06eb4: 7f bd 49 d6 mullw r29,r29,r9 <== NOT EXECUTED ffc06eb8: 7f bd 00 50 subf r29,r29,r0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; ffc06ebc: 93 a3 00 84 stw r29,132(r3) <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { ffc06ec0: 40 be 00 0c bne+ cr7,ffc06ecc <== NOT EXECUTED /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); ffc06ec4: 80 63 00 8c lwz r3,140(r3) <== NOT EXECUTED ffc06ec8: 48 00 2c e5 bl ffc09bac <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { ffc06ecc: 80 1f 00 80 lwz r0,128(r31) <== NOT EXECUTED ffc06ed0: 7f 9d 00 00 cmpw cr7,r29,r0 <== NOT EXECUTED ffc06ed4: 40 be 00 30 bne+ cr7,ffc06f04 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { ffc06ed8: 80 1f 00 d4 lwz r0,212(r31) <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; ffc06edc: 39 20 00 00 li r9,0 <== NOT EXECUTED ffc06ee0: 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) { ffc06ee4: 3b c0 00 00 li r30,0 <== NOT EXECUTED ffc06ee8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc06eec: 41 9e 00 a8 beq- cr7,ffc06f94 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); ffc06ef0: 38 7f 00 30 addi r3,r31,48 <== NOT EXECUTED ffc06ef4: 80 9f 00 d8 lwz r4,216(r31) <== NOT EXECUTED ffc06ef8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06efc: 4e 80 04 21 bctrl <== NOT EXECUTED ffc06f00: 48 00 00 94 b ffc06f94 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) ffc06f04: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED ffc06f08: 70 00 02 10 andi. r0,r0,528 <== NOT EXECUTED ffc06f0c: 2f 80 02 10 cmpwi cr7,r0,528 <== NOT EXECUTED ffc06f10: 40 be 00 34 bne+ cr7,ffc06f44 <== NOT EXECUTED static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc06f14: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED ffc06f18: 7d 30 42 a6 mfsprg r9,0 <== NOT EXECUTED ffc06f1c: 7c 09 48 78 andc r9,r0,r9 <== NOT EXECUTED ffc06f20: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED == (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; ffc06f24: 81 3f 00 b8 lwz r9,184(r31) <== NOT EXECUTED ffc06f28: 61 29 00 20 ori r9,r9,32 <== NOT EXECUTED ffc06f2c: 91 3f 00 b8 stw r9,184(r31) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ ffc06f30: 39 20 00 01 li r9,1 <== NOT EXECUTED ffc06f34: 91 3f 00 94 stw r9,148(r31) <== NOT EXECUTED return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc06f38: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED ffc06f3c: 3b c0 00 00 li r30,0 <== NOT EXECUTED ffc06f40: 48 00 00 54 b ffc06f94 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) ffc06f44: 80 1f 00 80 lwz r0,128(r31) <== NOT EXECUTED ffc06f48: 7f 9d 00 40 cmplw cr7,r29,r0 <== NOT EXECUTED ffc06f4c: 40 9d 00 0c ble- cr7,ffc06f58 <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; ffc06f50: 83 df 00 88 lwz r30,136(r31) <== NOT EXECUTED ffc06f54: 48 00 00 08 b ffc06f5c <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; ffc06f58: 83 df 00 80 lwz r30,128(r31) <== 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)) { ffc06f5c: 80 1f 00 b8 lwz r0,184(r31) <== NOT EXECUTED * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; ffc06f60: 7f dd f0 50 subf r30,r29,r30 <== 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)) { ffc06f64: 70 09 06 00 andi. r9,r0,1536 <== NOT EXECUTED ffc06f68: 41 82 00 08 beq- ffc06f70 <== NOT EXECUTED ffc06f6c: 3b c0 00 01 li r30,1 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ ffc06f70: 38 00 00 01 li r0,1 <== NOT EXECUTED (*tty->device.write)(tty->minor, ffc06f74: 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*/ ffc06f78: 90 1f 00 94 stw r0,148(r31) <== NOT EXECUTED (*tty->device.write)(tty->minor, ffc06f7c: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED ffc06f80: 7c 84 ea 14 add r4,r4,r29 <== NOT EXECUTED ffc06f84: 80 1f 00 a4 lwz r0,164(r31) <== NOT EXECUTED ffc06f88: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc06f8c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc06f90: 4e 80 04 21 bctrl <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ ffc06f94: 93 bf 00 84 stw r29,132(r31) <== NOT EXECUTED } return nToSend; } ffc06f98: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED ffc06f9c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc06fa0: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED ffc06fa4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc06fa8: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED ffc06fac: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED ffc06fb0: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED ffc06fb4: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc08c38 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { ffc08c38: 94 21 ff d8 stwu r1,-40(r1) <== NOT EXECUTED ffc08c3c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc08c40: 90 01 00 2c stw r0,44(r1) <== NOT EXECUTED ffc08c44: 93 a1 00 1c stw r29,28(r1) <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | ffc08c48: 3b a1 00 0c addi r29,r1,12 <== NOT EXECUTED /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { ffc08c4c: 93 c1 00 20 stw r30,32(r1) <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( ffc08c50: 3b c1 00 08 addi r30,r1,8 <== NOT EXECUTED /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { ffc08c54: 93 e1 00 24 stw r31,36(r1) <== NOT EXECUTED ffc08c58: 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 | ffc08c5c: 7f a6 eb 78 mr r6,r29 <== NOT EXECUTED ffc08c60: 38 80 00 02 li r4,2 <== NOT EXECUTED ffc08c64: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc08c68: 38 60 00 03 li r3,3 <== NOT EXECUTED ffc08c6c: 48 00 07 39 bl ffc093a4 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { ffc08c70: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc08c74: 70 09 00 01 andi. r9,r0,1 <== NOT EXECUTED ffc08c78: 41 a2 00 18 beq+ ffc08c90 <== NOT EXECUTED tty->rxTaskId = 0; ffc08c7c: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc08c80: 90 1f 00 c4 stw r0,196(r31) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); ffc08c84: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc08c88: 48 00 11 65 bl ffc09dec <== NOT EXECUTED ffc08c8c: 4b ff ff d0 b ffc08c5c <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); ffc08c90: 80 1f 00 a0 lwz r0,160(r31) <== NOT EXECUTED ffc08c94: 80 7f 00 10 lwz r3,16(r31) <== NOT EXECUTED ffc08c98: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc08c9c: 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 ( ffc08ca0: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED else { /* * do something */ c = tty->device.pollRead(tty->minor); if (c != EOF) { ffc08ca4: 2f 83 ff ff cmpwi cr7,r3,-1 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); ffc08ca8: 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 ( ffc08cac: 38 a0 00 01 li r5,1 <== NOT EXECUTED ffc08cb0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED else { /* * do something */ c = tty->device.pollRead(tty->minor); if (c != EOF) { ffc08cb4: 41 be ff a8 beq- cr7,ffc08c5c <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; ffc08cb8: 98 01 00 08 stb r0,8(r1) <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( ffc08cbc: 4b ff e3 85 bl ffc07040 <== NOT EXECUTED ffc08cc0: 4b ff ff 9c b ffc08c5c <== NOT EXECUTED =============================================================================== ffc06d5c : * 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) { ffc06d5c: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED ffc06d60: 7c 08 02 a6 mflr r0 <== NOT EXECUTED /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); ffc06d64: 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) { ffc06d68: 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); ffc06d6c: 80 63 00 c4 lwz r3,196(r3) <== NOT EXECUTED ffc06d70: 48 00 27 d9 bl ffc09548 <== NOT EXECUTED } ffc06d74: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED ffc06d78: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc06d7c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc06d80: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc08bac : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { ffc08bac: 94 21 ff d8 stwu r1,-40(r1) <== NOT EXECUTED ffc08bb0: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc08bb4: 93 a1 00 1c stw r29,28(r1) <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { ffc08bb8: 3f a0 00 00 lis r29,0 <== NOT EXECUTED ffc08bbc: 3b bd 28 b8 addi r29,r29,10424 <== NOT EXECUTED /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { ffc08bc0: 90 01 00 2c stw r0,44(r1) <== NOT EXECUTED ffc08bc4: 93 c1 00 20 stw r30,32(r1) <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | ffc08bc8: 3b c1 00 08 addi r30,r1,8 <== NOT EXECUTED /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { ffc08bcc: 93 e1 00 24 stw r31,36(r1) <== NOT EXECUTED ffc08bd0: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | ffc08bd4: 38 80 00 02 li r4,2 <== NOT EXECUTED ffc08bd8: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc08bdc: 7f c6 f3 78 mr r6,r30 <== NOT EXECUTED ffc08be0: 38 60 00 03 li r3,3 <== NOT EXECUTED ffc08be4: 48 00 07 c1 bl ffc093a4 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { ffc08be8: 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); ffc08bec: 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) { ffc08bf0: 70 09 00 01 andi. r9,r0,1 <== NOT EXECUTED ffc08bf4: 41 a2 00 18 beq+ ffc08c0c <== NOT EXECUTED tty->txTaskId = 0; ffc08bf8: 38 00 00 00 li r0,0 <== NOT EXECUTED ffc08bfc: 90 1f 00 c8 stw r0,200(r31) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); ffc08c00: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc08c04: 48 00 11 e9 bl ffc09dec <== NOT EXECUTED ffc08c08: 4b ff ff cc b ffc08bd4 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { ffc08c0c: 81 3f 00 cc lwz r9,204(r31) <== NOT EXECUTED ffc08c10: 55 29 28 34 rlwinm r9,r9,5,0,26 <== NOT EXECUTED ffc08c14: 7d 3d 4a 14 add r9,r29,r9 <== NOT EXECUTED ffc08c18: 80 09 00 14 lwz r0,20(r9) <== NOT EXECUTED ffc08c1c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc08c20: 41 9e 00 0c beq- cr7,ffc08c2c <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); ffc08c24: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc08c28: 4e 80 04 21 bctrl <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); ffc08c2c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc08c30: 4b ff e1 55 bl ffc06d84 <== NOT EXECUTED ffc08c34: 4b ff ff a0 b ffc08bd4 <== NOT EXECUTED =============================================================================== ffc07bc8 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc07bc8: 94 21 ff e0 stwu r1,-32(r1) ffc07bcc: 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); ffc07bd0: 38 80 00 00 li r4,0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc07bd4: 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); ffc07bd8: 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; ffc07bdc: 81 23 00 00 lwz r9,0(r3) rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc07be0: 93 e1 00 1c stw r31,28(r1) rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; ffc07be4: 83 e9 00 38 lwz r31,56(r9) rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc07be8: 93 c1 00 18 stw r30,24(r1) ffc07bec: 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); ffc07bf0: 80 7f 00 18 lwz r3,24(r31) rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { ffc07bf4: 93 a1 00 14 stw r29,20(r1) ffc07bf8: 93 61 00 0c stw r27,12(r1) ffc07bfc: 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); ffc07c00: 48 00 1e 69 bl ffc09a68 if (sc != RTEMS_SUCCESSFUL) ffc07c04: 7c 7d 1b 79 mr. r29,r3 ffc07c08: 40 82 00 94 bne- ffc07c9c <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { ffc07c0c: 80 1f 00 cc lwz r0,204(r31) ffc07c10: 3d 20 00 00 lis r9,0 ffc07c14: 39 29 28 b8 addi r9,r9,10424 ffc07c18: 54 00 28 34 rlwinm r0,r0,5,0,26 ffc07c1c: 7d 29 02 14 add r9,r9,r0 ffc07c20: 80 09 00 0c lwz r0,12(r9) ffc07c24: 2f 80 00 00 cmpwi cr7,r0,0 ffc07c28: 41 9e 00 1c beq- cr7,ffc07c44 <== ALWAYS TAKEN sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); ffc07c2c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc07c30: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc07c34: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc07c38: 4e 80 04 21 bctrl <== NOT EXECUTED ffc07c3c: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED ffc07c40: 48 00 00 54 b ffc07c94 <== NOT EXECUTED rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { ffc07c44: 80 1f 00 34 lwz r0,52(r31) ffc07c48: 80 9e 00 14 lwz r4,20(r30) ffc07c4c: 70 09 00 01 andi. r9,r0,1 ffc07c50: 80 7e 00 10 lwz r3,16(r30) ffc07c54: 41 82 00 30 beq- ffc07c84 <== NEVER TAKEN uint32_t count = args->count; ffc07c58: 7c 9b 23 78 mr r27,r4 char *buffer = args->buffer; ffc07c5c: 7c 7c 1b 78 mr r28,r3 while (count--) ffc07c60: 48 00 00 10 b ffc07c70 oproc (*buffer++, tty); ffc07c64: 88 7c 00 00 lbz r3,0(r28) ffc07c68: 3b 9c 00 01 addi r28,r28,1 ffc07c6c: 4b ff f8 a9 bl ffc07514 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) ffc07c70: 2f 9b 00 00 cmpwi cr7,r27,0 oproc (*buffer++, tty); ffc07c74: 7f e4 fb 78 mr r4,r31 ffc07c78: 3b 7b ff ff addi r27,r27,-1 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) ffc07c7c: 40 9e ff e8 bne+ cr7,ffc07c64 ffc07c80: 48 00 00 0c b ffc07c8c oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); ffc07c84: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED ffc07c88: 4b ff f7 15 bl ffc0739c <== NOT EXECUTED args->bytes_moved = args->count; ffc07c8c: 80 1e 00 14 lwz r0,20(r30) ffc07c90: 90 1e 00 1c stw r0,28(r30) } rtems_semaphore_release (tty->osem); ffc07c94: 80 7f 00 18 lwz r3,24(r31) ffc07c98: 48 00 1f 15 bl ffc09bac return sc; } ffc07c9c: 80 01 00 24 lwz r0,36(r1) ffc07ca0: 7f a3 eb 78 mr r3,r29 ffc07ca4: 83 61 00 0c lwz r27,12(r1) ffc07ca8: 7c 08 03 a6 mtlr r0 ffc07cac: 83 81 00 10 lwz r28,16(r1) ffc07cb0: 83 a1 00 14 lwz r29,20(r1) ffc07cb4: 83 c1 00 18 lwz r30,24(r1) ffc07cb8: 83 e1 00 1c lwz r31,28(r1) ffc07cbc: 38 21 00 20 addi r1,r1,32 ffc07cc0: 4e 80 00 20 blr =============================================================================== ffc192a4 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { ffc192a4: 94 21 ff e8 stwu r1,-24(r1) ffc192a8: 7c 08 02 a6 mflr r0 ffc192ac: 7c 64 1b 78 mr r4,r3 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) ffc192b0: 3c 60 00 00 lis r3,0 ffc192b4: 90 01 00 1c stw r0,28(r1) ffc192b8: 38 63 79 6c addi r3,r3,31084 ffc192bc: 38 a1 00 08 addi r5,r1,8 ffc192c0: 48 00 35 a5 bl ffc1c864 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc192c4: 81 21 00 08 lwz r9,8(r1) ffc192c8: 38 00 00 04 li r0,4 ffc192cc: 2f 89 00 00 cmpwi cr7,r9,0 ffc192d0: 40 9e 00 20 bne- cr7,ffc192f0 case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) ffc192d4: 80 03 00 38 lwz r0,56(r3) ffc192d8: 2f 80 00 04 cmpwi cr7,r0,4 ffc192dc: 41 9e 00 0c beq- cr7,ffc192e8 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); ffc192e0: 38 63 00 10 addi r3,r3,16 ffc192e4: 48 00 5c 71 bl ffc1ef54 <_Watchdog_Remove> _Thread_Enable_dispatch(); ffc192e8: 48 00 41 45 bl ffc1d42c <_Thread_Enable_dispatch> ffc192ec: 38 00 00 00 li r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc192f0: 7c 03 03 78 mr r3,r0 ffc192f4: 80 01 00 1c lwz r0,28(r1) ffc192f8: 38 21 00 18 addi r1,r1,24 ffc192fc: 7c 08 03 a6 mtlr r0 ffc19300: 4e 80 00 20 blr =============================================================================== ffc19914 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc19914: 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; ffc19918: 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 ) { ffc1991c: 7c 08 02 a6 mflr r0 ffc19920: 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; ffc19924: 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 ) { ffc19928: 93 41 00 20 stw r26,32(r1) ffc1992c: 7c da 33 78 mr r26,r6 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc19930: 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 ) { ffc19934: 93 81 00 28 stw r28,40(r1) ffc19938: 7c 9c 23 78 mr r28,r4 ffc1993c: 93 a1 00 2c stw r29,44(r1) ffc19940: 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 ) ffc19944: 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 ) { ffc19948: 93 c1 00 30 stw r30,48(r1) ffc1994c: 7c be 2b 78 mr r30,r5 ffc19950: 90 01 00 3c stw r0,60(r1) ffc19954: 93 01 00 18 stw r24,24(r1) ffc19958: 93 21 00 1c stw r25,28(r1) ffc1995c: 93 61 00 24 stw r27,36(r1) Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc19960: 41 9e 00 c8 beq- cr7,ffc19a28 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) ffc19964: 3d 20 00 00 lis r9,0 ffc19968: 88 09 28 70 lbz r0,10352(r9) ffc1996c: 38 60 00 0b li r3,11 ffc19970: 2f 80 00 00 cmpwi cr7,r0,0 ffc19974: 41 9e 00 b4 beq- cr7,ffc19a28 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) ffc19978: 2f 85 00 00 cmpwi cr7,r5,0 ffc1997c: 38 60 00 09 li r3,9 ffc19980: 41 9e 00 a8 beq- cr7,ffc19a28 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) ffc19984: 7c 83 23 78 mr r3,r4 ffc19988: 4b ff c5 75 bl ffc15efc <_TOD_Validate> ffc1998c: 2f 83 00 00 cmpwi cr7,r3,0 ffc19990: 41 9e 00 94 beq- cr7,ffc19a24 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc19994: 7f 83 e3 78 mr r3,r28 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc19998: 3f 60 00 00 lis r27,0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc1999c: 4b ff c4 d5 bl ffc15e70 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) ffc199a0: 80 1b 28 88 lwz r0,10376(r27) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc199a4: 7c 7c 1b 78 mr r28,r3 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc199a8: 7f 83 00 40 cmplw cr7,r3,r0 ffc199ac: 40 9d 00 78 ble- cr7,ffc19a24 ffc199b0: 3c 60 00 00 lis r3,0 ffc199b4: 38 63 79 6c addi r3,r3,31084 ffc199b8: 7f a4 eb 78 mr r4,r29 ffc199bc: 38 a1 00 08 addi r5,r1,8 ffc199c0: 48 00 2e a5 bl ffc1c864 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc199c4: 83 01 00 08 lwz r24,8(r1) ffc199c8: 7c 79 1b 78 mr r25,r3 ffc199cc: 2f 98 00 00 cmpwi cr7,r24,0 ffc199d0: 38 60 00 04 li r3,4 ffc199d4: 40 9e 00 54 bne- cr7,ffc19a28 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); ffc199d8: 38 79 00 10 addi r3,r25,16 ffc199dc: 48 00 55 79 bl ffc1ef54 <_Watchdog_Remove> void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc199e0: 93 b9 00 30 stw r29,48(r25) the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; ffc199e4: 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(); ffc199e8: 80 1b 28 88 lwz r0,10376(r27) (*timer_server->schedule_operation)( timer_server, the_timer ); ffc199ec: 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; ffc199f0: 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 ); ffc199f4: 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(); ffc199f8: 7f 80 e0 50 subf r28,r0,r28 (*timer_server->schedule_operation)( timer_server, the_timer ); ffc199fc: 80 1f 00 04 lwz r0,4(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc19a00: 93 19 00 18 stw r24,24(r25) ffc19a04: 7c 09 03 a6 mtctr r0 the_watchdog->routine = routine; ffc19a08: 93 d9 00 2c stw r30,44(r25) the_watchdog->id = id; the_watchdog->user_data = user_data; ffc19a0c: 93 59 00 34 stw r26,52(r25) case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); ffc19a10: 93 99 00 1c stw r28,28(r25) (*timer_server->schedule_operation)( timer_server, the_timer ); ffc19a14: 4e 80 04 21 bctrl _Thread_Enable_dispatch(); ffc19a18: 48 00 3a 15 bl ffc1d42c <_Thread_Enable_dispatch> ffc19a1c: 38 60 00 00 li r3,0 return RTEMS_SUCCESSFUL; ffc19a20: 48 00 00 08 b ffc19a28 ffc19a24: 38 60 00 14 li r3,20 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc19a28: 80 01 00 3c lwz r0,60(r1) ffc19a2c: 83 01 00 18 lwz r24,24(r1) ffc19a30: 7c 08 03 a6 mtlr r0 ffc19a34: 83 21 00 1c lwz r25,28(r1) ffc19a38: 83 41 00 20 lwz r26,32(r1) ffc19a3c: 83 61 00 24 lwz r27,36(r1) ffc19a40: 83 81 00 28 lwz r28,40(r1) ffc19a44: 83 a1 00 2c lwz r29,44(r1) ffc19a48: 83 c1 00 30 lwz r30,48(r1) ffc19a4c: 83 e1 00 34 lwz r31,52(r1) ffc19a50: 38 21 00 38 addi r1,r1,56 ffc19a54: 4e 80 00 20 blr =============================================================================== ffc0a2bc : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { ffc0a2bc: 94 21 ff d8 stwu r1,-40(r1) <== NOT EXECUTED ffc0a2c0: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc0a2c4: 93 41 00 10 stw r26,16(r1) <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) ffc0a2c8: 74 7a 20 00 andis. r26,r3,8192 <== NOT EXECUTED static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { ffc0a2cc: 93 21 00 0c stw r25,12(r1) <== NOT EXECUTED ffc0a2d0: 7c 99 23 78 mr r25,r4 <== NOT EXECUTED ffc0a2d4: 93 a1 00 1c stw r29,28(r1) <== NOT EXECUTED ffc0a2d8: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED ffc0a2dc: 93 e1 00 24 stw r31,36(r1) <== NOT EXECUTED ffc0a2e0: 7c bf 2b 78 mr r31,r5 <== NOT EXECUTED ffc0a2e4: 90 01 00 2c stw r0,44(r1) <== NOT EXECUTED ffc0a2e8: 93 61 00 14 stw r27,20(r1) <== NOT EXECUTED ffc0a2ec: 93 81 00 18 stw r28,24(r1) <== NOT EXECUTED ffc0a2f0: 93 c1 00 20 stw r30,32(r1) <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) ffc0a2f4: 41 82 00 3c beq- ffc0a330 <== NOT EXECUTED { if (rtems_panic_in_progress++) ffc0a2f8: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0a2fc: 81 69 27 d0 lwz r11,10192(r9) <== NOT EXECUTED ffc0a300: 2f 8b 00 00 cmpwi cr7,r11,0 <== NOT EXECUTED ffc0a304: 39 6b 00 01 addi r11,r11,1 <== NOT EXECUTED ffc0a308: 91 69 27 d0 stw r11,10192(r9) <== NOT EXECUTED ffc0a30c: 41 9e 00 14 beq- cr7,ffc0a320 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0a310: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0a314: 81 69 27 f8 lwz r11,10232(r9) <== NOT EXECUTED ffc0a318: 38 0b 00 01 addi r0,r11,1 <== NOT EXECUTED ffc0a31c: 90 09 27 f8 stw r0,10232(r9) <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) ffc0a320: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0a324: 80 09 27 d0 lwz r0,10192(r9) <== NOT EXECUTED ffc0a328: 2f 80 00 02 cmpwi cr7,r0,2 <== NOT EXECUTED ffc0a32c: 41 9d 01 5c bgt- cr7,ffc0a488 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ ffc0a330: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0a334: 81 29 27 64 lwz r9,10084(r9) <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; ffc0a338: 57 bc 01 00 rlwinm r28,r29,0,4,0 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ ffc0a33c: 3b c0 00 00 li r30,0 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ ffc0a340: 80 69 00 08 lwz r3,8(r9) <== NOT EXECUTED ffc0a344: 48 01 00 e5 bl ffc1a428 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ ffc0a348: 77 a0 40 00 andis. r0,r29,16384 <== NOT EXECUTED ffc0a34c: 41 a2 00 0c beq+ ffc0a358 <== NOT EXECUTED local_errno = errno; ffc0a350: 48 00 fc 55 bl ffc19fa4 <__errno> <== NOT EXECUTED ffc0a354: 83 c3 00 00 lwz r30,0(r3) <== 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); ffc0a358: 3f 60 00 00 lis r27,0 <== NOT EXECUTED ffc0a35c: 81 3b 27 64 lwz r9,10084(r27) <== NOT EXECUTED ffc0a360: 7f e5 fb 78 mr r5,r31 <== NOT EXECUTED ffc0a364: 7f 24 cb 78 mr r4,r25 <== NOT EXECUTED ffc0a368: 80 69 00 0c lwz r3,12(r9) <== NOT EXECUTED ffc0a36c: 48 01 64 85 bl ffc207f0 <== NOT EXECUTED if (status) ffc0a370: 2f 9c 00 00 cmpwi cr7,r28,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); ffc0a374: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED if (status) ffc0a378: 41 be 00 30 beq+ cr7,ffc0a3a8 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); ffc0a37c: 81 3b 27 64 lwz r9,10084(r27) <== NOT EXECUTED ffc0a380: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc0a384: 83 89 00 0c lwz r28,12(r9) <== NOT EXECUTED ffc0a388: 4b ff ff 09 bl ffc0a290 <== NOT EXECUTED ffc0a38c: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED ffc0a390: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED ffc0a394: 38 84 9d 14 addi r4,r4,-25324 <== NOT EXECUTED ffc0a398: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc0a39c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc0a3a0: 48 01 04 cd bl ffc1a86c <== NOT EXECUTED ffc0a3a4: 7f ff 1a 14 add r31,r31,r3 <== NOT EXECUTED if (local_errno) ffc0a3a8: 2f 9e 00 00 cmpwi cr7,r30,0 <== NOT EXECUTED ffc0a3ac: 41 9e 00 68 beq- cr7,ffc0a414 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) ffc0a3b0: 40 9d 00 40 ble- cr7,ffc0a3f0 <== NOT EXECUTED ffc0a3b4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc0a3b8: 48 01 14 45 bl ffc1b7fc <== NOT EXECUTED ffc0a3bc: 88 03 00 00 lbz r0,0(r3) <== NOT EXECUTED ffc0a3c0: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0a3c4: 41 be 00 2c beq+ cr7,ffc0a3f0 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); ffc0a3c8: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0a3cc: 81 29 27 64 lwz r9,10084(r9) <== NOT EXECUTED ffc0a3d0: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc0a3d4: 83 89 00 0c lwz r28,12(r9) <== NOT EXECUTED ffc0a3d8: 48 01 14 25 bl ffc1b7fc <== NOT EXECUTED ffc0a3dc: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED ffc0a3e0: 7c 65 1b 78 mr r5,r3 <== NOT EXECUTED ffc0a3e4: 38 84 9d 22 addi r4,r4,-25310 <== NOT EXECUTED ffc0a3e8: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED ffc0a3ec: 48 00 00 1c b ffc0a408 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); ffc0a3f0: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc0a3f4: 81 29 27 64 lwz r9,10084(r9) <== NOT EXECUTED ffc0a3f8: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED ffc0a3fc: 38 84 9d 2f addi r4,r4,-25297 <== NOT EXECUTED ffc0a400: 80 69 00 0c lwz r3,12(r9) <== NOT EXECUTED ffc0a404: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED ffc0a408: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc0a40c: 48 01 04 61 bl ffc1a86c <== NOT EXECUTED ffc0a410: 7f ff 1a 14 add r31,r31,r3 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); ffc0a414: 3f 80 00 00 lis r28,0 <== NOT EXECUTED ffc0a418: 81 3c 27 64 lwz r9,10084(r28) <== NOT EXECUTED ffc0a41c: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED ffc0a420: 38 84 a0 56 addi r4,r4,-24490 <== NOT EXECUTED ffc0a424: 80 69 00 0c lwz r3,12(r9) <== NOT EXECUTED ffc0a428: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc0a42c: 48 01 04 41 bl ffc1a86c <== NOT EXECUTED (void) fflush(stderr); ffc0a430: 81 3c 27 64 lwz r9,10084(r28) <== 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"); ffc0a434: 7c 7b 1b 78 mr r27,r3 <== NOT EXECUTED (void) fflush(stderr); ffc0a438: 80 69 00 0c lwz r3,12(r9) <== NOT EXECUTED ffc0a43c: 48 00 ff ed bl ffc1a428 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) ffc0a440: 77 a0 30 00 andis. r0,r29,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"); ffc0a444: 7c 7b fa 14 add r3,r27,r31 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) ffc0a448: 41 82 00 44 beq- ffc0a48c <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) ffc0a44c: 2f 9a 00 00 cmpwi cr7,r26,0 <== NOT EXECUTED ffc0a450: 41 9e 00 20 beq- cr7,ffc0a470 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); ffc0a454: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED ffc0a458: 38 84 9d 43 addi r4,r4,-25277 <== NOT EXECUTED ffc0a45c: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc0a460: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc0a464: 48 00 00 e1 bl ffc0a544 <== NOT EXECUTED _exit(local_errno); ffc0a468: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc0a46c: 48 00 0e 5d bl ffc0b2c8 <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); ffc0a470: 3c 80 ff c3 lis r4,-61 <== NOT EXECUTED ffc0a474: 38 84 9d 58 addi r4,r4,-25256 <== NOT EXECUTED ffc0a478: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc0a47c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc0a480: 48 00 00 c5 bl ffc0a544 <== NOT EXECUTED abort(); ffc0a484: 48 00 fb 05 bl ffc19f88 <== NOT EXECUTED ffc0a488: 38 60 00 00 li r3,0 <== NOT EXECUTED } } return chars_written; } ffc0a48c: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED ffc0a490: 83 21 00 0c lwz r25,12(r1) <== NOT EXECUTED ffc0a494: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc0a498: 83 41 00 10 lwz r26,16(r1) <== NOT EXECUTED ffc0a49c: 83 61 00 14 lwz r27,20(r1) <== NOT EXECUTED ffc0a4a0: 83 81 00 18 lwz r28,24(r1) <== NOT EXECUTED ffc0a4a4: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED ffc0a4a8: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED ffc0a4ac: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED ffc0a4b0: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED ffc0a4b4: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc04c3c : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc04c3c: 94 21 ff d8 stwu r1,-40(r1) ffc04c40: 7c 08 02 a6 mflr r0 ffc04c44: 93 01 00 08 stw r24,8(r1) unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); ffc04c48: 3f 00 00 00 lis r24,0 ffc04c4c: 3b 18 26 e4 addi r24,r24,9956 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc04c50: 93 21 00 0c stw r25,12(r1) limit++; continue; } sign = 1; } if (!isdigit(c)) ffc04c54: 3f 20 00 00 lis r25,0 ffc04c58: 3b 39 26 e0 addi r25,r25,9952 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc04c5c: 93 81 00 18 stw r28,24(r1) ffc04c60: 3f 80 7f ff lis r28,32767 ffc04c64: 63 9c ff ff ori r28,r28,65535 ffc04c68: 90 01 00 2c stw r0,44(r1) ffc04c6c: 93 41 00 10 stw r26,16(r1) sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) ffc04c70: 3b 40 00 0a li r26,10 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { ffc04c74: 93 61 00 14 stw r27,20(r1) ffc04c78: 7c 9b 23 78 mr r27,r4 ffc04c7c: 93 a1 00 1c stw r29,28(r1) ffc04c80: 3b a0 00 00 li r29,0 ffc04c84: 93 c1 00 20 stw r30,32(r1) ffc04c88: 7c 7e 1b 78 mr r30,r3 ffc04c8c: 93 e1 00 24 stw r31,36(r1) ffc04c90: 3b e0 00 00 li r31,0 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); ffc04c94: 81 3e 00 04 lwz r9,4(r30) ffc04c98: 38 09 ff ff addi r0,r9,-1 ffc04c9c: 2f 80 00 00 cmpwi cr7,r0,0 ffc04ca0: 90 1e 00 04 stw r0,4(r30) ffc04ca4: 40 bc 00 14 bge+ cr7,ffc04cb8 <== ALWAYS TAKEN ffc04ca8: 80 78 00 00 lwz r3,0(r24) <== NOT EXECUTED ffc04cac: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED ffc04cb0: 48 01 1a 01 bl ffc166b0 <__srget_r> <== NOT EXECUTED ffc04cb4: 48 00 00 14 b ffc04cc8 <== NOT EXECUTED ffc04cb8: 81 3e 00 00 lwz r9,0(r30) ffc04cbc: 38 09 00 01 addi r0,r9,1 ffc04cc0: 88 69 00 00 lbz r3,0(r9) ffc04cc4: 90 1e 00 00 stw r0,0(r30) if (c == ':') ffc04cc8: 2f 03 00 3a cmpwi cr6,r3,58 ffc04ccc: 2f 9d 00 00 cmpwi cr7,r29,0 ffc04cd0: 41 9a 00 68 beq- cr6,ffc04d38 break; if (sign == 0) { ffc04cd4: 40 9e 00 1c bne- cr7,ffc04cf0 <== NEVER TAKEN if (c == '-') { ffc04cd8: 2f 83 00 2d cmpwi cr7,r3,45 sign = -1; limit++; continue; ffc04cdc: 3b a0 00 01 li r29,1 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { ffc04ce0: 40 be 00 10 bne+ cr7,ffc04cf0 <== ALWAYS TAKEN sign = -1; limit++; ffc04ce4: 3b 9c 00 01 addi r28,r28,1 <== NOT EXECUTED ffc04ce8: 3b a0 ff ff li r29,-1 <== NOT EXECUTED continue; ffc04cec: 4b ff ff a8 b ffc04c94 <== NOT EXECUTED } sign = 1; } if (!isdigit(c)) ffc04cf0: 81 39 00 00 lwz r9,0(r25) ffc04cf4: 7d 29 1a 14 add r9,r9,r3 ffc04cf8: 88 09 00 01 lbz r0,1(r9) ffc04cfc: 70 09 00 04 andi. r9,r0,4 ffc04d00: 41 82 00 4c beq- ffc04d4c <== NEVER TAKEN return 0; d = c - '0'; if ((i > (limit / 10)) ffc04d04: 7c 1c d3 96 divwu r0,r28,r26 ffc04d08: 7f 9f 00 40 cmplw cr7,r31,r0 ffc04d0c: 41 9d 00 40 bgt- cr7,ffc04d4c <== NEVER TAKEN ffc04d10: 7f 9f 00 00 cmpw cr7,r31,r0 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; ffc04d14: 38 63 ff d0 addi r3,r3,-48 if ((i > (limit / 10)) ffc04d18: 40 be 00 14 bne+ cr7,ffc04d2c <== ALWAYS TAKEN ffc04d1c: 1c 1f 00 0a mulli r0,r31,10 <== NOT EXECUTED ffc04d20: 7c 00 e0 50 subf r0,r0,r28 <== NOT EXECUTED ffc04d24: 7f 83 00 40 cmplw cr7,r3,r0 <== NOT EXECUTED ffc04d28: 41 9d 00 24 bgt- cr7,ffc04d4c <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; ffc04d2c: 1f ff 00 0a mulli r31,r31,10 ffc04d30: 7f e3 fa 14 add r31,r3,r31 ffc04d34: 4b ff ff 60 b ffc04c94 } if (sign == 0) ffc04d38: 41 9e 00 14 beq- cr7,ffc04d4c <== NEVER TAKEN return 0; *val = i * sign; ffc04d3c: 7f fd f9 d6 mullw r31,r29,r31 ffc04d40: 38 60 00 01 li r3,1 ffc04d44: 93 fb 00 00 stw r31,0(r27) return 1; ffc04d48: 48 00 00 08 b ffc04d50 ffc04d4c: 38 60 00 00 li r3,0 <== NOT EXECUTED } ffc04d50: 80 01 00 2c lwz r0,44(r1) ffc04d54: 83 01 00 08 lwz r24,8(r1) ffc04d58: 7c 08 03 a6 mtlr r0 ffc04d5c: 83 21 00 0c lwz r25,12(r1) ffc04d60: 83 41 00 10 lwz r26,16(r1) ffc04d64: 83 61 00 14 lwz r27,20(r1) ffc04d68: 83 81 00 18 lwz r28,24(r1) ffc04d6c: 83 a1 00 1c lwz r29,28(r1) ffc04d70: 83 c1 00 20 lwz r30,32(r1) ffc04d74: 83 e1 00 24 lwz r31,36(r1) ffc04d78: 38 21 00 28 addi r1,r1,40 ffc04d7c: 4e 80 00 20 blr =============================================================================== ffc04d80 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { ffc04d80: 94 21 ff e0 stwu r1,-32(r1) ffc04d84: 7c 08 02 a6 mflr r0 ffc04d88: 90 01 00 24 stw r0,36(r1) int c; *name = *bufp; ffc04d8c: 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) { ffc04d90: 93 61 00 0c stw r27,12(r1) int c; *name = *bufp; for (;;) { c = getc(fp); ffc04d94: 3f 60 00 00 lis r27,0 ffc04d98: 3b 7b 26 e4 addi r27,r27,9956 static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { int c; *name = *bufp; ffc04d9c: 90 04 00 00 stw r0,0(r4) /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { ffc04da0: 93 81 00 10 stw r28,16(r1) ffc04da4: 7c fc 3b 78 mr r28,r7 ffc04da8: 93 a1 00 14 stw r29,20(r1) ffc04dac: 7c dd 33 78 mr r29,r6 ffc04db0: 93 c1 00 18 stw r30,24(r1) ffc04db4: 7c 7e 1b 78 mr r30,r3 ffc04db8: 93 e1 00 1c stw r31,28(r1) ffc04dbc: 7c bf 2b 78 mr r31,r5 int c; *name = *bufp; for (;;) { c = getc(fp); ffc04dc0: 81 3e 00 04 lwz r9,4(r30) ffc04dc4: 38 09 ff ff addi r0,r9,-1 ffc04dc8: 2f 80 00 00 cmpwi cr7,r0,0 ffc04dcc: 90 1e 00 04 stw r0,4(r30) ffc04dd0: 40 bc 00 14 bge+ cr7,ffc04de4 ffc04dd4: 80 7b 00 00 lwz r3,0(r27) ffc04dd8: 7f c4 f3 78 mr r4,r30 ffc04ddc: 48 01 18 d5 bl ffc166b0 <__srget_r> ffc04de0: 48 00 00 14 b ffc04df4 ffc04de4: 81 3e 00 00 lwz r9,0(r30) ffc04de8: 38 09 00 01 addi r0,r9,1 ffc04dec: 88 69 00 00 lbz r3,0(r9) ffc04df0: 90 1e 00 00 stw r0,0(r30) if (c == ':') { ffc04df4: 2c 83 00 3a cmpwi cr1,r3,58 if (nlFlag) return 0; break; } if (c == '\n') { ffc04df8: 2f 03 00 0a cmpwi cr6,r3,10 if (!nlFlag) return 0; break; } if (c == EOF) ffc04dfc: 2f 83 ff ff cmpwi cr7,r3,-1 int c; *name = *bufp; for (;;) { c = getc(fp); if (c == ':') { ffc04e00: 40 a6 00 10 bne+ cr1,ffc04e10 if (nlFlag) ffc04e04: 2f 9c 00 00 cmpwi cr7,r28,0 ffc04e08: 41 be 00 4c beq+ cr7,ffc04e54 <== ALWAYS TAKEN ffc04e0c: 48 00 00 74 b ffc04e80 <== NOT EXECUTED return 0; break; } if (c == '\n') { ffc04e10: 40 ba 00 10 bne+ cr6,ffc04e20 if (!nlFlag) ffc04e14: 2f 9c 00 00 cmpwi cr7,r28,0 ffc04e18: 40 be 00 3c bne+ cr7,ffc04e54 <== ALWAYS TAKEN ffc04e1c: 48 00 00 64 b ffc04e80 <== NOT EXECUTED return 0; break; } if (c == EOF) ffc04e20: 41 9e 00 60 beq- cr7,ffc04e80 <== NEVER TAKEN return 0; if (*nleft < 2) ffc04e24: 80 1d 00 00 lwz r0,0(r29) ffc04e28: 2b 80 00 01 cmplwi cr7,r0,1 ffc04e2c: 40 9d 00 54 ble- cr7,ffc04e80 <== NEVER TAKEN return 0; **bufp = c; ffc04e30: 81 3f 00 00 lwz r9,0(r31) ffc04e34: 98 69 00 00 stb r3,0(r9) ++(*bufp); ffc04e38: 81 3f 00 00 lwz r9,0(r31) --(*nleft); ffc04e3c: 81 7d 00 00 lwz r11,0(r29) if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); ffc04e40: 39 29 00 01 addi r9,r9,1 --(*nleft); ffc04e44: 38 0b ff ff addi r0,r11,-1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); ffc04e48: 91 3f 00 00 stw r9,0(r31) --(*nleft); ffc04e4c: 90 1d 00 00 stw r0,0(r29) } ffc04e50: 4b ff ff 70 b ffc04dc0 **bufp = '\0'; ffc04e54: 81 3f 00 00 lwz r9,0(r31) ffc04e58: 38 00 00 00 li r0,0 ++(*bufp); --(*nleft); ffc04e5c: 38 60 00 01 li r3,1 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ffc04e60: 98 09 00 00 stb r0,0(r9) ++(*bufp); ffc04e64: 81 3f 00 00 lwz r9,0(r31) --(*nleft); ffc04e68: 81 7d 00 00 lwz r11,0(r29) **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); ffc04e6c: 39 29 00 01 addi r9,r9,1 --(*nleft); ffc04e70: 38 0b ff ff addi r0,r11,-1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); ffc04e74: 91 3f 00 00 stw r9,0(r31) --(*nleft); ffc04e78: 90 1d 00 00 stw r0,0(r29) return 1; ffc04e7c: 48 00 00 08 b ffc04e84 ffc04e80: 38 60 00 00 li r3,0 <== NOT EXECUTED } ffc04e84: 80 01 00 24 lwz r0,36(r1) ffc04e88: 83 61 00 0c lwz r27,12(r1) ffc04e8c: 7c 08 03 a6 mtlr r0 ffc04e90: 83 81 00 10 lwz r28,16(r1) ffc04e94: 83 a1 00 14 lwz r29,20(r1) ffc04e98: 83 c1 00 18 lwz r30,24(r1) ffc04e9c: 83 e1 00 1c lwz r31,28(r1) ffc04ea0: 38 21 00 20 addi r1,r1,32 ffc04ea4: 4e 80 00 20 blr =============================================================================== ffc04ea8 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc04ea8: 94 21 ff d0 stwu r1,-48(r1) ffc04eac: 7c 08 02 a6 mflr r0 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc04eb0: 38 e0 00 00 li r7,0 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc04eb4: 93 a1 00 24 stw r29,36(r1) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc04eb8: 3b a1 00 18 addi r29,r1,24 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc04ebc: 93 c1 00 28 stw r30,40(r1) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc04ec0: 3b c1 00 1c addi r30,r1,28 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc04ec4: 90 a1 00 18 stw r5,24(r1) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc04ec8: 7f a5 eb 78 mr r5,r29 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc04ecc: 90 c1 00 1c stw r6,28(r1) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc04ed0: 7f c6 f3 78 mr r6,r30 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { ffc04ed4: 93 81 00 20 stw r28,32(r1) ffc04ed8: 7c 7c 1b 78 mr r28,r3 ffc04edc: 93 e1 00 2c stw r31,44(r1) ffc04ee0: 7c 9f 23 78 mr r31,r4 ffc04ee4: 90 01 00 34 stw r0,52(r1) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc04ee8: 4b ff fe 99 bl ffc04d80 ffc04eec: 2f 83 00 00 cmpwi cr7,r3,0 ffc04ef0: 41 be 01 08 beq+ cr7,ffc04ff8 <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) ffc04ef4: 7f 83 e3 78 mr r3,r28 ffc04ef8: 38 9f 00 04 addi r4,r31,4 ffc04efc: 7f a5 eb 78 mr r5,r29 ffc04f00: 7f c6 f3 78 mr r6,r30 ffc04f04: 38 e0 00 00 li r7,0 ffc04f08: 4b ff fe 79 bl ffc04d80 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc04f0c: 2f 83 00 00 cmpwi cr7,r3,0 ffc04f10: 41 be 00 e8 beq+ cr7,ffc04ff8 <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) ffc04f14: 7f 83 e3 78 mr r3,r28 ffc04f18: 38 81 00 08 addi r4,r1,8 ffc04f1c: 4b ff fd 21 bl ffc04c3c { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc04f20: 2f 83 00 00 cmpwi cr7,r3,0 ffc04f24: 41 be 00 d4 beq+ cr7,ffc04ff8 <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) ffc04f28: 7f 83 e3 78 mr r3,r28 ffc04f2c: 7f a5 eb 78 mr r5,r29 ffc04f30: 7f c6 f3 78 mr r6,r30 ffc04f34: 38 81 00 0c addi r4,r1,12 ffc04f38: 38 e0 00 01 li r7,1 ffc04f3c: 4b ff fe 45 bl ffc04d80 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) ffc04f40: 2f 83 00 00 cmpwi cr7,r3,0 ffc04f44: 41 9e 00 b4 beq- cr7,ffc04ff8 <== 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; ffc04f48: 80 01 00 08 lwz r0,8(r1) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc04f4c: 81 41 00 0c lwz r10,12(r1) if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; ffc04f50: b0 1f 00 08 sth r0,8(r31) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc04f54: 38 00 00 01 li r0,1 ffc04f58: 7d 49 53 78 mr r9,r10 ffc04f5c: 48 00 00 14 b ffc04f70 if(*cp == ',') memcount++; ffc04f60: 69 68 00 2c xori r8,r11,44 ffc04f64: 21 08 00 00 subfic r8,r8,0 ffc04f68: 7d 00 01 94 addze r8,r0 ffc04f6c: 7d 00 43 78 mr r0,r8 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc04f70: 89 69 00 00 lbz r11,0(r9) ffc04f74: 39 29 00 01 addi r9,r9,1 ffc04f78: 2f 8b 00 00 cmpwi cr7,r11,0 ffc04f7c: 40 9e ff e4 bne+ cr7,ffc04f60 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) ffc04f80: 54 09 10 3a rlwinm r9,r0,2,0,29 ffc04f84: 38 09 00 13 addi r0,r9,19 ffc04f88: 81 21 00 1c lwz r9,28(r1) ffc04f8c: 7f 89 00 40 cmplw cr7,r9,r0 ffc04f90: 41 9c 00 68 blt- cr7,ffc04ff8 <== NEVER TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); ffc04f94: 81 21 00 18 lwz r9,24(r1) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; ffc04f98: 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); ffc04f9c: 39 29 00 0f addi r9,r9,15 ffc04fa0: 55 29 00 36 rlwinm r9,r9,0,0,27 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; ffc04fa4: 91 49 00 00 stw r10,0(r9) for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0'; ffc04fa8: 39 40 00 00 li r10,0 /* * 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); ffc04fac: 91 3f 00 0c stw r9,12(r31) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; ffc04fb0: 81 21 00 0c lwz r9,12(r1) ffc04fb4: 48 00 00 1c b ffc04fd0 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { ffc04fb8: 40 ba 00 18 bne+ cr6,ffc04fd0 <== ALWAYS TAKEN *cp = '\0'; ffc04fbc: 99 49 ff ff stb r10,-1(r9) <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; ffc04fc0: 55 60 10 3a rlwinm r0,r11,2,0,29 <== NOT EXECUTED ffc04fc4: 39 6b 00 01 addi r11,r11,1 <== NOT EXECUTED ffc04fc8: 81 1f 00 0c lwz r8,12(r31) <== NOT EXECUTED ffc04fcc: 7d 28 01 2e stwx r9,r8,r0 <== NOT EXECUTED ffc04fd0: 39 29 00 01 addi r9,r9,1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc04fd4: 88 09 ff ff lbz r0,-1(r9) ffc04fd8: 2f 80 00 00 cmpwi cr7,r0,0 if(*cp == ',') { ffc04fdc: 2f 00 00 2c cmpwi cr6,r0,44 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { ffc04fe0: 40 9e ff d8 bne+ cr7,ffc04fb8 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; ffc04fe4: 81 3f 00 0c lwz r9,12(r31) ffc04fe8: 55 6b 10 3a rlwinm r11,r11,2,0,29 ffc04fec: 38 60 00 01 li r3,1 ffc04ff0: 7c 09 59 2e stwx r0,r9,r11 return 1; ffc04ff4: 48 00 00 08 b ffc04ffc ffc04ff8: 38 60 00 00 li r3,0 <== NOT EXECUTED } ffc04ffc: 80 01 00 34 lwz r0,52(r1) ffc05000: 83 81 00 20 lwz r28,32(r1) ffc05004: 7c 08 03 a6 mtlr r0 ffc05008: 83 a1 00 24 lwz r29,36(r1) ffc0500c: 83 c1 00 28 lwz r30,40(r1) ffc05010: 83 e1 00 2c lwz r31,44(r1) ffc05014: 38 21 00 30 addi r1,r1,48 ffc05018: 4e 80 00 20 blr =============================================================================== ffc05078 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc05078: 94 21 ff d0 stwu r1,-48(r1) ffc0507c: 7c 08 02 a6 mflr r0 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc05080: 38 e0 00 00 li r7,0 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc05084: 93 81 00 20 stw r28,32(r1) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc05088: 3b 81 00 18 addi r28,r1,24 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc0508c: 93 a1 00 24 stw r29,36(r1) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc05090: 3b a1 00 1c addi r29,r1,28 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc05094: 90 a1 00 18 stw r5,24(r1) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc05098: 7f 85 e3 78 mr r5,r28 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc0509c: 90 c1 00 1c stw r6,28(r1) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc050a0: 7f a6 eb 78 mr r6,r29 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { ffc050a4: 93 c1 00 28 stw r30,40(r1) ffc050a8: 7c 7e 1b 78 mr r30,r3 ffc050ac: 93 e1 00 2c stw r31,44(r1) ffc050b0: 7c 9f 23 78 mr r31,r4 ffc050b4: 90 01 00 34 stw r0,52(r1) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc050b8: 4b ff fc c9 bl ffc04d80 ffc050bc: 2f 83 00 00 cmpwi cr7,r3,0 ffc050c0: 41 be 00 e4 beq+ cr7,ffc051a4 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) ffc050c4: 7f c3 f3 78 mr r3,r30 ffc050c8: 38 9f 00 04 addi r4,r31,4 ffc050cc: 7f 85 e3 78 mr r5,r28 ffc050d0: 7f a6 eb 78 mr r6,r29 ffc050d4: 38 e0 00 00 li r7,0 ffc050d8: 4b ff fc a9 bl ffc04d80 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc050dc: 2f 83 00 00 cmpwi cr7,r3,0 ffc050e0: 41 be 00 c4 beq+ cr7,ffc051a4 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) ffc050e4: 7f c3 f3 78 mr r3,r30 ffc050e8: 38 81 00 08 addi r4,r1,8 ffc050ec: 4b ff fb 51 bl ffc04c3c size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc050f0: 2f 83 00 00 cmpwi cr7,r3,0 ffc050f4: 41 be 00 b0 beq+ cr7,ffc051a4 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) ffc050f8: 7f c3 f3 78 mr r3,r30 ffc050fc: 38 81 00 0c addi r4,r1,12 ffc05100: 4b ff fb 3d bl ffc04c3c size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc05104: 2f 83 00 00 cmpwi cr7,r3,0 ffc05108: 41 be 00 9c beq+ cr7,ffc051a4 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) ffc0510c: 7f c3 f3 78 mr r3,r30 ffc05110: 38 9f 00 0c addi r4,r31,12 ffc05114: 7f 85 e3 78 mr r5,r28 ffc05118: 7f a6 eb 78 mr r6,r29 ffc0511c: 38 e0 00 00 li r7,0 ffc05120: 4b ff fc 61 bl ffc04d80 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc05124: 2f 83 00 00 cmpwi cr7,r3,0 ffc05128: 41 be 00 7c beq+ cr7,ffc051a4 <== 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) ffc0512c: 7f c3 f3 78 mr r3,r30 ffc05130: 38 9f 00 10 addi r4,r31,16 ffc05134: 7f 85 e3 78 mr r5,r28 ffc05138: 7f a6 eb 78 mr r6,r29 ffc0513c: 38 e0 00 00 li r7,0 ffc05140: 4b ff fc 41 bl ffc04d80 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc05144: 2f 83 00 00 cmpwi cr7,r3,0 ffc05148: 41 be 00 5c beq+ cr7,ffc051a4 <== 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) ffc0514c: 7f c3 f3 78 mr r3,r30 ffc05150: 38 9f 00 14 addi r4,r31,20 ffc05154: 7f 85 e3 78 mr r5,r28 ffc05158: 7f a6 eb 78 mr r6,r29 ffc0515c: 38 e0 00 00 li r7,0 ffc05160: 4b ff fc 21 bl ffc04d80 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc05164: 2f 83 00 00 cmpwi cr7,r3,0 ffc05168: 41 be 00 3c beq+ cr7,ffc051a4 <== 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)) ffc0516c: 7f c3 f3 78 mr r3,r30 ffc05170: 7f 85 e3 78 mr r5,r28 ffc05174: 7f a6 eb 78 mr r6,r29 ffc05178: 38 9f 00 18 addi r4,r31,24 ffc0517c: 38 e0 00 01 li r7,1 ffc05180: 4b ff fc 01 bl ffc04d80 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) ffc05184: 2f 83 00 00 cmpwi cr7,r3,0 ffc05188: 41 9e 00 1c beq- cr7,ffc051a4 <== 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; ffc0518c: 80 01 00 08 lwz r0,8(r1) pwd->pw_gid = pwgid; ffc05190: 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; ffc05194: b0 1f 00 08 sth r0,8(r31) pwd->pw_gid = pwgid; ffc05198: 80 01 00 0c lwz r0,12(r1) ffc0519c: b0 1f 00 0a sth r0,10(r31) return 1; ffc051a0: 48 00 00 08 b ffc051a8 ffc051a4: 38 60 00 00 li r3,0 <== NOT EXECUTED } ffc051a8: 80 01 00 34 lwz r0,52(r1) ffc051ac: 83 81 00 20 lwz r28,32(r1) ffc051b0: 7c 08 03 a6 mtlr r0 ffc051b4: 83 a1 00 24 lwz r29,36(r1) ffc051b8: 83 c1 00 28 lwz r30,40(r1) ffc051bc: 83 e1 00 2c lwz r31,44(r1) ffc051c0: 38 21 00 30 addi r1,r1,48 ffc051c4: 4e 80 00 20 blr =============================================================================== ffc089d8 : int sched_get_priority_max( int policy ) { switch ( policy ) { ffc089d8: 2b 83 00 04 cmplwi cr7,r3,4 #include int sched_get_priority_max( int policy ) { ffc089dc: 94 21 ff f8 stwu r1,-8(r1) ffc089e0: 7c 08 02 a6 mflr r0 ffc089e4: 90 01 00 0c stw r0,12(r1) switch ( policy ) { ffc089e8: 41 9d 00 14 bgt- cr7,ffc089fc ffc089ec: 38 00 00 01 li r0,1 ffc089f0: 7c 03 18 30 slw r3,r0,r3 ffc089f4: 70 60 00 17 andi. r0,r3,23 ffc089f8: 40 82 00 18 bne- ffc08a10 <== ALWAYS TAKEN case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc089fc: 48 00 a3 95 bl ffc12d90 <__errno> ffc08a00: 38 00 00 16 li r0,22 ffc08a04: 90 03 00 00 stw r0,0(r3) ffc08a08: 38 60 ff ff li r3,-1 ffc08a0c: 48 00 00 10 b ffc08a1c } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; ffc08a10: 3d 20 00 00 lis r9,0 ffc08a14: 88 69 26 cc lbz r3,9932(r9) ffc08a18: 38 63 ff ff addi r3,r3,-1 } ffc08a1c: 80 01 00 0c lwz r0,12(r1) ffc08a20: 38 21 00 08 addi r1,r1,8 ffc08a24: 7c 08 03 a6 mtlr r0 ffc08a28: 4e 80 00 20 blr =============================================================================== ffc08a2c : int sched_get_priority_min( int policy ) { switch ( policy ) { ffc08a2c: 2b 83 00 04 cmplwi cr7,r3,4 #include int sched_get_priority_min( int policy ) { ffc08a30: 94 21 ff f8 stwu r1,-8(r1) ffc08a34: 7c 08 02 a6 mflr r0 ffc08a38: 90 01 00 0c stw r0,12(r1) switch ( policy ) { ffc08a3c: 41 9d 00 18 bgt- cr7,ffc08a54 ffc08a40: 38 00 00 01 li r0,1 ffc08a44: 7c 03 18 30 slw r3,r0,r3 ffc08a48: 70 60 00 17 andi. r0,r3,23 ffc08a4c: 38 60 00 01 li r3,1 ffc08a50: 40 82 00 14 bne- ffc08a64 <== ALWAYS TAKEN case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc08a54: 48 00 a3 3d bl ffc12d90 <__errno> ffc08a58: 38 00 00 16 li r0,22 ffc08a5c: 90 03 00 00 stw r0,0(r3) ffc08a60: 38 60 ff ff li r3,-1 } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } ffc08a64: 80 01 00 0c lwz r0,12(r1) ffc08a68: 38 21 00 08 addi r1,r1,8 ffc08a6c: 7c 08 03 a6 mtlr r0 ffc08a70: 4e 80 00 20 blr =============================================================================== ffc08a74 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { ffc08a74: 94 21 ff e8 stwu r1,-24(r1) ffc08a78: 7c 08 02 a6 mflr r0 ffc08a7c: 93 e1 00 14 stw r31,20(r1) /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) ffc08a80: 7c 7f 1b 79 mr. r31,r3 int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { ffc08a84: 90 01 00 1c stw r0,28(r1) /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) ffc08a88: 41 a2 00 24 beq+ ffc08aac <== NEVER TAKEN ffc08a8c: 90 81 00 08 stw r4,8(r1) ffc08a90: 4b ff c2 5d bl ffc04cec ffc08a94: 7f 9f 18 00 cmpw cr7,r31,r3 ffc08a98: 80 81 00 08 lwz r4,8(r1) ffc08a9c: 41 be 00 10 beq+ cr7,ffc08aac rtems_set_errno_and_return_minus_one( ESRCH ); ffc08aa0: 48 00 a2 f1 bl ffc12d90 <__errno> ffc08aa4: 38 00 00 03 li r0,3 ffc08aa8: 48 00 00 14 b ffc08abc if ( !interval ) ffc08aac: 2f 84 00 00 cmpwi cr7,r4,0 ffc08ab0: 40 be 00 18 bne+ cr7,ffc08ac8 rtems_set_errno_and_return_minus_one( EINVAL ); ffc08ab4: 48 00 a2 dd bl ffc12d90 <__errno> ffc08ab8: 38 00 00 16 li r0,22 ffc08abc: 90 03 00 00 stw r0,0(r3) ffc08ac0: 38 60 ff ff li r3,-1 ffc08ac4: 48 00 00 14 b ffc08ad8 _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); ffc08ac8: 3d 20 00 00 lis r9,0 ffc08acc: 80 69 27 90 lwz r3,10128(r9) ffc08ad0: 48 00 41 11 bl ffc0cbe0 <_Timespec_From_ticks> ffc08ad4: 38 60 00 00 li r3,0 return 0; } ffc08ad8: 80 01 00 1c lwz r0,28(r1) ffc08adc: 83 e1 00 14 lwz r31,20(r1) ffc08ae0: 38 21 00 18 addi r1,r1,24 ffc08ae4: 7c 08 03 a6 mtlr r0 ffc08ae8: 4e 80 00 20 blr =============================================================================== ffc0b368 : rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0b368: 3d 20 00 00 lis r9,0 int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { ffc0b36c: 94 21 ff b8 stwu r1,-72(r1) ffc0b370: 7c 08 02 a6 mflr r0 ffc0b374: 81 69 27 90 lwz r11,10128(r9) ffc0b378: 93 c1 00 40 stw r30,64(r1) ffc0b37c: 7c 9e 23 78 mr r30,r4 ffc0b380: 39 6b 00 01 addi r11,r11,1 ffc0b384: 93 e1 00 44 stw r31,68(r1) ffc0b388: 7c 7f 1b 78 mr r31,r3 ffc0b38c: 90 01 00 4c stw r0,76(r1) ffc0b390: 93 61 00 34 stw r27,52(r1) ffc0b394: 93 81 00 38 stw r28,56(r1) ffc0b398: 93 a1 00 3c stw r29,60(r1) ffc0b39c: 90 a1 00 28 stw r5,40(r1) ffc0b3a0: 91 69 27 90 stw r11,10128(r9) ffc0b3a4: 90 c1 00 2c stw r6,44(r1) POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { ffc0b3a8: 70 9c 02 00 andi. r28,r4,512 ffc0b3ac: 40 82 00 0c bne- ffc0b3b8 ffc0b3b0: 3b a0 00 00 li r29,0 ffc0b3b4: 48 00 00 20 b ffc0b3d4 va_start(arg, oflag); ffc0b3b8: 38 01 00 50 addi r0,r1,80 mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); ffc0b3bc: 83 a1 00 2c lwz r29,44(r1) Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); ffc0b3c0: 90 01 00 18 stw r0,24(r1) ffc0b3c4: 38 01 00 20 addi r0,r1,32 ffc0b3c8: 90 01 00 1c stw r0,28(r1) mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); ffc0b3cc: 38 00 00 04 li r0,4 ffc0b3d0: 98 01 00 14 stb r0,20(r1) va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); ffc0b3d4: 7f e3 fb 78 mr r3,r31 ffc0b3d8: 38 81 00 08 addi r4,r1,8 ffc0b3dc: 48 00 72 05 bl ffc125e0 <_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 ) { ffc0b3e0: 7c 7b 1b 79 mr. r27,r3 ffc0b3e4: 41 82 00 24 beq- ffc0b408 /* * 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) ) ) { ffc0b3e8: 2f 9b 00 02 cmpwi cr7,r27,2 ffc0b3ec: 40 9e 00 0c bne- cr7,ffc0b3f8 <== NEVER TAKEN ffc0b3f0: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0b3f4: 40 9e 00 68 bne- cr7,ffc0b45c _Thread_Enable_dispatch(); ffc0b3f8: 48 00 31 b1 bl ffc0e5a8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); ffc0b3fc: 48 00 b3 39 bl ffc16734 <__errno> ffc0b400: 93 63 00 00 stw r27,0(r3) ffc0b404: 48 00 00 20 b ffc0b424 /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { ffc0b408: 73 de 0a 00 andi. r30,r30,2560 ffc0b40c: 2f 9e 0a 00 cmpwi cr7,r30,2560 ffc0b410: 40 be 00 1c bne+ cr7,ffc0b42c _Thread_Enable_dispatch(); ffc0b414: 48 00 31 95 bl ffc0e5a8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); ffc0b418: 48 00 b3 1d bl ffc16734 <__errno> ffc0b41c: 38 00 00 11 li r0,17 ffc0b420: 90 03 00 00 stw r0,0(r3) ffc0b424: 38 60 ff ff li r3,-1 ffc0b428: 48 00 00 64 b ffc0b48c ffc0b42c: 80 81 00 08 lwz r4,8(r1) ffc0b430: 3c 60 00 00 lis r3,0 ffc0b434: 38 a1 00 10 addi r5,r1,16 ffc0b438: 38 63 30 d8 addi r3,r3,12504 ffc0b43c: 48 00 25 f1 bl ffc0da2c <_Objects_Get> } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; ffc0b440: 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 ); ffc0b444: 90 61 00 0c stw r3,12(r1) the_semaphore->open_count += 1; ffc0b448: 38 09 00 01 addi r0,r9,1 ffc0b44c: 90 03 00 18 stw r0,24(r3) _Thread_Enable_dispatch(); ffc0b450: 48 00 31 59 bl ffc0e5a8 <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); ffc0b454: 48 00 31 55 bl ffc0e5a8 <_Thread_Enable_dispatch> goto return_id; ffc0b458: 48 00 00 2c b ffc0b484 /* * 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( ffc0b45c: 7f a5 eb 78 mr r5,r29 ffc0b460: 7f e3 fb 78 mr r3,r31 ffc0b464: 38 80 00 00 li r4,0 ffc0b468: 38 c1 00 0c addi r6,r1,12 ffc0b46c: 48 00 6f c9 bl ffc12434 <_POSIX_Semaphore_Create_support> ffc0b470: 7c 7f 1b 78 mr r31,r3 /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); ffc0b474: 48 00 31 35 bl ffc0e5a8 <_Thread_Enable_dispatch> if ( status == -1 ) ffc0b478: 2f 9f ff ff cmpwi cr7,r31,-1 ffc0b47c: 38 60 ff ff li r3,-1 ffc0b480: 41 9e 00 0c beq- cr7,ffc0b48c 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; ffc0b484: 80 61 00 0c lwz r3,12(r1) ffc0b488: 38 63 00 08 addi r3,r3,8 #endif return id; } ffc0b48c: 80 01 00 4c lwz r0,76(r1) ffc0b490: 83 61 00 34 lwz r27,52(r1) ffc0b494: 7c 08 03 a6 mtlr r0 ffc0b498: 83 81 00 38 lwz r28,56(r1) ffc0b49c: 83 a1 00 3c lwz r29,60(r1) ffc0b4a0: 83 c1 00 40 lwz r30,64(r1) ffc0b4a4: 83 e1 00 44 lwz r31,68(r1) ffc0b4a8: 38 21 00 48 addi r1,r1,72 ffc0b4ac: 4e 80 00 20 blr =============================================================================== ffc05314 : return NULL; return &grent; } void setgrent(void) { ffc05314: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED ffc05318: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc0531c: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED init_etc_passwd_group(); ffc05320: 4b ff ff 05 bl ffc05224 <== NOT EXECUTED if (group_fp != NULL) ffc05324: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc05328: 80 69 28 8c lwz r3,10380(r9) <== NOT EXECUTED ffc0532c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc05330: 41 9e 00 08 beq- cr7,ffc05338 <== NOT EXECUTED fclose(group_fp); ffc05334: 48 00 f3 59 bl ffc1468c <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); ffc05338: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc0533c: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc05340: 38 63 1d c7 addi r3,r3,7623 <== NOT EXECUTED ffc05344: 38 84 15 f4 addi r4,r4,5620 <== NOT EXECUTED ffc05348: 48 00 fc 81 bl ffc14fc8 <== NOT EXECUTED } ffc0534c: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED { init_etc_passwd_group(); if (group_fp != NULL) fclose(group_fp); group_fp = fopen("/etc/group", "r"); ffc05350: 3d 20 00 00 lis r9,0 <== NOT EXECUTED } ffc05354: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED { init_etc_passwd_group(); if (group_fp != NULL) fclose(group_fp); group_fp = fopen("/etc/group", "r"); ffc05358: 90 69 28 8c stw r3,10380(r9) <== NOT EXECUTED } ffc0535c: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc05360: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc05560 : return NULL; return &pwent; } void setpwent(void) { ffc05560: 94 21 ff f8 stwu r1,-8(r1) <== NOT EXECUTED ffc05564: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc05568: 90 01 00 0c stw r0,12(r1) <== NOT EXECUTED init_etc_passwd_group(); ffc0556c: 4b ff fc b9 bl ffc05224 <== NOT EXECUTED if (passwd_fp != NULL) ffc05570: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc05574: 80 69 28 90 lwz r3,10384(r9) <== NOT EXECUTED ffc05578: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc0557c: 41 9e 00 08 beq- cr7,ffc05584 <== NOT EXECUTED fclose(passwd_fp); ffc05580: 48 00 f1 0d bl ffc1468c <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); ffc05584: 3c 60 ff c2 lis r3,-62 <== NOT EXECUTED ffc05588: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED ffc0558c: 38 63 1d 54 addi r3,r3,7508 <== NOT EXECUTED ffc05590: 38 84 15 f4 addi r4,r4,5620 <== NOT EXECUTED ffc05594: 48 00 fa 35 bl ffc14fc8 <== NOT EXECUTED } ffc05598: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED { init_etc_passwd_group(); if (passwd_fp != NULL) fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); ffc0559c: 3d 20 00 00 lis r9,0 <== NOT EXECUTED } ffc055a0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED { init_etc_passwd_group(); if (passwd_fp != NULL) fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); ffc055a4: 90 69 28 90 stw r3,10384(r9) <== NOT EXECUTED } ffc055a8: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED ffc055ac: 4e 80 00 20 blr <== NOT EXECUTED =============================================================================== ffc08890 : struct sigaction *oact ) { ISR_Level level; if ( oact ) ffc08890: 2c 05 00 00 cmpwi r5,0 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { ffc08894: 94 21 ff e8 stwu r1,-24(r1) ffc08898: 7c 08 02 a6 mflr r0 ffc0889c: 93 c1 00 10 stw r30,16(r1) ffc088a0: 7c 9e 23 78 mr r30,r4 ffc088a4: 90 01 00 1c stw r0,28(r1) ffc088a8: 93 81 00 08 stw r28,8(r1) ffc088ac: 93 a1 00 0c stw r29,12(r1) ffc088b0: 93 e1 00 14 stw r31,20(r1) ISR_Level level; if ( oact ) ffc088b4: 41 82 00 2c beq- ffc088e0 *oact = _POSIX_signals_Vectors[ sig ]; ffc088b8: 1c 03 00 0c mulli r0,r3,12 ffc088bc: 3d 60 00 00 lis r11,0 ffc088c0: 39 6b 31 b0 addi r11,r11,12720 ffc088c4: 7d 2b 02 14 add r9,r11,r0 ffc088c8: 7d 6b 00 2e lwzx r11,r11,r0 ffc088cc: 81 49 00 08 lwz r10,8(r9) ffc088d0: 80 09 00 04 lwz r0,4(r9) ffc088d4: 91 45 00 08 stw r10,8(r5) ffc088d8: 91 65 00 00 stw r11,0(r5) ffc088dc: 90 05 00 04 stw r0,4(r5) if ( !sig ) ffc088e0: 2f 83 00 00 cmpwi cr7,r3,0 ffc088e4: 41 9e 00 18 beq- cr7,ffc088fc rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) ffc088e8: 38 03 ff ff addi r0,r3,-1 ffc088ec: 2b 80 00 1f cmplwi cr7,r0,31 ffc088f0: 41 9d 00 0c bgt- cr7,ffc088fc * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) ffc088f4: 2f 83 00 09 cmpwi cr7,r3,9 ffc088f8: 40 be 00 18 bne+ cr7,ffc08910 rtems_set_errno_and_return_minus_one( EINVAL ); ffc088fc: 48 00 a6 b1 bl ffc12fac <__errno> ffc08900: 38 00 00 16 li r0,22 ffc08904: 90 03 00 00 stw r0,0(r3) ffc08908: 38 00 ff ff li r0,-1 ffc0890c: 48 00 00 7c b ffc08988 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { ffc08910: 2f 9e 00 00 cmpwi cr7,r30,0 ffc08914: 38 00 00 00 li r0,0 ffc08918: 41 9e 00 70 beq- cr7,ffc08988 <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0891c: 7f 80 00 a6 mfmsr r28 ffc08920: 7c 10 42 a6 mfsprg r0,0 ffc08924: 7f 80 00 78 andc r0,r28,r0 ffc08928: 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 ) { ffc0892c: 80 1e 00 08 lwz r0,8(r30) ffc08930: 3f a0 00 00 lis r29,0 ffc08934: 3b bd 31 b0 addi r29,r29,12720 ffc08938: 2f 80 00 00 cmpwi cr7,r0,0 ffc0893c: 1f e3 00 0c mulli r31,r3,12 ffc08940: 40 be 00 20 bne+ cr7,ffc08960 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; ffc08944: 3d 60 ff c2 lis r11,-62 ffc08948: 39 6b 07 80 addi r11,r11,1920 ffc0894c: 7d 2b fa 14 add r9,r11,r31 ffc08950: 7d 4b f8 2e lwzx r10,r11,r31 ffc08954: 80 09 00 04 lwz r0,4(r9) ffc08958: 81 69 00 08 lwz r11,8(r9) ffc0895c: 48 00 00 14 b ffc08970 } else { _POSIX_signals_Clear_process_signals( sig ); ffc08960: 48 00 68 9d bl ffc0f1fc <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; ffc08964: 81 7e 00 08 lwz r11,8(r30) ffc08968: 81 5e 00 00 lwz r10,0(r30) ffc0896c: 80 1e 00 04 lwz r0,4(r30) ffc08970: 7d 3d fa 14 add r9,r29,r31 ffc08974: 7d 5d f9 2e stwx r10,r29,r31 ffc08978: 91 69 00 08 stw r11,8(r9) ffc0897c: 90 09 00 04 stw r0,4(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc08980: 7f 80 01 24 mtmsr r28 ffc08984: 38 00 00 00 li r0,0 * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } ffc08988: 7c 03 03 78 mr r3,r0 ffc0898c: 80 01 00 1c lwz r0,28(r1) ffc08990: 83 81 00 08 lwz r28,8(r1) ffc08994: 7c 08 03 a6 mtlr r0 ffc08998: 83 a1 00 0c lwz r29,12(r1) ffc0899c: 83 c1 00 10 lwz r30,16(r1) ffc089a0: 83 e1 00 14 lwz r31,20(r1) ffc089a4: 38 21 00 18 addi r1,r1,24 ffc089a8: 4e 80 00 20 blr =============================================================================== ffc0b214 : #include int sigsuspend( const sigset_t *sigmask ) { ffc0b214: 94 21 ff e0 stwu r1,-32(r1) ffc0b218: 7c 08 02 a6 mflr r0 ffc0b21c: 7c 64 1b 78 mr r4,r3 ffc0b220: 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 ); ffc0b224: 3b e1 00 08 addi r31,r1,8 ffc0b228: 7f e5 fb 78 mr r5,r31 #include int sigsuspend( const sigset_t *sigmask ) { ffc0b22c: 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 ); ffc0b230: 38 60 00 01 li r3,1 (void) sigfillset( &all_signals ); ffc0b234: 3b c1 00 0c addi r30,r1,12 #include int sigsuspend( const sigset_t *sigmask ) { ffc0b238: 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 ); ffc0b23c: 4b ff ff 99 bl ffc0b1d4 (void) sigfillset( &all_signals ); ffc0b240: 7f c3 f3 78 mr r3,r30 ffc0b244: 4b ff fe 89 bl ffc0b0cc status = sigtimedwait( &all_signals, NULL, NULL ); ffc0b248: 7f c3 f3 78 mr r3,r30 ffc0b24c: 38 80 00 00 li r4,0 ffc0b250: 38 a0 00 00 li r5,0 ffc0b254: 48 00 00 a1 bl ffc0b2f4 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); ffc0b258: 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 ); ffc0b25c: 7c 7e 1b 78 mr r30,r3 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); ffc0b260: 38 a0 00 00 li r5,0 ffc0b264: 38 60 00 00 li r3,0 ffc0b268: 4b ff ff 6d bl ffc0b1d4 /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) ffc0b26c: 2f 9e ff ff cmpwi cr7,r30,-1 ffc0b270: 41 be 00 10 beq+ cr7,ffc0b280 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINTR ); ffc0b274: 48 00 a3 61 bl ffc155d4 <__errno> ffc0b278: 38 00 00 04 li r0,4 ffc0b27c: 90 03 00 00 stw r0,0(r3) return status; } ffc0b280: 80 01 00 24 lwz r0,36(r1) ffc0b284: 38 60 ff ff li r3,-1 ffc0b288: 83 c1 00 18 lwz r30,24(r1) ffc0b28c: 7c 08 03 a6 mtlr r0 ffc0b290: 83 e1 00 1c lwz r31,28(r1) ffc0b294: 38 21 00 20 addi r1,r1,32 ffc0b298: 4e 80 00 20 blr =============================================================================== ffc08e44 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { ffc08e44: 94 21 ff d8 stwu r1,-40(r1) ffc08e48: 7c 08 02 a6 mflr r0 ffc08e4c: 93 c1 00 20 stw r30,32(r1) ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) ffc08e50: 7c 7e 1b 79 mr. r30,r3 int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { ffc08e54: 93 a1 00 1c stw r29,28(r1) ffc08e58: 7c 9d 23 78 mr r29,r4 ffc08e5c: 93 e1 00 24 stw r31,36(r1) ffc08e60: 7c bf 2b 78 mr r31,r5 ffc08e64: 90 01 00 2c stw r0,44(r1) ffc08e68: 93 81 00 18 stw r28,24(r1) ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) ffc08e6c: 41 82 00 2c beq- ffc08e98 /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { ffc08e70: 2f 85 00 00 cmpwi cr7,r5,0 ffc08e74: 41 9e 00 38 beq- cr7,ffc08eac if ( !_Timespec_Is_valid( timeout ) ) ffc08e78: 7c a3 2b 78 mr r3,r5 ffc08e7c: 48 00 42 01 bl ffc0d07c <_Timespec_Is_valid> ffc08e80: 2f 83 00 00 cmpwi cr7,r3,0 ffc08e84: 41 9e 00 14 beq- cr7,ffc08e98 rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); ffc08e88: 7f e3 fb 78 mr r3,r31 ffc08e8c: 48 00 42 65 bl ffc0d0f0 <_Timespec_To_ticks> if ( !interval ) ffc08e90: 7c 64 1b 79 mr. r4,r3 ffc08e94: 40 a2 00 1c bne+ ffc08eb0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ffc08e98: 48 00 a5 59 bl ffc133f0 <__errno> ffc08e9c: 38 00 00 16 li r0,22 ffc08ea0: 90 03 00 00 stw r0,0(r3) ffc08ea4: 3b c0 ff ff li r30,-1 ffc08ea8: 48 00 01 54 b ffc08ffc ffc08eac: 38 80 00 00 li r4,0 /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; ffc08eb0: 2f 9d 00 00 cmpwi cr7,r29,0 ffc08eb4: 3b e1 00 08 addi r31,r1,8 ffc08eb8: 41 9e 00 08 beq- cr7,ffc08ec0 ffc08ebc: 7f bf eb 78 mr r31,r29 the_thread = _Thread_Executing; ffc08ec0: 3d 20 00 00 lis r9,0 ffc08ec4: 81 29 28 40 lwz r9,10304(r9) api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc08ec8: 83 89 01 48 lwz r28,328(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc08ecc: 7f a0 00 a6 mfmsr r29 ffc08ed0: 7c 10 42 a6 mfsprg r0,0 ffc08ed4: 7f a0 00 78 andc r0,r29,r0 ffc08ed8: 7c 00 01 24 mtmsr r0 */ /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { ffc08edc: 80 1e 00 00 lwz r0,0(r30) ffc08ee0: 80 7c 00 d0 lwz r3,208(r28) ffc08ee4: 7c 0b 18 39 and. r11,r0,r3 ffc08ee8: 41 a2 00 3c beq+ ffc08f24 /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); ffc08eec: 4b ff ff 01 bl ffc08dec <_POSIX_signals_Get_highest> _POSIX_signals_Clear_signals( ffc08ef0: 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 ); ffc08ef4: 90 7f 00 00 stw r3,0(r31) ffc08ef8: 7c 64 1b 78 mr r4,r3 _POSIX_signals_Clear_signals( ffc08efc: 38 c0 00 00 li r6,0 ffc08f00: 7f 83 e3 78 mr r3,r28 ffc08f04: 38 e0 00 00 li r7,0 ffc08f08: 48 00 6b 49 bl ffc0fa50 <_POSIX_signals_Clear_signals> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc08f0c: 7f a0 01 24 mtmsr r29 false, false ); _ISR_Enable( level ); the_info->si_code = SI_USER; ffc08f10: 38 00 00 01 li r0,1 ffc08f14: 90 1f 00 04 stw r0,4(r31) the_info->si_value.sival_int = 0; ffc08f18: 38 00 00 00 li r0,0 ffc08f1c: 90 1f 00 08 stw r0,8(r31) ffc08f20: 48 00 00 d8 b ffc08ff8 return the_info->si_signo; } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { ffc08f24: 3d 60 00 00 lis r11,0 ffc08f28: 80 6b 28 74 lwz r3,10356(r11) ffc08f2c: 7c 0b 18 39 and. r11,r0,r3 ffc08f30: 41 a2 00 40 beq+ ffc08f70 signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); ffc08f34: 4b ff fe b9 bl ffc08dec <_POSIX_signals_Get_highest> _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); ffc08f38: 7f e5 fb 78 mr r5,r31 } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); ffc08f3c: 7c 7e 1b 78 mr r30,r3 _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); ffc08f40: 7f c4 f3 78 mr r4,r30 ffc08f44: 7f 83 e3 78 mr r3,r28 ffc08f48: 38 c0 00 01 li r6,1 ffc08f4c: 38 e0 00 00 li r7,0 ffc08f50: 48 00 6b 01 bl ffc0fa50 <_POSIX_signals_Clear_signals> ffc08f54: 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; ffc08f58: 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; ffc08f5c: 93 df 00 00 stw r30,0(r31) the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; ffc08f60: 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; ffc08f64: 38 00 00 01 li r0,1 ffc08f68: 90 1f 00 04 stw r0,4(r31) the_info->si_value.sival_int = 0; return signo; ffc08f6c: 48 00 00 90 b ffc08ffc ffc08f70: 3d 60 00 00 lis r11,0 ffc08f74: 81 4b 28 00 lwz r10,10240(r11) ffc08f78: 38 0a 00 01 addi r0,r10,1 ffc08f7c: 90 0b 28 00 stw r0,10240(r11) } the_info->si_signo = -1; ffc08f80: 38 00 ff ff li r0,-1 ffc08f84: 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; ffc08f88: 38 00 00 04 li r0,4 the_thread->Wait.option = *set; the_thread->Wait.return_argument = the_info; ffc08f8c: 93 e9 00 28 stw r31,40(r9) } the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; ffc08f90: 3d 60 00 00 lis r11,0 the_thread->Wait.return_code = EINTR; ffc08f94: 90 09 00 34 stw r0,52(r9) } the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; ffc08f98: 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; ffc08f9c: 39 40 00 01 li r10,1 the_thread->Wait.return_code = EINTR; the_thread->Wait.option = *set; ffc08fa0: 80 1e 00 00 lwz r0,0(r30) ffc08fa4: 91 4b 00 30 stw r10,48(r11) ffc08fa8: 90 09 00 30 stw r0,48(r9) } the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; ffc08fac: 91 69 00 44 stw r11,68(r9) ffc08fb0: 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 ); ffc08fb4: 3c a0 ff c1 lis r5,-63 ffc08fb8: 3c 60 00 00 lis r3,0 ffc08fbc: 38 a5 c9 c0 addi r5,r5,-13888 ffc08fc0: 38 63 33 3c addi r3,r3,13116 ffc08fc4: 48 00 36 05 bl ffc0c5c8 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); ffc08fc8: 48 00 30 01 bl ffc0bfc8 <_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 ); ffc08fcc: 80 9f 00 00 lwz r4,0(r31) ffc08fd0: 7f e5 fb 78 mr r5,r31 ffc08fd4: 38 c0 00 00 li r6,0 ffc08fd8: 38 e0 00 00 li r7,0 ffc08fdc: 7f 83 e3 78 mr r3,r28 ffc08fe0: 48 00 6a 71 bl ffc0fa50 <_POSIX_signals_Clear_signals> errno = _Thread_Executing->Wait.return_code; ffc08fe4: 48 00 a4 0d bl ffc133f0 <__errno> ffc08fe8: 3d 20 00 00 lis r9,0 ffc08fec: 81 29 28 40 lwz r9,10304(r9) ffc08ff0: 80 09 00 34 lwz r0,52(r9) ffc08ff4: 90 03 00 00 stw r0,0(r3) return the_info->si_signo; ffc08ff8: 83 df 00 00 lwz r30,0(r31) } ffc08ffc: 80 01 00 2c lwz r0,44(r1) ffc09000: 7f c3 f3 78 mr r3,r30 ffc09004: 83 81 00 18 lwz r28,24(r1) ffc09008: 7c 08 03 a6 mtlr r0 ffc0900c: 83 a1 00 1c lwz r29,28(r1) ffc09010: 83 c1 00 20 lwz r30,32(r1) ffc09014: 83 e1 00 24 lwz r31,36(r1) ffc09018: 38 21 00 28 addi r1,r1,40 ffc0901c: 4e 80 00 20 blr =============================================================================== ffc0b4f4 : int sigwait( const sigset_t *set, int *sig ) { ffc0b4f4: 94 21 ff f0 stwu r1,-16(r1) ffc0b4f8: 7c 08 02 a6 mflr r0 int status; status = sigtimedwait( set, NULL, NULL ); ffc0b4fc: 38 a0 00 00 li r5,0 int sigwait( const sigset_t *set, int *sig ) { ffc0b500: 93 e1 00 0c stw r31,12(r1) ffc0b504: 7c 9f 23 78 mr r31,r4 int status; status = sigtimedwait( set, NULL, NULL ); ffc0b508: 38 80 00 00 li r4,0 int sigwait( const sigset_t *set, int *sig ) { ffc0b50c: 90 01 00 14 stw r0,20(r1) int status; status = sigtimedwait( set, NULL, NULL ); ffc0b510: 4b ff fd e5 bl ffc0b2f4 if ( status != -1 ) { ffc0b514: 2f 83 ff ff cmpwi cr7,r3,-1 ffc0b518: 41 9e 00 18 beq- cr7,ffc0b530 if ( sig ) ffc0b51c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0b520: 38 00 00 00 li r0,0 ffc0b524: 41 9e 00 14 beq- cr7,ffc0b538 <== NEVER TAKEN *sig = status; ffc0b528: 90 7f 00 00 stw r3,0(r31) ffc0b52c: 48 00 00 0c b ffc0b538 return 0; } return errno; ffc0b530: 48 00 a0 a5 bl ffc155d4 <__errno> ffc0b534: 80 03 00 00 lwz r0,0(r3) } ffc0b538: 7c 03 03 78 mr r3,r0 ffc0b53c: 80 01 00 14 lwz r0,20(r1) ffc0b540: 83 e1 00 0c lwz r31,12(r1) ffc0b544: 38 21 00 10 addi r1,r1,16 ffc0b548: 7c 08 03 a6 mtlr r0 ffc0b54c: 4e 80 00 20 blr =============================================================================== ffc07b44 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { ffc07b44: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED ffc07b48: 7c 08 02 a6 mflr r0 <== NOT EXECUTED ffc07b4c: 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)) { ffc07b50: 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) { ffc07b54: 93 c1 00 08 stw r30,8(r1) <== NOT EXECUTED ffc07b58: 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)) { ffc07b5c: 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) { ffc07b60: 93 e1 00 0c stw r31,12(r1) <== NOT EXECUTED ffc07b64: 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)) { ffc07b68: 41 a2 00 48 beq+ ffc07bb0 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); ffc07b6c: 80 64 00 18 lwz r3,24(r4) <== NOT EXECUTED ffc07b70: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc07b74: 38 80 00 00 li r4,0 <== NOT EXECUTED ffc07b78: 48 00 1e f1 bl ffc09a68 <== NOT EXECUTED i = iproc (c, tty); ffc07b7c: 7f e4 fb 78 mr r4,r31 <== NOT EXECUTED ffc07b80: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc07b84: 4b ff fd f9 bl ffc0797c <== NOT EXECUTED ffc07b88: 7c 7e 1b 78 mr r30,r3 <== NOT EXECUTED rtems_semaphore_release (tty->osem); ffc07b8c: 80 7f 00 18 lwz r3,24(r31) <== NOT EXECUTED ffc07b90: 48 00 20 1d bl ffc09bac <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } ffc07b94: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc07b98: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc07b9c: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc07ba0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc07ba4: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc07ba8: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED ffc07bac: 4e 80 00 20 blr <== NOT EXECUTED ffc07bb0: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED ffc07bb4: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED ffc07bb8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED ffc07bbc: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED ffc07bc0: 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); ffc07bc4: 4b ff fd b8 b ffc0797c <== NOT EXECUTED =============================================================================== ffc07138 : int _STAT_NAME( const char *path, struct stat *buf ) { ffc07138: 94 21 ff c8 stwu r1,-56(r1) ffc0713c: 7c 08 02 a6 mflr r0 ffc07140: 93 c1 00 30 stw r30,48(r1) /* * Check to see if we were passed a valid pointer. */ if ( !buf ) ffc07144: 7c 9e 23 79 mr. r30,r4 int _STAT_NAME( const char *path, struct stat *buf ) { ffc07148: 93 a1 00 2c stw r29,44(r1) ffc0714c: 7c 7d 1b 78 mr r29,r3 ffc07150: 90 01 00 3c stw r0,60(r1) ffc07154: 93 e1 00 34 stw r31,52(r1) /* * Check to see if we were passed a valid pointer. */ if ( !buf ) ffc07158: 40 a2 00 10 bne+ ffc07168 rtems_set_errno_and_return_minus_one( EFAULT ); ffc0715c: 48 00 dc 91 bl ffc14dec <__errno> ffc07160: 38 00 00 0e li r0,14 ffc07164: 48 00 00 6c b ffc071d0 status = rtems_filesystem_evaluate_path( path, strlen( path ), ffc07168: 48 00 fe b9 bl ffc17020 ffc0716c: 3b e1 00 08 addi r31,r1,8 ffc07170: 7c 64 1b 78 mr r4,r3 ffc07174: 38 a0 00 00 li r5,0 ffc07178: 7f a3 eb 78 mr r3,r29 ffc0717c: 7f e6 fb 78 mr r6,r31 ffc07180: 38 e0 00 01 li r7,1 ffc07184: 4b ff e3 1d bl ffc054a0 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) ffc07188: 3b a0 ff ff li r29,-1 ffc0718c: 2f 83 00 00 cmpwi cr7,r3,0 ffc07190: 40 9e 00 9c bne- cr7,ffc0722c return -1; if ( !loc.handlers->fstat_h ){ ffc07194: 81 21 00 10 lwz r9,16(r1) ffc07198: 80 09 00 18 lwz r0,24(r9) ffc0719c: 2f 80 00 00 cmpwi cr7,r0,0 ffc071a0: 40 be 00 3c bne+ cr7,ffc071dc <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); ffc071a4: 81 21 00 14 lwz r9,20(r1) <== NOT EXECUTED ffc071a8: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc071ac: 41 9e 00 1c beq- cr7,ffc071c8 <== NOT EXECUTED ffc071b0: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc071b4: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc071b8: 41 9e 00 10 beq- cr7,ffc071c8 <== NOT EXECUTED ffc071bc: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc071c0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc071c4: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc071c8: 48 00 dc 25 bl ffc14dec <__errno> <== NOT EXECUTED ffc071cc: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc071d0: 90 03 00 00 stw r0,0(r3) ffc071d4: 3b a0 ff ff li r29,-1 ffc071d8: 48 00 00 54 b ffc0722c /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); ffc071dc: 38 80 00 00 li r4,0 ffc071e0: 38 a0 00 48 li r5,72 ffc071e4: 7f c3 f3 78 mr r3,r30 ffc071e8: 48 00 f4 31 bl ffc16618 status = (*loc.handlers->fstat_h)( &loc, buf ); ffc071ec: 81 21 00 10 lwz r9,16(r1) ffc071f0: 7f c4 f3 78 mr r4,r30 ffc071f4: 80 09 00 18 lwz r0,24(r9) ffc071f8: 7f e3 fb 78 mr r3,r31 ffc071fc: 7c 09 03 a6 mtctr r0 ffc07200: 4e 80 04 21 bctrl rtems_filesystem_freenode( &loc ); ffc07204: 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 ); ffc07208: 7c 7d 1b 78 mr r29,r3 rtems_filesystem_freenode( &loc ); ffc0720c: 2f 89 00 00 cmpwi cr7,r9,0 ffc07210: 41 9e 00 1c beq- cr7,ffc0722c <== NEVER TAKEN ffc07214: 80 09 00 1c lwz r0,28(r9) ffc07218: 2f 80 00 00 cmpwi cr7,r0,0 ffc0721c: 41 9e 00 10 beq- cr7,ffc0722c <== NEVER TAKEN ffc07220: 7f e3 fb 78 mr r3,r31 ffc07224: 7c 09 03 a6 mtctr r0 ffc07228: 4e 80 04 21 bctrl return status; } ffc0722c: 80 01 00 3c lwz r0,60(r1) ffc07230: 7f a3 eb 78 mr r3,r29 ffc07234: 83 c1 00 30 lwz r30,48(r1) ffc07238: 7c 08 03 a6 mtlr r0 ffc0723c: 83 a1 00 2c lwz r29,44(r1) ffc07240: 83 e1 00 34 lwz r31,52(r1) ffc07244: 38 21 00 38 addi r1,r1,56 ffc07248: 4e 80 00 20 blr =============================================================================== ffc0f5f4 : int symlink( const char *actualpath, const char *sympath ) { ffc0f5f4: 94 21 ff c8 stwu r1,-56(r1) ffc0f5f8: 7c 08 02 a6 mflr r0 ffc0f5fc: 93 a1 00 2c stw r29,44(r1) ffc0f600: 7c 7d 1b 78 mr r29,r3 ffc0f604: 90 01 00 3c stw r0,60(r1) ffc0f608: 93 c1 00 30 stw r30,48(r1) ffc0f60c: 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 ); ffc0f610: 88 04 00 00 lbz r0,0(r4) ffc0f614: 2f 80 00 2f cmpwi cr7,r0,47 ffc0f618: 41 9e 00 14 beq- cr7,ffc0f62c ffc0f61c: 2f 80 00 5c cmpwi cr7,r0,92 ffc0f620: 41 9e 00 0c beq- cr7,ffc0f62c <== NEVER TAKEN ffc0f624: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f628: 40 9e 00 38 bne- cr7,ffc0f660 <== ALWAYS TAKEN ffc0f62c: 3d 20 00 00 lis r9,0 ffc0f630: 81 29 4e d4 lwz r9,20180(r9) ffc0f634: 38 60 00 01 li r3,1 ffc0f638: 80 09 00 24 lwz r0,36(r9) ffc0f63c: 81 09 00 18 lwz r8,24(r9) ffc0f640: 81 49 00 1c lwz r10,28(r9) ffc0f644: 81 69 00 20 lwz r11,32(r9) ffc0f648: 91 01 00 0c stw r8,12(r1) ffc0f64c: 91 41 00 10 stw r10,16(r1) ffc0f650: 91 61 00 14 stw r11,20(r1) ffc0f654: 90 01 00 18 stw r0,24(r1) ffc0f658: 80 09 00 28 lwz r0,40(r9) ffc0f65c: 48 00 00 34 b ffc0f690 ffc0f660: 3d 20 00 00 lis r9,0 ffc0f664: 81 29 4e d4 lwz r9,20180(r9) ffc0f668: 38 60 00 00 li r3,0 ffc0f66c: 80 09 00 10 lwz r0,16(r9) ffc0f670: 81 09 00 04 lwz r8,4(r9) ffc0f674: 81 49 00 08 lwz r10,8(r9) ffc0f678: 81 69 00 0c lwz r11,12(r9) ffc0f67c: 91 01 00 0c stw r8,12(r1) ffc0f680: 91 41 00 10 stw r10,16(r1) ffc0f684: 91 61 00 14 stw r11,20(r1) ffc0f688: 90 01 00 18 stw r0,24(r1) ffc0f68c: 80 09 00 14 lwz r0,20(r9) if ( !loc.ops->evalformake_h ) { ffc0f690: 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 ); ffc0f694: 90 01 00 1c stw r0,28(r1) if ( !loc.ops->evalformake_h ) { ffc0f698: 80 09 00 04 lwz r0,4(r9) ffc0f69c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f6a0: 41 9e 00 50 beq- cr7,ffc0f6f0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); ffc0f6a4: 3b c1 00 0c addi r30,r1,12 ffc0f6a8: 7c 09 03 a6 mtctr r0 ffc0f6ac: 7c 64 1a 14 add r3,r4,r3 ffc0f6b0: 38 a1 00 08 addi r5,r1,8 ffc0f6b4: 7f c4 f3 78 mr r4,r30 if ( result != 0 ) ffc0f6b8: 3b e0 ff ff li r31,-1 if ( !loc.ops->evalformake_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); ffc0f6bc: 4e 80 04 21 bctrl if ( result != 0 ) ffc0f6c0: 2f 83 00 00 cmpwi cr7,r3,0 ffc0f6c4: 40 9e 00 7c bne- cr7,ffc0f740 return -1; if ( !loc.ops->symlink_h ) { ffc0f6c8: 81 21 00 18 lwz r9,24(r1) ffc0f6cc: 80 09 00 38 lwz r0,56(r9) ffc0f6d0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f6d4: 40 be 00 30 bne+ cr7,ffc0f704 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); ffc0f6d8: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc0f6dc: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc0f6e0: 41 9e 00 10 beq- cr7,ffc0f6f0 <== NOT EXECUTED ffc0f6e4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc0f6e8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0f6ec: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc0f6f0: 48 00 4c 11 bl ffc14300 <__errno> <== NOT EXECUTED ffc0f6f4: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc0f6f8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0f6fc: 3b e0 ff ff li r31,-1 <== NOT EXECUTED ffc0f700: 48 00 00 40 b ffc0f740 <== NOT EXECUTED } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); ffc0f704: 7f a4 eb 78 mr r4,r29 ffc0f708: 80 a1 00 08 lwz r5,8(r1) ffc0f70c: 7f c3 f3 78 mr r3,r30 ffc0f710: 7c 09 03 a6 mtctr r0 ffc0f714: 4e 80 04 21 bctrl rtems_filesystem_freenode( &loc ); ffc0f718: 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); ffc0f71c: 7c 7f 1b 78 mr r31,r3 rtems_filesystem_freenode( &loc ); ffc0f720: 2f 89 00 00 cmpwi cr7,r9,0 ffc0f724: 41 9e 00 1c beq- cr7,ffc0f740 <== NEVER TAKEN ffc0f728: 80 09 00 1c lwz r0,28(r9) ffc0f72c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0f730: 41 9e 00 10 beq- cr7,ffc0f740 <== NEVER TAKEN ffc0f734: 7f c3 f3 78 mr r3,r30 ffc0f738: 7c 09 03 a6 mtctr r0 ffc0f73c: 4e 80 04 21 bctrl return result; } ffc0f740: 80 01 00 3c lwz r0,60(r1) ffc0f744: 7f e3 fb 78 mr r3,r31 ffc0f748: 83 a1 00 2c lwz r29,44(r1) ffc0f74c: 7c 08 03 a6 mtlr r0 ffc0f750: 83 c1 00 30 lwz r30,48(r1) ffc0f754: 83 e1 00 34 lwz r31,52(r1) ffc0f758: 38 21 00 38 addi r1,r1,56 ffc0f75c: 4e 80 00 20 blr =============================================================================== ffc07258 : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { ffc07258: 94 21 ff f0 stwu r1,-16(r1) ffc0725c: 7c 08 02 a6 mflr r0 ffc07260: 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; ffc07264: 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) { ffc07268: 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 ) { ffc0726c: 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) { ffc07270: 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 ) { ffc07274: 41 9e 00 2c beq- cr7,ffc072a0 <== NEVER TAKEN current_reent = _Thread_Executing->libc_reent; ffc07278: 3f e0 00 00 lis r31,0 ffc0727c: 81 3f 27 b4 lwz r9,10164(r31) _Thread_Executing->libc_reent = this_reent; _fwalk (t->libc_reent, sync_wrapper); ffc07280: 3c 80 ff c0 lis r4,-64 ffc07284: 38 84 72 f4 addi r4,r4,29428 * 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; ffc07288: 83 c9 01 40 lwz r30,320(r9) _Thread_Executing->libc_reent = this_reent; ffc0728c: 90 09 01 40 stw r0,320(r9) _fwalk (t->libc_reent, sync_wrapper); ffc07290: 80 63 01 40 lwz r3,320(r3) ffc07294: 48 00 ee 51 bl ffc160e4 <_fwalk> _Thread_Executing->libc_reent = current_reent; ffc07298: 81 3f 27 b4 lwz r9,10164(r31) ffc0729c: 93 c9 01 40 stw r30,320(r9) } } ffc072a0: 80 01 00 14 lwz r0,20(r1) ffc072a4: 83 c1 00 08 lwz r30,8(r1) ffc072a8: 7c 08 03 a6 mtlr r0 ffc072ac: 83 e1 00 0c lwz r31,12(r1) ffc072b0: 38 21 00 10 addi r1,r1,16 ffc072b4: 4e 80 00 20 blr =============================================================================== ffc06c8c : int fd, int opt, struct termios *tp ) { switch (opt) { ffc06c8c: 2c 04 00 00 cmpwi r4,0 int tcsetattr( int fd, int opt, struct termios *tp ) { ffc06c90: 94 21 ff f0 stwu r1,-16(r1) ffc06c94: 7c 08 02 a6 mflr r0 ffc06c98: 93 c1 00 08 stw r30,8(r1) ffc06c9c: 7c 7e 1b 78 mr r30,r3 ffc06ca0: 93 e1 00 0c stw r31,12(r1) ffc06ca4: 7c bf 2b 78 mr r31,r5 ffc06ca8: 90 01 00 14 stw r0,20(r1) switch (opt) { ffc06cac: 41 82 00 3c beq- ffc06ce8 <== ALWAYS TAKEN ffc06cb0: 2f 84 00 01 cmpwi cr7,r4,1 <== NOT EXECUTED ffc06cb4: 41 9e 00 18 beq- cr7,ffc06ccc <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc06cb8: 48 00 cc 5d bl ffc13914 <__errno> <== NOT EXECUTED ffc06cbc: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc06cc0: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc06cc4: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc06cc8: 48 00 00 34 b ffc06cfc <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) ffc06ccc: 38 80 00 03 li r4,3 <== NOT EXECUTED ffc06cd0: 38 a0 00 00 li r5,0 <== NOT EXECUTED ffc06cd4: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED ffc06cd8: 48 00 88 75 bl ffc0f54c <== NOT EXECUTED ffc06cdc: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc06ce0: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc06ce4: 41 9c 00 18 blt- cr7,ffc06cfc <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); ffc06ce8: 7f c3 f3 78 mr r3,r30 ffc06cec: 7f e5 fb 78 mr r5,r31 ffc06cf0: 38 80 00 02 li r4,2 ffc06cf4: 4c c6 31 82 crclr 4*cr1+eq ffc06cf8: 48 00 88 55 bl ffc0f54c } } ffc06cfc: 80 01 00 14 lwz r0,20(r1) ffc06d00: 83 c1 00 08 lwz r30,8(r1) ffc06d04: 7c 08 03 a6 mtlr r0 ffc06d08: 83 e1 00 0c lwz r31,12(r1) ffc06d0c: 38 21 00 10 addi r1,r1,16 ffc06d10: 4e 80 00 20 blr =============================================================================== ffc07e08 : timer_t *timerid ) { POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) ffc07e08: 2f 83 00 01 cmpwi cr7,r3,1 int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { ffc07e0c: 94 21 ff f0 stwu r1,-16(r1) ffc07e10: 7c 08 02 a6 mflr r0 ffc07e14: 93 c1 00 08 stw r30,8(r1) ffc07e18: 7c be 2b 78 mr r30,r5 ffc07e1c: 93 e1 00 0c stw r31,12(r1) ffc07e20: 7c 9f 23 78 mr r31,r4 ffc07e24: 90 01 00 14 stw r0,20(r1) POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) ffc07e28: 40 9e 00 3c bne- cr7,ffc07e64 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) ffc07e2c: 2f 85 00 00 cmpwi cr7,r5,0 ffc07e30: 41 9e 00 34 beq- cr7,ffc07e64 /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { ffc07e34: 2f 84 00 00 cmpwi cr7,r4,0 ffc07e38: 41 9e 00 38 beq- cr7,ffc07e70 /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && ffc07e3c: 81 24 00 00 lwz r9,0(r4) ffc07e40: 38 09 ff ff addi r0,r9,-1 ffc07e44: 2b 80 00 01 cmplwi cr7,r0,1 ffc07e48: 41 9d 00 1c bgt- cr7,ffc07e64 <== 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 ) ffc07e4c: 81 24 00 04 lwz r9,4(r4) ffc07e50: 2f 89 00 00 cmpwi cr7,r9,0 ffc07e54: 41 9e 00 10 beq- cr7,ffc07e64 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) ffc07e58: 39 29 ff ff addi r9,r9,-1 ffc07e5c: 2b 89 00 1f cmplwi cr7,r9,31 ffc07e60: 40 bd 00 10 ble+ cr7,ffc07e70 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ffc07e64: 48 00 ac 85 bl ffc12ae8 <__errno> ffc07e68: 38 00 00 16 li r0,22 ffc07e6c: 48 00 00 34 b ffc07ea0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc07e70: 3d 20 00 00 lis r9,0 ffc07e74: 81 69 27 dc lwz r11,10204(r9) ffc07e78: 38 0b 00 01 addi r0,r11,1 ffc07e7c: 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 ); ffc07e80: 3c 60 00 00 lis r3,0 ffc07e84: 38 63 2f 78 addi r3,r3,12152 ffc07e88: 48 00 24 5d bl ffc0a2e4 <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { ffc07e8c: 2c 03 00 00 cmpwi r3,0 ffc07e90: 40 a2 00 1c bne+ ffc07eac _Thread_Enable_dispatch(); ffc07e94: 48 00 35 0d bl ffc0b3a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); ffc07e98: 48 00 ac 51 bl ffc12ae8 <__errno> ffc07e9c: 38 00 00 0b li r0,11 ffc07ea0: 90 03 00 00 stw r0,0(r3) ffc07ea4: 38 60 ff ff li r3,-1 ffc07ea8: 48 00 00 88 b ffc07f30 } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ffc07eac: 38 00 00 02 li r0,2 ffc07eb0: 98 03 00 3c stb r0,60(r3) ptimer->thread_id = _Thread_Executing->Object.id; ffc07eb4: 3d 20 00 00 lis r9,0 if ( evp != NULL ) { ffc07eb8: 2f 9f 00 00 cmpwi cr7,r31,0 } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; ffc07ebc: 81 29 28 1c lwz r9,10268(r9) ffc07ec0: 80 09 00 08 lwz r0,8(r9) ffc07ec4: 90 03 00 38 stw r0,56(r3) if ( evp != NULL ) { ffc07ec8: 41 9e 00 1c beq- cr7,ffc07ee4 ptimer->inf.sigev_notify = evp->sigev_notify; ptimer->inf.sigev_signo = evp->sigev_signo; ptimer->inf.sigev_value = evp->sigev_value; ffc07ecc: 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; ffc07ed0: 81 7f 00 00 lwz r11,0(r31) ptimer->inf.sigev_signo = evp->sigev_signo; ffc07ed4: 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; ffc07ed8: 91 63 00 40 stw r11,64(r3) ptimer->inf.sigev_signo = evp->sigev_signo; ffc07edc: 91 23 00 44 stw r9,68(r3) ptimer->inf.sigev_value = evp->sigev_value; ffc07ee0: 90 03 00 48 stw r0,72(r3) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc07ee4: 81 23 00 08 lwz r9,8(r3) ffc07ee8: 3d 60 00 00 lis r11,0 ffc07eec: 81 4b 2f 94 lwz r10,12180(r11) } ptimer->overrun = 0; ffc07ef0: 38 00 00 00 li r0,0 ffc07ef4: 55 2b 13 ba rlwinm r11,r9,2,14,29 ffc07ef8: 90 03 00 68 stw r0,104(r3) ffc07efc: 7c 6a 59 2e stwx r3,r10,r11 ptimer->timer_data.it_value.tv_sec = 0; ffc07f00: 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; ffc07f04: 90 03 00 0c stw r0,12(r3) ptimer->timer_data.it_value.tv_nsec = 0; ffc07f08: 90 03 00 60 stw r0,96(r3) ptimer->timer_data.it_interval.tv_sec = 0; ffc07f0c: 90 03 00 54 stw r0,84(r3) ptimer->timer_data.it_interval.tv_nsec = 0; ffc07f10: 90 03 00 58 stw r0,88(r3) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc07f14: 90 03 00 30 stw r0,48(r3) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc07f18: 90 03 00 18 stw r0,24(r3) the_watchdog->routine = routine; ffc07f1c: 90 03 00 2c stw r0,44(r3) the_watchdog->id = id; the_watchdog->user_data = user_data; ffc07f20: 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; ffc07f24: 91 3e 00 00 stw r9,0(r30) _Thread_Enable_dispatch(); ffc07f28: 48 00 34 79 bl ffc0b3a0 <_Thread_Enable_dispatch> ffc07f2c: 38 60 00 00 li r3,0 return 0; } ffc07f30: 80 01 00 14 lwz r0,20(r1) ffc07f34: 83 c1 00 08 lwz r30,8(r1) ffc07f38: 7c 08 03 a6 mtlr r0 ffc07f3c: 83 e1 00 0c lwz r31,12(r1) ffc07f40: 38 21 00 10 addi r1,r1,16 ffc07f44: 4e 80 00 20 blr =============================================================================== ffc07f48 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { ffc07f48: 94 21 ff c0 stwu r1,-64(r1) ffc07f4c: 7c 08 02 a6 mflr r0 ffc07f50: 93 a1 00 34 stw r29,52(r1) Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) ffc07f54: 7c bd 2b 79 mr. r29,r5 timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { ffc07f58: 93 c1 00 38 stw r30,56(r1) ffc07f5c: 7c de 33 78 mr r30,r6 ffc07f60: 93 e1 00 3c stw r31,60(r1) ffc07f64: 7c 7f 1b 78 mr r31,r3 ffc07f68: 90 01 00 44 stw r0,68(r1) ffc07f6c: 93 61 00 2c stw r27,44(r1) ffc07f70: 93 81 00 30 stw r28,48(r1) Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) ffc07f74: 41 82 01 c4 beq- ffc08138 <== 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 ) || ffc07f78: 81 3d 00 0c lwz r9,12(r29) ffc07f7c: 3c 00 3b 9a lis r0,15258 ffc07f80: 60 00 c9 ff ori r0,r0,51711 ffc07f84: 7f 89 00 40 cmplw cr7,r9,r0 ffc07f88: 41 9d 01 b0 bgt- cr7,ffc08138 ( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) || ffc07f8c: 81 3d 00 04 lwz r9,4(r29) ffc07f90: 7f 89 00 40 cmplw cr7,r9,r0 ffc07f94: 41 9d 01 a4 bgt- cr7,ffc08138 <== 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 ) { ffc07f98: 2f 84 00 04 cmpwi cr7,r4,4 ffc07f9c: 41 9e 00 0c beq- cr7,ffc07fa8 ffc07fa0: 2f 84 00 00 cmpwi cr7,r4,0 ffc07fa4: 40 9e 01 94 bne- cr7,ffc08138 } normalize = *value; /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { ffc07fa8: 2f 84 00 04 cmpwi cr7,r4,4 if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; ffc07fac: 81 5d 00 00 lwz r10,0(r29) ffc07fb0: 81 7d 00 04 lwz r11,4(r29) ffc07fb4: 81 3d 00 08 lwz r9,8(r29) ffc07fb8: 80 1d 00 0c lwz r0,12(r29) ffc07fbc: 91 41 00 14 stw r10,20(r1) ffc07fc0: 91 61 00 18 stw r11,24(r1) ffc07fc4: 91 21 00 1c stw r9,28(r1) ffc07fc8: 90 01 00 20 stw r0,32(r1) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { ffc07fcc: 40 be 00 38 bne+ cr7,ffc08004 struct timespec now; _TOD_Get( &now ); ffc07fd0: 3b 81 00 0c addi r28,r1,12 ffc07fd4: 7f 83 e3 78 mr r3,r28 /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) ffc07fd8: 3b 61 00 1c addi r27,r1,28 normalize = *value; /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); ffc07fdc: 48 00 1d 69 bl ffc09d44 <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) ffc07fe0: 7f 83 e3 78 mr r3,r28 ffc07fe4: 7f 64 db 78 mr r4,r27 ffc07fe8: 48 00 44 6d bl ffc0c454 <_Timespec_Greater_than> ffc07fec: 2f 83 00 00 cmpwi cr7,r3,0 ffc07ff0: 40 9e 01 48 bne- cr7,ffc08138 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); ffc07ff4: 7f 64 db 78 mr r4,r27 ffc07ff8: 7f 83 e3 78 mr r3,r28 ffc07ffc: 7f 65 db 78 mr r5,r27 ffc08000: 48 00 44 91 bl ffc0c490 <_Timespec_Subtract> RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) ffc08004: 3c 60 00 00 lis r3,0 ffc08008: 7f e4 fb 78 mr r4,r31 ffc0800c: 38 63 2f 78 addi r3,r3,12152 ffc08010: 38 a1 00 08 addi r5,r1,8 ffc08014: 48 00 28 7d bl ffc0a890 <_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 ) { ffc08018: 80 01 00 08 lwz r0,8(r1) ffc0801c: 7c 7f 1b 78 mr r31,r3 ffc08020: 2f 80 00 00 cmpwi cr7,r0,0 ffc08024: 40 9e 01 14 bne- cr7,ffc08138 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 ) { ffc08028: 80 01 00 1c lwz r0,28(r1) ffc0802c: 2f 80 00 00 cmpwi cr7,r0,0 ffc08030: 40 9e 00 6c bne- cr7,ffc0809c ffc08034: 80 01 00 20 lwz r0,32(r1) ffc08038: 2f 80 00 00 cmpwi cr7,r0,0 ffc0803c: 40 be 00 60 bne+ cr7,ffc0809c /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); ffc08040: 38 63 00 10 addi r3,r3,16 ffc08044: 48 00 4a dd bl ffc0cb20 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) ffc08048: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0804c: 41 9e 00 24 beq- cr7,ffc08070 *ovalue = ptimer->timer_data; ffc08050: 81 5f 00 54 lwz r10,84(r31) ffc08054: 81 3f 00 58 lwz r9,88(r31) ffc08058: 80 1f 00 5c lwz r0,92(r31) ffc0805c: 81 7f 00 60 lwz r11,96(r31) ffc08060: 91 5e 00 00 stw r10,0(r30) ffc08064: 91 7e 00 0c stw r11,12(r30) ffc08068: 91 3e 00 04 stw r9,4(r30) ffc0806c: 90 1e 00 08 stw r0,8(r30) /* The new data are set */ ptimer->timer_data = normalize; ffc08070: 81 41 00 14 lwz r10,20(r1) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; ffc08074: 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; ffc08078: 81 61 00 18 lwz r11,24(r1) ffc0807c: 81 21 00 1c lwz r9,28(r1) ffc08080: 80 01 00 20 lwz r0,32(r1) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; ffc08084: 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; ffc08088: 91 5f 00 54 stw r10,84(r31) ffc0808c: 91 7f 00 58 stw r11,88(r31) ffc08090: 91 3f 00 5c stw r9,92(r31) ffc08094: 90 1f 00 60 stw r0,96(r31) ffc08098: 48 00 00 94 b ffc0812c _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); ffc0809c: 7f a3 eb 78 mr r3,r29 ffc080a0: 48 00 44 29 bl ffc0c4c8 <_Timespec_To_ticks> ffc080a4: 90 7f 00 64 stw r3,100(r31) initial_period = _Timespec_To_ticks( &normalize.it_value ); ffc080a8: 38 61 00 1c addi r3,r1,28 ffc080ac: 48 00 44 1d bl ffc0c4c8 <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( ffc080b0: 80 bf 00 08 lwz r5,8(r31) ffc080b4: 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 ); ffc080b8: 7c 64 1b 78 mr r4,r3 activated = _POSIX_Timer_Insert_helper( ffc080bc: 38 c6 81 6c addi r6,r6,-32404 ffc080c0: 38 7f 00 10 addi r3,r31,16 ffc080c4: 7f e7 fb 78 mr r7,r31 ffc080c8: 48 00 6f fd bl ffc0f0c4 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { ffc080cc: 2f 83 00 00 cmpwi cr7,r3,0 ffc080d0: 41 9e 00 5c beq- cr7,ffc0812c /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) ffc080d4: 2f 9e 00 00 cmpwi cr7,r30,0 ffc080d8: 41 9e 00 24 beq- cr7,ffc080fc *ovalue = ptimer->timer_data; ffc080dc: 81 5f 00 54 lwz r10,84(r31) ffc080e0: 81 3f 00 58 lwz r9,88(r31) ffc080e4: 80 1f 00 5c lwz r0,92(r31) ffc080e8: 81 7f 00 60 lwz r11,96(r31) ffc080ec: 91 5e 00 00 stw r10,0(r30) ffc080f0: 91 7e 00 0c stw r11,12(r30) ffc080f4: 91 3e 00 04 stw r9,4(r30) ffc080f8: 90 1e 00 08 stw r0,8(r30) ptimer->timer_data = normalize; ffc080fc: 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 ); ffc08100: 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; ffc08104: 81 61 00 18 lwz r11,24(r1) ffc08108: 81 21 00 1c lwz r9,28(r1) ffc0810c: 81 41 00 14 lwz r10,20(r1) ffc08110: 90 1f 00 60 stw r0,96(r31) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; ffc08114: 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; ffc08118: 91 5f 00 54 stw r10,84(r31) ffc0811c: 91 7f 00 58 stw r11,88(r31) ffc08120: 91 3f 00 5c stw r9,92(r31) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; ffc08124: 98 1f 00 3c stb r0,60(r31) _TOD_Get( &ptimer->time ); ffc08128: 48 00 1c 1d bl ffc09d44 <_TOD_Get> _Thread_Enable_dispatch(); ffc0812c: 48 00 32 75 bl ffc0b3a0 <_Thread_Enable_dispatch> ffc08130: 38 60 00 00 li r3,0 return 0; ffc08134: 48 00 00 14 b ffc08148 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); ffc08138: 48 00 a9 b1 bl ffc12ae8 <__errno> ffc0813c: 38 00 00 16 li r0,22 ffc08140: 90 03 00 00 stw r0,0(r3) ffc08144: 38 60 ff ff li r3,-1 } ffc08148: 80 01 00 44 lwz r0,68(r1) ffc0814c: 83 61 00 2c lwz r27,44(r1) ffc08150: 7c 08 03 a6 mtlr r0 ffc08154: 83 81 00 30 lwz r28,48(r1) ffc08158: 83 a1 00 34 lwz r29,52(r1) ffc0815c: 83 c1 00 38 lwz r30,56(r1) ffc08160: 83 e1 00 3c lwz r31,60(r1) ffc08164: 38 21 00 40 addi r1,r1,64 ffc08168: 4e 80 00 20 blr =============================================================================== ffc07c5c : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { ffc07c5c: 94 21 ff d8 stwu r1,-40(r1) ffc07c60: 7c 08 02 a6 mflr r0 ffc07c64: 93 a1 00 1c stw r29,28(r1) /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { ffc07c68: 3f a0 00 00 lis r29,0 ffc07c6c: 3b bd 35 44 addi r29,r29,13636 useconds_t ualarm( useconds_t useconds, useconds_t interval ) { ffc07c70: 90 01 00 2c stw r0,44(r1) /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { ffc07c74: 80 1d 00 1c lwz r0,28(r29) useconds_t ualarm( useconds_t useconds, useconds_t interval ) { ffc07c78: 93 c1 00 20 stw r30,32(r1) ffc07c7c: 7c 7e 1b 78 mr r30,r3 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { ffc07c80: 2f 80 00 00 cmpwi cr7,r0,0 useconds_t ualarm( useconds_t useconds, useconds_t interval ) { ffc07c84: 93 e1 00 24 stw r31,36(r1) /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { ffc07c88: 40 be 00 24 bne+ cr7,ffc07cac Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc07c8c: 3d 20 ff c0 lis r9,-64 the_watchdog->id = id; the_watchdog->user_data = user_data; ffc07c90: 90 1d 00 24 stw r0,36(r29) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc07c94: 39 29 7d 74 addi r9,r9,32116 the_watchdog->id = id; the_watchdog->user_data = user_data; ffc07c98: 3b e0 00 00 li r31,0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc07c9c: 91 3d 00 1c stw r9,28(r29) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc07ca0: 90 1d 00 08 stw r0,8(r29) the_watchdog->routine = routine; the_watchdog->id = id; ffc07ca4: 90 1d 00 20 stw r0,32(r29) ffc07ca8: 48 00 00 58 b ffc07d00 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); ffc07cac: 7f a3 eb 78 mr r3,r29 ffc07cb0: 48 00 48 31 bl ffc0c4e0 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { ffc07cb4: 3b e0 00 00 li r31,0 ffc07cb8: 38 63 ff fe addi r3,r3,-2 ffc07cbc: 2b 83 00 01 cmplwi cr7,r3,1 ffc07cc0: 41 bd 00 40 bgt+ cr7,ffc07d00 <== NEVER TAKEN * 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); ffc07cc4: 81 3d 00 0c lwz r9,12(r29) /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); ffc07cc8: 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); ffc07ccc: 80 7d 00 14 lwz r3,20(r29) /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); ffc07cd0: 80 1d 00 18 lwz r0,24(r29) * 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); ffc07cd4: 7c 63 4a 14 add r3,r3,r9 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); ffc07cd8: 7c 60 18 50 subf r3,r0,r3 ffc07cdc: 48 00 40 61 bl ffc0bd3c <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; remaining += tp.tv_nsec / 1000; ffc07ce0: 83 e1 00 0c lwz r31,12(r1) ffc07ce4: 38 00 03 e8 li r0,1000 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; ffc07ce8: 81 21 00 08 lwz r9,8(r1) remaining += tp.tv_nsec / 1000; ffc07cec: 7c 1f 03 d6 divw r0,r31,r0 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; ffc07cf0: 3f e0 00 0f lis r31,15 ffc07cf4: 63 ff 42 40 ori r31,r31,16960 ffc07cf8: 7f ff 49 d6 mullw r31,r31,r9 remaining += tp.tv_nsec / 1000; ffc07cfc: 7f e0 fa 14 add r31,r0,r31 /* * 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 ) { ffc07d00: 2f 9e 00 00 cmpwi cr7,r30,0 ffc07d04: 41 be 00 50 beq+ cr7,ffc07d54 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; ffc07d08: 3d 20 00 0f lis r9,15 ffc07d0c: 61 29 42 40 ori r9,r9,16960 ffc07d10: 7c 1e 4b 96 divwu r0,r30,r9 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ffc07d14: 7d 20 49 d6 mullw r9,r0,r9 * 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; ffc07d18: 90 01 00 08 stw r0,8(r1) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); ffc07d1c: 3b a1 00 08 addi r29,r1,8 */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ffc07d20: 7f c9 f0 50 subf r30,r9,r30 ffc07d24: 1f de 03 e8 mulli r30,r30,1000 ticks = _Timespec_To_ticks( &tp ); ffc07d28: 7f a3 eb 78 mr r3,r29 */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ffc07d2c: 93 c1 00 0c stw r30,12(r1) ticks = _Timespec_To_ticks( &tp ); ffc07d30: 48 00 40 75 bl ffc0bda4 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); ffc07d34: 7f a3 eb 78 mr r3,r29 ffc07d38: 48 00 40 6d bl ffc0bda4 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc07d3c: 3c 80 00 00 lis r4,0 ffc07d40: 38 84 35 44 addi r4,r4,13636 ffc07d44: 90 64 00 0c stw r3,12(r4) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc07d48: 3c 60 00 00 lis r3,0 ffc07d4c: 38 63 2d a8 addi r3,r3,11688 ffc07d50: 48 00 46 39 bl ffc0c388 <_Watchdog_Insert> } return remaining; } ffc07d54: 80 01 00 2c lwz r0,44(r1) ffc07d58: 7f e3 fb 78 mr r3,r31 ffc07d5c: 83 a1 00 1c lwz r29,28(r1) ffc07d60: 7c 08 03 a6 mtlr r0 ffc07d64: 83 c1 00 20 lwz r30,32(r1) ffc07d68: 83 e1 00 24 lwz r31,36(r1) ffc07d6c: 38 21 00 28 addi r1,r1,40 ffc07d70: 4e 80 00 20 blr =============================================================================== ffc08cc4 : #include int unlink( const char *path ) { ffc08cc4: 94 21 ff b8 stwu r1,-72(r1) ffc08cc8: 7c 08 02 a6 mflr r0 ffc08ccc: 93 a1 00 3c stw r29,60(r1) ffc08cd0: 93 c1 00 40 stw r30,64(r1) ffc08cd4: 7c 7e 1b 78 mr r30,r3 ffc08cd8: 90 01 00 4c stw r0,76(r1) ffc08cdc: 93 e1 00 44 stw r31,68(r1) /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); ffc08ce0: 4b ff cb 79 bl ffc05858 if ( parentpathlen == 0 ) ffc08ce4: 7c 7d 1b 79 mr. r29,r3 ffc08ce8: 40 82 00 8c bne- ffc08d74 rtems_filesystem_get_start_loc( path, &i, &parentloc ); ffc08cec: 88 1e 00 00 lbz r0,0(r30) ffc08cf0: 2f 80 00 2f cmpwi cr7,r0,47 ffc08cf4: 41 9e 00 14 beq- cr7,ffc08d08 ffc08cf8: 2f 80 00 5c cmpwi cr7,r0,92 ffc08cfc: 41 9e 00 0c beq- cr7,ffc08d08 <== NEVER TAKEN ffc08d00: 2f 80 00 00 cmpwi cr7,r0,0 ffc08d04: 40 9e 00 38 bne- cr7,ffc08d3c <== ALWAYS TAKEN ffc08d08: 3d 20 00 00 lis r9,0 ffc08d0c: 81 29 26 f4 lwz r9,9972(r9) ffc08d10: 3b e0 00 00 li r31,0 ffc08d14: 80 09 00 24 lwz r0,36(r9) ffc08d18: 81 09 00 18 lwz r8,24(r9) ffc08d1c: 81 49 00 1c lwz r10,28(r9) ffc08d20: 81 69 00 20 lwz r11,32(r9) ffc08d24: 91 01 00 08 stw r8,8(r1) ffc08d28: 91 41 00 0c stw r10,12(r1) ffc08d2c: 91 61 00 10 stw r11,16(r1) ffc08d30: 90 01 00 14 stw r0,20(r1) ffc08d34: 80 09 00 28 lwz r0,40(r9) ffc08d38: 48 00 00 34 b ffc08d6c ffc08d3c: 3d 20 00 00 lis r9,0 ffc08d40: 81 29 26 f4 lwz r9,9972(r9) ffc08d44: 3b e0 00 00 li r31,0 ffc08d48: 80 09 00 10 lwz r0,16(r9) ffc08d4c: 81 09 00 04 lwz r8,4(r9) ffc08d50: 81 49 00 08 lwz r10,8(r9) ffc08d54: 81 69 00 0c lwz r11,12(r9) ffc08d58: 91 01 00 08 stw r8,8(r1) ffc08d5c: 91 41 00 0c stw r10,12(r1) ffc08d60: 91 61 00 10 stw r11,16(r1) ffc08d64: 90 01 00 14 stw r0,20(r1) ffc08d68: 80 09 00 14 lwz r0,20(r9) ffc08d6c: 90 01 00 18 stw r0,24(r1) ffc08d70: 48 00 00 28 b ffc08d98 else { result = rtems_filesystem_evaluate_path( path, parentpathlen, ffc08d74: 7f c3 f3 78 mr r3,r30 ffc08d78: 7f a4 eb 78 mr r4,r29 ffc08d7c: 38 a0 00 02 li r5,2 ffc08d80: 38 c1 00 08 addi r6,r1,8 ffc08d84: 38 e0 00 00 li r7,0 ffc08d88: 4b ff cc 49 bl ffc059d0 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) ffc08d8c: 2f 83 00 00 cmpwi cr7,r3,0 ffc08d90: 40 9e 01 ec bne- cr7,ffc08f7c <== NEVER TAKEN ffc08d94: 3b e0 00 01 li r31,1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc08d98: 80 01 00 08 lwz r0,8(r1) name = path + parentpathlen; ffc08d9c: 7f be ea 14 add r29,r30,r29 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc08da0: 7f a3 eb 78 mr r3,r29 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc08da4: 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 ), ffc08da8: 3b c1 00 1c addi r30,r1,28 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; ffc08dac: 80 01 00 0c lwz r0,12(r1) ffc08db0: 90 01 00 20 stw r0,32(r1) ffc08db4: 80 01 00 10 lwz r0,16(r1) ffc08db8: 90 01 00 24 stw r0,36(r1) ffc08dbc: 80 01 00 14 lwz r0,20(r1) ffc08dc0: 90 01 00 28 stw r0,40(r1) ffc08dc4: 80 01 00 18 lwz r0,24(r1) ffc08dc8: 90 01 00 2c stw r0,44(r1) name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); ffc08dcc: 48 01 05 61 bl ffc1932c ffc08dd0: 7c 64 1b 78 mr r4,r3 ffc08dd4: 7f a3 eb 78 mr r3,r29 ffc08dd8: 4b ff ca 45 bl ffc0581c ffc08ddc: 7f bd 1a 14 add r29,r29,r3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), ffc08de0: 7f a3 eb 78 mr r3,r29 ffc08de4: 48 01 05 49 bl ffc1932c ffc08de8: 38 a0 00 00 li r5,0 ffc08dec: 7c 64 1b 78 mr r4,r3 ffc08df0: 7f c6 f3 78 mr r6,r30 ffc08df4: 7f a3 eb 78 mr r3,r29 ffc08df8: 38 e0 00 00 li r7,0 ffc08dfc: 4b ff ca c1 bl ffc058bc 0, &loc, false ); if ( result != 0 ) { ffc08e00: 2f 83 00 00 cmpwi cr7,r3,0 ffc08e04: 41 be 00 30 beq+ cr7,ffc08e34 if ( free_parentloc ) ffc08e08: 2f 9f 00 00 cmpwi cr7,r31,0 ffc08e0c: 41 be 01 70 beq+ cr7,ffc08f7c <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); ffc08e10: 81 21 00 14 lwz r9,20(r1) ffc08e14: 2f 89 00 00 cmpwi cr7,r9,0 ffc08e18: 41 be 01 64 beq+ cr7,ffc08f7c <== NEVER TAKEN ffc08e1c: 80 09 00 1c lwz r0,28(r9) ffc08e20: 38 61 00 08 addi r3,r1,8 ffc08e24: 3b a0 ff ff li r29,-1 ffc08e28: 2f 80 00 00 cmpwi cr7,r0,0 ffc08e2c: 41 be 01 50 beq+ cr7,ffc08f7c <== NEVER TAKEN ffc08e30: 48 00 01 40 b ffc08f70 return -1; } if ( !loc.ops->node_type_h ) { ffc08e34: 81 21 00 28 lwz r9,40(r1) ffc08e38: 80 09 00 10 lwz r0,16(r9) ffc08e3c: 2f 80 00 00 cmpwi cr7,r0,0 ffc08e40: 41 9e 00 80 beq- cr7,ffc08ec0 <== 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 ) { ffc08e44: 7f c3 f3 78 mr r3,r30 ffc08e48: 7c 09 03 a6 mtctr r0 ffc08e4c: 4e 80 04 21 bctrl ffc08e50: 81 21 00 28 lwz r9,40(r1) ffc08e54: 2f 83 00 01 cmpwi cr7,r3,1 ffc08e58: 40 be 00 5c bne+ cr7,ffc08eb4 rtems_filesystem_freenode( &loc ); ffc08e5c: 2f 89 00 00 cmpwi cr7,r9,0 ffc08e60: 41 9e 00 1c beq- cr7,ffc08e7c <== NEVER TAKEN ffc08e64: 80 09 00 1c lwz r0,28(r9) ffc08e68: 2f 80 00 00 cmpwi cr7,r0,0 ffc08e6c: 41 9e 00 10 beq- cr7,ffc08e7c <== NEVER TAKEN ffc08e70: 7f c3 f3 78 mr r3,r30 ffc08e74: 7c 09 03 a6 mtctr r0 ffc08e78: 4e 80 04 21 bctrl if ( free_parentloc ) ffc08e7c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc08e80: 41 9e 00 28 beq- cr7,ffc08ea8 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); ffc08e84: 81 21 00 14 lwz r9,20(r1) <== NOT EXECUTED ffc08e88: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc08e8c: 41 9e 00 1c beq- cr7,ffc08ea8 <== NOT EXECUTED ffc08e90: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc08e94: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc08e98: 41 9e 00 10 beq- cr7,ffc08ea8 <== NOT EXECUTED ffc08e9c: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED ffc08ea0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc08ea4: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); ffc08ea8: 48 00 f1 c5 bl ffc1806c <__errno> ffc08eac: 38 00 00 15 li r0,21 ffc08eb0: 48 00 00 5c b ffc08f0c } if ( !loc.ops->unlink_h ) { ffc08eb4: 80 09 00 0c lwz r0,12(r9) ffc08eb8: 2f 80 00 00 cmpwi cr7,r0,0 ffc08ebc: 40 be 00 58 bne+ cr7,ffc08f14 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); ffc08ec0: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc08ec4: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc08ec8: 41 9e 00 10 beq- cr7,ffc08ed8 <== NOT EXECUTED ffc08ecc: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc08ed0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc08ed4: 4e 80 04 21 bctrl <== NOT EXECUTED if ( free_parentloc ) ffc08ed8: 2f 9f 00 00 cmpwi cr7,r31,0 <== NOT EXECUTED ffc08edc: 41 9e 00 28 beq- cr7,ffc08f04 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); ffc08ee0: 81 21 00 14 lwz r9,20(r1) <== NOT EXECUTED ffc08ee4: 2f 89 00 00 cmpwi cr7,r9,0 <== NOT EXECUTED ffc08ee8: 41 9e 00 1c beq- cr7,ffc08f04 <== NOT EXECUTED ffc08eec: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc08ef0: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc08ef4: 41 9e 00 10 beq- cr7,ffc08f04 <== NOT EXECUTED ffc08ef8: 38 61 00 08 addi r3,r1,8 <== NOT EXECUTED ffc08efc: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc08f00: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc08f04: 48 00 f1 69 bl ffc1806c <__errno> <== NOT EXECUTED ffc08f08: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc08f0c: 90 03 00 00 stw r0,0(r3) ffc08f10: 48 00 00 6c b ffc08f7c } result = (*loc.ops->unlink_h)( &parentloc, &loc ); ffc08f14: 38 61 00 08 addi r3,r1,8 ffc08f18: 7c 09 03 a6 mtctr r0 ffc08f1c: 7f c4 f3 78 mr r4,r30 ffc08f20: 4e 80 04 21 bctrl rtems_filesystem_freenode( &loc ); ffc08f24: 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 ); ffc08f28: 7c 7d 1b 78 mr r29,r3 rtems_filesystem_freenode( &loc ); ffc08f2c: 2f 89 00 00 cmpwi cr7,r9,0 ffc08f30: 41 9e 00 1c beq- cr7,ffc08f4c <== NEVER TAKEN ffc08f34: 80 09 00 1c lwz r0,28(r9) ffc08f38: 2f 80 00 00 cmpwi cr7,r0,0 ffc08f3c: 41 9e 00 10 beq- cr7,ffc08f4c <== NEVER TAKEN ffc08f40: 7f c3 f3 78 mr r3,r30 ffc08f44: 7c 09 03 a6 mtctr r0 ffc08f48: 4e 80 04 21 bctrl if ( free_parentloc ) ffc08f4c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc08f50: 41 9e 00 30 beq- cr7,ffc08f80 rtems_filesystem_freenode( &parentloc ); ffc08f54: 81 21 00 14 lwz r9,20(r1) ffc08f58: 2f 89 00 00 cmpwi cr7,r9,0 ffc08f5c: 41 9e 00 24 beq- cr7,ffc08f80 <== NEVER TAKEN ffc08f60: 80 09 00 1c lwz r0,28(r9) ffc08f64: 2f 80 00 00 cmpwi cr7,r0,0 ffc08f68: 41 9e 00 18 beq- cr7,ffc08f80 <== NEVER TAKEN ffc08f6c: 38 61 00 08 addi r3,r1,8 ffc08f70: 7c 09 03 a6 mtctr r0 ffc08f74: 4e 80 04 21 bctrl ffc08f78: 48 00 00 08 b ffc08f80 ffc08f7c: 3b a0 ff ff li r29,-1 return result; } ffc08f80: 80 01 00 4c lwz r0,76(r1) ffc08f84: 7f a3 eb 78 mr r3,r29 ffc08f88: 83 c1 00 40 lwz r30,64(r1) ffc08f8c: 7c 08 03 a6 mtlr r0 ffc08f90: 83 a1 00 3c lwz r29,60(r1) ffc08f94: 83 e1 00 44 lwz r31,68(r1) ffc08f98: 38 21 00 48 addi r1,r1,72 ffc08f9c: 4e 80 00 20 blr =============================================================================== ffc0c060 : */ int unmount( const char *path ) { ffc0c060: 94 21 ff d0 stwu r1,-48(r1) ffc0c064: 7c 08 02 a6 mflr r0 ffc0c068: 93 c1 00 28 stw r30,40(r1) ffc0c06c: 7c 7e 1b 78 mr r30,r3 ffc0c070: 90 01 00 34 stw r0,52(r1) ffc0c074: 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 ) ) ffc0c078: 48 00 f6 4d bl ffc1b6c4 ffc0c07c: 3b e1 00 08 addi r31,r1,8 ffc0c080: 7c 64 1b 78 mr r4,r3 ffc0c084: 38 a0 00 00 li r5,0 ffc0c088: 7f c3 f3 78 mr r3,r30 ffc0c08c: 7f e6 fb 78 mr r6,r31 ffc0c090: 38 e0 00 01 li r7,1 ffc0c094: 4b ff bc 31 bl ffc07cc4 ffc0c098: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c09c: 40 9e 01 84 bne- cr7,ffc0c220 return -1; mt_entry = loc.mt_entry; ffc0c0a0: 83 c1 00 18 lwz r30,24(r1) fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; ffc0c0a4: 80 01 00 08 lwz r0,8(r1) ffc0c0a8: 81 7e 00 1c lwz r11,28(r30) ffc0c0ac: 81 21 00 14 lwz r9,20(r1) ffc0c0b0: 7f 8b 00 00 cmpw cr7,r11,r0 ffc0c0b4: 41 be 00 30 beq+ cr7,ffc0c0e4 /* * 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 ); ffc0c0b8: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c0bc: 41 9e 00 1c beq- cr7,ffc0c0d8 <== NEVER TAKEN ffc0c0c0: 80 09 00 1c lwz r0,28(r9) ffc0c0c4: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c0c8: 41 9e 00 10 beq- cr7,ffc0c0d8 <== NEVER TAKEN ffc0c0cc: 7f e3 fb 78 mr r3,r31 ffc0c0d0: 7c 09 03 a6 mtctr r0 ffc0c0d4: 4e 80 04 21 bctrl rtems_set_errno_and_return_minus_one( EACCES ); ffc0c0d8: 48 00 bb 8d bl ffc17c64 <__errno> ffc0c0dc: 38 00 00 0d li r0,13 ffc0c0e0: 48 00 00 a0 b ffc0c180 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); ffc0c0e4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c0e8: 41 9e 00 1c beq- cr7,ffc0c104 <== NEVER TAKEN ffc0c0ec: 80 09 00 1c lwz r0,28(r9) ffc0c0f0: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c0f4: 41 9e 00 10 beq- cr7,ffc0c104 <== NEVER TAKEN ffc0c0f8: 7f e3 fb 78 mr r3,r31 ffc0c0fc: 7c 09 03 a6 mtctr r0 ffc0c100: 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; ffc0c104: 81 3e 00 14 lwz r9,20(r30) ffc0c108: 80 09 00 28 lwz r0,40(r9) ffc0c10c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c110: 41 9e 00 14 beq- cr7,ffc0c124 <== NEVER TAKEN fs_root_loc = &mt_entry->mt_fs_root; ffc0c114: 81 3e 00 28 lwz r9,40(r30) ffc0c118: 80 09 00 2c lwz r0,44(r9) ffc0c11c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c120: 40 be 00 10 bne+ cr7,ffc0c130 <== ALWAYS TAKEN 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 ); ffc0c124: 48 00 bb 41 bl ffc17c64 <__errno> <== NOT EXECUTED ffc0c128: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc0c12c: 48 00 00 54 b ffc0c180 <== NOT EXECUTED * 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 ) ffc0c130: 3d 20 00 00 lis r9,0 ffc0c134: 81 29 27 3c lwz r9,10044(r9) ffc0c138: 80 09 00 14 lwz r0,20(r9) ffc0c13c: 7f 80 f0 00 cmpw cr7,r0,r30 ffc0c140: 41 9e 00 38 beq- cr7,ffc0c178 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; ffc0c144: 3d 20 00 00 lis r9,0 ffc0c148: 3d 60 00 00 lis r11,0 ffc0c14c: 81 29 34 40 lwz r9,13376(r9) ffc0c150: 38 0b 34 44 addi r0,r11,13380 ffc0c154: 48 00 00 18 b ffc0c16c 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; fs_root_loc = &mt_entry->mt_fs_root; ffc0c158: 81 49 00 18 lwz r10,24(r9) ffc0c15c: 81 7e 00 2c lwz r11,44(r30) ffc0c160: 7f 8a 58 00 cmpw cr7,r10,r11 ffc0c164: 41 9e 00 14 beq- cr7,ffc0c178 * 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 ) { ffc0c168: 81 29 00 00 lwz r9,0(r9) ffc0c16c: 7f 89 00 00 cmpw cr7,r9,r0 ffc0c170: 40 9e ff e8 bne+ cr7,ffc0c158 ffc0c174: 48 00 00 c8 b ffc0c23c * 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 ); ffc0c178: 48 00 ba ed bl ffc17c64 <__errno> ffc0c17c: 38 00 00 10 li r0,16 ffc0c180: 90 03 00 00 stw r0,0(r3) ffc0c184: 48 00 00 9c b ffc0c220 * 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 ) ffc0c188: 81 3e 00 14 lwz r9,20(r30) ffc0c18c: 7f c3 f3 78 mr r3,r30 ffc0c190: 80 09 00 28 lwz r0,40(r9) ffc0c194: 7c 09 03 a6 mtctr r0 ffc0c198: 4e 80 04 21 bctrl ffc0c19c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c1a0: 40 be 00 80 bne+ cr7,ffc0c220 <== NEVER TAKEN * NOTE: Fatal error is called in a case which should never happen * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ ffc0c1a4: 81 3e 00 28 lwz r9,40(r30) ffc0c1a8: 7f c3 f3 78 mr r3,r30 ffc0c1ac: 80 09 00 2c lwz r0,44(r9) ffc0c1b0: 7c 09 03 a6 mtctr r0 ffc0c1b4: 4e 80 04 21 bctrl ffc0c1b8: 2f 83 00 00 cmpwi cr7,r3,0 ffc0c1bc: 41 be 00 28 beq+ cr7,ffc0c1e4 <== ALWAYS TAKEN if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) ffc0c1c0: 81 3e 00 14 lwz r9,20(r30) <== NOT EXECUTED ffc0c1c4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED ffc0c1c8: 80 09 00 20 lwz r0,32(r9) <== NOT EXECUTED ffc0c1cc: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0c1d0: 4e 80 04 21 bctrl <== NOT EXECUTED ffc0c1d4: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED ffc0c1d8: 41 be 00 48 beq+ cr7,ffc0c220 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); ffc0c1dc: 38 60 00 00 li r3,0 <== NOT EXECUTED ffc0c1e0: 48 00 16 6d bl ffc0d84c <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc0c1e4: 7f c3 f3 78 mr r3,r30 ffc0c1e8: 48 00 1b 31 bl ffc0dd18 <_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 ); ffc0c1ec: 81 3e 00 14 lwz r9,20(r30) ffc0c1f0: 2f 89 00 00 cmpwi cr7,r9,0 ffc0c1f4: 41 9e 00 1c beq- cr7,ffc0c210 <== NEVER TAKEN ffc0c1f8: 80 09 00 1c lwz r0,28(r9) ffc0c1fc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c200: 41 9e 00 10 beq- cr7,ffc0c210 <== NEVER TAKEN ffc0c204: 38 7e 00 08 addi r3,r30,8 ffc0c208: 7c 09 03 a6 mtctr r0 ffc0c20c: 4e 80 04 21 bctrl free( mt_entry ); ffc0c210: 7f c3 f3 78 mr r3,r30 ffc0c214: 4b ff bb 95 bl ffc07da8 ffc0c218: 38 60 00 00 li r3,0 return 0; ffc0c21c: 48 00 00 08 b ffc0c224 ffc0c220: 38 60 ff ff li r3,-1 } ffc0c224: 80 01 00 34 lwz r0,52(r1) ffc0c228: 83 c1 00 28 lwz r30,40(r1) ffc0c22c: 7c 08 03 a6 mtlr r0 ffc0c230: 83 e1 00 2c lwz r31,44(r1) ffc0c234: 38 21 00 30 addi r1,r1,48 ffc0c238: 4e 80 00 20 blr * 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 ) ffc0c23c: 7f c3 f3 78 mr r3,r30 ffc0c240: 4b ff be 81 bl ffc080c0 ffc0c244: 2f 83 00 01 cmpwi cr7,r3,1 ffc0c248: 40 9e ff 40 bne+ cr7,ffc0c188 ffc0c24c: 4b ff ff 2c b ffc0c178 =============================================================================== ffc0931c : int utime( const char *path, const struct utimbuf *times ) { ffc0931c: 94 21 ff c8 stwu r1,-56(r1) ffc09320: 7c 08 02 a6 mflr r0 ffc09324: 93 a1 00 2c stw r29,44(r1) ffc09328: 7c 7d 1b 78 mr r29,r3 ffc0932c: 90 01 00 3c stw r0,60(r1) ffc09330: 93 c1 00 30 stw r30,48(r1) ffc09334: 7c 9e 23 78 mr r30,r4 ffc09338: 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 ) ) ffc0933c: 48 00 dc e5 bl ffc17020 ffc09340: 3b e1 00 08 addi r31,r1,8 ffc09344: 7c 64 1b 78 mr r4,r3 ffc09348: 38 a0 00 00 li r5,0 ffc0934c: 7f a3 eb 78 mr r3,r29 ffc09350: 7f e6 fb 78 mr r6,r31 ffc09354: 38 e0 00 01 li r7,1 ffc09358: 4b ff c1 49 bl ffc054a0 ffc0935c: 3b a0 ff ff li r29,-1 ffc09360: 2f 83 00 00 cmpwi cr7,r3,0 ffc09364: 40 9e 00 7c bne- cr7,ffc093e0 return -1; if ( !temp_loc.ops->utime_h ){ ffc09368: 81 21 00 14 lwz r9,20(r1) ffc0936c: 80 09 00 30 lwz r0,48(r9) ffc09370: 2f 80 00 00 cmpwi cr7,r0,0 ffc09374: 40 be 00 30 bne+ cr7,ffc093a4 <== ALWAYS TAKEN rtems_filesystem_freenode( &temp_loc ); ffc09378: 80 09 00 1c lwz r0,28(r9) <== NOT EXECUTED ffc0937c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED ffc09380: 41 9e 00 10 beq- cr7,ffc09390 <== NOT EXECUTED ffc09384: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc09388: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED ffc0938c: 4e 80 04 21 bctrl <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc09390: 48 00 ba 5d bl ffc14dec <__errno> <== NOT EXECUTED ffc09394: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc09398: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc0939c: 3b a0 ff ff li r29,-1 <== NOT EXECUTED ffc093a0: 48 00 00 40 b ffc093e0 <== NOT EXECUTED } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); ffc093a4: 80 be 00 04 lwz r5,4(r30) ffc093a8: 7f e3 fb 78 mr r3,r31 ffc093ac: 80 9e 00 00 lwz r4,0(r30) ffc093b0: 7c 09 03 a6 mtctr r0 ffc093b4: 4e 80 04 21 bctrl rtems_filesystem_freenode( &temp_loc ); ffc093b8: 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 ); ffc093bc: 7c 7d 1b 78 mr r29,r3 rtems_filesystem_freenode( &temp_loc ); ffc093c0: 2f 89 00 00 cmpwi cr7,r9,0 ffc093c4: 41 9e 00 1c beq- cr7,ffc093e0 <== NEVER TAKEN ffc093c8: 80 09 00 1c lwz r0,28(r9) ffc093cc: 2f 80 00 00 cmpwi cr7,r0,0 ffc093d0: 41 9e 00 10 beq- cr7,ffc093e0 <== NEVER TAKEN ffc093d4: 7f e3 fb 78 mr r3,r31 ffc093d8: 7c 09 03 a6 mtctr r0 ffc093dc: 4e 80 04 21 bctrl return result; } ffc093e0: 80 01 00 3c lwz r0,60(r1) ffc093e4: 7f a3 eb 78 mr r3,r29 ffc093e8: 83 c1 00 30 lwz r30,48(r1) ffc093ec: 7c 08 03 a6 mtlr r0 ffc093f0: 83 a1 00 2c lwz r29,44(r1) ffc093f4: 83 e1 00 34 lwz r31,52(r1) ffc093f8: 38 21 00 38 addi r1,r1,56 ffc093fc: 4e 80 00 20 blr =============================================================================== ffc08fa8 : */ void vprintk( const char *fmt, va_list ap ) { ffc08fa8: 94 21 ff a8 stwu r1,-88(r1) ffc08fac: 7c 08 02 a6 mflr r0 ffc08fb0: 92 a1 00 2c stw r21,44(r1) for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); ffc08fb4: 3e a0 ff c2 lis r21,-62 ffc08fb8: 3a b5 48 9b addi r21,r21,18587 */ void vprintk( const char *fmt, va_list ap ) { ffc08fbc: 92 c1 00 30 stw r22,48(r1) unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { ffc08fc0: 3e c0 ff c2 lis r22,-62 ffc08fc4: 3a d6 48 9a addi r22,r22,18586 */ void vprintk( const char *fmt, va_list ap ) { ffc08fc8: 93 81 00 48 stw r28,72(r1) unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); ffc08fcc: 3f 80 00 00 lis r28,0 ffc08fd0: 3b 9c 26 ec addi r28,r28,9964 */ void vprintk( const char *fmt, va_list ap ) { ffc08fd4: 92 e1 00 34 stw r23,52(r1) toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) ffc08fd8: 3a e1 00 08 addi r23,r1,8 */ void vprintk( const char *fmt, va_list ap ) { ffc08fdc: 93 c1 00 50 stw r30,80(r1) ffc08fe0: 7c 9e 23 78 mr r30,r4 ffc08fe4: 93 e1 00 54 stw r31,84(r1) ffc08fe8: 7c 7f 1b 78 mr r31,r3 ffc08fec: 90 01 00 5c stw r0,92(r1) ffc08ff0: 93 01 00 38 stw r24,56(r1) ffc08ff4: 93 21 00 3c stw r25,60(r1) ffc08ff8: 93 41 00 40 stw r26,64(r1) ffc08ffc: 93 61 00 44 stw r27,68(r1) ffc09000: 93 a1 00 4c stw r29,76(r1) for (; *fmt != '\0'; fmt++) { ffc09004: 48 00 03 34 b ffc09338 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { ffc09008: 2f 83 00 25 cmpwi cr7,r3,37 ffc0900c: 40 9e 01 f4 bne- cr7,ffc09200 BSP_output_char(*fmt); continue; } fmt++; if (*fmt == '0' ) { ffc09010: 8c 1f 00 01 lbzu r0,1(r31) ffc09014: 3b 00 00 20 li r24,32 ffc09018: 2f 80 00 30 cmpwi cr7,r0,48 ffc0901c: 40 be 00 0c bne+ cr7,ffc09028 lead = '0'; fmt++; ffc09020: 3b ff 00 01 addi r31,r31,1 ffc09024: 3b 00 00 30 li r24,48 } if (*fmt == '-' ) { ffc09028: 88 1f 00 00 lbz r0,0(r31) ffc0902c: 3b 20 00 00 li r25,0 ffc09030: 2f 80 00 2d cmpwi cr7,r0,45 ffc09034: 40 be 00 0c bne+ cr7,ffc09040 minus = true; fmt++; ffc09038: 3b ff 00 01 addi r31,r31,1 ffc0903c: 3b 20 00 01 li r25,1 ffc09040: 3b a0 00 00 li r29,0 ffc09044: 48 00 00 0c b ffc09050 } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += ((unsigned) *fmt - '0'); ffc09048: 7f a0 5a 14 add r29,r0,r11 fmt++; ffc0904c: 3b ff 00 01 addi r31,r31,1 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { ffc09050: 88 7f 00 00 lbz r3,0(r31) width *= 10; ffc09054: 1d 7d 00 0a mulli r11,r29,10 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { ffc09058: 38 03 ff d0 addi r0,r3,-48 ffc0905c: 54 09 06 3e clrlwi r9,r0,24 ffc09060: 2b 89 00 09 cmplwi cr7,r9,9 ffc09064: 40 9d ff e4 ble+ cr7,ffc09048 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { ffc09068: 2f 83 00 6c cmpwi cr7,r3,108 ffc0906c: 40 be 00 08 bne+ cr7,ffc09074 lflag = true; c = *++fmt; ffc09070: 8c 7f 00 01 lbzu r3,1(r31) } if ( c == 'c' ) { ffc09074: 2f 83 00 63 cmpwi cr7,r3,99 ffc09078: 40 be 00 3c bne+ cr7,ffc090b4 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); ffc0907c: 89 7e 00 00 lbz r11,0(r30) ffc09080: 2b 8b 00 07 cmplwi cr7,r11,7 ffc09084: 41 9d 00 1c bgt- cr7,ffc090a0 <== NEVER TAKEN ffc09088: 81 3e 00 08 lwz r9,8(r30) ffc0908c: 38 0b 00 01 addi r0,r11,1 ffc09090: 55 6b 10 3a rlwinm r11,r11,2,0,29 ffc09094: 98 1e 00 00 stb r0,0(r30) ffc09098: 7d 29 5a 14 add r9,r9,r11 ffc0909c: 48 00 00 10 b ffc090ac ffc090a0: 81 3e 00 04 lwz r9,4(r30) <== NOT EXECUTED ffc090a4: 38 09 00 04 addi r0,r9,4 <== NOT EXECUTED ffc090a8: 90 1e 00 04 stw r0,4(r30) <== NOT EXECUTED BSP_output_char(chr); ffc090ac: 88 69 00 03 lbz r3,3(r9) ffc090b0: 48 00 01 50 b ffc09200 continue; } if ( c == 's' ) { ffc090b4: 2f 83 00 73 cmpwi cr7,r3,115 ffc090b8: 40 be 00 e8 bne+ cr7,ffc091a0 unsigned i, len; char *s, *str; str = va_arg(ap, char *); ffc090bc: 89 7e 00 00 lbz r11,0(r30) ffc090c0: 2b 8b 00 07 cmplwi cr7,r11,7 ffc090c4: 41 9d 00 1c bgt- cr7,ffc090e0 <== NEVER TAKEN ffc090c8: 81 3e 00 08 lwz r9,8(r30) ffc090cc: 38 0b 00 01 addi r0,r11,1 ffc090d0: 55 6b 10 3a rlwinm r11,r11,2,0,29 ffc090d4: 98 1e 00 00 stb r0,0(r30) ffc090d8: 7d 29 5a 14 add r9,r9,r11 ffc090dc: 48 00 00 10 b ffc090ec ffc090e0: 81 3e 00 04 lwz r9,4(r30) <== NOT EXECUTED ffc090e4: 38 09 00 04 addi r0,r9,4 <== NOT EXECUTED ffc090e8: 90 1e 00 04 stw r0,4(r30) <== NOT EXECUTED ffc090ec: 83 49 00 00 lwz r26,0(r9) if ( str == NULL ) { ffc090f0: 2f 9a 00 00 cmpwi cr7,r26,0 ffc090f4: 40 be 00 08 bne+ cr7,ffc090fc ffc090f8: 7e da b3 78 mr r26,r22 ffc090fc: 3b 60 00 00 li r27,0 str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) ffc09100: 48 00 00 08 b ffc09108 ffc09104: 3b 7b 00 01 addi r27,r27,1 ffc09108: 7c 1a d8 ae lbzx r0,r26,r27 ffc0910c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09110: 40 9e ff f4 bne+ cr7,ffc09104 ; /* leading spaces */ if ( !minus ) ffc09114: 2f 99 00 00 cmpwi cr7,r25,0 ffc09118: 7f 78 db 78 mr r24,r27 ffc0911c: 41 9e 00 14 beq- cr7,ffc09130 ffc09120: 48 00 00 20 b ffc09140 for ( i=len ; i BSP_output_char(' '); /* no width option */ if (width == 0) { ffc09140: 2f 9d 00 00 cmpwi cr7,r29,0 ffc09144: 40 9e 00 08 bne- cr7,ffc0914c ffc09148: 7f 7d db 78 mr r29,r27 width = len; } /* output the string */ for ( i=0 ; i ffc09154: 48 00 00 10 b ffc09164 BSP_output_char(*str); ffc09158: 80 1c 00 00 lwz r0,0(r28) ffc0915c: 7c 09 03 a6 mtctr r0 ffc09160: 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 ) ffc09174: 2f 99 00 00 cmpwi cr7,r25,0 ffc09178: 40 9e 00 14 bne- cr7,ffc0918c ffc0917c: 48 00 01 b8 b ffc09334 for ( i=len ; i ffc0919c: 48 00 01 98 b ffc09334 continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { ffc091a0: 2f 83 00 6f cmpwi cr7,r3,111 ffc091a4: 41 9e 00 6c beq- cr7,ffc09210 <== NEVER TAKEN ffc091a8: 2f 83 00 4f cmpwi cr7,r3,79 ffc091ac: 41 9e 00 64 beq- cr7,ffc09210 base = 8; sign = false; } else if ( c == 'i' || c == 'I' || ffc091b0: 2f 83 00 69 cmpwi cr7,r3,105 ffc091b4: 41 9e 00 68 beq- cr7,ffc0921c ffc091b8: 2f 83 00 49 cmpwi cr7,r3,73 ffc091bc: 41 9e 00 60 beq- cr7,ffc0921c ffc091c0: 2f 83 00 64 cmpwi cr7,r3,100 ffc091c4: 41 9e 00 58 beq- cr7,ffc0921c ffc091c8: 2f 83 00 44 cmpwi cr7,r3,68 ffc091cc: 41 9e 00 50 beq- cr7,ffc0921c c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { ffc091d0: 2f 83 00 75 cmpwi cr7,r3,117 ffc091d4: 41 9e 00 50 beq- cr7,ffc09224 ffc091d8: 2f 83 00 55 cmpwi cr7,r3,85 ffc091dc: 41 9e 00 48 beq- cr7,ffc09224 base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { ffc091e0: 2f 83 00 78 cmpwi cr7,r3,120 ffc091e4: 41 9e 00 4c beq- cr7,ffc09230 ffc091e8: 2f 83 00 58 cmpwi cr7,r3,88 ffc091ec: 41 9e 00 44 beq- cr7,ffc09230 base = 16; sign = false; } else if ( c == 'p' ) { ffc091f0: 2f 83 00 70 cmpwi cr7,r3,112 ffc091f4: 38 00 00 00 li r0,0 ffc091f8: 3b 60 00 10 li r27,16 ffc091fc: 41 9e 00 3c beq- cr7,ffc09238 base = 16; sign = false; lflag = true; } else { BSP_output_char(c); ffc09200: 80 1c 00 00 lwz r0,0(r28) ffc09204: 7c 09 03 a6 mtctr r0 ffc09208: 4e 80 04 21 bctrl continue; ffc0920c: 48 00 01 28 b ffc09334 ffc09210: 38 00 00 00 li r0,0 ffc09214: 3b 60 00 08 li r27,8 ffc09218: 48 00 00 20 b ffc09238 ffc0921c: 38 00 00 01 li r0,1 ffc09220: 48 00 00 08 b ffc09228 ffc09224: 38 00 00 00 li r0,0 ffc09228: 3b 60 00 0a li r27,10 ffc0922c: 48 00 00 0c b ffc09238 ffc09230: 38 00 00 00 li r0,0 ffc09234: 3b 60 00 10 li r27,16 } printNum( lflag ? va_arg(ap, long) : (long) va_arg(ap, int), ffc09238: 89 7e 00 00 lbz r11,0(r30) ffc0923c: 2b 8b 00 07 cmplwi cr7,r11,7 ffc09240: 41 9d 00 1c bgt- cr7,ffc0925c ffc09244: 81 3e 00 08 lwz r9,8(r30) ffc09248: 39 4b 00 01 addi r10,r11,1 ffc0924c: 55 6b 10 3a rlwinm r11,r11,2,0,29 ffc09250: 99 5e 00 00 stb r10,0(r30) ffc09254: 7d 29 5a 14 add r9,r9,r11 } else { BSP_output_char(c); continue; } printNum( ffc09258: 48 00 00 10 b ffc09268 lflag ? va_arg(ap, long) : (long) va_arg(ap, int), ffc0925c: 81 3e 00 04 lwz r9,4(r30) ffc09260: 39 69 00 04 addi r11,r9,4 ffc09264: 91 7e 00 04 stw r11,4(r30) unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { ffc09268: 2f 80 00 00 cmpwi cr7,r0,0 } else { BSP_output_char(c); continue; } printNum( ffc0926c: 83 49 00 00 lwz r26,0(r9) unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { ffc09270: 41 9e 00 3c beq- cr7,ffc092ac ffc09274: 2f 9a 00 00 cmpwi cr7,r26,0 ffc09278: 40 bc 00 34 bge+ cr7,ffc092ac BSP_output_char('-'); ffc0927c: 80 1c 00 00 lwz r0,0(r28) ffc09280: 38 60 00 2d li r3,45 ffc09284: 7c 09 03 a6 mtctr r0 ffc09288: 4e 80 04 21 bctrl unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; ffc0928c: 7f a9 fe 70 srawi r9,r29,31 ffc09290: 7d 20 ea 78 xor r0,r9,r29 ffc09294: 7c 09 00 50 subf r0,r9,r0 ffc09298: 7c 00 00 d0 neg r0,r0 ffc0929c: 54 00 0f fe rlwinm r0,r0,1,31,31 ffc092a0: 7f a0 e8 50 subf r29,r0,r29 unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); unsigned_num = (unsigned long) -num; ffc092a4: 7c 1a 00 d0 neg r0,r26 ffc092a8: 48 00 00 08 b ffc092b0 if (maxwidth) maxwidth--; } else { unsigned_num = (unsigned long) num; ffc092ac: 7f 40 d3 78 mr r0,r26 ffc092b0: 3b 40 00 00 li r26,0 ffc092b4: 48 00 00 10 b ffc092c4 } count = 0; while ((n = unsigned_num / base) > 0) { toPrint[count++] = (char) (unsigned_num - (n * base)); ffc092b8: 99 4b 00 08 stb r10,8(r11) ffc092bc: 7f 3a cb 78 mr r26,r25 ffc092c0: 7d 20 4b 78 mr r0,r9 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { ffc092c4: 7d 20 db 96 divwu r9,r0,r27 ffc092c8: 2f 89 00 00 cmpwi cr7,r9,0 toPrint[count++] = (char) (unsigned_num - (n * base)); ffc092cc: 7d 49 d9 d6 mullw r10,r9,r27 ffc092d0: 7d 61 d2 14 add r11,r1,r26 ffc092d4: 7d 4a 00 50 subf r10,r10,r0 ffc092d8: 3b 3a 00 01 addi r25,r26,1 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { ffc092dc: 40 9e ff dc bne+ cr7,ffc092b8 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; ffc092e0: 98 0b 00 08 stb r0,8(r11) ffc092e4: 48 00 00 10 b ffc092f4 for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); ffc092e8: 80 1c 00 00 lwz r0,0(r28) ffc092ec: 7c 09 03 a6 mtctr r0 ffc092f0: 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-- ) ffc092f4: 7f 9d c8 40 cmplw cr7,r29,r25 BSP_output_char(lead); ffc092f8: 7f 03 c3 78 mr r3,r24 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) ffc092fc: 3b bd ff ff addi r29,r29,-1 ffc09300: 41 9d ff e8 bgt+ cr7,ffc092e8 ffc09304: 7f 57 d2 14 add r26,r23,r26 ffc09308: 3b a0 00 00 li r29,0 ffc0930c: 48 00 00 1c b ffc09328 BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); ffc09310: 89 3a 00 00 lbz r9,0(r26) toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { ffc09314: 3b 5a ff ff addi r26,r26,-1 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); ffc09318: 80 1c 00 00 lwz r0,0(r28) ffc0931c: 7c 75 48 ae lbzx r3,r21,r9 ffc09320: 7c 09 03 a6 mtctr r0 ffc09324: 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++) { ffc09328: 7f 9d c8 40 cmplw cr7,r29,r25 ffc0932c: 3b bd 00 01 addi r29,r29,1 ffc09330: 41 9c ff e0 blt+ cr7,ffc09310 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { ffc09334: 3b ff 00 01 addi r31,r31,1 ffc09338: 88 7f 00 00 lbz r3,0(r31) ffc0933c: 2f 83 00 00 cmpwi cr7,r3,0 ffc09340: 40 9e fc c8 bne+ cr7,ffc09008 sign, width, lead ); } } ffc09344: 80 01 00 5c lwz r0,92(r1) ffc09348: 82 a1 00 2c lwz r21,44(r1) ffc0934c: 7c 08 03 a6 mtlr r0 ffc09350: 82 c1 00 30 lwz r22,48(r1) ffc09354: 82 e1 00 34 lwz r23,52(r1) ffc09358: 83 01 00 38 lwz r24,56(r1) ffc0935c: 83 21 00 3c lwz r25,60(r1) ffc09360: 83 41 00 40 lwz r26,64(r1) ffc09364: 83 61 00 44 lwz r27,68(r1) ffc09368: 83 81 00 48 lwz r28,72(r1) ffc0936c: 83 a1 00 4c lwz r29,76(r1) ffc09370: 83 c1 00 50 lwz r30,80(r1) ffc09374: 83 e1 00 54 lwz r31,84(r1) ffc09378: 38 21 00 58 addi r1,r1,88 ffc0937c: 4e 80 00 20 blr =============================================================================== ffc237e4 : ssize_t write( int fd, const void *buffer, size_t count ) { ffc237e4: 94 21 ff f0 stwu r1,-16(r1) ffc237e8: 7c 08 02 a6 mflr r0 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc237ec: 3d 20 00 00 lis r9,0 ssize_t write( int fd, const void *buffer, size_t count ) { ffc237f0: 90 01 00 14 stw r0,20(r1) ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc237f4: 80 09 26 ac lwz r0,9900(r9) ssize_t write( int fd, const void *buffer, size_t count ) { ffc237f8: 93 e1 00 0c stw r31,12(r1) ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); ffc237fc: 7f 83 00 40 cmplw cr7,r3,r0 ffc23800: 40 9c 00 20 bge- cr7,ffc23820 <== NEVER TAKEN iop = rtems_libio_iop( fd ); ffc23804: 3d 40 00 00 lis r10,0 ffc23808: 83 ea 27 6c lwz r31,10092(r10) ffc2380c: 1c 63 00 48 mulli r3,r3,72 ffc23810: 7f ff 1a 14 add r31,r31,r3 rtems_libio_check_is_open( iop ); ffc23814: 80 1f 00 18 lwz r0,24(r31) ffc23818: 70 0a 01 00 andi. r10,r0,256 ffc2381c: 40 a2 00 10 bne+ ffc2382c <== ALWAYS TAKEN ffc23820: 4b ff 48 4d bl ffc1806c <__errno> <== NOT EXECUTED ffc23824: 38 00 00 09 li r0,9 <== NOT EXECUTED ffc23828: 48 00 00 44 b ffc2386c <== NOT EXECUTED rtems_libio_check_buffer( buffer ); ffc2382c: 2f 84 00 00 cmpwi cr7,r4,0 ffc23830: 41 9e 00 18 beq- cr7,ffc23848 <== NEVER TAKEN rtems_libio_check_count( count ); ffc23834: 2f 85 00 00 cmpwi cr7,r5,0 ffc23838: 38 60 00 00 li r3,0 ffc2383c: 41 9e 00 70 beq- cr7,ffc238ac rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); ffc23840: 70 09 00 04 andi. r9,r0,4 ffc23844: 40 a2 00 10 bne+ ffc23854 <== ALWAYS TAKEN ffc23848: 4b ff 48 25 bl ffc1806c <__errno> <== NOT EXECUTED ffc2384c: 38 00 00 16 li r0,22 <== NOT EXECUTED ffc23850: 48 00 00 1c b ffc2386c <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) ffc23854: 81 3f 00 40 lwz r9,64(r31) ffc23858: 80 09 00 0c lwz r0,12(r9) ffc2385c: 2f 80 00 00 cmpwi cr7,r0,0 ffc23860: 40 be 00 18 bne+ cr7,ffc23878 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc23864: 4b ff 48 09 bl ffc1806c <__errno> <== NOT EXECUTED ffc23868: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc2386c: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED ffc23870: 38 60 ff ff li r3,-1 <== NOT EXECUTED ffc23874: 48 00 00 38 b ffc238ac <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); ffc23878: 7f e3 fb 78 mr r3,r31 ffc2387c: 7c 09 03 a6 mtctr r0 ffc23880: 4e 80 04 21 bctrl if ( rc > 0 ) ffc23884: 2c 03 00 00 cmpwi r3,0 ffc23888: 40 81 00 24 ble- ffc238ac <== NEVER TAKEN iop->offset += rc; ffc2388c: 80 ff 00 10 lwz r7,16(r31) ffc23890: 7c 6a 1b 78 mr r10,r3 ffc23894: 81 1f 00 14 lwz r8,20(r31) ffc23898: 7c 69 fe 70 srawi r9,r3,31 ffc2389c: 7d 88 50 14 addc r12,r8,r10 ffc238a0: 7d 67 49 14 adde r11,r7,r9 ffc238a4: 91 7f 00 10 stw r11,16(r31) ffc238a8: 91 9f 00 14 stw r12,20(r31) return rc; } ffc238ac: 80 01 00 14 lwz r0,20(r1) ffc238b0: 83 e1 00 0c lwz r31,12(r1) ffc238b4: 38 21 00 10 addi r1,r1,16 ffc238b8: 7c 08 03 a6 mtlr r0 ffc238bc: 4e 80 00 20 blr =============================================================================== ffc08ff0 : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { ffc08ff0: 94 21 ff d8 stwu r1,-40(r1) ffc08ff4: 7c 08 02 a6 mflr r0 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); ffc08ff8: 3d 20 00 00 lis r9,0 ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { ffc08ffc: 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 ); ffc09000: 80 09 26 8c lwz r0,9868(r9) ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { ffc09004: 93 81 00 18 stw r28,24(r1) ffc09008: 7c bc 2b 78 mr r28,r5 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); ffc0900c: 7f 83 00 40 cmplw cr7,r3,r0 ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { ffc09010: 93 21 00 0c stw r25,12(r1) ffc09014: 93 41 00 10 stw r26,16(r1) ffc09018: 93 61 00 14 stw r27,20(r1) ffc0901c: 93 a1 00 1c stw r29,28(r1) ffc09020: 93 c1 00 20 stw r30,32(r1) ffc09024: 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 ); ffc09028: 40 9c 00 20 bge- cr7,ffc09048 <== NEVER TAKEN iop = rtems_libio_iop( fd ); ffc0902c: 3d 20 00 00 lis r9,0 ffc09030: 83 a9 27 50 lwz r29,10064(r9) ffc09034: 1c 63 00 48 mulli r3,r3,72 ffc09038: 7f bd 1a 14 add r29,r29,r3 rtems_libio_check_is_open( iop ); ffc0903c: 80 1d 00 18 lwz r0,24(r29) ffc09040: 70 09 01 00 andi. r9,r0,256 ffc09044: 40 a2 00 10 bne+ ffc09054 ffc09048: 48 00 b7 ed bl ffc14834 <__errno> ffc0904c: 38 00 00 09 li r0,9 ffc09050: 48 00 00 14 b ffc09064 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); ffc09054: 70 09 00 04 andi. r9,r0,4 ffc09058: 40 a2 00 14 bne+ ffc0906c <== ALWAYS TAKEN ffc0905c: 48 00 b7 d9 bl ffc14834 <__errno> ffc09060: 38 00 00 16 li r0,22 ffc09064: 90 03 00 00 stw r0,0(r3) ffc09068: 48 00 00 cc b ffc09134 /* * Argument validation on IO vector */ if ( !iov ) ffc0906c: 2f 84 00 00 cmpwi cr7,r4,0 ffc09070: 41 be ff ec beq- cr7,ffc0905c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) ffc09074: 2f 85 00 00 cmpwi cr7,r5,0 ffc09078: 40 bd ff e4 ble- cr7,ffc0905c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) ffc0907c: 2f 85 04 00 cmpwi cr7,r5,1024 ffc09080: 41 bd ff dc bgt- cr7,ffc0905c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) ffc09084: 81 3d 00 40 lwz r9,64(r29) ffc09088: 80 09 00 0c lwz r0,12(r9) ffc0908c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09090: 40 be 00 10 bne+ cr7,ffc090a0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); ffc09094: 48 00 b7 a1 bl ffc14834 <__errno> <== NOT EXECUTED ffc09098: 38 00 00 86 li r0,134 <== NOT EXECUTED ffc0909c: 4b ff ff c8 b ffc09064 <== NOT EXECUTED ffc090a0: 7c a9 03 a6 mtctr r5 ffc090a4: 7c 9e 23 78 mr r30,r4 ffc090a8: 7c 89 23 78 mr r9,r4 ffc090ac: 38 00 00 01 li r0,1 ffc090b0: 39 60 00 00 li r11,0 * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { if ( !iov[v].iov_base ) ffc090b4: 81 49 00 00 lwz r10,0(r9) ffc090b8: 2f 8a 00 00 cmpwi cr7,r10,0 ffc090bc: 41 be ff a0 beq- cr7,ffc0905c 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 ) ffc090c0: 81 09 00 04 lwz r8,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++ ) { ffc090c4: 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; ffc090c8: 7d 4b 42 14 add r10,r11,r8 if ( total < old || total > SSIZE_MAX ) ffc090cc: 7f 0a 58 00 cmpw cr6,r10,r11 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 ) ffc090d0: 31 08 ff ff addic r8,r8,-1 ffc090d4: 7d 08 41 10 subfe r8,r8,r8 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) ffc090d8: 2f 8a 7f ff cmpwi cr7,r10,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 ) ffc090dc: 7c 00 40 38 and r0,r0,r8 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) ffc090e0: 41 b8 ff 7c blt- cr6,ffc0905c ffc090e4: 41 bd ff 78 bgt- cr7,ffc0905c <== 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++ ) { ffc090e8: 42 40 00 0c bdz- ffc090f4 ffc090ec: 7d 4b 53 78 mr r11,r10 ffc090f0: 4b ff ff c4 b ffc090b4 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { ffc090f4: 2f 80 00 00 cmpwi cr7,r0,0 ffc090f8: 3b 60 00 00 li r27,0 ffc090fc: 3b e0 00 00 li r31,0 ffc09100: 40 9e 00 7c bne- cr7,ffc0917c /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) ffc09104: 80 be 00 04 lwz r5,4(r30) } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc09108: 3b 7b 00 01 addi r27,r27,1 /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) ffc0910c: 2f 85 00 00 cmpwi cr7,r5,0 ffc09110: 41 be 00 60 beq+ cr7,ffc09170 <== NEVER TAKEN continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); ffc09114: 81 3d 00 40 lwz r9,64(r29) ffc09118: 7f a3 eb 78 mr r3,r29 ffc0911c: 80 9e 00 00 lwz r4,0(r30) ffc09120: 80 09 00 0c lwz r0,12(r9) ffc09124: 7c 09 03 a6 mtctr r0 ffc09128: 4e 80 04 21 bctrl if ( bytes < 0 ) ffc0912c: 2c 03 00 00 cmpwi r3,0 ffc09130: 40 a0 00 0c bge+ ffc0913c <== ALWAYS TAKEN ffc09134: 3b e0 ff ff li r31,-1 ffc09138: 48 00 00 44 b ffc0917c return -1; if ( bytes > 0 ) { ffc0913c: 41 82 00 28 beq- ffc09164 <== NEVER TAKEN iop->offset += bytes; ffc09140: 81 7d 00 10 lwz r11,16(r29) ffc09144: 7c 7a 1b 78 mr r26,r3 ffc09148: 81 9d 00 14 lwz r12,20(r29) ffc0914c: 7c 79 fe 70 srawi r25,r3,31 total += bytes; ffc09150: 7f ff 1a 14 add r31,r31,r3 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; ffc09154: 7d 4c d0 14 addc r10,r12,r26 ffc09158: 7d 2b c9 14 adde r9,r11,r25 ffc0915c: 91 3d 00 10 stw r9,16(r29) ffc09160: 91 5d 00 14 stw r10,20(r29) total += bytes; } if (bytes != iov[ v ].iov_len) ffc09164: 80 1e 00 04 lwz r0,4(r30) ffc09168: 7f 83 00 00 cmpw cr7,r3,r0 ffc0916c: 40 9e 00 10 bne- cr7,ffc0917c <== NEVER TAKEN } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { ffc09170: 7f 9b e0 00 cmpw cr7,r27,r28 ffc09174: 3b de 00 08 addi r30,r30,8 ffc09178: 41 9c ff 8c blt+ cr7,ffc09104 if (bytes != iov[ v ].iov_len) break; } return total; } ffc0917c: 80 01 00 2c lwz r0,44(r1) ffc09180: 7f e3 fb 78 mr r3,r31 ffc09184: 83 21 00 0c lwz r25,12(r1) ffc09188: 7c 08 03 a6 mtlr r0 ffc0918c: 83 41 00 10 lwz r26,16(r1) ffc09190: 83 61 00 14 lwz r27,20(r1) ffc09194: 83 81 00 18 lwz r28,24(r1) ffc09198: 83 a1 00 1c lwz r29,28(r1) ffc0919c: 83 c1 00 20 lwz r30,32(r1) ffc091a0: 83 e1 00 24 lwz r31,36(r1) ffc091a4: 38 21 00 28 addi r1,r1,40 ffc091a8: 4e 80 00 20 blr