=============================================================================== 0200a5ac : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 200a5ac: c4 02 00 00 ld [ %o0 ], %g2 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 200a5b0: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 switch( node->type ) { 200a5b4: c4 00 a0 4c ld [ %g2 + 0x4c ], %g2 200a5b8: 84 00 bf ff add %g2, -1, %g2 200a5bc: 80 a0 a0 06 cmp %g2, 6 200a5c0: 18 80 00 14 bgu 200a610 <== NEVER TAKEN 200a5c4: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 200a5c8: 85 28 a0 02 sll %g2, 2, %g2 200a5cc: 07 00 80 29 sethi %hi(0x200a400), %g3 200a5d0: 86 10 e1 30 or %g3, 0x130, %g3 ! 200a530 200a5d4: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 200a5d8: 81 c0 80 00 jmp %g2 200a5dc: 01 00 00 00 nop case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 200a5e0: 10 80 00 0b b 200a60c 200a5e4: c2 00 60 0c ld [ %g1 + 0xc ], %g1 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 200a5e8: 03 00 80 6b sethi %hi(0x201ac00), %g1 200a5ec: 10 80 00 08 b 200a60c 200a5f0: 82 10 60 14 or %g1, 0x14, %g1 ! 201ac14 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 200a5f4: 03 00 80 6b sethi %hi(0x201ac00), %g1 200a5f8: 10 80 00 05 b 200a60c 200a5fc: 82 10 60 84 or %g1, 0x84, %g1 ! 201ac84 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 200a600: 10 80 00 03 b 200a60c 200a604: c2 00 60 08 ld [ %g1 + 8 ], %g1 break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 200a608: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 200a60c: c2 22 20 08 st %g1, [ %o0 + 8 ] break; } return 0; } 200a610: 81 c3 e0 08 retl 200a614: 90 10 20 00 clr %o0 =============================================================================== 0200a3c4 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 200a3c4: 9d e3 bf a0 save %sp, -96, %sp 200a3c8: 82 10 00 18 mov %i0, %g1 200a3cc: 92 10 00 1a mov %i2, %o1 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 200a3d0: 80 a0 60 00 cmp %g1, 0 200a3d4: 02 80 00 45 be 200a4e8 <== NEVER TAKEN 200a3d8: b0 10 20 00 clr %i0 return NULL; parent = parent_loc->node_access; 200a3dc: e0 00 40 00 ld [ %g1 ], %l0 fs_info = parent_loc->mt_entry->fs_info; 200a3e0: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 200a3e4: 80 a6 60 07 cmp %i1, 7 200a3e8: 12 80 00 08 bne 200a408 200a3ec: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 200a3f0: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 200a3f4: 03 00 80 6a sethi %hi(0x201a800), %g1 200a3f8: 82 10 63 8c or %g1, 0x38c, %g1 ! 201ab8c 200a3fc: 80 a0 80 01 cmp %g2, %g1 200a400: 02 80 00 3a be 200a4e8 200a404: 01 00 00 00 nop return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 200a408: 03 00 80 6f sethi %hi(0x201bc00), %g1 200a40c: c2 00 63 9c ld [ %g1 + 0x39c ], %g1 ! 201bf9c 200a410: 90 10 00 19 mov %i1, %o0 200a414: d4 00 60 2c ld [ %g1 + 0x2c ], %o2 200a418: 7f ff ff cf call 200a354 200a41c: 94 2e c0 0a andn %i3, %o2, %o2 if ( !node ) 200a420: b0 92 20 00 orcc %o0, 0, %i0 200a424: 02 80 00 31 be 200a4e8 200a428: 80 a6 60 01 cmp %i1, 1 return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { 200a42c: 12 80 00 08 bne 200a44c 200a430: 80 a6 60 03 cmp %i1, 3 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 200a434: 82 06 20 50 add %i0, 0x50, %g1 200a438: 84 06 20 54 add %i0, 0x54, %g2 head->next = tail; head->previous = NULL; 200a43c: c0 26 20 54 clr [ %i0 + 0x54 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 200a440: c4 26 20 50 st %g2, [ %i0 + 0x50 ] head->previous = NULL; tail->previous = head; 200a444: 10 80 00 21 b 200a4c8 200a448: c2 26 20 58 st %g1, [ %i0 + 0x58 ] rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { 200a44c: 22 80 00 06 be,a 200a464 200a450: c2 07 00 00 ld [ %i4 ], %g1 node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { 200a454: 80 a6 60 04 cmp %i1, 4 200a458: 12 80 00 05 bne 200a46c 200a45c: 80 a6 60 02 cmp %i1, 2 node->info.sym_link.name = info->sym_link.name; 200a460: c2 07 00 00 ld [ %i4 ], %g1 200a464: 10 80 00 19 b 200a4c8 200a468: c2 26 20 50 st %g1, [ %i0 + 0x50 ] } else if ( type == IMFS_DEVICE ) { 200a46c: 12 80 00 07 bne 200a488 200a470: 80 a6 60 06 cmp %i1, 6 node->info.device.major = info->device.major; 200a474: c2 07 00 00 ld [ %i4 ], %g1 200a478: c2 26 20 50 st %g1, [ %i0 + 0x50 ] node->info.device.minor = info->device.minor; 200a47c: c2 07 20 04 ld [ %i4 + 4 ], %g1 200a480: 10 80 00 12 b 200a4c8 200a484: c2 26 20 54 st %g1, [ %i0 + 0x54 ] } else if ( type == IMFS_LINEAR_FILE ) { 200a488: 12 80 00 06 bne 200a4a0 200a48c: 80 a6 60 05 cmp %i1, 5 node->info.linearfile.size = 0; 200a490: c0 26 20 50 clr [ %i0 + 0x50 ] 200a494: c0 26 20 54 clr [ %i0 + 0x54 ] node->info.linearfile.direct = 0; 200a498: 10 80 00 0c b 200a4c8 200a49c: c0 26 20 58 clr [ %i0 + 0x58 ] } else if ( type == IMFS_MEMORY_FILE ) { 200a4a0: 12 80 00 08 bne 200a4c0 200a4a4: 80 a6 60 07 cmp %i1, 7 node->info.file.size = 0; 200a4a8: c0 26 20 50 clr [ %i0 + 0x50 ] 200a4ac: c0 26 20 54 clr [ %i0 + 0x54 ] node->info.file.indirect = 0; 200a4b0: c0 26 20 58 clr [ %i0 + 0x58 ] node->info.file.doubly_indirect = 0; 200a4b4: c0 26 20 5c clr [ %i0 + 0x5c ] node->info.file.triply_indirect = 0; 200a4b8: 10 80 00 04 b 200a4c8 200a4bc: c0 26 20 60 clr [ %i0 + 0x60 ] } else if ( type == IMFS_FIFO ) { 200a4c0: 22 80 00 02 be,a 200a4c8 <== ALWAYS TAKEN 200a4c4: c0 26 20 50 clr [ %i0 + 0x50 ] /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; 200a4c8: c2 07 60 04 ld [ %i5 + 4 ], %g1 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 200a4cc: e0 26 20 08 st %l0, [ %i0 + 8 ] node->st_ino = ++fs_info->ino_count; 200a4d0: 82 00 60 01 inc %g1 200a4d4: c2 27 60 04 st %g1, [ %i5 + 4 ] 200a4d8: c2 26 20 38 st %g1, [ %i0 + 0x38 ] 200a4dc: 90 04 20 50 add %l0, 0x50, %o0 200a4e0: 7f ff f2 8b call 2006f0c <_Chain_Append> 200a4e4: 92 10 00 18 mov %i0, %o1 rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 200a4e8: 81 c7 e0 08 ret 200a4ec: 81 e8 00 00 restore =============================================================================== 0200a6e8 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 200a6e8: 9d e3 bf 70 save %sp, -144, %sp 200a6ec: f2 27 a0 48 st %i1, [ %fp + 0x48 ] int i = 0; 200a6f0: c0 27 bf f8 clr [ %fp + -8 ] IMFS_token_types type = IMFS_CURRENT_DIR; char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 200a6f4: 80 8e bf f8 btst -8, %i2 200a6f8: 02 80 00 06 be 200a710 <== ALWAYS TAKEN 200a6fc: ba 10 00 18 mov %i0, %i5 rtems_set_errno_and_return_minus_one( EIO ); 200a700: 40 00 11 0f call 200eb3c <__errno> <== NOT EXECUTED 200a704: 01 00 00 00 nop <== NOT EXECUTED 200a708: 10 80 00 19 b 200a76c <== NOT EXECUTED 200a70c: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 200a710: f8 06 c0 00 ld [ %i3 ], %i4 rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; int len; IMFS_token_types type = IMFS_CURRENT_DIR; 200a714: a0 10 20 01 mov 1, %l0 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 200a718: 10 80 00 8d b 200a94c 200a71c: 33 00 80 6f sethi %hi(0x201bc00), %i1 type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 200a720: d2 07 a0 48 ld [ %fp + 0x48 ], %o1 200a724: 90 07 40 08 add %i5, %o0, %o0 200a728: 94 07 bf d0 add %fp, -48, %o2 200a72c: 40 00 02 25 call 200afc0 200a730: 96 07 bf fc add %fp, -4, %o3 pathnamelen -= len; 200a734: c2 07 bf fc ld [ %fp + -4 ], %g1 200a738: c4 07 a0 48 ld [ %fp + 0x48 ], %g2 200a73c: 84 20 80 01 sub %g2, %g1, %g2 200a740: c4 27 a0 48 st %g2, [ %fp + 0x48 ] i += len; 200a744: c4 07 bf f8 ld [ %fp + -8 ], %g2 200a748: 82 00 80 01 add %g2, %g1, %g1 200a74c: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !pathloc->node_access ) 200a750: c2 06 c0 00 ld [ %i3 ], %g1 200a754: 80 a0 60 00 cmp %g1, 0 200a758: 12 80 00 08 bne 200a778 <== ALWAYS TAKEN 200a75c: a0 10 00 08 mov %o0, %l0 rtems_set_errno_and_return_minus_one( ENOENT ); 200a760: 40 00 10 f7 call 200eb3c <__errno> 200a764: 01 00 00 00 nop 200a768: 82 10 20 02 mov 2, %g1 ! 2 200a76c: c2 22 00 00 st %g1, [ %o0 ] 200a770: 81 c7 e0 08 ret 200a774: 91 e8 3f ff restore %g0, -1, %o0 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 200a778: 80 a2 20 00 cmp %o0, 0 200a77c: 02 80 00 10 be 200a7bc 200a780: 80 a4 20 03 cmp %l0, 3 if ( node->type == IMFS_DIRECTORY ) 200a784: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a788: 80 a0 60 01 cmp %g1, 1 200a78c: 12 80 00 0c bne 200a7bc 200a790: 80 a4 20 03 cmp %l0, 3 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 200a794: 90 10 00 1b mov %i3, %o0 200a798: 7f ff ff a0 call 200a618 200a79c: 92 10 20 01 mov 1, %o1 200a7a0: 80 a2 20 00 cmp %o0, 0 200a7a4: 12 80 00 06 bne 200a7bc 200a7a8: 80 a4 20 03 cmp %l0, 3 rtems_set_errno_and_return_minus_one( EACCES ); 200a7ac: 40 00 10 e4 call 200eb3c <__errno> 200a7b0: 01 00 00 00 nop 200a7b4: 10 bf ff ee b 200a76c 200a7b8: 82 10 20 0d mov 0xd, %g1 ! d node = pathloc->node_access; switch( type ) { 200a7bc: 02 80 00 1c be 200a82c 200a7c0: f8 06 c0 00 ld [ %i3 ], %i4 200a7c4: 80 a4 20 04 cmp %l0, 4 200a7c8: 02 80 00 5d be 200a93c 200a7cc: 80 a4 20 02 cmp %l0, 2 200a7d0: 12 80 00 60 bne 200a950 200a7d4: 80 a4 20 04 cmp %l0, 4 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 200a7d8: c2 06 63 9c ld [ %i1 + 0x39c ], %g1 200a7dc: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 200a7e0: 80 a7 00 01 cmp %i4, %g1 200a7e4: 02 80 00 5b be 200a950 200a7e8: 80 a4 20 04 cmp %l0, 4 static inline bool rtems_filesystem_is_root_location( const rtems_filesystem_location_info_t *loc ) { return loc->mt_entry->mt_fs_root.node_access == loc->node_access; 200a7ec: d2 06 e0 10 ld [ %i3 + 0x10 ], %o1 /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { 200a7f0: c2 02 60 1c ld [ %o1 + 0x1c ], %g1 200a7f4: 80 a0 40 1c cmp %g1, %i4 200a7f8: 32 80 00 05 bne,a 200a80c 200a7fc: f8 07 20 08 ld [ %i4 + 8 ], %i4 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; 200a800: 90 10 00 1b mov %i3, %o0 200a804: 10 80 00 5f b 200a980 200a808: 92 02 60 08 add %o1, 8, %o1 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 200a80c: 80 a7 20 00 cmp %i4, 0 200a810: 32 80 00 4f bne,a 200a94c 200a814: f8 26 c0 00 st %i4, [ %i3 ] rtems_set_errno_and_return_minus_one( ENOENT ); 200a818: 40 00 10 c9 call 200eb3c <__errno> 200a81c: b0 10 3f ff mov -1, %i0 200a820: e0 22 00 00 st %l0, [ %o0 ] 200a824: 81 c7 e0 08 ret 200a828: 81 e8 00 00 restore case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 200a82c: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a830: 80 a0 60 03 cmp %g1, 3 200a834: 12 80 00 07 bne 200a850 200a838: 80 a0 60 04 cmp %g1, 4 IMFS_evaluate_hard_link( pathloc, 0 ); 200a83c: 90 10 00 1b mov %i3, %o0 200a840: 7f ff ff 97 call 200a69c 200a844: 92 10 20 00 clr %o1 node = pathloc->node_access; 200a848: 10 80 00 0b b 200a874 200a84c: f8 06 c0 00 ld [ %i3 ], %i4 * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { 200a850: 32 80 00 0a bne,a 200a878 200a854: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 result = IMFS_evaluate_sym_link( pathloc, 0 ); 200a858: 90 10 00 1b mov %i3, %o0 200a85c: 40 00 00 67 call 200a9f8 200a860: 92 10 20 00 clr %o1 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; 200a864: f8 06 c0 00 ld [ %i3 ], %i4 if ( result == -1 ) 200a868: 80 a2 3f ff cmp %o0, -1 200a86c: 02 80 00 61 be 200a9f0 <== NEVER TAKEN 200a870: b0 10 00 08 mov %o0, %i0 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 200a874: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a878: 80 a0 60 01 cmp %g1, 1 200a87c: 22 80 00 06 be,a 200a894 200a880: 90 10 00 1c mov %i4, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 200a884: 40 00 10 ae call 200eb3c <__errno> 200a888: 01 00 00 00 nop 200a88c: 10 bf ff b8 b 200a76c 200a890: 82 10 20 14 mov 0x14, %g1 ! 14 /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); 200a894: 40 00 01 ac call 200af44 200a898: 92 07 bf d0 add %fp, -48, %o1 if ( !node ) 200a89c: b8 92 20 00 orcc %o0, 0, %i4 200a8a0: 02 bf ff b0 be 200a760 200a8a4: 01 00 00 00 nop * file system and not the IMFS. For example the IMFS length is * limited. If the token is a parent directory move back up otherwise * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 200a8a8: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a8ac: 80 a0 60 01 cmp %g1, 1 200a8b0: 32 80 00 27 bne,a 200a94c 200a8b4: f8 26 c0 00 st %i4, [ %i3 ] 200a8b8: c2 07 20 5c ld [ %i4 + 0x5c ], %g1 200a8bc: 80 a0 60 00 cmp %g1, 0 200a8c0: 02 80 00 1d be 200a934 200a8c4: 90 10 00 1d mov %i5, %o0 IMFS_skip_separator( pathname, &pathnamelen, &i); 200a8c8: 92 07 a0 48 add %fp, 0x48, %o1 200a8cc: 7f ff ff 20 call 200a54c 200a8d0: 94 07 bf f8 add %fp, -8, %o2 if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { 200a8d4: c2 07 bf f8 ld [ %fp + -8 ], %g1 200a8d8: c4 4f 40 01 ldsb [ %i5 + %g1 ], %g2 200a8dc: 80 a0 a0 2e cmp %g2, 0x2e 200a8e0: 12 80 00 06 bne 200a8f8 200a8e4: b0 07 40 01 add %i5, %g1, %i0 200a8e8: c4 4e 20 01 ldsb [ %i0 + 1 ], %g2 200a8ec: 80 a0 a0 2e cmp %g2, 0x2e 200a8f0: 22 80 00 0c be,a 200a920 200a8f4: 82 00 60 02 add %g1, 2, %g1 *pathloc = node->info.directory.mt_fs->mt_fs_root; 200a8f8: d2 07 20 5c ld [ %i4 + 0x5c ], %o1 200a8fc: 90 10 00 1b mov %i3, %o0 200a900: 92 02 60 1c add %o1, 0x1c, %o1 200a904: 40 00 12 ea call 200f4ac 200a908: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalpath_h)( &pathname[i], 200a90c: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 200a910: 90 10 00 18 mov %i0, %o0 200a914: c2 00 40 00 ld [ %g1 ], %g1 200a918: 10 80 00 24 b 200a9a8 200a91c: d2 07 a0 48 ld [ %fp + 0x48 ], %o1 pathnamelen, flags, pathloc ); } i += 2; pathnamelen -= 2; node = node->Parent; 200a920: f8 07 20 08 ld [ %i4 + 8 ], %i4 *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalpath_h)( &pathname[i], pathnamelen, flags, pathloc ); } i += 2; 200a924: c2 27 bf f8 st %g1, [ %fp + -8 ] pathnamelen -= 2; 200a928: c2 07 a0 48 ld [ %fp + 0x48 ], %g1 200a92c: 82 00 7f fe add %g1, -2, %g1 200a930: c2 27 a0 48 st %g1, [ %fp + 0x48 ] /* * Set the node access to the point we have found. */ pathloc->node_access = node; break; 200a934: 10 80 00 06 b 200a94c 200a938: f8 26 c0 00 st %i4, [ %i3 ] case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 200a93c: 40 00 10 80 call 200eb3c <__errno> 200a940: 01 00 00 00 nop 200a944: 10 bf ff 8a b 200a76c 200a948: 82 10 20 5b mov 0x5b, %g1 ! 5b /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 200a94c: 80 a4 20 04 cmp %l0, 4 200a950: 02 80 00 04 be 200a960 <== NEVER TAKEN 200a954: 80 a4 20 00 cmp %l0, 0 200a958: 32 bf ff 72 bne,a 200a720 200a95c: d0 07 bf f8 ld [ %fp + -8 ], %o0 * 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 ) { 200a960: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a964: 80 a0 60 01 cmp %g1, 1 200a968: 12 80 00 15 bne 200a9bc 200a96c: 90 10 00 1b mov %i3, %o0 if ( node->info.directory.mt_fs != NULL ) { 200a970: d2 07 20 5c ld [ %i4 + 0x5c ], %o1 200a974: 80 a2 60 00 cmp %o1, 0 200a978: 02 80 00 11 be 200a9bc <== ALWAYS TAKEN 200a97c: 92 02 60 1c add %o1, 0x1c, %o1 *pathloc = node->info.directory.mt_fs->mt_fs_root; 200a980: 40 00 12 cb call 200f4ac 200a984: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalpath_h)( &pathname[i-len], 200a988: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 200a98c: c4 07 bf fc ld [ %fp + -4 ], %g2 200a990: d0 07 bf f8 ld [ %fp + -8 ], %o0 200a994: d2 07 a0 48 ld [ %fp + 0x48 ], %o1 200a998: c2 00 40 00 ld [ %g1 ], %g1 200a99c: 90 22 00 02 sub %o0, %g2, %o0 200a9a0: 92 00 80 09 add %g2, %o1, %o1 200a9a4: 90 07 40 08 add %i5, %o0, %o0 200a9a8: 94 10 00 1a mov %i2, %o2 200a9ac: 9f c0 40 00 call %g1 200a9b0: 96 10 00 1b mov %i3, %o3 200a9b4: 81 c7 e0 08 ret 200a9b8: 91 e8 00 08 restore %g0, %o0, %o0 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 200a9bc: 7f ff fe fc call 200a5ac 200a9c0: 01 00 00 00 nop /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 200a9c4: 92 10 00 1a mov %i2, %o1 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 200a9c8: b0 10 00 08 mov %o0, %i0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 200a9cc: 7f ff ff 13 call 200a618 200a9d0: 90 10 00 1b mov %i3, %o0 200a9d4: 80 a2 20 00 cmp %o0, 0 200a9d8: 12 80 00 06 bne 200a9f0 200a9dc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 200a9e0: 40 00 10 57 call 200eb3c <__errno> 200a9e4: b0 10 3f ff mov -1, %i0 ! ffffffff 200a9e8: 82 10 20 0d mov 0xd, %g1 200a9ec: c2 22 00 00 st %g1, [ %o0 ] return result; } 200a9f0: 81 c7 e0 08 ret 200a9f4: 81 e8 00 00 restore =============================================================================== 0200ab38 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 200ab38: 9d e3 bf 70 save %sp, -144, %sp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 200ab3c: f8 06 40 00 ld [ %i1 ], %i4 const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; 200ab40: c0 27 bf f4 clr [ %fp + -12 ] node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 200ab44: 90 10 00 18 mov %i0, %o0 200ab48: 40 00 15 95 call 201019c 200ab4c: ba 10 00 18 mov %i0, %i5 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 200ab50: 37 00 80 6f sethi %hi(0x201bc00), %i3 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 200ab54: d0 27 bf fc st %o0, [ %fp + -4 ] * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 200ab58: d0 07 bf f4 ld [ %fp + -12 ], %o0 200ab5c: d2 07 bf fc ld [ %fp + -4 ], %o1 200ab60: 90 07 40 08 add %i5, %o0, %o0 200ab64: 94 07 bf d0 add %fp, -48, %o2 200ab68: 40 00 01 16 call 200afc0 200ab6c: 96 07 bf f8 add %fp, -8, %o3 pathlen -= len; 200ab70: c2 07 bf f8 ld [ %fp + -8 ], %g1 200ab74: c4 07 bf fc ld [ %fp + -4 ], %g2 200ab78: 84 20 80 01 sub %g2, %g1, %g2 200ab7c: c4 27 bf fc st %g2, [ %fp + -4 ] i += len; 200ab80: c4 07 bf f4 ld [ %fp + -12 ], %g2 200ab84: 82 00 80 01 add %g2, %g1, %g1 200ab88: c2 27 bf f4 st %g1, [ %fp + -12 ] if ( !pathloc->node_access ) 200ab8c: c2 06 40 00 ld [ %i1 ], %g1 200ab90: 80 a0 60 00 cmp %g1, 0 200ab94: 02 80 00 99 be 200adf8 <== NEVER TAKEN 200ab98: b0 10 00 08 mov %o0, %i0 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 200ab9c: 80 a2 20 00 cmp %o0, 0 200aba0: 02 80 00 10 be 200abe0 200aba4: 80 a6 20 02 cmp %i0, 2 if ( node->type == IMFS_DIRECTORY ) 200aba8: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200abac: 80 a0 60 01 cmp %g1, 1 200abb0: 12 80 00 0c bne 200abe0 200abb4: 80 a6 20 02 cmp %i0, 2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 200abb8: 90 10 00 19 mov %i1, %o0 200abbc: 7f ff fe 97 call 200a618 200abc0: 92 10 20 01 mov 1, %o1 200abc4: 80 a2 20 00 cmp %o0, 0 200abc8: 12 80 00 06 bne 200abe0 200abcc: 80 a6 20 02 cmp %i0, 2 rtems_set_errno_and_return_minus_one( EACCES ); 200abd0: 40 00 0f db call 200eb3c <__errno> 200abd4: 01 00 00 00 nop 200abd8: 10 80 00 9d b 200ae4c 200abdc: 82 10 20 0d mov 0xd, %g1 ! d node = pathloc->node_access; switch( type ) { 200abe0: 02 80 00 0f be 200ac1c 200abe4: f8 06 40 00 ld [ %i1 ], %i4 200abe8: 80 a6 20 02 cmp %i0, 2 200abec: 18 80 00 07 bgu 200ac08 200abf0: 80 a6 20 03 cmp %i0, 3 200abf4: 80 a6 20 00 cmp %i0, 0 200abf8: 02 80 00 6e be 200adb0 200abfc: 01 00 00 00 nop * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 200ac00: 10 bf ff d7 b 200ab5c 200ac04: d0 07 bf f4 ld [ %fp + -12 ], %o0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 200ac08: 02 80 00 21 be 200ac8c 200ac0c: 80 a6 20 04 cmp %i0, 4 200ac10: 32 bf ff d3 bne,a 200ab5c <== NEVER TAKEN 200ac14: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED 200ac18: 30 80 00 6a b,a 200adc0 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 200ac1c: c2 06 e3 9c ld [ %i3 + 0x39c ], %g1 200ac20: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 200ac24: 80 a7 00 01 cmp %i4, %g1 200ac28: 02 bf ff cd be 200ab5c 200ac2c: d0 07 bf f4 ld [ %fp + -12 ], %o0 200ac30: d2 06 60 10 ld [ %i1 + 0x10 ], %o1 /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { 200ac34: c2 02 60 1c ld [ %o1 + 0x1c ], %g1 200ac38: 80 a0 40 1c cmp %g1, %i4 200ac3c: 32 80 00 0d bne,a 200ac70 200ac40: f8 07 20 08 ld [ %i4 + 8 ], %i4 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; 200ac44: 90 10 00 19 mov %i1, %o0 200ac48: 92 02 60 08 add %o1, 8, %o1 200ac4c: 40 00 12 18 call 200f4ac 200ac50: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 200ac54: c2 06 60 0c ld [ %i1 + 0xc ], %g1 200ac58: c4 07 bf f8 ld [ %fp + -8 ], %g2 200ac5c: d0 07 bf f4 ld [ %fp + -12 ], %o0 200ac60: c2 00 60 04 ld [ %g1 + 4 ], %g1 200ac64: 90 22 00 02 sub %o0, %g2, %o0 200ac68: 10 80 00 46 b 200ad80 200ac6c: 90 07 40 08 add %i5, %o0, %o0 } } else { if ( !node->Parent ) 200ac70: 80 a7 20 00 cmp %i4, 0 200ac74: 32 bf ff b9 bne,a 200ab58 200ac78: f8 26 40 00 st %i4, [ %i1 ] rtems_set_errno_and_return_minus_one( ENOENT ); 200ac7c: 40 00 0f b0 call 200eb3c <__errno> 200ac80: 01 00 00 00 nop 200ac84: 10 80 00 73 b 200ae50 200ac88: f0 22 00 00 st %i0, [ %o0 ] pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 200ac8c: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200ac90: 80 a0 60 03 cmp %g1, 3 200ac94: 12 80 00 0a bne 200acbc 200ac98: 80 a0 60 04 cmp %g1, 4 result = IMFS_evaluate_link( pathloc, 0 ); 200ac9c: 90 10 00 19 mov %i1, %o0 200aca0: 7f ff ff 78 call 200aa80 200aca4: 92 10 20 00 clr %o1 if ( result == -1 ) 200aca8: 80 a2 3f ff cmp %o0, -1 200acac: 12 80 00 0c bne 200acdc <== ALWAYS TAKEN 200acb0: b0 10 00 08 mov %o0, %i0 200acb4: 81 c7 e0 08 ret <== NOT EXECUTED 200acb8: 81 e8 00 00 restore <== NOT EXECUTED return -1; } else if ( node->type == IMFS_SYM_LINK ) { 200acbc: 32 80 00 09 bne,a 200ace0 200acc0: d0 06 40 00 ld [ %i1 ], %o0 result = IMFS_evaluate_link( pathloc, 0 ); 200acc4: 90 10 00 19 mov %i1, %o0 200acc8: 7f ff ff 6e call 200aa80 200accc: 92 10 20 00 clr %o1 if ( result == -1 ) 200acd0: 80 a2 3f ff cmp %o0, -1 200acd4: 02 bf ff f8 be 200acb4 <== NEVER TAKEN 200acd8: b0 10 00 08 mov %o0, %i0 return -1; } node = pathloc->node_access; 200acdc: d0 06 40 00 ld [ %i1 ], %o0 if ( !node ) 200ace0: 80 a2 20 00 cmp %o0, 0 200ace4: 02 80 00 57 be 200ae40 <== NEVER TAKEN 200ace8: 01 00 00 00 nop /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 200acec: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 200acf0: 80 a0 60 01 cmp %g1, 1 200acf4: 12 80 00 53 bne 200ae40 200acf8: 01 00 00 00 nop /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 200acfc: 40 00 00 92 call 200af44 200ad00: 92 07 bf d0 add %fp, -48, %o1 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 200ad04: b8 92 20 00 orcc %o0, 0, %i4 200ad08: 02 80 00 32 be 200add0 200ad0c: c2 07 bf f8 ld [ %fp + -8 ], %g1 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 200ad10: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200ad14: 80 a0 60 01 cmp %g1, 1 200ad18: 32 bf ff 90 bne,a 200ab58 200ad1c: f8 26 40 00 st %i4, [ %i1 ] 200ad20: c2 07 20 5c ld [ %i4 + 0x5c ], %g1 200ad24: 80 a0 60 00 cmp %g1, 0 200ad28: 02 80 00 20 be 200ada8 200ad2c: 90 10 00 1d mov %i5, %o0 IMFS_skip_separator( path, &pathlen, &i); 200ad30: 92 07 bf fc add %fp, -4, %o1 200ad34: 7f ff fe 06 call 200a54c 200ad38: 94 07 bf f4 add %fp, -12, %o2 if ((path[i] != '.') || (path[i + 1] != '.')) { 200ad3c: c2 07 bf f4 ld [ %fp + -12 ], %g1 200ad40: c4 4f 40 01 ldsb [ %i5 + %g1 ], %g2 200ad44: 80 a0 a0 2e cmp %g2, 0x2e 200ad48: 12 80 00 06 bne 200ad60 200ad4c: b0 07 40 01 add %i5, %g1, %i0 200ad50: c4 4e 20 01 ldsb [ %i0 + 1 ], %g2 200ad54: 80 a0 a0 2e cmp %g2, 0x2e 200ad58: 02 80 00 0f be 200ad94 <== ALWAYS TAKEN 200ad5c: 82 00 60 02 add %g1, 2, %g1 *pathloc = node->info.directory.mt_fs->mt_fs_root; 200ad60: d2 07 20 5c ld [ %i4 + 0x5c ], %o1 200ad64: 90 10 00 19 mov %i1, %o0 200ad68: 92 02 60 1c add %o1, 0x1c, %o1 200ad6c: 40 00 11 d0 call 200f4ac 200ad70: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalformake_h)( &path[i], 200ad74: c2 06 60 0c ld [ %i1 + 0xc ], %g1 200ad78: 90 10 00 18 mov %i0, %o0 200ad7c: c2 00 60 04 ld [ %g1 + 4 ], %g1 200ad80: 92 10 00 19 mov %i1, %o1 200ad84: 9f c0 40 00 call %g1 200ad88: 94 10 00 1a mov %i2, %o2 200ad8c: 81 c7 e0 08 ret 200ad90: 91 e8 00 08 restore %g0, %o0, %o0 pathloc, name ); } i += 2; pathlen -= 2; node = node->Parent; 200ad94: f8 07 20 08 ld [ %i4 + 8 ], %i4 *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; 200ad98: c2 27 bf f4 st %g1, [ %fp + -12 ] pathlen -= 2; 200ad9c: c2 07 bf fc ld [ %fp + -4 ], %g1 200ada0: 82 00 7f fe add %g1, -2, %g1 200ada4: c2 27 bf fc st %g1, [ %fp + -4 ] node = node->Parent; } pathloc->node_access = node; 200ada8: 10 bf ff 6c b 200ab58 200adac: f8 26 40 00 st %i4, [ %i1 ] } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 200adb0: 40 00 0f 63 call 200eb3c <__errno> 200adb4: 01 00 00 00 nop 200adb8: 10 80 00 25 b 200ae4c 200adbc: 82 10 20 11 mov 0x11, %g1 ! 11 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 200adc0: 40 00 0f 5f call 200eb3c <__errno> 200adc4: 01 00 00 00 nop 200adc8: 10 80 00 21 b 200ae4c 200adcc: 82 10 20 5b mov 0x5b, %g1 ! 5b case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 200add0: c4 07 bf f4 ld [ %fp + -12 ], %g2 200add4: 82 20 80 01 sub %g2, %g1, %g1 200add8: 82 07 40 01 add %i5, %g1, %g1 /* * 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++) { 200addc: 10 80 00 0d b 200ae10 200ade0: c2 26 80 00 st %g1, [ %i2 ] if ( !IMFS_is_separator( path[ i ] ) ) 200ade4: 7f ff e3 bd call 2003cd8 200ade8: 01 00 00 00 nop 200adec: 80 a2 20 00 cmp %o0, 0 200adf0: 32 80 00 06 bne,a 200ae08 200adf4: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_set_errno_and_return_minus_one( ENOENT ); 200adf8: 40 00 0f 51 call 200eb3c <__errno> 200adfc: 01 00 00 00 nop 200ae00: 10 80 00 13 b 200ae4c 200ae04: 82 10 20 02 mov 2, %g1 ! 2 /* * 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++) { 200ae08: 82 00 60 01 inc %g1 200ae0c: c2 27 bf f4 st %g1, [ %fp + -12 ] 200ae10: c2 07 bf f4 ld [ %fp + -12 ], %g1 200ae14: d0 4f 40 01 ldsb [ %i5 + %g1 ], %o0 200ae18: 80 a2 20 00 cmp %o0, 0 200ae1c: 12 bf ff f2 bne 200ade4 200ae20: 01 00 00 00 nop /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 200ae24: 7f ff fd e2 call 200a5ac 200ae28: 90 10 00 19 mov %i1, %o0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 200ae2c: c2 06 40 00 ld [ %i1 ], %g1 200ae30: c2 00 60 4c ld [ %g1 + 0x4c ], %g1 200ae34: 80 a0 60 01 cmp %g1, 1 200ae38: 02 80 00 08 be 200ae58 <== ALWAYS TAKEN 200ae3c: b0 10 00 08 mov %o0, %i0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 200ae40: 40 00 0f 3f call 200eb3c <__errno> 200ae44: 01 00 00 00 nop 200ae48: 82 10 20 14 mov 0x14, %g1 ! 14 200ae4c: c2 22 00 00 st %g1, [ %o0 ] 200ae50: 81 c7 e0 08 ret 200ae54: 91 e8 3f ff restore %g0, -1, %o0 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 200ae58: 90 10 00 19 mov %i1, %o0 200ae5c: 7f ff fd ef call 200a618 200ae60: 92 10 20 03 mov 3, %o1 200ae64: 80 a2 20 00 cmp %o0, 0 200ae68: 12 80 00 06 bne 200ae80 200ae6c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 200ae70: 40 00 0f 33 call 200eb3c <__errno> 200ae74: b0 10 3f ff mov -1, %i0 ! ffffffff 200ae78: 82 10 20 0d mov 0xd, %g1 200ae7c: c2 22 00 00 st %g1, [ %o0 ] return result; } 200ae80: 81 c7 e0 08 ret 200ae84: 81 e8 00 00 restore =============================================================================== 0200a618 : */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 200a618: 9d e3 bf a0 save %sp, -96, %sp uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 200a61c: 80 8e 7f f8 btst -8, %i1 200a620: 02 80 00 08 be 200a640 <== ALWAYS TAKEN 200a624: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EPERM ); 200a628: 40 00 11 45 call 200eb3c <__errno> <== NOT EXECUTED 200a62c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 200a630: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 200a634: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200a638: 81 c7 e0 08 ret <== NOT EXECUTED 200a63c: 81 e8 00 00 restore <== NOT EXECUTED jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 200a640: 40 00 03 8e call 200b478 200a644: fa 06 00 00 ld [ %i0 ], %i5 st_gid = getegid(); 200a648: 40 00 03 88 call 200b468 200a64c: b8 10 00 08 mov %o0, %i4 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 200a650: c2 17 60 3c lduh [ %i5 + 0x3c ], %g1 200a654: b9 2f 20 10 sll %i4, 0x10, %i4 200a658: b9 37 20 10 srl %i4, 0x10, %i4 200a65c: 80 a7 00 01 cmp %i4, %g1 200a660: 32 80 00 04 bne,a 200a670 200a664: c2 17 60 3e lduh [ %i5 + 0x3e ], %g1 flags_to_test <<= 6; 200a668: 10 80 00 07 b 200a684 200a66c: b3 2e 60 06 sll %i1, 6, %i1 else if ( st_gid == jnode->st_gid ) 200a670: 91 2a 20 10 sll %o0, 0x10, %o0 200a674: 91 32 20 10 srl %o0, 0x10, %o0 200a678: 80 a2 00 01 cmp %o0, %g1 200a67c: 22 80 00 02 be,a 200a684 200a680: b3 2e 60 03 sll %i1, 3, %i1 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 200a684: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 return 1; 200a688: b2 2e 40 01 andn %i1, %g1, %i1 200a68c: 80 a0 00 19 cmp %g0, %i1 200a690: b0 60 3f ff subx %g0, -1, %i0 return 0; } 200a694: 81 c7 e0 08 ret 200a698: 81 e8 00 00 restore =============================================================================== 02003644 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 2003644: 9d e3 bf a0 save %sp, -96, %sp off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 2003648: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 200364c: 92 10 00 19 mov %i1, %o1 2003650: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 2003654: 98 10 00 18 mov %i0, %o4 2003658: 94 10 00 1a mov %i2, %o2 200365c: 40 00 27 d8 call 200d5bc 2003660: 96 10 00 1b mov %i3, %o3 2003664: b1 3a 20 1f sra %o0, 0x1f, %i0 IMFS_FIFO_RETURN(err); 2003668: 80 a6 20 00 cmp %i0, 0 200366c: 16 80 00 08 bge 200368c <== NEVER TAKEN 2003670: b2 10 00 08 mov %o0, %i1 2003674: 40 00 34 67 call 2010810 <__errno> 2003678: 31 3f ff ff sethi %hi(0xfffffc00), %i0 200367c: 82 20 00 19 neg %i1, %g1 2003680: c2 22 00 00 st %g1, [ %o0 ] 2003684: b0 16 23 ff or %i0, 0x3ff, %i0 2003688: b2 10 00 18 mov %i0, %i1 } 200368c: 81 c7 e0 08 ret 2003690: 81 e8 00 00 restore =============================================================================== 02003694 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 2003694: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = iop->pathinfo.node_access; 2003698: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 200369c: 96 10 00 18 mov %i0, %o3 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 20036a0: d0 07 60 50 ld [ %i5 + 0x50 ], %o0 20036a4: 92 10 00 19 mov %i1, %o1 20036a8: 40 00 27 37 call 200d384 20036ac: 94 10 00 1a mov %i2, %o2 if (err > 0) { 20036b0: b0 92 20 00 orcc %o0, 0, %i0 20036b4: 04 80 00 09 ble 20036d8 20036b8: 90 07 bf f8 add %fp, -8, %o0 IMFS_mtime_ctime_update(jnode); 20036bc: 40 00 04 20 call 200473c 20036c0: 92 10 20 00 clr %o1 20036c4: c2 07 bf f8 ld [ %fp + -8 ], %g1 20036c8: c2 27 60 44 st %g1, [ %i5 + 0x44 ] 20036cc: c2 27 60 48 st %g1, [ %i5 + 0x48 ] 20036d0: 81 c7 e0 08 ret 20036d4: 81 e8 00 00 restore } IMFS_FIFO_RETURN(err); 20036d8: 80 a6 20 00 cmp %i0, 0 20036dc: 02 80 00 06 be 20036f4 <== NEVER TAKEN 20036e0: 01 00 00 00 nop 20036e4: 40 00 34 4b call 2010810 <__errno> 20036e8: b0 20 00 18 neg %i0 20036ec: f0 22 00 00 st %i0, [ %o0 ] 20036f0: b0 10 3f ff mov -1, %i0 } 20036f4: 81 c7 e0 08 ret 20036f8: 81 e8 00 00 restore =============================================================================== 0200af44 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 200af44: 9d e3 bf a0 save %sp, -96, %sp /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 200af48: 13 00 80 6a sethi %hi(0x201a800), %o1 200af4c: 90 10 00 19 mov %i1, %o0 200af50: 40 00 12 a2 call 200f9d8 200af54: 92 12 63 f8 or %o1, 0x3f8, %o1 200af58: 80 a2 20 00 cmp %o0, 0 200af5c: 02 80 00 09 be 200af80 <== NEVER TAKEN 200af60: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 200af64: 13 00 80 6b sethi %hi(0x201ac00), %o1 200af68: 40 00 12 9c call 200f9d8 200af6c: 92 12 60 00 mov %o1, %o1 ! 201ac00 200af70: 80 a2 20 00 cmp %o0, 0 200af74: 32 80 00 05 bne,a 200af88 <== ALWAYS TAKEN 200af78: fa 06 20 50 ld [ %i0 + 0x50 ], %i5 return directory->Parent; 200af7c: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 200af80: 81 c7 e0 08 ret 200af84: 81 e8 00 00 restore the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 200af88: 10 80 00 08 b 200afa8 200af8c: b0 06 20 54 add %i0, 0x54, %i0 !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 ) ) 200af90: 40 00 12 92 call 200f9d8 200af94: 92 07 60 0c add %i5, 0xc, %o1 200af98: 80 a2 20 00 cmp %o0, 0 200af9c: 22 bf ff f9 be,a 200af80 200afa0: b0 10 00 1d mov %i5, %i0 the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 200afa4: fa 07 40 00 ld [ %i5 ], %i5 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 200afa8: 80 a7 40 18 cmp %i5, %i0 200afac: 12 bf ff f9 bne 200af90 200afb0: 90 10 00 19 mov %i1, %o0 200afb4: b0 10 20 00 clr %i0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 200afb8: 81 c7 e0 08 ret 200afbc: 81 e8 00 00 restore =============================================================================== 0200ae88 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 200ae88: 9d e3 bf 88 save %sp, -120, %sp * 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; 200ae8c: 94 10 20 14 mov 0x14, %o2 /* * 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; 200ae90: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 loc = temp_mt_entry->mt_fs_root; 200ae94: b8 07 bf ec add %fp, -20, %i4 200ae98: 92 06 20 1c add %i0, 0x1c, %o1 200ae9c: 40 00 11 84 call 200f4ac 200aea0: 90 10 00 1c mov %i4, %o0 200aea4: c0 26 20 1c clr [ %i0 + 0x1c ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 200aea8: f0 07 60 08 ld [ %i5 + 8 ], %i0 loc.node_access = (void *)jnode; 200aeac: fa 27 bf ec st %i5, [ %fp + -20 ] IMFS_Set_handlers( &loc ); 200aeb0: 7f ff fd bf call 200a5ac 200aeb4: 90 10 00 1c mov %i4, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 200aeb8: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200aebc: 80 a0 60 01 cmp %g1, 1 200aec0: 32 80 00 08 bne,a 200aee0 200aec4: 90 10 20 00 clr %o0 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 200aec8: c4 07 60 50 ld [ %i5 + 0x50 ], %g2 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 200aecc: 82 07 60 54 add %i5, 0x54, %g1 200aed0: 80 a0 80 01 cmp %g2, %g1 200aed4: 12 80 00 09 bne 200aef8 200aed8: 80 a7 60 00 cmp %i5, 0 result = IMFS_unlink( NULL, &loc ); 200aedc: 90 10 20 00 clr %o0 200aee0: 7f ff dd fb call 20026cc 200aee4: 92 10 00 1c mov %i4, %o1 if (result != 0) 200aee8: 80 a2 20 00 cmp %o0, 0 200aeec: 12 80 00 12 bne 200af34 <== NEVER TAKEN 200aef0: ba 10 00 18 mov %i0, %i5 return -1; jnode = next; } if ( jnode != NULL ) { 200aef4: 80 a7 60 00 cmp %i5, 0 200aef8: 02 80 00 11 be 200af3c 200aefc: 01 00 00 00 nop if ( jnode->type == IMFS_DIRECTORY ) { 200af00: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200af04: 80 a0 60 01 cmp %g1, 1 200af08: 32 bf ff e9 bne,a 200aeac <== NEVER TAKEN 200af0c: f0 07 60 08 ld [ %i5 + 8 ], %i0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 200af10: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 200af14: 84 07 60 54 add %i5, 0x54, %g2 if ( jnode_has_children( jnode ) ) 200af18: 80 a0 40 02 cmp %g1, %g2 200af1c: 02 bf ff e3 be 200aea8 200af20: 80 a0 60 00 cmp %g1, 0 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 200af24: 12 bf ff e1 bne 200aea8 <== ALWAYS TAKEN 200af28: ba 10 00 01 mov %g1, %i5 return 0; 200af2c: 81 c7 e0 08 ret <== NOT EXECUTED 200af30: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; 200af34: 81 c7 e0 08 ret <== NOT EXECUTED 200af38: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } } } while (jnode != NULL); return 0; } 200af3c: 81 c7 e0 08 ret 200af40: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200afc0 : const char *path, int pathlen, char *token, int *token_len ) { 200afc0: 9d e3 bf a0 save %sp, -96, %sp register int i = 0; 200afc4: ba 10 20 00 clr %i5 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 200afc8: 10 80 00 06 b 200afe0 200afcc: f8 0e 00 00 ldub [ %i0 ], %i4 token[i] = c; if ( i == IMFS_NAME_MAX ) 200afd0: 02 80 00 32 be 200b098 200afd4: f8 2e 80 1d stb %i4, [ %i2 + %i5 ] return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 200afd8: ba 07 60 01 inc %i5 200afdc: f8 0e 00 1d ldub [ %i0 + %i5 ], %i4 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 200afe0: 91 2f 20 18 sll %i4, 0x18, %o0 200afe4: 7f ff e3 3d call 2003cd8 200afe8: 91 3a 20 18 sra %o0, 0x18, %o0 200afec: 80 a2 20 00 cmp %o0, 0 200aff0: 12 80 00 04 bne 200b000 200aff4: 80 a7 40 19 cmp %i5, %i1 200aff8: 06 bf ff f6 bl 200afd0 <== ALWAYS TAKEN 200affc: 80 a7 60 20 cmp %i5, 0x20 /* * Copy a seperator into token. */ if ( i == 0 ) { 200b000: 80 a7 60 00 cmp %i5, 0 200b004: 12 80 00 0e bne 200b03c 200b008: 82 06 80 1d add %i2, %i5, %g1 token[i] = c; 200b00c: f8 2e 80 00 stb %i4, [ %i2 ] if ( (token[i] != '\0') && pathlen ) { 200b010: b9 2f 20 18 sll %i4, 0x18, %i4 200b014: 80 a7 20 00 cmp %i4, 0 200b018: 02 80 00 07 be 200b034 200b01c: ba 10 20 00 clr %i5 i++; type = IMFS_CURRENT_DIR; 200b020: b0 10 20 01 mov 1, %i0 */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { 200b024: 80 a6 60 00 cmp %i1, 0 200b028: 12 80 00 0a bne 200b050 200b02c: ba 10 20 01 mov 1, %i5 200b030: ba 10 20 00 clr %i5 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; 200b034: 10 80 00 07 b 200b050 200b038: b0 10 20 00 clr %i0 } } else if (token[ i-1 ] != '\0') { 200b03c: c2 48 7f ff ldsb [ %g1 + -1 ], %g1 200b040: 80 a0 60 00 cmp %g1, 0 200b044: 02 80 00 03 be 200b050 <== NEVER TAKEN 200b048: b0 10 20 03 mov 3, %i0 token[i] = '\0'; 200b04c: c0 2e 80 1d clrb [ %i2 + %i5 ] /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 200b050: 80 a6 20 03 cmp %i0, 3 200b054: 12 80 00 0f bne 200b090 200b058: fa 26 c0 00 st %i5, [ %i3 ] if ( strcmp( token, "..") == 0 ) 200b05c: 90 10 00 1a mov %i2, %o0 200b060: 13 00 80 6b sethi %hi(0x201ac00), %o1 200b064: 40 00 12 5d call 200f9d8 200b068: 92 12 60 08 or %o1, 8, %o1 ! 201ac08 200b06c: 80 a2 20 00 cmp %o0, 0 200b070: 02 80 00 0c be 200b0a0 200b074: 90 10 00 1a mov %i2, %o0 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 200b078: 13 00 80 6b sethi %hi(0x201ac00), %o1 200b07c: 40 00 12 57 call 200f9d8 200b080: 92 12 60 10 or %o1, 0x10, %o1 ! 201ac10 200b084: 80 a2 20 00 cmp %o0, 0 200b088: 22 80 00 02 be,a 200b090 200b08c: b0 10 20 01 mov 1, %i0 200b090: 81 c7 e0 08 ret 200b094: 81 e8 00 00 restore while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; if ( i == IMFS_NAME_MAX ) return IMFS_INVALID_TOKEN; 200b098: 81 c7 e0 08 ret 200b09c: 91 e8 20 04 restore %g0, 4, %o0 200b0a0: b0 10 20 02 mov 2, %i0 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 200b0a4: 81 c7 e0 08 ret 200b0a8: 81 e8 00 00 restore =============================================================================== 020022e0 : const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { 20022e0: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 20022e4: 03 00 80 6f sethi %hi(0x201bc00), %g1 20022e8: c2 00 62 b4 ld [ %g1 + 0x2b4 ], %g1 ! 201beb4 20022ec: 86 10 20 06 mov 6, %g3 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 20022f0: 84 10 20 10 mov 0x10, %g2 if (bit_mask == requested_bytes_per_block) { 20022f4: 80 a0 80 01 cmp %g2, %g1 20022f8: 22 80 00 08 be,a 2002318 20022fc: 05 00 80 71 sethi %hi(0x201c400), %g2 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 2002300: 14 80 00 04 bg 2002310 2002304: 86 80 ff ff addcc %g3, -1, %g3 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 2002308: 12 bf ff fb bne 20022f4 <== ALWAYS TAKEN 200230c: 85 28 a0 01 sll %g2, 1, %g2 if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 2002310: 82 10 20 80 mov 0x80, %g1 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 2002314: 05 00 80 71 sethi %hi(0x201c400), %g2 /* * 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(); 2002318: 40 00 20 76 call 200a4f0 200231c: c2 20 a2 a8 st %g1, [ %g2 + 0x2a8 ] ! 201c6a8 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; 2002320: 94 10 20 30 mov 0x30, %o2 /* * 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(); 2002324: d0 26 20 1c st %o0, [ %i0 + 0x1c ] 2002328: ba 10 00 08 mov %o0, %i5 temp_mt_entry->mt_fs_root.handlers = directory_handlers; 200232c: f6 26 20 24 st %i3, [ %i0 + 0x24 ] temp_mt_entry->mt_fs_root.ops = op_table; 2002330: f2 26 20 28 st %i1, [ %i0 + 0x28 ] temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 2002334: 90 06 20 38 add %i0, 0x38, %o0 2002338: 13 00 80 6a sethi %hi(0x201a800), %o1 200233c: 40 00 34 5c call 200f4ac 2002340: 92 12 63 c4 or %o1, 0x3c4, %o1 ! 201abc4 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 2002344: 90 10 20 01 mov 1, %o0 2002348: 40 00 01 a2 call 20029d0 200234c: 92 10 20 14 mov 0x14, %o1 if ( !fs_info ) { 2002350: 80 a2 20 00 cmp %o0, 0 2002354: 12 80 00 0a bne 200237c 2002358: 03 00 80 71 sethi %hi(0x201c400), %g1 free(temp_mt_entry->mt_fs_root.node_access); 200235c: 40 00 02 9e call 2002dd4 2002360: 90 10 00 1d mov %i5, %o0 rtems_set_errno_and_return_minus_one(ENOMEM); 2002364: 40 00 31 f6 call 200eb3c <__errno> 2002368: b0 10 3f ff mov -1, %i0 200236c: 82 10 20 0c mov 0xc, %g1 2002370: c2 22 00 00 st %g1, [ %o0 ] 2002374: 81 c7 e0 08 ret 2002378: 81 e8 00 00 restore /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 200237c: c4 00 62 ac ld [ %g1 + 0x2ac ], %g2 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; 2002380: d0 26 20 34 st %o0, [ %i0 + 0x34 ] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 2002384: c4 22 00 00 st %g2, [ %o0 ] fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 2002388: f4 22 20 08 st %i2, [ %o0 + 8 ] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 200238c: 84 00 a0 01 inc %g2 fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 2002390: f6 22 20 0c st %i3, [ %o0 + 0xc ] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 2002394: c4 20 62 ac st %g2, [ %g1 + 0x2ac ] fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers; 2002398: f8 22 20 10 st %i4, [ %o0 + 0x10 ] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; 200239c: 82 10 20 01 mov 1, %g1 20023a0: c2 22 20 04 st %g1, [ %o0 + 4 ] fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 20023a4: c2 27 60 38 st %g1, [ %i5 + 0x38 ] return 0; } 20023a8: 81 c7 e0 08 ret 20023ac: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200d684 : */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 200d684: 9d e3 bf 98 save %sp, -104, %sp IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 200d688: 03 00 80 71 sethi %hi(0x201c400), %g1 200d68c: fa 00 62 a8 ld [ %g1 + 0x2a8 ], %i5 ! 201c6a8 200d690: b9 37 60 02 srl %i5, 2, %i4 200d694: 92 10 00 1c mov %i4, %o1 200d698: 40 00 28 69 call 201783c <.umul> 200d69c: 90 07 20 01 add %i4, 1, %o0 200d6a0: 92 10 00 1c mov %i4, %o1 200d6a4: 40 00 28 66 call 201783c <.umul> 200d6a8: 90 02 20 01 inc %o0 200d6ac: 92 10 00 1d mov %i5, %o1 200d6b0: 40 00 28 63 call 201783c <.umul> 200d6b4: 90 02 3f ff add %o0, -1, %o0 200d6b8: 82 10 20 00 clr %g1 200d6bc: 80 a0 40 19 cmp %g1, %i1 200d6c0: 34 80 00 0b bg,a 200d6ec 200d6c4: f8 06 20 50 ld [ %i0 + 0x50 ], %i4 200d6c8: 80 a0 40 19 cmp %g1, %i1 200d6cc: 12 80 00 04 bne 200d6dc <== NEVER TAKEN 200d6d0: 80 a2 00 1a cmp %o0, %i2 200d6d4: 38 80 00 06 bgu,a 200d6ec 200d6d8: f8 06 20 50 ld [ %i0 + 0x50 ], %i4 rtems_set_errno_and_return_minus_one( EINVAL ); 200d6dc: 40 00 05 18 call 200eb3c <__errno> 200d6e0: 01 00 00 00 nop 200d6e4: 10 80 00 29 b 200d788 200d6e8: 82 10 20 16 mov 0x16, %g1 ! 16 /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 200d6ec: 80 a6 40 1c cmp %i1, %i4 200d6f0: 14 80 00 07 bg 200d70c <== NEVER TAKEN 200d6f4: e0 06 20 54 ld [ %i0 + 0x54 ], %l0 200d6f8: 80 a6 40 1c cmp %i1, %i4 200d6fc: 12 80 00 37 bne 200d7d8 200d700: 80 a6 80 10 cmp %i2, %l0 200d704: 08 80 00 35 bleu 200d7d8 200d708: 01 00 00 00 nop return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 200d70c: b7 3f 60 1f sra %i5, 0x1f, %i3 200d710: 96 10 00 1d mov %i5, %o3 200d714: 94 10 00 1b mov %i3, %o2 200d718: 90 10 00 19 mov %i1, %o0 200d71c: 40 00 29 da call 2017e84 <__divdi3> 200d720: 92 10 00 1a mov %i2, %o1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200d724: 90 10 00 1c mov %i4, %o0 200d728: 96 10 00 1d mov %i5, %o3 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 200d72c: a2 10 00 09 mov %o1, %l1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200d730: 94 10 00 1b mov %i3, %o2 200d734: 40 00 29 d4 call 2017e84 <__divdi3> 200d738: 92 10 00 10 mov %l0, %o1 200d73c: b8 10 00 09 mov %o1, %i4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 200d740: 10 80 00 15 b 200d794 200d744: ba 10 00 09 mov %o1, %i5 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 200d748: 7f ff ff 48 call 200d468 200d74c: 92 10 00 1d mov %i5, %o1 200d750: 80 a2 20 00 cmp %o0, 0 200d754: 22 80 00 10 be,a 200d794 200d758: ba 07 60 01 inc %i5 for ( ; block>=old_blocks ; block-- ) { 200d75c: 10 80 00 06 b 200d774 200d760: 80 a7 40 1c cmp %i5, %i4 IMFS_memfile_remove_block( the_jnode, block ); 200d764: 90 10 00 18 mov %i0, %o0 200d768: 7f ff ff bb call 200d654 200d76c: ba 07 7f ff add %i5, -1, %i5 /* * 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-- ) { 200d770: 80 a7 40 1c cmp %i5, %i4 200d774: 1a bf ff fc bcc 200d764 200d778: 92 10 00 1d mov %i5, %o1 IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 200d77c: 40 00 04 f0 call 200eb3c <__errno> 200d780: 01 00 00 00 nop 200d784: 82 10 20 1c mov 0x1c, %g1 ! 1c 200d788: c2 22 00 00 st %g1, [ %o0 ] 200d78c: 81 c7 e0 08 ret 200d790: 91 e8 3f ff restore %g0, -1, %o0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 200d794: 80 a7 40 11 cmp %i5, %l1 200d798: 08 bf ff ec bleu 200d748 200d79c: 90 10 00 18 mov %i0, %o0 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 200d7a0: f2 26 20 50 st %i1, [ %i0 + 0x50 ] 200d7a4: f4 26 20 54 st %i2, [ %i0 + 0x54 ] IMFS_update_ctime(the_jnode); 200d7a8: 92 10 20 00 clr %o1 200d7ac: 7f ff d5 b4 call 2002e7c 200d7b0: 90 07 bf f8 add %fp, -8, %o0 200d7b4: c2 07 bf f8 ld [ %fp + -8 ], %g1 IMFS_update_mtime(the_jnode); 200d7b8: 90 07 bf f8 add %fp, -8, %o0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); 200d7bc: c2 26 20 48 st %g1, [ %i0 + 0x48 ] IMFS_update_mtime(the_jnode); 200d7c0: 7f ff d5 af call 2002e7c 200d7c4: 92 10 20 00 clr %o1 200d7c8: c2 07 bf f8 ld [ %fp + -8 ], %g1 200d7cc: c2 26 20 44 st %g1, [ %i0 + 0x44 ] return 0; 200d7d0: 81 c7 e0 08 ret 200d7d4: 91 e8 20 00 restore %g0, 0, %o0 } 200d7d8: 81 c7 e0 08 ret 200d7dc: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200cfdc : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 200cfdc: 9d e3 bf a0 save %sp, -96, %sp my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 200cfe0: 03 00 80 71 sethi %hi(0x201c400), %g1 200cfe4: f8 00 62 a8 ld [ %g1 + 0x2a8 ], %i4 ! 201c6a8 200cfe8: b9 37 20 02 srl %i4, 2, %i4 200cfec: 82 07 3f ff add %i4, -1, %g1 200cff0: 80 a6 40 01 cmp %i1, %g1 200cff4: 18 80 00 18 bgu 200d054 200cff8: ba 10 00 18 mov %i0, %i5 p = info->indirect; if ( malloc_it ) { 200cffc: 80 a6 a0 00 cmp %i2, 0 200d000: 02 80 00 0f be 200d03c 200d004: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 if ( !p ) { 200d008: 80 a0 60 00 cmp %g1, 0 200d00c: 32 80 00 09 bne,a 200d030 200d010: f0 07 60 58 ld [ %i5 + 0x58 ], %i0 p = memfile_alloc_block(); 200d014: 7f ff ff e5 call 200cfa8 200d018: b0 10 20 00 clr %i0 if ( !p ) 200d01c: 80 a2 20 00 cmp %o0, 0 200d020: 02 80 00 8a be 200d248 <== NEVER TAKEN 200d024: 01 00 00 00 nop return 0; info->indirect = p; 200d028: d0 27 60 58 st %o0, [ %i5 + 0x58 ] } return &info->indirect[ my_block ]; 200d02c: f0 07 60 58 ld [ %i5 + 0x58 ], %i0 200d030: b3 2e 60 02 sll %i1, 2, %i1 200d034: 81 c7 e0 08 ret 200d038: 91 ee 00 19 restore %i0, %i1, %o0 } if ( !p ) 200d03c: 80 a0 60 00 cmp %g1, 0 200d040: 02 80 00 82 be 200d248 <== NEVER TAKEN 200d044: b0 10 20 00 clr %i0 return 0; return &info->indirect[ my_block ]; 200d048: b3 2e 60 02 sll %i1, 2, %i1 200d04c: 81 c7 e0 08 ret 200d050: 91 e8 40 19 restore %g1, %i1, %o0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 200d054: 90 07 20 01 add %i4, 1, %o0 200d058: 40 00 29 f9 call 201783c <.umul> 200d05c: 92 10 00 1c mov %i4, %o1 200d060: 82 02 3f ff add %o0, -1, %g1 200d064: 80 a6 40 01 cmp %i1, %g1 200d068: 18 80 00 2f bgu 200d124 200d06c: b6 10 00 08 mov %o0, %i3 my_block -= FIRST_DOUBLY_INDIRECT; 200d070: b2 26 40 1c sub %i1, %i4, %i1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200d074: 92 10 00 1c mov %i4, %o1 200d078: 40 00 2a d7 call 2017bd4 <.urem> 200d07c: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200d080: 92 10 00 1c mov %i4, %o1 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200d084: b6 10 00 08 mov %o0, %i3 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200d088: 40 00 2a 27 call 2017924 <.udiv> 200d08c: 90 10 00 19 mov %i1, %o0 p = info->doubly_indirect; if ( malloc_it ) { 200d090: 80 a6 a0 00 cmp %i2, 0 if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200d094: b8 10 00 08 mov %o0, %i4 p = info->doubly_indirect; if ( malloc_it ) { 200d098: 02 80 00 18 be 200d0f8 200d09c: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !p ) { 200d0a0: 80 a2 20 00 cmp %o0, 0 200d0a4: 32 80 00 08 bne,a 200d0c4 200d0a8: b9 2f 20 02 sll %i4, 2, %i4 p = memfile_alloc_block(); 200d0ac: 7f ff ff bf call 200cfa8 200d0b0: b0 10 20 00 clr %i0 if ( !p ) 200d0b4: 80 a2 20 00 cmp %o0, 0 200d0b8: 02 80 00 64 be 200d248 <== NEVER TAKEN 200d0bc: b9 2f 20 02 sll %i4, 2, %i4 return 0; info->doubly_indirect = p; 200d0c0: d0 27 60 5c st %o0, [ %i5 + 0x5c ] } p1 = (block_p *)p[ doubly ]; 200d0c4: ba 02 00 1c add %o0, %i4, %i5 200d0c8: d0 02 00 1c ld [ %o0 + %i4 ], %o0 if ( !p1 ) { 200d0cc: 80 a2 20 00 cmp %o0, 0 200d0d0: 12 80 00 4f bne 200d20c 200d0d4: b1 2e e0 02 sll %i3, 2, %i0 p1 = memfile_alloc_block(); 200d0d8: 7f ff ff b4 call 200cfa8 200d0dc: b0 10 20 00 clr %i0 if ( !p1 ) 200d0e0: 80 a2 20 00 cmp %o0, 0 200d0e4: 02 80 00 59 be 200d248 <== NEVER TAKEN 200d0e8: 01 00 00 00 nop return 0; p[ doubly ] = (block_p) p1; 200d0ec: d0 27 40 00 st %o0, [ %i5 ] } return (block_p *)&p1[ singly ]; 200d0f0: 10 80 00 47 b 200d20c 200d0f4: b1 2e e0 02 sll %i3, 2, %i0 } if ( !p ) 200d0f8: 80 a2 20 00 cmp %o0, 0 200d0fc: 02 80 00 53 be 200d248 <== NEVER TAKEN 200d100: b0 10 20 00 clr %i0 return 0; p = (block_p *)p[ doubly ]; 200d104: b9 2f 20 02 sll %i4, 2, %i4 200d108: c2 02 00 1c ld [ %o0 + %i4 ], %g1 if ( !p ) 200d10c: 80 a0 60 00 cmp %g1, 0 200d110: 02 80 00 4e be 200d248 <== NEVER TAKEN 200d114: 01 00 00 00 nop return 0; return (block_p *)&p[ singly ]; 200d118: b1 2e e0 02 sll %i3, 2, %i0 200d11c: 81 c7 e0 08 ret 200d120: 91 e8 40 18 restore %g1, %i0, %o0 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 200d124: 90 02 20 01 inc %o0 200d128: 40 00 29 c5 call 201783c <.umul> 200d12c: 92 10 00 1c mov %i4, %o1 200d130: 90 02 3f ff add %o0, -1, %o0 200d134: 80 a6 40 08 cmp %i1, %o0 200d138: 18 80 00 44 bgu 200d248 <== NEVER TAKEN 200d13c: b0 10 20 00 clr %i0 my_block -= FIRST_TRIPLY_INDIRECT; 200d140: b2 26 40 1b sub %i1, %i3, %i1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200d144: 92 10 00 1c mov %i4, %o1 200d148: 40 00 2a a3 call 2017bd4 <.urem> 200d14c: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200d150: 92 10 00 1c mov %i4, %o1 * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200d154: a0 10 00 08 mov %o0, %l0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200d158: 40 00 29 f3 call 2017924 <.udiv> 200d15c: 90 10 00 19 mov %i1, %o0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 200d160: 92 10 00 1c mov %i4, %o1 200d164: 40 00 29 f0 call 2017924 <.udiv> 200d168: b2 10 00 08 mov %o0, %i1 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200d16c: 92 10 00 1c mov %i4, %o1 if ( my_block <= LAST_TRIPLY_INDIRECT ) { 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; 200d170: b6 10 00 08 mov %o0, %i3 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200d174: 40 00 2a 98 call 2017bd4 <.urem> 200d178: 90 10 00 19 mov %i1, %o0 p = info->triply_indirect; if ( malloc_it ) { 200d17c: 80 a6 a0 00 cmp %i2, 0 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; 200d180: b8 10 00 08 mov %o0, %i4 p = info->triply_indirect; if ( malloc_it ) { 200d184: 02 80 00 24 be 200d214 200d188: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 if ( !p ) { 200d18c: 80 a2 20 00 cmp %o0, 0 200d190: 12 80 00 08 bne 200d1b0 200d194: b7 2e e0 02 sll %i3, 2, %i3 p = memfile_alloc_block(); 200d198: 7f ff ff 84 call 200cfa8 200d19c: 01 00 00 00 nop if ( !p ) 200d1a0: 80 a2 20 00 cmp %o0, 0 200d1a4: 02 80 00 29 be 200d248 <== NEVER TAKEN 200d1a8: 01 00 00 00 nop return 0; info->triply_indirect = p; 200d1ac: d0 27 60 60 st %o0, [ %i5 + 0x60 ] } p1 = (block_p *) p[ triply ]; 200d1b0: ba 02 00 1b add %o0, %i3, %i5 200d1b4: d0 02 00 1b ld [ %o0 + %i3 ], %o0 if ( !p1 ) { 200d1b8: 80 a2 20 00 cmp %o0, 0 200d1bc: 32 80 00 08 bne,a 200d1dc 200d1c0: b9 2f 20 02 sll %i4, 2, %i4 p1 = memfile_alloc_block(); 200d1c4: 7f ff ff 79 call 200cfa8 200d1c8: b0 10 20 00 clr %i0 if ( !p1 ) 200d1cc: 80 a2 20 00 cmp %o0, 0 200d1d0: 02 80 00 1e be 200d248 <== NEVER TAKEN 200d1d4: b9 2f 20 02 sll %i4, 2, %i4 return 0; p[ triply ] = (block_p) p1; 200d1d8: d0 27 40 00 st %o0, [ %i5 ] } p2 = (block_p *)p1[ doubly ]; 200d1dc: ba 02 00 1c add %o0, %i4, %i5 200d1e0: d0 02 00 1c ld [ %o0 + %i4 ], %o0 if ( !p2 ) { 200d1e4: 80 a2 20 00 cmp %o0, 0 200d1e8: 12 80 00 09 bne 200d20c 200d1ec: b1 2c 20 02 sll %l0, 2, %i0 p2 = memfile_alloc_block(); 200d1f0: 7f ff ff 6e call 200cfa8 200d1f4: b0 10 20 00 clr %i0 if ( !p2 ) 200d1f8: 80 a2 20 00 cmp %o0, 0 200d1fc: 02 80 00 13 be 200d248 <== NEVER TAKEN 200d200: 01 00 00 00 nop return 0; p1[ doubly ] = (block_p) p2; 200d204: d0 27 40 00 st %o0, [ %i5 ] } return (block_p *)&p2[ singly ]; 200d208: b1 2c 20 02 sll %l0, 2, %i0 200d20c: 81 c7 e0 08 ret 200d210: 91 ea 00 18 restore %o0, %i0, %o0 } if ( !p ) 200d214: 80 a2 20 00 cmp %o0, 0 200d218: 02 80 00 0c be 200d248 <== NEVER TAKEN 200d21c: b7 2e e0 02 sll %i3, 2, %i3 return 0; p1 = (block_p *) p[ triply ]; 200d220: c2 02 00 1b ld [ %o0 + %i3 ], %g1 if ( !p1 ) 200d224: 80 a0 60 00 cmp %g1, 0 200d228: 02 80 00 08 be 200d248 <== NEVER TAKEN 200d22c: b9 2f 20 02 sll %i4, 2, %i4 return 0; p2 = (block_p *)p1[ doubly ]; 200d230: c2 00 40 1c ld [ %g1 + %i4 ], %g1 if ( !p2 ) 200d234: 80 a0 60 00 cmp %g1, 0 200d238: 02 80 00 04 be 200d248 <== NEVER TAKEN 200d23c: 01 00 00 00 nop return 0; return (block_p *)&p2[ singly ]; 200d240: b1 2c 20 02 sll %l0, 2, %i0 200d244: b0 00 40 18 add %g1, %i0, %i0 /* * This means the requested block number is out of range. */ return 0; } 200d248: 81 c7 e0 08 ret 200d24c: 81 e8 00 00 restore =============================================================================== 0200d250 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200d250: 9d e3 bf 98 save %sp, -104, %sp * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { 200d254: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200d258: ba 10 00 18 mov %i0, %i5 200d25c: a0 10 00 19 mov %i1, %l0 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { 200d260: 80 a0 60 06 cmp %g1, 6 200d264: 12 80 00 1c bne 200d2d4 200d268: a2 10 00 1a mov %i2, %l1 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 200d26c: d8 1e 20 50 ldd [ %i0 + 0x50 ], %o4 200d270: 82 10 20 00 clr %g1 200d274: 86 a3 40 1a subcc %o5, %i2, %g3 200d278: 84 63 00 19 subx %o4, %i1, %g2 200d27c: 80 a0 40 02 cmp %g1, %g2 200d280: 14 80 00 07 bg 200d29c <== NEVER TAKEN 200d284: d2 06 20 58 ld [ %i0 + 0x58 ], %o1 200d288: 80 a0 40 02 cmp %g1, %g2 200d28c: 12 80 00 06 bne 200d2a4 <== NEVER TAKEN 200d290: 80 a7 00 03 cmp %i4, %g3 200d294: 28 80 00 05 bleu,a 200d2a8 <== NEVER TAKEN 200d298: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 200d29c: 10 80 00 03 b 200d2a8 200d2a0: b0 23 40 11 sub %o5, %l1, %i0 /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 200d2a4: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 200d2a8: 92 02 40 11 add %o1, %l1, %o1 200d2ac: 94 10 00 18 mov %i0, %o2 200d2b0: 40 00 08 7f call 200f4ac 200d2b4: 90 10 00 1b mov %i3, %o0 IMFS_update_atime( the_jnode ); 200d2b8: 90 07 bf f8 add %fp, -8, %o0 200d2bc: 7f ff d6 f0 call 2002e7c 200d2c0: 92 10 20 00 clr %o1 200d2c4: c2 07 bf f8 ld [ %fp + -8 ], %g1 200d2c8: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return my_length; 200d2cc: 81 c7 e0 08 ret 200d2d0: 81 e8 00 00 restore /* * 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 ) 200d2d4: c6 06 20 50 ld [ %i0 + 0x50 ], %g3 /* * 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; 200d2d8: 82 10 00 1a mov %i2, %g1 if ( last_byte > the_jnode->info.file.size ) 200d2dc: 88 10 20 00 clr %g4 200d2e0: c4 06 20 54 ld [ %i0 + 0x54 ], %g2 200d2e4: 80 a1 00 03 cmp %g4, %g3 200d2e8: 14 80 00 08 bg 200d308 <== NEVER TAKEN 200d2ec: b4 07 00 1a add %i4, %i2, %i2 200d2f0: 80 a1 00 03 cmp %g4, %g3 200d2f4: 32 80 00 07 bne,a 200d310 <== NEVER TAKEN 200d2f8: 03 00 80 71 sethi %hi(0x201c400), %g1 <== NOT EXECUTED 200d2fc: 80 a6 80 02 cmp %i2, %g2 200d300: 28 80 00 04 bleu,a 200d310 200d304: 03 00 80 71 sethi %hi(0x201c400), %g1 my_length = the_jnode->info.file.size - start; 200d308: b8 20 80 01 sub %g2, %g1, %i4 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200d30c: 03 00 80 71 sethi %hi(0x201c400), %g1 200d310: f4 00 62 a8 ld [ %g1 + 0x2a8 ], %i2 ! 201c6a8 200d314: 90 10 00 10 mov %l0, %o0 200d318: b1 3e a0 1f sra %i2, 0x1f, %i0 200d31c: 92 10 00 11 mov %l1, %o1 200d320: 94 10 00 18 mov %i0, %o2 200d324: 40 00 2b be call 201821c <__moddi3> 200d328: 96 10 00 1a mov %i2, %o3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200d32c: 90 10 00 10 mov %l0, %o0 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200d330: b2 10 00 09 mov %o1, %i1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200d334: 94 10 00 18 mov %i0, %o2 200d338: 92 10 00 11 mov %l1, %o1 200d33c: 40 00 2a d2 call 2017e84 <__divdi3> 200d340: 96 10 00 1a mov %i2, %o3 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; 200d344: a2 10 00 1b mov %i3, %l1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200d348: a0 10 00 09 mov %o1, %l0 if ( start_offset ) { 200d34c: 80 a6 60 00 cmp %i1, 0 200d350: 02 80 00 14 be 200d3a0 200d354: b0 10 20 00 clr %i0 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 ); 200d358: 90 10 00 1d mov %i5, %o0 200d35c: 7f ff ff 20 call 200cfdc 200d360: 94 10 20 00 clr %o2 if ( !block_ptr ) 200d364: 80 a2 20 00 cmp %o0, 0 200d368: 02 bf ff d9 be 200d2cc <== NEVER TAKEN 200d36c: b4 26 80 19 sub %i2, %i1, %i2 * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 200d370: 80 a7 00 1a cmp %i4, %i2 200d374: 08 80 00 03 bleu 200d380 200d378: b0 10 00 1c mov %i4, %i0 200d37c: b0 10 00 1a mov %i2, %i0 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 200d380: d2 02 00 00 ld [ %o0 ], %o1 200d384: 94 10 00 18 mov %i0, %o2 200d388: 90 10 00 1b mov %i3, %o0 200d38c: 92 02 40 19 add %o1, %i1, %o1 200d390: 40 00 08 47 call 200f4ac 200d394: a2 06 c0 18 add %i3, %i0, %l1 dest += to_copy; block++; 200d398: a0 04 20 01 inc %l0 my_length -= to_copy; 200d39c: b8 27 00 18 sub %i4, %i0, %i4 } /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 200d3a0: 35 00 80 71 sethi %hi(0x201c400), %i2 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200d3a4: 10 80 00 0f b 200d3e0 200d3a8: f6 06 a2 a8 ld [ %i2 + 0x2a8 ], %i3 ! 201c6a8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200d3ac: 92 10 00 10 mov %l0, %o1 200d3b0: 7f ff ff 0b call 200cfdc 200d3b4: 94 10 20 00 clr %o2 if ( !block_ptr ) 200d3b8: 82 92 20 00 orcc %o0, 0, %g1 200d3bc: 02 bf ff c4 be 200d2cc <== NEVER TAKEN 200d3c0: 90 10 00 11 mov %l1, %o0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 200d3c4: d2 00 40 00 ld [ %g1 ], %o1 200d3c8: 94 10 00 1b mov %i3, %o2 200d3cc: 40 00 08 38 call 200f4ac 200d3d0: a2 04 40 1b add %l1, %i3, %l1 dest += to_copy; block++; 200d3d4: a0 04 20 01 inc %l0 my_length -= to_copy; 200d3d8: b8 27 00 1b sub %i4, %i3, %i4 copied += to_copy; 200d3dc: b0 06 00 1b add %i0, %i3, %i0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200d3e0: c2 06 a2 a8 ld [ %i2 + 0x2a8 ], %g1 200d3e4: 80 a7 00 01 cmp %i4, %g1 200d3e8: 1a bf ff f1 bcc 200d3ac 200d3ec: 90 10 00 1d mov %i5, %o0 /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 200d3f0: 80 a7 20 00 cmp %i4, 0 200d3f4: 02 80 00 0e be 200d42c 200d3f8: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200d3fc: 90 10 00 1d mov %i5, %o0 200d400: 92 10 00 10 mov %l0, %o1 200d404: 7f ff fe f6 call 200cfdc 200d408: 94 10 20 00 clr %o2 if ( !block_ptr ) 200d40c: 82 92 20 00 orcc %o0, 0, %g1 200d410: 02 bf ff af be 200d2cc <== NEVER TAKEN 200d414: 90 10 00 11 mov %l1, %o0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 200d418: d2 00 40 00 ld [ %g1 ], %o1 200d41c: 94 10 00 1c mov %i4, %o2 200d420: 40 00 08 23 call 200f4ac 200d424: b0 07 00 18 add %i4, %i0, %i0 copied += my_length; } IMFS_update_atime( the_jnode ); 200d428: 90 07 bf f8 add %fp, -8, %o0 200d42c: 7f ff d6 94 call 2002e7c 200d430: 92 10 20 00 clr %o1 200d434: c2 07 bf f8 ld [ %fp + -8 ], %g1 200d438: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return copied; } 200d43c: 81 c7 e0 08 ret 200d440: 81 e8 00 00 restore =============================================================================== 0200d524 : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 200d524: 9d e3 bf a0 save %sp, -96, %sp /* * 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; 200d528: 03 00 80 71 sethi %hi(0x201c400), %g1 200d52c: fa 00 62 a8 ld [ %g1 + 0x2a8 ], %i5 ! 201c6a8 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 200d530: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 200d534: 80 a0 60 00 cmp %g1, 0 200d538: 02 80 00 05 be 200d54c 200d53c: bb 37 60 02 srl %i5, 2, %i5 memfile_free_blocks_in_table( &info->indirect, to_free ); 200d540: 90 06 20 58 add %i0, 0x58, %o0 200d544: 7f ff ff e5 call 200d4d8 200d548: 92 10 00 1d mov %i5, %o1 } if ( info->doubly_indirect ) { 200d54c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 200d550: b8 10 20 00 clr %i4 200d554: 80 a0 60 00 cmp %g1, 0 200d558: 12 80 00 0d bne 200d58c 200d55c: 37 00 80 71 sethi %hi(0x201c400), %i3 } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 200d560: 10 80 00 15 b 200d5b4 200d564: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 * a significant difference in the performance of this routine. * * Regardless until the IMFS implementation is proven, it * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( 200d568: 83 2f 20 02 sll %i4, 2, %g1 memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 200d56c: 90 00 80 01 add %g2, %g1, %o0 200d570: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200d574: 80 a0 60 00 cmp %g1, 0 200d578: 22 80 00 05 be,a 200d58c <== NEVER TAKEN 200d57c: b8 07 20 01 inc %i4 <== NOT EXECUTED memfile_free_blocks_in_table( 200d580: 7f ff ff d6 call 200d4d8 200d584: 92 10 00 1d mov %i5, %o1 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i 200d59c: c4 06 20 5c ld [ %i0 + 0x5c ], %g2 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 ); 200d5a0: 90 06 20 5c add %i0, 0x5c, %o0 200d5a4: 7f ff ff cd call 200d4d8 200d5a8: 92 10 00 1d mov %i5, %o1 } if ( info->triply_indirect ) { 200d5ac: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 200d5b0: b8 10 20 00 clr %i4 200d5b4: 80 a0 60 00 cmp %g1, 0 200d5b8: 12 80 00 1c bne 200d628 200d5bc: 33 00 80 71 sethi %hi(0x201c400), %i1 memfile_free_blocks_in_table( (block_p **)&info->triply_indirect, to_free ); } return 0; } 200d5c0: 81 c7 e0 08 ret 200d5c4: 91 e8 20 00 restore %g0, 0, %o0 * a significant difference in the performance of this routine. * * Regardless until the IMFS implementation is proven, it * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( 200d5c8: a1 2f 20 02 sll %i4, 2, %l0 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 200d5cc: f6 00 40 10 ld [ %g1 + %l0 ], %i3 if ( !p ) /* ensure we have a valid pointer */ 200d5d0: 80 a6 e0 00 cmp %i3, 0 200d5d4: 02 80 00 1b be 200d640 <== NEVER TAKEN 200d5d8: 90 06 20 60 add %i0, 0x60, %o0 200d5dc: 10 80 00 09 b 200d600 200d5e0: b4 10 20 00 clr %i2 break; for ( j=0 ; j <== NEVER TAKEN 200d5ec: 90 10 00 1b mov %i3, %o0 memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 200d5f0: 7f ff ff ba call 200d4d8 200d5f4: 92 10 00 1d mov %i5, %o1 if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j 200d610: c2 06 c0 00 ld [ %i3 ], %g1 if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 200d614: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 200d618: 92 10 00 1d mov %i5, %o1 200d61c: 90 02 00 10 add %o0, %l0, %o0 200d620: 7f ff ff ae call 200d4d8 200d624: b8 07 20 01 inc %i4 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i 200d638: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 200d63c: 90 06 20 60 add %i0, 0x60, %o0 200d640: 7f ff ff a6 call 200d4d8 200d644: 92 10 00 1d mov %i5, %o1 (block_p **)&info->triply_indirect, to_free ); } return 0; } 200d648: b0 10 20 00 clr %i0 200d64c: 81 c7 e0 08 ret 200d650: 81 e8 00 00 restore =============================================================================== 0200d7e0 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200d7e0: 9d e3 bf 98 save %sp, -104, %sp * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { 200d7e4: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200d7e8: ba 10 00 18 mov %i0, %i5 * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { 200d7ec: 80 a0 60 00 cmp %g1, 0 200d7f0: 06 80 00 09 bl 200d814 <== NEVER TAKEN 200d7f4: 94 07 00 1a add %i4, %i2, %o2 200d7f8: 80 a0 60 00 cmp %g1, 0 200d7fc: 12 80 00 12 bne 200d844 <== NEVER TAKEN 200d800: 03 00 80 71 sethi %hi(0x201c400), %g1 200d804: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 200d808: 80 a0 40 0a cmp %g1, %o2 200d80c: 1a 80 00 0e bcc 200d844 200d810: 03 00 80 71 sethi %hi(0x201c400), %g1 status = IMFS_memfile_extend( the_jnode, last_byte ); 200d814: 90 10 00 1d mov %i5, %o0 200d818: 7f ff ff 9b call 200d684 200d81c: 92 10 20 00 clr %o1 if ( status ) 200d820: 80 a2 20 00 cmp %o0, 0 200d824: 02 80 00 08 be 200d844 200d828: 03 00 80 71 sethi %hi(0x201c400), %g1 rtems_set_errno_and_return_minus_one( ENOSPC ); 200d82c: 40 00 04 c4 call 200eb3c <__errno> 200d830: b0 10 3f ff mov -1, %i0 200d834: 82 10 20 1c mov 0x1c, %g1 200d838: c2 22 00 00 st %g1, [ %o0 ] 200d83c: 81 c7 e0 08 ret 200d840: 81 e8 00 00 restore */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200d844: e0 00 62 a8 ld [ %g1 + 0x2a8 ], %l0 200d848: 92 10 00 1a mov %i2, %o1 200d84c: b1 3c 20 1f sra %l0, 0x1f, %i0 200d850: 96 10 00 10 mov %l0, %o3 200d854: 94 10 00 18 mov %i0, %o2 200d858: 40 00 2a 71 call 201821c <__moddi3> 200d85c: 90 10 00 19 mov %i1, %o0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200d860: 94 10 00 18 mov %i0, %o2 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200d864: a2 10 00 09 mov %o1, %l1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200d868: 90 10 00 19 mov %i1, %o0 200d86c: 92 10 00 1a mov %i2, %o1 200d870: 40 00 29 85 call 2017e84 <__divdi3> 200d874: 96 10 00 10 mov %l0, %o3 status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); } copied = 0; 200d878: b0 10 20 00 clr %i0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 200d87c: 80 a4 60 00 cmp %l1, 0 200d880: 02 80 00 14 be 200d8d0 200d884: b4 10 00 09 mov %o1, %i2 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 ); 200d888: 90 10 00 1d mov %i5, %o0 200d88c: 7f ff fd d4 call 200cfdc 200d890: 94 10 20 00 clr %o2 if ( !block_ptr ) 200d894: 80 a2 20 00 cmp %o0, 0 200d898: 02 80 00 36 be 200d970 <== NEVER TAKEN 200d89c: 01 00 00 00 nop * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 200d8a0: b0 24 00 11 sub %l0, %l1, %i0 200d8a4: 80 a6 00 1c cmp %i0, %i4 200d8a8: 38 80 00 02 bgu,a 200d8b0 200d8ac: b0 10 00 1c mov %i4, %i0 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 200d8b0: d0 02 00 00 ld [ %o0 ], %o0 200d8b4: 92 10 00 1b mov %i3, %o1 200d8b8: 90 02 00 11 add %o0, %l1, %o0 200d8bc: 94 10 00 18 mov %i0, %o2 200d8c0: 40 00 06 fb call 200f4ac 200d8c4: b6 06 c0 18 add %i3, %i0, %i3 src += to_copy; block++; 200d8c8: b4 06 a0 01 inc %i2 my_length -= to_copy; 200d8cc: b8 27 00 18 sub %i4, %i0, %i4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 200d8d0: 21 00 80 71 sethi %hi(0x201c400), %l0 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200d8d4: 10 80 00 0f b 200d910 200d8d8: f2 04 22 a8 ld [ %l0 + 0x2a8 ], %i1 ! 201c6a8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200d8dc: 92 10 00 1a mov %i2, %o1 200d8e0: 7f ff fd bf call 200cfdc 200d8e4: 94 10 20 00 clr %o2 if ( !block_ptr ) 200d8e8: 80 a2 20 00 cmp %o0, 0 200d8ec: 02 bf ff d4 be 200d83c <== NEVER TAKEN 200d8f0: 92 10 00 1b mov %i3, %o1 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 ); 200d8f4: d0 02 00 00 ld [ %o0 ], %o0 200d8f8: 94 10 00 19 mov %i1, %o2 200d8fc: 40 00 06 ec call 200f4ac 200d900: b6 06 c0 19 add %i3, %i1, %i3 src += to_copy; block++; 200d904: b4 06 a0 01 inc %i2 my_length -= to_copy; 200d908: b8 27 00 19 sub %i4, %i1, %i4 * IMFS_memfile_write * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( 200d90c: b0 06 00 19 add %i0, %i1, %i0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200d910: c2 04 22 a8 ld [ %l0 + 0x2a8 ], %g1 200d914: 80 a7 00 01 cmp %i4, %g1 200d918: 1a bf ff f1 bcc 200d8dc 200d91c: 90 10 00 1d mov %i5, %o0 * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 200d920: 80 a7 20 00 cmp %i4, 0 200d924: 02 80 00 0e be 200d95c 200d928: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200d92c: 90 10 00 1d mov %i5, %o0 200d930: 92 10 00 1a mov %i2, %o1 200d934: 7f ff fd aa call 200cfdc 200d938: 94 10 20 00 clr %o2 if ( !block_ptr ) 200d93c: 80 a2 20 00 cmp %o0, 0 200d940: 02 bf ff bf be 200d83c <== NEVER TAKEN 200d944: 92 10 00 1b mov %i3, %o1 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 ); 200d948: d0 02 00 00 ld [ %o0 ], %o0 200d94c: 94 10 00 1c mov %i4, %o2 200d950: 40 00 06 d7 call 200f4ac 200d954: b0 06 00 1c add %i0, %i4, %i0 my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 200d958: 90 07 bf f8 add %fp, -8, %o0 200d95c: 7f ff d5 48 call 2002e7c 200d960: 92 10 20 00 clr %o1 200d964: c2 07 bf f8 ld [ %fp + -8 ], %g1 200d968: c2 27 60 44 st %g1, [ %i5 + 0x44 ] 200d96c: c2 27 60 48 st %g1, [ %i5 + 0x48 ] return copied; } 200d970: 81 c7 e0 08 ret 200d974: 81 e8 00 00 restore =============================================================================== 02002554 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 2002554: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 2002558: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 200255c: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 2002560: 80 a0 a0 01 cmp %g2, 1 2002564: 22 80 00 08 be,a 2002584 <== ALWAYS TAKEN 2002568: f0 20 60 5c st %i0, [ %g1 + 0x5c ] rtems_set_errno_and_return_minus_one( ENOTDIR ); 200256c: 40 00 31 74 call 200eb3c <__errno> <== NOT EXECUTED 2002570: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2002574: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 2002578: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200257c: 81 c7 e0 08 ret <== NOT EXECUTED 2002580: 81 e8 00 00 restore <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 2002584: 81 c7 e0 08 ret 2002588: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02004e70 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 2004e70: 9d e3 bf a0 save %sp, -96, %sp IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 2004e74: 3b 00 80 8e sethi %hi(0x2023800), %i5 2004e78: c2 07 60 d0 ld [ %i5 + 0xd0 ], %g1 ! 20238d0 <_impure_ptr> 2004e7c: 90 06 20 0c add %i0, 0xc, %o0 2004e80: 40 00 39 24 call 2013310 2004e84: d2 00 60 08 ld [ %g1 + 8 ], %o1 switch( the_jnode->type ) { 2004e88: f4 06 20 4c ld [ %i0 + 0x4c ], %i2 2004e8c: 82 06 bf ff add %i2, -1, %g1 2004e90: 80 a0 60 06 cmp %g1, 6 2004e94: 38 80 00 2f bgu,a 2004f50 <== NEVER TAKEN 2004e98: c2 07 60 d0 ld [ %i5 + 0xd0 ], %g1 <== NOT EXECUTED 2004e9c: 83 28 60 02 sll %g1, 2, %g1 2004ea0: 05 00 80 13 sethi %hi(0x2004c00), %g2 2004ea4: 84 10 a2 54 or %g2, 0x254, %g2 ! 2004e54 2004ea8: c2 00 80 01 ld [ %g2 + %g1 ], %g1 2004eac: 81 c0 40 00 jmp %g1 2004eb0: 01 00 00 00 nop case IMFS_DIRECTORY: fprintf(stdout, "/" ); 2004eb4: c2 07 60 d0 ld [ %i5 + 0xd0 ], %g1 2004eb8: 90 10 20 2f mov 0x2f, %o0 2004ebc: 40 00 38 e0 call 201323c 2004ec0: d2 00 60 08 ld [ %g1 + 8 ], %o1 break; 2004ec4: 10 80 00 27 b 2004f60 2004ec8: 31 00 80 86 sethi %hi(0x2021800), %i0 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 2004ecc: c2 07 60 d0 ld [ %i5 + 0xd0 ], %g1 2004ed0: 13 00 80 86 sethi %hi(0x2021800), %o1 2004ed4: d0 00 60 08 ld [ %g1 + 8 ], %o0 2004ed8: 92 12 60 e0 or %o1, 0xe0, %o1 2004edc: 10 80 00 08 b 2004efc 2004ee0: d4 1e 20 50 ldd [ %i0 + 0x50 ], %o2 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 2004ee4: c2 07 60 d0 ld [ %i5 + 0xd0 ], %g1 2004ee8: d4 06 20 54 ld [ %i0 + 0x54 ], %o2 2004eec: d0 00 60 08 ld [ %g1 + 8 ], %o0 2004ef0: d6 06 20 58 ld [ %i0 + 0x58 ], %o3 2004ef4: 13 00 80 86 sethi %hi(0x2021800), %o1 2004ef8: 92 12 60 f8 or %o1, 0xf8, %o1 ! 20218f8 2004efc: 40 00 38 b4 call 20131cc 2004f00: 31 00 80 86 sethi %hi(0x2021800), %i0 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 2004f04: 30 80 00 17 b,a 2004f60 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 2004f08: c2 07 60 d0 ld [ %i5 + 0xd0 ], %g1 2004f0c: d4 06 20 54 ld [ %i0 + 0x54 ], %o2 2004f10: d0 00 60 08 ld [ %g1 + 8 ], %o0 2004f14: 13 00 80 86 sethi %hi(0x2021800), %o1 2004f18: 40 00 38 ad call 20131cc 2004f1c: 92 12 61 08 or %o1, 0x108, %o1 ! 2021908 (uint32_t)the_jnode->info.file.size ); #endif break; 2004f20: 10 80 00 10 b 2004f60 2004f24: 31 00 80 86 sethi %hi(0x2021800), %i0 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 2004f28: 31 00 80 86 sethi %hi(0x2021800), %i0 2004f2c: c2 07 60 d0 ld [ %i5 + 0xd0 ], %g1 2004f30: 10 80 00 05 b 2004f44 2004f34: b0 16 21 18 or %i0, 0x118, %i0 return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 2004f38: c2 07 60 d0 ld [ %i5 + 0xd0 ], %g1 2004f3c: 31 00 80 86 sethi %hi(0x2021800), %i0 2004f40: b0 16 21 30 or %i0, 0x130, %i0 ! 2021930 2004f44: f2 00 60 08 ld [ %g1 + 8 ], %i1 2004f48: 40 00 38 f2 call 2013310 2004f4c: 81 e8 00 00 restore return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 2004f50: 33 00 80 86 sethi %hi(0x2021800), %i1 <== NOT EXECUTED 2004f54: f0 00 60 08 ld [ %g1 + 8 ], %i0 <== NOT EXECUTED 2004f58: 40 00 38 9d call 20131cc <== NOT EXECUTED 2004f5c: 93 ee 61 48 restore %i1, 0x148, %o1 <== NOT EXECUTED return; } puts(""); 2004f60: 40 00 3f d7 call 2014ebc 2004f64: 91 ee 20 90 restore %i0, 0x90, %o0 =============================================================================== 020025d4 : 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 */ ) { 20025d4: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 20025d8: fa 06 40 00 ld [ %i1 ], %i5 strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 20025dc: 92 10 00 1b mov %i3, %o1 20025e0: 90 07 60 0c add %i5, 0xc, %o0 20025e4: 40 00 37 1f call 2010260 20025e8: 94 10 20 20 mov 0x20, %o2 if ( the_jnode->Parent != NULL ) 20025ec: c2 07 60 08 ld [ %i5 + 8 ], %g1 20025f0: 80 a0 60 00 cmp %g1, 0 20025f4: 22 80 00 05 be,a 2002608 <== NEVER TAKEN 20025f8: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 20025fc: 40 00 12 4f call 2006f38 <_Chain_Extract> 2002600: 90 10 00 1d mov %i5, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 2002604: d0 06 80 00 ld [ %i2 ], %o0 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 2002608: 92 10 00 1d mov %i5, %o1 the_jnode->Parent = new_parent; 200260c: d0 27 60 08 st %o0, [ %i5 + 8 ] 2002610: 40 00 12 3f call 2006f0c <_Chain_Append> 2002614: 90 02 20 50 add %o0, 0x50, %o0 rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 2002618: 90 07 bf f8 add %fp, -8, %o0 200261c: 40 00 02 18 call 2002e7c 2002620: 92 10 20 00 clr %o1 2002624: c2 07 bf f8 ld [ %fp + -8 ], %g1 2002628: c2 27 60 48 st %g1, [ %i5 + 0x48 ] return 0; } 200262c: 81 c7 e0 08 ret 2002630: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200a54c : static void IMFS_skip_separator ( const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { 200a54c: 9d e3 bf a0 save %sp, -96, %sp while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 200a550: 10 80 00 07 b 200a56c 200a554: c2 06 80 00 ld [ %i2 ], %g1 ++(*index); 200a558: c2 26 80 00 st %g1, [ %i2 ] --(*len); 200a55c: c2 06 40 00 ld [ %i1 ], %g1 200a560: 82 00 7f ff add %g1, -1, %g1 200a564: c2 26 40 00 st %g1, [ %i1 ] const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 200a568: c2 06 80 00 ld [ %i2 ], %g1 200a56c: 7f ff e5 db call 2003cd8 200a570: d0 4e 00 01 ldsb [ %i0 + %g1 ], %o0 200a574: 80 a2 20 00 cmp %o0, 0 200a578: 02 80 00 0b be 200a5a4 200a57c: 01 00 00 00 nop 200a580: c2 06 80 00 ld [ %i2 ], %g1 200a584: c4 4e 00 01 ldsb [ %i0 + %g1 ], %g2 200a588: 80 a0 a0 00 cmp %g2, 0 200a58c: 02 80 00 06 be 200a5a4 200a590: 01 00 00 00 nop 200a594: c4 06 40 00 ld [ %i1 ], %g2 200a598: 80 a0 a0 00 cmp %g2, 0 200a59c: 12 bf ff ef bne 200a558 <== ALWAYS TAKEN 200a5a0: 82 00 60 01 inc %g1 200a5a4: 81 c7 e0 08 ret 200a5a8: 81 e8 00 00 restore =============================================================================== 0200b1b0 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 200b1b0: 9d e3 bf a0 save %sp, -96, %sp IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 200b1b4: c2 06 00 00 ld [ %i0 ], %g1 switch ( the_jnode->type ) { 200b1b8: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 200b1bc: 84 00 bf fe add %g2, -2, %g2 200b1c0: 80 a0 a0 05 cmp %g2, 5 200b1c4: 18 80 00 12 bgu 200b20c <== NEVER TAKEN 200b1c8: 85 28 a0 02 sll %g2, 2, %g2 200b1cc: 07 00 80 2c sethi %hi(0x200b000), %g3 200b1d0: 86 10 e1 98 or %g3, 0x198, %g3 ! 200b198 200b1d4: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 200b1d8: 81 c0 80 00 jmp %g2 200b1dc: 01 00 00 00 nop case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 200b1e0: c4 00 60 54 ld [ %g1 + 0x54 ], %g2 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 200b1e4: c6 00 60 50 ld [ %g1 + 0x50 ], %g3 200b1e8: c4 26 60 1c st %g2, [ %i1 + 0x1c ] break; 200b1ec: 10 80 00 0e b 200b224 200b1f0: c6 26 60 18 st %g3, [ %i1 + 0x18 ] case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 200b1f4: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2 break; 200b1f8: 10 80 00 0b b 200b224 200b1fc: c4 3e 60 20 std %g2, [ %i1 + 0x20 ] case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 200b200: c0 26 60 20 clr [ %i1 + 0x20 ] break; 200b204: 10 80 00 08 b 200b224 200b208: c0 26 60 24 clr [ %i1 + 0x24 ] default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 200b20c: 40 00 0e 4c call 200eb3c <__errno> 200b210: b0 10 3f ff mov -1, %i0 200b214: 82 10 20 86 mov 0x86, %g1 200b218: c2 22 00 00 st %g1, [ %o0 ] 200b21c: 81 c7 e0 08 ret 200b220: 81 e8 00 00 restore /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; 200b224: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 200b228: 07 00 00 3f sethi %hi(0xfc00), %g3 buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 200b22c: c4 00 a0 34 ld [ %g2 + 0x34 ], %g2 200b230: 86 10 e3 fe or %g3, 0x3fe, %g3 200b234: c4 00 80 00 ld [ %g2 ], %g2 /* * 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 = 200b238: c4 26 60 04 st %g2, [ %i1 + 4 ] rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 200b23c: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 /* * 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 = 200b240: c6 26 40 00 st %g3, [ %i1 ] rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 200b244: c4 26 60 0c st %g2, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; 200b248: c4 10 60 34 lduh [ %g1 + 0x34 ], %g2 200b24c: c4 36 60 10 sth %g2, [ %i1 + 0x10 ] buf->st_ino = the_jnode->st_ino; 200b250: c4 00 60 38 ld [ %g1 + 0x38 ], %g2 200b254: c4 26 60 08 st %g2, [ %i1 + 8 ] buf->st_uid = the_jnode->st_uid; 200b258: c4 10 60 3c lduh [ %g1 + 0x3c ], %g2 200b25c: c4 36 60 12 sth %g2, [ %i1 + 0x12 ] buf->st_gid = the_jnode->st_gid; 200b260: c4 10 60 3e lduh [ %g1 + 0x3e ], %g2 200b264: c4 36 60 14 sth %g2, [ %i1 + 0x14 ] buf->st_atime = the_jnode->stat_atime; 200b268: c4 00 60 40 ld [ %g1 + 0x40 ], %g2 200b26c: c4 26 60 28 st %g2, [ %i1 + 0x28 ] buf->st_mtime = the_jnode->stat_mtime; 200b270: c4 00 60 44 ld [ %g1 + 0x44 ], %g2 buf->st_ctime = the_jnode->stat_ctime; 200b274: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 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; 200b278: c4 26 60 30 st %g2, [ %i1 + 0x30 ] buf->st_ctime = the_jnode->stat_ctime; 200b27c: c2 26 60 38 st %g1, [ %i1 + 0x38 ] buf->st_blksize = imfs_rq_memfile_bytes_per_block; 200b280: 03 00 80 6f sethi %hi(0x201bc00), %g1 200b284: c2 00 62 b4 ld [ %g1 + 0x2b4 ], %g1 ! 201beb4 200b288: c2 26 60 40 st %g1, [ %i1 + 0x40 ] return 0; } 200b28c: 81 c7 e0 08 ret 200b290: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 020026cc : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 20026cc: 9d e3 bf 80 save %sp, -128, %sp IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 20026d0: f8 06 40 00 ld [ %i1 ], %i4 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 20026d4: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 20026d8: 80 a0 60 03 cmp %g1, 3 20026dc: 12 80 00 29 bne 2002780 20026e0: ba 10 00 18 mov %i0, %i5 if ( !node->info.hard_link.link_node ) 20026e4: f6 07 20 50 ld [ %i4 + 0x50 ], %i3 20026e8: 80 a6 e0 00 cmp %i3, 0 20026ec: 12 80 00 08 bne 200270c <== ALWAYS TAKEN 20026f0: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); 20026f4: 40 00 31 12 call 200eb3c <__errno> <== NOT EXECUTED 20026f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20026fc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2002700: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2002704: 81 c7 e0 08 ret <== NOT EXECUTED 2002708: 81 e8 00 00 restore <== NOT EXECUTED the_link = *loc; 200270c: 94 10 20 14 mov 0x14, %o2 2002710: 40 00 33 67 call 200f4ac 2002714: 90 07 bf e4 add %fp, -28, %o0 the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 2002718: 90 07 bf e4 add %fp, -28, %o0 200271c: 40 00 1f a4 call 200a5ac 2002720: f6 27 bf e4 st %i3, [ %fp + -28 ] /* * 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) 2002724: c2 07 20 50 ld [ %i4 + 0x50 ], %g1 2002728: c4 10 60 34 lduh [ %g1 + 0x34 ], %g2 200272c: 80 a0 a0 01 cmp %g2, 1 2002730: 12 80 00 0d bne 2002764 2002734: 84 00 bf ff add %g2, -1, %g2 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 2002738: c2 07 bf ec ld [ %fp + -20 ], %g1 200273c: 90 10 00 18 mov %i0, %o0 2002740: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 2002744: 92 07 bf e4 add %fp, -28, %o1 2002748: 9f c0 40 00 call %g1 200274c: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 2002750: 80 a2 20 00 cmp %o0, 0 2002754: 22 80 00 0c be,a 2002784 2002758: c2 06 60 08 ld [ %i1 + 8 ], %g1 200275c: 81 c7 e0 08 ret 2002760: 81 e8 00 00 restore return -1; } else { node->info.hard_link.link_node->st_nlink --; IMFS_update_ctime( node->info.hard_link.link_node ); 2002764: 90 07 bf f8 add %fp, -8, %o0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 2002768: c4 30 60 34 sth %g2, [ %g1 + 0x34 ] IMFS_update_ctime( node->info.hard_link.link_node ); 200276c: 40 00 01 c4 call 2002e7c 2002770: 92 10 20 00 clr %o1 2002774: c2 07 20 50 ld [ %i4 + 0x50 ], %g1 2002778: c4 07 bf f8 ld [ %fp + -8 ], %g2 200277c: c4 20 60 48 st %g2, [ %g1 + 0x48 ] /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 2002780: c2 06 60 08 ld [ %i1 + 8 ], %g1 2002784: 90 10 00 1d mov %i5, %o0 2002788: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 200278c: 9f c0 40 00 call %g1 2002790: 92 10 00 19 mov %i1, %o1 return result; } 2002794: 81 c7 e0 08 ret 2002798: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200279c : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 200279c: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 20027a0: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 20027a4: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 20027a8: 80 a0 a0 01 cmp %g2, 1 20027ac: 22 80 00 06 be,a 20027c4 <== ALWAYS TAKEN 20027b0: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 rtems_set_errno_and_return_minus_one( ENOTDIR ); 20027b4: 40 00 30 e2 call 200eb3c <__errno> <== NOT EXECUTED 20027b8: 01 00 00 00 nop <== NOT EXECUTED 20027bc: 10 80 00 08 b 20027dc <== NOT EXECUTED 20027c0: 82 10 20 14 mov 0x14, %g1 ! 14 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 20027c4: 80 a0 a0 00 cmp %g2, 0 20027c8: 32 80 00 08 bne,a 20027e8 <== ALWAYS TAKEN 20027cc: c0 20 60 5c clr [ %g1 + 0x5c ] rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 20027d0: 40 00 30 db call 200eb3c <__errno> <== NOT EXECUTED 20027d4: 01 00 00 00 nop <== NOT EXECUTED 20027d8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 20027dc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20027e0: 81 c7 e0 08 ret <== NOT EXECUTED 20027e4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 20027e8: 81 c7 e0 08 ret 20027ec: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 020027c4 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 20027c4: 9d e3 bf 98 save %sp, -104, %sp /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 20027c8: 80 a6 3f ff cmp %i0, -1 20027cc: 32 80 00 0a bne,a 20027f4 20027d0: e0 06 21 40 ld [ %i0 + 0x140 ], %l0 if (!Stack_check_Interrupt_stack.area) 20027d4: 33 00 80 62 sethi %hi(0x2018800), %i1 20027d8: b2 16 62 d4 or %i1, 0x2d4, %i1 ! 2018ad4 20027dc: c2 06 60 04 ld [ %i1 + 4 ], %g1 return; stack = &Stack_check_Interrupt_stack; the_thread = 0; current = 0; 20027e0: a0 10 20 00 clr %l0 /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { if (!Stack_check_Interrupt_stack.area) 20027e4: 80 a0 60 00 cmp %g1, 0 20027e8: 12 80 00 04 bne 20027f8 <== ALWAYS TAKEN 20027ec: b0 10 20 00 clr %i0 20027f0: 30 80 00 4f b,a 200292c <== NOT EXECUTED the_thread = 0; current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; 20027f4: b2 06 20 b8 add %i0, 0xb8, %i1 current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 20027f8: c4 06 60 04 ld [ %i1 + 4 ], %g2 size = Stack_check_usable_stack_size(stack); 20027fc: f4 06 40 00 ld [ %i1 ], %i2 /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 2002800: 82 00 a0 20 add %g2, 0x20, %g1 stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 2002804: b4 06 bf f0 add %i2, -16, %i2 * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) 2002808: 07 29 69 69 sethi %hi(0xa5a5a400), %g3 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 200280c: 88 0e bf fc and %i2, -4, %g4 if (*base != U32_PATTERN) 2002810: 86 10 e1 a5 or %g3, 0x1a5, %g3 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 2002814: 10 80 00 06 b 200282c 2002818: 88 00 40 04 add %g1, %g4, %g4 if (*base != U32_PATTERN) 200281c: 80 a7 40 03 cmp %i5, %g3 2002820: 12 80 00 08 bne 2002840 2002824: 80 a0 60 00 cmp %g1, 0 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 2002828: 82 00 60 04 add %g1, 4, %g1 200282c: 80 a0 40 04 cmp %g1, %g4 2002830: 2a bf ff fb bcs,a 200281c <== ALWAYS TAKEN 2002834: fa 00 40 00 ld [ %g1 ], %i5 high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; 2002838: 10 80 00 07 b 2002854 <== NOT EXECUTED 200283c: ba 10 20 00 clr %i5 <== 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 ) 2002840: 02 80 00 05 be 2002854 <== NEVER TAKEN 2002844: ba 10 20 00 clr %i5 { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 2002848: ba 00 a0 10 add %g2, 0x10, %i5 size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); 200284c: ba 07 40 1a add %i5, %i2, %i5 2002850: ba 27 40 01 sub %i5, %g1, %i5 else used = 0; #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 2002854: 80 a6 20 00 cmp %i0, 0 2002858: 02 80 00 12 be 20028a0 200285c: 03 00 80 62 sethi %hi(0x2018800), %g1 #endif { (*print_handler)( 2002860: f6 06 20 08 ld [ %i0 + 8 ], %i3 2002864: f8 00 60 30 ld [ %g1 + 0x30 ], %i4 2002868: 03 00 80 62 sethi %hi(0x2018800), %g1 200286c: e2 00 60 34 ld [ %g1 + 0x34 ], %l1 ! 2018834 2002870: 94 07 bf f8 add %fp, -8, %o2 2002874: 90 10 00 1b mov %i3, %o0 2002878: 40 00 17 bd call 200876c 200287c: 92 10 20 05 mov 5, %o1 2002880: 13 00 80 5c sethi %hi(0x2017000), %o1 2002884: 96 10 00 08 mov %o0, %o3 2002888: 92 12 61 68 or %o1, 0x168, %o1 200288c: 90 10 00 11 mov %l1, %o0 2002890: 9f c7 00 00 call %i4 2002894: 94 10 00 1b mov %i3, %o2 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 2002898: 10 80 00 0a b 20028c0 200289c: d4 06 60 04 ld [ %i1 + 4 ], %o2 rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 20028a0: 05 00 80 62 sethi %hi(0x2018800), %g2 20028a4: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 20028a8: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 20028ac: 13 00 80 5c sethi %hi(0x2017000), %o1 20028b0: 94 10 3f ff mov -1, %o2 20028b4: 9f c0 40 00 call %g1 20028b8: 92 12 61 78 or %o1, 0x178, %o1 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 20028bc: d4 06 60 04 ld [ %i1 + 4 ], %o2 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 20028c0: 37 00 80 62 sethi %hi(0x2018800), %i3 20028c4: 39 00 80 62 sethi %hi(0x2018800), %i4 print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 20028c8: d6 06 40 00 ld [ %i1 ], %o3 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 20028cc: c2 06 e0 30 ld [ %i3 + 0x30 ], %g1 20028d0: d0 07 20 34 ld [ %i4 + 0x34 ], %o0 print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 20028d4: 96 02 ff ff add %o3, -1, %o3 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 20028d8: 13 00 80 5c sethi %hi(0x2017000), %o1 20028dc: 96 02 80 0b add %o2, %o3, %o3 20028e0: 92 12 61 88 or %o1, 0x188, %o1 20028e4: 98 10 00 10 mov %l0, %o4 20028e8: 9f c0 40 00 call %g1 20028ec: 9a 10 00 1a mov %i2, %o5 stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 20028f0: 03 00 80 62 sethi %hi(0x2018800), %g1 20028f4: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 ! 201882c (*print_handler)( print_context, "Unavailable\n" ); 20028f8: d0 07 20 34 ld [ %i4 + 0x34 ], %o0 stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 20028fc: 80 a0 60 00 cmp %g1, 0 2002900: 12 80 00 07 bne 200291c <== ALWAYS TAKEN 2002904: c2 06 e0 30 ld [ %i3 + 0x30 ], %g1 (*print_handler)( print_context, "Unavailable\n" ); 2002908: 13 00 80 5c sethi %hi(0x2017000), %o1 <== NOT EXECUTED 200290c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002910: 92 12 61 a8 or %o1, 0x1a8, %o1 ! 20171a8 <== NOT EXECUTED 2002914: 81 c7 e0 08 ret <== NOT EXECUTED 2002918: 81 e8 00 00 restore <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 200291c: 13 00 80 5c sethi %hi(0x2017000), %o1 2002920: 94 10 00 1d mov %i5, %o2 2002924: 9f c0 40 00 call %g1 2002928: 92 12 61 b8 or %o1, 0x1b8, %o1 200292c: 81 c7 e0 08 ret 2002930: 81 e8 00 00 restore =============================================================================== 02002934 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 2002934: 9d e3 bf a0 save %sp, -96, %sp static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if ( Stack_check_Initialized ) 2002938: 03 00 80 62 sethi %hi(0x2018800), %g1 200293c: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 ! 201882c 2002940: 80 a0 60 00 cmp %g1, 0 2002944: 12 80 00 21 bne 20029c8 2002948: 05 00 80 62 sethi %hi(0x2018800), %g2 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 200294c: 07 3f bb 7c sethi %hi(0xfeedf000), %g3 2002950: 82 10 a2 c4 or %g2, 0x2c4, %g1 2002954: 86 10 e0 0d or %g3, 0xd, %g3 2002958: c6 20 a2 c4 st %g3, [ %g2 + 0x2c4 ] 200295c: 05 02 eb 43 sethi %hi(0xbad0c00), %g2 2002960: 84 10 a1 06 or %g2, 0x106, %g2 ! bad0d06 2002964: c4 20 60 04 st %g2, [ %g1 + 4 ] 2002968: 05 37 ab 7c sethi %hi(0xdeadf000), %g2 200296c: 84 10 a0 0d or %g2, 0xd, %g2 ! deadf00d 2002970: c4 20 60 08 st %g2, [ %g1 + 8 ] 2002974: 05 18 03 43 sethi %hi(0x600d0c00), %g2 2002978: 84 10 a1 06 or %g2, 0x106, %g2 ! 600d0d06 200297c: c4 20 60 0c st %g2, [ %g1 + 0xc ] /* * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { 2002980: 03 00 80 64 sethi %hi(0x2019000), %g1 2002984: d0 00 62 48 ld [ %g1 + 0x248 ], %o0 ! 2019248 <_Per_CPU_Information> 2002988: 80 a2 20 00 cmp %o0, 0 200298c: 02 80 00 0c be 20029bc <== NEVER TAKEN 2002990: 84 10 62 48 or %g1, 0x248, %g2 2002994: d4 00 a0 04 ld [ %g2 + 4 ], %o2 2002998: 80 a2 a0 00 cmp %o2, 0 200299c: 02 80 00 08 be 20029bc <== NEVER TAKEN 20029a0: 03 00 80 62 sethi %hi(0x2018800), %g1 Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 20029a4: 84 10 62 d4 or %g1, 0x2d4, %g2 ! 2018ad4 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 20029a8: 94 22 80 08 sub %o2, %o0, %o2 * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 20029ac: d0 20 a0 04 st %o0, [ %g2 + 4 ] Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 20029b0: d4 20 62 d4 st %o2, [ %g1 + 0x2d4 ] (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 20029b4: 40 00 3c 46 call 2011acc 20029b8: 92 10 20 a5 mov 0xa5, %o1 } #endif Stack_check_Initialized = 1; 20029bc: 84 10 20 01 mov 1, %g2 20029c0: 03 00 80 62 sethi %hi(0x2018800), %g1 20029c4: c4 20 60 2c st %g2, [ %g1 + 0x2c ] ! 201882c 20029c8: 81 c7 e0 08 ret 20029cc: 81 e8 00 00 restore =============================================================================== 02002a30 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 2002a30: 9d e3 bf 80 save %sp, -128, %sp Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); char name[32]; printk("BLOWN STACK!!!\n"); 2002a34: 11 00 80 5c sethi %hi(0x2017000), %o0 ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); 2002a38: fa 06 20 bc ld [ %i0 + 0xbc ], %i5 char name[32]; printk("BLOWN STACK!!!\n"); 2002a3c: 40 00 07 1a call 20046a4 2002a40: 90 12 21 c0 or %o0, 0x1c0, %o0 printk("task control block: 0x%08" PRIxPTR "\n", running); 2002a44: 92 10 00 18 mov %i0, %o1 2002a48: 11 00 80 5c sethi %hi(0x2017000), %o0 2002a4c: 40 00 07 16 call 20046a4 2002a50: 90 12 21 d0 or %o0, 0x1d0, %o0 ! 20171d0 printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 2002a54: d2 06 20 08 ld [ %i0 + 8 ], %o1 2002a58: 11 00 80 5c sethi %hi(0x2017000), %o0 2002a5c: 40 00 07 12 call 20046a4 2002a60: 90 12 21 f0 or %o0, 0x1f0, %o0 ! 20171f0 printk( 2002a64: d2 06 20 0c ld [ %i0 + 0xc ], %o1 2002a68: 11 00 80 5c sethi %hi(0x2017000), %o0 2002a6c: 40 00 07 0e call 20046a4 2002a70: 90 12 22 08 or %o0, 0x208, %o0 ! 2017208 "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 2002a74: d0 06 20 08 ld [ %i0 + 8 ], %o0 2002a78: 94 07 bf e0 add %fp, -32, %o2 2002a7c: 40 00 17 3c call 200876c 2002a80: 92 10 20 20 mov 0x20, %o1 2002a84: 92 10 00 08 mov %o0, %o1 2002a88: 11 00 80 5c sethi %hi(0x2017000), %o0 2002a8c: 40 00 07 06 call 20046a4 2002a90: 90 12 22 20 or %o0, 0x220, %o0 ! 2017220 ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) 2002a94: d4 06 20 bc ld [ %i0 + 0xbc ], %o2 2002a98: d2 06 20 b8 ld [ %i0 + 0xb8 ], %o1 ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 2002a9c: 11 00 80 5c sethi %hi(0x2017000), %o0 2002aa0: 96 02 80 09 add %o2, %o1, %o3 2002aa4: 40 00 07 00 call 20046a4 2002aa8: 90 12 22 38 or %o0, 0x238, %o0 "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) { 2002aac: 80 a6 60 00 cmp %i1, 0 2002ab0: 12 80 00 07 bne 2002acc <== NEVER TAKEN 2002ab4: 11 00 80 5c sethi %hi(0x2017000), %o0 printk( 2002ab8: 92 10 20 10 mov 0x10, %o1 2002abc: 90 12 22 70 or %o0, 0x270, %o0 2002ac0: 94 07 60 08 add %i5, 8, %o2 2002ac4: 40 00 06 f8 call 20046a4 2002ac8: 96 07 60 18 add %i5, 0x18, %o3 rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 2002acc: 40 00 19 3c call 2008fbc 2002ad0: 90 10 20 81 mov 0x81, %o0 =============================================================================== 02009188 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 2009188: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 200918c: 03 00 80 68 sethi %hi(0x201a000), %g1 * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 2009190: 7f ff e9 48 call 20036b0 2009194: fa 00 62 64 ld [ %g1 + 0x264 ], %i5 ! 201a264 <_Per_CPU_Information+0xc> 2009198: 84 10 00 08 mov %o0, %g2 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 200919c: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 20091a0: 80 a0 60 00 cmp %g1, 0 20091a4: 12 80 00 08 bne 20091c4 <_CORE_RWLock_Release+0x3c> 20091a8: 80 a0 60 01 cmp %g1, 1 _ISR_Enable( level ); 20091ac: 7f ff e9 45 call 20036c0 20091b0: b0 10 20 00 clr %i0 executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 20091b4: 82 10 20 02 mov 2, %g1 20091b8: c2 27 60 34 st %g1, [ %i5 + 0x34 ] 20091bc: 81 c7 e0 08 ret 20091c0: 81 e8 00 00 restore return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 20091c4: 32 80 00 0b bne,a 20091f0 <_CORE_RWLock_Release+0x68> 20091c8: c0 27 60 34 clr [ %i5 + 0x34 ] the_rwlock->number_of_readers -= 1; 20091cc: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 20091d0: 82 00 7f ff add %g1, -1, %g1 if ( the_rwlock->number_of_readers != 0 ) { 20091d4: 80 a0 60 00 cmp %g1, 0 20091d8: 02 80 00 05 be 20091ec <_CORE_RWLock_Release+0x64> 20091dc: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* must be unlocked again */ _ISR_Enable( level ); 20091e0: 7f ff e9 38 call 20036c0 20091e4: b0 10 20 00 clr %i0 return CORE_RWLOCK_SUCCESSFUL; 20091e8: 30 80 00 24 b,a 2009278 <_CORE_RWLock_Release+0xf0> } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 20091ec: c0 27 60 34 clr [ %i5 + 0x34 ] /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 20091f0: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 20091f4: 7f ff e9 33 call 20036c0 20091f8: 90 10 00 02 mov %g2, %o0 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 20091fc: 40 00 07 85 call 200b010 <_Thread_queue_Dequeue> 2009200: 90 10 00 18 mov %i0, %o0 if ( next ) { 2009204: 80 a2 20 00 cmp %o0, 0 2009208: 22 80 00 1c be,a 2009278 <_CORE_RWLock_Release+0xf0> 200920c: b0 10 20 00 clr %i0 if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 2009210: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 2009214: 80 a0 60 01 cmp %g1, 1 2009218: 32 80 00 05 bne,a 200922c <_CORE_RWLock_Release+0xa4> 200921c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 2009220: 82 10 20 02 mov 2, %g1 return CORE_RWLOCK_SUCCESSFUL; 2009224: 10 80 00 14 b 2009274 <_CORE_RWLock_Release+0xec> 2009228: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 200922c: 82 00 60 01 inc %g1 2009230: c2 26 20 48 st %g1, [ %i0 + 0x48 ] the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 2009234: 82 10 20 01 mov 1, %g1 2009238: c2 26 20 44 st %g1, [ %i0 + 0x44 ] /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 200923c: 40 00 08 b1 call 200b500 <_Thread_queue_First> 2009240: 90 10 00 18 mov %i0, %o0 if ( !next || 2009244: 92 92 20 00 orcc %o0, 0, %o1 2009248: 22 80 00 0c be,a 2009278 <_CORE_RWLock_Release+0xf0> 200924c: b0 10 20 00 clr %i0 2009250: c2 02 60 30 ld [ %o1 + 0x30 ], %g1 2009254: 80 a0 60 01 cmp %g1, 1 2009258: 02 80 00 07 be 2009274 <_CORE_RWLock_Release+0xec> <== NEVER TAKEN 200925c: 90 10 00 18 mov %i0, %o0 next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 2009260: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2009264: 82 00 60 01 inc %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 2009268: 40 00 08 57 call 200b3c4 <_Thread_queue_Extract> 200926c: c2 26 20 48 st %g1, [ %i0 + 0x48 ] } 2009270: 30 bf ff f3 b,a 200923c <_CORE_RWLock_Release+0xb4> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 2009274: b0 10 20 00 clr %i0 2009278: 81 c7 e0 08 ret 200927c: 81 e8 00 00 restore =============================================================================== 02009280 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 2009280: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 2009284: 90 10 00 18 mov %i0, %o0 2009288: 40 00 06 92 call 200acd0 <_Thread_Get> 200928c: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2009290: c2 07 bf fc ld [ %fp + -4 ], %g1 2009294: 80 a0 60 00 cmp %g1, 0 2009298: 12 80 00 09 bne 20092bc <_CORE_RWLock_Timeout+0x3c> <== NEVER TAKEN 200929c: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 20092a0: 40 00 08 d6 call 200b5f8 <_Thread_queue_Process_timeout> 20092a4: 01 00 00 00 nop * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 20092a8: 03 00 80 67 sethi %hi(0x2019c00), %g1 20092ac: c4 00 61 20 ld [ %g1 + 0x120 ], %g2 ! 2019d20 <_Thread_Dispatch_disable_level> 20092b0: 84 00 bf ff add %g2, -1, %g2 20092b4: c4 20 61 20 st %g2, [ %g1 + 0x120 ] return _Thread_Dispatch_disable_level; 20092b8: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 20092bc: 81 c7 e0 08 ret 20092c0: 81 e8 00 00 restore =============================================================================== 0200fc64 <_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 ) { 200fc64: 9d e3 bf a0 save %sp, -96, %sp size_t message_buffering_required = 0; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 200fc68: f4 26 20 44 st %i2, [ %i0 + 0x44 ] the_message_queue->number_of_pending_messages = 0; 200fc6c: c0 26 20 48 clr [ %i0 + 0x48 ] the_message_queue->maximum_message_size = maximum_message_size; 200fc70: f6 26 20 4c st %i3, [ %i0 + 0x4c ] CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 200fc74: c0 26 20 60 clr [ %i0 + 0x60 ] the_message_queue->notify_argument = the_argument; 200fc78: c0 26 20 64 clr [ %i0 + 0x64 ] /* * 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)) { 200fc7c: 80 8e e0 03 btst 3, %i3 200fc80: 02 80 00 07 be 200fc9c <_CORE_message_queue_Initialize+0x38> 200fc84: ba 10 00 1b mov %i3, %i5 allocated_message_size += sizeof(uint32_t); 200fc88: ba 06 e0 04 add %i3, 4, %i5 allocated_message_size &= ~(sizeof(uint32_t) - 1); 200fc8c: ba 0f 7f fc and %i5, -4, %i5 } if (allocated_message_size < maximum_message_size) 200fc90: 80 a7 40 1b cmp %i5, %i3 200fc94: 0a 80 00 24 bcs 200fd24 <_CORE_message_queue_Initialize+0xc0><== NEVER TAKEN 200fc98: b8 10 20 00 clr %i4 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ if ( !size_t_mult32_with_overflow( 200fc9c: ba 07 60 14 add %i5, 0x14, %i5 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; 200fca0: 90 10 20 00 clr %o0 200fca4: 92 10 00 1a mov %i2, %o1 200fca8: 94 10 20 00 clr %o2 200fcac: 96 10 00 1d mov %i5, %o3 200fcb0: 40 00 42 cc call 20207e0 <__muldi3> 200fcb4: b8 10 20 00 clr %i4 if ( x > SIZE_MAX ) 200fcb8: 80 a2 20 00 cmp %o0, 0 200fcbc: 34 80 00 1b bg,a 200fd28 <_CORE_message_queue_Initialize+0xc4> 200fcc0: b0 0f 20 01 and %i4, 1, %i0 /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); 200fcc4: 40 00 0c 60 call 2012e44 <_Workspace_Allocate> 200fcc8: 90 10 00 09 mov %o1, %o0 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 200fccc: d0 26 20 5c st %o0, [ %i0 + 0x5c ] _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 200fcd0: 80 a2 20 00 cmp %o0, 0 200fcd4: 02 80 00 14 be 200fd24 <_CORE_message_queue_Initialize+0xc0> 200fcd8: 92 10 00 08 mov %o0, %o1 /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 200fcdc: 90 06 20 68 add %i0, 0x68, %o0 200fce0: 94 10 00 1a mov %i2, %o2 200fce4: 40 00 16 39 call 20155c8 <_Chain_Initialize> 200fce8: 96 10 00 1d mov %i5, %o3 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 200fcec: 82 06 20 50 add %i0, 0x50, %g1 head->next = tail; head->previous = NULL; tail->previous = head; 200fcf0: c2 26 20 58 st %g1, [ %i0 + 0x58 ] allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 200fcf4: c2 06 40 00 ld [ %i1 ], %g1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 200fcf8: 84 06 20 54 add %i0, 0x54, %g2 200fcfc: 82 18 60 01 xor %g1, 1, %g1 200fd00: 80 a0 00 01 cmp %g0, %g1 head->next = tail; 200fd04: c4 26 20 50 st %g2, [ %i0 + 0x50 ] head->previous = NULL; 200fd08: c0 26 20 54 clr [ %i0 + 0x54 ] 200fd0c: 90 10 00 18 mov %i0, %o0 200fd10: 92 60 3f ff subx %g0, -1, %o1 200fd14: 94 10 20 80 mov 0x80, %o2 200fd18: 96 10 20 06 mov 6, %o3 200fd1c: 40 00 09 f0 call 20124dc <_Thread_queue_Initialize> 200fd20: b8 10 20 01 mov 1, %i4 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 200fd24: b0 0f 20 01 and %i4, 1, %i0 200fd28: 81 c7 e0 08 ret 200fd2c: 81 e8 00 00 restore =============================================================================== 02007318 <_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 ) { 2007318: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 200731c: 90 10 00 18 mov %i0, %o0 2007320: 40 00 07 62 call 20090a8 <_Thread_queue_Dequeue> 2007324: ba 10 00 18 mov %i0, %i5 2007328: 80 a2 20 00 cmp %o0, 0 200732c: 12 80 00 0e bne 2007364 <_CORE_semaphore_Surrender+0x4c> 2007330: b0 10 20 00 clr %i0 if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 2007334: 7f ff eb 92 call 200217c 2007338: 01 00 00 00 nop if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 200733c: c2 07 60 48 ld [ %i5 + 0x48 ], %g1 2007340: c4 07 60 40 ld [ %i5 + 0x40 ], %g2 2007344: 80 a0 40 02 cmp %g1, %g2 2007348: 1a 80 00 05 bcc 200735c <_CORE_semaphore_Surrender+0x44> <== NEVER TAKEN 200734c: b0 10 20 04 mov 4, %i0 the_semaphore->count += 1; 2007350: 82 00 60 01 inc %g1 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 2007354: b0 10 20 00 clr %i0 #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 2007358: c2 27 60 48 st %g1, [ %i5 + 0x48 ] else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 200735c: 7f ff eb 8c call 200218c 2007360: 01 00 00 00 nop } return status; } 2007364: 81 c7 e0 08 ret 2007368: 81 e8 00 00 restore =============================================================================== 02006028 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 2006028: 9d e3 bf a0 save %sp, -96, %sp 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 ]; 200602c: f8 06 21 58 ld [ %i0 + 0x158 ], %i4 option_set = (rtems_option) the_thread->Wait.option; 2006030: f6 06 20 30 ld [ %i0 + 0x30 ], %i3 _ISR_Disable( level ); 2006034: 7f ff f0 52 call 200217c 2006038: ba 10 00 18 mov %i0, %i5 200603c: b0 10 00 08 mov %o0, %i0 pending_events = api->pending_events; 2006040: c4 07 00 00 ld [ %i4 ], %g2 event_condition = (rtems_event_set) the_thread->Wait.count; 2006044: c6 07 60 24 ld [ %i5 + 0x24 ], %g3 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 2006048: 82 88 c0 02 andcc %g3, %g2, %g1 200604c: 02 80 00 43 be 2006158 <_Event_Surrender+0x130> 2006050: 01 00 00 00 nop /* * 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() && 2006054: 09 00 80 74 sethi %hi(0x201d000), %g4 2006058: 88 11 20 38 or %g4, 0x38, %g4 ! 201d038 <_Per_CPU_Information> 200605c: f2 01 20 08 ld [ %g4 + 8 ], %i1 2006060: 80 a6 60 00 cmp %i1, 0 2006064: 22 80 00 1d be,a 20060d8 <_Event_Surrender+0xb0> 2006068: c8 07 60 10 ld [ %i5 + 0x10 ], %g4 200606c: c8 01 20 0c ld [ %g4 + 0xc ], %g4 2006070: 80 a7 40 04 cmp %i5, %g4 2006074: 32 80 00 19 bne,a 20060d8 <_Event_Surrender+0xb0> 2006078: c8 07 60 10 ld [ %i5 + 0x10 ], %g4 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 200607c: 09 00 80 75 sethi %hi(0x201d400), %g4 2006080: f2 01 20 30 ld [ %g4 + 0x30 ], %i1 ! 201d430 <_Event_Sync_state> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && 2006084: 80 a6 60 02 cmp %i1, 2 2006088: 02 80 00 07 be 20060a4 <_Event_Surrender+0x7c> <== NEVER TAKEN 200608c: 80 a0 40 03 cmp %g1, %g3 ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 2006090: c8 01 20 30 ld [ %g4 + 0x30 ], %g4 * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 2006094: 80 a1 20 01 cmp %g4, 1 2006098: 32 80 00 10 bne,a 20060d8 <_Event_Surrender+0xb0> 200609c: c8 07 60 10 ld [ %i5 + 0x10 ], %g4 (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 20060a0: 80 a0 40 03 cmp %g1, %g3 20060a4: 02 80 00 04 be 20060b4 <_Event_Surrender+0x8c> 20060a8: 80 8e e0 02 btst 2, %i3 20060ac: 02 80 00 2b be 2006158 <_Event_Surrender+0x130> <== NEVER TAKEN 20060b0: 01 00 00 00 nop RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); 20060b4: 84 28 80 01 andn %g2, %g1, %g2 api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 20060b8: c4 27 00 00 st %g2, [ %i4 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 20060bc: c4 07 60 28 ld [ %i5 + 0x28 ], %g2 _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; 20060c0: c0 27 60 24 clr [ %i5 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 20060c4: c2 20 80 00 st %g1, [ %g2 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 20060c8: 84 10 20 03 mov 3, %g2 20060cc: 03 00 80 75 sethi %hi(0x201d400), %g1 20060d0: c4 20 60 30 st %g2, [ %g1 + 0x30 ] ! 201d430 <_Event_Sync_state> 20060d4: 30 80 00 21 b,a 2006158 <_Event_Surrender+0x130> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 20060d8: 80 89 21 00 btst 0x100, %g4 20060dc: 02 80 00 1f be 2006158 <_Event_Surrender+0x130> 20060e0: 80 a0 40 03 cmp %g1, %g3 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 20060e4: 02 80 00 04 be 20060f4 <_Event_Surrender+0xcc> 20060e8: 80 8e e0 02 btst 2, %i3 20060ec: 02 80 00 1b be 2006158 <_Event_Surrender+0x130> <== NEVER TAKEN 20060f0: 01 00 00 00 nop 20060f4: 84 28 80 01 andn %g2, %g1, %g2 api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 20060f8: c4 27 00 00 st %g2, [ %i4 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 20060fc: c4 07 60 28 ld [ %i5 + 0x28 ], %g2 * 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 ); the_thread->Wait.count = 0; 2006100: c0 27 60 24 clr [ %i5 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2006104: c2 20 80 00 st %g1, [ %g2 ] _ISR_Flash( level ); 2006108: 7f ff f0 21 call 200218c 200610c: 90 10 00 18 mov %i0, %o0 2006110: 7f ff f0 1b call 200217c 2006114: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 2006118: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 200611c: 80 a0 60 02 cmp %g1, 2 2006120: 02 80 00 06 be 2006138 <_Event_Surrender+0x110> 2006124: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 2006128: 7f ff f0 19 call 200218c 200612c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2006130: 10 80 00 08 b 2006150 <_Event_Surrender+0x128> 2006134: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 2006138: c2 27 60 50 st %g1, [ %i5 + 0x50 ] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 200613c: 7f ff f0 14 call 200218c 2006140: 33 04 00 ff sethi %hi(0x1003fc00), %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 2006144: 40 00 0e cc call 2009c74 <_Watchdog_Remove> 2006148: 90 07 60 48 add %i5, 0x48, %o0 200614c: b2 16 63 f8 or %i1, 0x3f8, %i1 2006150: 40 00 0a 18 call 20089b0 <_Thread_Clear_state> 2006154: 91 e8 00 1d restore %g0, %i5, %o0 _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 2006158: 7f ff f0 0d call 200218c 200615c: 81 e8 00 00 restore =============================================================================== 02006160 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 2006160: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 2006164: 90 10 00 18 mov %i0, %o0 2006168: 40 00 0b 00 call 2008d68 <_Thread_Get> 200616c: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2006170: c2 07 bf fc ld [ %fp + -4 ], %g1 2006174: 80 a0 60 00 cmp %g1, 0 2006178: 12 80 00 1d bne 20061ec <_Event_Timeout+0x8c> <== NEVER TAKEN 200617c: ba 10 00 08 mov %o0, %i5 * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 2006180: 7f ff ef ff call 200217c 2006184: 01 00 00 00 nop RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 2006188: 03 00 80 74 sethi %hi(0x201d000), %g1 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 200618c: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 ! 201d044 <_Per_CPU_Information+0xc> 2006190: 80 a7 40 01 cmp %i5, %g1 2006194: 12 80 00 09 bne 20061b8 <_Event_Timeout+0x58> 2006198: c0 27 60 24 clr [ %i5 + 0x24 ] if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 200619c: 03 00 80 75 sethi %hi(0x201d400), %g1 20061a0: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 ! 201d430 <_Event_Sync_state> 20061a4: 80 a0 a0 01 cmp %g2, 1 20061a8: 32 80 00 05 bne,a 20061bc <_Event_Timeout+0x5c> 20061ac: 82 10 20 06 mov 6, %g1 _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 20061b0: 84 10 20 02 mov 2, %g2 20061b4: c4 20 60 30 st %g2, [ %g1 + 0x30 ] } the_thread->Wait.return_code = RTEMS_TIMEOUT; 20061b8: 82 10 20 06 mov 6, %g1 20061bc: c2 27 60 34 st %g1, [ %i5 + 0x34 ] _ISR_Enable( level ); 20061c0: 7f ff ef f3 call 200218c 20061c4: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 20061c8: 90 10 00 1d mov %i5, %o0 20061cc: 13 04 00 ff sethi %hi(0x1003fc00), %o1 20061d0: 40 00 09 f8 call 20089b0 <_Thread_Clear_state> 20061d4: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 20061d8: 03 00 80 72 sethi %hi(0x201c800), %g1 20061dc: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 201cb00 <_Thread_Dispatch_disable_level> 20061e0: 84 00 bf ff add %g2, -1, %g2 20061e4: c4 20 63 00 st %g2, [ %g1 + 0x300 ] return _Thread_Dispatch_disable_level; 20061e8: c2 00 63 00 ld [ %g1 + 0x300 ], %g1 20061ec: 81 c7 e0 08 ret 20061f0: 81 e8 00 00 restore =============================================================================== 0200c5a8 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 200c5a8: 9d e3 bf 98 save %sp, -104, %sp Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; 200c5ac: c0 27 bf f8 clr [ %fp + -8 ] Heap_Block *extend_last_block = NULL; 200c5b0: c0 27 bf fc clr [ %fp + -4 ] uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; 200c5b4: ba 06 40 1a add %i1, %i2, %i5 uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 200c5b8: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; 200c5bc: e2 06 20 10 ld [ %i0 + 0x10 ], %l1 uintptr_t const min_block_size = heap->min_block_size; 200c5c0: d6 06 20 14 ld [ %i0 + 0x14 ], %o3 uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; uintptr_t const free_size = stats->free_size; 200c5c4: e4 06 20 30 ld [ %i0 + 0x30 ], %l2 uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { 200c5c8: 80 a7 40 19 cmp %i5, %i1 200c5cc: 0a 80 00 9f bcs 200c848 <_Heap_Extend+0x2a0> 200c5d0: b8 10 20 00 clr %i4 return false; } extend_area_ok = _Heap_Get_first_and_last_block( 200c5d4: 90 10 00 19 mov %i1, %o0 200c5d8: 92 10 00 1a mov %i2, %o1 200c5dc: 94 10 00 11 mov %l1, %o2 200c5e0: 98 07 bf f8 add %fp, -8, %o4 200c5e4: 7f ff eb 20 call 2007264 <_Heap_Get_first_and_last_block> 200c5e8: 9a 07 bf fc add %fp, -4, %o5 page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 200c5ec: 80 8a 20 ff btst 0xff, %o0 200c5f0: 02 80 00 96 be 200c848 <_Heap_Extend+0x2a0> 200c5f4: b4 10 00 10 mov %l0, %i2 200c5f8: aa 10 20 00 clr %l5 200c5fc: ac 10 20 00 clr %l6 200c600: b8 10 20 00 clr %i4 200c604: a8 10 20 00 clr %l4 200c608: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 (uintptr_t) start_block : heap->area_begin; uintptr_t const sub_area_end = start_block->prev_size; Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 200c60c: 80 a0 40 1d cmp %g1, %i5 200c610: 1a 80 00 05 bcc 200c624 <_Heap_Extend+0x7c> 200c614: e6 06 80 00 ld [ %i2 ], %l3 200c618: 80 a6 40 13 cmp %i1, %l3 200c61c: 2a 80 00 8b bcs,a 200c848 <_Heap_Extend+0x2a0> 200c620: b8 10 20 00 clr %i4 sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 200c624: 80 a7 40 01 cmp %i5, %g1 200c628: 02 80 00 06 be 200c640 <_Heap_Extend+0x98> 200c62c: 80 a7 40 13 cmp %i5, %l3 merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 200c630: 2a 80 00 05 bcs,a 200c644 <_Heap_Extend+0x9c> 200c634: ac 10 00 1a mov %i2, %l6 200c638: 10 80 00 04 b 200c648 <_Heap_Extend+0xa0> 200c63c: 90 10 00 13 mov %l3, %o0 200c640: a8 10 00 1a mov %i2, %l4 200c644: 90 10 00 13 mov %l3, %o0 200c648: 40 00 17 58 call 20123a8 <.urem> 200c64c: 92 10 00 11 mov %l1, %o1 200c650: ae 04 ff f8 add %l3, -8, %l7 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 200c654: 80 a4 c0 19 cmp %l3, %i1 200c658: 12 80 00 05 bne 200c66c <_Heap_Extend+0xc4> 200c65c: 90 25 c0 08 sub %l7, %o0, %o0 start_block->prev_size = extend_area_end; 200c660: fa 26 80 00 st %i5, [ %i2 ] 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 ) 200c664: 10 80 00 04 b 200c674 <_Heap_Extend+0xcc> 200c668: b8 10 00 08 mov %o0, %i4 merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 200c66c: 2a 80 00 02 bcs,a 200c674 <_Heap_Extend+0xcc> 200c670: aa 10 00 08 mov %o0, %l5 - 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; 200c674: f4 02 20 04 ld [ %o0 + 4 ], %i2 200c678: b4 0e bf fe and %i2, -2, %i2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200c67c: b4 06 80 08 add %i2, %o0, %i2 link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 200c680: 80 a6 80 10 cmp %i2, %l0 200c684: 12 bf ff e2 bne 200c60c <_Heap_Extend+0x64> 200c688: 82 10 00 1a mov %i2, %g1 if ( extend_area_begin < heap->area_begin ) { 200c68c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200c690: 80 a6 40 01 cmp %i1, %g1 200c694: 3a 80 00 04 bcc,a 200c6a4 <_Heap_Extend+0xfc> 200c698: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 heap->area_begin = extend_area_begin; 200c69c: 10 80 00 05 b 200c6b0 <_Heap_Extend+0x108> 200c6a0: f2 26 20 18 st %i1, [ %i0 + 0x18 ] } else if ( heap->area_end < extend_area_end ) { 200c6a4: 80 a0 40 1d cmp %g1, %i5 200c6a8: 2a 80 00 02 bcs,a 200c6b0 <_Heap_Extend+0x108> 200c6ac: fa 26 20 1c st %i5, [ %i0 + 0x1c ] heap->area_end = extend_area_end; } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 200c6b0: c4 07 bf f8 ld [ %fp + -8 ], %g2 200c6b4: c2 07 bf fc ld [ %fp + -4 ], %g1 extend_first_block->prev_size = extend_area_end; 200c6b8: fa 20 80 00 st %i5, [ %g2 ] heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 200c6bc: 86 20 40 02 sub %g1, %g2, %g3 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 200c6c0: 88 10 e0 01 or %g3, 1, %g4 _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 200c6c4: c6 20 40 00 st %g3, [ %g1 ] extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = 200c6c8: c8 20 a0 04 st %g4, [ %g2 + 4 ] extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 200c6cc: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 200c6d0: 80 a0 c0 02 cmp %g3, %g2 200c6d4: 08 80 00 04 bleu 200c6e4 <_Heap_Extend+0x13c> 200c6d8: c0 20 60 04 clr [ %g1 + 4 ] heap->first_block = extend_first_block; 200c6dc: 10 80 00 06 b 200c6f4 <_Heap_Extend+0x14c> 200c6e0: c4 26 20 20 st %g2, [ %i0 + 0x20 ] } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 200c6e4: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 200c6e8: 80 a0 80 01 cmp %g2, %g1 200c6ec: 2a 80 00 02 bcs,a 200c6f4 <_Heap_Extend+0x14c> 200c6f0: c2 26 20 24 st %g1, [ %i0 + 0x24 ] heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 200c6f4: 80 a5 20 00 cmp %l4, 0 200c6f8: 02 80 00 14 be 200c748 <_Heap_Extend+0x1a0> 200c6fc: b2 06 60 08 add %i1, 8, %i1 Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 200c700: f4 06 20 10 ld [ %i0 + 0x10 ], %i2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 200c704: 92 10 00 1a mov %i2, %o1 200c708: 40 00 17 28 call 20123a8 <.urem> 200c70c: 90 10 00 19 mov %i1, %o0 if ( remainder != 0 ) { 200c710: 80 a2 20 00 cmp %o0, 0 200c714: 02 80 00 04 be 200c724 <_Heap_Extend+0x17c> 200c718: c2 05 00 00 ld [ %l4 ], %g1 return value - remainder + alignment; 200c71c: b2 06 40 1a add %i1, %i2, %i1 200c720: b2 26 40 08 sub %i1, %o0, %i1 uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = 200c724: 92 06 7f f8 add %i1, -8, %o1 uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; 200c728: c2 26 7f f8 st %g1, [ %i1 + -8 ] uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = 200c72c: 82 25 00 09 sub %l4, %o1, %g1 first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 200c730: 82 10 60 01 or %g1, 1, %g1 _Heap_Free_block( heap, new_first_block ); 200c734: 90 10 00 18 mov %i0, %o0 200c738: 7f ff ff 92 call 200c580 <_Heap_Free_block> 200c73c: c2 22 60 04 st %g1, [ %o1 + 4 ] link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 200c740: 10 80 00 08 b 200c760 <_Heap_Extend+0x1b8> 200c744: 80 a7 20 00 cmp %i4, 0 heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { 200c748: 80 a5 a0 00 cmp %l6, 0 200c74c: 02 80 00 04 be 200c75c <_Heap_Extend+0x1b4> 200c750: ac 25 80 01 sub %l6, %g1, %l6 { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = (link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED; 200c754: ac 15 a0 01 or %l6, 1, %l6 ) { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = 200c758: ec 20 60 04 st %l6, [ %g1 + 4 ] link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 200c75c: 80 a7 20 00 cmp %i4, 0 200c760: 02 80 00 15 be 200c7b4 <_Heap_Extend+0x20c> 200c764: ba 07 7f f8 add %i5, -8, %i5 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200c768: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 uintptr_t extend_area_end ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( 200c76c: ba 27 40 1c sub %i5, %i4, %i5 200c770: 40 00 17 0e call 20123a8 <.urem> 200c774: 90 10 00 1d mov %i5, %o0 ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) 200c778: c4 07 20 04 ld [ %i4 + 4 ], %g2 200c77c: ba 27 40 08 sub %i5, %o0, %i5 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = 200c780: 82 07 40 1c add %i5, %i4, %g1 (last_block->size_and_flag - last_block_new_size) 200c784: 84 20 80 1d sub %g2, %i5, %g2 | HEAP_PREV_BLOCK_USED; 200c788: 84 10 a0 01 or %g2, 1, %g2 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = 200c78c: c4 20 60 04 st %g2, [ %g1 + 4 ] RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 200c790: c2 07 20 04 ld [ %i4 + 4 ], %g1 (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 200c794: 90 10 00 18 mov %i0, %o0 200c798: 82 08 60 01 and %g1, 1, %g1 200c79c: 92 10 00 1c mov %i4, %o1 block->size_and_flag = size | flag; 200c7a0: ba 17 40 01 or %i5, %g1, %i5 200c7a4: 7f ff ff 77 call 200c580 <_Heap_Free_block> 200c7a8: fa 27 20 04 st %i5, [ %i4 + 4 ] extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 200c7ac: 10 80 00 0f b 200c7e8 <_Heap_Extend+0x240> 200c7b0: 80 a7 20 00 cmp %i4, 0 ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 200c7b4: 80 a5 60 00 cmp %l5, 0 200c7b8: 02 80 00 0b be 200c7e4 <_Heap_Extend+0x23c> 200c7bc: c4 07 bf f8 ld [ %fp + -8 ], %g2 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 200c7c0: c6 05 60 04 ld [ %l5 + 4 ], %g3 _Heap_Link_above( 200c7c4: c2 07 bf fc ld [ %fp + -4 ], %g1 200c7c8: 86 08 e0 01 and %g3, 1, %g3 ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); 200c7cc: 84 20 80 15 sub %g2, %l5, %g2 block->size_and_flag = size | flag; 200c7d0: 84 10 c0 02 or %g3, %g2, %g2 200c7d4: c4 25 60 04 st %g2, [ %l5 + 4 ] last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 200c7d8: c4 00 60 04 ld [ %g1 + 4 ], %g2 200c7dc: 84 10 a0 01 or %g2, 1, %g2 200c7e0: c4 20 60 04 st %g2, [ %g1 + 4 ] extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 200c7e4: 80 a7 20 00 cmp %i4, 0 200c7e8: 32 80 00 09 bne,a 200c80c <_Heap_Extend+0x264> 200c7ec: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200c7f0: 80 a5 20 00 cmp %l4, 0 200c7f4: 32 80 00 06 bne,a 200c80c <_Heap_Extend+0x264> 200c7f8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 _Heap_Free_block( heap, extend_first_block ); 200c7fc: d2 07 bf f8 ld [ %fp + -8 ], %o1 200c800: 7f ff ff 60 call 200c580 <_Heap_Free_block> 200c804: 90 10 00 18 mov %i0, %o0 */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( heap->last_block, (uintptr_t) heap->first_block - (uintptr_t) heap->last_block 200c808: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 200c80c: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 200c810: c6 00 60 04 ld [ %g1 + 4 ], %g3 * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 200c814: 84 20 80 01 sub %g2, %g1, %g2 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 200c818: 86 08 e0 01 and %g3, 1, %g3 block->size_and_flag = size | flag; 200c81c: 84 10 c0 02 or %g3, %g2, %g2 200c820: c4 20 60 04 st %g2, [ %g1 + 4 ] } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 200c824: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 200c828: b8 10 20 01 mov 1, %i4 _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 200c82c: a4 20 40 12 sub %g1, %l2, %l2 /* Statistics */ stats->size += extended_size; 200c830: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 if ( extended_size_ptr != NULL ) 200c834: 80 a6 e0 00 cmp %i3, 0 _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; 200c838: 82 00 40 12 add %g1, %l2, %g1 if ( extended_size_ptr != NULL ) 200c83c: 02 80 00 03 be 200c848 <_Heap_Extend+0x2a0> <== NEVER TAKEN 200c840: c2 26 20 2c st %g1, [ %i0 + 0x2c ] 200c844: e4 26 c0 00 st %l2, [ %i3 ] *extended_size_ptr = extended_size; return true; } 200c848: b0 0f 20 01 and %i4, 1, %i0 200c84c: 81 c7 e0 08 ret 200c850: 81 e8 00 00 restore =============================================================================== 0200c9b8 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 200c9b8: 9d e3 bf a0 save %sp, -96, %sp * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { return true; 200c9bc: 88 10 20 01 mov 1, %g4 /* * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { 200c9c0: 80 a6 60 00 cmp %i1, 0 200c9c4: 02 80 00 77 be 200cba0 <_Heap_Free+0x1e8> 200c9c8: 90 10 00 19 mov %i1, %o0 200c9cc: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200c9d0: 40 00 2c 81 call 2017bd4 <.urem> 200c9d4: ba 06 7f f8 add %i1, -8, %i5 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 200c9d8: da 06 20 20 ld [ %i0 + 0x20 ], %o5 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 200c9dc: ba 27 40 08 sub %i5, %o0, %i5 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; 200c9e0: 80 a7 40 0d cmp %i5, %o5 200c9e4: 0a 80 00 05 bcs 200c9f8 <_Heap_Free+0x40> 200c9e8: 82 10 20 00 clr %g1 200c9ec: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200c9f0: 80 a0 40 1d cmp %g1, %i5 200c9f4: 82 60 3f ff subx %g0, -1, %g1 } alloc_begin = (uintptr_t) alloc_begin_ptr; block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { 200c9f8: 80 a0 60 00 cmp %g1, 0 200c9fc: 02 80 00 69 be 200cba0 <_Heap_Free+0x1e8> 200ca00: 88 10 20 00 clr %g4 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 200ca04: d6 07 60 04 ld [ %i5 + 4 ], %o3 - 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; 200ca08: 84 0a ff fe and %o3, -2, %g2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200ca0c: 82 00 80 1d add %g2, %i5, %g1 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; 200ca10: 80 a0 40 0d cmp %g1, %o5 200ca14: 0a 80 00 05 bcs 200ca28 <_Heap_Free+0x70> <== NEVER TAKEN 200ca18: 86 10 20 00 clr %g3 200ca1c: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 200ca20: 80 a0 c0 01 cmp %g3, %g1 200ca24: 86 60 3f ff subx %g0, -1, %g3 _Heap_Protection_block_check( heap, block ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 200ca28: 80 a0 e0 00 cmp %g3, 0 200ca2c: 02 80 00 5d be 200cba0 <_Heap_Free+0x1e8> <== NEVER TAKEN 200ca30: 88 10 20 00 clr %g4 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 200ca34: de 00 60 04 ld [ %g1 + 4 ], %o7 return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 200ca38: 80 8b e0 01 btst 1, %o7 200ca3c: 02 80 00 59 be 200cba0 <_Heap_Free+0x1e8> 200ca40: 9e 0b ff fe and %o7, -2, %o7 if ( !_Heap_Protection_determine_block_free( heap, block ) ) { return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 200ca44: c8 06 20 24 ld [ %i0 + 0x24 ], %g4 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 200ca48: 80 a0 40 04 cmp %g1, %g4 200ca4c: 02 80 00 07 be 200ca68 <_Heap_Free+0xb0> 200ca50: 98 10 20 00 clr %o4 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 200ca54: 86 00 40 0f add %g1, %o7, %g3 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; 200ca58: c6 00 e0 04 ld [ %g3 + 4 ], %g3 200ca5c: 86 08 e0 01 and %g3, 1, %g3 return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 200ca60: 80 a0 00 03 cmp %g0, %g3 200ca64: 98 60 3f ff subx %g0, -1, %o4 if ( !_Heap_Is_prev_used( block ) ) { 200ca68: 80 8a e0 01 btst 1, %o3 200ca6c: 12 80 00 25 bne 200cb00 <_Heap_Free+0x148> 200ca70: 80 8b 20 ff btst 0xff, %o4 uintptr_t const prev_size = block->prev_size; 200ca74: d6 07 40 00 ld [ %i5 ], %o3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200ca78: 86 27 40 0b sub %i5, %o3, %g3 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; 200ca7c: 80 a0 c0 0d cmp %g3, %o5 200ca80: 0a 80 00 04 bcs 200ca90 <_Heap_Free+0xd8> <== NEVER TAKEN 200ca84: 94 10 20 00 clr %o2 200ca88: 80 a1 00 03 cmp %g4, %g3 200ca8c: 94 60 3f ff subx %g0, -1, %o2 Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 200ca90: 80 a2 a0 00 cmp %o2, 0 200ca94: 02 80 00 43 be 200cba0 <_Heap_Free+0x1e8> <== NEVER TAKEN 200ca98: 88 10 20 00 clr %g4 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; 200ca9c: da 00 e0 04 ld [ %g3 + 4 ], %o5 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) ) { 200caa0: 80 8b 60 01 btst 1, %o5 200caa4: 02 80 00 3f be 200cba0 <_Heap_Free+0x1e8> <== NEVER TAKEN 200caa8: 80 8b 20 ff btst 0xff, %o4 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 200caac: 02 80 00 0e be 200cae4 <_Heap_Free+0x12c> 200cab0: 88 00 80 0b add %g2, %o3, %g4 uintptr_t const size = block_size + prev_size + next_block_size; 200cab4: 9e 01 00 0f add %g4, %o7, %o7 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 200cab8: c8 00 60 08 ld [ %g1 + 8 ], %g4 Heap_Block *prev = block->prev; 200cabc: c2 00 60 0c ld [ %g1 + 0xc ], %g1 prev->next = next; 200cac0: c8 20 60 08 st %g4, [ %g1 + 8 ] next->prev = prev; 200cac4: c2 21 20 0c st %g1, [ %g4 + 0xc ] _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 200cac8: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 200cacc: 82 00 7f ff add %g1, -1, %g1 200cad0: c2 26 20 38 st %g1, [ %i0 + 0x38 ] 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; 200cad4: de 23 c0 03 st %o7, [ %o7 + %g3 ] 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; 200cad8: 82 13 e0 01 or %o7, 1, %g1 200cadc: 10 80 00 27 b 200cb78 <_Heap_Free+0x1c0> 200cae0: c2 20 e0 04 st %g1, [ %g3 + 4 ] 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; 200cae4: 9e 11 20 01 or %g4, 1, %o7 200cae8: de 20 e0 04 st %o7, [ %g3 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200caec: c6 00 60 04 ld [ %g1 + 4 ], %g3 next_block->prev_size = size; 200caf0: c8 20 80 1d st %g4, [ %g2 + %i5 ] _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; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200caf4: 86 08 ff fe and %g3, -2, %g3 200caf8: 10 80 00 20 b 200cb78 <_Heap_Free+0x1c0> 200cafc: c6 20 60 04 st %g3, [ %g1 + 4 ] next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 200cb00: 22 80 00 0d be,a 200cb34 <_Heap_Free+0x17c> 200cb04: c6 06 20 08 ld [ %i0 + 8 ], %g3 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 200cb08: c8 00 60 08 ld [ %g1 + 8 ], %g4 Heap_Block *prev = old_block->prev; 200cb0c: c2 00 60 0c ld [ %g1 + 0xc ], %g1 new_block->next = next; 200cb10: c8 27 60 08 st %g4, [ %i5 + 8 ] new_block->prev = prev; 200cb14: c2 27 60 0c st %g1, [ %i5 + 0xc ] uintptr_t const size = block_size + next_block_size; 200cb18: 86 03 c0 02 add %o7, %g2, %g3 next->prev = new_block; prev->next = new_block; 200cb1c: fa 20 60 08 st %i5, [ %g1 + 8 ] Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; 200cb20: fa 21 20 0c st %i5, [ %g4 + 0xc ] _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 200cb24: 82 10 e0 01 or %g3, 1, %g1 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 200cb28: c6 20 c0 1d st %g3, [ %g3 + %i5 ] 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; 200cb2c: 10 80 00 13 b 200cb78 <_Heap_Free+0x1c0> 200cb30: c2 27 60 04 st %g1, [ %i5 + 4 ] ) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; 200cb34: f0 27 60 0c st %i0, [ %i5 + 0xc ] Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 200cb38: c6 27 60 08 st %g3, [ %i5 + 8 ] new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 200cb3c: fa 20 e0 0c st %i5, [ %g3 + 0xc ] 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; 200cb40: 86 10 a0 01 or %g2, 1, %g3 200cb44: c6 27 60 04 st %g3, [ %i5 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200cb48: c6 00 60 04 ld [ %g1 + 4 ], %g3 next_block->prev_size = block_size; 200cb4c: c4 20 80 1d st %g2, [ %g2 + %i5 ] } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200cb50: 86 08 ff fe and %g3, -2, %g3 200cb54: c6 20 60 04 st %g3, [ %g1 + 4 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 200cb58: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 if ( stats->max_free_blocks < stats->free_blocks ) { 200cb5c: c6 06 20 3c ld [ %i0 + 0x3c ], %g3 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; 200cb60: 82 00 60 01 inc %g1 { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 200cb64: fa 26 20 08 st %i5, [ %i0 + 8 ] if ( stats->max_free_blocks < stats->free_blocks ) { 200cb68: 80 a0 c0 01 cmp %g3, %g1 200cb6c: 1a 80 00 03 bcc 200cb78 <_Heap_Free+0x1c0> 200cb70: c2 26 20 38 st %g1, [ %i0 + 0x38 ] stats->max_free_blocks = stats->free_blocks; 200cb74: c2 26 20 3c st %g1, [ %i0 + 0x3c ] } } /* Statistics */ --stats->used_blocks; 200cb78: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 ++stats->frees; stats->free_size += block_size; return( true ); 200cb7c: 88 10 20 01 mov 1, %g4 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200cb80: 82 00 7f ff add %g1, -1, %g1 200cb84: c2 26 20 40 st %g1, [ %i0 + 0x40 ] ++stats->frees; 200cb88: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200cb8c: 82 00 60 01 inc %g1 200cb90: c2 26 20 50 st %g1, [ %i0 + 0x50 ] stats->free_size += block_size; 200cb94: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 200cb98: 84 00 40 02 add %g1, %g2, %g2 200cb9c: c4 26 20 30 st %g2, [ %i0 + 0x30 ] return( true ); } 200cba0: b0 09 20 01 and %g4, 1, %i0 200cba4: 81 c7 e0 08 ret 200cba8: 81 e8 00 00 restore =============================================================================== 02019bfc <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 2019bfc: 9d e3 bf a0 save %sp, -96, %sp RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 2019c00: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 2019c04: 7f ff f7 f4 call 2017bd4 <.urem> 2019c08: 90 10 00 19 mov %i1, %o0 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 2019c0c: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 2019c10: ba 06 7f f8 add %i1, -8, %i5 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 2019c14: 90 27 40 08 sub %i5, %o0, %o0 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; 2019c18: 80 a2 00 03 cmp %o0, %g3 2019c1c: 0a 80 00 05 bcs 2019c30 <_Heap_Size_of_alloc_area+0x34> 2019c20: 84 10 20 00 clr %g2 2019c24: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2019c28: 80 a0 40 08 cmp %g1, %o0 2019c2c: 84 60 3f ff subx %g0, -1, %g2 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 ) ) { 2019c30: 80 a0 a0 00 cmp %g2, 0 2019c34: 02 80 00 15 be 2019c88 <_Heap_Size_of_alloc_area+0x8c> 2019c38: 82 10 20 00 clr %g1 - 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; 2019c3c: fa 02 20 04 ld [ %o0 + 4 ], %i5 2019c40: ba 0f 7f fe and %i5, -2, %i5 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 2019c44: ba 07 40 08 add %i5, %o0, %i5 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; 2019c48: 80 a7 40 03 cmp %i5, %g3 2019c4c: 0a 80 00 05 bcs 2019c60 <_Heap_Size_of_alloc_area+0x64> <== NEVER TAKEN 2019c50: 84 10 20 00 clr %g2 2019c54: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2019c58: 80 a0 40 1d cmp %g1, %i5 2019c5c: 84 60 3f ff subx %g0, -1, %g2 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 2019c60: 80 a0 a0 00 cmp %g2, 0 2019c64: 02 80 00 09 be 2019c88 <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN 2019c68: 82 10 20 00 clr %g1 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; 2019c6c: c4 07 60 04 ld [ %i5 + 4 ], %g2 !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 2019c70: 80 88 a0 01 btst 1, %g2 2019c74: 02 80 00 05 be 2019c88 <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN 2019c78: ba 27 40 19 sub %i5, %i1, %i5 return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; 2019c7c: 82 10 20 01 mov 1, %g1 || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 2019c80: ba 07 60 04 add %i5, 4, %i5 2019c84: fa 26 80 00 st %i5, [ %i2 ] return true; } 2019c88: b0 08 60 01 and %g1, 1, %i0 2019c8c: 81 c7 e0 08 ret 2019c90: 81 e8 00 00 restore =============================================================================== 02008160 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 2008160: 9d e3 bf 80 save %sp, -128, %sp uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 2008164: 3b 00 80 20 sethi %hi(0x2008000), %i5 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 2008168: f8 06 20 10 ld [ %i0 + 0x10 ], %i4 uintptr_t const min_block_size = heap->min_block_size; 200816c: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 Heap_Block *const first_block = heap->first_block; 2008170: f6 06 20 20 ld [ %i0 + 0x20 ], %i3 Heap_Block *const last_block = heap->last_block; 2008174: e2 06 20 24 ld [ %i0 + 0x24 ], %l1 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 2008178: 80 a6 a0 00 cmp %i2, 0 200817c: 02 80 00 04 be 200818c <_Heap_Walk+0x2c> 2008180: ba 17 61 0c or %i5, 0x10c, %i5 2008184: 3b 00 80 20 sethi %hi(0x2008000), %i5 2008188: ba 17 61 14 or %i5, 0x114, %i5 ! 2008114 <_Heap_Walk_print> if ( !_System_state_Is_up( _System_state_Get() ) ) { 200818c: 03 00 80 61 sethi %hi(0x2018400), %g1 2008190: c4 00 60 e4 ld [ %g1 + 0xe4 ], %g2 ! 20184e4 <_System_state_Current> 2008194: 80 a0 a0 03 cmp %g2, 3 2008198: 12 80 01 24 bne 2008628 <_Heap_Walk+0x4c8> 200819c: 82 10 20 01 mov 1, %g1 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)( 20081a0: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 20081a4: da 06 20 18 ld [ %i0 + 0x18 ], %o5 20081a8: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 20081ac: f6 23 a0 60 st %i3, [ %sp + 0x60 ] 20081b0: e2 23 a0 64 st %l1, [ %sp + 0x64 ] 20081b4: c2 06 20 08 ld [ %i0 + 8 ], %g1 20081b8: 90 10 00 19 mov %i1, %o0 20081bc: c2 23 a0 68 st %g1, [ %sp + 0x68 ] 20081c0: c2 06 20 0c ld [ %i0 + 0xc ], %g1 20081c4: 92 10 20 00 clr %o1 20081c8: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 20081cc: 15 00 80 56 sethi %hi(0x2015800), %o2 20081d0: 96 10 00 1c mov %i4, %o3 20081d4: 94 12 a0 50 or %o2, 0x50, %o2 20081d8: 9f c7 40 00 call %i5 20081dc: 98 10 00 10 mov %l0, %o4 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 20081e0: 80 a7 20 00 cmp %i4, 0 20081e4: 12 80 00 07 bne 2008200 <_Heap_Walk+0xa0> 20081e8: 80 8f 20 07 btst 7, %i4 (*printer)( source, true, "page size is zero\n" ); 20081ec: 15 00 80 56 sethi %hi(0x2015800), %o2 20081f0: 90 10 00 19 mov %i1, %o0 20081f4: 92 10 20 01 mov 1, %o1 20081f8: 10 80 00 32 b 20082c0 <_Heap_Walk+0x160> 20081fc: 94 12 a0 e8 or %o2, 0xe8, %o2 return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 2008200: 22 80 00 08 be,a 2008220 <_Heap_Walk+0xc0> 2008204: 90 10 00 10 mov %l0, %o0 (*printer)( 2008208: 15 00 80 56 sethi %hi(0x2015800), %o2 200820c: 90 10 00 19 mov %i1, %o0 2008210: 92 10 20 01 mov 1, %o1 2008214: 94 12 a1 00 or %o2, 0x100, %o2 2008218: 10 80 01 0b b 2008644 <_Heap_Walk+0x4e4> 200821c: 96 10 00 1c mov %i4, %o3 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 2008220: 7f ff e6 30 call 2001ae0 <.urem> 2008224: 92 10 00 1c mov %i4, %o1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 2008228: 80 a2 20 00 cmp %o0, 0 200822c: 22 80 00 08 be,a 200824c <_Heap_Walk+0xec> 2008230: 90 06 e0 08 add %i3, 8, %o0 (*printer)( 2008234: 15 00 80 56 sethi %hi(0x2015800), %o2 2008238: 90 10 00 19 mov %i1, %o0 200823c: 92 10 20 01 mov 1, %o1 2008240: 94 12 a1 20 or %o2, 0x120, %o2 2008244: 10 80 01 00 b 2008644 <_Heap_Walk+0x4e4> 2008248: 96 10 00 10 mov %l0, %o3 200824c: 7f ff e6 25 call 2001ae0 <.urem> 2008250: 92 10 00 1c mov %i4, %o1 ); return false; } if ( 2008254: 80 a2 20 00 cmp %o0, 0 2008258: 22 80 00 08 be,a 2008278 <_Heap_Walk+0x118> 200825c: c2 06 e0 04 ld [ %i3 + 4 ], %g1 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 2008260: 15 00 80 56 sethi %hi(0x2015800), %o2 2008264: 90 10 00 19 mov %i1, %o0 2008268: 92 10 20 01 mov 1, %o1 200826c: 94 12 a1 48 or %o2, 0x148, %o2 2008270: 10 80 00 f5 b 2008644 <_Heap_Walk+0x4e4> 2008274: 96 10 00 1b mov %i3, %o3 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 2008278: 80 88 60 01 btst 1, %g1 200827c: 32 80 00 07 bne,a 2008298 <_Heap_Walk+0x138> 2008280: f4 04 60 04 ld [ %l1 + 4 ], %i2 (*printer)( 2008284: 15 00 80 56 sethi %hi(0x2015800), %o2 2008288: 90 10 00 19 mov %i1, %o0 200828c: 92 10 20 01 mov 1, %o1 2008290: 10 80 00 0c b 20082c0 <_Heap_Walk+0x160> 2008294: 94 12 a1 80 or %o2, 0x180, %o2 - 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; 2008298: b4 0e bf fe and %i2, -2, %i2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200829c: b4 04 40 1a add %l1, %i2, %i2 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; 20082a0: c2 06 a0 04 ld [ %i2 + 4 ], %g1 ); return false; } if ( _Heap_Is_free( last_block ) ) { 20082a4: 80 88 60 01 btst 1, %g1 20082a8: 12 80 00 0a bne 20082d0 <_Heap_Walk+0x170> 20082ac: 80 a6 80 1b cmp %i2, %i3 (*printer)( 20082b0: 15 00 80 56 sethi %hi(0x2015800), %o2 20082b4: 90 10 00 19 mov %i1, %o0 20082b8: 92 10 20 01 mov 1, %o1 20082bc: 94 12 a1 b0 or %o2, 0x1b0, %o2 20082c0: 9f c7 40 00 call %i5 20082c4: 01 00 00 00 nop if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 20082c8: 10 80 00 d8 b 2008628 <_Heap_Walk+0x4c8> 20082cc: 82 10 20 00 clr %g1 ! 0 ); return false; } if ( 20082d0: 02 80 00 06 be 20082e8 <_Heap_Walk+0x188> 20082d4: 15 00 80 56 sethi %hi(0x2015800), %o2 _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 20082d8: 90 10 00 19 mov %i1, %o0 20082dc: 92 10 20 01 mov 1, %o1 20082e0: 10 bf ff f8 b 20082c0 <_Heap_Walk+0x160> 20082e4: 94 12 a1 c8 or %o2, 0x1c8, %o2 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 20082e8: e6 06 20 10 ld [ %i0 + 0x10 ], %l3 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 20082ec: d6 06 20 08 ld [ %i0 + 8 ], %o3 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); 20082f0: 10 80 00 33 b 20083bc <_Heap_Walk+0x25c> 20082f4: a4 10 00 18 mov %i0, %l2 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; 20082f8: 80 a0 80 0b cmp %g2, %o3 20082fc: 18 80 00 05 bgu 2008310 <_Heap_Walk+0x1b0> 2008300: 82 10 20 00 clr %g1 2008304: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2008308: 80 a0 40 0b cmp %g1, %o3 200830c: 82 60 3f ff subx %g0, -1, %g1 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 ) ) { 2008310: 80 a0 60 00 cmp %g1, 0 2008314: 32 80 00 07 bne,a 2008330 <_Heap_Walk+0x1d0> 2008318: 90 02 e0 08 add %o3, 8, %o0 (*printer)( 200831c: 15 00 80 56 sethi %hi(0x2015800), %o2 2008320: 90 10 00 19 mov %i1, %o0 2008324: 92 10 20 01 mov 1, %o1 2008328: 10 80 00 c7 b 2008644 <_Heap_Walk+0x4e4> 200832c: 94 12 a1 f8 or %o2, 0x1f8, %o2 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 2008330: d6 27 bf f8 st %o3, [ %fp + -8 ] 2008334: 7f ff e5 eb call 2001ae0 <.urem> 2008338: 92 10 00 13 mov %l3, %o1 ); return false; } if ( 200833c: 80 a2 20 00 cmp %o0, 0 2008340: 02 80 00 07 be 200835c <_Heap_Walk+0x1fc> 2008344: d6 07 bf f8 ld [ %fp + -8 ], %o3 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 2008348: 15 00 80 56 sethi %hi(0x2015800), %o2 200834c: 90 10 00 19 mov %i1, %o0 2008350: 92 10 20 01 mov 1, %o1 2008354: 10 80 00 bc b 2008644 <_Heap_Walk+0x4e4> 2008358: 94 12 a2 18 or %o2, 0x218, %o2 - 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; 200835c: c2 02 e0 04 ld [ %o3 + 4 ], %g1 2008360: 82 08 7f fe and %g1, -2, %g1 block = next_block; } while ( block != first_block ); return true; } 2008364: 82 02 c0 01 add %o3, %g1, %g1 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; 2008368: c2 00 60 04 ld [ %g1 + 4 ], %g1 ); return false; } if ( _Heap_Is_used( free_block ) ) { 200836c: 80 88 60 01 btst 1, %g1 2008370: 22 80 00 07 be,a 200838c <_Heap_Walk+0x22c> 2008374: d8 02 e0 0c ld [ %o3 + 0xc ], %o4 (*printer)( 2008378: 15 00 80 56 sethi %hi(0x2015800), %o2 200837c: 90 10 00 19 mov %i1, %o0 2008380: 92 10 20 01 mov 1, %o1 2008384: 10 80 00 b0 b 2008644 <_Heap_Walk+0x4e4> 2008388: 94 12 a2 48 or %o2, 0x248, %o2 ); return false; } if ( free_block->prev != prev_block ) { 200838c: 80 a3 00 12 cmp %o4, %l2 2008390: 22 80 00 0a be,a 20083b8 <_Heap_Walk+0x258> 2008394: a4 10 00 0b mov %o3, %l2 (*printer)( 2008398: 15 00 80 56 sethi %hi(0x2015800), %o2 200839c: 90 10 00 19 mov %i1, %o0 20083a0: 92 10 20 01 mov 1, %o1 20083a4: 94 12 a2 68 or %o2, 0x268, %o2 20083a8: 9f c7 40 00 call %i5 20083ac: 01 00 00 00 nop if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 20083b0: 10 80 00 9e b 2008628 <_Heap_Walk+0x4c8> 20083b4: 82 10 20 00 clr %g1 ! 0 return false; } prev_block = free_block; free_block = free_block->next; 20083b8: d6 02 e0 08 ld [ %o3 + 8 ], %o3 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 ) { 20083bc: 80 a2 c0 18 cmp %o3, %i0 20083c0: 32 bf ff ce bne,a 20082f8 <_Heap_Walk+0x198> 20083c4: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 20083c8: 2d 00 80 57 sethi %hi(0x2015c00), %l6 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( 20083cc: 2f 00 80 57 sethi %hi(0x2015c00), %l7 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 20083d0: ac 15 a0 28 or %l6, 0x28, %l6 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( 20083d4: ae 15 e0 10 or %l7, 0x10, %l7 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 20083d8: 2b 00 80 56 sethi %hi(0x2015800), %l5 block = next_block; } while ( block != first_block ); return true; } 20083dc: c2 06 a0 04 ld [ %i2 + 4 ], %g1 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; 20083e0: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 - 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; 20083e4: a4 08 7f fe and %g1, -2, %l2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 20083e8: a6 04 80 1a add %l2, %i2, %l3 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; 20083ec: 80 a0 c0 13 cmp %g3, %l3 20083f0: 18 80 00 05 bgu 2008404 <_Heap_Walk+0x2a4> <== NEVER TAKEN 20083f4: 84 10 20 00 clr %g2 20083f8: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 20083fc: 80 a0 80 13 cmp %g2, %l3 2008400: 84 60 3f ff subx %g0, -1, %g2 bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 2008404: 80 a0 a0 00 cmp %g2, 0 2008408: 12 80 00 07 bne 2008424 <_Heap_Walk+0x2c4> 200840c: 84 1e 80 11 xor %i2, %l1, %g2 (*printer)( 2008410: 15 00 80 56 sethi %hi(0x2015800), %o2 2008414: 90 10 00 19 mov %i1, %o0 2008418: 92 10 20 01 mov 1, %o1 200841c: 10 80 00 2c b 20084cc <_Heap_Walk+0x36c> 2008420: 94 12 a2 a0 or %o2, 0x2a0, %o2 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; 2008424: 80 a0 00 02 cmp %g0, %g2 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 2008428: c2 27 bf fc st %g1, [ %fp + -4 ] 200842c: a8 40 20 00 addx %g0, 0, %l4 2008430: 90 10 00 12 mov %l2, %o0 2008434: 7f ff e5 ab call 2001ae0 <.urem> 2008438: 92 10 00 1c mov %i4, %o1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 200843c: 80 a2 20 00 cmp %o0, 0 2008440: 02 80 00 0c be 2008470 <_Heap_Walk+0x310> 2008444: c2 07 bf fc ld [ %fp + -4 ], %g1 2008448: 80 8d 20 ff btst 0xff, %l4 200844c: 02 80 00 0a be 2008474 <_Heap_Walk+0x314> 2008450: 80 a4 80 10 cmp %l2, %l0 (*printer)( 2008454: 15 00 80 56 sethi %hi(0x2015800), %o2 2008458: 90 10 00 19 mov %i1, %o0 200845c: 92 10 20 01 mov 1, %o1 2008460: 94 12 a2 d0 or %o2, 0x2d0, %o2 2008464: 96 10 00 1a mov %i2, %o3 2008468: 10 bf ff d0 b 20083a8 <_Heap_Walk+0x248> 200846c: 98 10 00 12 mov %l2, %o4 ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 2008470: 80 a4 80 10 cmp %l2, %l0 2008474: 1a 80 00 0d bcc 20084a8 <_Heap_Walk+0x348> 2008478: 80 a4 c0 1a cmp %l3, %i2 200847c: 80 8d 20 ff btst 0xff, %l4 2008480: 02 80 00 0a be 20084a8 <_Heap_Walk+0x348> <== NEVER TAKEN 2008484: 80 a4 c0 1a cmp %l3, %i2 (*printer)( 2008488: 15 00 80 56 sethi %hi(0x2015800), %o2 200848c: 90 10 00 19 mov %i1, %o0 2008490: 92 10 20 01 mov 1, %o1 2008494: 94 12 a3 00 or %o2, 0x300, %o2 2008498: 96 10 00 1a mov %i2, %o3 200849c: 98 10 00 12 mov %l2, %o4 20084a0: 10 80 00 3d b 2008594 <_Heap_Walk+0x434> 20084a4: 9a 10 00 10 mov %l0, %o5 ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 20084a8: 38 80 00 0c bgu,a 20084d8 <_Heap_Walk+0x378> 20084ac: a8 08 60 01 and %g1, 1, %l4 20084b0: 80 8d 20 ff btst 0xff, %l4 20084b4: 02 80 00 09 be 20084d8 <_Heap_Walk+0x378> 20084b8: a8 08 60 01 and %g1, 1, %l4 (*printer)( 20084bc: 15 00 80 56 sethi %hi(0x2015800), %o2 20084c0: 90 10 00 19 mov %i1, %o0 20084c4: 92 10 20 01 mov 1, %o1 20084c8: 94 12 a3 30 or %o2, 0x330, %o2 20084cc: 96 10 00 1a mov %i2, %o3 20084d0: 10 bf ff b6 b 20083a8 <_Heap_Walk+0x248> 20084d4: 98 10 00 13 mov %l3, %o4 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; 20084d8: c2 04 e0 04 ld [ %l3 + 4 ], %g1 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 20084dc: 80 88 60 01 btst 1, %g1 20084e0: 12 80 00 40 bne 20085e0 <_Heap_Walk+0x480> 20084e4: 90 10 00 19 mov %i1, %o0 false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? 20084e8: da 06 a0 0c ld [ %i2 + 0xc ], %o5 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)( 20084ec: c2 06 20 08 ld [ %i0 + 8 ], %g1 20084f0: 05 00 80 56 sethi %hi(0x2015800), %g2 return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 20084f4: c8 06 20 0c ld [ %i0 + 0xc ], %g4 20084f8: 80 a3 40 01 cmp %o5, %g1 20084fc: 02 80 00 07 be 2008518 <_Heap_Walk+0x3b8> 2008500: 86 10 a0 10 or %g2, 0x10, %g3 block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 2008504: 80 a3 40 18 cmp %o5, %i0 2008508: 12 80 00 04 bne 2008518 <_Heap_Walk+0x3b8> 200850c: 86 15 63 d8 or %l5, 0x3d8, %g3 2008510: 07 00 80 56 sethi %hi(0x2015800), %g3 2008514: 86 10 e0 20 or %g3, 0x20, %g3 ! 2015820 <_Status_Object_name_errors_to_status+0x48> block->next, block->next == last_free_block ? 2008518: c4 06 a0 08 ld [ %i2 + 8 ], %g2 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)( 200851c: 1f 00 80 56 sethi %hi(0x2015800), %o7 2008520: 80 a0 80 04 cmp %g2, %g4 2008524: 02 80 00 07 be 2008540 <_Heap_Walk+0x3e0> 2008528: 82 13 e0 30 or %o7, 0x30, %g1 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 200852c: 80 a0 80 18 cmp %g2, %i0 2008530: 12 80 00 04 bne 2008540 <_Heap_Walk+0x3e0> 2008534: 82 15 63 d8 or %l5, 0x3d8, %g1 2008538: 03 00 80 56 sethi %hi(0x2015800), %g1 200853c: 82 10 60 40 or %g1, 0x40, %g1 ! 2015840 <_Status_Object_name_errors_to_status+0x68> 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)( 2008540: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 2008544: c4 23 a0 60 st %g2, [ %sp + 0x60 ] 2008548: c2 23 a0 64 st %g1, [ %sp + 0x64 ] 200854c: 90 10 00 19 mov %i1, %o0 2008550: 92 10 20 00 clr %o1 2008554: 15 00 80 56 sethi %hi(0x2015800), %o2 2008558: 96 10 00 1a mov %i2, %o3 200855c: 94 12 a3 68 or %o2, 0x368, %o2 2008560: 9f c7 40 00 call %i5 2008564: 98 10 00 12 mov %l2, %o4 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 2008568: da 04 c0 00 ld [ %l3 ], %o5 200856c: 80 a4 80 0d cmp %l2, %o5 2008570: 02 80 00 0d be 20085a4 <_Heap_Walk+0x444> 2008574: 80 a5 20 00 cmp %l4, 0 (*printer)( 2008578: 15 00 80 56 sethi %hi(0x2015800), %o2 200857c: e6 23 a0 5c st %l3, [ %sp + 0x5c ] 2008580: 90 10 00 19 mov %i1, %o0 2008584: 92 10 20 01 mov 1, %o1 2008588: 94 12 a3 a0 or %o2, 0x3a0, %o2 200858c: 96 10 00 1a mov %i2, %o3 2008590: 98 10 00 12 mov %l2, %o4 2008594: 9f c7 40 00 call %i5 2008598: 01 00 00 00 nop 200859c: 10 80 00 23 b 2008628 <_Heap_Walk+0x4c8> 20085a0: 82 10 20 00 clr %g1 ! 0 ); return false; } if ( !prev_used ) { 20085a4: 32 80 00 0a bne,a 20085cc <_Heap_Walk+0x46c> 20085a8: c2 06 20 08 ld [ %i0 + 8 ], %g1 (*printer)( 20085ac: 15 00 80 56 sethi %hi(0x2015800), %o2 20085b0: 90 10 00 19 mov %i1, %o0 20085b4: 92 10 20 01 mov 1, %o1 20085b8: 10 80 00 22 b 2008640 <_Heap_Walk+0x4e0> 20085bc: 94 12 a3 e0 or %o2, 0x3e0, %o2 { 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 ) { 20085c0: 02 80 00 17 be 200861c <_Heap_Walk+0x4bc> 20085c4: 80 a4 c0 1b cmp %l3, %i3 return true; } free_block = free_block->next; 20085c8: c2 00 60 08 ld [ %g1 + 8 ], %g1 ) { 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 ) { 20085cc: 80 a0 40 18 cmp %g1, %i0 20085d0: 12 bf ff fc bne 20085c0 <_Heap_Walk+0x460> 20085d4: 80 a0 40 1a cmp %g1, %i2 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 20085d8: 10 80 00 17 b 2008634 <_Heap_Walk+0x4d4> 20085dc: 15 00 80 57 sethi %hi(0x2015c00), %o2 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 20085e0: 80 a5 20 00 cmp %l4, 0 20085e4: 02 80 00 08 be 2008604 <_Heap_Walk+0x4a4> 20085e8: 92 10 20 00 clr %o1 (*printer)( 20085ec: 94 10 00 17 mov %l7, %o2 20085f0: 96 10 00 1a mov %i2, %o3 20085f4: 9f c7 40 00 call %i5 20085f8: 98 10 00 12 mov %l2, %o4 block->prev_size ); } block = next_block; } while ( block != first_block ); 20085fc: 10 80 00 08 b 200861c <_Heap_Walk+0x4bc> 2008600: 80 a4 c0 1b cmp %l3, %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2008604: da 06 80 00 ld [ %i2 ], %o5 2008608: 94 10 00 16 mov %l6, %o2 200860c: 96 10 00 1a mov %i2, %o3 2008610: 9f c7 40 00 call %i5 2008614: 98 10 00 12 mov %l2, %o4 block->prev_size ); } block = next_block; } while ( block != first_block ); 2008618: 80 a4 c0 1b cmp %l3, %i3 200861c: 12 bf ff 70 bne 20083dc <_Heap_Walk+0x27c> 2008620: b4 10 00 13 mov %l3, %i2 return true; 2008624: 82 10 20 01 mov 1, %g1 } 2008628: b0 08 60 01 and %g1, 1, %i0 200862c: 81 c7 e0 08 ret 2008630: 81 e8 00 00 restore return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 2008634: 90 10 00 19 mov %i1, %o0 2008638: 92 10 20 01 mov 1, %o1 200863c: 94 12 a0 50 or %o2, 0x50, %o2 2008640: 96 10 00 1a mov %i2, %o3 2008644: 9f c7 40 00 call %i5 2008648: 01 00 00 00 nop 200864c: 10 bf ff f7 b 2008628 <_Heap_Walk+0x4c8> 2008650: 82 10 20 00 clr %g1 ! 0 =============================================================================== 0200793c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 200793c: 9d e3 bf a0 save %sp, -96, %sp * 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 ) 2007940: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2007944: ba 10 00 18 mov %i0, %i5 * 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 ) 2007948: 80 a0 60 00 cmp %g1, 0 200794c: 02 80 00 20 be 20079cc <_Objects_Allocate+0x90> <== NEVER TAKEN 2007950: b0 10 20 00 clr %i0 /* * 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 ); 2007954: b8 07 60 20 add %i5, 0x20, %i4 2007958: 7f ff fd 81 call 2006f5c <_Chain_Get> 200795c: 90 10 00 1c mov %i4, %o0 if ( information->auto_extend ) { 2007960: c2 0f 60 12 ldub [ %i5 + 0x12 ], %g1 2007964: 80 a0 60 00 cmp %g1, 0 2007968: 02 80 00 19 be 20079cc <_Objects_Allocate+0x90> 200796c: b0 10 00 08 mov %o0, %i0 /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 2007970: 80 a2 20 00 cmp %o0, 0 2007974: 32 80 00 0a bne,a 200799c <_Objects_Allocate+0x60> 2007978: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 _Objects_Extend_information( information ); 200797c: 40 00 00 1d call 20079f0 <_Objects_Extend_information> 2007980: 90 10 00 1d mov %i5, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 2007984: 7f ff fd 76 call 2006f5c <_Chain_Get> 2007988: 90 10 00 1c mov %i4, %o0 } if ( the_object ) { 200798c: b0 92 20 00 orcc %o0, 0, %i0 2007990: 02 80 00 0f be 20079cc <_Objects_Allocate+0x90> 2007994: 01 00 00 00 nop uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 2007998: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 200799c: d0 16 20 0a lduh [ %i0 + 0xa ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 20079a0: d2 17 60 14 lduh [ %i5 + 0x14 ], %o1 20079a4: 40 00 3f e0 call 2017924 <.udiv> 20079a8: 90 22 00 01 sub %o0, %g1, %o0 information->inactive_per_block[ block ]--; 20079ac: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 20079b0: 91 2a 20 02 sll %o0, 2, %o0 20079b4: c4 00 40 08 ld [ %g1 + %o0 ], %g2 20079b8: 84 00 bf ff add %g2, -1, %g2 20079bc: c4 20 40 08 st %g2, [ %g1 + %o0 ] information->inactive--; 20079c0: c2 17 60 2c lduh [ %i5 + 0x2c ], %g1 20079c4: 82 00 7f ff add %g1, -1, %g1 20079c8: c2 37 60 2c sth %g1, [ %i5 + 0x2c ] ); } #endif return the_object; } 20079cc: 81 c7 e0 08 ret 20079d0: 81 e8 00 00 restore =============================================================================== 02007d48 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 2007d48: 9d e3 bf a0 save %sp, -96, %sp Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 2007d4c: 80 a6 60 00 cmp %i1, 0 2007d50: 02 80 00 17 be 2007dac <_Objects_Get_information+0x64> 2007d54: ba 10 20 00 clr %i5 /* * 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 ); 2007d58: 40 00 13 95 call 200cbac <_Objects_API_maximum_class> 2007d5c: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum == 0 ) 2007d60: 80 a2 20 00 cmp %o0, 0 2007d64: 02 80 00 12 be 2007dac <_Objects_Get_information+0x64> 2007d68: 80 a6 40 08 cmp %i1, %o0 return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 2007d6c: 18 80 00 10 bgu 2007dac <_Objects_Get_information+0x64> 2007d70: 03 00 80 72 sethi %hi(0x201c800), %g1 return NULL; if ( !_Objects_Information_table[ the_api ] ) 2007d74: b1 2e 20 02 sll %i0, 2, %i0 2007d78: 82 10 62 68 or %g1, 0x268, %g1 2007d7c: c2 00 40 18 ld [ %g1 + %i0 ], %g1 2007d80: 80 a0 60 00 cmp %g1, 0 2007d84: 02 80 00 0a be 2007dac <_Objects_Get_information+0x64> <== NEVER TAKEN 2007d88: b3 2e 60 02 sll %i1, 2, %i1 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 2007d8c: fa 00 40 19 ld [ %g1 + %i1 ], %i5 if ( !info ) 2007d90: 80 a7 60 00 cmp %i5, 0 2007d94: 02 80 00 06 be 2007dac <_Objects_Get_information+0x64> <== NEVER TAKEN 2007d98: 01 00 00 00 nop * 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 ) 2007d9c: c2 17 60 10 lduh [ %i5 + 0x10 ], %g1 return NULL; 2007da0: 80 a0 00 01 cmp %g0, %g1 2007da4: 82 60 20 00 subx %g0, 0, %g1 2007da8: ba 0f 40 01 and %i5, %g1, %i5 #endif return info; } 2007dac: 81 c7 e0 08 ret 2007db0: 91 e8 00 1d restore %g0, %i5, %o0 =============================================================================== 02008898 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 2008898: 9d e3 bf 98 save %sp, -104, %sp /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 200889c: 92 96 20 00 orcc %i0, 0, %o1 20088a0: 12 80 00 06 bne 20088b8 <_Objects_Id_to_name+0x20> 20088a4: 83 32 60 18 srl %o1, 0x18, %g1 20088a8: 03 00 80 79 sethi %hi(0x201e400), %g1 20088ac: c2 00 60 44 ld [ %g1 + 0x44 ], %g1 ! 201e444 <_Per_CPU_Information+0xc> 20088b0: d2 00 60 08 ld [ %g1 + 8 ], %o1 20088b4: 83 32 60 18 srl %o1, 0x18, %g1 20088b8: 82 08 60 07 and %g1, 7, %g1 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 20088bc: 84 00 7f ff add %g1, -1, %g2 20088c0: 80 a0 a0 02 cmp %g2, 2 20088c4: 18 80 00 16 bgu 200891c <_Objects_Id_to_name+0x84> 20088c8: ba 10 20 03 mov 3, %i5 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 20088cc: 10 80 00 16 b 2008924 <_Objects_Id_to_name+0x8c> 20088d0: 83 28 60 02 sll %g1, 2, %g1 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 20088d4: 85 28 a0 02 sll %g2, 2, %g2 20088d8: d0 00 40 02 ld [ %g1 + %g2 ], %o0 if ( !information ) 20088dc: 80 a2 20 00 cmp %o0, 0 20088e0: 02 80 00 0f be 200891c <_Objects_Id_to_name+0x84> <== NEVER TAKEN 20088e4: 01 00 00 00 nop return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 20088e8: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 20088ec: 80 a0 60 00 cmp %g1, 0 20088f0: 12 80 00 0b bne 200891c <_Objects_Id_to_name+0x84> <== NEVER TAKEN 20088f4: 01 00 00 00 nop return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 20088f8: 7f ff ff ca call 2008820 <_Objects_Get> 20088fc: 94 07 bf fc add %fp, -4, %o2 if ( !the_object ) 2008900: 80 a2 20 00 cmp %o0, 0 2008904: 02 80 00 06 be 200891c <_Objects_Id_to_name+0x84> 2008908: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; 200890c: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 2008910: ba 10 20 00 clr %i5 the_object = _Objects_Get( information, tmpId, &ignored_location ); if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); 2008914: 40 00 03 85 call 2009728 <_Thread_Enable_dispatch> 2008918: c2 26 40 00 st %g1, [ %i1 ] return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 200891c: 81 c7 e0 08 ret 2008920: 91 e8 00 1d restore %g0, %i5, %o0 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 2008924: 05 00 80 77 sethi %hi(0x201dc00), %g2 2008928: 84 10 a2 68 or %g2, 0x268, %g2 ! 201de68 <_Objects_Information_table> 200892c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 2008930: 80 a0 60 00 cmp %g1, 0 2008934: 12 bf ff e8 bne 20088d4 <_Objects_Id_to_name+0x3c> 2008938: 85 32 60 1b srl %o1, 0x1b, %g2 200893c: 30 bf ff f8 b,a 200891c <_Objects_Id_to_name+0x84> =============================================================================== 0200e204 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 200e204: 9d e3 bf a0 save %sp, -96, %sp Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); 200e208: f6 06 20 08 ld [ %i0 + 8 ], %i3 * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; 200e20c: 39 00 80 73 sethi %hi(0x201cc00), %i4 200e210: b5 36 e0 18 srl %i3, 0x18, %i2 for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; 200e214: b7 2e e0 10 sll %i3, 0x10, %i3 200e218: b4 0e a0 07 and %i2, 7, %i2 200e21c: b7 36 e0 0e srl %i3, 0xe, %i3 200e220: b4 06 a0 04 add %i2, 4, %i2 200e224: b5 2e a0 02 sll %i2, 2, %i2 * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; 200e228: 82 17 23 18 or %i4, 0x318, %g1 done = true; for ( index = 1 ; index <= max ; ++index ) { 200e22c: ba 10 20 01 mov 1, %i5 */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; 200e230: 84 10 20 01 mov 1, %g2 for ( index = 1 ; index <= max ; ++index ) { 200e234: 10 80 00 18 b 200e294 <_POSIX_Keys_Run_destructors+0x90> 200e238: f2 10 60 10 lduh [ %g1 + 0x10 ], %i1 POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; 200e23c: 86 17 23 18 or %i4, 0x318, %g3 Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) 200e240: c6 00 e0 1c ld [ %g3 + 0x1c ], %g3 200e244: 83 28 60 02 sll %g1, 2, %g1 200e248: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { 200e24c: 80 a0 60 00 cmp %g1, 0 200e250: 22 80 00 11 be,a 200e294 <_POSIX_Keys_Run_destructors+0x90> 200e254: ba 07 60 01 inc %i5 200e258: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 200e25c: 80 a0 e0 00 cmp %g3, 0 200e260: 02 80 00 0c be 200e290 <_POSIX_Keys_Run_destructors+0x8c> 200e264: 86 00 40 1a add %g1, %i2, %g3 void *value = key->Values [ thread_api ][ thread_index ]; 200e268: c6 00 e0 04 ld [ %g3 + 4 ], %g3 200e26c: d0 00 c0 1b ld [ %g3 + %i3 ], %o0 if ( value != NULL ) { 200e270: 80 a2 20 00 cmp %o0, 0 200e274: 22 80 00 08 be,a 200e294 <_POSIX_Keys_Run_destructors+0x90><== ALWAYS TAKEN 200e278: ba 07 60 01 inc %i5 key->Values [ thread_api ][ thread_index ] = NULL; 200e27c: c0 20 c0 1b clr [ %g3 + %i3 ] <== NOT EXECUTED (*key->destructor)( value ); 200e280: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 200e284: 9f c0 40 00 call %g1 <== NOT EXECUTED 200e288: 01 00 00 00 nop <== NOT EXECUTED done = false; 200e28c: 84 10 20 00 clr %g2 ! 0 <== NOT EXECUTED Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 200e290: ba 07 60 01 inc %i5 200e294: 83 2f 60 10 sll %i5, 0x10, %g1 200e298: 83 30 60 10 srl %g1, 0x10, %g1 200e29c: 80 a0 40 19 cmp %g1, %i1 200e2a0: 08 bf ff e7 bleu 200e23c <_POSIX_Keys_Run_destructors+0x38> 200e2a4: 80 88 a0 ff btst 0xff, %g2 * number of iterations. An infinite loop may happen if destructors set * thread specific data. This can be considered dubious. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { 200e2a8: 02 bf ff e1 be 200e22c <_POSIX_Keys_Run_destructors+0x28> <== NEVER TAKEN 200e2ac: 82 17 23 18 or %i4, 0x318, %g1 done = false; } } } } } 200e2b0: 81 c7 e0 08 ret 200e2b4: 81 e8 00 00 restore =============================================================================== 0200b454 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 200b454: 9d e3 bf 98 save %sp, -104, %sp 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( 200b458: 11 00 80 9c sethi %hi(0x2027000), %o0 200b45c: 92 10 00 18 mov %i0, %o1 200b460: 90 12 20 fc or %o0, 0xfc, %o0 200b464: 40 00 0c b4 call 200e734 <_Objects_Get> 200b468: 94 07 bf f8 add %fp, -8, %o2 Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 200b46c: c2 07 bf f8 ld [ %fp + -8 ], %g1 200b470: 80 a0 60 00 cmp %g1, 0 200b474: 12 80 00 45 bne 200b588 <_POSIX_Message_queue_Receive_support+0x134> 200b478: 01 00 00 00 nop case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 200b47c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 200b480: 84 08 60 03 and %g1, 3, %g2 200b484: 80 a0 a0 01 cmp %g2, 1 200b488: 32 80 00 08 bne,a 200b4a8 <_POSIX_Message_queue_Receive_support+0x54> 200b48c: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 _Thread_Enable_dispatch(); 200b490: 40 00 10 60 call 200f610 <_Thread_Enable_dispatch> 200b494: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); 200b498: 40 00 2a 1e call 2015d10 <__errno> 200b49c: 01 00 00 00 nop 200b4a0: 10 80 00 0b b 200b4cc <_POSIX_Message_queue_Receive_support+0x78> 200b4a4: 82 10 20 09 mov 9, %g1 ! 9 } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 200b4a8: c4 02 20 68 ld [ %o0 + 0x68 ], %g2 200b4ac: 80 a6 80 02 cmp %i2, %g2 200b4b0: 1a 80 00 09 bcc 200b4d4 <_POSIX_Message_queue_Receive_support+0x80> 200b4b4: 84 10 3f ff mov -1, %g2 _Thread_Enable_dispatch(); 200b4b8: 40 00 10 56 call 200f610 <_Thread_Enable_dispatch> 200b4bc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EMSGSIZE ); 200b4c0: 40 00 2a 14 call 2015d10 <__errno> 200b4c4: 01 00 00 00 nop 200b4c8: 82 10 20 7a mov 0x7a, %g1 ! 7a 200b4cc: 10 80 00 2d b 200b580 <_POSIX_Message_queue_Receive_support+0x12c> 200b4d0: c2 22 00 00 st %g1, [ %o0 ] /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 200b4d4: c4 27 bf fc st %g2, [ %fp + -4 ] /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 200b4d8: 80 a7 20 00 cmp %i4, 0 200b4dc: 02 80 00 06 be 200b4f4 <_POSIX_Message_queue_Receive_support+0xa0> 200b4e0: 98 10 20 00 clr %o4 do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 200b4e4: 05 00 00 10 sethi %hi(0x4000), %g2 200b4e8: 82 08 40 02 and %g1, %g2, %g1 200b4ec: 80 a0 00 01 cmp %g0, %g1 200b4f0: 98 60 3f ff subx %g0, -1, %o4 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 200b4f4: 90 02 20 1c add %o0, 0x1c, %o0 200b4f8: 92 10 00 18 mov %i0, %o1 200b4fc: 94 10 00 19 mov %i1, %o2 200b500: 96 07 bf fc add %fp, -4, %o3 200b504: 98 0b 20 01 and %o4, 1, %o4 200b508: 40 00 08 59 call 200d66c <_CORE_message_queue_Seize> 200b50c: 9a 10 00 1d mov %i5, %o5 &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 200b510: 40 00 10 40 call 200f610 <_Thread_Enable_dispatch> 200b514: 01 00 00 00 nop if (msg_prio) { 200b518: 80 a6 e0 00 cmp %i3, 0 200b51c: 02 80 00 08 be 200b53c <_POSIX_Message_queue_Receive_support+0xe8><== NEVER TAKEN 200b520: 03 00 80 9c sethi %hi(0x2027000), %g1 *msg_prio = _POSIX_Message_queue_Priority_from_core( _Thread_Executing->Wait.count 200b524: c2 00 61 74 ld [ %g1 + 0x174 ], %g1 ! 2027174 <_Per_CPU_Information+0xc> RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core( CORE_message_queue_Submit_types priority ) { /* absolute value without a library dependency */ return ((priority >= 0) ? priority : -priority); 200b528: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 200b52c: 83 38 a0 1f sra %g2, 0x1f, %g1 200b530: 84 18 40 02 xor %g1, %g2, %g2 200b534: 82 20 80 01 sub %g2, %g1, %g1 timeout ); _Thread_Enable_dispatch(); if (msg_prio) { *msg_prio = _POSIX_Message_queue_Priority_from_core( 200b538: c2 26 c0 00 st %g1, [ %i3 ] _Thread_Executing->Wait.count ); } if ( !_Thread_Executing->Wait.return_code ) 200b53c: 3b 00 80 9c sethi %hi(0x2027000), %i5 200b540: ba 17 61 68 or %i5, 0x168, %i5 ! 2027168 <_Per_CPU_Information> 200b544: c2 07 60 0c ld [ %i5 + 0xc ], %g1 200b548: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 200b54c: 80 a0 60 00 cmp %g1, 0 200b550: 12 80 00 05 bne 200b564 <_POSIX_Message_queue_Receive_support+0x110> 200b554: 01 00 00 00 nop return length_out; 200b558: f0 07 bf fc ld [ %fp + -4 ], %i0 200b55c: 81 c7 e0 08 ret 200b560: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( 200b564: 40 00 29 eb call 2015d10 <__errno> 200b568: 01 00 00 00 nop 200b56c: c2 07 60 0c ld [ %i5 + 0xc ], %g1 200b570: b8 10 00 08 mov %o0, %i4 200b574: 40 00 00 9b call 200b7e0 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 200b578: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 200b57c: d0 27 00 00 st %o0, [ %i4 ] 200b580: 81 c7 e0 08 ret 200b584: 91 e8 3f ff restore %g0, -1, %o0 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 200b588: 40 00 29 e2 call 2015d10 <__errno> 200b58c: b0 10 3f ff mov -1, %i0 200b590: 82 10 20 09 mov 9, %g1 200b594: c2 22 00 00 st %g1, [ %o0 ] } 200b598: 81 c7 e0 08 ret 200b59c: 81 e8 00 00 restore =============================================================================== 0200b708 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: Thread_Control *the_thread ) { POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200b708: c2 02 21 5c ld [ %o0 + 0x15c ], %g1 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 200b70c: c4 00 60 d8 ld [ %g1 + 0xd8 ], %g2 200b710: 80 a0 a0 00 cmp %g2, 0 200b714: 12 80 00 13 bne 200b760 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x58><== NEVER TAKEN 200b718: 01 00 00 00 nop 200b71c: c4 00 60 dc ld [ %g1 + 0xdc ], %g2 200b720: 80 a0 a0 01 cmp %g2, 1 200b724: 12 80 00 0f bne 200b760 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x58> 200b728: 01 00 00 00 nop thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 200b72c: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1 200b730: 80 a0 60 00 cmp %g1, 0 200b734: 02 80 00 0b be 200b760 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x58> 200b738: 01 00 00 00 nop * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 200b73c: 03 00 80 5c sethi %hi(0x2017000), %g1 200b740: c4 00 61 70 ld [ %g1 + 0x170 ], %g2 ! 2017170 <_Thread_Dispatch_disable_level> thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 200b744: 92 10 3f ff mov -1, %o1 200b748: 84 00 bf ff add %g2, -1, %g2 200b74c: c4 20 61 70 st %g2, [ %g1 + 0x170 ] return _Thread_Dispatch_disable_level; 200b750: c2 00 61 70 ld [ %g1 + 0x170 ], %g1 200b754: 82 13 c0 00 mov %o7, %g1 200b758: 40 00 01 b6 call 200be30 <_POSIX_Thread_Exit> 200b75c: 9e 10 40 00 mov %g1, %o7 } else _Thread_Enable_dispatch(); 200b760: 82 13 c0 00 mov %o7, %g1 200b764: 7f ff f4 dd call 2008ad8 <_Thread_Enable_dispatch> 200b768: 9e 10 40 00 mov %g1, %o7 =============================================================================== 0200cad8 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 200cad8: 9d e3 bf a0 save %sp, -96, %sp if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 200cadc: d0 06 40 00 ld [ %i1 ], %o0 200cae0: 7f ff ff f3 call 200caac <_POSIX_Priority_Is_valid> 200cae4: ba 10 00 18 mov %i0, %i5 200cae8: 80 8a 20 ff btst 0xff, %o0 200caec: 02 80 00 11 be 200cb30 <_POSIX_Thread_Translate_sched_param+0x58><== NEVER TAKEN 200caf0: b0 10 20 16 mov 0x16, %i0 return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 200caf4: c0 26 80 00 clr [ %i2 ] *budget_callout = NULL; if ( policy == SCHED_OTHER ) { 200caf8: 80 a7 60 00 cmp %i5, 0 200cafc: 12 80 00 06 bne 200cb14 <_POSIX_Thread_Translate_sched_param+0x3c> 200cb00: c0 26 c0 00 clr [ %i3 ] *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 200cb04: 82 10 20 01 mov 1, %g1 200cb08: c2 26 80 00 st %g1, [ %i2 ] return 0; 200cb0c: 81 c7 e0 08 ret 200cb10: 91 e8 20 00 restore %g0, 0, %o0 } if ( policy == SCHED_FIFO ) { 200cb14: 80 a7 60 01 cmp %i5, 1 200cb18: 02 80 00 06 be 200cb30 <_POSIX_Thread_Translate_sched_param+0x58> 200cb1c: b0 10 20 00 clr %i0 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 200cb20: 80 a7 60 02 cmp %i5, 2 200cb24: 32 80 00 05 bne,a 200cb38 <_POSIX_Thread_Translate_sched_param+0x60> 200cb28: 80 a7 60 04 cmp %i5, 4 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 200cb2c: fa 26 80 00 st %i5, [ %i2 ] return 0; 200cb30: 81 c7 e0 08 ret 200cb34: 81 e8 00 00 restore } if ( policy == SCHED_SPORADIC ) { 200cb38: 12 bf ff fe bne 200cb30 <_POSIX_Thread_Translate_sched_param+0x58> 200cb3c: b0 10 20 16 mov 0x16, %i0 if ( (param->sched_ss_repl_period.tv_sec == 0) && 200cb40: c2 06 60 08 ld [ %i1 + 8 ], %g1 200cb44: 80 a0 60 00 cmp %g1, 0 200cb48: 32 80 00 07 bne,a 200cb64 <_POSIX_Thread_Translate_sched_param+0x8c> 200cb4c: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 200cb50: c2 06 60 0c ld [ %i1 + 0xc ], %g1 200cb54: 80 a0 60 00 cmp %g1, 0 200cb58: 02 80 00 1d be 200cbcc <_POSIX_Thread_Translate_sched_param+0xf4> 200cb5c: 01 00 00 00 nop (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 200cb60: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 200cb64: 80 a0 60 00 cmp %g1, 0 200cb68: 12 80 00 06 bne 200cb80 <_POSIX_Thread_Translate_sched_param+0xa8> 200cb6c: 01 00 00 00 nop 200cb70: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 200cb74: 80 a0 60 00 cmp %g1, 0 200cb78: 02 bf ff ee be 200cb30 <_POSIX_Thread_Translate_sched_param+0x58> 200cb7c: b0 10 20 16 mov 0x16, %i0 (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 200cb80: 7f ff f6 1e call 200a3f8 <_Timespec_To_ticks> 200cb84: 90 06 60 08 add %i1, 8, %o0 _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; 200cb88: b0 10 20 16 mov 0x16, %i0 if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 200cb8c: ba 10 00 08 mov %o0, %i5 _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) 200cb90: 7f ff f6 1a call 200a3f8 <_Timespec_To_ticks> 200cb94: 90 06 60 10 add %i1, 0x10, %o0 if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 200cb98: 80 a7 40 08 cmp %i5, %o0 200cb9c: 0a 80 00 0c bcs 200cbcc <_POSIX_Thread_Translate_sched_param+0xf4> 200cba0: 01 00 00 00 nop _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) 200cba4: 7f ff ff c2 call 200caac <_POSIX_Priority_Is_valid> 200cba8: d0 06 60 04 ld [ %i1 + 4 ], %o0 200cbac: 80 8a 20 ff btst 0xff, %o0 200cbb0: 02 bf ff e0 be 200cb30 <_POSIX_Thread_Translate_sched_param+0x58> 200cbb4: 82 10 20 03 mov 3, %g1 return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 200cbb8: c2 26 80 00 st %g1, [ %i2 ] *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; 200cbbc: b0 10 20 00 clr %i0 if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 200cbc0: 03 00 80 19 sethi %hi(0x2006400), %g1 200cbc4: 82 10 62 f0 or %g1, 0x2f0, %g1 ! 20066f0 <_POSIX_Threads_Sporadic_budget_callout> 200cbc8: c2 26 c0 00 st %g1, [ %i3 ] return 0; } return EINVAL; } 200cbcc: 81 c7 e0 08 ret 200cbd0: 81 e8 00 00 restore =============================================================================== 0200be14 <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 200be14: 9d e3 bf a0 save %sp, -96, %sp Thread_Control *the_thread; POSIX_API_Control *api; void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; 200be18: f0 06 61 5c ld [ %i1 + 0x15c ], %i0 /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 200be1c: 40 00 08 e0 call 200e19c <_POSIX_Threads_cancel_run> 200be20: 90 10 00 19 mov %i1, %o0 /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 200be24: 90 10 00 19 mov %i1, %o0 200be28: 40 00 08 f7 call 200e204 <_POSIX_Keys_Run_destructors> 200be2c: ba 06 20 44 add %i0, 0x44, %i5 /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 200be30: 10 80 00 03 b 200be3c <_POSIX_Threads_Delete_extension+0x28> 200be34: f8 06 60 28 ld [ %i1 + 0x28 ], %i4 *(void **)the_thread->Wait.return_argument = value_ptr; 200be38: f8 20 40 00 st %i4, [ %g1 ] <== NOT EXECUTED /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 200be3c: 7f ff f4 9b call 20090a8 <_Thread_queue_Dequeue> 200be40: 90 10 00 1d mov %i5, %o0 200be44: 80 a2 20 00 cmp %o0, 0 200be48: 32 bf ff fc bne,a 200be38 <_POSIX_Threads_Delete_extension+0x24><== NEVER TAKEN 200be4c: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 200be50: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 200be54: 80 a0 60 04 cmp %g1, 4 200be58: 32 80 00 05 bne,a 200be6c <_POSIX_Threads_Delete_extension+0x58> 200be5c: c0 26 61 5c clr [ %i1 + 0x15c ] (void) _Watchdog_Remove( &api->Sporadic_timer ); 200be60: 7f ff f7 85 call 2009c74 <_Watchdog_Remove> 200be64: 90 06 20 a8 add %i0, 0xa8, %o0 deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 200be68: c0 26 61 5c clr [ %i1 + 0x15c ] _Workspace_Free( api ); 200be6c: 7f ff f7 f4 call 2009e3c <_Workspace_Free> 200be70: 81 e8 00 00 restore =============================================================================== 0200643c <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 200643c: 9d e3 bf 58 save %sp, -168, %sp 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; 2006440: 03 00 80 71 sethi %hi(0x201c400), %g1 2006444: 82 10 63 b4 or %g1, 0x3b4, %g1 ! 201c7b4 maximum = Configuration_POSIX_API.number_of_initialization_threads; 2006448: f6 00 60 30 ld [ %g1 + 0x30 ], %i3 if ( !user_threads || maximum == 0 ) 200644c: 80 a6 e0 00 cmp %i3, 0 2006450: 02 80 00 1b be 20064bc <_POSIX_Threads_Initialize_user_threads_body+0x80><== NEVER TAKEN 2006454: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 2006458: 80 a7 60 00 cmp %i5, 0 200645c: 02 80 00 18 be 20064bc <_POSIX_Threads_Initialize_user_threads_body+0x80><== NEVER TAKEN 2006460: b8 10 20 00 clr %i4 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 2006464: 40 00 19 dc call 200cbd4 2006468: 90 07 bf bc add %fp, -68, %o0 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 200646c: 92 10 20 02 mov 2, %o1 2006470: 40 00 19 e5 call 200cc04 2006474: 90 07 bf bc add %fp, -68, %o0 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 2006478: d2 07 60 04 ld [ %i5 + 4 ], %o1 200647c: 40 00 19 f1 call 200cc40 2006480: 90 07 bf bc add %fp, -68, %o0 status = pthread_create( 2006484: d4 07 40 00 ld [ %i5 ], %o2 2006488: 90 07 bf fc add %fp, -4, %o0 200648c: 92 07 bf bc add %fp, -68, %o1 2006490: 7f ff ff 18 call 20060f0 2006494: 96 10 20 00 clr %o3 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 2006498: 94 92 20 00 orcc %o0, 0, %o2 200649c: 22 80 00 05 be,a 20064b0 <_POSIX_Threads_Initialize_user_threads_body+0x74> 20064a0: b8 07 20 01 inc %i4 _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 20064a4: 90 10 20 02 mov 2, %o0 20064a8: 40 00 07 f6 call 2008480 <_Internal_error_Occurred> 20064ac: 92 10 20 01 mov 1, %o1 * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 20064b0: 80 a7 00 1b cmp %i4, %i3 20064b4: 0a bf ff ec bcs 2006464 <_POSIX_Threads_Initialize_user_threads_body+0x28><== NEVER TAKEN 20064b8: ba 07 60 08 add %i5, 8, %i5 20064bc: 81 c7 e0 08 ret 20064c0: 81 e8 00 00 restore =============================================================================== 0200bf84 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 200bf84: 9d e3 bf a0 save %sp, -96, %sp Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200bf88: fa 06 61 5c ld [ %i1 + 0x15c ], %i5 /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 200bf8c: 40 00 03 c9 call 200ceb0 <_Timespec_To_ticks> 200bf90: 90 07 60 98 add %i5, 0x98, %o0 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 200bf94: 03 00 80 6f sethi %hi(0x201bc00), %g1 200bf98: d2 08 61 cc ldub [ %g1 + 0x1cc ], %o1 ! 201bdcc 200bf9c: c2 07 60 88 ld [ %i5 + 0x88 ], %g1 the_thread->cpu_time_budget = ticks; 200bfa0: d0 26 60 78 st %o0, [ %i1 + 0x78 ] 200bfa4: 92 22 40 01 sub %o1, %g1, %o1 */ #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 ) { 200bfa8: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 200bfac: 80 a0 60 00 cmp %g1, 0 200bfb0: 12 80 00 08 bne 200bfd0 <_POSIX_Threads_Sporadic_budget_TSR+0x4c><== NEVER TAKEN 200bfb4: d2 26 60 18 st %o1, [ %i1 + 0x18 ] /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 200bfb8: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 200bfbc: 80 a0 40 09 cmp %g1, %o1 200bfc0: 08 80 00 04 bleu 200bfd0 <_POSIX_Threads_Sporadic_budget_TSR+0x4c> 200bfc4: 90 10 00 19 mov %i1, %o0 _Thread_Change_priority( the_thread, new_priority, true ); 200bfc8: 7f ff f2 34 call 2008898 <_Thread_Change_priority> 200bfcc: 94 10 20 01 mov 1, %o2 #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 200bfd0: 40 00 03 b8 call 200ceb0 <_Timespec_To_ticks> 200bfd4: 90 07 60 90 add %i5, 0x90, %o0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200bfd8: 31 00 80 72 sethi %hi(0x201c800), %i0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200bfdc: d0 27 60 b4 st %o0, [ %i5 + 0xb4 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200bfe0: b0 16 23 bc or %i0, 0x3bc, %i0 200bfe4: 7f ff f6 ca call 2009b0c <_Watchdog_Insert> 200bfe8: 93 ef 60 a8 restore %i5, 0xa8, %o1 =============================================================================== 0200bfec <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200bfec: c4 02 21 5c ld [ %o0 + 0x15c ], %g2 /* * 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 */ 200bff0: 86 10 3f ff mov -1, %g3 200bff4: c4 00 a0 8c ld [ %g2 + 0x8c ], %g2 200bff8: c6 22 20 78 st %g3, [ %o0 + 0x78 ] 200bffc: 07 00 80 6f sethi %hi(0x201bc00), %g3 200c000: d2 08 e1 cc ldub [ %g3 + 0x1cc ], %o1 ! 201bdcc 200c004: 92 22 40 02 sub %o1, %g2, %o1 */ #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 ) { 200c008: c4 02 20 1c ld [ %o0 + 0x1c ], %g2 200c00c: 80 a0 a0 00 cmp %g2, 0 200c010: 12 80 00 09 bne 200c034 <_POSIX_Threads_Sporadic_budget_callout+0x48><== NEVER TAKEN 200c014: d2 22 20 18 st %o1, [ %o0 + 0x18 ] /* * 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 ) { 200c018: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 200c01c: 80 a0 40 09 cmp %g1, %o1 200c020: 1a 80 00 05 bcc 200c034 <_POSIX_Threads_Sporadic_budget_callout+0x48><== NEVER TAKEN 200c024: 94 10 20 01 mov 1, %o2 _Thread_Change_priority( the_thread, new_priority, true ); 200c028: 82 13 c0 00 mov %o7, %g1 200c02c: 7f ff f2 1b call 2008898 <_Thread_Change_priority> 200c030: 9e 10 40 00 mov %g1, %o7 200c034: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 02006168 <_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) { 2006168: 9d e3 bf a0 save %sp, -96, %sp bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 200616c: c2 06 60 68 ld [ %i1 + 0x68 ], %g1 2006170: 82 00 60 01 inc %g1 2006174: c2 26 60 68 st %g1, [ %i1 + 0x68 ] /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 2006178: c2 06 60 54 ld [ %i1 + 0x54 ], %g1 200617c: 80 a0 60 00 cmp %g1, 0 2006180: 32 80 00 07 bne,a 200619c <_POSIX_Timer_TSR+0x34> 2006184: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 2006188: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 200618c: 80 a0 60 00 cmp %g1, 0 2006190: 02 80 00 0f be 20061cc <_POSIX_Timer_TSR+0x64> <== NEVER TAKEN 2006194: 82 10 20 04 mov 4, %g1 ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 2006198: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 200619c: d4 06 60 08 ld [ %i1 + 8 ], %o2 20061a0: 90 06 60 10 add %i1, 0x10, %o0 20061a4: 17 00 80 18 sethi %hi(0x2006000), %o3 20061a8: 98 10 00 19 mov %i1, %o4 20061ac: 40 00 19 87 call 200c7c8 <_POSIX_Timer_Insert_helper> 20061b0: 96 12 e1 68 or %o3, 0x168, %o3 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 20061b4: 80 8a 20 ff btst 0xff, %o0 20061b8: 02 80 00 0a be 20061e0 <_POSIX_Timer_TSR+0x78> <== NEVER TAKEN 20061bc: 01 00 00 00 nop return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 20061c0: 40 00 05 c3 call 20078cc <_TOD_Get> 20061c4: 90 06 60 6c add %i1, 0x6c, %o0 20061c8: 82 10 20 03 mov 3, %g1 /* * 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 ) ) { 20061cc: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 20061d0: d2 06 60 44 ld [ %i1 + 0x44 ], %o1 20061d4: 40 00 18 6a call 200c37c 20061d8: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 20061dc: c0 26 60 68 clr [ %i1 + 0x68 ] 20061e0: 81 c7 e0 08 ret 20061e4: 81 e8 00 00 restore =============================================================================== 0200e2b8 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 200e2b8: 9d e3 bf 68 save %sp, -152, %sp siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 200e2bc: 98 10 20 01 mov 1, %o4 200e2c0: 90 10 00 18 mov %i0, %o0 200e2c4: 92 10 00 19 mov %i1, %o1 200e2c8: 94 07 bf f4 add %fp, -12, %o2 200e2cc: 40 00 00 2e call 200e384 <_POSIX_signals_Clear_signals> 200e2d0: 96 10 00 1a mov %i2, %o3 200e2d4: 80 8a 20 ff btst 0xff, %o0 200e2d8: 02 80 00 28 be 200e378 <_POSIX_signals_Check_signal+0xc0> 200e2dc: 82 10 20 00 clr %g1 #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 200e2e0: 85 2e 60 02 sll %i1, 2, %g2 200e2e4: 35 00 80 74 sethi %hi(0x201d000), %i2 200e2e8: b7 2e 60 04 sll %i1, 4, %i3 200e2ec: b4 16 a0 90 or %i2, 0x90, %i2 200e2f0: b6 26 c0 02 sub %i3, %g2, %i3 200e2f4: 84 06 80 1b add %i2, %i3, %g2 200e2f8: fa 00 a0 08 ld [ %g2 + 8 ], %i5 200e2fc: 80 a7 60 01 cmp %i5, 1 200e300: 02 80 00 1e be 200e378 <_POSIX_signals_Check_signal+0xc0> <== NEVER TAKEN 200e304: 90 07 bf cc add %fp, -52, %o0 return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 200e308: f8 06 20 d0 ld [ %i0 + 0xd0 ], %i4 api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 200e30c: c2 00 a0 04 ld [ %g2 + 4 ], %g1 200e310: 82 10 40 1c or %g1, %i4, %g1 200e314: c2 26 20 d0 st %g1, [ %i0 + 0xd0 ] /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, 200e318: 03 00 80 74 sethi %hi(0x201d000), %g1 200e31c: d2 00 60 44 ld [ %g1 + 0x44 ], %o1 ! 201d044 <_Per_CPU_Information+0xc> 200e320: 94 10 20 28 mov 0x28, %o2 200e324: 40 00 04 62 call 200f4ac 200e328: 92 02 60 20 add %o1, 0x20, %o1 sizeof( Thread_Wait_information )); /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 200e32c: c2 06 80 1b ld [ %i2 + %i3 ], %g1 200e330: 80 a0 60 02 cmp %g1, 2 200e334: 12 80 00 07 bne 200e350 <_POSIX_signals_Check_signal+0x98> 200e338: 90 10 00 19 mov %i1, %o0 case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 200e33c: 92 07 bf f4 add %fp, -12, %o1 200e340: 9f c7 40 00 call %i5 200e344: 94 10 20 00 clr %o2 signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; 200e348: 10 80 00 05 b 200e35c <_POSIX_signals_Check_signal+0xa4> 200e34c: 03 00 80 74 sethi %hi(0x201d000), %g1 default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 200e350: 9f c7 40 00 call %i5 200e354: 01 00 00 00 nop } /* * Restore the blocking information */ memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information, 200e358: 03 00 80 74 sethi %hi(0x201d000), %g1 200e35c: d0 00 60 44 ld [ %g1 + 0x44 ], %o0 ! 201d044 <_Per_CPU_Information+0xc> 200e360: 92 07 bf cc add %fp, -52, %o1 200e364: 90 02 20 20 add %o0, 0x20, %o0 200e368: 40 00 04 51 call 200f4ac 200e36c: 94 10 20 28 mov 0x28, %o2 /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; 200e370: 82 10 20 01 mov 1, %g1 sizeof( Thread_Wait_information )); /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 200e374: f8 26 20 d0 st %i4, [ %i0 + 0xd0 ] return true; } 200e378: b0 08 60 01 and %g1, 1, %i0 200e37c: 81 c7 e0 08 ret 200e380: 81 e8 00 00 restore =============================================================================== 0200ea98 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 200ea98: 9d e3 bf a0 save %sp, -96, %sp clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 200ea9c: 7f ff cd b8 call 200217c 200eaa0: 01 00 00 00 nop if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 200eaa4: 85 2e 20 04 sll %i0, 4, %g2 200eaa8: 83 2e 20 02 sll %i0, 2, %g1 200eaac: 82 20 80 01 sub %g2, %g1, %g1 200eab0: 05 00 80 74 sethi %hi(0x201d000), %g2 200eab4: 84 10 a0 90 or %g2, 0x90, %g2 ! 201d090 <_POSIX_signals_Vectors> 200eab8: c4 00 80 01 ld [ %g2 + %g1 ], %g2 200eabc: 80 a0 a0 02 cmp %g2, 2 200eac0: 12 80 00 0a bne 200eae8 <_POSIX_signals_Clear_process_signals+0x50> 200eac4: 84 10 20 01 mov 1, %g2 if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 200eac8: 05 00 80 74 sethi %hi(0x201d000), %g2 200eacc: 84 10 a2 88 or %g2, 0x288, %g2 ! 201d288 <_POSIX_signals_Siginfo> 200ead0: 86 00 40 02 add %g1, %g2, %g3 200ead4: c2 00 40 02 ld [ %g1 + %g2 ], %g1 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 200ead8: 86 00 e0 04 add %g3, 4, %g3 200eadc: 80 a0 40 03 cmp %g1, %g3 200eae0: 12 80 00 08 bne 200eb00 <_POSIX_signals_Clear_process_signals+0x68><== NEVER TAKEN 200eae4: 84 10 20 01 mov 1, %g2 clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 200eae8: 03 00 80 74 sethi %hi(0x201d000), %g1 200eaec: b0 06 3f ff add %i0, -1, %i0 200eaf0: b1 28 80 18 sll %g2, %i0, %i0 200eaf4: c4 00 62 84 ld [ %g1 + 0x284 ], %g2 200eaf8: b0 28 80 18 andn %g2, %i0, %i0 200eafc: f0 20 62 84 st %i0, [ %g1 + 0x284 ] } _ISR_Enable( level ); 200eb00: 7f ff cd a3 call 200218c 200eb04: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02006c10 <_POSIX_signals_Get_lowest>: sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 2006c10: 82 10 20 1b mov 0x1b, %g1 2006c14: 84 10 20 01 mov 1, %g2 #include #include #include #include int _POSIX_signals_Get_lowest( 2006c18: 86 00 7f ff add %g1, -1, %g3 2006c1c: 87 28 80 03 sll %g2, %g3, %g3 ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 2006c20: 80 88 c0 08 btst %g3, %o0 2006c24: 12 80 00 11 bne 2006c68 <_POSIX_signals_Get_lowest+0x58> <== NEVER TAKEN 2006c28: 01 00 00 00 nop sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 2006c2c: 82 00 60 01 inc %g1 2006c30: 80 a0 60 20 cmp %g1, 0x20 2006c34: 12 bf ff fa bne 2006c1c <_POSIX_signals_Get_lowest+0xc> 2006c38: 86 00 7f ff add %g1, -1, %g3 2006c3c: 82 10 20 01 mov 1, %g1 2006c40: 84 10 20 01 mov 1, %g2 #include #include #include #include int _POSIX_signals_Get_lowest( 2006c44: 86 00 7f ff add %g1, -1, %g3 2006c48: 87 28 80 03 sll %g2, %g3, %g3 #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 2006c4c: 80 88 c0 08 btst %g3, %o0 2006c50: 12 80 00 06 bne 2006c68 <_POSIX_signals_Get_lowest+0x58> 2006c54: 01 00 00 00 nop */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 2006c58: 82 00 60 01 inc %g1 2006c5c: 80 a0 60 1b cmp %g1, 0x1b 2006c60: 12 bf ff fa bne 2006c48 <_POSIX_signals_Get_lowest+0x38> <== ALWAYS TAKEN 2006c64: 86 00 7f ff add %g1, -1, %g3 * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 2006c68: 81 c3 e0 08 retl 2006c6c: 90 10 00 01 mov %g1, %o0 =============================================================================== 02019820 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 2019820: 9d e3 bf a0 save %sp, -96, %sp /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 2019824: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 2019828: 3b 04 00 20 sethi %hi(0x10008000), %i5 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 201982c: 84 06 7f ff add %i1, -1, %g2 2019830: 86 10 20 01 mov 1, %g3 2019834: 9e 08 40 1d and %g1, %i5, %o7 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 2019838: 92 10 00 1a mov %i2, %o1 POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 201983c: c8 06 21 5c ld [ %i0 + 0x15c ], %g4 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 2019840: 80 a3 c0 1d cmp %o7, %i5 2019844: 12 80 00 1c bne 20198b4 <_POSIX_signals_Unblock_thread+0x94> 2019848: 85 28 c0 02 sll %g3, %g2, %g2 if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 201984c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2019850: 80 88 80 01 btst %g2, %g1 2019854: 12 80 00 07 bne 2019870 <_POSIX_signals_Unblock_thread+0x50> 2019858: 82 10 20 04 mov 4, %g1 201985c: c2 01 20 d0 ld [ %g4 + 0xd0 ], %g1 2019860: 80 a8 80 01 andncc %g2, %g1, %g0 2019864: 02 80 00 3f be 2019960 <_POSIX_signals_Unblock_thread+0x140> 2019868: ba 10 20 00 clr %i5 the_thread->Wait.return_code = EINTR; 201986c: 82 10 20 04 mov 4, %g1 2019870: c2 26 20 34 st %g1, [ %i0 + 0x34 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 2019874: 80 a2 60 00 cmp %o1, 0 2019878: 12 80 00 07 bne 2019894 <_POSIX_signals_Unblock_thread+0x74> 201987c: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 the_info->si_signo = signo; the_info->si_code = SI_USER; 2019880: 82 10 20 01 mov 1, %g1 the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 2019884: f2 22 00 00 st %i1, [ %o0 ] the_info->si_code = SI_USER; 2019888: c2 22 20 04 st %g1, [ %o0 + 4 ] the_info->si_value.sival_int = 0; 201988c: 10 80 00 04 b 201989c <_POSIX_signals_Unblock_thread+0x7c> 2019890: c0 22 20 08 clr [ %o0 + 8 ] } else { *the_info = *info; 2019894: 7f ff d7 06 call 200f4ac 2019898: 94 10 20 0c mov 0xc, %o2 } _Thread_queue_Extract_with_proxy( the_thread ); 201989c: 90 10 00 18 mov %i0, %o0 20198a0: 7f ff be ef call 200945c <_Thread_queue_Extract_with_proxy> 20198a4: ba 10 20 01 mov 1, %i5 20198a8: b0 0f 60 01 and %i5, 1, %i0 20198ac: 81 c7 e0 08 ret 20198b0: 81 e8 00 00 restore } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 20198b4: c8 01 20 d0 ld [ %g4 + 0xd0 ], %g4 20198b8: 80 a8 80 04 andncc %g2, %g4, %g0 20198bc: 02 80 00 29 be 2019960 <_POSIX_signals_Unblock_thread+0x140> 20198c0: ba 10 20 00 clr %i5 * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { 20198c4: 05 04 00 00 sethi %hi(0x10000000), %g2 20198c8: 80 88 40 02 btst %g1, %g2 20198cc: 02 80 00 19 be 2019930 <_POSIX_signals_Unblock_thread+0x110> 20198d0: 80 a0 60 00 cmp %g1, 0 the_thread->Wait.return_code = EINTR; 20198d4: 84 10 20 04 mov 4, %g2 20198d8: c4 26 20 34 st %g2, [ %i0 + 0x34 ] /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) 20198dc: 05 00 00 ef sethi %hi(0x3bc00), %g2 20198e0: 84 10 a2 e0 or %g2, 0x2e0, %g2 ! 3bee0 20198e4: 80 88 40 02 btst %g1, %g2 20198e8: 02 80 00 07 be 2019904 <_POSIX_signals_Unblock_thread+0xe4> 20198ec: 80 88 60 08 btst 8, %g1 _Thread_queue_Extract_with_proxy( the_thread ); 20198f0: 7f ff be db call 200945c <_Thread_queue_Extract_with_proxy> 20198f4: 90 10 00 18 mov %i0, %o0 20198f8: b0 0f 60 01 and %i5, 1, %i0 20198fc: 81 c7 e0 08 ret 2019900: 81 e8 00 00 restore else if ( _States_Is_delaying(the_thread->current_state) ) { 2019904: 22 80 00 18 be,a 2019964 <_POSIX_signals_Unblock_thread+0x144><== NEVER TAKEN 2019908: b0 0f 60 01 and %i5, 1, %i0 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 201990c: 7f ff c0 da call 2009c74 <_Watchdog_Remove> 2019910: 90 06 20 48 add %i0, 0x48, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2019914: 90 10 00 18 mov %i0, %o0 2019918: 13 04 00 ff sethi %hi(0x1003fc00), %o1 201991c: 7f ff bc 25 call 20089b0 <_Thread_Clear_state> 2019920: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 2019924: b0 0f 60 01 and %i5, 1, %i0 2019928: 81 c7 e0 08 ret 201992c: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 2019930: 32 80 00 0d bne,a 2019964 <_POSIX_signals_Unblock_thread+0x144><== NEVER TAKEN 2019934: b0 0f 60 01 and %i5, 1, %i0 <== NOT EXECUTED if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 2019938: 03 00 80 74 sethi %hi(0x201d000), %g1 201993c: 82 10 60 38 or %g1, 0x38, %g1 ! 201d038 <_Per_CPU_Information> 2019940: c4 00 60 08 ld [ %g1 + 8 ], %g2 2019944: 80 a0 a0 00 cmp %g2, 0 2019948: 22 80 00 07 be,a 2019964 <_POSIX_signals_Unblock_thread+0x144> 201994c: b0 0f 60 01 and %i5, 1, %i0 2019950: c4 00 60 0c ld [ %g1 + 0xc ], %g2 2019954: 80 a6 00 02 cmp %i0, %g2 2019958: 22 80 00 02 be,a 2019960 <_POSIX_signals_Unblock_thread+0x140><== ALWAYS TAKEN 201995c: c6 28 60 18 stb %g3, [ %g1 + 0x18 ] _Thread_Dispatch_necessary = true; } } return false; } 2019960: b0 0f 60 01 and %i5, 1, %i0 2019964: 81 c7 e0 08 ret 2019968: 81 e8 00 00 restore =============================================================================== 02009790 <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 2009790: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; 2009794: 80 a6 60 00 cmp %i1, 0 2009798: 02 80 00 73 be 2009964 <_RBTree_Extract_unprotected+0x1d4> 200979c: 01 00 00 00 nop /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { 20097a0: c2 06 20 08 ld [ %i0 + 8 ], %g1 20097a4: 80 a6 40 01 cmp %i1, %g1 20097a8: 32 80 00 0d bne,a 20097dc <_RBTree_Extract_unprotected+0x4c> 20097ac: c2 06 20 0c ld [ %i0 + 0xc ], %g1 if (the_node->child[RBT_RIGHT]) 20097b0: c2 06 60 08 ld [ %i1 + 8 ], %g1 20097b4: 80 a0 60 00 cmp %g1, 0 20097b8: 22 80 00 04 be,a 20097c8 <_RBTree_Extract_unprotected+0x38> 20097bc: c2 06 40 00 ld [ %i1 ], %g1 the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; 20097c0: 10 80 00 06 b 20097d8 <_RBTree_Extract_unprotected+0x48> 20097c4: c2 26 20 08 st %g1, [ %i0 + 8 ] else { the_rbtree->first[RBT_LEFT] = the_node->parent; if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, 20097c8: 80 a6 00 01 cmp %i0, %g1 20097cc: 12 80 00 03 bne 20097d8 <_RBTree_Extract_unprotected+0x48> 20097d0: c2 26 20 08 st %g1, [ %i0 + 8 ] the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; 20097d4: c0 26 20 08 clr [ %i0 + 8 ] } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { 20097d8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 20097dc: 80 a6 40 01 cmp %i1, %g1 20097e0: 12 80 00 0b bne 200980c <_RBTree_Extract_unprotected+0x7c> 20097e4: c2 06 60 04 ld [ %i1 + 4 ], %g1 if (the_node->child[RBT_LEFT]) 20097e8: 80 a0 60 00 cmp %g1, 0 20097ec: 22 80 00 04 be,a 20097fc <_RBTree_Extract_unprotected+0x6c> 20097f0: c4 06 40 00 ld [ %i1 ], %g2 the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; 20097f4: 10 80 00 06 b 200980c <_RBTree_Extract_unprotected+0x7c> 20097f8: c2 26 20 0c st %g1, [ %i0 + 0xc ] else { the_rbtree->first[RBT_RIGHT] = the_node->parent; if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, 20097fc: 80 a6 00 02 cmp %i0, %g2 2009800: 12 80 00 03 bne 200980c <_RBTree_Extract_unprotected+0x7c> 2009804: c4 26 20 0c st %g2, [ %i0 + 0xc ] the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; 2009808: c0 26 20 0c clr [ %i0 + 0xc ] * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { 200980c: ba 90 60 00 orcc %g1, 0, %i5 2009810: 02 80 00 36 be 20098e8 <_RBTree_Extract_unprotected+0x158> 2009814: f8 06 60 08 ld [ %i1 + 8 ], %i4 2009818: 80 a7 20 00 cmp %i4, 0 200981c: 32 80 00 05 bne,a 2009830 <_RBTree_Extract_unprotected+0xa0> 2009820: c2 07 60 08 ld [ %i5 + 8 ], %g1 2009824: 10 80 00 35 b 20098f8 <_RBTree_Extract_unprotected+0x168> 2009828: b8 10 00 01 mov %g1, %i4 target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */ while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT]; 200982c: c2 07 60 08 ld [ %i5 + 8 ], %g1 2009830: 80 a0 60 00 cmp %g1, 0 2009834: 32 bf ff fe bne,a 200982c <_RBTree_Extract_unprotected+0x9c> 2009838: ba 10 00 01 mov %g1, %i5 * target's position (target is the right child of target->parent) * when target vacates it. if there is no child, then target->parent * should become NULL. This may cause the coloring to be violated. * For now we store the color of the node being deleted in victim_color. */ leaf = target->child[RBT_LEFT]; 200983c: f8 07 60 04 ld [ %i5 + 4 ], %i4 if(leaf) { 2009840: 80 a7 20 00 cmp %i4, 0 2009844: 02 80 00 05 be 2009858 <_RBTree_Extract_unprotected+0xc8> 2009848: 01 00 00 00 nop leaf->parent = target->parent; 200984c: c2 07 40 00 ld [ %i5 ], %g1 2009850: 10 80 00 04 b 2009860 <_RBTree_Extract_unprotected+0xd0> 2009854: c2 27 00 00 st %g1, [ %i4 ] } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); 2009858: 7f ff ff 53 call 20095a4 <_RBTree_Extract_validate_unprotected> 200985c: 90 10 00 1d mov %i5, %o0 } victim_color = target->color; dir = target != target->parent->child[0]; 2009860: c4 07 40 00 ld [ %i5 ], %g2 leaf->parent = target->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; 2009864: c2 07 60 0c ld [ %i5 + 0xc ], %g1 dir = target != target->parent->child[0]; 2009868: c6 00 a0 04 ld [ %g2 + 4 ], %g3 200986c: 86 1f 40 03 xor %i5, %g3, %g3 2009870: 80 a0 00 03 cmp %g0, %g3 2009874: 86 40 20 00 addx %g0, 0, %g3 target->parent->child[dir] = leaf; 2009878: 87 28 e0 02 sll %g3, 2, %g3 200987c: 84 00 80 03 add %g2, %g3, %g2 2009880: f8 20 a0 04 st %i4, [ %g2 + 4 ] /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 2009884: c4 06 40 00 ld [ %i1 ], %g2 2009888: c6 00 a0 04 ld [ %g2 + 4 ], %g3 200988c: 86 1e 40 03 xor %i1, %g3, %g3 2009890: 80 a0 00 03 cmp %g0, %g3 2009894: 86 40 20 00 addx %g0, 0, %g3 the_node->parent->child[dir] = target; 2009898: 87 28 e0 02 sll %g3, 2, %g3 200989c: 84 00 80 03 add %g2, %g3, %g2 20098a0: fa 20 a0 04 st %i5, [ %g2 + 4 ] /* set target's new children to the original node's children */ target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT]; 20098a4: c4 06 60 08 ld [ %i1 + 8 ], %g2 20098a8: c4 27 60 08 st %g2, [ %i5 + 8 ] if (the_node->child[RBT_RIGHT]) 20098ac: c4 06 60 08 ld [ %i1 + 8 ], %g2 20098b0: 80 a0 a0 00 cmp %g2, 0 20098b4: 32 80 00 02 bne,a 20098bc <_RBTree_Extract_unprotected+0x12c><== ALWAYS TAKEN 20098b8: fa 20 80 00 st %i5, [ %g2 ] the_node->child[RBT_RIGHT]->parent = target; target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; 20098bc: c4 06 60 04 ld [ %i1 + 4 ], %g2 20098c0: c4 27 60 04 st %g2, [ %i5 + 4 ] if (the_node->child[RBT_LEFT]) 20098c4: c4 06 60 04 ld [ %i1 + 4 ], %g2 20098c8: 80 a0 a0 00 cmp %g2, 0 20098cc: 32 80 00 02 bne,a 20098d4 <_RBTree_Extract_unprotected+0x144> 20098d0: fa 20 80 00 st %i5, [ %g2 ] /* finally, update the parent node and recolor. target has completely * replaced the_node, and target's child has moved up the tree if needed. * the_node is no longer part of the tree, although it has valid pointers * still. */ target->parent = the_node->parent; 20098d4: c4 06 40 00 ld [ %i1 ], %g2 20098d8: c4 27 40 00 st %g2, [ %i5 ] target->color = the_node->color; 20098dc: c4 06 60 0c ld [ %i1 + 0xc ], %g2 20098e0: 10 80 00 14 b 2009930 <_RBTree_Extract_unprotected+0x1a0> 20098e4: c4 27 60 0c st %g2, [ %i5 + 0xc ] * violated. We will fix it later. * For now we store the color of the node being deleted in victim_color. */ leaf = the_node->child[RBT_LEFT] ? the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; if( leaf ) { 20098e8: 80 a7 20 00 cmp %i4, 0 20098ec: 32 80 00 04 bne,a 20098fc <_RBTree_Extract_unprotected+0x16c> 20098f0: c2 06 40 00 ld [ %i1 ], %g1 20098f4: 30 80 00 04 b,a 2009904 <_RBTree_Extract_unprotected+0x174> leaf->parent = the_node->parent; 20098f8: c2 06 40 00 ld [ %i1 ], %g1 20098fc: 10 80 00 04 b 200990c <_RBTree_Extract_unprotected+0x17c> 2009900: c2 27 00 00 st %g1, [ %i4 ] } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 2009904: 7f ff ff 28 call 20095a4 <_RBTree_Extract_validate_unprotected> 2009908: 90 10 00 19 mov %i1, %o0 } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 200990c: c4 06 40 00 ld [ %i1 ], %g2 leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); } victim_color = the_node->color; 2009910: c2 06 60 0c ld [ %i1 + 0xc ], %g1 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 2009914: c6 00 a0 04 ld [ %g2 + 4 ], %g3 2009918: 86 1e 40 03 xor %i1, %g3, %g3 200991c: 80 a0 00 03 cmp %g0, %g3 2009920: 86 40 20 00 addx %g0, 0, %g3 the_node->parent->child[dir] = leaf; 2009924: 87 28 e0 02 sll %g3, 2, %g3 2009928: 84 00 80 03 add %g2, %g3, %g2 200992c: f8 20 a0 04 st %i4, [ %g2 + 4 ] /* fix coloring. leaf has moved up the tree. The color of the deleted * node is in victim_color. There are two cases: * 1. Deleted a red node, its child must be black. Nothing must be done. * 2. Deleted a black node, its child must be red. Paint child black. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ 2009930: 80 a0 60 00 cmp %g1, 0 2009934: 32 80 00 06 bne,a 200994c <_RBTree_Extract_unprotected+0x1bc> 2009938: c2 06 20 04 ld [ %i0 + 4 ], %g1 if (leaf) { 200993c: 80 a7 20 00 cmp %i4, 0 2009940: 32 80 00 02 bne,a 2009948 <_RBTree_Extract_unprotected+0x1b8> 2009944: c0 27 20 0c clr [ %i4 + 0xc ] /* Wipe the_node */ _RBTree_Set_off_rbtree(the_node); /* set root to black, if it exists */ if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK; 2009948: c2 06 20 04 ld [ %i0 + 4 ], %g1 */ RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree( RBTree_Node *node ) { node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL; 200994c: c0 26 60 08 clr [ %i1 + 8 ] 2009950: c0 26 60 04 clr [ %i1 + 4 ] 2009954: 80 a0 60 00 cmp %g1, 0 2009958: 02 80 00 03 be 2009964 <_RBTree_Extract_unprotected+0x1d4> 200995c: c0 26 40 00 clr [ %i1 ] 2009960: c0 20 60 0c clr [ %g1 + 0xc ] 2009964: 81 c7 e0 08 ret 2009968: 81 e8 00 00 restore =============================================================================== 020095a4 <_RBTree_Extract_validate_unprotected>: * of the extract operation. */ void _RBTree_Extract_validate_unprotected( RBTree_Node *the_node ) { 20095a4: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; 20095a8: fa 06 00 00 ld [ %i0 ], %i5 if(!parent->parent) return; 20095ac: c2 07 40 00 ld [ %i5 ], %g1 20095b0: 80 a0 60 00 cmp %g1, 0 20095b4: 02 80 00 6e be 200976c <_RBTree_Extract_validate_unprotected+0x1c8> 20095b8: 90 10 00 18 mov %i0, %o0 sibling = _RBTree_Sibling(the_node); 20095bc: 7f ff ff ca call 20094e4 <_RBTree_Sibling> 20095c0: b4 10 20 01 mov 1, %i2 /* continue to correct tree as long as the_node is black and not the root */ while (!_RBTree_Is_red(the_node) && parent->parent) { 20095c4: 10 80 00 5d b 2009738 <_RBTree_Extract_validate_unprotected+0x194> 20095c8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 20095cc: 22 80 00 15 be,a 2009620 <_RBTree_Extract_validate_unprotected+0x7c><== NEVER TAKEN 20095d0: c4 02 20 08 ld [ %o0 + 8 ], %g2 <== NOT EXECUTED 20095d4: c2 02 20 0c ld [ %o0 + 0xc ], %g1 20095d8: 80 a0 60 01 cmp %g1, 1 20095dc: 32 80 00 11 bne,a 2009620 <_RBTree_Extract_validate_unprotected+0x7c> 20095e0: c4 02 20 08 ld [ %o0 + 8 ], %g2 * then rotate parent left, making the sibling be the_node's grandparent. * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; 20095e4: c2 27 60 0c st %g1, [ %i5 + 0xc ] sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 20095e8: c2 07 60 04 ld [ %i5 + 4 ], %g1 * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; 20095ec: c0 22 20 0c clr [ %o0 + 0xc ] dir = the_node != parent->child[0]; 20095f0: 82 1e 00 01 xor %i0, %g1, %g1 20095f4: 80 a0 00 01 cmp %g0, %g1 _RBTree_Rotate(parent, dir); 20095f8: 90 10 00 1d mov %i5, %o0 * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 20095fc: b8 40 20 00 addx %g0, 0, %i4 _RBTree_Rotate(parent, dir); 2009600: 7f ff ff ca call 2009528 <_RBTree_Rotate> 2009604: 92 10 00 1c mov %i4, %o1 sibling = parent->child[!dir]; 2009608: 80 a0 00 1c cmp %g0, %i4 200960c: 82 60 3f ff subx %g0, -1, %g1 2009610: 83 28 60 02 sll %g1, 2, %g1 2009614: 82 07 40 01 add %i5, %g1, %g1 2009618: d0 00 60 04 ld [ %g1 + 4 ], %o0 } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && 200961c: c4 02 20 08 ld [ %o0 + 8 ], %g2 2009620: 80 a0 a0 00 cmp %g2, 0 2009624: 02 80 00 06 be 200963c <_RBTree_Extract_validate_unprotected+0x98> 2009628: 82 10 20 00 clr %g1 * This function maintains the properties of the red-black tree. * * @note It does NOT disable interrupts to ensure the atomicity * of the extract operation. */ void _RBTree_Extract_validate_unprotected( 200962c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 2009630: 82 18 60 01 xor %g1, 1, %g1 2009634: 80 a0 00 01 cmp %g0, %g1 2009638: 82 60 3f ff subx %g0, -1, %g1 _RBTree_Rotate(parent, dir); sibling = parent->child[!dir]; } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && 200963c: 80 a0 60 00 cmp %g1, 0 2009640: 32 80 00 14 bne,a 2009690 <_RBTree_Extract_validate_unprotected+0xec> 2009644: c2 07 60 04 ld [ %i5 + 4 ], %g1 !_RBTree_Is_red(sibling->child[RBT_LEFT])) { 2009648: c4 02 20 04 ld [ %o0 + 4 ], %g2 200964c: 80 a0 a0 00 cmp %g2, 0 2009650: 02 80 00 07 be 200966c <_RBTree_Extract_validate_unprotected+0xc8> 2009654: 80 a0 60 00 cmp %g1, 0 * This function maintains the properties of the red-black tree. * * @note It does NOT disable interrupts to ensure the atomicity * of the extract operation. */ void _RBTree_Extract_validate_unprotected( 2009658: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 200965c: 82 18 60 01 xor %g1, 1, %g1 2009660: 80 a0 00 01 cmp %g0, %g1 2009664: 82 60 3f ff subx %g0, -1, %g1 _RBTree_Rotate(parent, dir); sibling = parent->child[!dir]; } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && 2009668: 80 a0 60 00 cmp %g1, 0 200966c: 32 80 00 09 bne,a 2009690 <_RBTree_Extract_validate_unprotected+0xec> 2009670: c2 07 60 04 ld [ %i5 + 4 ], %g1 !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; 2009674: f4 22 20 0c st %i2, [ %o0 + 0xc ] 2009678: c2 07 60 0c ld [ %i5 + 0xc ], %g1 200967c: 80 a0 60 01 cmp %g1, 1 2009680: 32 80 00 3d bne,a 2009774 <_RBTree_Extract_validate_unprotected+0x1d0> 2009684: f8 07 40 00 ld [ %i5 ], %i4 if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; 2009688: 10 80 00 33 b 2009754 <_RBTree_Extract_validate_unprotected+0x1b0> 200968c: c0 27 60 0c clr [ %i5 + 0xc ] * cases, either the_node is to the left or the right of the parent. * In both cases, first check if one of sibling's children is black, * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; 2009690: 82 1e 00 01 xor %i0, %g1, %g1 2009694: 80 a0 00 01 cmp %g0, %g1 2009698: b8 40 20 00 addx %g0, 0, %i4 if (!_RBTree_Is_red(sibling->child[!dir])) { 200969c: 80 a0 00 1c cmp %g0, %i4 20096a0: b6 60 3f ff subx %g0, -1, %i3 20096a4: 83 2e e0 02 sll %i3, 2, %g1 20096a8: 82 02 00 01 add %o0, %g1, %g1 20096ac: c4 00 60 04 ld [ %g1 + 4 ], %g2 20096b0: 80 a0 a0 00 cmp %g2, 0 20096b4: 02 80 00 06 be 20096cc <_RBTree_Extract_validate_unprotected+0x128> 20096b8: 82 10 20 00 clr %g1 * This function maintains the properties of the red-black tree. * * @note It does NOT disable interrupts to ensure the atomicity * of the extract operation. */ void _RBTree_Extract_validate_unprotected( 20096bc: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 20096c0: 82 18 60 01 xor %g1, 1, %g1 20096c4: 80 a0 00 01 cmp %g0, %g1 20096c8: 82 60 3f ff subx %g0, -1, %g1 * In both cases, first check if one of sibling's children is black, * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[!dir])) { 20096cc: 80 a0 60 00 cmp %g1, 0 20096d0: 32 80 00 0e bne,a 2009708 <_RBTree_Extract_validate_unprotected+0x164> 20096d4: c2 07 60 0c ld [ %i5 + 0xc ], %g1 sibling->color = RBT_RED; 20096d8: 82 10 20 01 mov 1, %g1 20096dc: c2 22 20 0c st %g1, [ %o0 + 0xc ] sibling->child[dir]->color = RBT_BLACK; 20096e0: 83 2f 20 02 sll %i4, 2, %g1 20096e4: 82 02 00 01 add %o0, %g1, %g1 20096e8: c2 00 60 04 ld [ %g1 + 4 ], %g1 _RBTree_Rotate(sibling, !dir); 20096ec: 92 1f 20 01 xor %i4, 1, %o1 20096f0: 7f ff ff 8e call 2009528 <_RBTree_Rotate> 20096f4: c0 20 60 0c clr [ %g1 + 0xc ] sibling = parent->child[!dir]; 20096f8: 83 2e e0 02 sll %i3, 2, %g1 20096fc: 82 07 40 01 add %i5, %g1, %g1 2009700: d0 00 60 04 ld [ %g1 + 4 ], %o0 } sibling->color = parent->color; 2009704: c2 07 60 0c ld [ %i5 + 0xc ], %g1 parent->color = RBT_BLACK; sibling->child[!dir]->color = RBT_BLACK; 2009708: b7 2e e0 02 sll %i3, 2, %i3 sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, !dir); sibling = parent->child[!dir]; } sibling->color = parent->color; 200970c: c2 22 20 0c st %g1, [ %o0 + 0xc ] parent->color = RBT_BLACK; sibling->child[!dir]->color = RBT_BLACK; 2009710: 90 02 00 1b add %o0, %i3, %o0 2009714: c2 02 20 04 ld [ %o0 + 4 ], %g1 sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, !dir); sibling = parent->child[!dir]; } sibling->color = parent->color; parent->color = RBT_BLACK; 2009718: c0 27 60 0c clr [ %i5 + 0xc ] sibling->child[!dir]->color = RBT_BLACK; 200971c: c0 20 60 0c clr [ %g1 + 0xc ] _RBTree_Rotate(parent, dir); 2009720: 90 10 00 1d mov %i5, %o0 2009724: 7f ff ff 81 call 2009528 <_RBTree_Rotate> 2009728: 92 10 00 1c mov %i4, %o1 break; /* done */ 200972c: 10 80 00 0b b 2009758 <_RBTree_Extract_validate_unprotected+0x1b4> 2009730: c2 06 00 00 ld [ %i0 ], %g1 if(!parent->parent) return; sibling = _RBTree_Sibling(the_node); /* continue to correct tree as long as the_node is black and not the root */ while (!_RBTree_Is_red(the_node) && parent->parent) { 2009734: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2009738: 80 a0 60 01 cmp %g1, 1 200973c: 22 80 00 07 be,a 2009758 <_RBTree_Extract_validate_unprotected+0x1b4> 2009740: c2 06 00 00 ld [ %i0 ], %g1 2009744: c2 07 40 00 ld [ %i5 ], %g1 2009748: 80 a0 60 00 cmp %g1, 0 200974c: 12 bf ff a0 bne 20095cc <_RBTree_Extract_validate_unprotected+0x28> 2009750: 80 a2 20 00 cmp %o0, 0 sibling->child[!dir]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; 2009754: c2 06 00 00 ld [ %i0 ], %g1 2009758: c2 00 40 00 ld [ %g1 ], %g1 200975c: 80 a0 60 00 cmp %g1, 0 2009760: 12 80 00 0a bne 2009788 <_RBTree_Extract_validate_unprotected+0x1e4> 2009764: 01 00 00 00 nop 2009768: c0 26 20 0c clr [ %i0 + 0xc ] 200976c: 81 c7 e0 08 ret 2009770: 81 e8 00 00 restore parent->color = RBT_BLACK; break; } the_node = parent; /* done if parent is red */ parent = the_node->parent; sibling = _RBTree_Sibling(the_node); 2009774: 90 10 00 1d mov %i5, %o0 2009778: 7f ff ff 5b call 20094e4 <_RBTree_Sibling> 200977c: b0 10 00 1d mov %i5, %i0 2009780: 10 bf ff ed b 2009734 <_RBTree_Extract_validate_unprotected+0x190> 2009784: ba 10 00 1c mov %i4, %i5 2009788: 81 c7 e0 08 ret 200978c: 81 e8 00 00 restore =============================================================================== 02009cec <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { 2009cec: 9d e3 bf a0 save %sp, -96, %sp size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; 2009cf0: 80 a6 20 00 cmp %i0, 0 2009cf4: 02 80 00 10 be 2009d34 <_RBTree_Initialize+0x48> <== NEVER TAKEN 2009cf8: 01 00 00 00 nop RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; 2009cfc: c0 26 00 00 clr [ %i0 ] the_rbtree->root = NULL; 2009d00: c0 26 20 04 clr [ %i0 + 4 ] the_rbtree->first[0] = NULL; 2009d04: c0 26 20 08 clr [ %i0 + 8 ] the_rbtree->first[1] = NULL; 2009d08: c0 26 20 0c clr [ %i0 + 0xc ] the_rbtree->compare_function = compare_function; 2009d0c: f2 26 20 10 st %i1, [ %i0 + 0x10 ] /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 2009d10: 10 80 00 06 b 2009d28 <_RBTree_Initialize+0x3c> 2009d14: fa 2e 20 14 stb %i5, [ %i0 + 0x14 ] _RBTree_Insert(the_rbtree, next); 2009d18: 90 10 00 18 mov %i0, %o0 2009d1c: 7f ff ff ef call 2009cd8 <_RBTree_Insert> 2009d20: b4 06 80 1c add %i2, %i4, %i2 * node_size - size of node in bytes * * Output parameters: NONE */ void _RBTree_Initialize( 2009d24: b6 06 ff ff add %i3, -1, %i3 /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 2009d28: 80 a6 e0 00 cmp %i3, 0 2009d2c: 12 bf ff fb bne 2009d18 <_RBTree_Initialize+0x2c> 2009d30: 92 10 00 1a mov %i2, %o1 2009d34: 81 c7 e0 08 ret 2009d38: 81 e8 00 00 restore =============================================================================== 0200299c <_RBTree_Sibling>: */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; 200299c: 80 a2 20 00 cmp %o0, 0 20029a0: 02 80 00 0e be 20029d8 <_RBTree_Sibling+0x3c> 20029a4: 82 10 20 00 clr %g1 if(!(the_node->parent)) return NULL; 20029a8: c4 02 00 00 ld [ %o0 ], %g2 20029ac: 80 a0 a0 00 cmp %g2, 0 20029b0: 02 80 00 0a be 20029d8 <_RBTree_Sibling+0x3c> <== NEVER TAKEN 20029b4: 01 00 00 00 nop if(!(the_node->parent->parent)) return NULL; 20029b8: c6 00 80 00 ld [ %g2 ], %g3 20029bc: 80 a0 e0 00 cmp %g3, 0 20029c0: 02 80 00 06 be 20029d8 <_RBTree_Sibling+0x3c> 20029c4: 01 00 00 00 nop if(the_node == the_node->parent->child[RBT_LEFT]) 20029c8: c2 00 a0 04 ld [ %g2 + 4 ], %g1 20029cc: 80 a2 00 01 cmp %o0, %g1 20029d0: 22 80 00 02 be,a 20029d8 <_RBTree_Sibling+0x3c> 20029d4: c2 00 a0 08 ld [ %g2 + 8 ], %g1 return the_node->parent->child[RBT_RIGHT]; else return the_node->parent->child[RBT_LEFT]; } 20029d8: 81 c3 e0 08 retl 20029dc: 90 10 00 01 mov %g1, %o0 =============================================================================== 02009b14 <_RBTree_Validate_insert_unprotected>: * append operation. */ void _RBTree_Validate_insert_unprotected( RBTree_Node *the_node ) { 2009b14: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *u,*g; /* note: the insert root case is handled already */ /* if the parent is black, nothing needs to be done * otherwise may need to loop a few times */ while (_RBTree_Is_red(_RBTree_Parent(the_node))) { 2009b18: 10 80 00 1f b 2009b94 <_RBTree_Validate_insert_unprotected+0x80> 2009b1c: b6 10 20 01 mov 1, %i3 ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(!(the_node->parent->parent->parent)) return NULL; 2009b20: 80 a0 60 00 cmp %g1, 0 2009b24: 02 80 00 27 be 2009bc0 <_RBTree_Validate_insert_unprotected+0xac><== NEVER TAKEN 2009b28: c2 07 60 04 ld [ %i5 + 4 ], %g1 { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) 2009b2c: 80 a2 00 01 cmp %o0, %g1 2009b30: 22 80 00 02 be,a 2009b38 <_RBTree_Validate_insert_unprotected+0x24> 2009b34: c2 07 60 08 ld [ %i5 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 2009b38: 80 a0 60 00 cmp %g1, 0 2009b3c: 22 80 00 21 be,a 2009bc0 <_RBTree_Validate_insert_unprotected+0xac> 2009b40: c2 07 60 04 ld [ %i5 + 4 ], %g1 2009b44: c4 00 60 0c ld [ %g1 + 0xc ], %g2 2009b48: 80 a0 a0 01 cmp %g2, 1 2009b4c: 32 80 00 1d bne,a 2009bc0 <_RBTree_Validate_insert_unprotected+0xac> 2009b50: c2 07 60 04 ld [ %i5 + 4 ], %g1 u = _RBTree_Parent_sibling(the_node); g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { the_node->parent->color = RBT_BLACK; 2009b54: c0 22 20 0c clr [ %o0 + 0xc ] u->color = RBT_BLACK; 2009b58: c0 20 60 0c clr [ %g1 + 0xc ] g->color = RBT_RED; 2009b5c: c4 27 60 0c st %g2, [ %i5 + 0xc ] 2009b60: 10 80 00 0d b 2009b94 <_RBTree_Validate_insert_unprotected+0x80> 2009b64: b0 10 00 1d mov %i5, %i0 RBTree_Direction dir = the_node != the_node->parent->child[0]; RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { _RBTree_Rotate(the_node->parent, pdir); 2009b68: 7f ff ff cc call 2009a98 <_RBTree_Rotate> 2009b6c: 92 10 00 1c mov %i4, %o1 the_node = the_node->child[pdir]; 2009b70: 83 2f 20 02 sll %i4, 2, %g1 2009b74: b0 06 00 01 add %i0, %g1, %i0 2009b78: f0 06 20 04 ld [ %i0 + 4 ], %i0 } the_node->parent->color = RBT_BLACK; 2009b7c: c2 06 00 00 ld [ %i0 ], %g1 g->color = RBT_RED; /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); 2009b80: 90 10 00 1d mov %i5, %o0 /* ensure node is on the same branch direction as parent */ if (dir != pdir) { _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; } the_node->parent->color = RBT_BLACK; 2009b84: c0 20 60 0c clr [ %g1 + 0xc ] g->color = RBT_RED; 2009b88: f6 27 60 0c st %i3, [ %i5 + 0xc ] /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); 2009b8c: 7f ff ff c3 call 2009a98 <_RBTree_Rotate> 2009b90: 92 26 c0 1c sub %i3, %i4, %o1 ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } 2009b94: d0 06 00 00 ld [ %i0 ], %o0 */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 2009b98: fa 02 00 00 ld [ %o0 ], %i5 2009b9c: 80 a7 60 00 cmp %i5, 0 2009ba0: 22 80 00 14 be,a 2009bf0 <_RBTree_Validate_insert_unprotected+0xdc> 2009ba4: c0 26 20 0c clr [ %i0 + 0xc ] */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 2009ba8: c2 02 20 0c ld [ %o0 + 0xc ], %g1 2009bac: 80 a0 60 01 cmp %g1, 1 2009bb0: 12 80 00 10 bne 2009bf0 <_RBTree_Validate_insert_unprotected+0xdc> 2009bb4: 01 00 00 00 nop ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(!(the_node->parent->parent->parent)) return NULL; 2009bb8: 10 bf ff da b 2009b20 <_RBTree_Validate_insert_unprotected+0xc> 2009bbc: c2 07 40 00 ld [ %i5 ], %g1 u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; RBTree_Direction pdir = the_node->parent != g->child[0]; 2009bc0: 82 1a 00 01 xor %o0, %g1, %g1 2009bc4: 80 a0 00 01 cmp %g0, %g1 the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; 2009bc8: c2 02 20 04 ld [ %o0 + 4 ], %g1 RBTree_Direction pdir = the_node->parent != g->child[0]; 2009bcc: b8 40 20 00 addx %g0, 0, %i4 the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; 2009bd0: 82 1e 00 01 xor %i0, %g1, %g1 2009bd4: 80 a0 00 01 cmp %g0, %g1 2009bd8: 82 40 20 00 addx %g0, 0, %g1 RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { 2009bdc: 80 a0 40 1c cmp %g1, %i4 2009be0: 12 bf ff e2 bne 2009b68 <_RBTree_Validate_insert_unprotected+0x54> 2009be4: 01 00 00 00 nop _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; } the_node->parent->color = RBT_BLACK; 2009be8: 10 bf ff e6 b 2009b80 <_RBTree_Validate_insert_unprotected+0x6c> 2009bec: c2 06 00 00 ld [ %i0 ], %g1 2009bf0: 81 c7 e0 08 ret 2009bf4: 81 e8 00 00 restore =============================================================================== 020076f4 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 20076f4: 9d e3 bf 98 save %sp, -104, %sp 20076f8: 11 00 80 7a sethi %hi(0x201e800), %o0 20076fc: 92 10 00 18 mov %i0, %o1 2007700: 90 12 20 64 or %o0, 0x64, %o0 2007704: 40 00 07 e9 call 20096a8 <_Objects_Get> 2007708: 94 07 bf fc add %fp, -4, %o2 /* * 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 ) { 200770c: c2 07 bf fc ld [ %fp + -4 ], %g1 2007710: 80 a0 60 00 cmp %g1, 0 2007714: 12 80 00 25 bne 20077a8 <_Rate_monotonic_Timeout+0xb4> <== NEVER TAKEN 2007718: ba 10 00 08 mov %o0, %i5 case OBJECTS_LOCAL: the_thread = the_period->owner; 200771c: d0 02 20 40 ld [ %o0 + 0x40 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 2007720: 03 00 00 10 sethi %hi(0x4000), %g1 */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_PERIOD); 2007724: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 2007728: 80 88 80 01 btst %g2, %g1 200772c: 22 80 00 0b be,a 2007758 <_Rate_monotonic_Timeout+0x64> 2007730: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 2007734: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 2007738: c2 07 60 08 ld [ %i5 + 8 ], %g1 200773c: 80 a0 80 01 cmp %g2, %g1 2007740: 32 80 00 06 bne,a 2007758 <_Rate_monotonic_Timeout+0x64> 2007744: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2007748: 13 04 00 ff sethi %hi(0x1003fc00), %o1 200774c: 40 00 0a b9 call 200a230 <_Thread_Clear_state> 2007750: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 2007754: 30 80 00 06 b,a 200776c <_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 ) { 2007758: 80 a0 60 01 cmp %g1, 1 200775c: 12 80 00 0d bne 2007790 <_Rate_monotonic_Timeout+0x9c> 2007760: 82 10 20 04 mov 4, %g1 the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 2007764: 82 10 20 03 mov 3, %g1 2007768: c2 27 60 38 st %g1, [ %i5 + 0x38 ] _Rate_monotonic_Initiate_statistics( the_period ); 200776c: 7f ff fe 65 call 2007100 <_Rate_monotonic_Initiate_statistics> 2007770: 90 10 00 1d mov %i5, %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2007774: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2007778: 11 00 80 7a sethi %hi(0x201e800), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200777c: c2 27 60 1c st %g1, [ %i5 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2007780: 90 12 22 8c or %o0, 0x28c, %o0 2007784: 40 00 0f 64 call 200b514 <_Watchdog_Insert> 2007788: 92 07 60 10 add %i5, 0x10, %o1 200778c: 30 80 00 02 b,a 2007794 <_Rate_monotonic_Timeout+0xa0> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 2007790: c2 27 60 38 st %g1, [ %i5 + 0x38 ] * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 2007794: 03 00 80 7a sethi %hi(0x201e800), %g1 2007798: c4 00 61 d0 ld [ %g1 + 0x1d0 ], %g2 ! 201e9d0 <_Thread_Dispatch_disable_level> 200779c: 84 00 bf ff add %g2, -1, %g2 20077a0: c4 20 61 d0 st %g2, [ %g1 + 0x1d0 ] return _Thread_Dispatch_disable_level; 20077a4: c2 00 61 d0 ld [ %g1 + 0x1d0 ], %g1 20077a8: 81 c7 e0 08 ret 20077ac: 81 e8 00 00 restore =============================================================================== 020085d8 <_Scheduler_priority_Tick>: #include #include void _Scheduler_priority_Tick( void ) { 20085d8: 9d e3 bf a0 save %sp, -96, %sp Thread_Control *executing; executing = _Thread_Executing; 20085dc: 03 00 80 74 sethi %hi(0x201d000), %g1 20085e0: fa 00 60 44 ld [ %g1 + 0x44 ], %i5 ! 201d044 <_Per_CPU_Information+0xc> /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 20085e4: c2 0f 60 74 ldub [ %i5 + 0x74 ], %g1 20085e8: 80 a0 60 00 cmp %g1, 0 20085ec: 02 80 00 25 be 2008680 <_Scheduler_priority_Tick+0xa8> 20085f0: 01 00 00 00 nop return; if ( !_States_Is_ready( executing->current_state ) ) 20085f4: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 20085f8: 80 a0 60 00 cmp %g1, 0 20085fc: 12 80 00 21 bne 2008680 <_Scheduler_priority_Tick+0xa8> 2008600: 01 00 00 00 nop /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 2008604: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 2008608: 80 a0 60 01 cmp %g1, 1 200860c: 0a 80 00 14 bcs 200865c <_Scheduler_priority_Tick+0x84> 2008610: 80 a0 60 02 cmp %g1, 2 2008614: 28 80 00 07 bleu,a 2008630 <_Scheduler_priority_Tick+0x58> 2008618: c2 07 60 78 ld [ %i5 + 0x78 ], %g1 200861c: 80 a0 60 03 cmp %g1, 3 2008620: 12 80 00 18 bne 2008680 <_Scheduler_priority_Tick+0xa8> <== NEVER TAKEN 2008624: 01 00 00 00 nop } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 2008628: 10 80 00 0f b 2008664 <_Scheduler_priority_Tick+0x8c> 200862c: c2 07 60 78 ld [ %i5 + 0x78 ], %g1 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 ) { 2008630: 82 00 7f ff add %g1, -1, %g1 2008634: 80 a0 60 00 cmp %g1, 0 2008638: 14 80 00 09 bg 200865c <_Scheduler_priority_Tick+0x84> 200863c: c2 27 60 78 st %g1, [ %i5 + 0x78 ] * always operates on the scheduler that 'owns' the currently executing * thread. */ RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void ) { _Scheduler.Operations.yield(); 2008640: 03 00 80 6f sethi %hi(0x201bc00), %g1 2008644: c2 00 62 80 ld [ %g1 + 0x280 ], %g1 ! 201be80 <_Scheduler+0xc> 2008648: 9f c0 40 00 call %g1 200864c: 01 00 00 00 nop * executing thread's timeslice is reset. Otherwise, the * currently executing thread is placed at the rear of the * FIFO for this priority and a new heir is selected. */ _Scheduler_Yield(); executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 2008650: 03 00 80 72 sethi %hi(0x201c800), %g1 2008654: c2 00 62 64 ld [ %g1 + 0x264 ], %g1 ! 201ca64 <_Thread_Ticks_per_timeslice> 2008658: c2 27 60 78 st %g1, [ %i5 + 0x78 ] 200865c: 81 c7 e0 08 ret 2008660: 81 e8 00 00 restore } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 2008664: 82 00 7f ff add %g1, -1, %g1 2008668: 80 a0 60 00 cmp %g1, 0 200866c: 12 bf ff fc bne 200865c <_Scheduler_priority_Tick+0x84> 2008670: c2 27 60 78 st %g1, [ %i5 + 0x78 ] (*executing->budget_callout)( executing ); 2008674: c2 07 60 80 ld [ %i5 + 0x80 ], %g1 2008678: 9f c0 40 00 call %g1 200867c: 90 10 00 1d mov %i5, %o0 2008680: 81 c7 e0 08 ret 2008684: 81 e8 00 00 restore =============================================================================== 02007154 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 2007154: 9d e3 bf a0 save %sp, -96, %sp uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 2007158: 03 00 80 79 sethi %hi(0x201e400), %g1 (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; 200715c: ba 10 20 00 clr %i5 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) || 2007160: 80 a6 20 00 cmp %i0, 0 2007164: 02 80 00 2b be 2007210 <_TOD_Validate+0xbc> <== NEVER TAKEN 2007168: d2 00 61 18 ld [ %g1 + 0x118 ], %o1 ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 200716c: 11 00 03 d0 sethi %hi(0xf4000), %o0 2007170: 40 00 4a 17 call 20199cc <.udiv> 2007174: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 2007178: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200717c: 80 a0 40 08 cmp %g1, %o0 2007180: 3a 80 00 25 bcc,a 2007214 <_TOD_Validate+0xc0> 2007184: b0 0f 60 01 and %i5, 1, %i0 (the_tod->ticks >= ticks_per_second) || 2007188: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200718c: 80 a0 60 3b cmp %g1, 0x3b 2007190: 38 80 00 21 bgu,a 2007214 <_TOD_Validate+0xc0> 2007194: b0 0f 60 01 and %i5, 1, %i0 (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 2007198: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 200719c: 80 a0 60 3b cmp %g1, 0x3b 20071a0: 38 80 00 1d bgu,a 2007214 <_TOD_Validate+0xc0> 20071a4: b0 0f 60 01 and %i5, 1, %i0 (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 20071a8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 20071ac: 80 a0 60 17 cmp %g1, 0x17 20071b0: 38 80 00 19 bgu,a 2007214 <_TOD_Validate+0xc0> 20071b4: b0 0f 60 01 and %i5, 1, %i0 (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 20071b8: c2 06 20 04 ld [ %i0 + 4 ], %g1 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || 20071bc: 80 a0 60 00 cmp %g1, 0 20071c0: 02 80 00 14 be 2007210 <_TOD_Validate+0xbc> <== NEVER TAKEN 20071c4: 80 a0 60 0c cmp %g1, 0xc (the_tod->month == 0) || 20071c8: 38 80 00 13 bgu,a 2007214 <_TOD_Validate+0xc0> 20071cc: b0 0f 60 01 and %i5, 1, %i0 (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 20071d0: c6 06 00 00 ld [ %i0 ], %g3 (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || 20071d4: 80 a0 e7 c3 cmp %g3, 0x7c3 20071d8: 28 80 00 0f bleu,a 2007214 <_TOD_Validate+0xc0> 20071dc: b0 0f 60 01 and %i5, 1, %i0 (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 20071e0: c4 06 20 08 ld [ %i0 + 8 ], %g2 (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) || 20071e4: 80 a0 a0 00 cmp %g2, 0 20071e8: 02 80 00 0a be 2007210 <_TOD_Validate+0xbc> <== NEVER TAKEN 20071ec: 80 88 e0 03 btst 3, %g3 20071f0: 07 00 80 74 sethi %hi(0x201d000), %g3 (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 20071f4: 12 80 00 03 bne 2007200 <_TOD_Validate+0xac> 20071f8: 86 10 e0 68 or %g3, 0x68, %g3 ! 201d068 <_TOD_Days_per_month> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 20071fc: 82 00 60 0d add %g1, 0xd, %g1 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 2007200: 83 28 60 02 sll %g1, 2, %g1 2007204: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 2007208: 80 a0 40 02 cmp %g1, %g2 200720c: ba 60 3f ff subx %g0, -1, %i5 if ( the_tod->day > days_in_month ) return false; return true; } 2007210: b0 0f 60 01 and %i5, 1, %i0 2007214: 81 c7 e0 08 ret 2007218: 81 e8 00 00 restore =============================================================================== 02008898 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 2008898: 9d e3 bf a0 save %sp, -96, %sp States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 200889c: f8 06 20 10 ld [ %i0 + 0x10 ], %i4 /* * 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 ); 20088a0: 40 00 03 65 call 2009634 <_Thread_Set_transient> 20088a4: 90 10 00 18 mov %i0, %o0 /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 20088a8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 20088ac: 80 a0 40 19 cmp %g1, %i1 20088b0: 02 80 00 05 be 20088c4 <_Thread_Change_priority+0x2c> 20088b4: ba 10 00 18 mov %i0, %i5 _Thread_Set_priority( the_thread, new_priority ); 20088b8: 90 10 00 18 mov %i0, %o0 20088bc: 40 00 03 45 call 20095d0 <_Thread_Set_priority> 20088c0: 92 10 00 19 mov %i1, %o1 _ISR_Disable( level ); 20088c4: 7f ff e6 2e call 200217c 20088c8: 01 00 00 00 nop 20088cc: b6 10 00 08 mov %o0, %i3 /* * 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; 20088d0: f2 07 60 10 ld [ %i5 + 0x10 ], %i1 if ( state != STATES_TRANSIENT ) { 20088d4: 80 a6 60 04 cmp %i1, 4 20088d8: 02 80 00 10 be 2008918 <_Thread_Change_priority+0x80> 20088dc: b8 0f 20 04 and %i4, 4, %i4 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 20088e0: 80 a7 20 00 cmp %i4, 0 20088e4: 12 80 00 03 bne 20088f0 <_Thread_Change_priority+0x58> <== NEVER TAKEN 20088e8: 82 0e 7f fb and %i1, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 20088ec: c2 27 60 10 st %g1, [ %i5 + 0x10 ] _ISR_Enable( level ); 20088f0: 7f ff e6 27 call 200218c 20088f4: 90 10 00 1b mov %i3, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 20088f8: 03 00 00 ef sethi %hi(0x3bc00), %g1 20088fc: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 2008900: 80 8e 40 01 btst %i1, %g1 2008904: 02 80 00 29 be 20089a8 <_Thread_Change_priority+0x110> 2008908: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 200890c: f0 07 60 44 ld [ %i5 + 0x44 ], %i0 2008910: 40 00 03 02 call 2009518 <_Thread_queue_Requeue> 2008914: 93 e8 00 1d restore %g0, %i5, %o1 } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 2008918: 80 a7 20 00 cmp %i4, 0 200891c: 12 80 00 0b bne 2008948 <_Thread_Change_priority+0xb0> <== NEVER TAKEN 2008920: 03 00 80 6f sethi %hi(0x201bc00), %g1 * 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 ); 2008924: c0 27 60 10 clr [ %i5 + 0x10 ] if ( prepend_it ) 2008928: 80 a6 a0 00 cmp %i2, 0 200892c: 02 80 00 04 be 200893c <_Thread_Change_priority+0xa4> 2008930: 82 10 62 74 or %g1, 0x274, %g1 */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 2008934: 10 80 00 03 b 2008940 <_Thread_Change_priority+0xa8> 2008938: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 200893c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 2008940: 9f c0 40 00 call %g1 2008944: 90 10 00 1d mov %i5, %o0 _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 2008948: 7f ff e6 11 call 200218c 200894c: 90 10 00 1b mov %i3, %o0 2008950: 7f ff e6 0b call 200217c 2008954: 01 00 00 00 nop 2008958: b0 10 00 08 mov %o0, %i0 * This kernel routine implements the scheduling decision logic for * the scheduler. It does NOT dispatch. */ RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void ) { _Scheduler.Operations.schedule(); 200895c: 03 00 80 6f sethi %hi(0x201bc00), %g1 2008960: c2 00 62 7c ld [ %g1 + 0x27c ], %g1 ! 201be7c <_Scheduler+0x8> 2008964: 9f c0 40 00 call %g1 2008968: 01 00 00 00 nop * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 200896c: 03 00 80 74 sethi %hi(0x201d000), %g1 2008970: 82 10 60 38 or %g1, 0x38, %g1 ! 201d038 <_Per_CPU_Information> 2008974: c4 00 60 0c ld [ %g1 + 0xc ], %g2 * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Scheduler_Schedule(); if ( !_Thread_Is_executing_also_the_heir() && 2008978: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 200897c: 80 a0 80 03 cmp %g2, %g3 2008980: 02 80 00 08 be 20089a0 <_Thread_Change_priority+0x108> 2008984: 01 00 00 00 nop 2008988: c4 08 a0 74 ldub [ %g2 + 0x74 ], %g2 200898c: 80 a0 a0 00 cmp %g2, 0 2008990: 02 80 00 04 be 20089a0 <_Thread_Change_priority+0x108> 2008994: 01 00 00 00 nop _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 2008998: 84 10 20 01 mov 1, %g2 ! 1 200899c: c4 28 60 18 stb %g2, [ %g1 + 0x18 ] _ISR_Enable( level ); 20089a0: 7f ff e5 fb call 200218c 20089a4: 81 e8 00 00 restore 20089a8: 81 c7 e0 08 ret 20089ac: 81 e8 00 00 restore =============================================================================== 02008b9c <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 2008b9c: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 2008ba0: 90 10 00 18 mov %i0, %o0 2008ba4: 40 00 00 71 call 2008d68 <_Thread_Get> 2008ba8: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2008bac: c2 07 bf fc ld [ %fp + -4 ], %g1 2008bb0: 80 a0 60 00 cmp %g1, 0 2008bb4: 12 80 00 09 bne 2008bd8 <_Thread_Delay_ended+0x3c> <== NEVER TAKEN 2008bb8: 13 04 00 00 sethi %hi(0x10000000), %o1 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 2008bbc: 7f ff ff 7d call 20089b0 <_Thread_Clear_state> 2008bc0: 92 12 60 18 or %o1, 0x18, %o1 ! 10000018 * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 2008bc4: 03 00 80 72 sethi %hi(0x201c800), %g1 2008bc8: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 201cb00 <_Thread_Dispatch_disable_level> 2008bcc: 84 00 bf ff add %g2, -1, %g2 2008bd0: c4 20 63 00 st %g2, [ %g1 + 0x300 ] return _Thread_Dispatch_disable_level; 2008bd4: c2 00 63 00 ld [ %g1 + 0x300 ], %g1 2008bd8: 81 c7 e0 08 ret 2008bdc: 81 e8 00 00 restore =============================================================================== 02008be0 <_Thread_Dispatch>: * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 2008be0: 9d e3 bf 90 save %sp, -112, %sp * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 2008be4: 03 00 80 72 sethi %hi(0x201c800), %g1 2008be8: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 201cb00 <_Thread_Dispatch_disable_level> 2008bec: 84 00 a0 01 inc %g2 2008bf0: c4 20 63 00 st %g2, [ %g1 + 0x300 ] return _Thread_Dispatch_disable_level; 2008bf4: c2 00 63 00 ld [ %g1 + 0x300 ], %g1 #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; 2008bf8: 33 00 80 74 sethi %hi(0x201d000), %i1 2008bfc: b4 16 60 38 or %i1, 0x38, %i2 ! 201d038 <_Per_CPU_Information> _ISR_Disable( level ); 2008c00: 7f ff e5 5f call 200217c 2008c04: fa 06 a0 0c ld [ %i2 + 0xc ], %i5 #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; 2008c08: 21 00 80 72 sethi %hi(0x201c800), %l0 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 2008c0c: b4 06 a0 1c add %i2, 0x1c, %i2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2008c10: 31 00 80 72 sethi %hi(0x201c800), %i0 /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 2008c14: 10 80 00 38 b 2008cf4 <_Thread_Dispatch+0x114> 2008c18: 37 00 80 72 sethi %hi(0x201c800), %i3 heir = _Thread_Heir; _Thread_Dispatch_necessary = false; 2008c1c: c0 28 60 18 clrb [ %g1 + 0x18 ] /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 2008c20: 80 a7 00 1d cmp %i4, %i5 2008c24: 02 80 00 39 be 2008d08 <_Thread_Dispatch+0x128> 2008c28: f8 20 60 0c st %i4, [ %g1 + 0xc ] */ #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 ) 2008c2c: c2 07 20 7c ld [ %i4 + 0x7c ], %g1 2008c30: 80 a0 60 01 cmp %g1, 1 2008c34: 12 80 00 03 bne 2008c40 <_Thread_Dispatch+0x60> 2008c38: c2 04 22 64 ld [ %l0 + 0x264 ], %g1 heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 2008c3c: c2 27 20 78 st %g1, [ %i4 + 0x78 ] _ISR_Enable( level ); 2008c40: 7f ff e5 53 call 200218c 2008c44: 01 00 00 00 nop #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 2008c48: 40 00 0e d0 call 200c788 <_TOD_Get_uptime> 2008c4c: 90 07 bf f0 add %fp, -16, %o0 _Timestamp_Subtract( 2008c50: 90 10 00 1a mov %i2, %o0 2008c54: 92 07 bf f0 add %fp, -16, %o1 2008c58: 40 00 02 f0 call 2009818 <_Timespec_Subtract> 2008c5c: 94 07 bf f8 add %fp, -8, %o2 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 2008c60: 90 07 60 84 add %i5, 0x84, %o0 2008c64: 40 00 02 d4 call 20097b4 <_Timespec_Add_to> 2008c68: 92 07 bf f8 add %fp, -8, %o1 _Thread_Time_of_last_context_switch = uptime; 2008c6c: c4 07 bf f0 ld [ %fp + -16 ], %g2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2008c70: c2 06 23 88 ld [ %i0 + 0x388 ], %g1 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 2008c74: c4 26 80 00 st %g2, [ %i2 ] 2008c78: c4 07 bf f4 ld [ %fp + -12 ], %g2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2008c7c: 80 a0 60 00 cmp %g1, 0 2008c80: 02 80 00 06 be 2008c98 <_Thread_Dispatch+0xb8> <== NEVER TAKEN 2008c84: c4 26 a0 04 st %g2, [ %i2 + 4 ] executing->libc_reent = *_Thread_libc_reent; 2008c88: c4 00 40 00 ld [ %g1 ], %g2 2008c8c: c4 27 61 54 st %g2, [ %i5 + 0x154 ] *_Thread_libc_reent = heir->libc_reent; 2008c90: c4 07 21 54 ld [ %i4 + 0x154 ], %g2 2008c94: c4 20 40 00 st %g2, [ %g1 ] } _User_extensions_Thread_switch( executing, heir ); 2008c98: 90 10 00 1d mov %i5, %o0 2008c9c: 40 00 03 8d call 2009ad0 <_User_extensions_Thread_switch> 2008ca0: 92 10 00 1c mov %i4, %o1 if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 2008ca4: 90 07 60 c8 add %i5, 0xc8, %o0 2008ca8: 40 00 04 b3 call 2009f74 <_CPU_Context_switch> 2008cac: 92 07 20 c8 add %i4, 0xc8, %o1 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 2008cb0: c2 07 61 50 ld [ %i5 + 0x150 ], %g1 2008cb4: 80 a0 60 00 cmp %g1, 0 2008cb8: 02 80 00 0c be 2008ce8 <_Thread_Dispatch+0x108> 2008cbc: d0 06 e3 84 ld [ %i3 + 0x384 ], %o0 2008cc0: 80 a7 40 08 cmp %i5, %o0 2008cc4: 02 80 00 09 be 2008ce8 <_Thread_Dispatch+0x108> 2008cc8: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 2008ccc: 02 80 00 04 be 2008cdc <_Thread_Dispatch+0xfc> 2008cd0: 01 00 00 00 nop _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 2008cd4: 40 00 04 6e call 2009e8c <_CPU_Context_save_fp> 2008cd8: 90 02 21 50 add %o0, 0x150, %o0 _Context_Restore_fp( &executing->fp_context ); 2008cdc: 40 00 04 89 call 2009f00 <_CPU_Context_restore_fp> 2008ce0: 90 07 61 50 add %i5, 0x150, %o0 _Thread_Allocated_fp = executing; 2008ce4: fa 26 e3 84 st %i5, [ %i3 + 0x384 ] if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 2008ce8: 82 16 60 38 or %i1, 0x38, %g1 _ISR_Disable( level ); 2008cec: 7f ff e5 24 call 200217c 2008cf0: fa 00 60 0c ld [ %g1 + 0xc ], %i5 /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 2008cf4: 82 16 60 38 or %i1, 0x38, %g1 2008cf8: c4 08 60 18 ldub [ %g1 + 0x18 ], %g2 2008cfc: 80 a0 a0 00 cmp %g2, 0 2008d00: 32 bf ff c7 bne,a 2008c1c <_Thread_Dispatch+0x3c> 2008d04: f8 00 60 10 ld [ %g1 + 0x10 ], %i4 _ISR_Disable( level ); } post_switch: _ISR_Enable( level ); 2008d08: 7f ff e5 21 call 200218c 2008d0c: 01 00 00 00 nop * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 2008d10: 03 00 80 72 sethi %hi(0x201c800), %g1 2008d14: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 201cb00 <_Thread_Dispatch_disable_level> 2008d18: 84 00 bf ff add %g2, -1, %g2 2008d1c: c4 20 63 00 st %g2, [ %g1 + 0x300 ] return _Thread_Dispatch_disable_level; 2008d20: c2 00 63 00 ld [ %g1 + 0x300 ], %g1 _Thread_Unnest_dispatch(); _API_extensions_Run_postswitch(); 2008d24: 7f ff f8 31 call 2006de8 <_API_extensions_Run_postswitch> 2008d28: 01 00 00 00 nop } 2008d2c: 81 c7 e0 08 ret 2008d30: 81 e8 00 00 restore =============================================================================== 0200e8f0 <_Thread_Handler>: * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { 200e8f0: 9d e3 bf a0 save %sp, -96, %sp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; 200e8f4: 03 00 80 74 sethi %hi(0x201d000), %g1 200e8f8: fa 00 60 44 ld [ %g1 + 0x44 ], %i5 ! 201d044 <_Per_CPU_Information+0xc> /* * Some CPUs need to tinker with the call frame or registers when the * thread actually begins to execute for the first time. This is a * hook point where the port gets a shot at doing whatever it requires. */ _Context_Initialization_at_thread_begin(); 200e8fc: 3f 00 80 3a sethi %hi(0x200e800), %i7 200e900: be 17 e0 f0 or %i7, 0xf0, %i7 ! 200e8f0 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 200e904: d0 07 60 ac ld [ %i5 + 0xac ], %o0 _ISR_Set_level(level); 200e908: 7f ff ce 21 call 200218c 200e90c: 91 2a 20 08 sll %o0, 8, %o0 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; 200e910: 03 00 80 71 sethi %hi(0x201c400), %g1 doneConstructors = true; 200e914: 84 10 20 01 mov 1, %g2 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; 200e918: f8 08 63 bc ldub [ %g1 + 0x3bc ], %i4 doneConstructors = true; 200e91c: c4 28 63 bc stb %g2, [ %g1 + 0x3bc ] #endif #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 200e920: c2 07 61 50 ld [ %i5 + 0x150 ], %g1 200e924: 80 a0 60 00 cmp %g1, 0 200e928: 02 80 00 0c be 200e958 <_Thread_Handler+0x68> 200e92c: 03 00 80 72 sethi %hi(0x201c800), %g1 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 200e930: d0 00 63 84 ld [ %g1 + 0x384 ], %o0 ! 201cb84 <_Thread_Allocated_fp> 200e934: 80 a7 40 08 cmp %i5, %o0 200e938: 02 80 00 08 be 200e958 <_Thread_Handler+0x68> 200e93c: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 200e940: 22 80 00 06 be,a 200e958 <_Thread_Handler+0x68> 200e944: fa 20 63 84 st %i5, [ %g1 + 0x384 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200e948: 7f ff ed 51 call 2009e8c <_CPU_Context_save_fp> 200e94c: 90 02 21 50 add %o0, 0x150, %o0 _Thread_Allocated_fp = executing; 200e950: 03 00 80 72 sethi %hi(0x201c800), %g1 200e954: fa 20 63 84 st %i5, [ %g1 + 0x384 ] ! 201cb84 <_Thread_Allocated_fp> /* * 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 ); 200e958: 7f ff eb ef call 2009914 <_User_extensions_Thread_begin> 200e95c: 90 10 00 1d mov %i5, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 200e960: 7f ff e8 f5 call 2008d34 <_Thread_Enable_dispatch> 200e964: 01 00 00 00 nop /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (doCons) /* && (volatile void *)_init) */ { 200e968: 80 8f 20 ff btst 0xff, %i4 200e96c: 32 80 00 05 bne,a 200e980 <_Thread_Handler+0x90> 200e970: c2 07 60 94 ld [ %i5 + 0x94 ], %g1 INIT_NAME (); 200e974: 40 00 34 f7 call 201bd50 <_init> 200e978: 01 00 00 00 nop _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 200e97c: c2 07 60 94 ld [ %i5 + 0x94 ], %g1 200e980: 80 a0 60 00 cmp %g1, 0 200e984: 12 80 00 05 bne 200e998 <_Thread_Handler+0xa8> 200e988: 80 a0 60 01 cmp %g1, 1 executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 200e98c: c2 07 60 90 ld [ %i5 + 0x90 ], %g1 200e990: 10 80 00 06 b 200e9a8 <_Thread_Handler+0xb8> 200e994: d0 07 60 9c ld [ %i5 + 0x9c ], %o0 executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 200e998: 12 80 00 07 bne 200e9b4 <_Thread_Handler+0xc4> <== NEVER TAKEN 200e99c: 01 00 00 00 nop executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 200e9a0: c2 07 60 90 ld [ %i5 + 0x90 ], %g1 200e9a4: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 200e9a8: 9f c0 40 00 call %g1 200e9ac: 01 00 00 00 nop executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 200e9b0: d0 27 60 28 st %o0, [ %i5 + 0x28 ] * 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 ); 200e9b4: 7f ff eb e9 call 2009958 <_User_extensions_Thread_exitted> 200e9b8: 90 10 00 1d mov %i5, %o0 _Internal_error_Occurred( 200e9bc: 90 10 20 00 clr %o0 200e9c0: 92 10 20 01 mov 1, %o1 200e9c4: 7f ff e3 b2 call 200788c <_Internal_error_Occurred> 200e9c8: 94 10 20 05 mov 5, %o2 =============================================================================== 02008e18 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 2008e18: 9d e3 bf a0 save %sp, -96, %sp 2008e1c: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 2008e20: c0 26 61 58 clr [ %i1 + 0x158 ] 2008e24: c0 26 61 5c clr [ %i1 + 0x15c ] extensions_area = NULL; the_thread->libc_reent = NULL; 2008e28: c0 26 61 54 clr [ %i1 + 0x154 ] Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 2008e2c: e0 07 a0 60 ld [ %fp + 0x60 ], %l0 2008e30: e2 00 40 00 ld [ %g1 ], %l1 if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 2008e34: 80 a6 a0 00 cmp %i2, 0 2008e38: 12 80 00 0d bne 2008e6c <_Thread_Initialize+0x54> 2008e3c: e4 0f a0 5f ldub [ %fp + 0x5f ], %l2 actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 2008e40: 90 10 00 19 mov %i1, %o0 2008e44: 40 00 02 0b call 2009670 <_Thread_Stack_Allocate> 2008e48: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 2008e4c: 80 a2 00 1b cmp %o0, %i3 2008e50: 0a 80 00 6a bcs 2008ff8 <_Thread_Initialize+0x1e0> 2008e54: 80 a2 20 00 cmp %o0, 0 2008e58: 02 80 00 68 be 2008ff8 <_Thread_Initialize+0x1e0> <== NEVER TAKEN 2008e5c: 82 10 20 01 mov 1, %g1 return false; /* stack allocation failed */ stack = the_thread->Start.stack; 2008e60: f4 06 60 c4 ld [ %i1 + 0xc4 ], %i2 the_thread->Start.core_allocated_stack = true; 2008e64: 10 80 00 04 b 2008e74 <_Thread_Initialize+0x5c> 2008e68: c2 2e 60 b4 stb %g1, [ %i1 + 0xb4 ] } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 2008e6c: c0 2e 60 b4 clrb [ %i1 + 0xb4 ] 2008e70: 90 10 00 1b mov %i3, %o0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 2008e74: f4 26 60 bc st %i2, [ %i1 + 0xbc ] the_stack->size = size; 2008e78: d0 26 60 b8 st %o0, [ %i1 + 0xb8 ] /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 2008e7c: 80 a7 20 00 cmp %i4, 0 2008e80: 02 80 00 07 be 2008e9c <_Thread_Initialize+0x84> 2008e84: b6 10 20 00 clr %i3 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 2008e88: 40 00 03 e5 call 2009e1c <_Workspace_Allocate> 2008e8c: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) 2008e90: b6 92 20 00 orcc %o0, 0, %i3 2008e94: 02 80 00 4a be 2008fbc <_Thread_Initialize+0x1a4> 2008e98: b8 10 20 00 clr %i4 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2008e9c: 03 00 80 72 sethi %hi(0x201c800), %g1 2008ea0: d0 00 63 94 ld [ %g1 + 0x394 ], %o0 ! 201cb94 <_Thread_Maximum_extensions> 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; 2008ea4: f6 26 61 50 st %i3, [ %i1 + 0x150 ] the_thread->Start.fp_context = fp_area; 2008ea8: f6 26 60 c0 st %i3, [ %i1 + 0xc0 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2008eac: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 2008eb0: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 2008eb4: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 2008eb8: c0 26 60 6c clr [ %i1 + 0x6c ] #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2008ebc: 80 a2 20 00 cmp %o0, 0 2008ec0: 02 80 00 08 be 2008ee0 <_Thread_Initialize+0xc8> 2008ec4: b8 10 20 00 clr %i4 extensions_area = _Workspace_Allocate( 2008ec8: 90 02 20 01 inc %o0 2008ecc: 40 00 03 d4 call 2009e1c <_Workspace_Allocate> 2008ed0: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 2008ed4: b8 92 20 00 orcc %o0, 0, %i4 2008ed8: 02 80 00 3a be 2008fc0 <_Thread_Initialize+0x1a8> 2008edc: b4 10 20 00 clr %i2 * 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 ) { 2008ee0: 80 a7 20 00 cmp %i4, 0 2008ee4: 02 80 00 0c be 2008f14 <_Thread_Initialize+0xfc> 2008ee8: f8 26 61 60 st %i4, [ %i1 + 0x160 ] for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 2008eec: 03 00 80 72 sethi %hi(0x201c800), %g1 2008ef0: c4 00 63 94 ld [ %g1 + 0x394 ], %g2 ! 201cb94 <_Thread_Maximum_extensions> 2008ef4: 10 80 00 05 b 2008f08 <_Thread_Initialize+0xf0> 2008ef8: 82 10 20 00 clr %g1 the_thread->extensions[i] = NULL; 2008efc: 87 28 60 02 sll %g1, 2, %g3 * 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++ ) 2008f00: 82 00 60 01 inc %g1 the_thread->extensions[i] = NULL; 2008f04: c0 21 00 03 clr [ %g4 + %g3 ] * 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++ ) 2008f08: 80 a0 40 02 cmp %g1, %g2 2008f0c: 28 bf ff fc bleu,a 2008efc <_Thread_Initialize+0xe4> 2008f10: c8 06 61 60 ld [ %i1 + 0x160 ], %g4 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 2008f14: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 2008f18: e4 2e 60 a0 stb %l2, [ %i1 + 0xa0 ] the_thread->Start.budget_algorithm = budget_algorithm; 2008f1c: e0 26 60 a4 st %l0, [ %i1 + 0xa4 ] the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { 2008f20: 80 a4 20 02 cmp %l0, 2 2008f24: 12 80 00 05 bne 2008f38 <_Thread_Initialize+0x120> 2008f28: c2 26 60 a8 st %g1, [ %i1 + 0xa8 ] 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; 2008f2c: 03 00 80 72 sethi %hi(0x201c800), %g1 2008f30: c2 00 62 64 ld [ %g1 + 0x264 ], %g1 ! 201ca64 <_Thread_Ticks_per_timeslice> 2008f34: c2 26 60 78 st %g1, [ %i1 + 0x78 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 2008f38: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 2008f3c: c0 26 60 44 clr [ %i1 + 0x44 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 2008f40: c2 26 60 ac st %g1, [ %i1 + 0xac ] the_thread->current_state = STATES_DORMANT; 2008f44: 82 10 20 01 mov 1, %g1 2008f48: c2 26 60 10 st %g1, [ %i1 + 0x10 ] */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); 2008f4c: 03 00 80 6f sethi %hi(0x201bc00), %g1 2008f50: c2 00 62 8c ld [ %g1 + 0x28c ], %g1 ! 201be8c <_Scheduler+0x18> the_thread->Wait.queue = NULL; the_thread->resource_count = 0; 2008f54: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->real_priority = priority; 2008f58: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; 2008f5c: fa 26 60 b0 st %i5, [ %i1 + 0xb0 ] 2008f60: 9f c0 40 00 call %g1 2008f64: 90 10 00 19 mov %i1, %o0 sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 2008f68: b4 92 20 00 orcc %o0, 0, %i2 2008f6c: 02 80 00 15 be 2008fc0 <_Thread_Initialize+0x1a8> 2008f70: 90 10 00 19 mov %i1, %o0 goto failed; _Thread_Set_priority( the_thread, priority ); 2008f74: 40 00 01 97 call 20095d0 <_Thread_Set_priority> 2008f78: 92 10 00 1d mov %i5, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2008f7c: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 2008f80: c2 16 60 0a lduh [ %i1 + 0xa ], %g1 /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 2008f84: c0 26 60 84 clr [ %i1 + 0x84 ] 2008f88: c0 26 60 88 clr [ %i1 + 0x88 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2008f8c: 83 28 60 02 sll %g1, 2, %g1 2008f90: f2 20 80 01 st %i1, [ %g2 + %g1 ] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2008f94: e2 26 60 0c st %l1, [ %i1 + 0xc ] * 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 ); 2008f98: 90 10 00 19 mov %i1, %o0 2008f9c: 40 00 02 90 call 20099dc <_User_extensions_Thread_create> 2008fa0: b0 10 20 01 mov 1, %i0 if ( extension_status ) 2008fa4: 80 8a 20 ff btst 0xff, %o0 2008fa8: 02 80 00 06 be 2008fc0 <_Thread_Initialize+0x1a8> 2008fac: 01 00 00 00 nop 2008fb0: b0 0e 20 01 and %i0, 1, %i0 2008fb4: 81 c7 e0 08 ret 2008fb8: 81 e8 00 00 restore size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; 2008fbc: b4 10 20 00 clr %i2 extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: _Workspace_Free( the_thread->libc_reent ); 2008fc0: 40 00 03 9f call 2009e3c <_Workspace_Free> 2008fc4: d0 06 61 54 ld [ %i1 + 0x154 ], %o0 for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 2008fc8: 40 00 03 9d call 2009e3c <_Workspace_Free> 2008fcc: d0 06 61 58 ld [ %i1 + 0x158 ], %o0 2008fd0: 40 00 03 9b call 2009e3c <_Workspace_Free> 2008fd4: d0 06 61 5c ld [ %i1 + 0x15c ], %o0 _Workspace_Free( extensions_area ); 2008fd8: 40 00 03 99 call 2009e3c <_Workspace_Free> 2008fdc: 90 10 00 1c mov %i4, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 2008fe0: 40 00 03 97 call 2009e3c <_Workspace_Free> 2008fe4: 90 10 00 1b mov %i3, %o0 #endif _Workspace_Free( sched ); 2008fe8: 40 00 03 95 call 2009e3c <_Workspace_Free> 2008fec: 90 10 00 1a mov %i2, %o0 _Thread_Stack_Free( the_thread ); 2008ff0: 40 00 01 b7 call 20096cc <_Thread_Stack_Free> 2008ff4: 90 10 00 19 mov %i1, %o0 stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ 2008ff8: b0 10 20 00 clr %i0 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 2008ffc: b0 0e 20 01 and %i0, 1, %i0 2009000: 81 c7 e0 08 ret 2009004: 81 e8 00 00 restore =============================================================================== 020096cc <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 20096cc: 9d e3 bf a0 save %sp, -96, %sp #if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 20096d0: c2 0e 20 b4 ldub [ %i0 + 0xb4 ], %g1 20096d4: 80 a0 60 00 cmp %g1, 0 20096d8: 02 80 00 0d be 200970c <_Thread_Stack_Free+0x40> <== NEVER TAKEN 20096dc: 01 00 00 00 nop * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) 20096e0: 03 00 80 6f sethi %hi(0x201bc00), %g1 20096e4: c2 00 61 b0 ld [ %g1 + 0x1b0 ], %g1 ! 201bdb0 20096e8: 80 a0 60 00 cmp %g1, 0 20096ec: 02 80 00 06 be 2009704 <_Thread_Stack_Free+0x38> 20096f0: d0 06 20 bc ld [ %i0 + 0xbc ], %o0 (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 20096f4: 9f c0 40 00 call %g1 20096f8: 01 00 00 00 nop 20096fc: 81 c7 e0 08 ret 2009700: 81 e8 00 00 restore else _Workspace_Free( the_thread->Start.Initial_stack.area ); 2009704: 40 00 01 ce call 2009e3c <_Workspace_Free> 2009708: 91 e8 00 08 restore %g0, %o0, %o0 200970c: 81 c7 e0 08 ret <== NOT EXECUTED 2009710: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02009518 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 2009518: 9d e3 bf 98 save %sp, -104, %sp /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 200951c: 80 a6 20 00 cmp %i0, 0 2009520: 02 80 00 19 be 2009584 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 2009524: 01 00 00 00 nop /* * 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 ) { 2009528: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 200952c: 80 a7 20 01 cmp %i4, 1 2009530: 12 80 00 15 bne 2009584 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 2009534: 01 00 00 00 nop Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 2009538: 7f ff e3 11 call 200217c 200953c: 01 00 00 00 nop 2009540: ba 10 00 08 mov %o0, %i5 2009544: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 2009548: 03 00 00 ef sethi %hi(0x3bc00), %g1 200954c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 2009550: 80 88 80 01 btst %g2, %g1 2009554: 02 80 00 0a be 200957c <_Thread_queue_Requeue+0x64> <== NEVER TAKEN 2009558: 90 10 00 18 mov %i0, %o0 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 200955c: 92 10 00 19 mov %i1, %o1 2009560: 94 10 20 01 mov 1, %o2 2009564: 40 00 0d f8 call 200cd44 <_Thread_queue_Extract_priority_helper> 2009568: f8 26 20 30 st %i4, [ %i0 + 0x30 ] (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 200956c: 90 10 00 18 mov %i0, %o0 2009570: 92 10 00 19 mov %i1, %o1 2009574: 7f ff ff 50 call 20092b4 <_Thread_queue_Enqueue_priority> 2009578: 94 07 bf fc add %fp, -4, %o2 } _ISR_Enable( level ); 200957c: 7f ff e3 04 call 200218c 2009580: 90 10 00 1d mov %i5, %o0 2009584: 81 c7 e0 08 ret 2009588: 81 e8 00 00 restore =============================================================================== 0200958c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 200958c: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 2009590: 90 10 00 18 mov %i0, %o0 2009594: 7f ff fd f5 call 2008d68 <_Thread_Get> 2009598: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 200959c: c2 07 bf fc ld [ %fp + -4 ], %g1 20095a0: 80 a0 60 00 cmp %g1, 0 20095a4: 12 80 00 09 bne 20095c8 <_Thread_queue_Timeout+0x3c> <== NEVER TAKEN 20095a8: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 20095ac: 40 00 0e 1d call 200ce20 <_Thread_queue_Process_timeout> 20095b0: 01 00 00 00 nop * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 20095b4: 03 00 80 72 sethi %hi(0x201c800), %g1 20095b8: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 201cb00 <_Thread_Dispatch_disable_level> 20095bc: 84 00 bf ff add %g2, -1, %g2 20095c0: c4 20 63 00 st %g2, [ %g1 + 0x300 ] return _Thread_Dispatch_disable_level; 20095c4: c2 00 63 00 ld [ %g1 + 0x300 ], %g1 20095c8: 81 c7 e0 08 ret 20095cc: 81 e8 00 00 restore =============================================================================== 020171e4 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 20171e4: 9d e3 bf 88 save %sp, -120, %sp static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 20171e8: 27 00 80 ee sethi %hi(0x203b800), %l3 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 20171ec: a8 07 bf e8 add %fp, -24, %l4 20171f0: a4 07 bf ec add %fp, -20, %l2 20171f4: b6 07 bf f4 add %fp, -12, %i3 20171f8: b4 07 bf f8 add %fp, -8, %i2 20171fc: e4 27 bf e8 st %l2, [ %fp + -24 ] head->previous = NULL; 2017200: c0 27 bf ec clr [ %fp + -20 ] tail->previous = head; 2017204: e8 27 bf f0 st %l4, [ %fp + -16 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 2017208: f4 27 bf f4 st %i2, [ %fp + -12 ] head->previous = NULL; 201720c: c0 27 bf f8 clr [ %fp + -8 ] tail->previous = head; 2017210: f6 27 bf fc st %i3, [ %fp + -4 ] */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2017214: b2 06 20 30 add %i0, 0x30, %i1 /* * 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 ); 2017218: b8 06 20 68 add %i0, 0x68, %i4 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 201721c: a2 06 20 08 add %i0, 8, %l1 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 2017220: a0 06 20 40 add %i0, 0x40, %l0 { /* * 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; 2017224: e8 26 20 78 st %l4, [ %i0 + 0x78 ] static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 2017228: 2b 00 80 ee sethi %hi(0x203b800), %l5 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 201722c: c2 04 e0 cc ld [ %l3 + 0xcc ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 2017230: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2017234: 94 10 00 1b mov %i3, %o2 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 2017238: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 201723c: 90 10 00 19 mov %i1, %o0 2017240: 40 00 11 fa call 201ba28 <_Watchdog_Adjust_to_chain> 2017244: 92 20 40 09 sub %g1, %o1, %o1 Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 2017248: d4 06 20 74 ld [ %i0 + 0x74 ], %o2 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 201724c: fa 05 60 4c ld [ %l5 + 0x4c ], %i5 /* * 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 ) { 2017250: 80 a7 40 0a cmp %i5, %o2 2017254: 08 80 00 06 bleu 201726c <_Timer_server_Body+0x88> 2017258: 92 27 40 0a sub %i5, %o2, %o1 /* * 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 ); 201725c: 90 10 00 1c mov %i4, %o0 2017260: 40 00 11 f2 call 201ba28 <_Watchdog_Adjust_to_chain> 2017264: 94 10 00 1b mov %i3, %o2 2017268: 30 80 00 06 b,a 2017280 <_Timer_server_Body+0x9c> } else if ( snapshot < last_snapshot ) { 201726c: 1a 80 00 05 bcc 2017280 <_Timer_server_Body+0x9c> 2017270: 90 10 00 1c mov %i4, %o0 /* * 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 ); 2017274: 92 10 20 01 mov 1, %o1 2017278: 40 00 11 c5 call 201b98c <_Watchdog_Adjust> 201727c: 94 22 80 1d sub %o2, %i5, %o2 } watchdogs->last_snapshot = snapshot; 2017280: fa 26 20 74 st %i5, [ %i0 + 0x74 ] } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 2017284: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 2017288: 40 00 02 d9 call 2017dec <_Chain_Get> 201728c: 01 00 00 00 nop if ( timer == NULL ) { 2017290: 92 92 20 00 orcc %o0, 0, %o1 2017294: 02 80 00 0c be 20172c4 <_Timer_server_Body+0xe0> 2017298: 01 00 00 00 nop static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 201729c: c2 02 60 38 ld [ %o1 + 0x38 ], %g1 20172a0: 80 a0 60 01 cmp %g1, 1 20172a4: 02 80 00 05 be 20172b8 <_Timer_server_Body+0xd4> 20172a8: 90 10 00 19 mov %i1, %o0 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 20172ac: 80 a0 60 03 cmp %g1, 3 20172b0: 12 bf ff f5 bne 2017284 <_Timer_server_Body+0xa0> <== NEVER TAKEN 20172b4: 90 10 00 1c mov %i4, %o0 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 20172b8: 40 00 12 0e call 201baf0 <_Watchdog_Insert> 20172bc: 92 02 60 10 add %o1, 0x10, %o1 20172c0: 30 bf ff f1 b,a 2017284 <_Timer_server_Body+0xa0> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 20172c4: 7f ff e3 7f call 20100c0 20172c8: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 20172cc: c2 07 bf e8 ld [ %fp + -24 ], %g1 20172d0: 80 a0 40 12 cmp %g1, %l2 20172d4: 12 80 00 0a bne 20172fc <_Timer_server_Body+0x118> <== NEVER TAKEN 20172d8: 01 00 00 00 nop ts->insert_chain = NULL; 20172dc: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 20172e0: 7f ff e3 7c call 20100d0 20172e4: 01 00 00 00 nop _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 ) ) { 20172e8: c2 07 bf f4 ld [ %fp + -12 ], %g1 20172ec: 80 a0 40 1a cmp %g1, %i2 20172f0: 12 80 00 06 bne 2017308 <_Timer_server_Body+0x124> 20172f4: 01 00 00 00 nop 20172f8: 30 80 00 18 b,a 2017358 <_Timer_server_Body+0x174> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 20172fc: 7f ff e3 75 call 20100d0 <== NOT EXECUTED 2017300: 01 00 00 00 nop <== NOT EXECUTED 2017304: 30 bf ff ca b,a 201722c <_Timer_server_Body+0x48> <== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 2017308: 7f ff e3 6e call 20100c0 201730c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 2017310: fa 07 bf f4 ld [ %fp + -12 ], %i5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 2017314: 80 a7 40 1a cmp %i5, %i2 2017318: 02 80 00 0d be 201734c <_Timer_server_Body+0x168> 201731c: 01 00 00 00 nop Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 2017320: c2 07 40 00 ld [ %i5 ], %g1 head->next = new_first; new_first->previous = head; 2017324: f6 20 60 04 st %i3, [ %g1 + 4 ] { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; 2017328: c2 27 bf f4 st %g1, [ %fp + -12 ] watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 201732c: c0 27 60 08 clr [ %i5 + 8 ] _ISR_Enable( level ); 2017330: 7f ff e3 68 call 20100d0 2017334: 01 00 00 00 nop /* * 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 ); 2017338: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 201733c: d0 07 60 20 ld [ %i5 + 0x20 ], %o0 2017340: 9f c0 40 00 call %g1 2017344: d2 07 60 24 ld [ %i5 + 0x24 ], %o1 } 2017348: 30 bf ff f0 b,a 2017308 <_Timer_server_Body+0x124> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 201734c: 7f ff e3 61 call 20100d0 2017350: 01 00 00 00 nop 2017354: 30 bf ff b4 b,a 2017224 <_Timer_server_Body+0x40> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 2017358: c0 2e 20 7c clrb [ %i0 + 0x7c ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); 201735c: 7f ff ff 73 call 2017128 <_Thread_Disable_dispatch> 2017360: 01 00 00 00 nop _Thread_Set_state( ts->thread, STATES_DELAYING ); 2017364: d0 06 00 00 ld [ %i0 ], %o0 2017368: 40 00 10 0f call 201b3a4 <_Thread_Set_state> 201736c: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 2017370: 7f ff ff 75 call 2017144 <_Timer_server_Reset_interval_system_watchdog> 2017374: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 2017378: 7f ff ff 87 call 2017194 <_Timer_server_Reset_tod_system_watchdog> 201737c: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 2017380: 40 00 0d b7 call 201aa5c <_Thread_Enable_dispatch> 2017384: 01 00 00 00 nop ts->active = true; 2017388: 82 10 20 01 mov 1, %g1 ! 1 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 201738c: 90 10 00 11 mov %l1, %o0 _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; 2017390: c2 2e 20 7c stb %g1, [ %i0 + 0x7c ] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 2017394: 40 00 12 31 call 201bc58 <_Watchdog_Remove> 2017398: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 201739c: 40 00 12 2f call 201bc58 <_Watchdog_Remove> 20173a0: 90 10 00 10 mov %l0, %o0 20173a4: 30 bf ff a0 b,a 2017224 <_Timer_server_Body+0x40> =============================================================================== 020173a8 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 20173a8: 9d e3 bf a0 save %sp, -96, %sp if ( ts->insert_chain == NULL ) { 20173ac: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 20173b0: 80 a0 60 00 cmp %g1, 0 20173b4: 12 80 00 49 bne 20174d8 <_Timer_server_Schedule_operation_method+0x130> 20173b8: ba 10 00 19 mov %i1, %i5 * is the reference point for the delta chain. Thus if we do not update the * reference point we have to add DT to the initial delta of the watchdog * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); 20173bc: 7f ff ff 5b call 2017128 <_Thread_Disable_dispatch> 20173c0: 01 00 00 00 nop if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 20173c4: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 20173c8: 80 a0 60 01 cmp %g1, 1 20173cc: 12 80 00 1f bne 2017448 <_Timer_server_Schedule_operation_method+0xa0> 20173d0: 80 a0 60 03 cmp %g1, 3 /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 20173d4: 7f ff e3 3b call 20100c0 20173d8: 01 00 00 00 nop snapshot = _Watchdog_Ticks_since_boot; 20173dc: 03 00 80 ee sethi %hi(0x203b800), %g1 20173e0: c4 00 60 cc ld [ %g1 + 0xcc ], %g2 ! 203b8cc <_Watchdog_Ticks_since_boot> */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 20173e4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 20173e8: c8 06 20 3c ld [ %i0 + 0x3c ], %g4 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 20173ec: 86 06 20 34 add %i0, 0x34, %g3 if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 20173f0: 80 a0 40 03 cmp %g1, %g3 20173f4: 02 80 00 08 be 2017414 <_Timer_server_Schedule_operation_method+0x6c> 20173f8: 88 20 80 04 sub %g2, %g4, %g4 /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; 20173fc: de 00 60 10 ld [ %g1 + 0x10 ], %o7 if (delta_interval > delta) { 2017400: 80 a3 c0 04 cmp %o7, %g4 2017404: 08 80 00 03 bleu 2017410 <_Timer_server_Schedule_operation_method+0x68> 2017408: 86 10 20 00 clr %g3 delta_interval -= delta; 201740c: 86 23 c0 04 sub %o7, %g4, %g3 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 2017410: c6 20 60 10 st %g3, [ %g1 + 0x10 ] } ts->Interval_watchdogs.last_snapshot = snapshot; 2017414: c4 26 20 3c st %g2, [ %i0 + 0x3c ] _ISR_Enable( level ); 2017418: 7f ff e3 2e call 20100d0 201741c: 01 00 00 00 nop _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 2017420: 90 06 20 30 add %i0, 0x30, %o0 2017424: 40 00 11 b3 call 201baf0 <_Watchdog_Insert> 2017428: 92 07 60 10 add %i5, 0x10, %o1 if ( !ts->active ) { 201742c: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 2017430: 80 a0 60 00 cmp %g1, 0 2017434: 12 80 00 27 bne 20174d0 <_Timer_server_Schedule_operation_method+0x128> 2017438: 01 00 00 00 nop _Timer_server_Reset_interval_system_watchdog( ts ); 201743c: 7f ff ff 42 call 2017144 <_Timer_server_Reset_interval_system_watchdog> 2017440: 90 10 00 18 mov %i0, %o0 2017444: 30 80 00 23 b,a 20174d0 <_Timer_server_Schedule_operation_method+0x128> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 2017448: 12 80 00 22 bne 20174d0 <_Timer_server_Schedule_operation_method+0x128> 201744c: 01 00 00 00 nop /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 2017450: 7f ff e3 1c call 20100c0 2017454: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 2017458: c4 06 20 68 ld [ %i0 + 0x68 ], %g2 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; 201745c: de 06 20 74 ld [ %i0 + 0x74 ], %o7 /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 2017460: 03 00 80 ee sethi %hi(0x203b800), %g1 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 2017464: 86 06 20 6c add %i0, 0x6c, %g3 last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 2017468: 80 a0 80 03 cmp %g2, %g3 201746c: 02 80 00 0d be 20174a0 <_Timer_server_Schedule_operation_method+0xf8> 2017470: c2 00 60 4c ld [ %g1 + 0x4c ], %g1 first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 2017474: c8 00 a0 10 ld [ %g2 + 0x10 ], %g4 if ( snapshot > last_snapshot ) { 2017478: 80 a0 40 0f cmp %g1, %o7 } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 201747c: 86 01 00 0f add %g4, %o7, %g3 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { 2017480: 08 80 00 07 bleu 201749c <_Timer_server_Schedule_operation_method+0xf4> 2017484: 86 20 c0 01 sub %g3, %g1, %g3 /* * We advanced in time. */ delta = snapshot - last_snapshot; 2017488: 9e 20 40 0f sub %g1, %o7, %o7 if (delta_interval > delta) { 201748c: 80 a1 00 0f cmp %g4, %o7 2017490: 08 80 00 03 bleu 201749c <_Timer_server_Schedule_operation_method+0xf4><== NEVER TAKEN 2017494: 86 10 20 00 clr %g3 delta_interval -= delta; 2017498: 86 21 00 0f sub %g4, %o7, %g3 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 201749c: c6 20 a0 10 st %g3, [ %g2 + 0x10 ] } ts->TOD_watchdogs.last_snapshot = snapshot; 20174a0: c2 26 20 74 st %g1, [ %i0 + 0x74 ] _ISR_Enable( level ); 20174a4: 7f ff e3 0b call 20100d0 20174a8: 01 00 00 00 nop _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 20174ac: 90 06 20 68 add %i0, 0x68, %o0 20174b0: 40 00 11 90 call 201baf0 <_Watchdog_Insert> 20174b4: 92 07 60 10 add %i5, 0x10, %o1 if ( !ts->active ) { 20174b8: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 20174bc: 80 a0 60 00 cmp %g1, 0 20174c0: 12 80 00 04 bne 20174d0 <_Timer_server_Schedule_operation_method+0x128> 20174c4: 01 00 00 00 nop _Timer_server_Reset_tod_system_watchdog( ts ); 20174c8: 7f ff ff 33 call 2017194 <_Timer_server_Reset_tod_system_watchdog> 20174cc: 90 10 00 18 mov %i0, %o0 } } _Thread_Enable_dispatch(); 20174d0: 40 00 0d 63 call 201aa5c <_Thread_Enable_dispatch> 20174d4: 81 e8 00 00 restore * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 20174d8: f0 06 20 78 ld [ %i0 + 0x78 ], %i0 20174dc: 40 00 02 30 call 2017d9c <_Chain_Append> 20174e0: 81 e8 00 00 restore =============================================================================== 0200985c <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 200985c: 9d e3 bf a0 save %sp, -96, %sp User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 2009860: 03 00 80 6f sethi %hi(0x201bc00), %g1 2009864: 82 10 61 8c or %g1, 0x18c, %g1 ! 201bd8c ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 2009868: 05 00 80 73 sethi %hi(0x201cc00), %g2 initial_extensions = Configuration.User_extension_table; 200986c: f4 00 60 3c ld [ %g1 + 0x3c ], %i2 User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 2009870: f6 00 60 38 ld [ %g1 + 0x38 ], %i3 2009874: 82 10 a0 e8 or %g2, 0xe8, %g1 2009878: 86 00 60 04 add %g1, 4, %g3 head->previous = NULL; 200987c: c0 20 60 04 clr [ %g1 + 4 ] tail->previous = head; 2009880: c2 20 60 08 st %g1, [ %g1 + 8 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 2009884: c6 20 a0 e8 st %g3, [ %g2 + 0xe8 ] 2009888: 05 00 80 72 sethi %hi(0x201c800), %g2 200988c: 82 10 a3 04 or %g2, 0x304, %g1 ! 201cb04 <_User_extensions_Switches_list> 2009890: 86 00 60 04 add %g1, 4, %g3 head->previous = NULL; 2009894: c0 20 60 04 clr [ %g1 + 4 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 2009898: c6 20 a3 04 st %g3, [ %g2 + 0x304 ] initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 200989c: 80 a6 a0 00 cmp %i2, 0 20098a0: 02 80 00 1b be 200990c <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN 20098a4: c2 20 60 08 st %g1, [ %g1 + 8 ] extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) 20098a8: 83 2e e0 02 sll %i3, 2, %g1 20098ac: bb 2e e0 04 sll %i3, 4, %i5 20098b0: ba 27 40 01 sub %i5, %g1, %i5 20098b4: ba 07 40 1b add %i5, %i3, %i5 20098b8: bb 2f 60 02 sll %i5, 2, %i5 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 20098bc: 40 00 01 66 call 2009e54 <_Workspace_Allocate_or_fatal_error> 20098c0: 90 10 00 1d mov %i5, %o0 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 20098c4: 94 10 00 1d mov %i5, %o2 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 20098c8: b8 10 00 08 mov %o0, %i4 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 20098cc: 92 10 20 00 clr %o1 20098d0: 40 00 17 33 call 200f59c 20098d4: ba 10 20 00 clr %i5 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 20098d8: 10 80 00 0b b 2009904 <_User_extensions_Handler_initialization+0xa8> 20098dc: 80 a7 40 1b cmp %i5, %i3 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 20098e0: 90 07 20 14 add %i4, 0x14, %o0 20098e4: 92 06 80 09 add %i2, %o1, %o1 20098e8: 40 00 16 f1 call 200f4ac 20098ec: 94 10 20 20 mov 0x20, %o2 _User_extensions_Add_set( extension ); 20098f0: 90 10 00 1c mov %i4, %o0 20098f4: 40 00 0d 90 call 200cf34 <_User_extensions_Add_set> 20098f8: ba 07 60 01 inc %i5 _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 20098fc: b8 07 20 34 add %i4, 0x34, %i4 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 2009900: 80 a7 40 1b cmp %i5, %i3 2009904: 12 bf ff f7 bne 20098e0 <_User_extensions_Handler_initialization+0x84> 2009908: 93 2f 60 05 sll %i5, 5, %o1 200990c: 81 c7 e0 08 ret 2009910: 81 e8 00 00 restore =============================================================================== 0200b5d8 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200b5d8: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 200b5dc: 7f ff de 87 call 2002ff8 200b5e0: ba 10 00 18 mov %i0, %i5 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 200b5e4: c2 06 00 00 ld [ %i0 ], %g1 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 200b5e8: b8 06 20 04 add %i0, 4, %i4 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 200b5ec: 80 a0 40 1c cmp %g1, %i4 200b5f0: 02 80 00 1f be 200b66c <_Watchdog_Adjust+0x94> 200b5f4: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200b5f8: 02 80 00 1a be 200b660 <_Watchdog_Adjust+0x88> 200b5fc: b6 10 20 01 mov 1, %i3 200b600: 80 a6 60 01 cmp %i1, 1 200b604: 12 80 00 1a bne 200b66c <_Watchdog_Adjust+0x94> <== NEVER TAKEN 200b608: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200b60c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200b610: 10 80 00 07 b 200b62c <_Watchdog_Adjust+0x54> 200b614: b4 00 80 1a add %g2, %i2, %i2 break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 200b618: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200b61c: 80 a6 80 02 cmp %i2, %g2 200b620: 3a 80 00 05 bcc,a 200b634 <_Watchdog_Adjust+0x5c> 200b624: f6 20 60 10 st %i3, [ %g1 + 0x10 ] _Watchdog_First( header )->delta_interval -= units; 200b628: b4 20 80 1a sub %g2, %i2, %i2 break; 200b62c: 10 80 00 10 b 200b66c <_Watchdog_Adjust+0x94> 200b630: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } else { units -= _Watchdog_First( header )->delta_interval; 200b634: b4 26 80 02 sub %i2, %g2, %i2 _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); 200b638: 7f ff de 74 call 2003008 200b63c: 01 00 00 00 nop _Watchdog_Tickle( header ); 200b640: 40 00 00 90 call 200b880 <_Watchdog_Tickle> 200b644: 90 10 00 1d mov %i5, %o0 _ISR_Disable( level ); 200b648: 7f ff de 6c call 2002ff8 200b64c: 01 00 00 00 nop if ( _Chain_Is_empty( header ) ) 200b650: c2 07 40 00 ld [ %i5 ], %g1 200b654: 80 a0 40 1c cmp %g1, %i4 200b658: 02 80 00 05 be 200b66c <_Watchdog_Adjust+0x94> 200b65c: 01 00 00 00 nop switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200b660: 80 a6 a0 00 cmp %i2, 0 200b664: 32 bf ff ed bne,a 200b618 <_Watchdog_Adjust+0x40> <== ALWAYS TAKEN 200b668: c2 07 40 00 ld [ %i5 ], %g1 } break; } } _ISR_Enable( level ); 200b66c: 7f ff de 67 call 2003008 200b670: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02009c74 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 2009c74: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 2009c78: 7f ff e1 41 call 200217c 2009c7c: ba 10 00 18 mov %i0, %i5 previous_state = the_watchdog->state; 2009c80: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 2009c84: 80 a6 20 01 cmp %i0, 1 2009c88: 22 80 00 1d be,a 2009cfc <_Watchdog_Remove+0x88> 2009c8c: c0 27 60 08 clr [ %i5 + 8 ] 2009c90: 0a 80 00 1c bcs 2009d00 <_Watchdog_Remove+0x8c> 2009c94: 03 00 80 73 sethi %hi(0x201cc00), %g1 2009c98: 80 a6 20 03 cmp %i0, 3 2009c9c: 18 80 00 19 bgu 2009d00 <_Watchdog_Remove+0x8c> <== NEVER TAKEN 2009ca0: 01 00 00 00 nop 2009ca4: c2 07 40 00 ld [ %i5 ], %g1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 2009ca8: c0 27 60 08 clr [ %i5 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 2009cac: c4 00 40 00 ld [ %g1 ], %g2 2009cb0: 80 a0 a0 00 cmp %g2, 0 2009cb4: 02 80 00 07 be 2009cd0 <_Watchdog_Remove+0x5c> 2009cb8: 05 00 80 73 sethi %hi(0x201cc00), %g2 next_watchdog->delta_interval += the_watchdog->delta_interval; 2009cbc: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 2009cc0: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 2009cc4: 84 00 c0 02 add %g3, %g2, %g2 2009cc8: c4 20 60 10 st %g2, [ %g1 + 0x10 ] if ( _Watchdog_Sync_count ) 2009ccc: 05 00 80 73 sethi %hi(0x201cc00), %g2 2009cd0: c4 00 a0 08 ld [ %g2 + 8 ], %g2 ! 201cc08 <_Watchdog_Sync_count> 2009cd4: 80 a0 a0 00 cmp %g2, 0 2009cd8: 22 80 00 07 be,a 2009cf4 <_Watchdog_Remove+0x80> 2009cdc: c4 07 60 04 ld [ %i5 + 4 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 2009ce0: 05 00 80 74 sethi %hi(0x201d000), %g2 2009ce4: c6 00 a0 40 ld [ %g2 + 0x40 ], %g3 ! 201d040 <_Per_CPU_Information+0x8> 2009ce8: 05 00 80 72 sethi %hi(0x201c800), %g2 2009cec: c6 20 a3 a8 st %g3, [ %g2 + 0x3a8 ] ! 201cba8 <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 2009cf0: c4 07 60 04 ld [ %i5 + 4 ], %g2 next->previous = previous; 2009cf4: c4 20 60 04 st %g2, [ %g1 + 4 ] previous->next = next; 2009cf8: c2 20 80 00 st %g1, [ %g2 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 2009cfc: 03 00 80 73 sethi %hi(0x201cc00), %g1 2009d00: c2 00 60 0c ld [ %g1 + 0xc ], %g1 ! 201cc0c <_Watchdog_Ticks_since_boot> 2009d04: c2 27 60 18 st %g1, [ %i5 + 0x18 ] _ISR_Enable( level ); 2009d08: 7f ff e1 21 call 200218c 2009d0c: 01 00 00 00 nop return( previous_state ); } 2009d10: 81 c7 e0 08 ret 2009d14: 81 e8 00 00 restore =============================================================================== 0200adc4 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 200adc4: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 200adc8: 7f ff df 5c call 2002b38 200adcc: ba 10 00 18 mov %i0, %i5 200add0: b0 10 00 08 mov %o0, %i0 printk( "Watchdog Chain: %s %p\n", name, header ); 200add4: 11 00 80 72 sethi %hi(0x201c800), %o0 200add8: 94 10 00 19 mov %i1, %o2 200addc: 90 12 21 10 or %o0, 0x110, %o0 200ade0: 7f ff e6 0c call 2004610 200ade4: 92 10 00 1d mov %i5, %o1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 200ade8: f8 06 40 00 ld [ %i1 ], %i4 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 200adec: b2 06 60 04 add %i1, 4, %i1 if ( !_Chain_Is_empty( header ) ) { 200adf0: 80 a7 00 19 cmp %i4, %i1 200adf4: 12 80 00 04 bne 200ae04 <_Watchdog_Report_chain+0x40> 200adf8: 92 10 00 1c mov %i4, %o1 _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 200adfc: 10 80 00 0d b 200ae30 <_Watchdog_Report_chain+0x6c> 200ae00: 11 00 80 72 sethi %hi(0x201c800), %o0 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 200ae04: 40 00 00 0f call 200ae40 <_Watchdog_Report> 200ae08: 90 10 20 00 clr %o0 _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; node != _Chain_Tail(header) ; node = node->next ) 200ae0c: f8 07 00 00 ld [ %i4 ], %i4 Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; 200ae10: 80 a7 00 19 cmp %i4, %i1 200ae14: 12 bf ff fc bne 200ae04 <_Watchdog_Report_chain+0x40> <== NEVER TAKEN 200ae18: 92 10 00 1c mov %i4, %o1 { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 200ae1c: 11 00 80 72 sethi %hi(0x201c800), %o0 200ae20: 92 10 00 1d mov %i5, %o1 200ae24: 7f ff e5 fb call 2004610 200ae28: 90 12 21 28 or %o0, 0x128, %o0 200ae2c: 30 80 00 03 b,a 200ae38 <_Watchdog_Report_chain+0x74> } else { printk( "Chain is empty\n" ); 200ae30: 7f ff e5 f8 call 2004610 200ae34: 90 12 21 38 or %o0, 0x138, %o0 } _ISR_Enable( level ); 200ae38: 7f ff df 44 call 2002b48 200ae3c: 81 e8 00 00 restore =============================================================================== 02012d9c <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 2012d9c: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 2012da0: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 2012da4: c0 27 bf fc clr [ %fp + -4 ] uint32_t c = 0; while (count > 0) 2012da8: 10 80 00 18 b 2012e08 <_fat_block_read+0x6c> 2012dac: b0 10 20 00 clr %i0 { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 2012db0: 92 10 00 19 mov %i1, %o1 2012db4: 94 10 20 01 mov 1, %o2 2012db8: 7f ff ff 20 call 2012a38 2012dbc: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2012dc0: 80 a2 20 00 cmp %o0, 0 2012dc4: 12 80 00 16 bne 2012e1c <_fat_block_read+0x80> <== NEVER TAKEN 2012dc8: 01 00 00 00 nop return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 2012dcc: e0 17 40 00 lduh [ %i5 ], %l0 2012dd0: a0 24 00 1a sub %l0, %i2, %l0 2012dd4: 80 a4 00 1b cmp %l0, %i3 2012dd8: 38 80 00 02 bgu,a 2012de0 <_fat_block_read+0x44> 2012ddc: a0 10 00 1b mov %i3, %l0 memcpy((buff + cmpltd), (block->buffer + ofs), c); 2012de0: c2 07 bf fc ld [ %fp + -4 ], %g1 2012de4: 90 07 00 18 add %i4, %i0, %o0 2012de8: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 2012dec: 94 10 00 10 mov %l0, %o2 2012df0: 92 02 40 1a add %o1, %i2, %o1 2012df4: 40 00 27 e4 call 201cd84 2012df8: b6 26 c0 10 sub %i3, %l0, %i3 count -= c; cmpltd += c; 2012dfc: b0 04 00 18 add %l0, %i0, %i0 blk++; 2012e00: b2 06 60 01 inc %i1 ofs = 0; 2012e04: b4 10 20 00 clr %i2 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 2012e08: 80 a6 e0 00 cmp %i3, 0 2012e0c: 12 bf ff e9 bne 2012db0 <_fat_block_read+0x14> 2012e10: 90 10 00 1d mov %i5, %o0 2012e14: 81 c7 e0 08 ret 2012e18: 81 e8 00 00 restore cmpltd += c; blk++; ofs = 0; } return cmpltd; } 2012e1c: 81 c7 e0 08 ret <== NOT EXECUTED 2012e20: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02012ebc <_fat_block_release>: int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 2012ebc: d0 02 20 34 ld [ %o0 + 0x34 ], %o0 <== NOT EXECUTED 2012ec0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2012ec4: 7f ff ff 5c call 2012c34 <== NOT EXECUTED 2012ec8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02012e24 <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 2012e24: 9d e3 bf 98 save %sp, -104, %sp } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 2012e28: a2 10 20 01 mov 1, %l1 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2012e2c: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 2012e30: c0 27 bf fc clr [ %fp + -4 ] uint32_t c = 0; while(count > 0) 2012e34: 10 80 00 1b b 2012ea0 <_fat_block_write+0x7c> 2012e38: b0 10 20 00 clr %i0 { c = MIN(count, (fs_info->vol.bps - ofs)); 2012e3c: a0 20 40 1a sub %g1, %i2, %l0 2012e40: 80 a4 00 1b cmp %l0, %i3 2012e44: 38 80 00 02 bgu,a 2012e4c <_fat_block_write+0x28> 2012e48: a0 10 00 1b mov %i3, %l0 if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 2012e4c: 90 10 00 1d mov %i5, %o0 2012e50: 92 10 00 19 mov %i1, %o1 while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) 2012e54: 80 a4 00 01 cmp %l0, %g1 2012e58: 02 80 00 03 be 2012e64 <_fat_block_write+0x40> 2012e5c: 94 10 20 02 mov 2, %o2 rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 2012e60: 94 10 20 01 mov 1, %o2 2012e64: 7f ff fe f5 call 2012a38 2012e68: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2012e6c: 80 a2 20 00 cmp %o0, 0 2012e70: 12 80 00 11 bne 2012eb4 <_fat_block_write+0x90> <== NEVER TAKEN 2012e74: c2 07 bf fc ld [ %fp + -4 ], %g1 return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 2012e78: 92 07 00 18 add %i4, %i0, %o1 2012e7c: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 2012e80: 94 10 00 10 mov %l0, %o2 2012e84: 90 02 00 1a add %o0, %i2, %o0 2012e88: 40 00 27 bf call 201cd84 2012e8c: b6 26 c0 10 sub %i3, %l0, %i3 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 2012e90: b0 04 00 18 add %l0, %i0, %i0 2012e94: e2 2f 60 84 stb %l1, [ %i5 + 0x84 ] blk++; 2012e98: b2 06 60 01 inc %i1 ofs = 0; 2012e9c: b4 10 20 00 clr %i2 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 2012ea0: 80 a6 e0 00 cmp %i3, 0 2012ea4: 32 bf ff e6 bne,a 2012e3c <_fat_block_write+0x18> 2012ea8: c2 17 40 00 lduh [ %i5 ], %g1 2012eac: 81 c7 e0 08 ret 2012eb0: 81 e8 00 00 restore cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 2012eb4: 81 c7 e0 08 ret <== NOT EXECUTED 2012eb8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02011dbc <_hash_search>: rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { 2011dbc: 9d e3 bf a0 save %sp, -96, %sp uint32_t mod = (key1) % FAT_HASH_MODULE; 2011dc0: 84 0e a0 01 and %i2, 1, %g2 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 2011dc4: 87 28 a0 02 sll %g2, 2, %g3 2011dc8: 83 28 a0 04 sll %g2, 4, %g1 2011dcc: 82 20 40 03 sub %g1, %g3, %g1 2011dd0: 84 06 40 01 add %i1, %g1, %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 2011dd4: fa 06 40 01 ld [ %i1 + %g1 ], %i5 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 2011dd8: 10 80 00 11 b 2011e1c <_hash_search+0x60> 2011ddc: b2 00 a0 04 add %g2, 4, %i1 { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); 2011de0: 7f ff ff e5 call 2011d74 2011de4: 92 07 60 20 add %i5, 0x20, %o1 if ( (key1) == ck) 2011de8: 80 a6 80 08 cmp %i2, %o0 2011dec: 32 80 00 0c bne,a 2011e1c <_hash_search+0x60> 2011df0: fa 07 40 00 ld [ %i5 ], %i5 { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 2011df4: 80 a6 e0 00 cmp %i3, 0 2011df8: 22 80 00 07 be,a 2011e14 <_hash_search+0x58> <== ALWAYS TAKEN 2011dfc: fa 27 00 00 st %i5, [ %i4 ] 2011e00: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED 2011e04: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED 2011e08: 32 80 00 05 bne,a 2011e1c <_hash_search+0x60> <== NOT EXECUTED 2011e0c: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED { *ret = (void *)the_node; 2011e10: fa 27 00 00 st %i5, [ %i4 ] <== NOT EXECUTED return 0; 2011e14: 81 c7 e0 08 ret 2011e18: 91 e8 20 00 restore %g0, 0, %o0 ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 2011e1c: 80 a7 40 19 cmp %i5, %i1 2011e20: 12 bf ff f0 bne 2011de0 <_hash_search+0x24> 2011e24: 90 10 00 18 mov %i0, %o0 } } the_node = the_node->next; } return -1; } 2011e28: 81 c7 e0 08 ret 2011e2c: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 0201f49c <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 201f49c: 9d e3 bf 58 save %sp, -168, %sp /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 201f4a0: 7f ff 96 a5 call 2004f34 201f4a4: 90 10 00 19 mov %i1, %o0 201f4a8: b8 10 00 08 mov %o0, %i4 if ( old_parent_pathlen == 0 ) 201f4ac: 80 a7 20 00 cmp %i4, 0 201f4b0: 12 80 00 08 bne 201f4d0 <_rename_r+0x34> 201f4b4: 90 10 00 19 mov %i1, %o0 rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 201f4b8: 92 07 bf f8 add %fp, -8, %o1 201f4bc: 94 07 bf d0 add %fp, -48, %o2 201f4c0: 7f ff 9c 8d call 20066f4 201f4c4: ba 10 20 00 clr %i5 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 201f4c8: 10 80 00 0c b 201f4f8 <_rename_r+0x5c> 201f4cc: 94 10 20 14 mov 0x14, %o2 old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 201f4d0: 92 10 00 1c mov %i4, %o1 201f4d4: 94 10 20 02 mov 2, %o2 201f4d8: 96 07 bf d0 add %fp, -48, %o3 201f4dc: 98 10 20 00 clr %o4 201f4e0: 7f ff 96 86 call 2004ef8 201f4e4: b0 10 3f ff mov -1, %i0 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 201f4e8: 80 a2 20 00 cmp %o0, 0 201f4ec: 12 80 00 1e bne 201f564 <_rename_r+0xc8> <== NEVER TAKEN 201f4f0: ba 10 20 01 mov 1, %i5 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 201f4f4: 94 10 20 14 mov 0x14, %o2 201f4f8: 92 07 bf d0 add %fp, -48, %o1 201f4fc: 7f ff ca 4b call 2011e28 201f500: 90 07 bf bc add %fp, -68, %o0 name = old + old_parent_pathlen; 201f504: b2 06 40 1c add %i1, %i4, %i1 201f508: f2 27 bf fc st %i1, [ %fp + -4 ] name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 201f50c: 7f ff cd 3a call 20129f4 201f510: 90 10 00 19 mov %i1, %o0 201f514: 92 10 00 08 mov %o0, %o1 201f518: 7f ff 96 96 call 2004f70 201f51c: 90 10 00 19 mov %i1, %o0 201f520: b2 06 40 08 add %i1, %o0, %i1 201f524: f2 27 bf fc st %i1, [ %fp + -4 ] result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 201f528: 7f ff cd 33 call 20129f4 201f52c: 90 10 00 19 mov %i1, %o0 201f530: 94 10 20 00 clr %o2 201f534: 92 10 00 08 mov %o0, %o1 201f538: 96 07 bf bc add %fp, -68, %o3 201f53c: 90 10 00 19 mov %i1, %o0 201f540: 7f ff 96 52 call 2004e88 201f544: 98 10 20 00 clr %o4 0, &old_loc, false ); if ( result != 0 ) { 201f548: 80 a2 20 00 cmp %o0, 0 201f54c: 02 80 00 08 be 201f56c <_rename_r+0xd0> 201f550: 80 8f 60 ff btst 0xff, %i5 if ( free_old_parentloc ) 201f554: 02 80 00 04 be 201f564 <_rename_r+0xc8> 201f558: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( &old_parent_loc ); 201f55c: 7f ff 96 d9 call 20050c0 201f560: 90 07 bf d0 add %fp, -48, %o0 201f564: 81 c7 e0 08 ret 201f568: 81 e8 00 00 restore /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 201f56c: 90 10 00 1a mov %i2, %o0 201f570: 92 07 bf f8 add %fp, -8, %o1 201f574: 7f ff 9c 60 call 20066f4 201f578: 94 07 bf e4 add %fp, -28, %o2 result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 201f57c: c2 07 bf f0 ld [ %fp + -16 ], %g1 201f580: d0 07 bf f8 ld [ %fp + -8 ], %o0 201f584: c2 00 60 04 ld [ %g1 + 4 ], %g1 201f588: 90 06 80 08 add %i2, %o0, %o0 201f58c: 92 07 bf e4 add %fp, -28, %o1 201f590: 9f c0 40 00 call %g1 201f594: 94 07 bf fc add %fp, -4, %o2 if ( result != 0 ) { 201f598: 80 a2 20 00 cmp %o0, 0 201f59c: 02 80 00 0d be 201f5d0 <_rename_r+0x134> 201f5a0: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_filesystem_freenode( &new_parent_loc ); 201f5a4: 7f ff 96 c7 call 20050c0 201f5a8: 90 07 bf e4 add %fp, -28, %o0 if ( free_old_parentloc ) 201f5ac: 80 8f 60 ff btst 0xff, %i5 201f5b0: 02 80 00 04 be 201f5c0 <_rename_r+0x124> 201f5b4: 01 00 00 00 nop rtems_filesystem_freenode( &old_parent_loc ); 201f5b8: 7f ff 96 c2 call 20050c0 201f5bc: 90 07 bf d0 add %fp, -48, %o0 rtems_filesystem_freenode( &old_loc ); 201f5c0: 7f ff 96 c0 call 20050c0 201f5c4: 90 07 bf bc add %fp, -68, %o0 if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); 201f5c8: 81 c7 e0 08 ret 201f5cc: 91 e8 3f ff restore %g0, -1, %o0 /* * 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 ) { 201f5d0: c4 07 bf e0 ld [ %fp + -32 ], %g2 201f5d4: 80 a0 80 01 cmp %g2, %g1 201f5d8: 02 80 00 11 be 201f61c <_rename_r+0x180> 201f5dc: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &new_parent_loc ); 201f5e0: 7f ff 96 b8 call 20050c0 201f5e4: 90 07 bf e4 add %fp, -28, %o0 if ( free_old_parentloc ) 201f5e8: 80 8f 60 ff btst 0xff, %i5 201f5ec: 02 80 00 04 be 201f5fc <_rename_r+0x160> 201f5f0: 01 00 00 00 nop rtems_filesystem_freenode( &old_parent_loc ); 201f5f4: 7f ff 96 b3 call 20050c0 201f5f8: 90 07 bf d0 add %fp, -48, %o0 rtems_filesystem_freenode( &old_loc ); 201f5fc: 7f ff 96 b1 call 20050c0 201f600: 90 07 bf bc add %fp, -68, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 201f604: 7f ff c7 ad call 20114b8 <__errno> 201f608: 01 00 00 00 nop 201f60c: 82 10 20 12 mov 0x12, %g1 ! 12 201f610: c2 22 00 00 st %g1, [ %o0 ] 201f614: 81 c7 e0 08 ret 201f618: 91 e8 3f ff restore %g0, -1, %o0 } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 201f61c: d6 07 bf fc ld [ %fp + -4 ], %o3 201f620: c2 00 60 40 ld [ %g1 + 0x40 ], %g1 201f624: 92 07 bf bc add %fp, -68, %o1 201f628: 94 07 bf e4 add %fp, -28, %o2 201f62c: 9f c0 40 00 call %g1 201f630: 90 07 bf d0 add %fp, -48, %o0 201f634: b0 10 00 08 mov %o0, %i0 rtems_filesystem_freenode( &new_parent_loc ); 201f638: 7f ff 96 a2 call 20050c0 201f63c: 90 07 bf e4 add %fp, -28, %o0 if ( free_old_parentloc ) 201f640: 80 8f 60 ff btst 0xff, %i5 201f644: 02 80 00 04 be 201f654 <_rename_r+0x1b8> 201f648: 01 00 00 00 nop rtems_filesystem_freenode( &old_parent_loc ); 201f64c: 7f ff 96 9d call 20050c0 201f650: 90 07 bf d0 add %fp, -48, %o0 rtems_filesystem_freenode( &old_loc ); 201f654: 7f ff 96 9b call 20050c0 201f658: 90 07 bf bc add %fp, -68, %o0 return result; } 201f65c: 81 c7 e0 08 ret 201f660: 81 e8 00 00 restore =============================================================================== 0200680c : * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 200680c: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 2006810: 3b 00 80 62 sethi %hi(0x2018800), %i5 2006814: 40 00 04 5d call 2007988 2006818: 90 17 63 7c or %i5, 0x37c, %o0 ! 2018b7c if (fcntl (fildes, F_GETFD) < 0) { 200681c: 90 10 00 18 mov %i0, %o0 2006820: 40 00 1c a6 call 200dab8 2006824: 92 10 20 01 mov 1, %o1 2006828: 80 a2 20 00 cmp %o0, 0 200682c: 16 80 00 08 bge 200684c 2006830: 80 a6 60 00 cmp %i1, 0 pthread_mutex_unlock(&aio_request_queue.mutex); 2006834: 40 00 04 75 call 2007a08 2006838: 90 17 63 7c or %i5, 0x37c, %o0 rtems_set_errno_and_return_minus_one (EBADF); 200683c: 40 00 29 f8 call 201101c <__errno> 2006840: 01 00 00 00 nop 2006844: 10 80 00 4e b 200697c 2006848: 82 10 20 09 mov 9, %g1 ! 9 } /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { 200684c: 32 80 00 2f bne,a 2006908 2006850: f8 06 40 00 ld [ %i1 ], %i4 AIO_printf ("Cancel all requests\n"); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 2006854: 11 00 80 62 sethi %hi(0x2018800), %o0 2006858: 92 10 00 18 mov %i0, %o1 200685c: 90 12 23 c4 or %o0, 0x3c4, %o0 2006860: 40 00 00 bb call 2006b4c 2006864: 94 10 20 00 clr %o2 if (r_chain == NULL) { 2006868: b8 92 20 00 orcc %o0, 0, %i4 200686c: 32 80 00 1a bne,a 20068d4 2006870: b2 07 20 1c add %i4, 0x1c, %i1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 2006874: ba 17 63 7c or %i5, 0x37c, %i5 AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { 2006878: c4 07 60 54 ld [ %i5 + 0x54 ], %g2 200687c: 82 07 60 58 add %i5, 0x58, %g1 2006880: 80 a0 80 01 cmp %g2, %g1 2006884: 02 80 00 48 be 20069a4 <== NEVER TAKEN 2006888: 90 07 60 54 add %i5, 0x54, %o0 r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 200688c: 92 10 00 18 mov %i0, %o1 2006890: 40 00 00 af call 2006b4c 2006894: 94 10 20 00 clr %o2 if (r_chain == NULL) { 2006898: b8 92 20 00 orcc %o0, 0, %i4 200689c: 22 80 00 43 be,a 20069a8 20068a0: 90 10 00 1d mov %i5, %o0 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 20068a4: 40 00 0a a8 call 2009344 <_Chain_Extract> 20068a8: b2 07 20 1c add %i4, 0x1c, %i1 } AIO_printf ("Request chain on [IQ]\n"); rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 20068ac: 40 00 01 8d call 2006ee0 20068b0: 90 10 00 1c mov %i4, %o0 pthread_mutex_destroy (&r_chain->mutex); 20068b4: 40 00 03 90 call 20076f4 20068b8: 90 10 00 19 mov %i1, %o0 pthread_cond_destroy (&r_chain->mutex); 20068bc: 40 00 02 b5 call 2007390 20068c0: 90 10 00 19 mov %i1, %o0 free (r_chain); 20068c4: 7f ff f3 31 call 2003588 20068c8: 90 10 00 1c mov %i4, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); 20068cc: 10 80 00 0b b 20068f8 20068d0: 90 10 00 1d mov %i5, %o0 return AIO_ALLDONE; } AIO_printf ("Request chain on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 20068d4: 40 00 04 2d call 2007988 20068d8: 90 10 00 19 mov %i1, %o0 20068dc: 40 00 0a 9a call 2009344 <_Chain_Extract> 20068e0: 90 10 00 1c mov %i4, %o0 rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 20068e4: 40 00 01 7f call 2006ee0 20068e8: 90 10 00 1c mov %i4, %o0 pthread_mutex_unlock (&r_chain->mutex); 20068ec: 40 00 04 47 call 2007a08 20068f0: 90 10 00 19 mov %i1, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); 20068f4: 90 17 63 7c or %i5, 0x37c, %o0 20068f8: 40 00 04 44 call 2007a08 20068fc: b0 10 20 00 clr %i0 return AIO_CANCELED; 2006900: 81 c7 e0 08 ret 2006904: 81 e8 00 00 restore } else { AIO_printf ("Cancel request\n"); if (aiocbp->aio_fildes != fildes) { 2006908: 80 a7 00 18 cmp %i4, %i0 200690c: 12 80 00 17 bne 2006968 2006910: 90 17 63 7c or %i5, 0x37c, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 2006914: 11 00 80 62 sethi %hi(0x2018800), %o0 2006918: 92 10 00 1c mov %i4, %o1 200691c: 90 12 23 c4 or %o0, 0x3c4, %o0 2006920: 40 00 00 8b call 2006b4c 2006924: 94 10 20 00 clr %o2 if (r_chain == NULL) { 2006928: b0 92 20 00 orcc %o0, 0, %i0 200692c: 32 80 00 23 bne,a 20069b8 2006930: b8 06 20 1c add %i0, 0x1c, %i4 2006934: ba 17 63 7c or %i5, 0x37c, %i5 if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { 2006938: c4 07 60 54 ld [ %i5 + 0x54 ], %g2 200693c: 82 07 60 58 add %i5, 0x58, %g1 2006940: 80 a0 80 01 cmp %g2, %g1 2006944: 02 80 00 18 be 20069a4 <== NEVER TAKEN 2006948: 90 07 60 54 add %i5, 0x54, %o0 r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 200694c: 92 10 00 1c mov %i4, %o1 2006950: 40 00 00 7f call 2006b4c 2006954: 94 10 20 00 clr %o2 if (r_chain == NULL) { 2006958: 80 a2 20 00 cmp %o0, 0 200695c: 12 80 00 0b bne 2006988 2006960: 92 10 00 19 mov %i1, %o1 pthread_mutex_unlock (&aio_request_queue.mutex); 2006964: 90 10 00 1d mov %i5, %o0 2006968: 40 00 04 28 call 2007a08 200696c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one (EINVAL); 2006970: 40 00 29 ab call 201101c <__errno> 2006974: 01 00 00 00 nop 2006978: 82 10 20 16 mov 0x16, %g1 ! 16 200697c: c2 22 00 00 st %g1, [ %o0 ] 2006980: 81 c7 e0 08 ret 2006984: 91 e8 3f ff restore %g0, -1, %o0 } AIO_printf ("Request on [IQ]\n"); result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 2006988: 40 00 01 6a call 2006f30 200698c: 90 02 20 08 add %o0, 8, %o0 2006990: b0 10 00 08 mov %o0, %i0 pthread_mutex_unlock (&aio_request_queue.mutex); 2006994: 40 00 04 1d call 2007a08 2006998: 90 10 00 1d mov %i5, %o0 return result; 200699c: 81 c7 e0 08 ret 20069a0: 81 e8 00 00 restore } else { pthread_mutex_unlock (&aio_request_queue.mutex); 20069a4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20069a8: 40 00 04 18 call 2007a08 20069ac: b0 10 20 02 mov 2, %i0 return AIO_ALLDONE; 20069b0: 81 c7 e0 08 ret 20069b4: 81 e8 00 00 restore } } AIO_printf ("Request on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 20069b8: 40 00 03 f4 call 2007988 20069bc: 90 10 00 1c mov %i4, %o0 result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 20069c0: 92 10 00 19 mov %i1, %o1 20069c4: 40 00 01 5b call 2006f30 20069c8: 90 06 20 08 add %i0, 8, %o0 20069cc: b0 10 00 08 mov %o0, %i0 pthread_mutex_unlock (&r_chain->mutex); 20069d0: 40 00 04 0e call 2007a08 20069d4: 90 10 00 1c mov %i4, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); 20069d8: 40 00 04 0c call 2007a08 20069dc: 90 17 63 7c or %i5, 0x37c, %o0 return result; } return AIO_ALLDONE; } 20069e0: 81 c7 e0 08 ret 20069e4: 81 e8 00 00 restore =============================================================================== 020069f0 : int aio_fsync( int op, struct aiocb *aiocbp ) { 20069f0: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request *req; int mode; if (op != O_SYNC) 20069f4: 03 00 00 08 sethi %hi(0x2000), %g1 20069f8: 80 a6 00 01 cmp %i0, %g1 20069fc: 12 80 00 10 bne 2006a3c 2006a00: ba 10 20 16 mov 0x16, %i5 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); 2006a04: d0 06 40 00 ld [ %i1 ], %o0 2006a08: 40 00 1c 2c call 200dab8 2006a0c: 92 10 20 03 mov 3, %o1 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 2006a10: 90 0a 20 03 and %o0, 3, %o0 2006a14: 90 02 3f ff add %o0, -1, %o0 2006a18: 80 a2 20 01 cmp %o0, 1 2006a1c: 18 80 00 08 bgu 2006a3c 2006a20: ba 10 20 09 mov 9, %i5 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); 2006a24: 7f ff f4 51 call 2003b68 2006a28: 90 10 20 18 mov 0x18, %o0 if (req == NULL) 2006a2c: 80 a2 20 00 cmp %o0, 0 2006a30: 32 80 00 0b bne,a 2006a5c <== ALWAYS TAKEN 2006a34: f2 22 20 14 st %i1, [ %o0 + 0x14 ] rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 2006a38: ba 10 20 0b mov 0xb, %i5 <== NOT EXECUTED 2006a3c: 82 10 3f ff mov -1, %g1 2006a40: fa 26 60 34 st %i5, [ %i1 + 0x34 ] 2006a44: c2 26 60 38 st %g1, [ %i1 + 0x38 ] 2006a48: 40 00 29 75 call 201101c <__errno> 2006a4c: b0 10 3f ff mov -1, %i0 2006a50: fa 22 00 00 st %i5, [ %o0 ] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 2006a54: 81 c7 e0 08 ret 2006a58: 81 e8 00 00 restore req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; 2006a5c: 82 10 20 03 mov 3, %g1 2006a60: c2 26 60 30 st %g1, [ %i1 + 0x30 ] return rtems_aio_enqueue (req); 2006a64: 40 00 01 50 call 2006fa4 2006a68: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 020071d4 : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 20071d4: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 20071d8: d0 06 00 00 ld [ %i0 ], %o0 20071dc: 40 00 1a 37 call 200dab8 20071e0: 92 10 20 03 mov 3, %o1 if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) 20071e4: 90 0a 20 03 and %o0, 3, %o0 20071e8: 80 a2 20 02 cmp %o0, 2 20071ec: 02 80 00 05 be 2007200 20071f0: ba 10 00 18 mov %i0, %i5 20071f4: 80 a2 20 00 cmp %o0, 0 20071f8: 12 80 00 10 bne 2007238 <== ALWAYS TAKEN 20071fc: b8 10 20 09 mov 9, %i4 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 2007200: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 2007204: 80 a0 60 00 cmp %g1, 0 2007208: 32 80 00 0c bne,a 2007238 200720c: b8 10 20 16 mov 0x16, %i4 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 2007210: c2 07 60 08 ld [ %i5 + 8 ], %g1 2007214: 80 a0 60 00 cmp %g1, 0 2007218: 26 80 00 08 bl,a 2007238 200721c: b8 10 20 16 mov 0x16, %i4 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 2007220: 7f ff f2 52 call 2003b68 2007224: 90 10 20 18 mov 0x18, %o0 if (req == NULL) 2007228: 80 a2 20 00 cmp %o0, 0 200722c: 32 80 00 0b bne,a 2007258 <== ALWAYS TAKEN 2007230: fa 22 20 14 st %i5, [ %o0 + 0x14 ] 2007234: b8 10 20 0b mov 0xb, %i4 <== NOT EXECUTED rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 2007238: 82 10 3f ff mov -1, %g1 200723c: f8 27 60 34 st %i4, [ %i5 + 0x34 ] 2007240: c2 27 60 38 st %g1, [ %i5 + 0x38 ] 2007244: 40 00 27 76 call 201101c <__errno> 2007248: b0 10 3f ff mov -1, %i0 200724c: f8 22 00 00 st %i4, [ %o0 ] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 2007250: 81 c7 e0 08 ret 2007254: 81 e8 00 00 restore req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; 2007258: 82 10 20 01 mov 1, %g1 200725c: c2 27 60 30 st %g1, [ %i5 + 0x30 ] return rtems_aio_enqueue (req); 2007260: 7f ff ff 51 call 2006fa4 2007264: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02007270 : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 2007270: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 2007274: d0 06 00 00 ld [ %i0 ], %o0 2007278: 40 00 1a 10 call 200dab8 200727c: 92 10 20 03 mov 3, %o1 * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 2007280: ba 10 00 18 mov %i0, %i5 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 2007284: 90 0a 20 03 and %o0, 3, %o0 2007288: 90 02 3f ff add %o0, -1, %o0 200728c: 80 a2 20 01 cmp %o0, 1 2007290: 18 80 00 10 bgu 20072d0 2007294: b8 10 20 09 mov 9, %i4 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 2007298: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200729c: 80 a0 60 00 cmp %g1, 0 20072a0: 32 80 00 0c bne,a 20072d0 20072a4: b8 10 20 16 mov 0x16, %i4 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 20072a8: c2 06 20 08 ld [ %i0 + 8 ], %g1 20072ac: 80 a0 60 00 cmp %g1, 0 20072b0: 26 80 00 08 bl,a 20072d0 20072b4: b8 10 20 16 mov 0x16, %i4 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 20072b8: 7f ff f2 2c call 2003b68 20072bc: 90 10 20 18 mov 0x18, %o0 if (req == NULL) 20072c0: 80 a2 20 00 cmp %o0, 0 20072c4: 32 80 00 0b bne,a 20072f0 <== ALWAYS TAKEN 20072c8: f0 22 20 14 st %i0, [ %o0 + 0x14 ] 20072cc: b8 10 20 0b mov 0xb, %i4 <== NOT EXECUTED rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 20072d0: 82 10 3f ff mov -1, %g1 20072d4: f8 27 60 34 st %i4, [ %i5 + 0x34 ] 20072d8: c2 27 60 38 st %g1, [ %i5 + 0x38 ] 20072dc: 40 00 27 50 call 201101c <__errno> 20072e0: b0 10 3f ff mov -1, %i0 20072e4: f8 22 00 00 st %i4, [ %o0 ] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 20072e8: 81 c7 e0 08 ret 20072ec: 81 e8 00 00 restore req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; 20072f0: 82 10 20 02 mov 2, %g1 20072f4: c2 26 20 30 st %g1, [ %i0 + 0x30 ] return rtems_aio_enqueue (req); 20072f8: 7f ff ff 2b call 2006fa4 20072fc: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02004d28 : #include int chroot( const char *pathname ) { 2004d28: 9d e3 bf 88 save %sp, -120, %sp 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) { 2004d2c: 39 00 80 87 sethi %hi(0x2021c00), %i4 2004d30: fa 07 23 ec ld [ %i4 + 0x3ec ], %i5 ! 2021fec 2004d34: 03 00 80 8a sethi %hi(0x2022800), %g1 2004d38: 82 10 61 a4 or %g1, 0x1a4, %g1 ! 20229a4 2004d3c: 80 a7 40 01 cmp %i5, %g1 2004d40: 12 80 00 0e bne 2004d78 2004d44: 01 00 00 00 nop rtems_libio_set_private_env(); /* try to set a new private env*/ 2004d48: 40 00 05 59 call 20062ac 2004d4c: 01 00 00 00 nop if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 2004d50: c2 07 23 ec ld [ %i4 + 0x3ec ], %g1 2004d54: 80 a0 40 1d cmp %g1, %i5 2004d58: 12 80 00 08 bne 2004d78 2004d5c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 2004d60: 40 00 31 d6 call 20114b8 <__errno> 2004d64: b0 10 3f ff mov -1, %i0 ! ffffffff 2004d68: 82 10 20 86 mov 0x86, %g1 2004d6c: c2 22 00 00 st %g1, [ %o0 ] 2004d70: 81 c7 e0 08 ret 2004d74: 81 e8 00 00 restore } result = chdir(pathname); 2004d78: 7f ff ff bd call 2004c6c 2004d7c: 90 10 00 18 mov %i0, %o0 if (result) { 2004d80: 80 a2 20 00 cmp %o0, 0 2004d84: 12 80 00 0c bne 2004db4 2004d88: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 2004d8c: 11 00 80 80 sethi %hi(0x2020000), %o0 2004d90: 92 10 20 01 mov 1, %o1 2004d94: 90 12 20 e8 or %o0, 0xe8, %o0 2004d98: 94 10 20 00 clr %o2 2004d9c: 96 07 bf ec add %fp, -20, %o3 2004da0: 40 00 00 56 call 2004ef8 2004da4: 98 10 20 00 clr %o4 2004da8: 80 a2 20 00 cmp %o0, 0 2004dac: 02 80 00 0a be 2004dd4 <== ALWAYS TAKEN 2004db0: 3b 00 80 87 sethi %hi(0x2021c00), %i5 /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 2004db4: 40 00 31 c1 call 20114b8 <__errno> 2004db8: b0 10 3f ff mov -1, %i0 2004dbc: 40 00 31 bf call 20114b8 <__errno> 2004dc0: ba 10 00 08 mov %o0, %i5 2004dc4: c2 02 00 00 ld [ %o0 ], %g1 2004dc8: c2 27 40 00 st %g1, [ %i5 ] 2004dcc: 81 c7 e0 08 ret 2004dd0: 81 e8 00 00 restore } rtems_filesystem_freenode(&rtems_filesystem_root); 2004dd4: d0 07 63 ec ld [ %i5 + 0x3ec ], %o0 rtems_filesystem_root = loc; return 0; 2004dd8: b0 10 20 00 clr %i0 /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); 2004ddc: 40 00 00 b9 call 20050c0 2004de0: 90 02 20 18 add %o0, 0x18, %o0 rtems_filesystem_root = loc; 2004de4: d0 07 63 ec ld [ %i5 + 0x3ec ], %o0 2004de8: 92 07 bf ec add %fp, -20, %o1 2004dec: 94 10 20 14 mov 0x14, %o2 2004df0: 40 00 34 0e call 2011e28 2004df4: 90 02 20 18 add %o0, 0x18, %o0 return 0; } 2004df8: 81 c7 e0 08 ret 2004dfc: 81 e8 00 00 restore =============================================================================== 02005e40 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 2005e40: 9d e3 bf a0 save %sp, -96, %sp if ( !tp ) 2005e44: 90 96 60 00 orcc %i1, 0, %o0 2005e48: 12 80 00 06 bne 2005e60 2005e4c: 80 a6 20 01 cmp %i0, 1 rtems_set_errno_and_return_minus_one( EINVAL ); 2005e50: 40 00 26 4b call 200f77c <__errno> 2005e54: 01 00 00 00 nop 2005e58: 10 80 00 15 b 2005eac 2005e5c: 82 10 20 16 mov 0x16, %g1 ! 16 if ( clock_id == CLOCK_REALTIME ) { 2005e60: 12 80 00 05 bne 2005e74 2005e64: 80 a6 20 04 cmp %i0, 4 _TOD_Get(tp); 2005e68: 40 00 07 d0 call 2007da8 <_TOD_Get> 2005e6c: b0 10 20 00 clr %i0 2005e70: 30 80 00 16 b,a 2005ec8 return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 2005e74: 02 80 00 05 be 2005e88 <== NEVER TAKEN 2005e78: 01 00 00 00 nop return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { 2005e7c: 80 a6 20 02 cmp %i0, 2 2005e80: 12 80 00 06 bne 2005e98 2005e84: 80 a6 20 03 cmp %i0, 3 _TOD_Get_uptime_as_timespec( tp ); 2005e88: 40 00 07 e4 call 2007e18 <_TOD_Get_uptime_as_timespec> 2005e8c: b0 10 20 00 clr %i0 return 0; 2005e90: 81 c7 e0 08 ret 2005e94: 81 e8 00 00 restore } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 2005e98: 12 80 00 08 bne 2005eb8 2005e9c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); 2005ea0: 40 00 26 37 call 200f77c <__errno> 2005ea4: 01 00 00 00 nop 2005ea8: 82 10 20 58 mov 0x58, %g1 ! 58 2005eac: c2 22 00 00 st %g1, [ %o0 ] 2005eb0: 81 c7 e0 08 ret 2005eb4: 91 e8 3f ff restore %g0, -1, %o0 #endif rtems_set_errno_and_return_minus_one( EINVAL ); 2005eb8: 40 00 26 31 call 200f77c <__errno> 2005ebc: b0 10 3f ff mov -1, %i0 2005ec0: 82 10 20 16 mov 0x16, %g1 2005ec4: c2 22 00 00 st %g1, [ %o0 ] return 0; } 2005ec8: 81 c7 e0 08 ret 2005ecc: 81 e8 00 00 restore =============================================================================== 02005ed0 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 2005ed0: 9d e3 bf a0 save %sp, -96, %sp if ( !tp ) 2005ed4: 90 96 60 00 orcc %i1, 0, %o0 2005ed8: 02 80 00 0b be 2005f04 <== NEVER TAKEN 2005edc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 2005ee0: 80 a6 20 01 cmp %i0, 1 2005ee4: 12 80 00 16 bne 2005f3c 2005ee8: 80 a6 20 02 cmp %i0, 2 if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 2005eec: c4 02 00 00 ld [ %o0 ], %g2 2005ef0: 03 08 76 b9 sethi %hi(0x21dae400), %g1 2005ef4: 82 10 60 ff or %g1, 0xff, %g1 ! 21dae4ff 2005ef8: 80 a0 80 01 cmp %g2, %g1 2005efc: 38 80 00 06 bgu,a 2005f14 2005f00: 03 00 80 65 sethi %hi(0x2019400), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 2005f04: 40 00 26 1e call 200f77c <__errno> 2005f08: 01 00 00 00 nop 2005f0c: 10 80 00 14 b 2005f5c 2005f10: 82 10 20 16 mov 0x16, %g1 ! 16 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 2005f14: c4 00 61 a0 ld [ %g1 + 0x1a0 ], %g2 2005f18: 84 00 a0 01 inc %g2 2005f1c: c4 20 61 a0 st %g2, [ %g1 + 0x1a0 ] return _Thread_Dispatch_disable_level; 2005f20: c2 00 61 a0 ld [ %g1 + 0x1a0 ], %g1 _Thread_Disable_dispatch(); _TOD_Set( tp ); 2005f24: 40 00 07 d3 call 2007e70 <_TOD_Set> 2005f28: b0 10 20 00 clr %i0 _Thread_Enable_dispatch(); 2005f2c: 40 00 0e 0e call 2009764 <_Thread_Enable_dispatch> 2005f30: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 2005f34: 81 c7 e0 08 ret 2005f38: 81 e8 00 00 restore _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) 2005f3c: 02 80 00 05 be 2005f50 2005f40: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 2005f44: 80 a6 20 03 cmp %i0, 3 2005f48: 12 80 00 08 bne 2005f68 2005f4c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); 2005f50: 40 00 26 0b call 200f77c <__errno> 2005f54: 01 00 00 00 nop 2005f58: 82 10 20 58 mov 0x58, %g1 ! 58 2005f5c: c2 22 00 00 st %g1, [ %o0 ] 2005f60: 81 c7 e0 08 ret 2005f64: 91 e8 3f ff restore %g0, -1, %o0 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 2005f68: 40 00 26 05 call 200f77c <__errno> 2005f6c: b0 10 3f ff mov -1, %i0 2005f70: 82 10 20 16 mov 0x16, %g1 2005f74: c2 22 00 00 st %g1, [ %o0 ] return 0; } 2005f78: 81 c7 e0 08 ret 2005f7c: 81 e8 00 00 restore =============================================================================== 02002878 : return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { 2002878: 9d e3 bf a0 save %sp, -96, %sp rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { 200287c: 03 00 80 65 sethi %hi(0x2019400), %g1 2002880: e2 00 63 60 ld [ %g1 + 0x360 ], %l1 ! 2019760 2002884: 80 a6 00 11 cmp %i0, %l1 2002888: 0a 80 00 18 bcs 20028e8 200288c: ba 10 00 18 mov %i0, %i5 rtems_disk_device_table *table = disktab; 2002890: 03 00 80 65 sethi %hi(0x2019400), %g1 rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; 2002894: b9 2c 60 01 sll %l1, 1, %i4 if (major >= new_size) { 2002898: 80 a6 00 1c cmp %i0, %i4 200289c: 0a 80 00 03 bcs 20028a8 <== NEVER TAKEN 20028a0: d0 00 63 64 ld [ %g1 + 0x364 ], %o0 new_size = major + 1; 20028a4: b8 06 20 01 add %i0, 1, %i4 } table = realloc(table, new_size * sizeof(*table)); 20028a8: 93 2f 20 03 sll %i4, 3, %o1 20028ac: 40 00 07 b0 call 200476c 20028b0: b0 10 20 1a mov 0x1a, %i0 if (table == NULL) { 20028b4: 80 a2 20 00 cmp %o0, 0 20028b8: 02 80 00 46 be 20029d0 <== ALWAYS TAKEN 20028bc: a0 10 00 08 mov %o0, %l0 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 20028c0: 94 27 00 11 sub %i4, %l1, %o2 <== NOT EXECUTED 20028c4: 91 2c 60 03 sll %l1, 3, %o0 <== NOT EXECUTED 20028c8: 92 10 20 00 clr %o1 <== NOT EXECUTED 20028cc: 90 04 00 08 add %l0, %o0, %o0 <== NOT EXECUTED 20028d0: 40 00 41 fc call 20130c0 <== NOT EXECUTED 20028d4: 95 2a a0 03 sll %o2, 3, %o2 <== NOT EXECUTED disktab = table; 20028d8: 03 00 80 65 sethi %hi(0x2019400), %g1 <== NOT EXECUTED 20028dc: e0 20 63 64 st %l0, [ %g1 + 0x364 ] ! 2019764 <== NOT EXECUTED disktab_size = new_size; 20028e0: 03 00 80 65 sethi %hi(0x2019400), %g1 <== NOT EXECUTED 20028e4: f8 20 63 60 st %i4, [ %g1 + 0x360 ] ! 2019760 <== NOT EXECUTED } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 20028e8: 03 00 80 65 sethi %hi(0x2019400), %g1 20028ec: e4 00 63 64 ld [ %g1 + 0x364 ], %l2 ! 2019764 20028f0: a3 2f 60 03 sll %i5, 3, %l1 20028f4: d0 04 80 11 ld [ %l2 + %l1 ], %o0 20028f8: a6 04 80 11 add %l2, %l1, %l3 20028fc: 80 a2 20 00 cmp %o0, 0 2002900: 02 80 00 05 be 2002914 2002904: e8 04 e0 04 ld [ %l3 + 4 ], %l4 2002908: 80 a6 40 14 cmp %i1, %l4 200290c: 2a 80 00 18 bcs,a 200296c <== ALWAYS TAKEN 2002910: e2 04 80 11 ld [ %l2 + %l1 ], %l1 rtems_disk_device **table = disktab [major].minor; rtems_device_minor_number old_size = disktab [major].size; rtems_device_minor_number new_size = 0; if (old_size == 0) { 2002914: 80 a5 20 00 cmp %l4, 0 2002918: 02 80 00 03 be 2002924 <== ALWAYS TAKEN 200291c: b8 10 20 08 mov 8, %i4 new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; 2002920: b9 2d 20 01 sll %l4, 1, %i4 <== NOT EXECUTED } if (minor >= new_size) { 2002924: 80 a6 40 1c cmp %i1, %i4 2002928: 3a 80 00 02 bcc,a 2002930 200292c: b8 06 60 01 add %i1, 1, %i4 new_size = minor + 1; } table = realloc(table, new_size * sizeof(*table)); 2002930: 93 2f 20 02 sll %i4, 2, %o1 2002934: 40 00 07 8e call 200476c 2002938: b0 10 20 1a mov 0x1a, %i0 if (table == NULL) { 200293c: 80 a2 20 00 cmp %o0, 0 2002940: 02 80 00 24 be 20029d0 2002944: a0 10 00 08 mov %o0, %l0 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 2002948: 94 27 00 14 sub %i4, %l4, %o2 200294c: 91 2d 20 02 sll %l4, 2, %o0 2002950: 92 10 20 00 clr %o1 2002954: 90 04 00 08 add %l0, %o0, %o0 2002958: 40 00 41 da call 20130c0 200295c: 95 2a a0 02 sll %o2, 2, %o2 disktab [major].minor = table; 2002960: e0 24 80 11 st %l0, [ %l2 + %l1 ] disktab [major].size = new_size; 2002964: f8 24 e0 04 st %i4, [ %l3 + 4 ] } return disktab [major].minor + minor; 2002968: e2 04 80 11 ld [ %l2 + %l1 ], %l1 200296c: a1 2e 60 02 sll %i1, 2, %l0 2002970: 82 04 40 10 add %l1, %l0, %g1 { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { 2002974: 80 a0 60 00 cmp %g1, 0 2002978: 02 80 00 16 be 20029d0 <== NEVER TAKEN 200297c: b0 10 20 1a mov 0x1a, %i0 return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { 2002980: c2 04 40 10 ld [ %l1 + %l0 ], %g1 2002984: 80 a0 60 00 cmp %g1, 0 2002988: 12 80 00 12 bne 20029d0 200298c: b0 10 20 0c mov 0xc, %i0 return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 2002990: 90 10 20 38 mov 0x38, %o0 2002994: 40 00 04 cb call 2003cc0 2002998: b0 10 20 1a mov 0x1a, %i0 if (dd == NULL) { 200299c: 80 a2 20 00 cmp %o0, 0 20029a0: 02 80 00 0c be 20029d0 <== NEVER TAKEN 20029a4: b8 10 00 08 mov %o0, %i4 return RTEMS_NO_MEMORY; } if (name != NULL) { 20029a8: 80 a6 a0 00 cmp %i2, 0 20029ac: 02 80 00 12 be 20029f4 20029b0: a4 10 20 00 clr %l2 alloc_name = strdup(name); 20029b4: 40 00 42 a1 call 2013438 20029b8: 90 10 00 1a mov %i2, %o0 if (alloc_name == NULL) { 20029bc: a4 92 20 00 orcc %o0, 0, %l2 20029c0: 12 80 00 17 bne 2002a1c <== ALWAYS TAKEN 20029c4: b4 10 00 08 mov %o0, %i2 free(dd); 20029c8: 40 00 03 e1 call 200394c <== NOT EXECUTED 20029cc: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED return RTEMS_NO_MEMORY; 20029d0: 81 c7 e0 08 ret 20029d4: 81 e8 00 00 restore } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); 20029d8: 40 00 03 dd call 200394c <== NOT EXECUTED 20029dc: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED free(dd); 20029e0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 20029e4: 40 00 03 da call 200394c <== NOT EXECUTED 20029e8: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED return RTEMS_UNSATISFIED; 20029ec: 81 c7 e0 08 ret <== NOT EXECUTED 20029f0: 81 e8 00 00 restore <== NOT EXECUTED } } dd->dev = dev; 20029f4: fa 27 00 00 st %i5, [ %i4 ] 20029f8: f2 27 20 04 st %i1, [ %i4 + 4 ] dd->name = alloc_name; 20029fc: e4 27 20 10 st %l2, [ %i4 + 0x10 ] dd->uses = 0; 2002a00: c0 27 20 14 clr [ %i4 + 0x14 ] dd->deleted = false; 2002a04: c0 2f 20 30 clrb [ %i4 + 0x30 ] *dd_entry = dd; 2002a08: f8 24 40 10 st %i4, [ %l1 + %l0 ] *dd_ptr = dd; 2002a0c: f8 26 c0 00 st %i4, [ %i3 ] return RTEMS_SUCCESSFUL; 2002a10: b0 10 20 00 clr %i0 } 2002a14: 81 c7 e0 08 ret 2002a18: 81 e8 00 00 restore return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { 2002a1c: 13 00 00 18 sethi %hi(0x6000), %o1 2002a20: 94 10 00 1d mov %i5, %o2 2002a24: 92 12 61 ff or %o1, 0x1ff, %o1 2002a28: 40 00 04 eb call 2003dd4 2002a2c: 96 10 00 19 mov %i1, %o3 2002a30: 80 a2 20 00 cmp %o0, 0 2002a34: 36 bf ff f1 bge,a 20029f8 <== ALWAYS TAKEN 2002a38: fa 27 00 00 st %i5, [ %i4 ] 2002a3c: 30 bf ff e7 b,a 20029d8 <== NOT EXECUTED =============================================================================== 0200a09c : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 200a09c: 9d e3 bf a0 save %sp, -96, %sp int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 200a0a0: 80 8e bf f8 btst -8, %i2 200a0a4: 22 80 00 06 be,a 200a0bc <== ALWAYS TAKEN 200a0a8: fa 06 c0 00 ld [ %i3 ], %i5 rtems_set_errno_and_return_minus_one( EPERM ); 200a0ac: 40 00 0a f2 call 200cc74 <__errno> <== NOT EXECUTED 200a0b0: 01 00 00 00 nop <== NOT EXECUTED 200a0b4: 10 80 00 09 b 200a0d8 <== NOT EXECUTED 200a0b8: 82 10 20 01 mov 1, %g1 ! 1 <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) 200a0bc: b8 10 20 00 clr %i4 200a0c0: 80 a7 60 00 cmp %i5, 0 200a0c4: 12 80 00 24 bne 200a154 200a0c8: 21 00 80 60 sethi %hi(0x2018000), %l0 rtems_set_errno_and_return_minus_one( EFAULT ); 200a0cc: 40 00 0a ea call 200cc74 <__errno> 200a0d0: 01 00 00 00 nop 200a0d4: 82 10 20 0e mov 0xe, %g1 ! e 200a0d8: c2 22 00 00 st %g1, [ %o0 ] 200a0dc: 81 c7 e0 08 ret 200a0e0: 91 e8 3f ff restore %g0, -1, %o0 for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 200a0e4: 80 a6 a0 00 cmp %i2, 0 200a0e8: 02 80 00 19 be 200a14c 200a0ec: 90 10 00 18 mov %i0, %o0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 200a0f0: 92 10 00 1a mov %i2, %o1 200a0f4: 40 00 10 42 call 200e1fc 200a0f8: 94 10 00 19 mov %i1, %o2 200a0fc: 80 a2 20 00 cmp %o0, 0 200a100: 32 80 00 14 bne,a 200a150 200a104: b8 07 20 01 inc %i4 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 200a108: c2 4e 80 19 ldsb [ %i2 + %i1 ], %g1 200a10c: 80 a0 60 00 cmp %g1, 0 200a110: 32 80 00 10 bne,a 200a150 200a114: b8 07 20 01 inc %i4 continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 200a118: 03 00 80 60 sethi %hi(0x2018000), %g1 200a11c: 82 10 63 84 or %g1, 0x384, %g1 ! 2018384 200a120: c2 26 e0 08 st %g1, [ %i3 + 8 ] pathloc->ops = &devFS_ops; 200a124: 03 00 80 60 sethi %hi(0x2018000), %g1 200a128: 82 10 63 bc or %g1, 0x3bc, %g1 ! 20183bc 200a12c: c2 26 e0 0c st %g1, [ %i3 + 0xc ] pathloc->mt_entry = rtems_filesystem_root.mt_entry; 200a130: 03 00 80 61 sethi %hi(0x2018400), %g1 200a134: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 ! 2018424 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 200a138: fa 26 c0 00 st %i5, [ %i3 ] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 200a13c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 200a140: c2 26 e0 10 st %g1, [ %i3 + 0x10 ] return 0; 200a144: 81 c7 e0 08 ret 200a148: 91 e8 20 00 restore %g0, 0, %o0 /* 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++) { 200a14c: b8 07 20 01 inc %i4 200a150: ba 07 60 14 add %i5, 0x14, %i5 200a154: c2 04 22 bc ld [ %l0 + 0x2bc ], %g1 200a158: 80 a7 00 01 cmp %i4, %g1 200a15c: 2a bf ff e2 bcs,a 200a0e4 200a160: f4 07 40 00 ld [ %i5 ], %i2 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 200a164: 40 00 0a c4 call 200cc74 <__errno> 200a168: b0 10 3f ff mov -1, %i0 200a16c: 82 10 20 02 mov 2, %g1 200a170: c2 22 00 00 st %g1, [ %o0 ] } 200a174: 81 c7 e0 08 ret 200a178: 81 e8 00 00 restore =============================================================================== 02002cc8 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 2002cc8: 9d e3 bf a0 save %sp, -96, %sp * 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') && 2002ccc: c2 4e 00 00 ldsb [ %i0 ], %g1 2002cd0: 80 a0 60 64 cmp %g1, 0x64 2002cd4: 12 80 00 0e bne 2002d0c 2002cd8: ba 10 00 18 mov %i0, %i5 2002cdc: c2 4e 20 01 ldsb [ %i0 + 1 ], %g1 2002ce0: 80 a0 60 65 cmp %g1, 0x65 2002ce4: 12 80 00 0b bne 2002d10 <== NEVER TAKEN 2002ce8: 03 00 00 3c sethi %hi(0xf000), %g1 2002cec: c2 4e 20 02 ldsb [ %i0 + 2 ], %g1 2002cf0: 80 a0 60 76 cmp %g1, 0x76 2002cf4: 12 80 00 07 bne 2002d10 <== NEVER TAKEN 2002cf8: 03 00 00 3c sethi %hi(0xf000), %g1 (path[2] == 'v') && (path[3] == '\0')) 2002cfc: c2 4e 20 03 ldsb [ %i0 + 3 ], %g1 2002d00: 80 a0 60 00 cmp %g1, 0 2002d04: 02 80 00 37 be 2002de0 2002d08: b0 10 20 00 clr %i0 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 2002d0c: 03 00 00 3c sethi %hi(0xf000), %g1 2002d10: 05 00 00 08 sethi %hi(0x2000), %g2 2002d14: 82 0e 40 01 and %i1, %g1, %g1 2002d18: 80 a0 40 02 cmp %g1, %g2 2002d1c: 22 80 00 0a be,a 2002d44 2002d20: f8 07 00 00 ld [ %i4 ], %i4 2002d24: 05 00 00 18 sethi %hi(0x6000), %g2 2002d28: 80 a0 40 02 cmp %g1, %g2 2002d2c: 22 80 00 06 be,a 2002d44 2002d30: f8 07 00 00 ld [ %i4 ], %i4 rtems_set_errno_and_return_minus_one( EINVAL ); 2002d34: 40 00 27 d0 call 200cc74 <__errno> 2002d38: 01 00 00 00 nop 2002d3c: 10 80 00 19 b 2002da0 2002d40: 82 10 20 16 mov 0x16, %g1 ! 16 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) 2002d44: 80 a7 20 00 cmp %i4, 0 2002d48: 02 80 00 07 be 2002d64 2002d4c: 01 00 00 00 nop 2002d50: a2 10 00 1c mov %i4, %l1 2002d54: b0 10 3f ff mov -1, %i0 2002d58: a0 10 20 00 clr %l0 rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 2002d5c: 10 80 00 16 b 2002db4 2002d60: 25 00 80 60 sethi %hi(0x2018000), %l2 rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 2002d64: 40 00 27 c4 call 200cc74 <__errno> 2002d68: 01 00 00 00 nop 2002d6c: 10 80 00 0d b 2002da0 2002d70: 82 10 20 0e mov 0xe, %g1 ! e for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 2002d74: 80 a2 60 00 cmp %o1, 0 2002d78: 22 80 00 0d be,a 2002dac 2002d7c: b0 10 00 10 mov %l0, %i0 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 2002d80: 40 00 2c c1 call 200e084 2002d84: 90 10 00 1d mov %i5, %o0 2002d88: 80 a2 20 00 cmp %o0, 0 2002d8c: 32 80 00 09 bne,a 2002db0 2002d90: a0 04 20 01 inc %l0 rtems_set_errno_and_return_minus_one( EEXIST ); 2002d94: 40 00 27 b8 call 200cc74 <__errno> 2002d98: 01 00 00 00 nop 2002d9c: 82 10 20 11 mov 0x11, %g1 ! 11 2002da0: c2 22 00 00 st %g1, [ %o0 ] 2002da4: 81 c7 e0 08 ret 2002da8: 91 e8 3f ff restore %g0, -1, %o0 /* 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++){ 2002dac: a0 04 20 01 inc %l0 2002db0: a2 04 60 14 add %l1, 0x14, %l1 2002db4: c2 04 a2 bc ld [ %l2 + 0x2bc ], %g1 2002db8: 80 a4 00 01 cmp %l0, %g1 2002dbc: 2a bf ff ee bcs,a 2002d74 2002dc0: d2 04 40 00 ld [ %l1 ], %o1 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 2002dc4: 80 a6 3f ff cmp %i0, -1 2002dc8: 12 80 00 08 bne 2002de8 2002dcc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); 2002dd0: 40 00 27 a9 call 200cc74 <__errno> 2002dd4: 01 00 00 00 nop 2002dd8: 82 10 20 0c mov 0xc, %g1 ! c 2002ddc: c2 22 00 00 st %g1, [ %o0 ] 2002de0: 81 c7 e0 08 ret 2002de4: 81 e8 00 00 restore _ISR_Disable(level); 2002de8: 7f ff ff 2a call 2002a90 2002dec: 01 00 00 00 nop 2002df0: a2 10 00 08 mov %o0, %l1 device_name_table[slot].device_name = (char *)path; 2002df4: 83 2e 20 02 sll %i0, 2, %g1 device_name_table[slot].device_name_length = strlen(path); 2002df8: 90 10 00 1d mov %i5, %o0 if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; 2002dfc: b1 2e 20 04 sll %i0, 4, %i0 2002e00: b0 00 40 18 add %g1, %i0, %i0 2002e04: a0 07 00 18 add %i4, %i0, %l0 device_name_table[slot].device_name_length = strlen(path); 2002e08: 40 00 2c cc call 200e138 2002e0c: fa 27 00 18 st %i5, [ %i4 + %i0 ] device_name_table[slot].major = major; 2002e10: f4 24 20 08 st %i2, [ %l0 + 8 ] 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); 2002e14: d0 24 20 04 st %o0, [ %l0 + 4 ] device_name_table[slot].major = major; device_name_table[slot].minor = minor; 2002e18: f6 24 20 0c st %i3, [ %l0 + 0xc ] device_name_table[slot].mode = mode; 2002e1c: f2 24 20 10 st %i1, [ %l0 + 0x10 ] _ISR_Enable(level); return 0; 2002e20: b0 10 20 00 clr %i0 device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); 2002e24: 7f ff ff 1f call 2002aa0 2002e28: 90 10 00 11 mov %l1, %o0 return 0; } 2002e2c: 81 c7 e0 08 ret 2002e30: 81 e8 00 00 restore =============================================================================== 02002808 : */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { 2002808: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 200280c: 03 00 80 65 sethi %hi(0x2019400), %g1 2002810: d0 00 63 5c ld [ %g1 + 0x35c ], %o0 ! 201975c 2002814: 92 10 20 00 clr %o1 2002818: 94 10 20 00 clr %o2 200281c: 40 00 12 62 call 20071a4 2002820: b0 10 20 16 mov 0x16, %i0 if (sc == RTEMS_SUCCESSFUL) { 2002824: 80 a2 20 00 cmp %o0, 0 2002828: 12 80 00 05 bne 200283c <== NEVER TAKEN 200282c: 84 10 20 01 mov 1, %g2 diskdevs_protected = true; 2002830: 03 00 80 65 sethi %hi(0x2019400), %g1 return RTEMS_SUCCESSFUL; 2002834: b0 10 20 00 clr %i0 { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc == RTEMS_SUCCESSFUL) { diskdevs_protected = true; 2002838: c4 28 63 58 stb %g2, [ %g1 + 0x358 ] return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; } } 200283c: 81 c7 e0 08 ret 2002840: 81 e8 00 00 restore =============================================================================== 02002844 : static void disk_unlock(void) { 2002844: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 2002848: 03 00 80 65 sethi %hi(0x2019400), %g1 200284c: c0 28 63 58 clrb [ %g1 + 0x358 ] ! 2019758 sc = rtems_semaphore_release(diskdevs_mutex); 2002850: 03 00 80 65 sethi %hi(0x2019400), %g1 2002854: 40 00 12 9e call 20072cc 2002858: d0 00 63 5c ld [ %g1 + 0x35c ], %o0 ! 201975c if (sc != RTEMS_SUCCESSFUL) { 200285c: 80 a2 20 00 cmp %o0, 0 2002860: 02 80 00 04 be 2002870 <== ALWAYS TAKEN 2002864: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0 /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); 2002868: 40 00 13 e9 call 200780c <== NOT EXECUTED 200286c: 90 12 22 ef or %o0, 0x2ef, %o0 ! deadbeef <== NOT EXECUTED 2002870: 81 c7 e0 08 ret 2002874: 81 e8 00 00 restore =============================================================================== 02003d48 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) 2003d48: 9d e3 bf a0 save %sp, -96, %sp { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); 2003d4c: 7f ff f9 0c call 200217c 2003d50: ba 10 00 18 mov %i0, %i5 while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 2003d54: 10 80 00 0f b 2003d90 2003d58: b8 10 20 02 mov 2, %i4 rtems_interrupt_enable (level); 2003d5c: 7f ff f9 0c call 200218c <== NOT EXECUTED 2003d60: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_obtain( 2003d64: d0 07 60 8c ld [ %i5 + 0x8c ], %o0 <== NOT EXECUTED 2003d68: 92 10 20 00 clr %o1 <== NOT EXECUTED 2003d6c: 40 00 09 cd call 20064a0 <== NOT EXECUTED 2003d70: 94 10 20 00 clr %o2 <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2003d74: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2003d78: 02 80 00 04 be 2003d88 <== NOT EXECUTED 2003d7c: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2003d80: 40 00 0b 8c call 2006bb0 <== NOT EXECUTED 2003d84: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_disable (level); 2003d88: 7f ff f8 fd call 200217c <== NOT EXECUTED 2003d8c: 01 00 00 00 nop <== 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) { 2003d90: c4 07 60 84 ld [ %i5 + 0x84 ], %g2 2003d94: c2 07 60 80 ld [ %i5 + 0x80 ], %g1 2003d98: 80 a0 80 01 cmp %g2, %g1 2003d9c: 32 bf ff f0 bne,a 2003d5c <== NEVER TAKEN 2003da0: f8 27 60 94 st %i4, [ %i5 + 0x94 ] <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 2003da4: 7f ff f8 fa call 200218c 2003da8: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02004ab0 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 2004ab0: 9d e3 bf 98 save %sp, -104, %sp if ((tty->termios.c_lflag & ECHOCTL) && 2004ab4: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 2004ab8: 80 88 62 00 btst 0x200, %g1 2004abc: 02 80 00 19 be 2004b20 <== NEVER TAKEN 2004ac0: 90 10 00 18 mov %i0, %o0 iscntrl(c) && (c != '\t') && (c != '\n')) { 2004ac4: 03 00 80 70 sethi %hi(0x201c000), %g1 2004ac8: c2 00 61 5c ld [ %g1 + 0x15c ], %g1 ! 201c15c <__ctype_ptr__> 2004acc: 82 00 40 18 add %g1, %i0, %g1 2004ad0: c2 08 60 01 ldub [ %g1 + 1 ], %g1 2004ad4: 80 88 60 20 btst 0x20, %g1 2004ad8: 02 80 00 12 be 2004b20 2004adc: 80 a6 20 09 cmp %i0, 9 2004ae0: 02 80 00 10 be 2004b20 2004ae4: 80 a6 20 0a cmp %i0, 0xa 2004ae8: 02 80 00 0e be 2004b20 2004aec: 82 10 20 5e mov 0x5e, %g1 char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 2004af0: 90 1e 20 40 xor %i0, 0x40, %o0 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 2004af4: c2 2f bf f8 stb %g1, [ %fp + -8 ] echobuf[1] = c ^ 0x40; 2004af8: d0 2f bf f9 stb %o0, [ %fp + -7 ] rtems_termios_puts (echobuf, 2, tty); 2004afc: 92 10 20 02 mov 2, %o1 2004b00: 90 07 bf f8 add %fp, -8, %o0 2004b04: 7f ff ff 40 call 2004804 2004b08: 94 10 00 19 mov %i1, %o2 tty->column += 2; 2004b0c: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 2004b10: 82 00 60 02 add %g1, 2, %g1 2004b14: c2 26 60 28 st %g1, [ %i1 + 0x28 ] 2004b18: 81 c7 e0 08 ret 2004b1c: 81 e8 00 00 restore } else { oproc (c, tty); 2004b20: 7f ff ff 82 call 2004928 2004b24: 92 10 00 19 mov %i1, %o1 2004b28: 81 c7 e0 08 ret 2004b2c: 81 e8 00 00 restore =============================================================================== 020039ec : void endgrent(void) { if (group_fp != NULL) 20039ec: 03 00 80 5d sethi %hi(0x2017400), %g1 20039f0: d0 00 62 90 ld [ %g1 + 0x290 ], %o0 ! 2017690 20039f4: 80 a2 20 00 cmp %o0, 0 20039f8: 02 80 00 05 be 2003a0c <== NEVER TAKEN 20039fc: 01 00 00 00 nop fclose(group_fp); 2003a00: 82 13 c0 00 mov %o7, %g1 2003a04: 40 00 2f 0e call 200f63c 2003a08: 9e 10 40 00 mov %g1, %o7 2003a0c: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 02003858 : void endpwent(void) { if (passwd_fp != NULL) 2003858: 03 00 80 5d sethi %hi(0x2017400), %g1 200385c: d0 00 61 b0 ld [ %g1 + 0x1b0 ], %o0 ! 20175b0 2003860: 80 a2 20 00 cmp %o0, 0 2003864: 02 80 00 05 be 2003878 <== NEVER TAKEN 2003868: 01 00 00 00 nop fclose(passwd_fp); 200386c: 82 13 c0 00 mov %o7, %g1 2003870: 40 00 2f 73 call 200f63c 2003874: 9e 10 40 00 mov %g1, %o7 2003878: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 02004b30 : * 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) { 2004b30: 9d e3 bf a0 save %sp, -96, %sp if (tty->ccount == 0) 2004b34: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 2004b38: 80 a0 60 00 cmp %g1, 0 2004b3c: 02 80 00 0a be 2004b64 2004b40: ba 10 00 18 mov %i0, %i5 return; if (lineFlag) { 2004b44: 80 a6 60 00 cmp %i1, 0 2004b48: 02 80 00 76 be 2004d20 2004b4c: 35 00 80 6a sethi %hi(0x201a800), %i2 if (!(tty->termios.c_lflag & ECHO)) { 2004b50: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 2004b54: 80 88 60 08 btst 8, %g1 2004b58: 32 80 00 05 bne,a 2004b6c <== ALWAYS TAKEN 2004b5c: 80 88 60 10 btst 0x10, %g1 tty->ccount = 0; 2004b60: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED return; 2004b64: 81 c7 e0 08 ret 2004b68: 81 e8 00 00 restore } if (!(tty->termios.c_lflag & ECHOE)) { 2004b6c: 12 80 00 6d bne 2004d20 <== ALWAYS TAKEN 2004b70: 35 00 80 6a sethi %hi(0x201a800), %i2 tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 2004b74: d0 0e 20 44 ldub [ %i0 + 0x44 ], %o0 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 2004b78: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 2004b7c: 7f ff ff cd call 2004ab0 <== NOT EXECUTED 2004b80: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 2004b84: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 2004b88: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2004b8c: 02 bf ff f6 be 2004b64 <== NOT EXECUTED 2004b90: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED 2004b94: 30 80 00 0e b,a 2004bcc <== NOT EXECUTED } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { 2004b98: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2004b9c: 86 00 ff ff add %g3, -1, %g3 2004ba0: c6 27 60 20 st %g3, [ %i5 + 0x20 ] if (tty->termios.c_lflag & ECHO) { 2004ba4: 80 88 60 08 btst 8, %g1 2004ba8: 02 80 00 59 be 2004d0c <== NEVER TAKEN 2004bac: f8 09 00 03 ldub [ %g4 + %g3 ], %i4 if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 2004bb0: 80 a6 60 00 cmp %i1, 0 2004bb4: 32 80 00 08 bne,a 2004bd4 2004bb8: b8 0f 20 ff and %i4, 0xff, %i4 2004bbc: 80 88 60 10 btst 0x10, %g1 2004bc0: 32 80 00 05 bne,a 2004bd4 <== ALWAYS TAKEN 2004bc4: b8 0f 20 ff and %i4, 0xff, %i4 echo (tty->termios.c_cc[VERASE], tty); 2004bc8: f0 0f 60 43 ldub [ %i5 + 0x43 ], %i0 <== NOT EXECUTED 2004bcc: 7f ff ff b9 call 2004ab0 <== NOT EXECUTED 2004bd0: 93 e8 00 1d restore %g0, %i5, %o1 <== NOT EXECUTED } else if (c == '\t') { 2004bd4: 80 a7 20 09 cmp %i4, 9 2004bd8: 32 80 00 28 bne,a 2004c78 2004bdc: c4 06 e1 5c ld [ %i3 + 0x15c ], %g2 int col = tty->read_start_column; 2004be0: f8 07 60 2c ld [ %i5 + 0x2c ], %i4 */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 2004be4: da 06 e1 5c ld [ %i3 + 0x15c ], %o5 if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; int i = 0; 2004be8: 84 10 20 00 clr %g2 while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 2004bec: 10 80 00 12 b 2004c34 2004bf0: 82 08 62 00 and %g1, 0x200, %g1 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 2004bf4: 80 a3 e0 09 cmp %o7, 9 2004bf8: 12 80 00 04 bne 2004c08 2004bfc: 84 00 a0 01 inc %g2 col = (col | 7) + 1; 2004c00: 10 80 00 0c b 2004c30 2004c04: b8 17 20 07 or %i4, 7, %i4 } else if (iscntrl (c)) { 2004c08: 9e 03 40 0f add %o5, %o7, %o7 2004c0c: de 0b e0 01 ldub [ %o7 + 1 ], %o7 2004c10: 80 8b e0 20 btst 0x20, %o7 2004c14: 22 80 00 08 be,a 2004c34 <== ALWAYS TAKEN 2004c18: b8 07 20 01 inc %i4 if (tty->termios.c_lflag & ECHOCTL) 2004c1c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004c20: 32 80 00 05 bne,a 2004c34 <== NOT EXECUTED 2004c24: b8 07 20 02 add %i4, 2, %i4 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2004c28: 10 80 00 04 b 2004c38 <== NOT EXECUTED 2004c2c: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 2004c30: b8 07 20 01 inc %i4 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2004c34: 80 a0 80 03 cmp %g2, %g3 2004c38: 32 bf ff ef bne,a 2004bf4 2004c3c: de 09 00 02 ldub [ %g4 + %g2 ], %o7 } /* * Back up over the tab */ while (tty->column > col) { 2004c40: 10 80 00 09 b 2004c64 2004c44: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 rtems_termios_puts ("\b", 1, tty); 2004c48: 92 10 20 01 mov 1, %o1 2004c4c: 7f ff fe ee call 2004804 2004c50: 94 10 00 1d mov %i5, %o2 tty->column--; 2004c54: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 2004c58: 82 00 7f ff add %g1, -1, %g1 2004c5c: c2 27 60 28 st %g1, [ %i5 + 0x28 ] } /* * Back up over the tab */ while (tty->column > col) { 2004c60: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 2004c64: 80 a0 40 1c cmp %g1, %i4 2004c68: 14 bf ff f8 bg 2004c48 2004c6c: 90 10 00 18 mov %i0, %o0 if (tty->column) tty->column--; } } } if (!lineFlag) 2004c70: 10 80 00 28 b 2004d10 2004c74: 80 a6 60 00 cmp %i1, 0 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 2004c78: b8 07 20 01 inc %i4 2004c7c: c4 08 80 1c ldub [ %g2 + %i4 ], %g2 2004c80: 80 88 a0 20 btst 0x20, %g2 2004c84: 22 80 00 10 be,a 2004cc4 <== ALWAYS TAKEN 2004c88: c2 06 e1 5c ld [ %i3 + 0x15c ], %g1 2004c8c: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 2004c90: 02 80 00 0d be 2004cc4 <== NOT EXECUTED 2004c94: c2 06 e1 5c ld [ %i3 + 0x15c ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 2004c98: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 2004c9c: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 2004ca0: 7f ff fe d9 call 2004804 <== NOT EXECUTED 2004ca4: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED if (tty->column) 2004ca8: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 <== NOT EXECUTED 2004cac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004cb0: 22 80 00 05 be,a 2004cc4 <== NOT EXECUTED 2004cb4: c2 06 e1 5c ld [ %i3 + 0x15c ], %g1 <== NOT EXECUTED tty->column--; 2004cb8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2004cbc: c2 27 60 28 st %g1, [ %i5 + 0x28 ] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 2004cc0: c2 06 e1 5c ld [ %i3 + 0x15c ], %g1 <== NOT EXECUTED 2004cc4: c2 08 40 1c ldub [ %g1 + %i4 ], %g1 2004cc8: 80 88 60 20 btst 0x20, %g1 2004ccc: 02 80 00 07 be 2004ce8 <== ALWAYS TAKEN 2004cd0: 90 10 00 1a mov %i2, %o0 2004cd4: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED 2004cd8: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 2004cdc: 02 80 00 0d be 2004d10 <== NOT EXECUTED 2004ce0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 2004ce4: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 2004ce8: 92 10 20 03 mov 3, %o1 2004cec: 7f ff fe c6 call 2004804 2004cf0: 94 10 00 1d mov %i5, %o2 if (tty->column) 2004cf4: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 2004cf8: 80 a0 60 00 cmp %g1, 0 2004cfc: 02 80 00 05 be 2004d10 <== NEVER TAKEN 2004d00: 80 a6 60 00 cmp %i1, 0 tty->column--; 2004d04: 82 00 7f ff add %g1, -1, %g1 2004d08: c2 27 60 28 st %g1, [ %i5 + 0x28 ] } } } if (!lineFlag) 2004d0c: 80 a6 60 00 cmp %i1, 0 2004d10: 32 80 00 09 bne,a 2004d34 2004d14: c6 07 60 20 ld [ %i5 + 0x20 ], %g3 2004d18: 81 c7 e0 08 ret 2004d1c: 81 e8 00 00 restore /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 2004d20: 31 00 80 6a sethi %hi(0x201a800), %i0 2004d24: 37 00 80 70 sethi %hi(0x201c000), %i3 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); 2004d28: b4 16 a1 c8 or %i2, 0x1c8, %i2 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 2004d2c: b0 16 21 c0 or %i0, 0x1c0, %i0 echo ('\n', tty); return; } } while (tty->ccount) { 2004d30: c6 07 60 20 ld [ %i5 + 0x20 ], %g3 2004d34: 80 a0 e0 00 cmp %g3, 0 2004d38: 32 bf ff 98 bne,a 2004b98 2004d3c: c8 07 60 1c ld [ %i5 + 0x1c ], %g4 2004d40: 81 c7 e0 08 ret 2004d44: 81 e8 00 00 restore =============================================================================== 02012a38 : #include "fat_fat_operations.h" int fat_buf_access(fat_fs_info_t *fs_info, uint32_t blk, int op_type, rtems_bdbuf_buffer **buf) { 2012a38: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 2012a3c: c2 0e 20 85 ldub [ %i0 + 0x85 ], %g1 2012a40: 80 a0 60 00 cmp %g1, 0 2012a44: 32 80 00 15 bne,a 2012a98 2012a48: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 { if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 2012a4c: 94 10 00 19 mov %i1, %o2 bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) 2012a50: 80 a6 a0 01 cmp %i2, 1 2012a54: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 2012a58: 12 80 00 06 bne 2012a70 2012a5c: 96 06 20 88 add %i0, 0x88, %o3 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 2012a60: 7f ff f9 ae call 2011118 2012a64: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 2012a68: 10 80 00 05 b 2012a7c 2012a6c: 80 a2 20 00 cmp %o0, 0 if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 2012a70: 7f ff f9 75 call 2011044 2012a74: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 2012a78: 80 a2 20 00 cmp %o0, 0 2012a7c: 12 80 00 62 bne 2012c04 <== NEVER TAKEN 2012a80: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; 2012a84: 82 10 20 01 mov 1, %g1 ! 1 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 2012a88: f2 26 20 80 st %i1, [ %i0 + 0x80 ] fs_info->c.modified = 0; 2012a8c: c0 2e 20 84 clrb [ %i0 + 0x84 ] fs_info->c.state = FAT_CACHE_ACTUAL; 2012a90: c2 2e 20 85 stb %g1, [ %i0 + 0x85 ] } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2012a94: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 2012a98: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 2012a9c: 80 a0 40 02 cmp %g1, %g2 2012aa0: 0a 80 00 05 bcs 2012ab4 <== NEVER TAKEN 2012aa4: b8 10 20 00 clr %i4 2012aa8: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 2012aac: 80 a0 40 02 cmp %g1, %g2 2012ab0: b8 40 20 00 addx %g0, 0, %i4 (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) 2012ab4: 80 a0 40 19 cmp %g1, %i1 2012ab8: 22 80 00 5c be,a 2012c28 2012abc: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 { if (fs_info->c.modified) 2012ac0: c2 0e 20 84 ldub [ %i0 + 0x84 ], %g1 2012ac4: 80 a0 60 00 cmp %g1, 0 2012ac8: 02 80 00 3c be 2012bb8 2012acc: 80 8f 20 ff btst 0xff, %i4 { if (sec_of_fat && !fs_info->vol.mirror) 2012ad0: 02 80 00 0b be 2012afc <== ALWAYS TAKEN 2012ad4: 01 00 00 00 nop 2012ad8: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 2012adc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2012ae0: 12 80 00 07 bne 2012afc <== NOT EXECUTED 2012ae4: 01 00 00 00 nop <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, 2012ae8: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 <== NOT EXECUTED 2012aec: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 2012af0: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 <== NOT EXECUTED 2012af4: 40 00 28 a4 call 201cd84 <== NOT EXECUTED 2012af8: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 2012afc: 7f ff fa 5d call 2011470 2012b00: d0 06 20 88 ld [ %i0 + 0x88 ], %o0 fs_info->c.state = FAT_CACHE_EMPTY; 2012b04: c0 2e 20 85 clrb [ %i0 + 0x85 ] fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 2012b08: 80 a2 20 00 cmp %o0, 0 2012b0c: 12 80 00 3e bne 2012c04 <== NEVER TAKEN 2012b10: c0 2e 20 84 clrb [ %i0 + 0x84 ] rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 2012b14: 80 8f 20 ff btst 0xff, %i4 2012b18: 02 80 00 2e be 2012bd0 <== ALWAYS TAKEN 2012b1c: 94 10 00 19 mov %i1, %o2 2012b20: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 2012b24: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2012b28: 02 80 00 1d be 2012b9c <== NOT EXECUTED 2012b2c: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) 2012b30: 10 80 00 29 b 2012bd4 <== NOT EXECUTED 2012b34: 80 a6 a0 01 cmp %i2, 1 <== NOT EXECUTED for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, fs_info->c.blk_num + fs_info->vol.fat_length * i, 2012b38: 40 00 58 70 call 2028cf8 <.umul> <== NOT EXECUTED 2012b3c: f8 1e 20 58 ldd [ %i0 + 0x58 ], %i4 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, 2012b40: d4 06 20 80 ld [ %i0 + 0x80 ], %o2 <== NOT EXECUTED 2012b44: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED 2012b48: 94 02 00 0a add %o0, %o2, %o2 <== NOT EXECUTED 2012b4c: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED 2012b50: 7f ff f9 3d call 2011044 <== NOT EXECUTED 2012b54: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 2012b58: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012b5c: 12 80 00 0c bne 2012b8c <== NOT EXECUTED 2012b60: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 2012b64: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2012b68: d2 06 20 8c ld [ %i0 + 0x8c ], %o1 <== NOT EXECUTED 2012b6c: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 <== NOT EXECUTED 2012b70: 40 00 28 85 call 201cd84 <== NOT EXECUTED 2012b74: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 2012b78: 7f ff fa 3e call 2011470 <== NOT EXECUTED 2012b7c: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 2012b80: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012b84: 22 80 00 06 be,a 2012b9c <== NOT EXECUTED 2012b88: a0 04 20 01 inc %l0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 2012b8c: 40 00 25 af call 201c248 <__errno> <== NOT EXECUTED 2012b90: 01 00 00 00 nop <== NOT EXECUTED 2012b94: 10 80 00 1f b 2012c10 <== NOT EXECUTED 2012b98: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 2012b9c: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 <== NOT EXECUTED 2012ba0: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 2012ba4: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 2012ba8: 2a bf ff e4 bcs,a 2012b38 <== NOT EXECUTED 2012bac: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 2012bb0: 10 80 00 08 b 2012bd0 <== NOT EXECUTED 2012bb4: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 2012bb8: 7f ff f9 f2 call 2011380 2012bbc: d0 06 20 88 ld [ %i0 + 0x88 ], %o0 fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) 2012bc0: 80 a2 20 00 cmp %o0, 0 2012bc4: 12 80 00 10 bne 2012c04 <== NEVER TAKEN 2012bc8: c0 2e 20 85 clrb [ %i0 + 0x85 ] rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 2012bcc: 94 10 00 19 mov %i1, %o2 fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) 2012bd0: 80 a6 a0 01 cmp %i2, 1 2012bd4: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 2012bd8: 12 80 00 06 bne 2012bf0 2012bdc: 96 06 20 88 add %i0, 0x88, %o3 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 2012be0: 7f ff f9 4e call 2011118 2012be4: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 2012be8: 10 80 00 05 b 2012bfc 2012bec: 80 a2 20 00 cmp %o0, 0 } if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 2012bf0: 7f ff f9 15 call 2011044 2012bf4: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 2012bf8: 80 a2 20 00 cmp %o0, 0 2012bfc: 02 80 00 08 be 2012c1c <== ALWAYS TAKEN 2012c00: 82 10 20 01 mov 1, %g1 rtems_set_errno_and_return_minus_one(EIO); 2012c04: 40 00 25 91 call 201c248 <__errno> <== NOT EXECUTED 2012c08: 01 00 00 00 nop <== NOT EXECUTED 2012c0c: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2012c10: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012c14: 81 c7 e0 08 ret <== NOT EXECUTED 2012c18: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED fs_info->c.blk_num = blk; 2012c1c: f2 26 20 80 st %i1, [ %i0 + 0x80 ] fs_info->c.state = FAT_CACHE_ACTUAL; 2012c20: c2 2e 20 85 stb %g1, [ %i0 + 0x85 ] } *buf = fs_info->c.buf; 2012c24: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 2012c28: c2 26 c0 00 st %g1, [ %i3 ] return RC_OK; } 2012c2c: 81 c7 e0 08 ret 2012c30: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02012c34 : int fat_buf_release(fat_fs_info_t *fs_info) { 2012c34: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 2012c38: c2 0e 20 85 ldub [ %i0 + 0x85 ], %g1 return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 2012c3c: b6 10 00 18 mov %i0, %i3 rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 2012c40: 80 a0 60 00 cmp %g1, 0 2012c44: 02 80 00 54 be 2012d94 2012c48: b0 10 20 00 clr %i0 return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2012c4c: c2 06 e0 80 ld [ %i3 + 0x80 ], %g1 2012c50: c4 16 e0 14 lduh [ %i3 + 0x14 ], %g2 2012c54: 80 a0 40 02 cmp %g1, %g2 2012c58: 0a 80 00 05 bcs 2012c6c <== NEVER TAKEN 2012c5c: b8 10 20 00 clr %i4 *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) 2012c60: c4 06 e0 1c ld [ %i3 + 0x1c ], %g2 2012c64: 80 a0 40 02 cmp %g1, %g2 2012c68: b8 40 20 00 addx %g0, 0, %i4 return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) 2012c6c: c2 0e e0 84 ldub [ %i3 + 0x84 ], %g1 2012c70: 80 a0 60 00 cmp %g1, 0 2012c74: 02 80 00 3b be 2012d60 2012c78: 80 8f 20 ff btst 0xff, %i4 { if (sec_of_fat && !fs_info->vol.mirror) 2012c7c: 02 80 00 0b be 2012ca8 2012c80: 01 00 00 00 nop 2012c84: c2 0e e0 48 ldub [ %i3 + 0x48 ], %g1 2012c88: 80 a0 60 00 cmp %g1, 0 2012c8c: 12 80 00 07 bne 2012ca8 <== NEVER TAKEN 2012c90: 01 00 00 00 nop memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 2012c94: c2 06 e0 88 ld [ %i3 + 0x88 ], %g1 2012c98: d0 06 e0 8c ld [ %i3 + 0x8c ], %o0 2012c9c: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 2012ca0: 40 00 28 39 call 201cd84 2012ca4: d4 16 c0 00 lduh [ %i3 ], %o2 sc = rtems_bdbuf_release_modified(fs_info->c.buf); 2012ca8: 7f ff f9 f2 call 2011470 2012cac: d0 06 e0 88 ld [ %i3 + 0x88 ], %o0 if (sc != RTEMS_SUCCESSFUL) 2012cb0: 80 a2 20 00 cmp %o0, 0 2012cb4: 12 80 00 30 bne 2012d74 <== NEVER TAKEN 2012cb8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; if (sec_of_fat && !fs_info->vol.mirror) 2012cbc: 80 8f 20 ff btst 0xff, %i4 2012cc0: 02 80 00 33 be 2012d8c 2012cc4: c0 2e e0 84 clrb [ %i3 + 0x84 ] 2012cc8: c2 0e e0 48 ldub [ %i3 + 0x48 ], %g1 2012ccc: 80 a0 60 00 cmp %g1, 0 2012cd0: 02 80 00 1d be 2012d44 <== ALWAYS TAKEN 2012cd4: b4 10 20 01 mov 1, %i2 { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; 2012cd8: 10 80 00 2e b 2012d90 <== NOT EXECUTED 2012cdc: c0 2e e0 85 clrb [ %i3 + 0x85 ] <== NOT EXECUTED for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, fs_info->c.blk_num + fs_info->vol.fat_length * i, 2012ce0: 40 00 58 06 call 2028cf8 <.umul> 2012ce4: f8 1e e0 58 ldd [ %i3 + 0x58 ], %i4 { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, 2012ce8: d4 06 e0 80 ld [ %i3 + 0x80 ], %o2 2012cec: 92 10 00 1d mov %i5, %o1 2012cf0: 94 02 00 0a add %o0, %o2, %o2 2012cf4: 96 07 bf fc add %fp, -4, %o3 2012cf8: 7f ff f8 d3 call 2011044 2012cfc: 90 10 00 1c mov %i4, %o0 fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 2012d00: 80 a2 20 00 cmp %o0, 0 2012d04: 12 80 00 0c bne 2012d34 <== NEVER TAKEN 2012d08: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 2012d0c: c2 07 bf fc ld [ %fp + -4 ], %g1 2012d10: d2 06 e0 8c ld [ %i3 + 0x8c ], %o1 2012d14: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 2012d18: 40 00 28 1b call 201cd84 2012d1c: d4 16 c0 00 lduh [ %i3 ], %o2 sc = rtems_bdbuf_release_modified(b); 2012d20: 7f ff f9 d4 call 2011470 2012d24: d0 07 bf fc ld [ %fp + -4 ], %o0 if ( sc != RTEMS_SUCCESSFUL) 2012d28: 80 a2 20 00 cmp %o0, 0 2012d2c: 22 80 00 06 be,a 2012d44 <== ALWAYS TAKEN 2012d30: b4 06 a0 01 inc %i2 rtems_set_errno_and_return_minus_one(ENOMEM); 2012d34: 40 00 25 45 call 201c248 <__errno> <== NOT EXECUTED 2012d38: 01 00 00 00 nop <== NOT EXECUTED 2012d3c: 10 80 00 11 b 2012d80 <== NOT EXECUTED 2012d40: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 2012d44: c2 0e e0 09 ldub [ %i3 + 9 ], %g1 2012d48: 90 0e a0 ff and %i2, 0xff, %o0 2012d4c: 80 a2 00 01 cmp %o0, %g1 2012d50: 2a bf ff e4 bcs,a 2012ce0 2012d54: d2 06 e0 18 ld [ %i3 + 0x18 ], %o1 { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; 2012d58: 10 80 00 0e b 2012d90 2012d5c: c0 2e e0 85 clrb [ %i3 + 0x85 ] } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 2012d60: 7f ff f9 88 call 2011380 2012d64: d0 06 e0 88 ld [ %i3 + 0x88 ], %o0 if (sc != RTEMS_SUCCESSFUL) 2012d68: 80 a2 20 00 cmp %o0, 0 2012d6c: 22 80 00 09 be,a 2012d90 <== ALWAYS TAKEN 2012d70: c0 2e e0 85 clrb [ %i3 + 0x85 ] rtems_set_errno_and_return_minus_one(EIO); 2012d74: 40 00 25 35 call 201c248 <__errno> <== NOT EXECUTED 2012d78: 01 00 00 00 nop <== NOT EXECUTED 2012d7c: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2012d80: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012d84: 81 c7 e0 08 ret <== NOT EXECUTED 2012d88: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; 2012d8c: c0 2e e0 85 clrb [ %i3 + 0x85 ] return RC_OK; 2012d90: b0 10 20 00 clr %i0 } 2012d94: 81 c7 e0 08 ret 2012d98: 81 e8 00 00 restore =============================================================================== 02011d3c : uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 2011d3c: 80 a2 60 00 cmp %o1, 0 2011d40: 32 80 00 08 bne,a 2011d60 2011d44: c2 0a 20 05 ldub [ %o0 + 5 ], %g1 2011d48: c2 0a 20 0a ldub [ %o0 + 0xa ], %g1 2011d4c: 80 88 60 03 btst 3, %g1 2011d50: 22 80 00 04 be,a 2011d60 <== NEVER TAKEN 2011d54: c2 0a 20 05 ldub [ %o0 + 5 ], %g1 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2011d58: 81 c3 e0 08 retl 2011d5c: d0 02 20 1c ld [ %o0 + 0x1c ], %o0 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2011d60: 92 02 7f fe add %o1, -2, %o1 2011d64: 93 2a 40 01 sll %o1, %g1, %o1 2011d68: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 fs_info->vol.data_fsec); } 2011d6c: 81 c3 e0 08 retl 2011d70: 90 02 40 01 add %o1, %g1, %o0 =============================================================================== 02012ecc : fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 2012ecc: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 2012ed0: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); 2012ed4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2012ed8: 7f ff fe ca call 2012a00 <== NOT EXECUTED 2012edc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED return _fat_block_read(mt_entry, fsec, 0, fs_info->vol.spc << fs_info->vol.sec_log2, buff); 2012ee0: c2 0f 60 02 ldub [ %i5 + 2 ], %g1 <== NOT EXECUTED 2012ee4: f6 0f 60 04 ldub [ %i5 + 4 ], %i3 <== NOT EXECUTED fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 2012ee8: b8 10 00 1a mov %i2, %i4 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, 2012eec: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED 2012ef0: b7 2e c0 01 sll %i3, %g1, %i3 <== NOT EXECUTED 2012ef4: 7f ff ff aa call 2012d9c <_fat_block_read> <== NOT EXECUTED 2012ef8: 95 e8 20 00 restore %g0, 0, %o2 <== NOT EXECUTED =============================================================================== 020130f8 : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 20130f8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ssize_t ret1 = 0, ret2 = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; 20130fc: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED uint32_t le_free_count = 0; uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); 2013100: 7f ff fe 34 call 20129d0 <== NOT EXECUTED 2013104: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2013108: d0 27 bf f8 st %o0, [ %fp + -8 ] <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 201310c: 7f ff fe 31 call 20129d0 <== NOT EXECUTED 2013110: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 2013114: d2 17 60 3c lduh [ %i5 + 0x3c ], %o1 <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t le_free_count = 0; uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); le_next_free = CT_LE_L(next_free); 2013118: d0 27 bf fc st %o0, [ %fp + -4 ] <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 201311c: 94 10 21 e8 mov 0x1e8, %o2 <== NOT EXECUTED 2013120: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2013124: 98 07 bf f8 add %fp, -8, %o4 <== NOT EXECUTED 2013128: 7f ff ff 3f call 2012e24 <_fat_block_write> <== NOT EXECUTED 201312c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, 4, (char *)(&le_free_count)); ret2 = _fat_block_write(mt_entry, 2013130: d2 17 60 3c lduh [ %i5 + 0x3c ], %o1 <== NOT EXECUTED uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); le_next_free = CT_LE_L(next_free); ret1 = _fat_block_write(mt_entry, 2013134: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, 4, (char *)(&le_free_count)); ret2 = _fat_block_write(mt_entry, 2013138: 94 10 21 ec mov 0x1ec, %o2 <== NOT EXECUTED 201313c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2013140: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2013144: 7f ff ff 38 call 2012e24 <_fat_block_write> <== NOT EXECUTED 2013148: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET, 4, (char *)(&le_next_free)); if ( (ret1 < 0) || (ret2 < 0) ) 201314c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2013150: 06 80 00 04 bl 2013160 <== NOT EXECUTED 2013154: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 2013158: 16 80 00 03 bge 2013164 <== NOT EXECUTED 201315c: b0 10 20 00 clr %i0 <== NOT EXECUTED return -1; 2013160: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return RC_OK; } 2013164: 81 c7 e0 08 ret <== NOT EXECUTED 2013168: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0201225c : int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 201225c: 9d e3 bf a0 save %sp, -96, %sp /* * if links_num field of fat-file descriptor is greater than 1 * decrement the count of links and return */ if (fat_fd->links_num > 1) 2012260: c2 06 60 08 ld [ %i1 + 8 ], %g1 2012264: 80 a0 60 01 cmp %g1, 1 2012268: 08 80 00 06 bleu 2012280 201226c: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 { fat_fd->links_num--; 2012270: 82 00 7f ff add %g1, -1, %g1 return rc; 2012274: 90 10 20 00 clr %o0 2012278: 10 80 00 25 b 201230c 201227c: c2 26 60 08 st %g1, [ %i1 + 8 ] } key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) 2012280: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 2012284: 80 88 60 01 btst 1, %g1 2012288: 02 80 00 14 be 20122d8 <== ALWAYS TAKEN 201228c: 90 10 00 18 mov %i0, %o0 { rc = fat_file_truncate(mt_entry, fat_fd, 0); 2012290: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2012294: 7f ff ff ae call 201214c <== NOT EXECUTED 2012298: 94 10 20 00 clr %o2 <== NOT EXECUTED if ( rc != RC_OK ) 201229c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20122a0: 12 80 00 1b bne 201230c <== NOT EXECUTED 20122a4: 01 00 00 00 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 20122a8: 7f ff e2 28 call 200ab48 <_Chain_Extract> <== NOT EXECUTED 20122ac: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(mt_entry, fat_fd->ino) ) 20122b0: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED 20122b4: 40 00 03 8c call 20130e4 <== NOT EXECUTED 20122b8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20122bc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED 20122c0: 02 80 00 0f be 20122fc <== NOT EXECUTED 20122c4: 01 00 00 00 nop <== NOT EXECUTED fat_free_unique_ino(mt_entry, fat_fd->ino); 20122c8: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED 20122cc: 40 00 03 7a call 20130b4 <== NOT EXECUTED 20122d0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20122d4: 30 80 00 0a b,a 20122fc <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 20122d8: 40 00 03 83 call 20130e4 20122dc: d2 06 60 0c ld [ %i1 + 0xc ], %o1 20122e0: 80 8a 20 ff btst 0xff, %o0 20122e4: 02 80 00 04 be 20122f4 <== ALWAYS TAKEN 20122e8: 01 00 00 00 nop { fat_fd->links_num = 0; 20122ec: 10 80 00 06 b 2012304 <== NOT EXECUTED 20122f0: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED 20122f4: 7f ff e2 15 call 200ab48 <_Chain_Extract> 20122f8: 90 10 00 19 mov %i1, %o0 } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 20122fc: 7f ff ce 5c call 2005c6c 2012300: 90 10 00 19 mov %i1, %o0 } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 2012304: 40 00 02 4c call 2012c34 2012308: 91 e8 00 1c restore %g0, %i4, %o0 return rc; } 201230c: 81 c7 e0 08 ret 2012310: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02012830 : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2012830: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; 2012834: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; 2012838: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED ) { int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; 201283c: c2 27 bf f8 st %g1, [ %fp + -8 ] <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) 2012840: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2012844: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; 2012848: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; rtems_bdbuf_buffer *block = NULL; uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) 201284c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2012850: 02 80 00 07 be 201286c <== NOT EXECUTED 2012854: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * we can use only one bdbuf :( and we also know that cache is useless * for sync operation, so don't use it */ rc = fat_buf_release(fs_info); 2012858: 40 00 00 f7 call 2012c34 <== NOT EXECUTED 201285c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED if (rc != RC_OK) 2012860: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2012864: 02 80 00 24 be 20128f4 <== NOT EXECUTED 2012868: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED 201286c: 81 c7 e0 08 ret <== NOT EXECUTED 2012870: 81 e8 00 00 restore <== NOT EXECUTED return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 2012874: 7f ff fd 32 call 2011d3c <== NOT EXECUTED 2012878: b6 10 20 00 clr %i3 <== NOT EXECUTED /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 201287c: 10 80 00 13 b 20128c8 <== NOT EXECUTED 2012880: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 2012884: 94 06 c0 1a add %i3, %i2, %o2 <== NOT EXECUTED 2012888: 7f ff fa 24 call 2011118 <== NOT EXECUTED 201288c: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2012890: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012894: 12 80 00 07 bne 20128b0 <== NOT EXECUTED 2012898: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 201289c: 7f ff fb 1b call 2011508 <== NOT EXECUTED 20128a0: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 20128a4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20128a8: 22 80 00 08 be,a 20128c8 <== NOT EXECUTED 20128ac: b6 06 e0 01 inc %i3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 20128b0: 40 00 26 66 call 201c248 <__errno> <== NOT EXECUTED 20128b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20128b8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 20128bc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20128c0: 81 c7 e0 08 ret <== NOT EXECUTED 20128c4: 81 e8 00 00 restore <== NOT EXECUTED /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 20128c8: c2 0f 20 04 ldub [ %i4 + 4 ], %g1 <== NOT EXECUTED 20128cc: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED 20128d0: 2a bf ff ed bcs,a 2012884 <== NOT EXECUTED 20128d4: d0 1f 20 58 ldd [ %i4 + 0x58 ], %o0 <== NOT EXECUTED sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 20128d8: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED 20128dc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20128e0: 40 00 1e 8d call 201a314 <== NOT EXECUTED 20128e4: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 20128e8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20128ec: 12 80 00 0a bne 2012914 <== NOT EXECUTED 20128f0: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED rc = fat_buf_release(fs_info); if (rc != RC_OK) return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 20128f4: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED 20128f8: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 <== NOT EXECUTED 20128fc: 84 0a 40 02 and %o1, %g2, %g2 <== NOT EXECUTED 2012900: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2012904: 2a bf ff dc bcs,a 2012874 <== NOT EXECUTED 2012908: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 <== NOT EXECUTED 201290c: 81 c7 e0 08 ret <== NOT EXECUTED 2012910: 81 e8 00 00 restore <== NOT EXECUTED sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2012914: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED if ( rc != RC_OK ) return rc; } return rc; } 2012918: 81 c7 e0 08 ret <== NOT EXECUTED 201291c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020123e8 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 20123e8: 9d e3 bf 90 save %sp, -112, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 20123ec: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 uint32_t old_last_cl; uint32_t last_cl = 0; uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; 20123f0: f4 26 c0 00 st %i2, [ %i3 ] if (new_length <= fat_fd->fat_file_size) 20123f4: e4 06 60 18 ld [ %i1 + 0x18 ], %l2 uint32_t *a_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t chain = 0; 20123f8: c0 27 bf f0 clr [ %fp + -16 ] uint32_t bytes2add = 0; uint32_t cls2add = 0; uint32_t old_last_cl; uint32_t last_cl = 0; 20123fc: c0 27 bf f8 clr [ %fp + -8 ] rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 2012400: ba 10 00 18 mov %i0, %i5 uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) 2012404: 80 a6 80 12 cmp %i2, %l2 2012408: 08 80 00 2d bleu 20124bc 201240c: b0 10 20 00 clr %i0 return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2012410: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2012414: 80 a0 60 01 cmp %g1, 1 2012418: 32 80 00 0b bne,a 2012444 <== ALWAYS TAKEN 201241c: c4 17 20 06 lduh [ %i4 + 6 ], %g2 2012420: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED 2012424: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2012428: 32 80 00 07 bne,a 2012444 <== NOT EXECUTED 201242c: c4 17 20 06 lduh [ %i4 + 6 ], %g2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2012430: c2 0f 20 0a ldub [ %i4 + 0xa ], %g1 <== NOT EXECUTED *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2012434: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 2012438: 12 80 00 1d bne 20124ac <== NOT EXECUTED 201243c: 01 00 00 00 nop <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & 2012440: c4 17 20 06 lduh [ %i4 + 6 ], %g2 <== NOT EXECUTED 2012444: 82 00 bf ff add %g2, -1, %g1 2012448: a0 08 40 12 and %g1, %l2, %l0 (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 201244c: a4 26 80 12 sub %i2, %l2, %l2 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - 2012450: a0 20 80 10 sub %g2, %l0, %l0 2012454: a0 0c 00 01 and %l0, %g1, %l0 (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; if (bytes2add > bytes_remain) 2012458: 80 a4 80 10 cmp %l2, %l0 201245c: 08 80 00 18 bleu 20124bc 2012460: b0 10 20 00 clr %i0 /* * if in last cluster allocated for the file there is enough room to * handle extention (hence we don't need to add even one cluster to the * file ) - return */ if (bytes2add == 0) 2012464: a4 a4 80 10 subcc %l2, %l0, %l2 2012468: 02 80 00 15 be 20124bc <== NEVER TAKEN 201246c: a2 04 bf ff add %l2, -1, %l1 return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 2012470: c2 0f 20 08 ldub [ %i4 + 8 ], %g1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2012474: 90 10 00 1d mov %i5, %o0 * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 2012478: a3 34 40 01 srl %l1, %g1, %l1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 201247c: 92 07 bf f0 add %fp, -16, %o1 * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 2012480: a2 04 60 01 inc %l1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2012484: 96 07 bf fc add %fp, -4, %o3 2012488: 94 10 00 11 mov %l1, %o2 201248c: 40 00 20 f1 call 201a850 2012490: 98 07 bf f8 add %fp, -8, %o4 &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) 2012494: b0 92 20 00 orcc %o0, 0, %i0 2012498: 12 80 00 09 bne 20124bc <== NEVER TAKEN 201249c: c2 07 bf fc ld [ %fp + -4 ], %g1 return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) 20124a0: 80 94 00 01 orcc %l0, %g1, %g0 20124a4: 12 80 00 08 bne 20124c4 <== ALWAYS TAKEN 20124a8: 80 a4 40 01 cmp %l1, %g1 rtems_set_errno_and_return_minus_one(ENOSPC); 20124ac: 40 00 27 67 call 201c248 <__errno> <== NOT EXECUTED 20124b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20124b4: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 20124b8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20124bc: 81 c7 e0 08 ret 20124c0: 81 e8 00 00 restore /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 20124c4: 02 80 00 0b be 20124f0 <== ALWAYS TAKEN 20124c8: 82 38 00 01 xnor %g0, %g1, %g1 *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 20124cc: c4 0f 20 08 ldub [ %i4 + 8 ], %g2 <== NOT EXECUTED 20124d0: a2 00 40 11 add %g1, %l1, %l1 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 20124d4: c2 17 20 06 lduh [ %i4 + 6 ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 20124d8: a3 2c 40 02 sll %l1, %g2, %l1 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 20124dc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if ((cls_added == 0) && (bytes_remain == 0)) rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) *a_length = new_length - 20124e0: a2 26 80 11 sub %i2, %l1, %l1 <== NOT EXECUTED ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - (bytes2add & (fs_info->vol.bpc - 1)); 20124e4: a4 0c 80 01 and %l2, %g1, %l2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 20124e8: a4 24 40 12 sub %l1, %l2, %l2 <== NOT EXECUTED if ((cls_added == 0) && (bytes_remain == 0)) rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) *a_length = new_length - 20124ec: e4 26 c0 00 st %l2, [ %i3 ] <== NOT EXECUTED ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - (bytes2add & (fs_info->vol.bpc - 1)); /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) 20124f0: d6 06 60 18 ld [ %i1 + 0x18 ], %o3 20124f4: 80 a2 e0 00 cmp %o3, 0 20124f8: 32 80 00 07 bne,a 2012514 20124fc: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 { fat_fd->map.disk_cln = fat_fd->cln = chain; 2012500: c2 07 bf f0 ld [ %fp + -16 ], %g1 fat_fd->map.file_cln = 0; 2012504: c0 26 60 34 clr [ %i1 + 0x34 ] (bytes2add & (fs_info->vol.bpc - 1)); /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) { fat_fd->map.disk_cln = fat_fd->cln = chain; 2012508: c2 26 60 1c st %g1, [ %i1 + 0x1c ] 201250c: 10 80 00 1d b 2012580 2012510: c2 26 60 38 st %g1, [ %i1 + 0x38 ] fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 2012514: 80 a0 7f ff cmp %g1, -1 2012518: 02 80 00 04 be 2012528 <== NEVER TAKEN 201251c: 90 10 00 1d mov %i5, %o0 { old_last_cl = fat_fd->map.last_cln; 2012520: 10 80 00 0a b 2012548 2012524: c2 27 bf f4 st %g1, [ %fp + -12 ] } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, 2012528: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 201252c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2012530: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 2012534: 7f ff ff 78 call 2012314 <== NOT EXECUTED 2012538: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 201253c: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED 2012540: 12 80 00 09 bne 2012564 <== NOT EXECUTED 2012544: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 2012548: d2 07 bf f4 ld [ %fp + -12 ], %o1 201254c: d4 07 bf f0 ld [ %fp + -16 ], %o2 2012550: 40 00 1f e1 call 201a4d4 2012554: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) 2012558: b6 92 20 00 orcc %o0, 0, %i3 201255c: 02 80 00 07 be 2012578 <== ALWAYS TAKEN 2012560: d2 07 bf f0 ld [ %fp + -16 ], %o1 { fat_free_fat_clusters_chain(mt_entry, chain); 2012564: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2012568: 40 00 20 8a call 201a790 <== NOT EXECUTED 201256c: b0 10 00 1b mov %i3, %i0 <== NOT EXECUTED return rc; 2012570: 81 c7 e0 08 ret <== NOT EXECUTED 2012574: 81 e8 00 00 restore <== NOT EXECUTED } fat_buf_release(fs_info); 2012578: 40 00 01 af call 2012c34 201257c: 90 10 00 1c mov %i4, %o0 } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 2012580: c2 07 bf fc ld [ %fp + -4 ], %g1 2012584: 80 a0 60 00 cmp %g1, 0 2012588: 22 bf ff cd be,a 20124bc <== NEVER TAKEN 201258c: f4 26 60 18 st %i2, [ %i1 + 0x18 ] <== NOT EXECUTED { fat_fd->map.last_cln = last_cl; 2012590: c2 07 bf f8 ld [ %fp + -8 ], %g1 2012594: c2 26 60 3c st %g1, [ %i1 + 0x3c ] if (fat_fd->fat_file_type == FAT_DIRECTORY) 2012598: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 201259c: 80 a0 60 01 cmp %g1, 1 20125a0: 32 bf ff c7 bne,a 20124bc 20125a4: f4 26 60 18 st %i2, [ %i1 + 0x18 ] { rc = fat_init_clusters_chain(mt_entry, chain); 20125a8: d2 07 bf f0 ld [ %fp + -16 ], %o1 20125ac: 40 00 02 60 call 2012f2c 20125b0: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) 20125b4: b8 92 20 00 orcc %o0, 0, %i4 20125b8: 22 bf ff c1 be,a 20124bc <== ALWAYS TAKEN 20125bc: f4 26 60 18 st %i2, [ %i1 + 0x18 ] { fat_free_fat_clusters_chain(mt_entry, chain); 20125c0: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED 20125c4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20125c8: 40 00 20 72 call 201a790 <== NOT EXECUTED 20125cc: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED return rc; 20125d0: 81 c7 e0 08 ret <== NOT EXECUTED 20125d4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02012314 : fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 2012314: 9d e3 bf 98 save %sp, -104, %sp uint32_t cl_start = 0; uint32_t pos = 0; uint32_t *ret; va_list ap; va_start(ap, cmd); 2012318: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 201231c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 2012320: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 2012324: 84 07 a0 50 add %fp, 0x50, %g2 int cmd, ...) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; 2012328: c0 27 bf f8 clr [ %fp + -8 ] uint32_t cl_start = 0; uint32_t pos = 0; uint32_t *ret; va_list ap; va_start(ap, cmd); 201232c: c4 27 bf fc st %g2, [ %fp + -4 ] fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 2012330: 90 10 00 18 mov %i0, %o0 2012334: 92 10 00 19 mov %i1, %o1 uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 2012338: 80 a6 a0 01 cmp %i2, 1 201233c: 12 80 00 24 bne 20123cc <== NEVER TAKEN 2012340: c6 06 20 34 ld [ %i0 + 0x34 ], %g3 { case F_CLU_NUM: pos = va_arg(ap, uint32_t); ret = va_arg(ap, uint32_t *); 2012344: 84 07 a0 58 add %fp, 0x58, %g2 2012348: c4 27 bf fc st %g2, [ %fp + -4 ] /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 201234c: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); 2012350: 82 10 00 1b mov %i3, %g1 ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 2012354: 80 a6 c0 02 cmp %i3, %g2 2012358: 0a 80 00 06 bcs 2012370 <== ALWAYS TAKEN 201235c: ba 10 00 1c mov %i4, %i5 va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); 2012360: 40 00 27 ba call 201c248 <__errno> <== NOT EXECUTED 2012364: 01 00 00 00 nop <== NOT EXECUTED 2012368: 10 80 00 1c b 20123d8 <== NOT EXECUTED 201236c: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2012370: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 2012374: 80 a0 a0 01 cmp %g2, 1 2012378: 32 80 00 0d bne,a 20123ac 201237c: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 2012380: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 2012384: 80 a0 a0 00 cmp %g2, 0 2012388: 32 80 00 09 bne,a 20123ac <== NEVER TAKEN 201238c: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2012390: c4 08 e0 0a ldub [ %g3 + 0xa ], %g2 if ( pos >= fat_fd->fat_file_size ) { va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2012394: 80 88 a0 03 btst 3, %g2 2012398: 22 80 00 05 be,a 20123ac <== NEVER TAKEN 201239c: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { /* cluster 0 (zero) reserved for root dir */ *ret = 0; 20123a0: c0 27 00 00 clr [ %i4 ] rc = RC_OK; break; 20123a4: 10 80 00 0f b 20123e0 20123a8: 92 10 20 00 clr %o1 } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 20123ac: 96 07 bf f8 add %fp, -8, %o3 20123b0: 7f ff fe 3d call 2011ca4 20123b4: 95 30 40 0a srl %g1, %o2, %o2 if ( rc != RC_OK ) 20123b8: 80 a2 60 00 cmp %o1, 0 20123bc: 12 80 00 09 bne 20123e0 <== NEVER TAKEN 20123c0: c2 07 bf f8 ld [ %fp + -8 ], %g1 break; *ret = cur_cln; break; 20123c4: 10 80 00 07 b 20123e0 20123c8: c2 27 40 00 st %g1, [ %i5 ] default: errno = EINVAL; 20123cc: 40 00 27 9f call 201c248 <__errno> <== NOT EXECUTED 20123d0: 01 00 00 00 nop <== NOT EXECUTED 20123d4: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 20123d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = -1; 20123dc: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED break; } va_end(ap); return rc; } 20123e0: 81 c7 e0 08 ret 20123e4: 91 e8 00 09 restore %g0, %o1, %o0 =============================================================================== 02011ca4 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 2011ca4: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 2011ca8: f8 06 60 34 ld [ %i1 + 0x34 ], %i4 2011cac: 80 a6 80 1c cmp %i2, %i4 2011cb0: 12 80 00 07 bne 2011ccc <== NEVER TAKEN 2011cb4: 01 00 00 00 nop *disk_cln = fat_fd->map.disk_cln; 2011cb8: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; 2011cbc: b0 10 20 00 clr %i0 ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) *disk_cln = fat_fd->map.disk_cln; 2011cc0: c2 26 c0 00 st %g1, [ %i3 ] fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; 2011cc4: 81 c7 e0 08 ret 2011cc8: 93 e8 20 00 restore %g0, 0, %o1 { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 2011ccc: 28 80 00 06 bleu,a 2011ce4 <== NOT EXECUTED 2011cd0: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED { cur_cln = fat_fd->map.disk_cln; 2011cd4: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; 2011cd8: b8 26 80 1c sub %i2, %i4, %i4 <== NOT EXECUTED uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; 2011cdc: 10 80 00 04 b 2011cec <== NOT EXECUTED 2011ce0: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 2011ce4: b8 10 00 1a mov %i2, %i4 <== NOT EXECUTED 2011ce8: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2011cec: 10 80 00 0b b 2011d18 <== NOT EXECUTED 2011cf0: ba 10 20 00 clr %i5 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2011cf4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2011cf8: 40 00 21 87 call 201a314 <== NOT EXECUTED 2011cfc: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2011d00: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2011d04: 22 80 00 05 be,a 2011d18 <== NOT EXECUTED 2011d08: ba 07 60 01 inc %i5 <== NOT EXECUTED return rc; 2011d0c: b1 3a 20 1f sra %o0, 0x1f, %i0 <== NOT EXECUTED 2011d10: 81 c7 e0 08 ret <== NOT EXECUTED 2011d14: 93 e8 00 08 restore %g0, %o0, %o1 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2011d18: 80 a7 40 1c cmp %i5, %i4 <== NOT EXECUTED 2011d1c: 12 bf ff f6 bne 2011cf4 <== NOT EXECUTED 2011d20: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 2011d24: f4 26 60 34 st %i2, [ %i1 + 0x34 ] <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 2011d28: d2 26 60 38 st %o1, [ %i1 + 0x38 ] <== NOT EXECUTED *disk_cln = cur_cln; 2011d2c: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED } return RC_OK; 2011d30: b0 10 20 00 clr %i0 <== NOT EXECUTED } 2011d34: 81 c7 e0 08 ret <== NOT EXECUTED 2011d38: 93 e8 20 00 restore %g0, 0, %o1 <== NOT EXECUTED =============================================================================== 020127dc : void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 20127dc: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t key = 0; key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); 20127e0: 92 06 60 20 add %i1, 0x20, %o1 <== NOT EXECUTED fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { fat_fs_info_t *fs_info = mt_entry->fs_info; 20127e4: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED uint32_t key = 0; key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); 20127e8: 7f ff fd 63 call 2011d74 <== NOT EXECUTED 20127ec: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20127f0: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED 20127f4: 7f ff e0 d5 call 200ab48 <_Chain_Extract> <== NOT EXECUTED 20127f8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED */ static inline void _hash_insert(rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t *el) { rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link); 20127fc: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED 2012800: b8 0f 20 01 and %i4, 1, %i4 <== NOT EXECUTED 2012804: 83 2f 20 02 sll %i4, 2, %g1 <== 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 ); 2012808: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 201280c: b9 2f 20 04 sll %i4, 4, %i4 <== NOT EXECUTED 2012810: b8 27 00 01 sub %i4, %g1, %i4 <== NOT EXECUTED 2012814: 7f ff e0 c2 call 200ab1c <_Chain_Append> <== NOT EXECUTED 2012818: 90 02 00 1c add %o0, %i4, %o0 <== NOT EXECUTED _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); _hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd); fat_fd->flags |= FAT_FILE_REMOVED; 201281c: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 <== NOT EXECUTED 2012820: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 2012824: c2 2e 60 30 stb %g1, [ %i1 + 0x30 ] <== NOT EXECUTED } 2012828: 81 c7 e0 08 ret <== NOT EXECUTED 201282c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02011e30 : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 2011e30: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2011e34: f6 06 20 34 ld [ %i0 + 0x34 ], %i3 fat_file_fd_t *lfat_fd = NULL; uint32_t key = 0; /* construct key */ key = fat_construct_key(mt_entry, &dir_pos->sname); 2011e38: 90 10 00 18 mov %i0, %o0 2011e3c: 92 10 00 19 mov %i1, %o1 2011e40: 7f ff ff cd call 2011d74 2011e44: c0 27 bf fc clr [ %fp + -4 ] /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); 2011e48: d2 06 e0 68 ld [ %i3 + 0x68 ], %o1 fat_fs_info_t *fs_info = mt_entry->fs_info; fat_file_fd_t *lfat_fd = NULL; uint32_t key = 0; /* construct key */ key = fat_construct_key(mt_entry, &dir_pos->sname); 2011e4c: b8 10 00 08 mov %o0, %i4 fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 2011e50: ba 10 00 18 mov %i0, %i5 /* construct key */ key = fat_construct_key(mt_entry, &dir_pos->sname); /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); 2011e54: 90 10 00 18 mov %i0, %o0 2011e58: 94 10 00 1c mov %i4, %o2 2011e5c: 96 10 20 00 clr %o3 2011e60: 7f ff ff d7 call 2011dbc <_hash_search> 2011e64: 98 07 bf fc add %fp, -4, %o4 if ( rc == RC_OK ) 2011e68: b0 92 20 00 orcc %o0, 0, %i0 2011e6c: 12 80 00 08 bne 2011e8c 2011e70: c2 07 bf fc ld [ %fp + -4 ], %g1 { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; lfat_fd->links_num++; 2011e74: c4 00 60 08 ld [ %g1 + 8 ], %g2 /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); if ( rc == RC_OK ) { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; 2011e78: c2 26 80 00 st %g1, [ %i2 ] lfat_fd->links_num++; 2011e7c: 84 00 a0 01 inc %g2 2011e80: c4 20 60 08 st %g2, [ %g1 + 8 ] return rc; 2011e84: 81 c7 e0 08 ret 2011e88: 81 e8 00 00 restore } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); 2011e8c: d2 06 e0 6c ld [ %i3 + 0x6c ], %o1 2011e90: 94 10 00 1c mov %i4, %o2 2011e94: 96 10 00 1c mov %i4, %o3 2011e98: 98 07 bf fc add %fp, -4, %o4 2011e9c: 7f ff ff c8 call 2011dbc <_hash_search> 2011ea0: 90 10 00 1d mov %i5, %o0 2011ea4: a0 10 00 08 mov %o0, %l0 lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 2011ea8: 7f ff d1 2c call 2006358 2011eac: 90 10 20 44 mov 0x44, %o0 2011eb0: d0 26 80 00 st %o0, [ %i2 ] 2011eb4: d0 27 bf fc st %o0, [ %fp + -4 ] if ( lfat_fd == NULL ) 2011eb8: 80 a2 20 00 cmp %o0, 0 2011ebc: 02 80 00 1f be 2011f38 <== NEVER TAKEN 2011ec0: b0 10 00 08 mov %o0, %i0 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 2011ec4: 92 10 20 00 clr %o1 2011ec8: 40 00 2b eb call 201ce74 2011ecc: 94 10 20 44 mov 0x44, %o2 lfat_fd->links_num = 1; 2011ed0: 82 10 20 01 mov 1, %g1 2011ed4: c2 26 20 08 st %g1, [ %i0 + 8 ] lfat_fd->flags &= ~FAT_FILE_REMOVED; 2011ed8: c2 0e 20 30 ldub [ %i0 + 0x30 ], %g1 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 2011edc: 90 06 20 20 add %i0, 0x20, %o0 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 2011ee0: 82 08 7f fe and %g1, -2, %g1 2011ee4: c2 2e 20 30 stb %g1, [ %i0 + 0x30 ] lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 2011ee8: 82 10 3f ff mov -1, %g1 lfat_fd->dir_pos = *dir_pos; 2011eec: 92 10 00 19 mov %i1, %o1 memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 2011ef0: c2 26 20 3c st %g1, [ %i0 + 0x3c ] lfat_fd->dir_pos = *dir_pos; 2011ef4: 40 00 2b a4 call 201cd84 2011ef8: 94 10 20 10 mov 0x10, %o2 if ( rc != RC_OK ) 2011efc: 80 a4 20 00 cmp %l0, 0 2011f00: 02 80 00 04 be 2011f10 <== NEVER TAKEN 2011f04: 01 00 00 00 nop lfat_fd->ino = key; 2011f08: 10 80 00 12 b 2011f50 2011f0c: f8 26 20 0c st %i4, [ %i0 + 0xc ] else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 2011f10: 40 00 04 35 call 2012fe4 <== NOT EXECUTED 2011f14: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 2011f18: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 2011f1c: d0 26 20 0c st %o0, [ %i0 + 0xc ] <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 2011f20: c2 00 60 0c ld [ %g1 + 0xc ], %g1 <== NOT EXECUTED 2011f24: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2011f28: 32 80 00 0b bne,a 2011f54 <== NOT EXECUTED 2011f2c: d0 06 e0 68 ld [ %i3 + 0x68 ], %o0 <== NOT EXECUTED { free((*fat_fd)); 2011f30: 7f ff cf 4f call 2005c6c <== NOT EXECUTED 2011f34: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED /* * XXX: kernel resource is unsufficient, but not the memory, * but there is no suitable errno :( */ rtems_set_errno_and_return_minus_one( ENOMEM ); 2011f38: 40 00 28 c4 call 201c248 <__errno> <== NOT EXECUTED 2011f3c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2011f40: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2011f44: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2011f48: 81 c7 e0 08 ret <== NOT EXECUTED 2011f4c: 81 e8 00 00 restore <== NOT EXECUTED */ static inline void _hash_insert(rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t *el) { rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link); 2011f50: d0 06 e0 68 ld [ %i3 + 0x68 ], %o0 2011f54: d2 07 bf fc ld [ %fp + -4 ], %o1 2011f58: b8 0f 20 01 and %i4, 1, %i4 2011f5c: 83 2f 20 02 sll %i4, 2, %g1 /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; 2011f60: b0 10 20 00 clr %i0 */ static inline void _hash_insert(rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t *el) { rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link); 2011f64: b9 2f 20 04 sll %i4, 4, %i4 2011f68: b8 27 00 01 sub %i4, %g1, %i4 2011f6c: 7f ff e2 ec call 200ab1c <_Chain_Append> 2011f70: 90 02 00 1c add %o0, %i4, %o0 * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 2011f74: 81 c7 e0 08 ret 2011f78: 81 e8 00 00 restore =============================================================================== 02011f90 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 2011f90: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 2011f94: c0 27 bf fc clr [ %fp + -4 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 2011f98: ba 10 00 18 mov %i0, %i5 int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 2011f9c: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; /* it couldn't be removed - otherwise cache update will be broken */ if (count == 0) 2011fa0: 80 a6 e0 00 cmp %i3, 0 2011fa4: 02 80 00 63 be 2012130 <== NEVER TAKEN 2011fa8: b0 10 20 00 clr %i0 /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) 2011fac: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 2011fb0: 80 a6 80 01 cmp %i2, %g1 2011fb4: 1a 80 00 5f bcc 2012130 <== NEVER TAKEN 2011fb8: 80 a6 c0 01 cmp %i3, %g1 return FAT_EOF; if ((count > fat_fd->fat_file_size) || 2011fbc: 38 80 00 07 bgu,a 2011fd8 <== NEVER TAKEN 2011fc0: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) 2011fc4: 84 20 40 1b sub %g1, %i3, %g2 * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || 2011fc8: 80 a6 80 02 cmp %i2, %g2 2011fcc: 28 80 00 04 bleu,a 2011fdc <== ALWAYS TAKEN 2011fd0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 2011fd4: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2011fd8: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2011fdc: 80 a0 60 01 cmp %g1, 1 2011fe0: 32 80 00 1c bne,a 2012050 2011fe4: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 2011fe8: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 2011fec: 80 a0 60 00 cmp %g1, 0 2011ff0: 32 80 00 18 bne,a 2012050 <== NEVER TAKEN 2011ff4: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2011ff8: c2 0c 20 0a ldub [ %l0 + 0xa ], %g1 if ((count > fat_fd->fat_file_size) || (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2011ffc: 80 88 60 03 btst 3, %g1 2012000: 22 80 00 14 be,a 2012050 <== NEVER TAKEN 2012004: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 2012008: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 201200c: 7f ff ff 4c call 2011d3c 2012010: 90 10 00 10 mov %l0, %o0 sec += (start >> fs_info->vol.sec_log2); 2012014: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = start & (fs_info->vol.bps - 1); 2012018: d4 14 00 00 lduh [ %l0 ], %o2 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 201201c: 93 36 80 09 srl %i2, %o1, %o1 byte = start & (fs_info->vol.bps - 1); 2012020: 94 02 bf ff add %o2, -1, %o2 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 2012024: 92 02 00 09 add %o0, %o1, %o1 byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, count, buf); 2012028: 94 0e 80 0a and %i2, %o2, %o2 201202c: 90 10 00 1d mov %i5, %o0 2012030: 96 10 00 1b mov %i3, %o3 2012034: 40 00 03 5a call 2012d9c <_fat_block_read> 2012038: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 201203c: b0 92 20 00 orcc %o0, 0, %i0 2012040: 16 80 00 41 bge 2012144 <== ALWAYS TAKEN 2012044: 01 00 00 00 nop sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; 2012048: 81 c7 e0 08 ret <== NOT EXECUTED 201204c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 2012050: e2 14 20 06 lduh [ %l0 + 6 ], %l1 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2012054: a5 36 80 12 srl %i2, %l2, %l2 save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 2012058: a6 07 bf fc add %fp, -4, %l3 201205c: 90 10 00 1d mov %i5, %o0 2012060: 92 10 00 19 mov %i1, %o1 2012064: 94 10 00 12 mov %l2, %o2 2012068: 7f ff ff 0f call 2011ca4 201206c: 96 10 00 13 mov %l3, %o3 if (rc != RC_OK) 2012070: b0 92 60 00 orcc %o1, 0, %i0 2012074: 12 80 00 2f bne 2012130 <== NEVER TAKEN 2012078: a3 2c 60 10 sll %l1, 0x10, %l1 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 201207c: a3 34 60 10 srl %l1, 0x10, %l1 2012080: a2 04 7f ff add %l1, -1, %l1 2012084: b4 0e 80 11 and %i2, %l1, %i2 2012088: a2 10 20 00 clr %l1 201208c: 10 80 00 1f b 2012108 2012090: a8 10 00 1a mov %i2, %l4 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 2012094: a2 24 40 14 sub %l1, %l4, %l1 2012098: 80 a4 40 1b cmp %l1, %i3 201209c: 38 80 00 02 bgu,a 20120a4 20120a0: a2 10 00 1b mov %i3, %l1 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 20120a4: d2 07 bf fc ld [ %fp + -4 ], %o1 20120a8: 7f ff ff 25 call 2011d3c 20120ac: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 sec += (ofs >> fs_info->vol.sec_log2); 20120b0: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = ofs & (fs_info->vol.bps - 1); 20120b4: d4 14 00 00 lduh [ %l0 ], %o2 while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 20120b8: 93 35 00 09 srl %l4, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); 20120bc: 94 02 bf ff add %o2, -1, %o2 while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 20120c0: 92 02 00 09 add %o0, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 20120c4: 94 0d 00 0a and %l4, %o2, %o2 20120c8: 90 10 00 1d mov %i5, %o0 20120cc: 96 10 00 11 mov %l1, %o3 20120d0: 40 00 03 33 call 2012d9c <_fat_block_read> 20120d4: 98 07 00 18 add %i4, %i0, %o4 if ( ret < 0 ) 20120d8: 80 a2 20 00 cmp %o0, 0 20120dc: 06 80 00 17 bl 2012138 <== NEVER TAKEN 20120e0: b6 26 c0 11 sub %i3, %l1, %i3 return -1; count -= c; cmpltd += c; 20120e4: b0 06 00 11 add %i0, %l1, %i0 save_cln = cur_cln; 20120e8: e2 07 bf fc ld [ %fp + -4 ], %l1 rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 20120ec: 90 10 00 1d mov %i5, %o0 20120f0: 92 10 00 11 mov %l1, %o1 20120f4: 40 00 20 88 call 201a314 20120f8: 94 10 00 13 mov %l3, %o2 if ( rc != RC_OK ) 20120fc: 80 a2 20 00 cmp %o0, 0 2012100: 12 80 00 10 bne 2012140 <== NEVER TAKEN 2012104: a8 10 20 00 clr %l4 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2012108: 80 a6 e0 00 cmp %i3, 0 201210c: 32 bf ff e2 bne,a 2012094 2012110: e2 14 20 06 lduh [ %l0 + 6 ], %l1 } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 2012114: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 2012118: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 201211c: e2 26 60 38 st %l1, [ %i1 + 0x38 ] } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 2012120: b4 06 80 18 add %i2, %i0, %i2 2012124: b5 36 80 01 srl %i2, %g1, %i2 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 2012128: a4 06 80 12 add %i2, %l2, %l2 201212c: e4 26 60 34 st %l2, [ %i1 + 0x34 ] ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 2012130: 81 c7 e0 08 ret 2012134: 81 e8 00 00 restore sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; 2012138: 81 c7 e0 08 ret <== NOT EXECUTED 201213c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2012140: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 2012144: 81 c7 e0 08 ret 2012148: 81 e8 00 00 restore =============================================================================== 02012920 : int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2012920: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; 2012924: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2012928: ba 10 00 18 mov %i0, %i5 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; 201292c: c2 27 bf fc st %g1, [ %fp + -4 ] uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2012930: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2012934: 80 a0 60 01 cmp %g1, 1 2012938: 12 80 00 0d bne 201296c <== ALWAYS TAKEN 201293c: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 2012940: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED 2012944: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2012948: 32 80 00 0a bne,a 2012970 <== NOT EXECUTED 201294c: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2012950: c2 0f 20 0a ldub [ %i4 + 0xa ], %g1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2012954: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 2012958: 22 80 00 06 be,a 2012970 <== NOT EXECUTED 201295c: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; 2012960: c2 07 20 28 ld [ %i4 + 0x28 ], %g1 <== NOT EXECUTED 2012964: 10 80 00 18 b 20129c4 <== NOT EXECUTED 2012968: c2 26 60 18 st %g1, [ %i1 + 0x18 ] <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; 201296c: c0 26 60 18 clr [ %i1 + 0x18 ] while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2012970: 10 80 00 0d b 20129a4 2012974: 82 10 20 00 clr %g1 { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2012978: 92 10 00 1b mov %i3, %o1 201297c: 40 00 1e 66 call 201a314 2012980: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2012984: 80 a2 20 00 cmp %o0, 0 2012988: 12 80 00 10 bne 20129c8 <== NEVER TAKEN 201298c: 01 00 00 00 nop return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 2012990: c2 17 20 06 lduh [ %i4 + 6 ], %g1 2012994: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 2012998: 82 00 80 01 add %g2, %g1, %g1 201299c: c2 26 60 18 st %g1, [ %i1 + 0x18 ] fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { save_cln = cur_cln; 20129a0: 82 10 00 1b mov %i3, %g1 return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 20129a4: f6 07 bf fc ld [ %fp + -4 ], %i3 20129a8: c6 07 20 0c ld [ %i4 + 0xc ], %g3 20129ac: c4 07 20 10 ld [ %i4 + 0x10 ], %g2 20129b0: 86 0e c0 03 and %i3, %g3, %g3 20129b4: 80 a0 c0 02 cmp %g3, %g2 20129b8: 0a bf ff f0 bcs 2012978 20129bc: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; 20129c0: c2 26 60 3c st %g1, [ %i1 + 0x3c ] return rc; 20129c4: 90 10 20 00 clr %o0 } 20129c8: 81 c7 e0 08 ret 20129cc: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0201214c : fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 201214c: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 2012150: 82 10 3f ff mov -1, %g1 2012154: c2 27 bf fc st %g1, [ %fp + -4 ] if ( new_length >= fat_fd->fat_file_size ) 2012158: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 uint32_t new_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; 201215c: c0 27 bf f8 clr [ %fp + -8 ] fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 2012160: ba 10 00 18 mov %i0, %i5 uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) 2012164: 80 a6 80 01 cmp %i2, %g1 2012168: 1a 80 00 3a bcc 2012250 <== NEVER TAKEN 201216c: c6 06 20 34 ld [ %i0 + 0x34 ], %g3 return rc; assert(fat_fd->fat_file_size); 2012170: 80 a0 60 00 cmp %g1, 0 2012174: 32 80 00 0a bne,a 201219c <== ALWAYS TAKEN 2012178: c4 08 e0 08 ldub [ %g3 + 8 ], %g2 201217c: 11 00 80 af sethi %hi(0x202bc00), %o0 <== NOT EXECUTED 2012180: 15 00 80 af sethi %hi(0x202bc00), %o2 <== NOT EXECUTED 2012184: 17 00 80 af sethi %hi(0x202bc00), %o3 <== NOT EXECUTED 2012188: 90 12 21 d0 or %o0, 0x1d0, %o0 <== NOT EXECUTED 201218c: 92 10 22 6d mov 0x26d, %o1 <== NOT EXECUTED 2012190: 94 12 a2 30 or %o2, 0x230, %o2 <== NOT EXECUTED 2012194: 40 00 09 fc call 2014984 <__assert_func> <== NOT EXECUTED 2012198: 96 12 e2 18 or %o3, 0x218, %o3 <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 201219c: c6 10 e0 06 lduh [ %g3 + 6 ], %g3 20121a0: 86 00 ff ff add %g3, -1, %g3 20121a4: b4 00 c0 1a add %g3, %i2, %i2 20121a8: b5 36 80 02 srl %i2, %g2, %i2 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 20121ac: 85 2e 80 02 sll %i2, %g2, %g2 20121b0: 80 a0 80 01 cmp %g2, %g1 20121b4: 1a 80 00 28 bcc 2012254 <== NEVER TAKEN 20121b8: 92 10 20 00 clr %o1 return RC_OK; if (cl_start != 0) 20121bc: 80 a6 a0 00 cmp %i2, 0 20121c0: 02 80 00 0a be 20121e8 <== ALWAYS TAKEN 20121c4: 90 10 00 1d mov %i5, %o0 { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 20121c8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20121cc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20121d0: 94 06 bf ff add %i2, -1, %o2 <== NOT EXECUTED 20121d4: 7f ff fe b4 call 2011ca4 <== NOT EXECUTED 20121d8: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED if (rc != RC_OK) 20121dc: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 20121e0: 12 80 00 1d bne 2012254 <== NOT EXECUTED 20121e4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 20121e8: 92 10 00 19 mov %i1, %o1 20121ec: 94 10 00 1a mov %i2, %o2 20121f0: 7f ff fe ad call 2011ca4 20121f4: 96 07 bf f8 add %fp, -8, %o3 if (rc != RC_OK) 20121f8: 80 a2 60 00 cmp %o1, 0 20121fc: 12 80 00 16 bne 2012254 <== NEVER TAKEN 2012200: 01 00 00 00 nop return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); 2012204: d2 07 bf f8 ld [ %fp + -8 ], %o1 2012208: 40 00 21 62 call 201a790 201220c: 90 10 00 1d mov %i5, %o0 if (rc != RC_OK) 2012210: 92 92 20 00 orcc %o0, 0, %o1 2012214: 12 80 00 10 bne 2012254 <== NEVER TAKEN 2012218: 80 a6 a0 00 cmp %i2, 0 return rc; if (cl_start != 0) 201221c: 02 80 00 0e be 2012254 <== ALWAYS TAKEN 2012220: 90 10 00 1d mov %i5, %o0 { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 2012224: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED 2012228: 40 00 20 ab call 201a4d4 <== NOT EXECUTED 201222c: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2012230: 92 92 20 00 orcc %o0, 0, %o1 <== NOT EXECUTED 2012234: 12 80 00 08 bne 2012254 <== NOT EXECUTED 2012238: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; 201223c: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 2012240: c2 26 60 38 st %g1, [ %i1 + 0x38 ] <== NOT EXECUTED if (cl_start != 0) { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); if ( rc != RC_OK ) return rc; fat_fd->map.file_cln = cl_start - 1; 2012244: f4 26 60 34 st %i2, [ %i1 + 0x34 ] <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; 2012248: 10 80 00 03 b 2012254 <== NOT EXECUTED 201224c: c2 26 60 3c st %g1, [ %i1 + 0x3c ] <== NOT EXECUTED uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) return rc; 2012250: 92 10 20 00 clr %o1 <== NOT EXECUTED fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; } return RC_OK; } 2012254: 81 c7 e0 08 ret 2012258: 91 e8 00 09 restore %g0, %o1, %o0 =============================================================================== 020125d8 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 20125d8: 9d e3 bf 98 save %sp, -104, %sp int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 20125dc: c0 27 bf f8 clr [ %fp + -8 ] uint32_t cl_start = 0; uint32_t ofs = 0; uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; 20125e0: c0 27 bf fc clr [ %fp + -4 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 20125e4: ba 10 00 18 mov %i0, %i5 int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 20125e8: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) 20125ec: 80 a6 e0 00 cmp %i3, 0 20125f0: 02 80 00 79 be 20127d4 <== NEVER TAKEN 20125f4: 90 10 20 00 clr %o0 return cmpltd; if ( start > fat_fd->fat_file_size ) 20125f8: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 20125fc: 80 a6 80 01 cmp %i2, %g1 2012600: 18 80 00 09 bgu 2012624 <== NEVER TAKEN 2012604: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 2012608: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 201260c: 80 a6 c0 01 cmp %i3, %g1 2012610: 18 80 00 05 bgu 2012624 <== NEVER TAKEN 2012614: 82 20 40 1b sub %g1, %i3, %g1 2012618: 80 a6 80 01 cmp %i2, %g1 201261c: 08 80 00 07 bleu 2012638 <== ALWAYS TAKEN 2012620: a2 06 c0 1a add %i3, %i2, %l1 (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); 2012624: 40 00 27 09 call 201c248 <__errno> <== NOT EXECUTED 2012628: 01 00 00 00 nop <== NOT EXECUTED 201262c: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2012630: 10 80 00 68 b 20127d0 <== NOT EXECUTED 2012634: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = fat_file_extend(mt_entry, fat_fd, start + count, &c); 2012638: 90 10 00 18 mov %i0, %o0 201263c: 92 10 00 19 mov %i1, %o1 2012640: 94 10 00 11 mov %l1, %o2 2012644: 7f ff ff 69 call 20123e8 2012648: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 201264c: 80 a2 20 00 cmp %o0, 0 2012650: 12 80 00 61 bne 20127d4 <== NEVER TAKEN 2012654: c2 07 bf fc ld [ %fp + -4 ], %g1 /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) 2012658: 80 a0 40 11 cmp %g1, %l1 201265c: 32 80 00 02 bne,a 2012664 <== NEVER TAKEN 2012660: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2012664: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2012668: 80 a0 60 01 cmp %g1, 1 201266c: 32 80 00 1c bne,a 20126dc 2012670: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 2012674: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 2012678: 80 a0 60 00 cmp %g1, 0 201267c: 32 80 00 18 bne,a 20126dc <== NEVER TAKEN 2012680: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2012684: c2 0c 20 0a ldub [ %l0 + 0xa ], %g1 * file of 'start + count' bytes */ if (c != (start + count)) count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2012688: 80 88 60 03 btst 3, %g1 201268c: 22 80 00 14 be,a 20126dc <== NEVER TAKEN 2012690: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 2012694: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 2012698: 7f ff fd a9 call 2011d3c 201269c: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 sec += (start >> fs_info->vol.sec_log2); 20126a0: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = start & (fs_info->vol.bps - 1); 20126a4: d4 14 00 00 lduh [ %l0 ], %o2 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 20126a8: 93 36 80 09 srl %i2, %o1, %o1 byte = start & (fs_info->vol.bps - 1); 20126ac: 94 02 bf ff add %o2, -1, %o2 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 20126b0: 92 02 00 09 add %o0, %o1, %o1 byte = start & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, count, buf); 20126b4: 94 0e 80 0a and %i2, %o2, %o2 20126b8: 90 10 00 1d mov %i5, %o0 20126bc: 96 10 00 1b mov %i3, %o3 20126c0: 40 00 01 d9 call 2012e24 <_fat_block_write> 20126c4: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 20126c8: 80 a2 20 00 cmp %o0, 0 20126cc: 16 80 00 42 bge 20127d4 <== ALWAYS TAKEN 20126d0: 01 00 00 00 nop sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; 20126d4: 10 80 00 40 b 20127d4 <== NOT EXECUTED 20126d8: 90 10 3f ff mov -1, %o0 ! ffffffff <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 20126dc: e2 14 20 06 lduh [ %l0 + 6 ], %l1 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 20126e0: a5 36 80 12 srl %i2, %l2, %l2 save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 20126e4: a6 07 bf f8 add %fp, -8, %l3 20126e8: 90 10 00 1d mov %i5, %o0 20126ec: 92 10 00 19 mov %i1, %o1 20126f0: 94 10 00 12 mov %l2, %o2 20126f4: 7f ff fd 6c call 2011ca4 20126f8: 96 10 00 13 mov %l3, %o3 if (rc != RC_OK) 20126fc: 90 92 60 00 orcc %o1, 0, %o0 2012700: 12 80 00 35 bne 20127d4 <== NEVER TAKEN 2012704: a3 2c 60 10 sll %l1, 0x10, %l1 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 2012708: a3 34 60 10 srl %l1, 0x10, %l1 201270c: a2 04 7f ff add %l1, -1, %l1 2012710: a8 10 20 00 clr %l4 2012714: b4 0e 80 11 and %i2, %l1, %i2 2012718: a2 10 20 00 clr %l1 201271c: 10 80 00 21 b 20127a0 2012720: aa 10 00 1a mov %i2, %l5 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 2012724: b0 26 00 15 sub %i0, %l5, %i0 2012728: 80 a6 00 1b cmp %i0, %i3 201272c: 38 80 00 02 bgu,a 2012734 2012730: b0 10 00 1b mov %i3, %i0 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 2012734: d2 07 bf f8 ld [ %fp + -8 ], %o1 2012738: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 201273c: 7f ff fd 80 call 2011d3c 2012740: f0 27 bf fc st %i0, [ %fp + -4 ] sec += (ofs >> fs_info->vol.sec_log2); 2012744: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = ofs & (fs_info->vol.bps - 1); 2012748: d4 14 00 00 lduh [ %l0 ], %o2 while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 201274c: 93 35 40 09 srl %l5, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); 2012750: 94 02 bf ff add %o2, -1, %o2 while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 2012754: 92 02 00 09 add %o0, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 2012758: 94 0d 40 0a and %l5, %o2, %o2 201275c: 90 10 00 1d mov %i5, %o0 2012760: 96 10 00 18 mov %i0, %o3 2012764: 40 00 01 b0 call 2012e24 <_fat_block_write> 2012768: 98 07 00 11 add %i4, %l1, %o4 if ( ret < 0 ) 201276c: 80 a2 20 00 cmp %o0, 0 2012770: 06 80 00 18 bl 20127d0 <== NEVER TAKEN 2012774: c2 07 bf fc ld [ %fp + -4 ], %g1 return -1; count -= c; cmpltd += c; save_cln = cur_cln; 2012778: e8 07 bf f8 ld [ %fp + -8 ], %l4 ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; 201277c: b6 26 c0 01 sub %i3, %g1, %i3 cmpltd += c; 2012780: a2 04 40 01 add %l1, %g1, %l1 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2012784: 90 10 00 1d mov %i5, %o0 2012788: 92 10 00 14 mov %l4, %o1 201278c: 40 00 1e e2 call 201a314 2012790: 94 10 00 13 mov %l3, %o2 if ( rc != RC_OK ) 2012794: 80 a2 20 00 cmp %o0, 0 2012798: 12 80 00 0f bne 20127d4 <== NEVER TAKEN 201279c: aa 10 20 00 clr %l5 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 20127a0: 80 a6 e0 00 cmp %i3, 0 20127a4: 32 bf ff e0 bne,a 2012724 20127a8: f0 14 20 06 lduh [ %l0 + 6 ], %i0 } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 20127ac: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 20127b0: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 20127b4: e8 26 60 38 st %l4, [ %i1 + 0x38 ] } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 20127b8: b4 06 80 11 add %i2, %l1, %i2 fat_fd->map.disk_cln = save_cln; return cmpltd; 20127bc: 90 10 00 11 mov %l1, %o0 } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 20127c0: b5 36 80 01 srl %i2, %g1, %i2 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 20127c4: a4 06 80 12 add %i2, %l2, %l2 ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 20127c8: 10 80 00 03 b 20127d4 20127cc: e4 26 60 34 st %l2, [ %i1 + 0x34 ] sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; 20127d0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 20127d4: 81 c7 e0 08 ret 20127d8: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0201a790 : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 201a790: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; 201a794: b6 10 20 00 clr %i3 int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 201a798: ba 10 00 18 mov %i0, %i5 int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 201a79c: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 uint32_t cur_cln = chain; uint32_t next_cln = 0; 201a7a0: c0 27 bf fc clr [ %fp + -4 ] uint32_t chain ) { int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; 201a7a4: b4 10 00 19 mov %i1, %i2 uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 201a7a8: 10 80 00 19 b 201a80c 201a7ac: a0 10 20 00 clr %l0 { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 201a7b0: 92 10 00 1a mov %i2, %o1 201a7b4: 7f ff fe d8 call 201a314 201a7b8: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 201a7bc: b0 92 20 00 orcc %o0, 0, %i0 201a7c0: 02 80 00 0b be 201a7ec <== ALWAYS TAKEN 201a7c4: 90 10 00 1d mov %i5, %o0 { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 201a7c8: c2 07 20 40 ld [ %i4 + 0x40 ], %g1 <== NOT EXECUTED 201a7cc: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 201a7d0: 02 80 00 03 be 201a7dc <== NOT EXECUTED 201a7d4: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 201a7d8: f6 27 20 40 st %i3, [ %i4 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 201a7dc: 7f ff e1 16 call 2012c34 <== NOT EXECUTED 201a7e0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED return rc; 201a7e4: 81 c7 e0 08 ret <== NOT EXECUTED 201a7e8: 81 e8 00 00 restore <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 201a7ec: 92 10 00 1a mov %i2, %o1 201a7f0: 7f ff ff 39 call 201a4d4 201a7f4: 94 10 20 00 clr %o2 if ( rc != RC_OK ) 201a7f8: 80 a2 20 00 cmp %o0, 0 201a7fc: 32 80 00 02 bne,a 201a804 <== NEVER TAKEN 201a800: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; 201a804: f4 07 bf fc ld [ %fp + -4 ], %i2 rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); if ( rc != RC_OK ) rc1 = rc; freed_cls_cnt++; 201a808: b6 06 e0 01 inc %i3 fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 201a80c: c4 07 20 0c ld [ %i4 + 0xc ], %g2 201a810: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 201a814: 84 0e 80 02 and %i2, %g2, %g2 201a818: 80 a0 80 01 cmp %g2, %g1 201a81c: 0a bf ff e5 bcs 201a7b0 201a820: 90 10 00 1d mov %i5, %o0 freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 201a824: c2 07 20 40 ld [ %i4 + 0x40 ], %g1 201a828: 80 a0 7f ff cmp %g1, -1 201a82c: 02 80 00 04 be 201a83c <== ALWAYS TAKEN 201a830: f2 27 20 44 st %i1, [ %i4 + 0x44 ] fs_info->vol.free_cls += freed_cls_cnt; 201a834: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED 201a838: f6 27 20 40 st %i3, [ %i4 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 201a83c: 90 10 00 1c mov %i4, %o0 201a840: 7f ff e0 fd call 2012c34 201a844: b0 10 00 10 mov %l0, %i0 if (rc1 != RC_OK) return rc1; return RC_OK; } 201a848: 81 c7 e0 08 ret 201a84c: 81 e8 00 00 restore =============================================================================== 020130b4 : fat_free_unique_ino( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { fat_fs_info_t *fs_info = mt_entry->fs_info; 20130b4: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 20130b8: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED 20130bc: c4 00 60 7c ld [ %g1 + 0x7c ], %g2 <== NOT EXECUTED 20130c0: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 <== NOT EXECUTED 20130c4: 84 22 40 02 sub %o1, %g2, %g2 <== NOT EXECUTED 20130c8: 87 30 a0 03 srl %g2, 3, %g3 <== NOT EXECUTED 20130cc: 84 08 a0 07 and %g2, 7, %g2 <== NOT EXECUTED 20130d0: 85 29 00 02 sll %g4, %g2, %g2 <== NOT EXECUTED 20130d4: c8 08 40 03 ldub [ %g1 + %g3 ], %g4 <== NOT EXECUTED 20130d8: 84 29 00 02 andn %g4, %g2, %g2 <== NOT EXECUTED } 20130dc: 81 c3 e0 08 retl <== NOT EXECUTED 20130e0: c4 28 40 03 stb %g2, [ %g1 + %g3 ] <== NOT EXECUTED =============================================================================== 0201a314 : fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 201a314: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; rtems_bdbuf_buffer *block0 = NULL; 201a318: c0 27 bf fc clr [ %fp + -4 ] uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 201a31c: 80 a6 60 01 cmp %i1, 1 201a320: 08 80 00 64 bleu 201a4b0 <== NEVER TAKEN 201a324: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 201a328: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 201a32c: 82 00 60 01 inc %g1 201a330: 80 a6 40 01 cmp %i1, %g1 201a334: 18 80 00 5f bgu 201a4b0 <== NEVER TAKEN 201a338: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 201a33c: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 201a340: b7 36 60 01 srl %i1, 1, %i3 201a344: 84 88 60 01 andcc %g1, 1, %g2 201a348: 12 80 00 06 bne 201a360 <== ALWAYS TAKEN 201a34c: b6 06 c0 19 add %i3, %i1, %i3 201a350: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 201a354: 02 80 00 03 be 201a360 <== NOT EXECUTED 201a358: b7 2e 60 02 sll %i1, 2, %i3 <== NOT EXECUTED 201a35c: b7 2e 60 01 sll %i1, 1, %i3 <== NOT EXECUTED 201a360: c6 0f 60 02 ldub [ %i5 + 2 ], %g3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 201a364: b9 36 60 01 srl %i1, 1, %i4 /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 201a368: b7 36 c0 03 srl %i3, %g3, %i3 201a36c: c6 07 60 4c ld [ %i5 + 0x4c ], %g3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 201a370: b8 07 00 19 add %i4, %i1, %i4 201a374: 80 a0 a0 00 cmp %g2, 0 201a378: 12 80 00 06 bne 201a390 <== ALWAYS TAKEN 201a37c: b6 06 c0 03 add %i3, %g3, %i3 201a380: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 201a384: 02 80 00 03 be 201a390 <== NOT EXECUTED 201a388: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED 201a38c: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED 201a390: e0 17 40 00 lduh [ %i5 ], %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 201a394: 90 10 00 1d mov %i5, %o0 201a398: 92 10 00 1b mov %i3, %o1 201a39c: 94 10 20 01 mov 1, %o2 201a3a0: 7f ff e1 a6 call 2012a38 201a3a4: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 201a3a8: b0 92 20 00 orcc %o0, 0, %i0 201a3ac: 12 80 00 38 bne 201a48c <== NEVER TAKEN 201a3b0: a1 2c 20 10 sll %l0, 0x10, %l0 return rc; switch ( fs_info->vol.type ) 201a3b4: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 201a3b8: 80 a0 60 02 cmp %g1, 2 if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 201a3bc: a1 34 20 10 srl %l0, 0x10, %l0 201a3c0: a0 04 3f ff add %l0, -1, %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 201a3c4: 02 80 00 27 be 201a460 <== NEVER TAKEN 201a3c8: b8 0f 00 10 and %i4, %l0, %i4 201a3cc: 80 a0 60 04 cmp %g1, 4 201a3d0: 02 80 00 31 be 201a494 <== NEVER TAKEN 201a3d4: 80 a0 60 01 cmp %g1, 1 201a3d8: 12 80 00 36 bne 201a4b0 <== NEVER TAKEN 201a3dc: c2 07 bf fc ld [ %fp + -4 ], %g1 /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); if ( ofs == (fs_info->vol.bps - 1) ) 201a3e0: c6 17 40 00 lduh [ %i5 ], %g3 case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); 201a3e4: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 if ( ofs == (fs_info->vol.bps - 1) ) 201a3e8: 86 00 ff ff add %g3, -1, %g3 case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); 201a3ec: c2 08 80 1c ldub [ %g2 + %i4 ], %g1 if ( ofs == (fs_info->vol.bps - 1) ) 201a3f0: 80 a7 00 03 cmp %i4, %g3 201a3f4: 12 80 00 0f bne 201a430 <== ALWAYS TAKEN 201a3f8: c2 26 80 00 st %g1, [ %i2 ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 201a3fc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 201a400: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 201a404: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 201a408: 7f ff e1 8c call 2012a38 <== NOT EXECUTED 201a40c: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 201a410: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201a414: 12 80 00 2d bne 201a4c8 <== NOT EXECUTED 201a418: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 201a41c: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED 201a420: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED 201a424: c2 08 40 00 ldub [ %g1 ], %g1 <== NOT EXECUTED 201a428: 10 80 00 05 b 201a43c <== NOT EXECUTED 201a42c: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 201a430: b8 00 80 1c add %g2, %i4, %i4 201a434: c4 0f 20 01 ldub [ %i4 + 1 ], %g2 201a438: 85 28 a0 08 sll %g2, 8, %g2 201a43c: 82 10 80 01 or %g2, %g1, %g1 201a440: c2 26 80 00 st %g1, [ %i2 ] } if ( FAT_CLUSTER_IS_ODD(cln) ) 201a444: 80 8e 60 01 btst 1, %i1 201a448: 02 80 00 04 be 201a458 201a44c: c2 06 80 00 ld [ %i2 ], %g1 *ret_val = (*ret_val) >> FAT12_SHIFT; 201a450: 10 80 00 0e b 201a488 201a454: 83 30 60 04 srl %g1, 4, %g1 else *ret_val = (*ret_val) & FAT_FAT12_MASK; 201a458: 10 80 00 0c b 201a488 201a45c: 82 08 6f ff and %g1, 0xfff, %g1 break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 201a460: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 201a464: 07 00 00 3f sethi %hi(0xfc00), %g3 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 201a468: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 201a46c: 86 10 e3 ff or %g3, 0x3ff, %g3 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 201a470: c2 10 40 1c lduh [ %g1 + %i4 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 201a474: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 201a478: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED 201a47c: 83 30 60 08 srl %g1, 8, %g1 <== NOT EXECUTED 201a480: 82 08 40 03 and %g1, %g3, %g1 <== NOT EXECUTED 201a484: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 201a488: c2 26 80 00 st %g1, [ %i2 ] break; 201a48c: 81 c7 e0 08 ret 201a490: 81 e8 00 00 restore case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); 201a494: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 201a498: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_L(*ret_val); 201a49c: 7f ff ff 92 call 201a2e4 <== NOT EXECUTED 201a4a0: d0 00 40 1c ld [ %g1 + %i4 ], %o0 <== NOT EXECUTED 201a4a4: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED break; 201a4a8: 81 c7 e0 08 ret <== NOT EXECUTED 201a4ac: 81 e8 00 00 restore <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one(EIO); 201a4b0: 40 00 07 66 call 201c248 <__errno> <== NOT EXECUTED 201a4b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201a4b8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 201a4bc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201a4c0: 81 c7 e0 08 ret <== NOT EXECUTED 201a4c4: 81 e8 00 00 restore <== NOT EXECUTED *ret_val = (*((uint8_t *)(block0->buffer + ofs))); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) 201a4c8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 201a4cc: 81 c7 e0 08 ret <== NOT EXECUTED 201a4d0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02012fe4 : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 2012fe4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) 2012fe8: 39 03 ff ff sethi %hi(0xffffc00), %i4 <== NOT EXECUTED * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { register fat_fs_info_t *fs_info = mt_entry->fs_info; 2012fec: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) 2012ff0: 10 80 00 2a b 2013098 <== NOT EXECUTED 2012ff4: b8 17 23 ff or %i4, 0x3ff, %i4 <== NOT EXECUTED { for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 2012ff8: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED 2012ffc: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED 2013000: 9e 00 c0 02 add %g3, %g2, %o7 <== NOT EXECUTED 2013004: da 08 c0 02 ldub [ %g3 + %g2 ], %o5 <== NOT EXECUTED 2013008: c4 48 c0 02 ldsb [ %g3 + %g2 ], %g2 <== NOT EXECUTED 201300c: 88 08 60 07 and %g1, 7, %g4 <== NOT EXECUTED 2013010: 85 38 80 04 sra %g2, %g4, %g2 <== NOT EXECUTED 2013014: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 2013018: 12 80 00 0a bne 2013040 <== NOT EXECUTED 201301c: 82 00 60 01 inc %g1 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 2013020: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2013024: 89 28 40 04 sll %g1, %g4, %g4 <== NOT EXECUTED 2013028: 88 11 00 0d or %g4, %o5, %g4 <== NOT EXECUTED 201302c: c8 2b c0 00 stb %g4, [ %o7 ] <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 2013030: f0 07 60 74 ld [ %i5 + 0x74 ], %i0 <== NOT EXECUTED 2013034: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED 2013038: 81 c7 e0 08 ret <== NOT EXECUTED 201303c: 91 ee 00 01 restore %i0, %g1, %o0 <== NOT EXECUTED } fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) 2013040: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 2013044: 0a 80 00 03 bcs 2013050 <== NOT EXECUTED 2013048: c2 27 60 74 st %g1, [ %i5 + 0x74 ] <== NOT EXECUTED fs_info->index = 0; 201304c: c0 27 60 74 clr [ %i5 + 0x74 ] <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 2013050: 92 02 60 01 inc %o1 <== NOT EXECUTED 2013054: 80 a2 40 18 cmp %o1, %i0 <== NOT EXECUTED 2013058: 32 bf ff e8 bne,a 2012ff8 <== NOT EXECUTED 201305c: c6 07 60 70 ld [ %i5 + 0x70 ], %g3 <== NOT EXECUTED fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) 2013060: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED 2013064: 93 2a 60 01 sll %o1, 1, %o1 <== NOT EXECUTED 2013068: 82 27 00 01 sub %i4, %g1, %g1 <== NOT EXECUTED 201306c: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED 2013070: 1a 80 00 0d bcc 20130a4 <== NOT EXECUTED 2013074: 01 00 00 00 nop <== NOT EXECUTED { fs_info->uino_pool_size <<= 1; fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 2013078: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED 201307c: 7f ff d0 05 call 2007090 <== NOT EXECUTED 2013080: d2 27 60 78 st %o1, [ %i5 + 0x78 ] <== NOT EXECUTED if (fs_info->uino != NULL) 2013084: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2013088: 02 80 00 09 be 20130ac <== NOT EXECUTED 201308c: d0 27 60 70 st %o0, [ %i5 + 0x70 ] <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 2013090: c2 07 60 78 ld [ %i5 + 0x78 ], %g1 <== NOT EXECUTED 2013094: c2 27 60 74 st %g1, [ %i5 + 0x74 ] <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 2013098: f0 07 60 78 ld [ %i5 + 0x78 ], %i0 <== NOT EXECUTED 201309c: 10 bf ff ee b 2013054 <== NOT EXECUTED 20130a0: 92 10 20 00 clr %o1 <== NOT EXECUTED resrc_unsuff = true; } else resrc_unsuff = true; } return 0; 20130a4: 81 c7 e0 08 ret <== NOT EXECUTED 20130a8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } 20130ac: 81 c7 e0 08 ret <== NOT EXECUTED 20130b0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 02012f2c : int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 2012f2c: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; 2012f30: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 uint32_t cur_cln = start_cln; 2012f34: f2 27 bf fc st %i1, [ %fp + -4 ] char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 2012f38: d0 17 60 06 lduh [ %i5 + 6 ], %o0 2012f3c: 92 10 20 01 mov 1, %o1 2012f40: 7f ff ca 18 call 20057a0 2012f44: b8 10 00 18 mov %i0, %i4 if ( buf == NULL ) 2012f48: b6 92 20 00 orcc %o0, 0, %i3 2012f4c: 12 80 00 1b bne 2012fb8 <== ALWAYS TAKEN 2012f50: d2 07 bf fc ld [ %fp + -4 ], %o1 rtems_set_errno_and_return_minus_one( EIO ); 2012f54: 40 00 24 bd call 201c248 <__errno> <== NOT EXECUTED 2012f58: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2012f5c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2012f60: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012f64: 81 c7 e0 08 ret <== NOT EXECUTED 2012f68: 81 e8 00 00 restore <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); 2012f6c: 7f ff ff e4 call 2012efc 2012f70: 94 10 00 1b mov %i3, %o2 if ( ret == -1 ) 2012f74: 80 a2 3f ff cmp %o0, -1 2012f78: 12 80 00 06 bne 2012f90 <== ALWAYS TAKEN 2012f7c: d2 07 bf fc ld [ %fp + -4 ], %o1 { free(buf); 2012f80: 7f ff cb 3b call 2005c6c <== NOT EXECUTED 2012f84: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED return -1; 2012f88: 81 c7 e0 08 ret <== NOT EXECUTED 2012f8c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2012f90: 90 10 00 1c mov %i4, %o0 2012f94: 40 00 1c e0 call 201a314 2012f98: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2012f9c: b0 92 20 00 orcc %o0, 0, %i0 2012fa0: 02 80 00 06 be 2012fb8 <== ALWAYS TAKEN 2012fa4: d2 07 bf fc ld [ %fp + -4 ], %o1 { free(buf); 2012fa8: 7f ff cb 31 call 2005c6c <== NOT EXECUTED 2012fac: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED return rc; 2012fb0: 81 c7 e0 08 ret <== NOT EXECUTED 2012fb4: 81 e8 00 00 restore <== NOT EXECUTED buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2012fb8: c4 07 60 0c ld [ %i5 + 0xc ], %g2 2012fbc: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 2012fc0: 84 0a 40 02 and %o1, %g2, %g2 2012fc4: 80 a0 80 01 cmp %g2, %g1 2012fc8: 0a bf ff e9 bcs 2012f6c 2012fcc: 90 10 00 1c mov %i4, %o0 free(buf); return rc; } } free(buf); 2012fd0: 90 10 00 1b mov %i3, %o0 2012fd4: 7f ff cb 26 call 2005c6c 2012fd8: b0 10 20 00 clr %i0 return rc; } 2012fdc: 81 c7 e0 08 ret 2012fe0: 81 e8 00 00 restore =============================================================================== 02013280 : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry) { 2013280: 9d e3 bf 10 save %sp, -240, %sp ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; rc = stat(mt_entry->dev, &stat_buf); 2013284: d0 06 20 70 ld [ %i0 + 0x70 ], %o0 int fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry) { rtems_status_code sc = RTEMS_SUCCESSFUL; int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2013288: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry) { 201328c: b8 10 00 18 mov %i0, %i4 char boot_rec[FAT_MAX_BPB_SIZE]; char fs_info_sector[FAT_USEFUL_INFO_SIZE]; ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; 2013290: c0 27 bf fc clr [ %fp + -4 ] rc = stat(mt_entry->dev, &stat_buf); 2013294: 7f ff d0 21 call 2007318 2013298: 92 07 bf a8 add %fp, -88, %o1 if (rc == -1) 201329c: 80 a2 3f ff cmp %o0, -1 20132a0: 02 80 01 68 be 2013840 <== NEVER TAKEN 20132a4: b0 10 00 08 mov %o0, %i0 return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 20132a8: c4 07 bf b4 ld [ %fp + -76 ], %g2 20132ac: 03 00 00 3c sethi %hi(0xf000), %g1 20132b0: 84 08 80 01 and %g2, %g1, %g2 20132b4: 03 00 00 18 sethi %hi(0x6000), %g1 20132b8: 80 a0 80 01 cmp %g2, %g1 20132bc: 02 80 00 06 be 20132d4 <== ALWAYS TAKEN 20132c0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(ENOTTY); 20132c4: 40 00 23 e1 call 201c248 <__errno> <== NOT EXECUTED 20132c8: 01 00 00 00 nop <== NOT EXECUTED 20132cc: 10 80 01 ab b 2013978 <== NOT EXECUTED 20132d0: 82 10 20 19 mov 0x19, %g1 ! 19 <== NOT EXECUTED /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); 20132d4: 7f ff c6 a4 call 2004d64 20132d8: d0 1f bf c0 ldd [ %fp + -64 ], %o0 if (vol->dd == NULL) 20132dc: 80 a2 20 00 cmp %o0, 0 20132e0: 02 80 00 3e be 20133d8 <== NEVER TAKEN 20132e4: d0 27 60 60 st %o0, [ %i5 + 0x60 ] rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; 20132e8: d0 1f bf c0 ldd [ %fp + -64 ], %o0 /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dev, 0, &block); 20132ec: 94 10 20 00 clr %o2 /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); if (vol->dd == NULL) rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; 20132f0: d0 3f 60 58 std %o0, [ %i5 + 0x58 ] /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dev, 0, &block); 20132f4: 7f ff f7 89 call 2011118 20132f8: 96 07 bf fc add %fp, -4, %o3 if (sc != RTEMS_SUCCESSFUL) 20132fc: 80 a2 20 00 cmp %o0, 0 2013300: 12 80 00 34 bne 20133d0 <== NEVER TAKEN 2013304: 01 00 00 00 nop { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 2013308: d0 07 bf fc ld [ %fp + -4 ], %o0 201330c: de 02 20 24 ld [ %o0 + 0x24 ], %o7 2013310: d6 0b e0 17 ldub [ %o7 + 0x17 ], %o3 2013314: f4 0b e0 20 ldub [ %o7 + 0x20 ], %i2 2013318: d6 2f bf 99 stb %o3, [ %fp + -103 ] 201331c: d6 0b e0 23 ldub [ %o7 + 0x23 ], %o3 2013320: f4 2f bf 9a stb %i2, [ %fp + -102 ] 2013324: d6 2f bf 97 stb %o3, [ %fp + -105 ] 2013328: d6 0b e0 2c ldub [ %o7 + 0x2c ], %o3 201332c: da 0b e0 0b ldub [ %o7 + 0xb ], %o5 2013330: d6 2f bf 9d stb %o3, [ %fp + -99 ] 2013334: d6 0b e0 2d ldub [ %o7 + 0x2d ], %o3 2013338: d8 0b e0 0c ldub [ %o7 + 0xc ], %o4 201333c: d6 2f bf 9c stb %o3, [ %fp + -100 ] 2013340: d6 0b e0 2e ldub [ %o7 + 0x2e ], %o3 2013344: c6 0b e0 0e ldub [ %o7 + 0xe ], %g3 2013348: d6 2f bf 9b stb %o3, [ %fp + -101 ] 201334c: d6 0b e0 2f ldub [ %o7 + 0x2f ], %o3 2013350: c8 0b e0 0f ldub [ %o7 + 0xf ], %g4 2013354: c2 0b e0 11 ldub [ %o7 + 0x11 ], %g1 2013358: c4 0b e0 12 ldub [ %o7 + 0x12 ], %g2 201335c: f6 0b e0 0d ldub [ %o7 + 0xd ], %i3 2013360: f2 0b e0 10 ldub [ %o7 + 0x10 ], %i1 2013364: e2 0b e0 13 ldub [ %o7 + 0x13 ], %l1 2013368: e4 0b e0 14 ldub [ %o7 + 0x14 ], %l2 201336c: ee 0b e0 16 ldub [ %o7 + 0x16 ], %l7 2013370: e0 0b e0 21 ldub [ %o7 + 0x21 ], %l0 2013374: f0 0b e0 22 ldub [ %o7 + 0x22 ], %i0 2013378: e8 0b e0 24 ldub [ %o7 + 0x24 ], %l4 201337c: ec 0b e0 25 ldub [ %o7 + 0x25 ], %l6 2013380: ea 0b e0 26 ldub [ %o7 + 0x26 ], %l5 2013384: e6 0b e0 27 ldub [ %o7 + 0x27 ], %l3 2013388: f4 0b e0 28 ldub [ %o7 + 0x28 ], %i2 201338c: d6 2f bf a7 stb %o3, [ %fp + -89 ] 2013390: d6 0b e0 30 ldub [ %o7 + 0x30 ], %o3 2013394: de 0b e0 31 ldub [ %o7 + 0x31 ], %o7 2013398: d6 2f bf 9f stb %o3, [ %fp + -97 ] sc = rtems_bdbuf_release( block); 201339c: c2 27 bf 8c st %g1, [ %fp + -116 ] 20133a0: c4 3f bf 80 std %g2, [ %fp + -128 ] 20133a4: c8 27 bf 7c st %g4, [ %fp + -132 ] 20133a8: d8 3f bf 70 std %o4, [ %fp + -144 ] { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 20133ac: de 2f bf 9e stb %o7, [ %fp + -98 ] sc = rtems_bdbuf_release( block); 20133b0: 7f ff f7 f4 call 2011380 20133b4: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 20133b8: c2 07 bf 8c ld [ %fp + -116 ], %g1 20133bc: 80 a2 20 00 cmp %o0, 0 20133c0: c4 1f bf 80 ldd [ %fp + -128 ], %g2 20133c4: c8 07 bf 7c ld [ %fp + -132 ], %g4 20133c8: 02 80 00 08 be 20133e8 <== ALWAYS TAKEN 20133cc: d8 1f bf 70 ldd [ %fp + -144 ], %o4 { rtems_disk_release(vol->dd); 20133d0: 7f ff c6 84 call 2004de0 <== NOT EXECUTED 20133d4: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 20133d8: 40 00 23 9c call 201c248 <__errno> <== NOT EXECUTED 20133dc: 01 00 00 00 nop <== NOT EXECUTED 20133e0: 10 80 01 66 b 2013978 <== NOT EXECUTED 20133e4: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 20133e8: 98 0b 20 ff and %o4, 0xff, %o4 20133ec: 9a 0b 60 ff and %o5, 0xff, %o5 20133f0: 99 2b 20 08 sll %o4, 8, %o4 20133f4: 9a 13 00 0d or %o4, %o5, %o5 if ( (vol->bps != 512) && 20133f8: 9f 2b 60 10 sll %o5, 0x10, %o7 20133fc: 9f 33 e0 10 srl %o7, 0x10, %o7 2013400: 80 a3 e4 00 cmp %o7, 0x400 2013404: 02 80 00 0b be 2013430 <== NEVER TAKEN 2013408: da 37 40 00 sth %o5, [ %i5 ] 201340c: 80 a3 e2 00 cmp %o7, 0x200 2013410: 22 80 00 09 be,a 2013434 <== ALWAYS TAKEN 2013414: 9f 2b 60 10 sll %o5, 0x10, %o7 (vol->bps != 1024) && 2013418: 80 a3 e8 00 cmp %o7, 0x800 <== NOT EXECUTED 201341c: 02 80 00 05 be 2013430 <== NOT EXECUTED 2013420: 19 00 00 04 sethi %hi(0x1000), %o4 <== NOT EXECUTED (vol->bps != 2048) && 2013424: 80 a3 c0 0c cmp %o7, %o4 <== NOT EXECUTED 2013428: 12 80 00 d2 bne 2013770 <== NOT EXECUTED 201342c: 01 00 00 00 nop <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 2013430: 9f 2b 60 10 sll %o5, 0x10, %o7 <== NOT EXECUTED 2013434: c0 2f 60 03 clrb [ %i5 + 3 ] 2013438: 10 80 00 05 b 201344c 201343c: 9f 33 e0 19 srl %o7, 0x19, %o7 i >>= 1, vol->sec_mul++); 2013440: 9f 3b e0 01 sra %o7, 1, %o7 <== NOT EXECUTED 2013444: 98 03 20 01 inc %o4 <== NOT EXECUTED 2013448: d8 2f 60 03 stb %o4, [ %i5 + 3 ] <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 201344c: 80 8b e0 01 btst 1, %o7 2013450: 22 bf ff fc be,a 2013440 <== NEVER TAKEN 2013454: d8 0f 60 03 ldub [ %i5 + 3 ], %o4 <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 2013458: 9b 2b 60 10 sll %o5, 0x10, %o5 201345c: c0 2f 60 02 clrb [ %i5 + 2 ] 2013460: 93 33 60 10 srl %o5, 0x10, %o1 2013464: 10 80 00 05 b 2013478 2013468: 9e 10 00 09 mov %o1, %o7 i >>= 1, vol->sec_log2++); 201346c: 9f 3b e0 01 sra %o7, 1, %o7 2013470: 9a 03 60 01 inc %o5 2013474: da 2f 60 02 stb %o5, [ %i5 + 2 ] rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 2013478: 80 8b e0 01 btst 1, %o7 201347c: 22 bf ff fc be,a 201346c 2013480: da 0f 60 02 ldub [ %i5 + 2 ], %o5 vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 2013484: 9a 8e e0 ff andcc %i3, 0xff, %o5 2013488: 02 80 00 ba be 2013770 <== NEVER TAKEN 201348c: f6 2f 60 04 stb %i3, [ %i5 + 4 ] { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 2013490: 10 80 00 05 b 20134a4 2013494: c0 2f 60 05 clrb [ %i5 + 5 ] i >>= 1, vol->spc_log2++); 2013498: 9e 03 e0 01 inc %o7 201349c: 9b 3b 60 01 sra %o5, 1, %o5 20134a0: de 2f 60 05 stb %o7, [ %i5 + 5 ] { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 20134a4: 80 8b 60 01 btst 1, %o5 20134a8: 02 bf ff fc be 2013498 20134ac: de 0f 60 05 ldub [ %i5 + 5 ], %o7 i >>= 1, vol->spc_log2++); /* * "bytes per cluster" value greater than 32K is invalid */ if ((vol->bpc = vol->bps << vol->spc_log2) > MS_BYTES_PER_CLUSTER_LIMIT) 20134b0: 9f 2a 40 0f sll %o1, %o7, %o7 20134b4: de 37 60 06 sth %o7, [ %i5 + 6 ] 20134b8: 1b 00 00 20 sethi %hi(0x8000), %o5 20134bc: 9f 2b e0 10 sll %o7, 0x10, %o7 20134c0: 9f 33 e0 10 srl %o7, 0x10, %o7 20134c4: 80 a3 c0 0d cmp %o7, %o5 20134c8: 18 80 00 aa bgu 2013770 <== NEVER TAKEN 20134cc: 01 00 00 00 nop { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 20134d0: 10 80 00 05 b 20134e4 20134d4: c0 2f 60 08 clrb [ %i5 + 8 ] i >>= 1, vol->bpc_log2++); 20134d8: 9f 3b e0 01 sra %o7, 1, %o7 20134dc: 9a 03 60 01 inc %o5 20134e0: da 2f 60 08 stb %o5, [ %i5 + 8 ] { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 20134e4: 80 8b e0 01 btst 1, %o7 20134e8: 22 bf ff fc be,a 20134d8 20134ec: da 0f 60 08 ldub [ %i5 + 8 ], %o5 i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 20134f0: 84 08 a0 ff and %g2, 0xff, %g2 20134f4: 85 28 a0 08 sll %g2, 8, %g2 } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); 20134f8: f2 2f 60 09 stb %i1, [ %i5 + 9 ] vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 20134fc: 88 09 20 ff and %g4, 0xff, %g4 2013500: 86 08 e0 ff and %g3, 0xff, %g3 2013504: 89 29 20 08 sll %g4, 8, %g4 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 2013508: 82 08 60 ff and %g1, 0xff, %g1 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 201350c: 86 11 00 03 or %g4, %g3, %g3 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 2013510: 82 10 80 01 or %g2, %g1, %g1 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 2013514: c6 37 60 14 sth %g3, [ %i5 + 0x14 ] vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 2013518: c2 37 60 20 sth %g1, [ %i5 + 0x20 ] /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 201351c: 84 02 7f ff add %o1, -1, %g2 2013520: 83 28 60 10 sll %g1, 0x10, %g1 2013524: c6 27 bf 84 st %g3, [ %fp + -124 ] 2013528: 91 30 60 0b srl %g1, 0xb, %o0 201352c: 40 00 56 2f call 2028de8 <.div> 2013530: 90 02 00 02 add %o0, %g2, %o0 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 2013534: c4 0f 60 02 ldub [ %i5 + 2 ], %g2 vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 2013538: d0 27 60 24 st %o0, [ %i5 + 0x24 ] vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 201353c: 85 2a 00 02 sll %o0, %g2, %g2 2013540: c4 27 60 28 st %g2, [ %i5 + 0x28 ] if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 2013544: c4 0f bf 99 ldub [ %fp + -103 ], %g2 2013548: ae 0d e0 ff and %l7, 0xff, %l7 201354c: 85 28 a0 08 sll %g2, 8, %g2 vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 2013550: 82 10 00 08 mov %o0, %g1 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 2013554: ae 10 80 17 or %g2, %l7, %l7 2013558: af 2d e0 10 sll %l7, 0x10, %l7 201355c: 80 a5 e0 00 cmp %l7, 0 2013560: 02 80 00 05 be 2013574 <== NEVER TAKEN 2013564: c6 07 bf 84 ld [ %fp + -124 ], %g3 vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 2013568: af 35 e0 10 srl %l7, 0x10, %l7 201356c: 10 80 00 0c b 201359c 2013570: ee 27 60 18 st %l7, [ %i5 + 0x18 ] else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 2013574: ac 0d a0 ff and %l6, 0xff, %l6 <== NOT EXECUTED 2013578: aa 0d 60 ff and %l5, 0xff, %l5 <== NOT EXECUTED 201357c: ad 2d a0 08 sll %l6, 8, %l6 <== NOT EXECUTED 2013580: ab 2d 60 10 sll %l5, 0x10, %l5 <== NOT EXECUTED 2013584: a8 0d 20 ff and %l4, 0xff, %l4 <== NOT EXECUTED 2013588: aa 15 80 15 or %l6, %l5, %l5 <== NOT EXECUTED 201358c: a7 2c e0 18 sll %l3, 0x18, %l3 <== NOT EXECUTED 2013590: a8 15 40 14 or %l5, %l4, %l4 <== NOT EXECUTED 2013594: a6 15 00 13 or %l4, %l3, %l3 <== NOT EXECUTED 2013598: e6 27 60 18 st %l3, [ %i5 + 0x18 ] <== NOT EXECUTED vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 201359c: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 20135a0: 87 28 e0 10 sll %g3, 0x10, %g3 20135a4: c2 27 bf 8c st %g1, [ %fp + -116 ] 20135a8: a7 30 e0 10 srl %g3, 0x10, %l3 20135ac: 40 00 55 d3 call 2028cf8 <.umul> 20135b0: 90 0e 60 ff and %i1, 0xff, %o0 20135b4: c2 07 bf 8c ld [ %fp + -116 ], %g1 20135b8: 90 04 c0 08 add %l3, %o0, %o0 20135bc: 82 00 40 08 add %g1, %o0, %g1 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 20135c0: d0 27 60 1c st %o0, [ %i5 + 0x1c ] if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 20135c4: a4 0c a0 ff and %l2, 0xff, %l2 20135c8: a2 0c 60 ff and %l1, 0xff, %l1 20135cc: a5 2c a0 08 sll %l2, 8, %l2 20135d0: a2 14 80 11 or %l2, %l1, %l1 20135d4: a3 2c 60 10 sll %l1, 0x10, %l1 20135d8: 80 a4 60 00 cmp %l1, 0 20135dc: 02 80 00 05 be 20135f0 <== NEVER TAKEN 20135e0: c2 27 60 30 st %g1, [ %i5 + 0x30 ] vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 20135e4: a3 34 60 10 srl %l1, 0x10, %l1 20135e8: 10 80 00 0d b 201361c 20135ec: e2 27 60 2c st %l1, [ %i5 + 0x2c ] else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 20135f0: c6 0f bf 9a ldub [ %fp + -102 ], %g3 <== NOT EXECUTED 20135f4: c8 0f bf 97 ldub [ %fp + -105 ], %g4 <== NOT EXECUTED 20135f8: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED 20135fc: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED 2013600: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 2013604: b1 2e 20 10 sll %i0, 0x10, %i0 <== NOT EXECUTED 2013608: 84 10 80 18 or %g2, %i0, %g2 <== NOT EXECUTED 201360c: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 2013610: 87 29 20 18 sll %g4, 0x18, %g3 <== NOT EXECUTED 2013614: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 2013618: c4 27 60 2c st %g2, [ %i5 + 0x2c ] <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; 201361c: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 vol->data_cls = data_secs / vol->spc; 2013620: 92 0e e0 ff and %i3, 0xff, %o1 2013624: 40 00 55 ef call 2028de0 <.udiv> 2013628: 90 22 00 01 sub %o0, %g1, %o0 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 201362c: 80 a2 2f f4 cmp %o0, 0xff4 2013630: 18 80 00 08 bgu 2013650 <== NEVER TAKEN 2013634: d0 27 60 34 st %o0, [ %i5 + 0x34 ] { vol->type = FAT_FAT12; 2013638: 82 10 20 01 mov 1, %g1 201363c: c2 2f 60 0a stb %g1, [ %i5 + 0xa ] vol->mask = FAT_FAT12_MASK; 2013640: 82 10 2f ff mov 0xfff, %g1 2013644: c2 27 60 0c st %g1, [ %i5 + 0xc ] vol->eoc_val = FAT_FAT12_EOC; 2013648: 10 80 00 0f b 2013684 201364c: 82 10 2f f8 mov 0xff8, %g1 } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 2013650: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 2013654: 84 10 63 f4 or %g1, 0x3f4, %g2 ! fff4 <== NOT EXECUTED 2013658: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 201365c: 38 80 00 05 bgu,a 2013670 <== NOT EXECUTED 2013660: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED { vol->type = FAT_FAT16; 2013664: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED 2013668: 10 80 00 04 b 2013678 <== NOT EXECUTED 201366c: c4 2f 60 0a stb %g2, [ %i5 + 0xa ] <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 2013670: c2 2f 60 0a stb %g1, [ %i5 + 0xa ] <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 2013674: 03 03 ff ff sethi %hi(0xffffc00), %g1 <== NOT EXECUTED 2013678: 84 10 63 ff or %g1, 0x3ff, %g2 ! fffffff <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 201367c: 82 10 63 f8 or %g1, 0x3f8, %g1 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; vol->mask = FAT_FAT32_MASK; 2013680: c4 27 60 0c st %g2, [ %i5 + 0xc ] <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 2013684: c2 27 60 10 st %g1, [ %i5 + 0x10 ] } } if (vol->type == FAT_FAT32) 2013688: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 201368c: 80 a0 60 04 cmp %g1, 4 2013690: 12 80 00 6e bne 2013848 <== ALWAYS TAKEN 2013694: 82 10 3f ff mov -1, %g1 { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 2013698: c4 0f bf 9c ldub [ %fp + -100 ], %g2 <== NOT EXECUTED 201369c: c2 0f bf 9b ldub [ %fp + -101 ], %g1 <== NOT EXECUTED 20136a0: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 20136a4: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 20136a8: d6 0f bf a7 ldub [ %fp + -89 ], %o3 <== NOT EXECUTED 20136ac: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 20136b0: c4 0f bf 9d ldub [ %fp + -99 ], %g2 <== NOT EXECUTED 20136b4: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 20136b8: 85 2a e0 18 sll %o3, 0x18, %g2 <== NOT EXECUTED 20136bc: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 20136c0: c2 27 60 38 st %g1, [ %i5 + 0x38 ] <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 20136c4: 82 0e bf 80 and %i2, -128, %g1 <== NOT EXECUTED if (vol->mirror) 20136c8: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED 20136cc: 02 80 00 05 be 20136e0 <== NOT EXECUTED 20136d0: c2 2f 60 48 stb %g1, [ %i5 + 0x48 ] <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 20136d4: b4 0e a0 0f and %i2, 0xf, %i2 <== NOT EXECUTED 20136d8: 10 80 00 03 b 20136e4 <== NOT EXECUTED 20136dc: f4 2f 60 50 stb %i2, [ %i5 + 0x50 ] <== NOT EXECUTED else vol->afat = 0; 20136e0: c0 2f 60 50 clrb [ %i5 + 0x50 ] <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 20136e4: d2 0f bf 9e ldub [ %fp + -98 ], %o1 <== NOT EXECUTED 20136e8: c2 0f bf 9f ldub [ %fp + -97 ], %g1 <== NOT EXECUTED 20136ec: 93 2a 60 08 sll %o1, 8, %o1 <== NOT EXECUTED 20136f0: 92 12 40 01 or %o1, %g1, %o1 <== NOT EXECUTED 20136f4: d2 37 60 3c sth %o1, [ %i5 + 0x3c ] <== NOT EXECUTED if( vol->info_sec == 0 ) 20136f8: 93 2a 60 10 sll %o1, 0x10, %o1 <== NOT EXECUTED 20136fc: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 2013700: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 2013704: 02 80 00 1b be 2013770 <== NOT EXECUTED 2013708: 01 00 00 00 nop <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , 0, 201370c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 2013710: 94 10 20 00 clr %o2 <== NOT EXECUTED 2013714: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2013718: 7f ff fd a1 call 2012d9c <_fat_block_read> <== NOT EXECUTED 201371c: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 2013720: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2013724: 06 80 00 23 bl 20137b0 <== NOT EXECUTED 2013728: 01 00 00 00 nop <== NOT EXECUTED { rtems_disk_release(vol->dd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 201372c: c2 0f bf f2 ldub [ %fp + -14 ], %g1 <== NOT EXECUTED 2013730: c4 0f bf f1 ldub [ %fp + -15 ], %g2 <== NOT EXECUTED 2013734: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 2013738: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 201373c: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 2013740: c2 0f bf f0 ldub [ %fp + -16 ], %g1 <== NOT EXECUTED 2013744: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 2013748: c2 0f bf f3 ldub [ %fp + -13 ], %g1 <== NOT EXECUTED 201374c: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 2013750: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 2013754: 03 10 58 54 sethi %hi(0x41615000), %g1 <== NOT EXECUTED 2013758: 82 10 62 52 or %g1, 0x252, %g1 ! 41615252 <== NOT EXECUTED 201375c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2013760: 22 80 00 0a be,a 2013788 <== NOT EXECUTED 2013764: d2 17 60 3c lduh [ %i5 + 0x3c ], %o1 <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 2013768: 7f ff fd 33 call 2012c34 <== NOT EXECUTED 201376c: d0 07 20 34 ld [ %i4 + 0x34 ], %o0 <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 2013770: 7f ff c5 9c call 2004de0 <== NOT EXECUTED 2013774: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 2013778: 40 00 22 b4 call 201c248 <__errno> <== NOT EXECUTED 201377c: 01 00 00 00 nop <== NOT EXECUTED 2013780: 10 80 00 7e b 2013978 <== NOT EXECUTED 2013784: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, 2013788: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 201378c: 94 10 21 e4 mov 0x1e4, %o2 <== NOT EXECUTED 2013790: 96 10 20 0c mov 0xc, %o3 <== NOT EXECUTED 2013794: 7f ff fd 82 call 2012d9c <_fat_block_read> <== NOT EXECUTED 2013798: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 201379c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20137a0: 16 80 00 08 bge 20137c0 <== NOT EXECUTED 20137a4: c4 0f bf f5 ldub [ %fp + -11 ], %g2 <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 20137a8: 7f ff fd 23 call 2012c34 <== NOT EXECUTED 20137ac: d0 07 20 34 ld [ %i4 + 0x34 ], %o0 <== NOT EXECUTED ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 20137b0: 7f ff c5 8c call 2004de0 <== NOT EXECUTED 20137b4: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED if ( fs_info->uino == NULL ) { rtems_disk_release(vol->dd); free(fs_info->vhash); free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); 20137b8: 81 c7 e0 08 ret <== NOT EXECUTED 20137bc: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 20137c0: c2 0f bf f6 ldub [ %fp + -10 ], %g1 <== NOT EXECUTED 20137c4: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 20137c8: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 20137cc: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 20137d0: c4 0f bf f4 ldub [ %fp + -12 ], %g2 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 20137d4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 20137d8: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 20137dc: c4 0f bf f7 ldub [ %fp + -9 ], %g2 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 20137e0: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 20137e4: 85 28 a0 18 sll %g2, 0x18, %g2 <== NOT EXECUTED 20137e8: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 20137ec: c4 0f bf f9 ldub [ %fp + -7 ], %g2 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 20137f0: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 20137f4: c2 0f bf fa ldub [ %fp + -6 ], %g1 <== NOT EXECUTED 20137f8: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 20137fc: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 2013800: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 2013804: c4 0f bf f8 ldub [ %fp + -8 ], %g2 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 2013808: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 201380c: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 2013810: c4 0f bf fb ldub [ %fp + -5 ], %g2 <== NOT EXECUTED 2013814: 85 28 a0 18 sll %g2, 0x18, %g2 <== NOT EXECUTED 2013818: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 201381c: 7f ff fe 37 call 20130f8 <== NOT EXECUTED 2013820: c2 27 60 44 st %g1, [ %i5 + 0x44 ] <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 2013824: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2013828: 02 80 00 0d be 201385c <== NOT EXECUTED 201382c: 01 00 00 00 nop <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 2013830: 7f ff fd 01 call 2012c34 <== NOT EXECUTED 2013834: d0 07 20 34 ld [ %i4 + 0x34 ], %o0 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 0xFFFFFFFF); if ( rc != RC_OK ) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 2013838: 7f ff c5 6a call 2004de0 <== NOT EXECUTED 201383c: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED return rc; 2013840: 81 c7 e0 08 ret 2013844: 81 e8 00 00 restore } } } else { vol->rdir_cl = 0; 2013848: c0 27 60 38 clr [ %i5 + 0x38 ] vol->mirror = 0; 201384c: c0 2f 60 48 clrb [ %i5 + 0x48 ] vol->afat = 0; 2013850: c0 2f 60 50 clrb [ %i5 + 0x50 ] vol->free_cls = 0xFFFFFFFF; 2013854: c2 27 60 40 st %g1, [ %i5 + 0x40 ] vol->next_cl = 0xFFFFFFFF; 2013858: c2 27 60 44 st %g1, [ %i5 + 0x44 ] int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 201385c: 7f ff fc f6 call 2012c34 2013860: d0 07 20 34 ld [ %i4 + 0x34 ], %o0 vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 2013864: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 2013868: 40 00 55 24 call 2028cf8 <.umul> 201386c: d0 0f 60 50 ldub [ %i5 + 0x50 ], %o0 2013870: c2 17 60 14 lduh [ %i5 + 0x14 ], %g1 /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 2013874: 92 10 20 0c mov 0xc, %o1 vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 2013878: 82 02 00 01 add %o0, %g1, %g1 /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 201387c: 90 10 20 02 mov 2, %o0 2013880: 7f ff c7 c8 call 20057a0 2013884: c2 27 60 4c st %g1, [ %i5 + 0x4c ] if ( fs_info->vhash == NULL ) 2013888: 80 a2 20 00 cmp %o0, 0 201388c: 02 80 00 12 be 20138d4 <== NEVER TAKEN 2013890: d0 27 60 68 st %o0, [ %i5 + 0x68 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 2013894: 82 02 20 04 add %o0, 4, %g1 2013898: 84 02 20 10 add %o0, 0x10, %g2 head->next = tail; 201389c: c2 22 00 00 st %g1, [ %o0 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 20138a0: 82 02 20 0c add %o0, 0xc, %g1 head->next = tail; head->previous = NULL; 20138a4: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 20138a8: d0 22 20 08 st %o0, [ %o0 + 8 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 20138ac: c4 22 20 0c st %g2, [ %o0 + 0xc ] head->previous = NULL; 20138b0: c0 22 20 10 clr [ %o0 + 0x10 ] tail->previous = head; 20138b4: c2 22 20 14 st %g1, [ %o0 + 0x14 ] } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 20138b8: 92 10 20 0c mov 0xc, %o1 20138bc: 7f ff c7 b9 call 20057a0 20138c0: 90 10 20 02 mov 2, %o0 if ( fs_info->rhash == NULL ) 20138c4: 80 a2 20 00 cmp %o0, 0 20138c8: 12 80 00 06 bne 20138e0 <== ALWAYS TAKEN 20138cc: d0 27 60 6c st %o0, [ %i5 + 0x6c ] 20138d0: 30 80 00 1c b,a 2013940 <== NOT EXECUTED /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->vhash == NULL ) { rtems_disk_release(vol->dd); 20138d4: 7f ff c5 43 call 2004de0 <== NOT EXECUTED 20138d8: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED 20138dc: 30 80 00 24 b,a 201396c <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 20138e0: 82 02 20 04 add %o0, 4, %g1 head->next = tail; 20138e4: c2 22 00 00 st %g1, [ %o0 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 20138e8: 82 02 20 0c add %o0, 0xc, %g1 head->next = tail; head->previous = NULL; 20138ec: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 20138f0: c2 22 20 14 st %g1, [ %o0 + 0x14 ] 20138f4: d0 22 20 08 st %o0, [ %o0 + 8 ] { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 20138f8: c0 22 20 10 clr [ %o0 + 0x10 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 20138fc: 84 02 20 10 add %o0, 0x10, %g2 rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; 2013900: 82 10 21 00 mov 0x100, %g1 head->next = tail; 2013904: c4 22 20 0c st %g2, [ %o0 + 0xc ] 2013908: c2 27 60 78 st %g1, [ %i5 + 0x78 ] fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 201390c: c4 07 60 2c ld [ %i5 + 0x2c ], %g2 2013910: c2 0f 60 03 ldub [ %i5 + 3 ], %g1 fs_info->index = 0; 2013914: c0 27 60 74 clr [ %i5 + 0x74 ] } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 2013918: 83 28 80 01 sll %g2, %g1, %g1 201391c: 83 28 60 04 sll %g1, 4, %g1 fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 2013920: 90 10 21 00 mov 0x100, %o0 } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 2013924: c2 27 60 7c st %g1, [ %i5 + 0x7c ] fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 2013928: 7f ff c7 9e call 20057a0 201392c: 92 10 20 01 mov 1, %o1 if ( fs_info->uino == NULL ) 2013930: 80 a2 20 00 cmp %o0, 0 2013934: 12 80 00 14 bne 2013984 <== ALWAYS TAKEN 2013938: d0 27 60 70 st %o0, [ %i5 + 0x70 ] 201393c: 30 80 00 05 b,a 2013950 <== NOT EXECUTED rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->rhash == NULL ) { rtems_disk_release(vol->dd); 2013940: 7f ff c5 28 call 2004de0 <== NOT EXECUTED 2013944: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 2013948: 10 80 00 07 b 2013964 <== NOT EXECUTED 201394c: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); if ( fs_info->uino == NULL ) { rtems_disk_release(vol->dd); 2013950: 7f ff c5 24 call 2004de0 <== NOT EXECUTED 2013954: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 2013958: 7f ff c8 c5 call 2005c6c <== NOT EXECUTED 201395c: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 2013960: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED 2013964: 7f ff c8 c2 call 2005c6c <== NOT EXECUTED 2013968: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 201396c: 40 00 22 37 call 201c248 <__errno> <== NOT EXECUTED 2013970: 01 00 00 00 nop <== NOT EXECUTED 2013974: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2013978: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201397c: 81 c7 e0 08 ret <== NOT EXECUTED 2013980: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 2013984: d0 17 40 00 lduh [ %i5 ], %o0 2013988: 7f ff c7 86 call 20057a0 201398c: 92 10 20 01 mov 1, %o1 2013990: d0 27 60 8c st %o0, [ %i5 + 0x8c ] if (fs_info->sec_buf == NULL) 2013994: 80 a2 20 00 cmp %o0, 0 2013998: 12 bf ff aa bne 2013840 <== ALWAYS TAKEN 201399c: b0 10 20 00 clr %i0 { rtems_disk_release(vol->dd); 20139a0: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED 20139a4: 7f ff c5 0f call 2004de0 <== NOT EXECUTED 20139a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED free(fs_info->vhash); 20139ac: 7f ff c8 b0 call 2005c6c <== NOT EXECUTED 20139b0: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 20139b4: 7f ff c8 ae call 2005c6c <== NOT EXECUTED 20139b8: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED free(fs_info->uino); 20139bc: 7f ff c8 ac call 2005c6c <== NOT EXECUTED 20139c0: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 20139c4: 40 00 22 21 call 201c248 <__errno> <== NOT EXECUTED 20139c8: 01 00 00 00 nop <== NOT EXECUTED 20139cc: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 20139d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return RC_OK; } 20139d4: 81 c7 e0 08 ret <== NOT EXECUTED 20139d8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0201a850 : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 201a850: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 201a854: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 uint32_t cl4find = 2; uint32_t next_cln = 0; 201a858: c0 27 bf fc clr [ %fp + -4 ] uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 201a85c: e8 04 60 34 ld [ %l1 + 0x34 ], %l4 uint32_t i = 2; *cls_added = 0; 201a860: c0 26 c0 00 clr [ %i3 ] uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 201a864: ba 10 00 18 mov %i0, %i5 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; uint32_t next_cln = 0; uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 201a868: a8 05 20 02 add %l4, 2, %l4 uint32_t i = 2; *cls_added = 0; if (count == 0) 201a86c: 80 a6 a0 00 cmp %i2, 0 201a870: 02 80 00 16 be 201a8c8 <== NEVER TAKEN 201a874: b0 10 20 00 clr %i0 return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 201a878: e0 04 60 44 ld [ %l1 + 0x44 ], %l0 201a87c: 80 a4 3f ff cmp %l0, -1 201a880: 22 80 00 02 be,a 201a888 201a884: a0 10 20 02 mov 2, %l0 } } i++; cl4find++; if (cl4find >= data_cls_val) cl4find = 2; 201a888: a6 10 20 02 mov 2, %l3 201a88c: 10 80 00 55 b 201a9e0 201a890: a4 10 20 00 clr %l2 * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); 201a894: 92 10 00 10 mov %l0, %o1 201a898: 7f ff fe 9f call 201a314 201a89c: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 201a8a0: b0 92 20 00 orcc %o0, 0, %i0 201a8a4: 02 80 00 0b be 201a8d0 <== ALWAYS TAKEN 201a8a8: c2 07 bf fc ld [ %fp + -4 ], %g1 { if (*cls_added != 0) 201a8ac: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 201a8b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201a8b4: 02 80 00 5b be 201aa20 <== NOT EXECUTED 201a8b8: 01 00 00 00 nop <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); 201a8bc: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 201a8c0: 7f ff ff b4 call 201a790 <== NOT EXECUTED 201a8c4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 201a8c8: 81 c7 e0 08 ret <== NOT EXECUTED 201a8cc: 81 e8 00 00 restore <== NOT EXECUTED return rc; } if (next_cln == FAT_GENFAT_FREE) 201a8d0: 80 a0 60 00 cmp %g1, 0 201a8d4: 32 80 00 3f bne,a 201a9d0 201a8d8: a0 04 20 01 inc %l0 /* * We are enforced to process allocation of the first free cluster * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) 201a8dc: c2 06 c0 00 ld [ %i3 ], %g1 201a8e0: 80 a0 60 00 cmp %g1, 0 201a8e4: 12 80 00 0b bne 201a910 <== NEVER TAKEN 201a8e8: 90 10 00 1d mov %i5, %o0 { *chain = cl4find; 201a8ec: e0 26 40 00 st %l0, [ %i1 ] rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 201a8f0: 92 10 00 10 mov %l0, %o1 201a8f4: 7f ff fe f8 call 201a4d4 201a8f8: 94 10 3f ff mov -1, %o2 if ( rc != RC_OK ) 201a8fc: 80 a2 20 00 cmp %o0, 0 201a900: 22 80 00 22 be,a 201a988 <== ALWAYS TAKEN 201a904: c2 06 c0 00 ld [ %i3 ], %g1 * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 201a908: 81 c7 e0 08 ret <== NOT EXECUTED 201a90c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 201a910: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 201a914: 7f ff fe f0 call 201a4d4 <== NOT EXECUTED 201a918: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 201a91c: aa 10 00 08 mov %o0, %l5 <== NOT EXECUTED if ( rc != RC_OK ) 201a920: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED 201a924: 02 80 00 07 be 201a940 <== NOT EXECUTED 201a928: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 201a92c: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 201a930: 7f ff ff 98 call 201a790 <== NOT EXECUTED 201a934: b0 10 00 15 mov %l5, %i0 <== NOT EXECUTED return rc; 201a938: 81 c7 e0 08 ret <== NOT EXECUTED 201a93c: 81 e8 00 00 restore <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 201a940: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 201a944: 7f ff fe e4 call 201a4d4 <== NOT EXECUTED 201a948: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 201a94c: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 201a950: 22 80 00 0e be,a 201a988 <== NOT EXECUTED 201a954: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 201a958: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 201a95c: 7f ff ff 8d call 201a790 <== NOT EXECUTED 201a960: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE); 201a964: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 201a968: 94 10 20 00 clr %o2 <== NOT EXECUTED 201a96c: 7f ff fe da call 201a4d4 <== NOT EXECUTED 201a970: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED fat_buf_release(fs_info); 201a974: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 201a978: 7f ff e0 af call 2012c34 <== NOT EXECUTED 201a97c: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED return rc; 201a980: 81 c7 e0 08 ret <== NOT EXECUTED 201a984: 81 e8 00 00 restore <== NOT EXECUTED } } save_cln = cl4find; (*cls_added)++; 201a988: 82 00 60 01 inc %g1 /* have we satisfied request ? */ if (*cls_added == count) 201a98c: 80 a0 40 1a cmp %g1, %i2 201a990: 12 80 00 0e bne 201a9c8 <== NEVER TAKEN 201a994: c2 26 c0 00 st %g1, [ %i3 ] { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 201a998: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 201a99c: 80 a0 7f ff cmp %g1, -1 201a9a0: 02 80 00 05 be 201a9b4 <== ALWAYS TAKEN 201a9a4: e0 24 60 44 st %l0, [ %l1 + 0x44 ] fs_info->vol.free_cls -= (*cls_added); 201a9a8: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 201a9ac: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 201a9b0: c2 24 60 40 st %g1, [ %l1 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 201a9b4: e0 27 00 00 st %l0, [ %i4 ] fat_buf_release(fs_info); 201a9b8: 7f ff e0 9f call 2012c34 201a9bc: 90 10 00 11 mov %l1, %o0 return rc; 201a9c0: 81 c7 e0 08 ret 201a9c4: 81 e8 00 00 restore save_cln = cl4find; (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) 201a9c8: a4 10 00 10 mov %l0, %l2 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } } i++; cl4find++; 201a9cc: a0 04 20 01 inc %l0 <== NOT EXECUTED if (cl4find >= data_cls_val) 201a9d0: 80 a4 00 14 cmp %l0, %l4 201a9d4: 0a 80 00 03 bcs 201a9e0 <== ALWAYS TAKEN 201a9d8: a6 04 e0 01 inc %l3 cl4find = 2; 201a9dc: a0 10 20 02 mov 2, %l0 <== NOT EXECUTED /* * fs_info->vol.data_cls is exactly the count of data clusters * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) 201a9e0: 80 a4 c0 14 cmp %l3, %l4 201a9e4: 0a bf ff ac bcs 201a894 <== ALWAYS TAKEN 201a9e8: 90 10 00 1d mov %i5, %o0 if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 201a9ec: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 <== NOT EXECUTED 201a9f0: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 201a9f4: 02 80 00 05 be 201aa08 <== NOT EXECUTED 201a9f8: e4 24 60 44 st %l2, [ %l1 + 0x44 ] <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 201a9fc: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 201aa00: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 201aa04: c2 24 60 40 st %g1, [ %l1 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 201aa08: e4 27 00 00 st %l2, [ %i4 ] <== NOT EXECUTED fat_buf_release(fs_info); 201aa0c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 201aa10: 7f ff e0 89 call 2012c34 <== NOT EXECUTED 201aa14: b0 10 20 00 clr %i0 <== NOT EXECUTED return RC_OK; 201aa18: 81 c7 e0 08 ret <== NOT EXECUTED 201aa1c: 81 e8 00 00 restore <== NOT EXECUTED } 201aa20: 81 c7 e0 08 ret <== NOT EXECUTED 201aa24: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0201a4d4 : fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 201a4d4: 9d e3 bf 98 save %sp, -104, %sp fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t sec = 0; uint32_t ofs = 0; uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; rtems_bdbuf_buffer *block0 = NULL; 201a4d8: c0 27 bf fc clr [ %fp + -4 ] /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 201a4dc: 80 a6 60 01 cmp %i1, 1 201a4e0: 08 80 00 07 bleu 201a4fc <== NEVER TAKEN 201a4e4: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 201a4e8: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 201a4ec: 82 00 60 01 inc %g1 201a4f0: 80 a6 40 01 cmp %i1, %g1 201a4f4: 28 80 00 08 bleu,a 201a514 <== ALWAYS TAKEN 201a4f8: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 rtems_set_errno_and_return_minus_one(EIO); 201a4fc: 40 00 07 53 call 201c248 <__errno> <== NOT EXECUTED 201a500: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201a504: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 201a508: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201a50c: 81 c7 e0 08 ret <== NOT EXECUTED 201a510: 81 e8 00 00 restore <== NOT EXECUTED sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 201a514: b7 36 60 01 srl %i1, 1, %i3 201a518: 84 88 60 01 andcc %g1, 1, %g2 201a51c: 12 80 00 06 bne 201a534 <== ALWAYS TAKEN 201a520: b6 06 c0 19 add %i3, %i1, %i3 201a524: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 201a528: 02 80 00 03 be 201a534 <== NOT EXECUTED 201a52c: b7 2e 60 02 sll %i1, 2, %i3 <== NOT EXECUTED 201a530: b7 2e 60 01 sll %i1, 1, %i3 <== NOT EXECUTED 201a534: c6 0f 60 02 ldub [ %i5 + 2 ], %g3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 201a538: b9 36 60 01 srl %i1, 1, %i4 /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 201a53c: b7 36 c0 03 srl %i3, %g3, %i3 201a540: c6 07 60 4c ld [ %i5 + 0x4c ], %g3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 201a544: b8 07 00 19 add %i4, %i1, %i4 201a548: 80 a0 a0 00 cmp %g2, 0 201a54c: 12 80 00 06 bne 201a564 <== ALWAYS TAKEN 201a550: b6 06 c0 03 add %i3, %g3, %i3 201a554: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 201a558: 02 80 00 03 be 201a564 <== NOT EXECUTED 201a55c: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED 201a560: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED 201a564: e0 17 40 00 lduh [ %i5 ], %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 201a568: 90 10 00 1d mov %i5, %o0 201a56c: 92 10 00 1b mov %i3, %o1 201a570: 94 10 20 01 mov 1, %o2 201a574: 7f ff e1 31 call 2012a38 201a578: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 201a57c: b0 92 20 00 orcc %o0, 0, %i0 201a580: 12 bf ff e3 bne 201a50c <== NEVER TAKEN 201a584: a1 2c 20 10 sll %l0, 0x10, %l0 if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 201a588: a1 34 20 10 srl %l0, 0x10, %l0 201a58c: a0 04 3f ff add %l0, -1, %l0 201a590: a0 0f 00 10 and %i4, %l0, %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 201a594: f8 0f 60 0a ldub [ %i5 + 0xa ], %i4 201a598: 80 a7 20 02 cmp %i4, 2 201a59c: 02 80 00 5f be 201a718 <== NEVER TAKEN 201a5a0: 80 a7 20 04 cmp %i4, 4 201a5a4: 02 80 00 65 be 201a738 <== NEVER TAKEN 201a5a8: 80 a7 20 01 cmp %i4, 1 201a5ac: 12 80 00 73 bne 201a778 <== NEVER TAKEN 201a5b0: 80 8e 60 01 btst 1, %i1 { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 201a5b4: 02 80 00 29 be 201a658 201a5b8: c2 07 bf fc ld [ %fp + -4 ], %g1 { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; 201a5bc: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = 201a5c0: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 201a5c4: 84 08 a0 0f and %g2, 0xf, %g2 201a5c8: c4 28 40 10 stb %g2, [ %g1 + %l0 ] (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 201a5cc: c2 07 bf fc ld [ %fp + -4 ], %g1 { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = 201a5d0: 85 2e a0 04 sll %i2, 4, %g2 (*((uint8_t *)(block0->buffer + ofs))) | 201a5d4: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = 201a5d8: c6 08 40 10 ldub [ %g1 + %l0 ], %g3 201a5dc: 84 10 c0 02 or %g3, %g2, %g2 201a5e0: c4 28 40 10 stb %g2, [ %g1 + %l0 ] (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 201a5e4: c2 17 40 00 lduh [ %i5 ], %g1 201a5e8: 82 00 7f ff add %g1, -1, %g1 201a5ec: 80 a4 00 01 cmp %l0, %g1 201a5f0: 12 80 00 11 bne 201a634 <== ALWAYS TAKEN 201a5f4: f8 2f 60 84 stb %i4, [ %i5 + 0x84 ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 201a5f8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 201a5fc: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 201a600: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 201a604: 7f ff e1 0d call 2012a38 <== NOT EXECUTED 201a608: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 201a60c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 201a610: 12 bf ff bf bne 201a50c <== NOT EXECUTED 201a614: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) &= 0x00; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 201a618: b5 2e a0 14 sll %i2, 0x14, %i2 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) &= 0x00; 201a61c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 201a620: b5 36 a0 18 srl %i2, 0x18, %i2 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) &= 0x00; 201a624: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 201a628: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 201a62c: 10 80 00 27 b 201a6c8 <== NOT EXECUTED 201a630: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 201a634: c2 07 bf fc ld [ %fp + -4 ], %g1 201a638: a0 04 20 01 inc %l0 201a63c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 201a640: b5 2e a0 14 sll %i2, 0x14, %i2 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 201a644: c0 28 40 10 clrb [ %g1 + %l0 ] *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 201a648: c2 07 bf fc ld [ %fp + -4 ], %g1 (uint8_t )((fat16_clv & 0xFF00)>>8); 201a64c: b5 36 a0 18 srl %i2, 0x18, %i2 else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 201a650: 10 80 00 2d b 201a704 201a654: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 201a658: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 201a65c: b4 0e af ff and %i2, 0xfff, %i2 *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 201a660: c0 28 40 10 clrb [ %g1 + %l0 ] *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 201a664: c2 07 bf fc ld [ %fp + -4 ], %g1 201a668: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = 201a66c: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 201a670: 84 16 80 02 or %i2, %g2, %g2 201a674: c4 28 40 10 stb %g2, [ %g1 + %l0 ] (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 201a678: c2 17 40 00 lduh [ %i5 ], %g1 201a67c: 82 00 7f ff add %g1, -1, %g1 201a680: 80 a4 00 01 cmp %l0, %g1 201a684: 12 80 00 17 bne 201a6e0 <== ALWAYS TAKEN 201a688: f8 2f 60 84 stb %i4, [ %i5 + 0x84 ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 201a68c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 201a690: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 201a694: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 201a698: 7f ff e0 e8 call 2012a38 <== NOT EXECUTED 201a69c: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 201a6a0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 201a6a4: 12 bf ff 9a bne 201a50c <== NOT EXECUTED 201a6a8: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 201a6ac: b5 36 a0 08 srl %i2, 8, %i2 <== NOT EXECUTED &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; 201a6b0: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) = 201a6b4: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 201a6b8: 84 08 bf f0 and %g2, -16, %g2 <== NOT EXECUTED 201a6bc: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 201a6c0: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 201a6c4: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = 201a6c8: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 201a6cc: b4 16 80 02 or %i2, %g2, %i2 <== NOT EXECUTED 201a6d0: f4 28 40 00 stb %i2, [ %g1 ] <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 201a6d4: f8 2f 60 84 stb %i4, [ %i5 + 0x84 ] <== NOT EXECUTED 201a6d8: 81 c7 e0 08 ret <== NOT EXECUTED 201a6dc: 81 e8 00 00 restore <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 201a6e0: c2 07 bf fc ld [ %fp + -4 ], %g1 201a6e4: a0 04 20 01 inc %l0 201a6e8: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 201a6ec: b5 36 a0 08 srl %i2, 8, %i2 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 201a6f0: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 201a6f4: 84 08 bf f0 and %g2, -16, %g2 201a6f8: c4 28 40 10 stb %g2, [ %g1 + %l0 ] (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | 201a6fc: c2 07 bf fc ld [ %fp + -4 ], %g1 201a700: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = 201a704: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 201a708: b4 10 80 1a or %g2, %i2, %i2 201a70c: f4 28 40 10 stb %i2, [ %g1 + %l0 ] 201a710: 81 c7 e0 08 ret 201a714: 81 e8 00 00 restore } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 201a718: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 201a71c: b5 2e a0 10 sll %i2, 0x10, %i2 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 201a720: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 201a724: 85 36 a0 08 srl %i2, 8, %g2 <== NOT EXECUTED 201a728: b5 36 a0 18 srl %i2, 0x18, %i2 <== NOT EXECUTED 201a72c: b4 10 80 1a or %g2, %i2, %i2 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 201a730: 10 80 00 0e b 201a768 <== NOT EXECUTED 201a734: f4 30 40 10 sth %i2, [ %g1 + %l0 ] <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); fat_buf_mark_modified(fs_info); break; case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); 201a738: 11 3c 00 00 sethi %hi(0xf0000000), %o0 <== NOT EXECUTED 201a73c: 7f ff fe ea call 201a2e4 <== NOT EXECUTED 201a740: 90 2e 80 08 andn %i2, %o0, %o0 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 201a744: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); fat_buf_mark_modified(fs_info); break; case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); 201a748: b6 10 00 08 mov %o0, %i3 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 201a74c: f8 00 60 24 ld [ %g1 + 0x24 ], %i4 <== NOT EXECUTED 201a750: 7f ff fe e5 call 201a2e4 <== NOT EXECUTED 201a754: 11 3c 00 00 sethi %hi(0xf0000000), %o0 <== NOT EXECUTED 201a758: c2 07 00 10 ld [ %i4 + %l0 ], %g1 <== NOT EXECUTED 201a75c: 82 0a 00 01 and %o0, %g1, %g1 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = fat32_clv | (*((uint32_t *)(block0->buffer + ofs))); 201a760: b6 10 40 1b or %g1, %i3, %i3 <== NOT EXECUTED fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); *((uint32_t *)(block0->buffer + ofs)) = 201a764: f6 27 00 10 st %i3, [ %i4 + %l0 ] <== NOT EXECUTED 201a768: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 201a76c: c2 2f 60 84 stb %g1, [ %i5 + 0x84 ] <== NOT EXECUTED 201a770: 81 c7 e0 08 ret <== NOT EXECUTED 201a774: 81 e8 00 00 restore <== NOT EXECUTED fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 201a778: 40 00 06 b4 call 201c248 <__errno> <== NOT EXECUTED 201a77c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201a780: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 201a784: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED break; } return RC_OK; } 201a788: 81 c7 e0 08 ret <== NOT EXECUTED 201a78c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0201316c : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry) { 201316c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2013170: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry) { 2013174: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; int i = 0; if (fs_info->vol.type & FAT_FAT32) 2013178: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 <== NOT EXECUTED 201317c: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 2013180: 02 80 00 08 be 20131a0 <== NOT EXECUTED 2013184: b8 10 20 00 clr %i4 <== NOT EXECUTED { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, 2013188: d2 07 60 40 ld [ %i5 + 0x40 ], %o1 <== NOT EXECUTED 201318c: 7f ff ff db call 20130f8 <== NOT EXECUTED 2013190: d4 07 60 44 ld [ %i5 + 0x44 ], %o2 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 2013194: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED 2013198: 32 80 00 02 bne,a 20131a0 <== NOT EXECUTED 201319c: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED rc = -1; } fat_buf_release(fs_info); 20131a0: 7f ff fe a5 call 2012c34 <== NOT EXECUTED 20131a4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 20131a8: 7f ff f9 35 call 201167c <== NOT EXECUTED 20131ac: d0 1f 60 58 ldd [ %i5 + 0x58 ], %o0 <== NOT EXECUTED 20131b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20131b4: 32 80 00 02 bne,a 20131bc <== NOT EXECUTED 20131b8: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED rc = -1; 20131bc: b6 10 20 00 clr %i3 <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; 20131c0: f4 07 60 68 ld [ %i5 + 0x68 ], %i2 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 20131c4: 10 80 00 04 b 20131d4 <== NOT EXECUTED 20131c8: b4 06 80 1b add %i2, %i3, %i2 <== NOT EXECUTED free(node); 20131cc: 7f ff ca a8 call 2005c6c <== NOT EXECUTED 20131d0: 01 00 00 00 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 20131d4: 7f ff de 66 call 200ab6c <_Chain_Get> <== NOT EXECUTED 20131d8: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) 20131dc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20131e0: 12 bf ff fb bne 20131cc <== NOT EXECUTED 20131e4: 01 00 00 00 nop <== NOT EXECUTED 20131e8: b6 06 e0 0c add %i3, 0xc, %i3 <== NOT EXECUTED fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) 20131ec: 80 a6 e0 18 cmp %i3, 0x18 <== NOT EXECUTED 20131f0: 32 bf ff f5 bne,a 20131c4 <== NOT EXECUTED 20131f4: f4 07 60 68 ld [ %i5 + 0x68 ], %i2 <== NOT EXECUTED 20131f8: b6 10 20 00 clr %i3 <== NOT EXECUTED } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 20131fc: f4 07 60 6c ld [ %i5 + 0x6c ], %i2 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 2013200: 10 80 00 04 b 2013210 <== NOT EXECUTED 2013204: b4 06 80 1b add %i2, %i3, %i2 <== NOT EXECUTED free(node); 2013208: 7f ff ca 99 call 2005c6c <== NOT EXECUTED 201320c: 01 00 00 00 nop <== NOT EXECUTED 2013210: 7f ff de 57 call 200ab6c <_Chain_Get> <== NOT EXECUTED 2013214: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) 2013218: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201321c: 12 bf ff fb bne 2013208 <== NOT EXECUTED 2013220: 01 00 00 00 nop <== NOT EXECUTED 2013224: b6 06 e0 0c add %i3, 0xc, %i3 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } for (i = 0; i < FAT_HASH_SIZE; i++) 2013228: 80 a6 e0 18 cmp %i3, 0x18 <== NOT EXECUTED 201322c: 32 bf ff f5 bne,a 2013200 <== NOT EXECUTED 2013230: f4 07 60 6c ld [ %i5 + 0x6c ], %i2 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 2013234: 7f ff ca 8e call 2005c6c <== NOT EXECUTED 2013238: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 201323c: 7f ff ca 8c call 2005c6c <== NOT EXECUTED 2013240: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED free(fs_info->uino); 2013244: 7f ff ca 8a call 2005c6c <== NOT EXECUTED 2013248: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED free(fs_info->sec_buf); 201324c: 7f ff ca 88 call 2005c6c <== NOT EXECUTED 2013250: d0 07 60 8c ld [ %i5 + 0x8c ], %o0 <== NOT EXECUTED rtems_disk_release(fs_info->vol.dd); 2013254: 7f ff c6 e3 call 2004de0 <== NOT EXECUTED 2013258: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED if (rc) 201325c: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 2013260: 02 80 00 06 be 2013278 <== NOT EXECUTED 2013264: 01 00 00 00 nop <== NOT EXECUTED errno = EIO; 2013268: 40 00 23 f8 call 201c248 <__errno> <== NOT EXECUTED 201326c: 01 00 00 00 nop <== NOT EXECUTED 2013270: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2013274: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return rc; } 2013278: 81 c7 e0 08 ret <== NOT EXECUTED 201327c: 91 e8 00 1c restore %g0, %i4, %o0 <== NOT EXECUTED =============================================================================== 0201a05c : int fcntl( int fd, int cmd, ... ) { 201a05c: 9d e3 bf 98 save %sp, -104, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 201a060: 05 00 80 73 sethi %hi(0x201cc00), %g2 201a064: c6 00 a1 48 ld [ %g2 + 0x148 ], %g3 ! 201cd48 ... ) { int ret; va_list ap; va_start( ap, cmd ); 201a068: 82 07 a0 4c add %fp, 0x4c, %g1 201a06c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 201a070: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 201a074: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 201a078: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 201a07c: 80 a6 00 03 cmp %i0, %g3 201a080: 1a 80 00 0a bcc 201a0a8 201a084: c2 27 bf fc st %g1, [ %fp + -4 ] iop = rtems_libio_iop( fd ); 201a088: 05 00 80 76 sethi %hi(0x201d800), %g2 201a08c: c4 00 a0 20 ld [ %g2 + 0x20 ], %g2 ! 201d820 201a090: bb 2e 20 06 sll %i0, 6, %i5 201a094: ba 00 80 1d add %g2, %i5, %i5 rtems_libio_check_is_open(iop); 201a098: d0 07 60 18 ld [ %i5 + 0x18 ], %o0 201a09c: 80 8a 21 00 btst 0x100, %o0 201a0a0: 12 80 00 06 bne 201a0b8 201a0a4: 80 a6 60 09 cmp %i1, 9 201a0a8: 7f ff d5 18 call 200f508 <__errno> 201a0ac: 01 00 00 00 nop 201a0b0: 10 80 00 40 b 201a1b0 201a0b4: 82 10 20 09 mov 9, %g1 ! 9 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 201a0b8: 18 80 00 3b bgu 201a1a4 201a0bc: 89 2e 60 02 sll %i1, 2, %g4 201a0c0: 39 00 80 68 sethi %hi(0x201a000), %i4 201a0c4: b8 17 20 34 or %i4, 0x34, %i4 ! 201a034 <_calloc_r+0x14> 201a0c8: c8 07 00 04 ld [ %i4 + %g4 ], %g4 201a0cc: 81 c1 00 00 jmp %g4 201a0d0: 01 00 00 00 nop case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 201a0d4: c2 00 40 00 ld [ %g1 ], %g1 if ( fd2 ) 201a0d8: 80 a0 60 00 cmp %g1, 0 201a0dc: 02 80 00 07 be 201a0f8 201a0e0: 80 a0 40 03 cmp %g1, %g3 diop = rtems_libio_iop( fd2 ); 201a0e4: 1a 80 00 0a bcc 201a10c <== NEVER TAKEN 201a0e8: b8 10 20 00 clr %i4 201a0ec: b9 28 60 06 sll %g1, 6, %i4 201a0f0: 10 80 00 07 b 201a10c 201a0f4: b8 00 80 1c add %g2, %i4, %i4 else { /* allocate a file control block */ diop = rtems_libio_allocate(); 201a0f8: 7f ff a5 6b call 20036a4 201a0fc: 01 00 00 00 nop if ( diop == 0 ) { 201a100: b8 92 20 00 orcc %o0, 0, %i4 201a104: 02 80 00 3d be 201a1f8 <== NEVER TAKEN 201a108: 01 00 00 00 nop ret = -1; break; } } diop->flags = iop->flags; 201a10c: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 diop->pathinfo = iop->pathinfo; 201a110: 90 07 20 1c add %i4, 0x1c, %o0 ret = -1; break; } } diop->flags = iop->flags; 201a114: c2 27 20 18 st %g1, [ %i4 + 0x18 ] diop->pathinfo = iop->pathinfo; 201a118: 92 07 60 1c add %i5, 0x1c, %o1 201a11c: 7f ff d8 78 call 20102fc 201a120: 94 10 20 14 mov 0x14, %o2 ret = (int) (diop - rtems_libio_iops); 201a124: 03 00 80 76 sethi %hi(0x201d800), %g1 201a128: f0 00 60 20 ld [ %g1 + 0x20 ], %i0 ! 201d820 201a12c: b8 27 00 18 sub %i4, %i0, %i4 201a130: 10 80 00 22 b 201a1b8 201a134: b1 3f 20 06 sra %i4, 6, %i0 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 201a138: 90 0a 28 00 and %o0, 0x800, %o0 201a13c: 80 a0 00 08 cmp %g0, %o0 201a140: 10 80 00 21 b 201a1c4 201a144: b0 40 20 00 addx %g0, 0, %i0 * 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 ) ) 201a148: c2 00 40 00 ld [ %g1 ], %g1 201a14c: 80 a0 60 00 cmp %g1, 0 201a150: 22 80 00 0e be,a 201a188 201a154: 90 0a 37 ff and %o0, -2049, %o0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 201a158: 10 80 00 0c b 201a188 201a15c: 90 12 28 00 or %o0, 0x800, %o0 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 201a160: 7f ff a5 3b call 200364c 201a164: 01 00 00 00 nop 201a168: 10 80 00 14 b 201a1b8 201a16c: b0 10 00 08 mov %o0, %i0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 201a170: 7f ff a5 2a call 2003618 201a174: d0 00 40 00 ld [ %g1 ], %o0 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 201a178: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 201a17c: 90 0a 22 01 and %o0, 0x201, %o0 201a180: 82 08 7d fe and %g1, -514, %g1 201a184: 90 12 00 01 or %o0, %g1, %o0 201a188: d0 27 60 18 st %o0, [ %i5 + 0x18 ] rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 201a18c: 10 80 00 0e b 201a1c4 201a190: b0 10 20 00 clr %i0 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 201a194: 7f ff d4 dd call 200f508 <__errno> 201a198: 01 00 00 00 nop 201a19c: 10 80 00 05 b 201a1b0 201a1a0: 82 10 20 86 mov 0x86, %g1 ! 86 ret = -1; break; default: errno = EINVAL; 201a1a4: 7f ff d4 d9 call 200f508 <__errno> 201a1a8: 01 00 00 00 nop 201a1ac: 82 10 20 16 mov 0x16, %g1 ! 16 201a1b0: 10 80 00 12 b 201a1f8 201a1b4: c2 22 00 00 st %g1, [ %o0 ] /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 201a1b8: 80 a6 20 00 cmp %i0, 0 201a1bc: 06 80 00 0d bl 201a1f0 <== NEVER TAKEN 201a1c0: 01 00 00 00 nop int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); 201a1c4: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 201a1c8: 92 10 00 1d mov %i5, %o1 201a1cc: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 201a1d0: 9f c0 40 00 call %g1 201a1d4: 90 10 00 19 mov %i1, %o0 if (err) { 201a1d8: ba 92 20 00 orcc %o0, 0, %i5 201a1dc: 02 80 00 05 be 201a1f0 <== ALWAYS TAKEN 201a1e0: 01 00 00 00 nop errno = err; 201a1e4: 7f ff d4 c9 call 200f508 <__errno> <== NOT EXECUTED 201a1e8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 201a1ec: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 201a1f0: 81 c7 e0 08 ret 201a1f4: 81 e8 00 00 restore int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 201a1f8: 81 c7 e0 08 ret 201a1fc: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 0200cdb0 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200cdb0: 9d e3 bf 98 save %sp, -104, %sp static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 200cdb4: 37 00 80 84 sethi %hi(0x2021000), %i3 200cdb8: c2 06 e1 3c ld [ %i3 + 0x13c ], %g1 ! 202113c */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200cdbc: ba 10 00 18 mov %i0, %i5 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 200cdc0: 80 a0 60 00 cmp %g1, 0 200cdc4: 12 80 00 1a bne 200ce2c 200cdc8: b8 16 e1 3c or %i3, 0x13c, %i4 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 ); 200cdcc: 03 00 80 84 sethi %hi(0x2021000), %g1 200cdd0: d0 00 62 bc ld [ %g1 + 0x2bc ], %o0 ! 20212bc 200cdd4: 92 10 20 00 clr %o1 200cdd8: 7f ff ec fd call 20081cc 200cddc: 94 10 20 00 clr %o2 rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 200cde0: c2 06 e1 3c ld [ %i3 + 0x13c ], %g1 200cde4: 80 a0 60 00 cmp %g1, 0 200cde8: 12 80 00 0a bne 200ce10 <== NEVER TAKEN 200cdec: b6 10 20 00 clr %i3 sc = rtems_semaphore_create( 200cdf0: 11 14 12 54 sethi %hi(0x50495000), %o0 200cdf4: 92 10 20 01 mov 1, %o1 200cdf8: 90 12 20 45 or %o0, 0x45, %o0 200cdfc: 94 10 20 54 mov 0x54, %o2 200ce00: 96 10 20 00 clr %o3 200ce04: 7f ff ec 58 call 2007f64 200ce08: 98 10 00 1c mov %i4, %o4 200ce0c: b6 10 00 08 mov %o0, %i3 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 200ce10: 03 00 80 84 sethi %hi(0x2021000), %g1 200ce14: d0 00 62 bc ld [ %g1 + 0x2bc ], %o0 ! 20212bc 200ce18: 7f ff ed 37 call 20082f4 200ce1c: b0 10 3f f4 mov -12, %i0 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 200ce20: 80 a6 e0 00 cmp %i3, 0 200ce24: 12 80 00 f3 bne 200d1f0 200ce28: 01 00 00 00 nop sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 200ce2c: 03 00 80 84 sethi %hi(0x2021000), %g1 200ce30: d0 00 61 3c ld [ %g1 + 0x13c ], %o0 ! 202113c 200ce34: 92 10 20 00 clr %o1 200ce38: 94 10 20 00 clr %o2 200ce3c: 7f ff ec e4 call 20081cc 200ce40: b0 10 3f f4 mov -12, %i0 } if (sc == RTEMS_SUCCESSFUL) { 200ce44: 80 a2 20 00 cmp %o0, 0 200ce48: 12 80 00 ea bne 200d1f0 <== NEVER TAKEN 200ce4c: 01 00 00 00 nop err = pipe_lock(); if (err) return err; pipe = *pipep; 200ce50: f8 07 40 00 ld [ %i5 ], %i4 if (pipe == NULL) { 200ce54: 80 a7 20 00 cmp %i4, 0 200ce58: 32 80 00 56 bne,a 200cfb0 200ce5c: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 200ce60: 7f ff df f2 call 2004e28 200ce64: 90 10 20 34 mov 0x34, %o0 if (pipe == NULL) 200ce68: b8 92 20 00 orcc %o0, 0, %i4 200ce6c: 02 80 00 4e be 200cfa4 200ce70: 92 10 20 00 clr %o1 return err; memset(pipe, 0, sizeof(pipe_control_t)); 200ce74: 40 00 13 16 call 2011acc 200ce78: 94 10 20 34 mov 0x34, %o2 pipe->Size = PIPE_BUF; 200ce7c: 82 10 22 00 mov 0x200, %g1 pipe->Buffer = malloc(pipe->Size); 200ce80: 90 10 22 00 mov 0x200, %o0 200ce84: 7f ff df e9 call 2004e28 200ce88: c2 27 20 04 st %g1, [ %i4 + 4 ] if (! pipe->Buffer) 200ce8c: 80 a2 20 00 cmp %o0, 0 200ce90: 02 80 00 43 be 200cf9c <== NEVER TAKEN 200ce94: d0 27 00 00 st %o0, [ %i4 ] goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), 200ce98: 37 00 80 82 sethi %hi(0x2020800), %i3 200ce9c: d0 4e e1 34 ldsb [ %i3 + 0x134 ], %o0 ! 2020934 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 200cea0: 35 14 12 5c sethi %hi(0x50497000), %i2 200cea4: 82 16 a2 00 or %i2, 0x200, %g1 ! 50497200 200cea8: 92 10 20 00 clr %o1 200ceac: 90 12 00 01 or %o0, %g1, %o0 200ceb0: 94 10 20 00 clr %o2 200ceb4: 40 00 06 0d call 200e6e8 200ceb8: 96 07 20 2c add %i4, 0x2c, %o3 200cebc: 80 a2 20 00 cmp %o0, 0 200cec0: 12 80 00 35 bne 200cf94 200cec4: d0 4e e1 34 ldsb [ %i3 + 0x134 ], %o0 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 200cec8: 03 14 12 5d sethi %hi(0x50497400), %g1 200cecc: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 200ced0: 92 10 20 00 clr %o1 200ced4: 90 12 00 01 or %o0, %g1, %o0 200ced8: 94 10 20 00 clr %o2 200cedc: 40 00 06 03 call 200e6e8 200cee0: 96 07 20 30 add %i4, 0x30, %o3 200cee4: 80 a2 20 00 cmp %o0, 0 200cee8: 12 80 00 29 bne 200cf8c 200ceec: d0 4e e1 34 ldsb [ %i3 + 0x134 ], %o0 rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 200cef0: b4 16 a3 00 or %i2, 0x300, %i2 200cef4: 92 10 20 01 mov 1, %o1 200cef8: 90 12 00 1a or %o0, %i2, %o0 200cefc: 94 10 20 10 mov 0x10, %o2 200cf00: 96 10 20 00 clr %o3 200cf04: 7f ff ec 18 call 2007f64 200cf08: 98 07 20 28 add %i4, 0x28, %o4 200cf0c: 80 a2 20 00 cmp %o0, 0 200cf10: 12 80 00 1d bne 200cf84 200cf14: 94 07 bf fc add %fp, -4, %o2 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 200cf18: d2 07 20 2c ld [ %i4 + 0x2c ], %o1 200cf1c: 31 00 80 87 sethi %hi(0x2021c00), %i0 200cf20: 7f ff f2 e3 call 2009aac <_Objects_Get> 200cf24: 90 16 21 b0 or %i0, 0x1b0, %o0 ! 2021db0 <_Barrier_Information> static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; 200cf28: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 200cf2c: 35 04 00 00 sethi %hi(0x10000000), %i2 200cf30: 82 10 40 1a or %g1, %i2, %g1 _Thread_Enable_dispatch(); 200cf34: 7f ff f6 82 call 200a93c <_Thread_Enable_dispatch> 200cf38: c2 22 20 4c st %g1, [ %o0 + 0x4c ] 200cf3c: d2 07 20 30 ld [ %i4 + 0x30 ], %o1 200cf40: 94 07 bf fc add %fp, -4, %o2 200cf44: 7f ff f2 da call 2009aac <_Objects_Get> 200cf48: 90 16 21 b0 or %i0, 0x1b0, %o0 _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; 200cf4c: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 200cf50: b4 10 40 1a or %g1, %i2, %i2 _Thread_Enable_dispatch(); 200cf54: 7f ff f6 7a call 200a93c <_Thread_Enable_dispatch> 200cf58: f4 22 20 4c st %i2, [ %o0 + 0x4c ] #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 200cf5c: c2 0e e1 34 ldub [ %i3 + 0x134 ], %g1 200cf60: 84 00 60 01 add %g1, 1, %g2 200cf64: 83 28 60 18 sll %g1, 0x18, %g1 200cf68: 83 38 60 18 sra %g1, 0x18, %g1 200cf6c: 80 a0 60 7a cmp %g1, 0x7a 200cf70: 12 80 00 0f bne 200cfac 200cf74: c4 2e e1 34 stb %g2, [ %i3 + 0x134 ] c = 'a'; 200cf78: 82 10 20 61 mov 0x61, %g1 200cf7c: 10 80 00 0c b 200cfac 200cf80: c2 2e e1 34 stb %g1, [ %i3 + 0x134 ] return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 200cf84: 40 00 06 0a call 200e7ac 200cf88: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 err_wbar: rtems_barrier_delete(pipe->readBarrier); 200cf8c: 40 00 06 08 call 200e7ac 200cf90: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 err_rbar: free(pipe->Buffer); 200cf94: 7f ff dd b8 call 2004674 200cf98: d0 07 00 00 ld [ %i4 ], %o0 err_buf: free(pipe); 200cf9c: 7f ff dd b6 call 2004674 200cfa0: 90 10 00 1c mov %i4, %o0 if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 200cfa4: 10 80 00 13 b 200cff0 200cfa8: b0 10 3f f4 mov -12, %i0 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200cfac: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200cfb0: 92 10 20 00 clr %o1 200cfb4: 7f ff ec 86 call 20081cc 200cfb8: 94 10 20 00 clr %o2 err = -EINTR; if (*pipep == NULL) { 200cfbc: c2 07 40 00 ld [ %i5 ], %g1 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200cfc0: 80 a0 00 08 cmp %g0, %o0 200cfc4: b0 60 20 00 subx %g0, 0, %i0 err = -EINTR; if (*pipep == NULL) { 200cfc8: 80 a0 60 00 cmp %g1, 0 200cfcc: 12 80 00 09 bne 200cff0 200cfd0: b0 0e 3f fc and %i0, -4, %i0 if (err) 200cfd4: 80 a6 20 00 cmp %i0, 0 200cfd8: 22 80 00 06 be,a 200cff0 <== ALWAYS TAKEN 200cfdc: f8 27 40 00 st %i4, [ %i5 ] pipe_free(pipe); 200cfe0: 7f ff ff 37 call 200ccbc <== NOT EXECUTED 200cfe4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); 200cfe8: 10 80 00 03 b 200cff4 <== NOT EXECUTED 200cfec: 03 00 80 84 sethi %hi(0x2021000), %g1 <== NOT EXECUTED 200cff0: 03 00 80 84 sethi %hi(0x2021000), %g1 200cff4: 7f ff ec c0 call 20082f4 200cff8: d0 00 61 3c ld [ %g1 + 0x13c ], %o0 ! 202113c pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 200cffc: 80 a6 20 00 cmp %i0, 0 200d000: 12 80 00 7c bne 200d1f0 200d004: 01 00 00 00 nop return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 200d008: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200d00c: 82 08 60 06 and %g1, 6, %g1 200d010: 80 a0 60 04 cmp %g1, 4 200d014: 02 80 00 2e be 200d0cc 200d018: f8 07 40 00 ld [ %i5 ], %i4 200d01c: 80 a0 60 06 cmp %g1, 6 200d020: 02 80 00 56 be 200d178 200d024: 80 a0 60 02 cmp %g1, 2 200d028: 12 80 00 6a bne 200d1d0 <== NEVER TAKEN 200d02c: 01 00 00 00 nop case LIBIO_FLAGS_READ: pipe->readerCounter ++; 200d030: c2 07 20 20 ld [ %i4 + 0x20 ], %g1 200d034: 82 00 60 01 inc %g1 200d038: c2 27 20 20 st %g1, [ %i4 + 0x20 ] if (pipe->Readers ++ == 0) 200d03c: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200d040: 84 00 60 01 add %g1, 1, %g2 200d044: 80 a0 60 00 cmp %g1, 0 200d048: 12 80 00 05 bne 200d05c <== NEVER TAKEN 200d04c: c4 27 20 10 st %g2, [ %i4 + 0x10 ] PIPE_WAKEUPWRITERS(pipe); 200d050: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 200d054: 40 00 05 ff call 200e850 200d058: 92 07 bf f8 add %fp, -8, %o1 if (pipe->Writers == 0) { 200d05c: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 200d060: 80 a0 60 00 cmp %g1, 0 200d064: 12 80 00 5b bne 200d1d0 200d068: 01 00 00 00 nop /* Not an error */ if (LIBIO_NODELAY(iop)) 200d06c: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200d070: 80 88 60 01 btst 1, %g1 200d074: 12 80 00 57 bne 200d1d0 200d078: 01 00 00 00 nop break; prevCounter = pipe->writerCounter; 200d07c: f6 07 20 24 ld [ %i4 + 0x24 ], %i3 err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 200d080: 7f ff ec 9d call 20082f4 200d084: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 if (! PIPE_READWAIT(pipe)) 200d088: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 200d08c: 40 00 06 08 call 200e8ac 200d090: 92 10 20 00 clr %o1 200d094: 80 a2 20 00 cmp %o0, 0 200d098: 12 80 00 52 bne 200d1e0 <== NEVER TAKEN 200d09c: 92 10 20 00 clr %o1 goto out_error; if (! PIPE_LOCK(pipe)) 200d0a0: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200d0a4: 7f ff ec 4a call 20081cc 200d0a8: 94 10 20 00 clr %o2 200d0ac: 80 a2 20 00 cmp %o0, 0 200d0b0: 32 80 00 4d bne,a 200d1e4 <== NEVER TAKEN 200d0b4: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 200d0b8: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200d0bc: 80 a6 c0 01 cmp %i3, %g1 200d0c0: 02 bf ff f0 be 200d080 <== NEVER TAKEN 200d0c4: 01 00 00 00 nop 200d0c8: 30 80 00 42 b,a 200d1d0 } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 200d0cc: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200d0d0: 82 00 60 01 inc %g1 200d0d4: c2 27 20 24 st %g1, [ %i4 + 0x24 ] if (pipe->Writers ++ == 0) 200d0d8: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 200d0dc: 84 00 60 01 add %g1, 1, %g2 200d0e0: 80 a0 60 00 cmp %g1, 0 200d0e4: 12 80 00 05 bne 200d0f8 <== NEVER TAKEN 200d0e8: c4 27 20 14 st %g2, [ %i4 + 0x14 ] PIPE_WAKEUPREADERS(pipe); 200d0ec: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 200d0f0: 40 00 05 d8 call 200e850 200d0f4: 92 07 bf f8 add %fp, -8, %o1 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 200d0f8: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200d0fc: 80 a0 60 00 cmp %g1, 0 200d100: 12 80 00 34 bne 200d1d0 200d104: 01 00 00 00 nop 200d108: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200d10c: 80 88 60 01 btst 1, %g1 200d110: 22 80 00 07 be,a 200d12c 200d114: f6 07 20 20 ld [ %i4 + 0x20 ], %i3 PIPE_UNLOCK(pipe); 200d118: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200d11c: 7f ff ec 76 call 20082f4 200d120: b0 10 3f fa mov -6, %i0 err = -ENXIO; goto out_error; 200d124: 10 80 00 31 b 200d1e8 200d128: 90 10 00 1d mov %i5, %o0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 200d12c: 7f ff ec 72 call 20082f4 200d130: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 if (! PIPE_WRITEWAIT(pipe)) 200d134: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 200d138: 40 00 05 dd call 200e8ac 200d13c: 92 10 20 00 clr %o1 200d140: 80 a2 20 00 cmp %o0, 0 200d144: 12 80 00 27 bne 200d1e0 <== NEVER TAKEN 200d148: 92 10 20 00 clr %o1 goto out_error; if (! PIPE_LOCK(pipe)) 200d14c: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200d150: 7f ff ec 1f call 20081cc 200d154: 94 10 20 00 clr %o2 200d158: 80 a2 20 00 cmp %o0, 0 200d15c: 32 80 00 22 bne,a 200d1e4 <== NEVER TAKEN 200d160: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 200d164: c2 07 20 20 ld [ %i4 + 0x20 ], %g1 200d168: 80 a6 c0 01 cmp %i3, %g1 200d16c: 02 bf ff f0 be 200d12c <== NEVER TAKEN 200d170: 01 00 00 00 nop 200d174: 30 80 00 17 b,a 200d1d0 } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 200d178: c2 07 20 20 ld [ %i4 + 0x20 ], %g1 200d17c: 82 00 60 01 inc %g1 200d180: c2 27 20 20 st %g1, [ %i4 + 0x20 ] if (pipe->Readers ++ == 0) 200d184: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200d188: 84 00 60 01 add %g1, 1, %g2 200d18c: 80 a0 60 00 cmp %g1, 0 200d190: 12 80 00 05 bne 200d1a4 <== NEVER TAKEN 200d194: c4 27 20 10 st %g2, [ %i4 + 0x10 ] PIPE_WAKEUPWRITERS(pipe); 200d198: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 200d19c: 40 00 05 ad call 200e850 200d1a0: 92 07 bf f8 add %fp, -8, %o1 pipe->writerCounter ++; 200d1a4: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200d1a8: 82 00 60 01 inc %g1 200d1ac: c2 27 20 24 st %g1, [ %i4 + 0x24 ] if (pipe->Writers ++ == 0) 200d1b0: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 200d1b4: 84 00 60 01 add %g1, 1, %g2 200d1b8: 80 a0 60 00 cmp %g1, 0 200d1bc: 12 80 00 05 bne 200d1d0 <== NEVER TAKEN 200d1c0: c4 27 20 14 st %g2, [ %i4 + 0x14 ] PIPE_WAKEUPREADERS(pipe); 200d1c4: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 200d1c8: 40 00 05 a2 call 200e850 200d1cc: 92 07 bf f8 add %fp, -8, %o1 break; } PIPE_UNLOCK(pipe); 200d1d0: 7f ff ec 49 call 20082f4 200d1d4: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 return 0; 200d1d8: 81 c7 e0 08 ret 200d1dc: 81 e8 00 00 restore goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 200d1e0: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 200d1e4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 200d1e8: 7f ff fe c0 call 200cce8 200d1ec: 92 10 00 19 mov %i1, %o1 return err; } 200d1f0: 81 c7 e0 08 ret 200d1f4: 81 e8 00 00 restore =============================================================================== 02003534 : long fpathconf( int fd, int name ) { 2003534: 9d e3 bf a0 save %sp, -96, %sp long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 2003538: 03 00 80 5b sethi %hi(0x2016c00), %g1 200353c: c2 00 60 b8 ld [ %g1 + 0xb8 ], %g1 ! 2016cb8 2003540: 80 a6 00 01 cmp %i0, %g1 2003544: 1a 80 00 0a bcc 200356c 2003548: 01 00 00 00 nop iop = rtems_libio_iop(fd); 200354c: 03 00 80 5d sethi %hi(0x2017400), %g1 2003550: c2 00 63 00 ld [ %g1 + 0x300 ], %g1 ! 2017700 2003554: b1 2e 20 06 sll %i0, 6, %i0 2003558: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_is_open(iop); 200355c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2003560: 80 88 61 00 btst 0x100, %g1 2003564: 12 80 00 08 bne 2003584 <== ALWAYS TAKEN 2003568: 80 a6 60 0b cmp %i1, 0xb 200356c: 40 00 30 16 call 200f5c4 <__errno> 2003570: b0 10 3f ff mov -1, %i0 2003574: 82 10 20 09 mov 9, %g1 2003578: c2 22 00 00 st %g1, [ %o0 ] 200357c: 81 c7 e0 08 ret 2003580: 81 e8 00 00 restore * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 2003584: 18 80 00 2c bgu 2003634 2003588: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 200358c: b3 2e 60 02 sll %i1, 2, %i1 2003590: 05 00 80 0d sethi %hi(0x2003400), %g2 2003594: 84 10 a1 04 or %g2, 0x104, %g2 ! 2003504 2003598: c4 00 80 19 ld [ %g2 + %i1 ], %g2 200359c: 81 c0 80 00 jmp %g2 20035a0: 01 00 00 00 nop case _PC_LINK_MAX: return_value = the_limits->link_max; 20035a4: f0 00 60 38 ld [ %g1 + 0x38 ], %i0 break; 20035a8: 81 c7 e0 08 ret 20035ac: 81 e8 00 00 restore case _PC_MAX_CANON: return_value = the_limits->max_canon; 20035b0: f0 00 60 3c ld [ %g1 + 0x3c ], %i0 break; 20035b4: 81 c7 e0 08 ret 20035b8: 81 e8 00 00 restore case _PC_MAX_INPUT: return_value = the_limits->max_input; 20035bc: f0 00 60 40 ld [ %g1 + 0x40 ], %i0 break; 20035c0: 81 c7 e0 08 ret 20035c4: 81 e8 00 00 restore case _PC_NAME_MAX: return_value = the_limits->name_max; 20035c8: f0 00 60 44 ld [ %g1 + 0x44 ], %i0 break; 20035cc: 81 c7 e0 08 ret 20035d0: 81 e8 00 00 restore case _PC_PATH_MAX: return_value = the_limits->path_max; 20035d4: f0 00 60 48 ld [ %g1 + 0x48 ], %i0 break; 20035d8: 81 c7 e0 08 ret 20035dc: 81 e8 00 00 restore case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 20035e0: f0 00 60 4c ld [ %g1 + 0x4c ], %i0 break; 20035e4: 81 c7 e0 08 ret 20035e8: 81 e8 00 00 restore case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 20035ec: f0 00 60 54 ld [ %g1 + 0x54 ], %i0 break; 20035f0: 81 c7 e0 08 ret 20035f4: 81 e8 00 00 restore case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 20035f8: f0 00 60 58 ld [ %g1 + 0x58 ], %i0 break; 20035fc: 81 c7 e0 08 ret 2003600: 81 e8 00 00 restore case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 2003604: f0 00 60 64 ld [ %g1 + 0x64 ], %i0 break; 2003608: 81 c7 e0 08 ret 200360c: 81 e8 00 00 restore case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 2003610: f0 00 60 50 ld [ %g1 + 0x50 ], %i0 break; 2003614: 81 c7 e0 08 ret 2003618: 81 e8 00 00 restore case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 200361c: f0 00 60 5c ld [ %g1 + 0x5c ], %i0 break; 2003620: 81 c7 e0 08 ret 2003624: 81 e8 00 00 restore case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 2003628: f0 00 60 60 ld [ %g1 + 0x60 ], %i0 break; 200362c: 81 c7 e0 08 ret 2003630: 81 e8 00 00 restore default: rtems_set_errno_and_return_minus_one( EINVAL ); 2003634: 40 00 2f e4 call 200f5c4 <__errno> 2003638: b0 10 3f ff mov -1, %i0 200363c: 82 10 20 16 mov 0x16, %g1 2003640: c2 22 00 00 st %g1, [ %o0 ] break; } return return_value; } 2003644: 81 c7 e0 08 ret 2003648: 81 e8 00 00 restore =============================================================================== 02002dd4 : #include void free( void *ptr ) { 2002dd4: 9d e3 bf a0 save %sp, -96, %sp MSBUMP(free_calls, 1); 2002dd8: 03 00 80 72 sethi %hi(0x201c800), %g1 2002ddc: 82 10 61 50 or %g1, 0x150, %g1 ! 201c950 2002de0: c4 00 60 0c ld [ %g1 + 0xc ], %g2 #include void free( void *ptr ) { 2002de4: b2 10 00 18 mov %i0, %i1 MSBUMP(free_calls, 1); 2002de8: 84 00 a0 01 inc %g2 if ( !ptr ) 2002dec: 80 a6 20 00 cmp %i0, 0 2002df0: 02 80 00 21 be 2002e74 2002df4: c4 20 60 0c st %g2, [ %g1 + 0xc ] return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 2002df8: 03 00 80 73 sethi %hi(0x201cc00), %g1 2002dfc: c2 00 60 54 ld [ %g1 + 0x54 ], %g1 ! 201cc54 <_System_state_Current> 2002e00: 80 a0 60 03 cmp %g1, 3 2002e04: 12 80 00 09 bne 2002e28 <== NEVER TAKEN 2002e08: 03 00 80 71 sethi %hi(0x201c400), %g1 !malloc_is_system_state_OK() ) { 2002e0c: 40 00 00 6e call 2002fc4 2002e10: 01 00 00 00 nop return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 2002e14: 80 8a 20 ff btst 0xff, %o0 2002e18: 12 80 00 04 bne 2002e28 2002e1c: 03 00 80 71 sethi %hi(0x201c400), %g1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 2002e20: 40 00 00 88 call 2003040 2002e24: 81 e8 00 00 restore } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 2002e28: c2 00 62 94 ld [ %g1 + 0x294 ], %g1 2002e2c: 80 a0 60 00 cmp %g1, 0 2002e30: 02 80 00 06 be 2002e48 2002e34: 3b 00 80 6f sethi %hi(0x201bc00), %i5 (*rtems_malloc_statistics_helpers->at_free)(ptr); 2002e38: c2 00 60 08 ld [ %g1 + 8 ], %g1 2002e3c: 9f c0 40 00 call %g1 2002e40: 90 10 00 19 mov %i1, %o0 if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 2002e44: 3b 00 80 6f sethi %hi(0x201bc00), %i5 2002e48: d0 07 62 70 ld [ %i5 + 0x270 ], %o0 ! 201be70 2002e4c: 40 00 14 c5 call 2008160 <_Protected_heap_Free> 2002e50: 92 10 00 19 mov %i1, %o1 2002e54: 80 8a 20 ff btst 0xff, %o0 2002e58: 12 80 00 07 bne 2002e74 2002e5c: 31 00 80 6a sethi %hi(0x201a800), %i0 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, 2002e60: c2 07 62 70 ld [ %i5 + 0x270 ], %g1 */ 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", 2002e64: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 2002e68: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 2002e6c: 40 00 03 7a call 2003c54 2002e70: 91 ee 21 38 restore %i0, 0x138, %o0 2002e74: 81 c7 e0 08 ret 2002e78: 81 e8 00 00 restore =============================================================================== 02006274 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 2006274: 9d e3 bf a0 save %sp, -96, %sp rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 2006278: 03 00 80 8a sethi %hi(0x2022800), %g1 200627c: 82 10 61 a4 or %g1, 0x1a4, %g1 ! 20229a4 2006280: 80 a6 00 01 cmp %i0, %g1 2006284: 02 80 00 08 be 20062a4 <== NEVER TAKEN 2006288: 01 00 00 00 nop #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 200628c: 7f ff fb 8d call 20050c0 2006290: 90 06 20 04 add %i0, 4, %o0 rtems_filesystem_freenode( &env->root_directory); 2006294: 7f ff fb 8b call 20050c0 2006298: 90 06 20 18 add %i0, 0x18, %o0 free(env); 200629c: 7f ff fb 90 call 20050dc 20062a0: 81 e8 00 00 restore 20062a4: 81 c7 e0 08 ret <== NOT EXECUTED 20062a8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02002728 : rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major < disktab_size && disktab != NULL) { 2002728: 03 00 80 65 sethi %hi(0x2019400), %g1 200272c: c4 00 63 60 ld [ %g1 + 0x360 ], %g2 ! 2019760 2002730: 80 a2 00 02 cmp %o0, %g2 2002734: 1a 80 00 1e bcc 20027ac <== NEVER TAKEN 2002738: 82 10 20 00 clr %g1 200273c: 05 00 80 65 sethi %hi(0x2019400), %g2 2002740: c4 00 a3 64 ld [ %g2 + 0x364 ], %g2 ! 2019764 2002744: 80 a0 a0 00 cmp %g2, 0 2002748: 02 80 00 19 be 20027ac <== NEVER TAKEN 200274c: 01 00 00 00 nop rtems_disk_device_table *dtab = disktab + major; 2002750: 91 2a 20 03 sll %o0, 3, %o0 2002754: 86 00 80 08 add %g2, %o0, %g3 if (minor < dtab->size && dtab->minor != NULL) { 2002758: c6 00 e0 04 ld [ %g3 + 4 ], %g3 200275c: 80 a2 40 03 cmp %o1, %g3 2002760: 1a 80 00 13 bcc 20027ac <== NEVER TAKEN 2002764: 01 00 00 00 nop 2002768: c4 00 80 08 ld [ %g2 + %o0 ], %g2 200276c: 80 a0 a0 00 cmp %g2, 0 2002770: 02 80 00 0f be 20027ac <== NEVER TAKEN 2002774: 93 2a 60 02 sll %o1, 2, %o1 rtems_disk_device *dd = dtab->minor [minor]; 2002778: c2 00 80 09 ld [ %g2 + %o1 ], %g1 if (dd != NULL && !lookup_only) { 200277c: 80 a0 60 00 cmp %g1, 0 2002780: 02 80 00 0b be 20027ac 2002784: 80 a2 a0 00 cmp %o2, 0 2002788: 12 80 00 09 bne 20027ac 200278c: 01 00 00 00 nop if (!dd->deleted) { 2002790: c4 08 60 30 ldub [ %g1 + 0x30 ], %g2 2002794: 80 a0 a0 00 cmp %g2, 0 2002798: 32 80 00 05 bne,a 20027ac 200279c: 82 10 20 00 clr %g1 ++dd->uses; 20027a0: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 20027a4: 84 00 a0 01 inc %g2 20027a8: c4 20 60 14 st %g2, [ %g1 + 0x14 ] return dd; } } return NULL; } 20027ac: 81 c3 e0 08 retl 20027b0: 90 10 00 01 mov %g1, %o0 =============================================================================== 0201a2c8 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 201a2c8: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 201a2cc: 03 00 80 73 sethi %hi(0x201cc00), %g1 201a2d0: c2 00 61 48 ld [ %g1 + 0x148 ], %g1 ! 201cd48 201a2d4: 80 a6 00 01 cmp %i0, %g1 201a2d8: 1a 80 00 06 bcc 201a2f0 <== NEVER TAKEN 201a2dc: ba 10 20 00 clr %i5 201a2e0: 03 00 80 76 sethi %hi(0x201d800), %g1 201a2e4: fa 00 60 20 ld [ %g1 + 0x20 ], %i5 ! 201d820 201a2e8: b1 2e 20 06 sll %i0, 6, %i0 201a2ec: ba 07 40 18 add %i5, %i0, %i5 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 201a2f0: 92 07 60 1c add %i5, 0x1c, %o1 201a2f4: 94 10 20 14 mov 0x14, %o2 201a2f8: 7f ff d8 01 call 20102fc 201a2fc: 90 07 bf ec add %fp, -20, %o0 if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 201a300: c2 07 bf f8 ld [ %fp + -8 ], %g1 201a304: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 201a308: 9f c0 40 00 call %g1 201a30c: 90 07 bf ec add %fp, -20, %o0 201a310: 80 a2 20 01 cmp %o0, 1 201a314: 22 80 00 08 be,a 201a334 201a318: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 201a31c: 7f ff d4 7b call 200f508 <__errno> 201a320: b0 10 3f ff mov -1, %i0 201a324: 82 10 20 14 mov 0x14, %g1 201a328: c2 22 00 00 st %g1, [ %o0 ] 201a32c: 81 c7 e0 08 ret 201a330: 81 e8 00 00 restore /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len ); 201a334: 90 10 00 1d mov %i5, %o0 201a338: c2 00 60 08 ld [ %g1 + 8 ], %g1 201a33c: 92 10 00 19 mov %i1, %o1 201a340: 9f c0 40 00 call %g1 201a344: 94 10 00 1a mov %i2, %o2 } 201a348: 81 c7 e0 08 ret 201a34c: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200dd74 : IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) 200dd74: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 200dd78: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 200dd7c: 80 a0 a0 01 cmp %g2, 1 200dd80: 12 80 00 05 bne 200dd94 <== NEVER TAKEN 200dd84: 82 10 3f ff mov -1, %g1 return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 200dd88: c0 22 20 10 clr [ %o0 + 0x10 ] 200dd8c: c0 22 20 14 clr [ %o0 + 0x14 ] return 0; 200dd90: 82 10 20 00 clr %g1 } 200dd94: 81 c3 e0 08 retl 200dd98: 90 10 00 01 mov %g1, %o0 =============================================================================== 0200dfa0 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 200dfa0: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 200dfa4: fa 06 40 00 ld [ %i1 ], %i5 /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) 200dfa8: c4 07 60 50 ld [ %i5 + 0x50 ], %g2 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 200dfac: 82 07 60 54 add %i5, 0x54, %g1 200dfb0: 80 a0 80 01 cmp %g2, %g1 200dfb4: 22 80 00 06 be,a 200dfcc 200dfb8: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 200dfbc: 40 00 02 e0 call 200eb3c <__errno> 200dfc0: 01 00 00 00 nop 200dfc4: 10 80 00 0d b 200dff8 200dfc8: 82 10 20 5a mov 0x5a, %g1 ! 5a /* * You cannot remove the file system root node. */ if ( rtems_filesystem_is_root_location(pathloc) ) 200dfcc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 200dfd0: 80 a0 40 1d cmp %g1, %i5 200dfd4: 02 80 00 06 be 200dfec 200dfd8: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 200dfdc: c2 07 60 5c ld [ %i5 + 0x5c ], %g1 200dfe0: 80 a0 60 00 cmp %g1, 0 200dfe4: 02 80 00 08 be 200e004 <== ALWAYS TAKEN 200dfe8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBUSY ); 200dfec: 40 00 02 d4 call 200eb3c <__errno> 200dff0: 01 00 00 00 nop 200dff4: 82 10 20 10 mov 0x10, %g1 ! 10 200dff8: c2 22 00 00 st %g1, [ %o0 ] 200dffc: 81 c7 e0 08 ret 200e000: 91 e8 3f ff restore %g0, -1, %o0 IMFS_create_orphan( the_jnode ); 200e004: 7f ff f4 2a call 200b0ac 200e008: 90 10 00 1d mov %i5, %o0 IMFS_check_node_remove( the_jnode ); 200e00c: 90 10 00 1d mov %i5, %o0 200e010: 7f ff f4 39 call 200b0f4 200e014: b0 10 20 00 clr %i0 return 0; } 200e018: 81 c7 e0 08 ret 200e01c: 81 e8 00 00 restore =============================================================================== 0200347c : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 200347c: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 2003480: 03 00 80 5d sethi %hi(0x2017400), %g1 2003484: c4 48 60 c8 ldsb [ %g1 + 0xc8 ], %g2 ! 20174c8 2003488: 80 a0 a0 00 cmp %g2, 0 200348c: 12 80 00 32 bne 2003554 2003490: 01 00 00 00 nop return; etc_passwd_initted = 1; 2003494: 84 10 20 01 mov 1, %g2 ! 1 mkdir("/etc", 0777); 2003498: 92 10 21 ff mov 0x1ff, %o1 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 200349c: c4 28 60 c8 stb %g2, [ %g1 + 0xc8 ] mkdir("/etc", 0777); 20034a0: 11 00 80 57 sethi %hi(0x2015c00), %o0 20034a4: 40 00 02 53 call 2003df0 20034a8: 90 12 23 a0 or %o0, 0x3a0, %o0 ! 2015fa0 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 20034ac: 3b 00 80 57 sethi %hi(0x2015c00), %i5 20034b0: 13 00 80 57 sethi %hi(0x2015c00), %o1 20034b4: 90 17 63 a8 or %i5, 0x3a8, %o0 20034b8: 40 00 32 40 call 200fdb8 20034bc: 92 12 63 b8 or %o1, 0x3b8, %o1 20034c0: 80 a2 20 00 cmp %o0, 0 20034c4: 12 80 00 0d bne 20034f8 20034c8: 01 00 00 00 nop fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 20034cc: 90 17 63 a8 or %i5, 0x3a8, %o0 20034d0: 13 00 80 57 sethi %hi(0x2015c00), %o1 20034d4: 40 00 32 39 call 200fdb8 20034d8: 92 12 63 c0 or %o1, 0x3c0, %o1 ! 2015fc0 20034dc: b0 92 20 00 orcc %o0, 0, %i0 20034e0: 02 80 00 08 be 2003500 <== NEVER TAKEN 20034e4: 11 00 80 57 sethi %hi(0x2015c00), %o0 fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 20034e8: 92 10 00 18 mov %i0, %o1 20034ec: 40 00 32 5f call 200fe68 20034f0: 90 12 23 c8 or %o0, 0x3c8, %o0 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 20034f4: 90 10 00 18 mov %i0, %o0 20034f8: 40 00 30 51 call 200f63c 20034fc: 01 00 00 00 nop } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 2003500: 3b 00 80 58 sethi %hi(0x2016000), %i5 2003504: 13 00 80 57 sethi %hi(0x2015c00), %o1 2003508: 90 17 60 30 or %i5, 0x30, %o0 200350c: 40 00 32 2b call 200fdb8 2003510: 92 12 63 b8 or %o1, 0x3b8, %o1 2003514: b0 92 20 00 orcc %o0, 0, %i0 2003518: 12 80 00 0d bne 200354c 200351c: 01 00 00 00 nop fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 2003520: 90 17 60 30 or %i5, 0x30, %o0 2003524: 13 00 80 57 sethi %hi(0x2015c00), %o1 2003528: 40 00 32 24 call 200fdb8 200352c: 92 12 63 c0 or %o1, 0x3c0, %o1 ! 2015fc0 2003530: b0 92 20 00 orcc %o0, 0, %i0 2003534: 02 80 00 08 be 2003554 <== NEVER TAKEN 2003538: 01 00 00 00 nop fprintf( fp, "root:x:0:root\n" 200353c: 11 00 80 58 sethi %hi(0x2016000), %o0 2003540: 92 10 00 18 mov %i0, %o1 2003544: 40 00 32 49 call 200fe68 2003548: 90 12 20 40 or %o0, 0x40, %o0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 200354c: 40 00 30 3c call 200f63c 2003550: 81 e8 00 00 restore 2003554: 81 c7 e0 08 ret 2003558: 81 e8 00 00 restore =============================================================================== 02004d48 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 2004d48: 9d e3 bf a0 save %sp, -96, %sp if (tty->termios.c_iflag & ISTRIP) 2004d4c: c4 06 60 30 ld [ %i1 + 0x30 ], %g2 2004d50: 80 88 a0 20 btst 0x20, %g2 2004d54: 32 80 00 02 bne,a 2004d5c <== NEVER TAKEN 2004d58: b0 0e 20 7f and %i0, 0x7f, %i0 <== NOT EXECUTED c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 2004d5c: 80 88 a2 00 btst 0x200, %g2 2004d60: 02 80 00 0c be 2004d90 2004d64: 80 a6 20 0d cmp %i0, 0xd c = tolower (c); 2004d68: 03 00 80 70 sethi %hi(0x201c000), %g1 2004d6c: c2 00 61 5c ld [ %g1 + 0x15c ], %g1 ! 201c15c <__ctype_ptr__> 2004d70: 82 00 40 18 add %g1, %i0, %g1 2004d74: c2 08 60 01 ldub [ %g1 + 1 ], %g1 2004d78: 82 08 60 03 and %g1, 3, %g1 2004d7c: 80 a0 60 01 cmp %g1, 1 2004d80: 22 80 00 02 be,a 2004d88 2004d84: b0 06 20 20 add %i0, 0x20, %i0 2004d88: b0 0e 20 ff and %i0, 0xff, %i0 if (c == '\r') { 2004d8c: 80 a6 20 0d cmp %i0, 0xd 2004d90: 12 80 00 0a bne 2004db8 2004d94: 80 a6 20 0a cmp %i0, 0xa if (tty->termios.c_iflag & IGNCR) 2004d98: 80 88 a0 80 btst 0x80, %g2 2004d9c: 12 80 00 5b bne 2004f08 <== NEVER TAKEN 2004da0: 82 10 20 00 clr %g1 return 0; if (tty->termios.c_iflag & ICRNL) 2004da4: 80 88 a1 00 btst 0x100, %g2 2004da8: 32 80 00 0d bne,a 2004ddc <== ALWAYS TAKEN 2004dac: b0 10 20 0a mov 0xa, %i0 c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2004db0: 10 80 00 0c b 2004de0 <== NOT EXECUTED 2004db4: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 2004db8: 12 80 00 07 bne 2004dd4 2004dbc: 80 a6 20 00 cmp %i0, 0 2004dc0: 80 88 a0 40 btst 0x40, %g2 2004dc4: 32 80 00 06 bne,a 2004ddc <== NEVER TAKEN 2004dc8: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2004dcc: 10 80 00 05 b 2004de0 2004dd0: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 2004dd4: 02 80 00 3a be 2004ebc <== NEVER TAKEN 2004dd8: 03 00 80 6f sethi %hi(0x201bc00), %g1 2004ddc: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 2004de0: 80 88 a0 02 btst 2, %g2 2004de4: 02 80 00 36 be 2004ebc 2004de8: 03 00 80 6f sethi %hi(0x201bc00), %g1 if (c == tty->termios.c_cc[VERASE]) { 2004dec: c2 0e 60 43 ldub [ %i1 + 0x43 ], %g1 erase (tty, 0); 2004df0: 90 10 00 19 mov %i1, %o0 } 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]) { 2004df4: 80 a0 40 18 cmp %g1, %i0 2004df8: 02 80 00 08 be 2004e18 2004dfc: 92 10 20 00 clr %o1 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 2004e00: c2 0e 60 44 ldub [ %i1 + 0x44 ], %g1 2004e04: 80 a0 40 18 cmp %g1, %i0 2004e08: 32 80 00 08 bne,a 2004e28 2004e0c: c6 0e 60 45 ldub [ %i1 + 0x45 ], %g3 erase (tty, 1); 2004e10: 90 10 00 19 mov %i1, %o0 2004e14: 92 10 20 01 mov 1, %o1 2004e18: 7f ff ff 46 call 2004b30 2004e1c: 01 00 00 00 nop if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; 2004e20: 10 80 00 3a b 2004f08 2004e24: 82 10 20 00 clr %g1 ! 0 } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 2004e28: 80 a0 c0 18 cmp %g3, %i0 2004e2c: 02 80 00 37 be 2004f08 <== NEVER TAKEN 2004e30: 82 10 20 01 mov 1, %g1 return 1; } else if (c == '\n') { 2004e34: 80 a6 20 0a cmp %i0, 0xa 2004e38: 32 80 00 0d bne,a 2004e6c 2004e3c: c2 0e 60 4c ldub [ %i1 + 0x4c ], %g1 if (tty->termios.c_lflag & (ECHO | ECHONL)) 2004e40: 80 88 a0 48 btst 0x48, %g2 2004e44: 22 80 00 06 be,a 2004e5c <== NEVER TAKEN 2004e48: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 2004e4c: 90 10 20 0a mov 0xa, %o0 2004e50: 7f ff ff 18 call 2004ab0 2004e54: 92 10 00 19 mov %i1, %o1 tty->cbuf[tty->ccount++] = c; 2004e58: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2004e5c: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 2004e60: 86 10 20 0a mov 0xa, %g3 2004e64: 10 80 00 12 b 2004eac 2004e68: c6 28 80 01 stb %g3, [ %g2 + %g1 ] return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 2004e6c: 80 a0 40 18 cmp %g1, %i0 2004e70: 02 80 00 07 be 2004e8c <== NEVER TAKEN 2004e74: 80 88 a0 08 btst 8, %g2 2004e78: c2 0e 60 51 ldub [ %i1 + 0x51 ], %g1 2004e7c: 80 a0 40 18 cmp %g1, %i0 2004e80: 12 80 00 0f bne 2004ebc <== ALWAYS TAKEN 2004e84: 03 00 80 6f sethi %hi(0x201bc00), %g1 (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 2004e88: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 2004e8c: 22 80 00 06 be,a 2004ea4 <== NOT EXECUTED 2004e90: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 2004e94: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2004e98: 7f ff ff 06 call 2004ab0 <== NOT EXECUTED 2004e9c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2004ea0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2004ea4: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 2004ea8: f0 28 80 01 stb %i0, [ %g2 + %g1 ] <== NOT EXECUTED 2004eac: 82 00 60 01 inc %g1 2004eb0: c2 26 60 20 st %g1, [ %i1 + 0x20 ] return 1; 2004eb4: 10 80 00 15 b 2004f08 2004eb8: 82 10 20 01 mov 1, %g1 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 2004ebc: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 2004ec0: c4 00 63 94 ld [ %g1 + 0x394 ], %g2 2004ec4: 84 00 bf ff add %g2, -1, %g2 2004ec8: 80 a0 c0 02 cmp %g3, %g2 2004ecc: 16 80 00 0f bge 2004f08 <== NEVER TAKEN 2004ed0: 82 10 20 00 clr %g1 if (tty->termios.c_lflag & ECHO) 2004ed4: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 2004ed8: 80 88 60 08 btst 8, %g1 2004edc: 22 80 00 06 be,a 2004ef4 <== NEVER TAKEN 2004ee0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 2004ee4: 90 10 00 18 mov %i0, %o0 2004ee8: 7f ff fe f2 call 2004ab0 2004eec: 92 10 00 19 mov %i1, %o1 tty->cbuf[tty->ccount++] = c; 2004ef0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2004ef4: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 2004ef8: f0 28 80 01 stb %i0, [ %g2 + %g1 ] 2004efc: 82 00 60 01 inc %g1 2004f00: c2 26 60 20 st %g1, [ %i1 + 0x20 ] } return 0; 2004f04: 82 10 20 00 clr %g1 } 2004f08: 81 c7 e0 08 ret 2004f0c: 91 e8 00 01 restore %g0, %g1, %o0 =============================================================================== 0201950c : int killinfo( pid_t pid, int sig, const union sigval *value ) { 201950c: 9d e3 bf 90 save %sp, -112, %sp POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 2019510: 7f ff fe f2 call 20190d8 2019514: 01 00 00 00 nop 2019518: 80 a6 00 08 cmp %i0, %o0 201951c: 02 80 00 06 be 2019534 2019520: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); 2019524: 7f ff d5 86 call 200eb3c <__errno> 2019528: 01 00 00 00 nop 201952c: 10 80 00 a5 b 20197c0 2019530: 82 10 20 03 mov 3, %g1 ! 3 /* * Validate the signal passed. */ if ( !sig ) 2019534: 02 80 00 06 be 201954c 2019538: 01 00 00 00 nop static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 201953c: ba 06 7f ff add %i1, -1, %i5 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 2019540: 80 a7 60 1f cmp %i5, 0x1f 2019544: 28 80 00 06 bleu,a 201955c 2019548: 83 2e 60 02 sll %i1, 2, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 201954c: 7f ff d5 7c call 200eb3c <__errno> 2019550: 01 00 00 00 nop 2019554: 10 80 00 9b b 20197c0 2019558: 82 10 20 16 mov 0x16, %g1 ! 16 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 201955c: 85 2e 60 04 sll %i1, 4, %g2 2019560: 84 20 80 01 sub %g2, %g1, %g2 2019564: 03 00 80 74 sethi %hi(0x201d000), %g1 2019568: 82 10 60 90 or %g1, 0x90, %g1 ! 201d090 <_POSIX_signals_Vectors> 201956c: 82 00 40 02 add %g1, %g2, %g1 2019570: c2 00 60 08 ld [ %g1 + 8 ], %g1 2019574: 80 a0 60 01 cmp %g1, 1 2019578: 02 80 00 7b be 2019764 201957c: b0 10 20 00 clr %i0 /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) 2019580: 80 a6 60 04 cmp %i1, 4 2019584: 02 80 00 06 be 201959c 2019588: 80 a6 60 08 cmp %i1, 8 201958c: 02 80 00 04 be 201959c 2019590: 80 a6 60 0b cmp %i1, 0xb 2019594: 12 80 00 08 bne 20195b4 2019598: 82 10 20 01 mov 1, %g1 return pthread_kill( pthread_self(), sig ); 201959c: 40 00 01 2e call 2019a54 20195a0: 01 00 00 00 nop 20195a4: 40 00 00 f2 call 201996c 20195a8: 92 10 00 19 mov %i1, %o1 20195ac: 81 c7 e0 08 ret 20195b0: 91 e8 00 08 restore %g0, %o0, %o0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 20195b4: f2 27 bf f4 st %i1, [ %fp + -12 ] siginfo->si_code = SI_USER; 20195b8: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !value ) { 20195bc: 80 a6 a0 00 cmp %i2, 0 20195c0: 12 80 00 04 bne 20195d0 20195c4: bb 28 40 1d sll %g1, %i5, %i5 siginfo->si_value.sival_int = 0; 20195c8: 10 80 00 04 b 20195d8 20195cc: c0 27 bf fc clr [ %fp + -4 ] } else { siginfo->si_value = *value; 20195d0: c2 06 80 00 ld [ %i2 ], %g1 20195d4: c2 27 bf fc st %g1, [ %fp + -4 ] * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 20195d8: 03 00 80 72 sethi %hi(0x201c800), %g1 20195dc: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 201cb00 <_Thread_Dispatch_disable_level> 20195e0: 84 00 a0 01 inc %g2 20195e4: c4 20 63 00 st %g2, [ %g1 + 0x300 ] return _Thread_Dispatch_disable_level; 20195e8: c2 00 63 00 ld [ %g1 + 0x300 ], %g1 /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; 20195ec: 03 00 80 74 sethi %hi(0x201d000), %g1 20195f0: d0 00 60 44 ld [ %g1 + 0x44 ], %o0 ! 201d044 <_Per_CPU_Information+0xc> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 20195f4: c2 02 21 5c ld [ %o0 + 0x15c ], %g1 20195f8: c2 00 60 d0 ld [ %g1 + 0xd0 ], %g1 20195fc: 80 af 40 01 andncc %i5, %g1, %g0 2019600: 12 80 00 51 bne 2019744 2019604: 03 00 80 74 sethi %hi(0x201d000), %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 2019608: d0 00 62 1c ld [ %g1 + 0x21c ], %o0 ! 201d21c <_POSIX_signals_Wait_queue> /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 201960c: 03 00 80 74 sethi %hi(0x201d000), %g1 2019610: 10 80 00 0a b 2019638 2019614: 82 10 62 20 or %g1, 0x220, %g1 ! 201d220 <_POSIX_signals_Wait_queue+0x4> #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 2019618: 80 8f 40 03 btst %i5, %g3 201961c: 12 80 00 4a bne 2019744 2019620: c4 02 21 5c ld [ %o0 + 0x15c ], %g2 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 2019624: c4 00 a0 d0 ld [ %g2 + 0xd0 ], %g2 2019628: 80 af 40 02 andncc %i5, %g2, %g0 201962c: 12 80 00 47 bne 2019748 2019630: 92 10 00 19 mov %i1, %o1 the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 2019634: d0 02 00 00 ld [ %o0 ], %o0 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 2019638: 80 a2 00 01 cmp %o0, %g1 201963c: 32 bf ff f7 bne,a 2019618 2019640: c6 02 20 30 ld [ %o0 + 0x30 ], %g3 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 2019644: 03 00 80 6f sethi %hi(0x201bc00), %g1 2019648: c4 08 61 cc ldub [ %g1 + 0x1cc ], %g2 ! 201bdcc * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; 201964c: 90 10 20 00 clr %o0 interested_priority = PRIORITY_MAXIMUM + 1; 2019650: 84 00 a0 01 inc %g2 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 2019654: 88 10 20 02 mov 2, %g4 /* * This can occur when no one is interested and an API is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 2019658: 19 00 80 72 sethi %hi(0x201c800), %o4 */ RTEMS_INLINE_ROUTINE bool _States_Is_interruptible_by_signal ( States_Control the_states ) { return (the_states & STATES_INTERRUPTIBLE_BY_SIGNAL); 201965c: 31 04 00 00 sethi %hi(0x10000000), %i0 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 2019660: 83 29 20 02 sll %g4, 2, %g1 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and an API is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 2019664: 86 13 22 68 or %o4, 0x268, %g3 2019668: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 201966c: 80 a0 60 00 cmp %g1, 0 2019670: 22 80 00 2f be,a 201972c <== NEVER TAKEN 2019674: 88 01 20 01 inc %g4 <== NOT EXECUTED continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 2019678: c2 00 60 04 ld [ %g1 + 4 ], %g1 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 201967c: b4 10 20 01 mov 1, %i2 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 2019680: d4 10 60 10 lduh [ %g1 + 0x10 ], %o2 object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 2019684: 10 80 00 26 b 201971c 2019688: d6 00 60 1c ld [ %g1 + 0x1c ], %o3 the_thread = (Thread_Control *) object_table[ index ]; 201968c: c2 02 c0 01 ld [ %o3 + %g1 ], %g1 if ( !the_thread ) 2019690: 80 a0 60 00 cmp %g1, 0 2019694: 22 80 00 22 be,a 201971c 2019698: b4 06 a0 01 inc %i2 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 201969c: c6 00 60 14 ld [ %g1 + 0x14 ], %g3 20196a0: 80 a0 c0 02 cmp %g3, %g2 20196a4: 38 80 00 1e bgu,a 201971c 20196a8: b4 06 a0 01 inc %i2 #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) 20196ac: de 00 61 5c ld [ %g1 + 0x15c ], %o7 20196b0: de 03 e0 d0 ld [ %o7 + 0xd0 ], %o7 20196b4: 80 af 40 0f andncc %i5, %o7, %g0 20196b8: 22 80 00 19 be,a 201971c 20196bc: b4 06 a0 01 inc %i2 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 20196c0: 80 a0 c0 02 cmp %g3, %g2 20196c4: 2a 80 00 14 bcs,a 2019714 20196c8: 84 10 00 03 mov %g3, %g2 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( interested && !_States_Is_ready( interested->current_state ) ) { 20196cc: 80 a2 20 00 cmp %o0, 0 20196d0: 22 80 00 13 be,a 201971c <== NEVER TAKEN 20196d4: b4 06 a0 01 inc %i2 <== NOT EXECUTED 20196d8: da 02 20 10 ld [ %o0 + 0x10 ], %o5 20196dc: 80 a3 60 00 cmp %o5, 0 20196e0: 22 80 00 0f be,a 201971c <== NEVER TAKEN 20196e4: b4 06 a0 01 inc %i2 <== NOT EXECUTED /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 20196e8: de 00 60 10 ld [ %g1 + 0x10 ], %o7 20196ec: 80 a3 e0 00 cmp %o7, 0 20196f0: 22 80 00 09 be,a 2019714 20196f4: 84 10 00 03 mov %g3, %g2 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 20196f8: 80 8b 40 18 btst %o5, %i0 20196fc: 32 80 00 08 bne,a 201971c 2019700: b4 06 a0 01 inc %i2 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 2019704: 80 8b c0 18 btst %o7, %i0 2019708: 22 80 00 05 be,a 201971c 201970c: b4 06 a0 01 inc %i2 */ if ( interested && !_States_Is_ready( interested->current_state ) ) { /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 2019710: 84 10 00 03 mov %g3, %g2 2019714: 90 10 00 01 mov %g1, %o0 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 2019718: b4 06 a0 01 inc %i2 201971c: 80 a6 80 0a cmp %i2, %o2 2019720: 08 bf ff db bleu 201968c 2019724: 83 2e a0 02 sll %i2, 2, %g1 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 2019728: 88 01 20 01 inc %g4 201972c: 80 a1 20 04 cmp %g4, 4 2019730: 12 bf ff cd bne 2019664 2019734: 83 29 20 02 sll %g4, 2, %g1 } } } } if ( interested ) { 2019738: 80 a2 20 00 cmp %o0, 0 201973c: 02 80 00 0c be 201976c 2019740: 01 00 00 00 nop /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 2019744: 92 10 00 19 mov %i1, %o1 2019748: 40 00 00 36 call 2019820 <_POSIX_signals_Unblock_thread> 201974c: 94 07 bf f4 add %fp, -12, %o2 2019750: 80 8a 20 ff btst 0xff, %o0 2019754: 02 80 00 06 be 201976c 2019758: 01 00 00 00 nop _Thread_Enable_dispatch(); 201975c: 7f ff bd 76 call 2008d34 <_Thread_Enable_dispatch> 2019760: b0 10 20 00 clr %i0 ! 0 return 0; 2019764: 81 c7 e0 08 ret 2019768: 81 e8 00 00 restore /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 201976c: 40 00 00 24 call 20197fc <_POSIX_signals_Set_process_signals> 2019770: 90 10 00 1d mov %i5, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 2019774: 83 2e 60 02 sll %i1, 2, %g1 2019778: b3 2e 60 04 sll %i1, 4, %i1 201977c: b2 26 40 01 sub %i1, %g1, %i1 2019780: 03 00 80 74 sethi %hi(0x201d000), %g1 2019784: 82 10 60 90 or %g1, 0x90, %g1 ! 201d090 <_POSIX_signals_Vectors> 2019788: c2 00 40 19 ld [ %g1 + %i1 ], %g1 201978c: 80 a0 60 02 cmp %g1, 2 2019790: 12 80 00 17 bne 20197ec 2019794: 11 00 80 74 sethi %hi(0x201d000), %o0 psiginfo = (POSIX_signals_Siginfo_node *) 2019798: 7f ff b5 f1 call 2006f5c <_Chain_Get> 201979c: 90 12 22 10 or %o0, 0x210, %o0 ! 201d210 <_POSIX_signals_Inactive_siginfo> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 20197a0: ba 92 20 00 orcc %o0, 0, %i5 20197a4: 12 80 00 0a bne 20197cc 20197a8: 92 07 bf f4 add %fp, -12, %o1 _Thread_Enable_dispatch(); 20197ac: 7f ff bd 62 call 2008d34 <_Thread_Enable_dispatch> 20197b0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EAGAIN ); 20197b4: 7f ff d4 e2 call 200eb3c <__errno> 20197b8: 01 00 00 00 nop 20197bc: 82 10 20 0b mov 0xb, %g1 ! b 20197c0: c2 22 00 00 st %g1, [ %o0 ] 20197c4: 81 c7 e0 08 ret 20197c8: 91 e8 3f ff restore %g0, -1, %o0 } psiginfo->Info = *siginfo; 20197cc: 90 07 60 08 add %i5, 8, %o0 20197d0: 7f ff d7 37 call 200f4ac 20197d4: 94 10 20 0c mov 0xc, %o2 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 20197d8: 11 00 80 74 sethi %hi(0x201d000), %o0 20197dc: 92 10 00 1d mov %i5, %o1 20197e0: 90 12 22 88 or %o0, 0x288, %o0 20197e4: 7f ff b5 ca call 2006f0c <_Chain_Append> 20197e8: 90 02 00 19 add %o0, %i1, %o0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 20197ec: 7f ff bd 52 call 2008d34 <_Thread_Enable_dispatch> 20197f0: b0 10 20 00 clr %i0 return 0; } 20197f4: 81 c7 e0 08 ret 20197f8: 81 e8 00 00 restore =============================================================================== 0200366c : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 200366c: 9d e3 bf a0 save %sp, -96, %sp /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) 2003670: 03 00 80 73 sethi %hi(0x201cc00), %g1 2003674: c2 00 60 54 ld [ %g1 + 0x54 ], %g1 ! 201cc54 <_System_state_Current> 2003678: 80 a0 60 03 cmp %g1, 3 200367c: 12 80 00 16 bne 20036d4 <== NEVER TAKEN 2003680: 39 00 80 70 sethi %hi(0x201c000), %i4 /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 2003684: 03 00 80 6c sethi %hi(0x201b000), %g1 2003688: fa 00 63 10 ld [ %g1 + 0x310 ], %i5 ! 201b310 <_global_impure_ptr> 200368c: c2 07 21 60 ld [ %i4 + 0x160 ], %g1 2003690: 80 a0 40 1d cmp %g1, %i5 2003694: 22 80 00 06 be,a 20036ac 2003698: 3b 00 80 70 sethi %hi(0x201c000), %i5 _wrapup_reent(_global_impure_ptr); 200369c: 40 00 30 64 call 200f82c <_wrapup_reent> 20036a0: 90 10 00 1d mov %i5, %o0 /* Don't reclaim this one, just in case we do printfs * on the way out to ROM. */ _reclaim_reent(&libc_global_reent); #endif _REENT = _global_impure_ptr; 20036a4: fa 27 21 60 st %i5, [ %i4 + 0x160 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 20036a8: 3b 00 80 70 sethi %hi(0x201c000), %i5 20036ac: c2 07 61 60 ld [ %i5 + 0x160 ], %g1 ! 201c160 <_impure_ptr> 20036b0: 40 00 2d 75 call 200ec84 20036b4: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 20036b8: c2 07 61 60 ld [ %i5 + 0x160 ], %g1 20036bc: 40 00 2d 72 call 200ec84 20036c0: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 20036c4: c2 07 61 60 ld [ %i5 + 0x160 ], %g1 20036c8: f0 00 60 0c ld [ %g1 + 0xc ], %i0 20036cc: 40 00 2d 6e call 200ec84 20036d0: 81 e8 00 00 restore 20036d4: 81 c7 e0 08 ret <== NOT EXECUTED 20036d8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02003148 : #include "malloc_p.h" void *malloc( size_t size ) { 2003148: 9d e3 bf a0 save %sp, -96, %sp void *return_this; MSBUMP(malloc_calls, 1); 200314c: 03 00 80 72 sethi %hi(0x201c800), %g1 2003150: 82 10 61 50 or %g1, 0x150, %g1 ! 201c950 2003154: c4 00 60 04 ld [ %g1 + 4 ], %g2 #include "malloc_p.h" void *malloc( size_t size ) { 2003158: ba 10 00 18 mov %i0, %i5 void *return_this; MSBUMP(malloc_calls, 1); 200315c: 84 00 a0 01 inc %g2 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 2003160: 7f ff ff ab call 200300c 2003164: c4 20 60 04 st %g2, [ %g1 + 4 ] /* * Validate the parameters */ if ( !size ) 2003168: 80 a7 60 00 cmp %i5, 0 200316c: 02 80 00 23 be 20031f8 2003170: b0 10 20 00 clr %i0 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 2003174: 03 00 80 73 sethi %hi(0x201cc00), %g1 2003178: c2 00 60 54 ld [ %g1 + 0x54 ], %g1 ! 201cc54 <_System_state_Current> 200317c: 80 a0 60 03 cmp %g1, 3 2003180: 12 80 00 07 bne 200319c 2003184: 03 00 80 6f sethi %hi(0x201bc00), %g1 !malloc_is_system_state_OK() ) 2003188: 7f ff ff 8f call 2002fc4 200318c: 01 00 00 00 nop return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 2003190: 80 8a 20 ff btst 0xff, %o0 2003194: 02 80 00 19 be 20031f8 <== NEVER TAKEN 2003198: 03 00 80 6f sethi %hi(0x201bc00), %g1 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 200319c: d0 00 62 70 ld [ %g1 + 0x270 ], %o0 ! 201be70 20031a0: 92 10 00 1d mov %i5, %o1 20031a4: 94 10 20 00 clr %o2 20031a8: 40 00 13 e0 call 2008128 <_Protected_heap_Allocate_aligned_with_boundary> 20031ac: 96 10 20 00 clr %o3 * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 20031b0: b0 92 20 00 orcc %o0, 0, %i0 20031b4: 12 80 00 13 bne 2003200 20031b8: 03 00 80 71 sethi %hi(0x201c400), %g1 if (rtems_malloc_sbrk_helpers) 20031bc: 03 00 80 71 sethi %hi(0x201c400), %g1 20031c0: c2 00 62 90 ld [ %g1 + 0x290 ], %g1 ! 201c690 20031c4: 80 a0 60 00 cmp %g1, 0 20031c8: 02 80 00 08 be 20031e8 20031cc: 01 00 00 00 nop return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 20031d0: c2 00 60 04 ld [ %g1 + 4 ], %g1 20031d4: 9f c0 40 00 call %g1 20031d8: 90 10 00 1d mov %i5, %o0 if ( !return_this ) { 20031dc: b0 92 20 00 orcc %o0, 0, %i0 20031e0: 12 80 00 08 bne 2003200 20031e4: 03 00 80 71 sethi %hi(0x201c400), %g1 errno = ENOMEM; 20031e8: 40 00 2e 55 call 200eb3c <__errno> 20031ec: b0 10 20 00 clr %i0 20031f0: 82 10 20 0c mov 0xc, %g1 20031f4: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 20031f8: 81 c7 e0 08 ret 20031fc: 81 e8 00 00 restore } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 2003200: c2 00 62 8c ld [ %g1 + 0x28c ], %g1 2003204: 80 a0 60 00 cmp %g1, 0 2003208: 02 80 00 04 be 2003218 200320c: 90 10 00 18 mov %i0, %o0 (*rtems_malloc_dirty_helper)( return_this, size ); 2003210: 9f c0 40 00 call %g1 2003214: 92 10 00 1d mov %i5, %o1 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 2003218: 03 00 80 71 sethi %hi(0x201c400), %g1 200321c: c2 00 62 94 ld [ %g1 + 0x294 ], %g1 ! 201c694 2003220: 80 a0 60 00 cmp %g1, 0 2003224: 02 80 00 05 be 2003238 2003228: 01 00 00 00 nop (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 200322c: c2 00 60 04 ld [ %g1 + 4 ], %g1 2003230: 9f c0 40 00 call %g1 2003234: 90 10 00 18 mov %i0, %o0 return return_this; } 2003238: 81 c7 e0 08 ret 200323c: 81 e8 00 00 restore =============================================================================== 02002f40 : } void *malloc_sbrk_extend_and_allocate( size_t size ) { 2002f40: 9d e3 bf a0 save %sp, -96, %sp * Round to the "requested sbrk amount" so hopefully we won't have * to grow again for a while. This effectively does sbrk() calls * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; 2002f44: 03 00 80 58 sethi %hi(0x2016000), %g1 2002f48: fa 00 61 48 ld [ %g1 + 0x148 ], %i5 ! 2016148 if ( sbrk_amount == 0 ) 2002f4c: 80 a7 60 00 cmp %i5, 0 2002f50: 02 80 00 22 be 2002fd8 <== NEVER TAKEN 2002f54: b2 10 00 18 mov %i0, %i1 return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 2002f58: 92 10 00 1d mov %i5, %o1 2002f5c: 40 00 3c 67 call 20120f8 <.udiv> 2002f60: 90 06 00 1d add %i0, %i5, %o0 2002f64: 40 00 3c 2b call 2012010 <.umul> 2002f68: 92 10 00 1d mov %i5, %o1 starting_address = (void *) sbrk(the_size); 2002f6c: 7f ff f9 1f call 20013e8 2002f70: ba 10 00 08 mov %o0, %i5 if ( starting_address == (void*) -1 ) 2002f74: 80 a2 3f ff cmp %o0, -1 2002f78: 02 80 00 18 be 2002fd8 2002f7c: 92 10 00 08 mov %o0, %o1 return (void *) 0; if ( !_Protected_heap_Extend( 2002f80: 39 00 80 55 sethi %hi(0x2015400), %i4 2002f84: d0 07 21 20 ld [ %i4 + 0x120 ], %o0 ! 2015520 2002f88: 40 00 13 7d call 2007d7c <_Protected_heap_Extend> 2002f8c: 94 10 00 1d mov %i5, %o2 2002f90: 80 8a 20 ff btst 0xff, %o0 2002f94: 12 80 00 0a bne 2002fbc 2002f98: 03 00 80 58 sethi %hi(0x2016000), %g1 RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); 2002f9c: 7f ff f9 13 call 20013e8 2002fa0: 90 20 00 1d neg %i5, %o0 errno = ENOMEM; 2002fa4: 40 00 2e 9c call 200ea14 <__errno> 2002fa8: b0 10 20 00 clr %i0 2002fac: 82 10 20 0c mov 0xc, %g1 2002fb0: c2 22 00 00 st %g1, [ %o0 ] 2002fb4: 81 c7 e0 08 ret 2002fb8: 81 e8 00 00 restore 2002fbc: f0 07 21 20 ld [ %i4 + 0x120 ], %i0 return (void *) 0; } MSBUMP(space_available, the_size); 2002fc0: c4 00 61 18 ld [ %g1 + 0x118 ], %g2 2002fc4: b4 10 20 00 clr %i2 2002fc8: ba 07 40 02 add %i5, %g2, %i5 2002fcc: fa 20 61 18 st %i5, [ %g1 + 0x118 ] 2002fd0: 40 00 13 5d call 2007d44 <_Protected_heap_Allocate_aligned_with_boundary> 2002fd4: 97 e8 20 00 restore %g0, 0, %o3 return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } 2002fd8: b0 10 20 00 clr %i0 2002fdc: 81 c7 e0 08 ret 2002fe0: 81 e8 00 00 restore =============================================================================== 02002fe4 : void *malloc_sbrk_initialize( void *starting_address, size_t length ) { 2002fe4: 9d e3 bf a0 save %sp, -96, %sp uintptr_t old_address; uintptr_t uaddress; RTEMS_Malloc_Sbrk_amount = length; 2002fe8: 03 00 80 58 sethi %hi(0x2016000), %g1 2002fec: f2 20 61 48 st %i1, [ %g1 + 0x148 ] ! 2016148 * If the starting address is 0 then we are to attempt to * get length worth of memory using sbrk. Make sure we * align the address that we get back. */ if (!starting_address) { 2002ff0: 80 a6 20 00 cmp %i0, 0 2002ff4: 12 80 00 0e bne 200302c 2002ff8: 90 10 00 19 mov %i1, %o0 uaddress = (uintptr_t)sbrk(length); 2002ffc: 7f ff f8 fb call 20013e8 2003000: 01 00 00 00 nop if (uaddress == (uintptr_t) -1) { 2003004: 80 a2 3f ff cmp %o0, -1 2003008: 12 80 00 04 bne 2003018 <== NEVER TAKEN 200300c: 80 8a 20 07 btst 7, %o0 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 2003010: 40 00 0e 1a call 2006878 2003014: 90 10 20 1a mov 0x1a, %o0 /* DOES NOT RETURN!!! */ } if (uaddress & (CPU_HEAP_ALIGNMENT-1)) { 2003018: 22 80 00 05 be,a 200302c <== NOT EXECUTED 200301c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED old_address = uaddress; uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); 2003020: 90 02 20 08 add %o0, 8, %o0 <== NOT EXECUTED 2003024: 90 0a 3f f8 and %o0, -8, %o0 <== NOT EXECUTED * adjust the length by whatever we aligned by */ length -= uaddress - old_address; } starting_address = (void *)uaddress; 2003028: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } return starting_address; } 200302c: 81 c7 e0 08 ret 2003030: 81 e8 00 00 restore =============================================================================== 0200da48 : */ int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 200da48: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 200da4c: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 */ int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 200da50: 92 10 00 19 mov %i1, %o1 * 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 ) 200da54: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 200da58: 80 a0 40 19 cmp %g1, %i1 200da5c: 06 80 00 09 bl 200da80 <== NEVER TAKEN 200da60: 94 10 00 1a mov %i2, %o2 200da64: 80 a0 40 19 cmp %g1, %i1 200da68: 32 80 00 0a bne,a 200da90 200da6c: d2 27 60 50 st %o1, [ %i5 + 0x50 ] 200da70: c2 07 60 54 ld [ %i5 + 0x54 ], %g1 200da74: 80 a0 40 1a cmp %g1, %i2 200da78: 3a 80 00 06 bcc,a 200da90 200da7c: d2 27 60 50 st %o1, [ %i5 + 0x50 ] return IMFS_memfile_extend( the_jnode, length ); 200da80: 7f ff ff 01 call 200d684 200da84: 90 10 00 1d mov %i5, %o0 200da88: 81 c7 e0 08 ret 200da8c: 91 e8 00 08 restore %g0, %o0, %o0 /* * 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; 200da90: d4 27 60 54 st %o2, [ %i5 + 0x54 ] iop->size = the_jnode->info.file.size; 200da94: d2 26 20 08 st %o1, [ %i0 + 8 ] 200da98: d4 26 20 0c st %o2, [ %i0 + 0xc ] IMFS_update_atime( the_jnode ); 200da9c: 90 07 bf f8 add %fp, -8, %o0 200daa0: 7f ff d4 f7 call 2002e7c 200daa4: 92 10 20 00 clr %o1 200daa8: c2 07 bf f8 ld [ %fp + -8 ], %g1 200daac: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return 0; } 200dab0: 81 c7 e0 08 ret 200dab4: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200dab8 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 200dab8: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 200dabc: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 if (the_jnode->type == IMFS_LINEAR_FILE) { 200dac0: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200dac4: 80 a0 60 06 cmp %g1, 6 200dac8: 32 80 00 11 bne,a 200db0c 200dacc: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 if (iop->offset > the_jnode->info.linearfile.size) 200dad0: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 200dad4: c6 06 20 10 ld [ %i0 + 0x10 ], %g3 200dad8: 80 a0 c0 01 cmp %g3, %g1 200dadc: 14 80 00 09 bg 200db00 <== NEVER TAKEN 200dae0: c4 07 60 54 ld [ %i5 + 0x54 ], %g2 200dae4: 80 a0 c0 01 cmp %g3, %g1 200dae8: 32 80 00 19 bne,a 200db4c <== NEVER TAKEN 200daec: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 <== NOT EXECUTED 200daf0: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 200daf4: 80 a0 c0 02 cmp %g3, %g2 200daf8: 28 80 00 15 bleu,a 200db4c <== ALWAYS TAKEN 200dafc: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 iop->offset = the_jnode->info.linearfile.size; 200db00: c2 26 20 10 st %g1, [ %i0 + 0x10 ] <== NOT EXECUTED 200db04: 10 80 00 11 b 200db48 <== NOT EXECUTED 200db08: c4 26 20 14 st %g2, [ %i0 + 0x14 ] <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 200db0c: 90 10 00 1d mov %i5, %o0 200db10: 92 10 00 02 mov %g2, %o1 200db14: 7f ff fe dc call 200d684 200db18: 94 10 00 03 mov %g3, %o2 200db1c: 80 a2 20 00 cmp %o0, 0 200db20: 22 80 00 09 be,a 200db44 200db24: c4 1f 60 50 ldd [ %i5 + 0x50 ], %g2 rtems_set_errno_and_return_minus_one( ENOSPC ); 200db28: 40 00 04 05 call 200eb3c <__errno> 200db2c: 31 3f ff ff sethi %hi(0xfffffc00), %i0 200db30: 82 10 20 1c mov 0x1c, %g1 200db34: c2 22 00 00 st %g1, [ %o0 ] 200db38: b0 16 23 ff or %i0, 0x3ff, %i0 200db3c: 81 c7 e0 08 ret 200db40: 93 e8 00 18 restore %g0, %i0, %o1 iop->size = the_jnode->info.file.size; 200db44: c4 3e 20 08 std %g2, [ %i0 + 8 ] } return iop->offset; 200db48: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 } 200db4c: 81 c7 e0 08 ret 200db50: 81 e8 00 00 restore =============================================================================== 0200d9ac : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 200d9ac: 9d e3 bf a0 save %sp, -96, %sp the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 200d9b0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 200d9b4: b8 10 00 18 mov %i0, %i4 the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 200d9b8: 80 88 62 04 btst 0x204, %g1 200d9bc: 02 80 00 19 be 200da20 200d9c0: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 && (the_jnode->type == IMFS_LINEAR_FILE)) { 200d9c4: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200d9c8: 80 a0 60 06 cmp %g1, 6 200d9cc: 32 80 00 16 bne,a 200da24 <== ALWAYS TAKEN 200d9d0: c2 07 20 18 ld [ %i4 + 0x18 ], %g1 uint32_t count = the_jnode->info.linearfile.size; 200d9d4: d8 07 60 54 ld [ %i5 + 0x54 ], %o4 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 200d9d8: d6 07 60 58 ld [ %i5 + 0x58 ], %o3 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 200d9dc: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED the_jnode->info.file.size = 0; 200d9e0: c0 27 60 50 clr [ %i5 + 0x50 ] <== 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; 200d9e4: c2 27 60 4c st %g1, [ %i5 + 0x4c ] <== NOT EXECUTED the_jnode->info.file.size = 0; 200d9e8: c0 27 60 54 clr [ %i5 + 0x54 ] <== NOT EXECUTED the_jnode->info.file.indirect = 0; 200d9ec: c0 27 60 58 clr [ %i5 + 0x58 ] <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 200d9f0: c0 27 60 5c clr [ %i5 + 0x5c ] <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; if ((count != 0) 200d9f4: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 200d9f8: 02 80 00 0a be 200da20 <== NOT EXECUTED 200d9fc: c0 27 60 60 clr [ %i5 + 0x60 ] <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 200da00: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 200da04: 92 10 20 00 clr %o1 <== NOT EXECUTED 200da08: 94 10 20 00 clr %o2 <== NOT EXECUTED 200da0c: 7f ff ff 75 call 200d7e0 <== NOT EXECUTED 200da10: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200da14: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 200da18: 02 80 00 0a be 200da40 <== NOT EXECUTED 200da1c: 01 00 00 00 nop <== NOT EXECUTED return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 200da20: c2 07 20 18 ld [ %i4 + 0x18 ], %g1 200da24: 80 88 62 00 btst 0x200, %g1 200da28: 02 80 00 04 be 200da38 200da2c: c4 1f 60 50 ldd [ %i5 + 0x50 ], %g2 iop->offset = the_jnode->info.file.size; 200da30: c4 3f 20 10 std %g2, [ %i4 + 0x10 ] iop->size = the_jnode->info.file.size; 200da34: c4 1f 60 50 ldd [ %i5 + 0x50 ], %g2 return 0; 200da38: b0 10 20 00 clr %i0 return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; 200da3c: c4 3f 20 08 std %g2, [ %i4 + 8 ] return 0; } 200da40: 81 c7 e0 08 ret 200da44: 81 e8 00 00 restore =============================================================================== 020033c0 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 20033c0: 9d e3 bf 88 save %sp, -120, %sp /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 20033c4: 80 a6 e0 01 cmp %i3, 1 20033c8: 18 80 00 07 bgu 20033e4 20033cc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 20033d0: 40 00 21 0b call 200b7fc 20033d4: 90 10 00 1a mov %i2, %o0 if ( !mount_h ) 20033d8: a2 92 20 00 orcc %o0, 0, %l1 20033dc: 12 80 00 06 bne 20033f4 20033e0: 80 a0 00 19 cmp %g0, %i1 rtems_set_errno_and_return_minus_one( EINVAL ); 20033e4: 40 00 2d d6 call 200eb3c <__errno> 20033e8: 01 00 00 00 nop 20033ec: 10 80 00 3e b 20034e4 20033f0: 82 10 20 16 mov 0x16, %g1 ! 16 { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; bool has_target = target != NULL; 20033f4: a0 40 20 00 addx %g0, 0, %l0 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 20033f8: 80 8c 20 ff btst 0xff, %l0 20033fc: 12 80 00 04 bne 200340c 2003400: a6 10 00 19 mov %i1, %l3 2003404: 27 00 80 69 sethi %hi(0x201a400), %l3 2003408: a6 14 e0 40 or %l3, 0x40, %l3 ! 201a440 size_t filesystemtype_size = strlen( filesystemtype ) + 1; 200340c: 40 00 33 64 call 201019c 2003410: 90 10 00 1a mov %i2, %o0 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 2003414: a4 10 20 00 clr %l2 2003418: 80 a6 20 00 cmp %i0, 0 200341c: 02 80 00 05 be 2003430 2003420: ae 10 00 08 mov %o0, %l7 2003424: 40 00 33 5e call 201019c 2003428: 90 10 00 18 mov %i0, %o0 200342c: a4 02 20 01 add %o0, 1, %l2 size_t target_size = strlen( target ) + 1; 2003430: 40 00 33 5b call 201019c 2003434: 90 10 00 13 mov %l3, %o0 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; 2003438: 92 05 e0 75 add %l7, 0x75, %o1 { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; 200343c: ac 02 20 01 add %o0, 1, %l6 2003440: aa 10 00 08 mov %o0, %l5 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; 2003444: 92 02 40 12 add %o1, %l2, %o1 rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 2003448: 90 10 20 01 mov 1, %o0 200344c: 7f ff fd 61 call 20029d0 2003450: 92 02 40 16 add %o1, %l6, %o1 if ( mt_entry != NULL ) { 2003454: ba 92 20 00 orcc %o0, 0, %i5 2003458: 02 80 00 20 be 20034d8 <== NEVER TAKEN 200345c: a8 07 60 74 add %i5, 0x74, %l4 char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); 2003460: 92 10 00 1a mov %i2, %o1 const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; 2003464: ae 05 e0 01 inc %l7 rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); 2003468: 90 10 00 14 mov %l4, %o0 200346c: 40 00 30 10 call 200f4ac 2003470: 94 10 00 17 mov %l7, %o2 mt_entry->type = str; str += filesystemtype_size; 2003474: b4 05 00 17 add %l4, %l7, %i2 memcpy( str, source_or_null, source_size ); 2003478: 94 10 00 12 mov %l2, %o2 200347c: 92 10 00 18 mov %i0, %o1 if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; 2003480: e8 27 60 6c st %l4, [ %i5 + 0x6c ] str += filesystemtype_size; memcpy( str, source_or_null, source_size ); 2003484: 40 00 30 0a call 200f4ac 2003488: 90 10 00 1a mov %i2, %o0 mt_entry->dev = str; str += source_size; 200348c: a4 06 80 12 add %i2, %l2, %l2 memcpy( str, target, target_size ); 2003490: 92 10 00 13 mov %l3, %o1 2003494: 94 10 00 16 mov %l6, %o2 memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; 2003498: f4 27 60 70 st %i2, [ %i5 + 0x70 ] str += source_size; memcpy( str, target, target_size ); 200349c: 40 00 30 04 call 200f4ac 20034a0: 90 10 00 12 mov %l2, %o0 if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 20034a4: 90 07 60 38 add %i5, 0x38, %o0 memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; memcpy( str, target, target_size ); mt_entry->target = str; 20034a8: e4 27 60 68 st %l2, [ %i5 + 0x68 ] &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 20034ac: fa 27 60 2c st %i5, [ %i5 + 0x2c ] mt_entry->options = options; 20034b0: f6 27 60 30 st %i3, [ %i5 + 0x30 ] mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 20034b4: 13 00 80 6a sethi %hi(0x201a800), %o1 20034b8: 94 10 20 30 mov 0x30, %o2 20034bc: 40 00 2f fc call 200f4ac 20034c0: 92 12 61 70 or %o1, 0x170, %o1 /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 20034c4: 80 8c 20 ff btst 0xff, %l0 20034c8: 02 80 00 37 be 20035a4 20034cc: 03 00 80 6f sethi %hi(0x201bc00), %g1 if ( rtems_filesystem_evaluate_path( 20034d0: 10 80 00 08 b 20034f0 20034d4: 90 10 00 19 mov %i1, %o0 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 20034d8: 40 00 2d 99 call 200eb3c <__errno> <== NOT EXECUTED 20034dc: 01 00 00 00 nop <== NOT EXECUTED 20034e0: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 20034e4: c2 22 00 00 st %g1, [ %o0 ] 20034e8: 81 c7 e0 08 ret 20034ec: 91 e8 3f ff restore %g0, -1, %o0 * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 20034f0: 92 10 00 15 mov %l5, %o1 20034f4: 94 10 20 07 mov 7, %o2 20034f8: 96 07 bf ec add %fp, -20, %o3 20034fc: 7f ff fd ff call 2002cf8 2003500: 98 10 20 01 mov 1, %o4 2003504: 80 a2 3f ff cmp %o0, -1 2003508: 02 80 00 4f be 2003644 <== NEVER TAKEN 200350c: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 2003510: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 2003514: 9f c0 40 00 call %g1 2003518: 90 07 bf ec add %fp, -20, %o0 200351c: 80 a2 20 01 cmp %o0, 1 2003520: 02 80 00 06 be 2003538 2003524: d2 07 bf ec ld [ %fp + -20 ], %o1 errno = ENOTDIR; 2003528: 40 00 2d 85 call 200eb3c <__errno> 200352c: 01 00 00 00 nop 2003530: 10 80 00 0b b 200355c 2003534: 82 10 20 14 mov 0x14, %g1 ! 14 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 2003538: 11 00 80 0c sethi %hi(0x2003000), %o0 200353c: 7f ff ff 8a call 2003364 2003540: 90 12 23 34 or %o0, 0x334, %o0 ! 2003334 2003544: 80 8a 20 ff btst 0xff, %o0 2003548: 02 80 00 08 be 2003568 200354c: c2 07 bf ec ld [ %fp + -20 ], %g1 errno = EBUSY; 2003550: 40 00 2d 7b call 200eb3c <__errno> 2003554: 01 00 00 00 nop 2003558: 82 10 20 10 mov 0x10, %g1 ! 10 200355c: c2 22 00 00 st %g1, [ %o0 ] goto cleanup_and_bail; 2003560: 10 80 00 3a b 2003648 2003564: b6 07 bf ec add %fp, -20, %i3 */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; 2003568: c4 07 bf fc ld [ %fp + -4 ], %g2 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; 200356c: c2 27 60 08 st %g1, [ %i5 + 8 ] mt_entry->mt_point_node.handlers = loc.handlers; 2003570: c2 07 bf f4 ld [ %fp + -12 ], %g1 mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; 2003574: c4 27 60 18 st %g2, [ %i5 + 0x18 ] * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; 2003578: c2 27 60 10 st %g1, [ %i5 + 0x10 ] mt_entry->mt_point_node.ops = loc.ops; 200357c: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( loc.ops->mount_h( mt_entry ) ) { 2003580: 90 10 00 1d mov %i5, %o0 * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; 2003584: c2 27 60 14 st %g1, [ %i5 + 0x14 ] /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( loc.ops->mount_h( mt_entry ) ) { 2003588: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 200358c: 9f c0 40 00 call %g1 2003590: b6 07 bf ec add %fp, -20, %i3 2003594: 80 a2 20 00 cmp %o0, 0 2003598: 12 80 00 2c bne 2003648 <== NEVER TAKEN 200359c: 90 10 00 1d mov %i5, %o0 20035a0: 30 80 00 0d b,a 20035d4 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 20035a4: c4 00 63 7c ld [ %g1 + 0x37c ], %g2 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 20035a8: 86 10 63 7c or %g1, 0x37c, %g3 20035ac: 82 00 e0 04 add %g3, 4, %g1 20035b0: 80 a0 80 01 cmp %g2, %g1 20035b4: 02 80 00 07 be 20035d0 <== ALWAYS TAKEN 20035b8: b6 10 20 00 clr %i3 errno = EINVAL; 20035bc: 40 00 2d 60 call 200eb3c <__errno> <== NOT EXECUTED 20035c0: 01 00 00 00 nop <== NOT EXECUTED 20035c4: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 20035c8: 10 80 00 20 b 2003648 <== NOT EXECUTED 20035cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { 20035d0: 90 10 00 1d mov %i5, %o0 20035d4: 9f c4 40 00 call %l1 20035d8: 92 10 00 1c mov %i4, %o1 20035dc: 80 a2 20 00 cmp %o0, 0 20035e0: 02 80 00 06 be 20035f8 20035e4: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); 20035e8: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 20035ec: 9f c0 40 00 call %g1 20035f0: 90 10 00 1d mov %i5, %o0 goto cleanup_and_bail; 20035f4: 30 80 00 15 b,a 2003648 } /* * Add the mount table entry to the mount table chain */ rtems_libio_lock(); 20035f8: 7f ff ff 54 call 2003348 20035fc: b0 10 20 00 clr %i0 2003600: 92 10 00 1d mov %i5, %o1 2003604: 11 00 80 6f sethi %hi(0x201bc00), %o0 2003608: 40 00 0e 41 call 2006f0c <_Chain_Append> 200360c: 90 12 23 7c or %o0, 0x37c, %o0 ! 201bf7c 2003610: 03 00 80 72 sethi %hi(0x201c800), %g1 2003614: 40 00 0b ed call 20065c8 2003618: d0 00 61 3c ld [ %g1 + 0x13c ], %o0 ! 201c93c rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 200361c: 80 8c 20 ff btst 0xff, %l0 2003620: 12 80 00 07 bne 200363c 2003624: 03 00 80 6f sethi %hi(0x201bc00), %g1 rtems_filesystem_root = mt_entry->mt_fs_root; 2003628: d0 00 63 9c ld [ %g1 + 0x39c ], %o0 ! 201bf9c 200362c: 92 07 60 1c add %i5, 0x1c, %o1 2003630: 94 10 20 14 mov 0x14, %o2 2003634: 40 00 2f 9e call 200f4ac 2003638: 90 02 20 18 add %o0, 0x18, %o0 200363c: 81 c7 e0 08 ret 2003640: 81 e8 00 00 restore ) { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; 2003644: b6 10 20 00 clr %i3 <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 2003648: 7f ff fd e3 call 2002dd4 200364c: 90 10 00 1d mov %i5, %o0 if ( loc_to_free ) 2003650: 80 a6 e0 00 cmp %i3, 0 2003654: 02 bf ff fa be 200363c <== NEVER TAKEN 2003658: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( loc_to_free ); 200365c: 7f ff fd d7 call 2002db8 2003660: 90 10 00 1b mov %i3, %o0 return -1; } 2003664: 81 c7 e0 08 ret 2003668: 81 e8 00 00 restore =============================================================================== 020034b8 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 20034b8: 9d e3 bf a0 save %sp, -96, %sp int rv = -1; if (target != NULL) { 20034bc: 90 96 60 00 orcc %i1, 0, %o0 20034c0: 02 80 00 09 be 20034e4 20034c4: 01 00 00 00 nop rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 20034c8: 40 00 02 3e call 2003dc0 20034cc: 92 10 21 ff mov 0x1ff, %o1 ! 1ff if (rv == 0) { 20034d0: 80 a2 20 00 cmp %o0, 0 20034d4: 12 80 00 09 bne 20034f8 <== NEVER TAKEN 20034d8: 01 00 00 00 nop rv = mount( 20034dc: 40 00 00 2c call 200358c 20034e0: 81 e8 00 00 restore options, data ); } } else { errno = EINVAL; 20034e4: 40 00 2d 2a call 200e98c <__errno> 20034e8: 01 00 00 00 nop 20034ec: 82 10 20 16 mov 0x16, %g1 ! 16 20034f0: c2 22 00 00 st %g1, [ %o0 ] const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; 20034f4: 90 10 3f ff mov -1, %o0 } else { errno = EINVAL; } return rv; } 20034f8: 81 c7 e0 08 ret 20034fc: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 020176b4 : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 20176b4: 9d e3 bf 00 save %sp, -256, %sp int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; 20176b8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 20176bc: e2 06 00 00 ld [ %i0 ], %l1 mode_t mode, const fat_file_fd_t *link_fd) { int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; 20176c0: e0 00 60 34 ld [ %g1 + 0x34 ], %l0 fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; dir_pos->sname.ofs = 0; dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 20176c4: 82 10 3f ff mov -1, %g1 uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 20176c8: 92 10 20 00 clr %o1 20176cc: c2 27 bf f0 st %g1, [ %fp + -16 ] dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 20176d0: c2 27 bf f4 st %g1, [ %fp + -12 ] 20176d4: 94 10 20 20 mov 0x20, %o2 { int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; 20176d8: c0 27 bf f8 clr [ %fp + -8 ] time_t time_ret = 0; uint16_t time_val = 0; 20176dc: c0 37 bf fc clrh [ %fp + -4 ] uint16_t date = 0; 20176e0: c0 37 bf fe clrh [ %fp + -2 ] static inline void fat_dir_pos_init( fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; 20176e4: c0 27 bf e8 clr [ %fp + -24 ] dir_pos->sname.ofs = 0; 20176e8: c0 27 bf ec clr [ %fp + -20 ] uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 20176ec: 40 00 15 e2 call 201ce74 20176f0: 90 07 bf a8 add %fp, -88, %o0 memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 20176f4: 92 10 20 00 clr %o1 20176f8: 94 10 20 40 mov 0x40, %o2 20176fc: 40 00 15 de call 201ce74 2017700: 90 07 bf 68 add %fp, -152, %o0 name_type = msdos_long_to_short (name, name_len, 2017704: 92 10 00 1b mov %i3, %o1 2017708: 94 07 bf a8 add %fp, -88, %o2 201770c: 96 10 20 0b mov 0xb, %o3 2017710: 40 00 04 28 call 20187b0 2017714: 90 10 00 1a mov %i2, %o0 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 2017718: b8 10 00 18 mov %i0, %i4 fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); name_type = msdos_long_to_short (name, name_len, 201771c: a4 10 00 08 mov %o0, %l2 MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; 2017720: c0 2f bf b4 clrb [ %fp + -76 ] /* set up last write date and time */ time_ret = time(NULL); 2017724: 90 10 20 00 clr %o0 2017728: 40 00 23 91 call 202056c