=============================================================================== 0200a578 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 200a578: 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; 200a57c: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 switch( node->type ) { 200a580: c4 00 a0 4c ld [ %g2 + 0x4c ], %g2 200a584: 84 00 bf ff add %g2, -1, %g2 200a588: 80 a0 a0 06 cmp %g2, 6 200a58c: 18 80 00 14 bgu 200a5dc <== NEVER TAKEN 200a590: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 200a594: 85 28 a0 02 sll %g2, 2, %g2 200a598: 07 00 80 29 sethi %hi(0x200a400), %g3 200a59c: 86 10 e0 fc or %g3, 0xfc, %g3 ! 200a4fc 200a5a0: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 200a5a4: 81 c0 80 00 jmp %g2 200a5a8: 01 00 00 00 nop case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 200a5ac: 10 80 00 0b b 200a5d8 200a5b0: c2 00 60 0c ld [ %g1 + 0xc ], %g1 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 200a5b4: 03 00 80 6a sethi %hi(0x201a800), %g1 200a5b8: 10 80 00 08 b 200a5d8 200a5bc: 82 10 63 d4 or %g1, 0x3d4, %g1 ! 201abd4 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 200a5c0: 03 00 80 6b sethi %hi(0x201ac00), %g1 200a5c4: 10 80 00 05 b 200a5d8 200a5c8: 82 10 60 44 or %g1, 0x44, %g1 ! 201ac44 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 200a5cc: 10 80 00 03 b 200a5d8 200a5d0: c2 00 60 08 ld [ %g1 + 8 ], %g1 break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 200a5d4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 200a5d8: c2 22 20 08 st %g1, [ %o0 + 8 ] break; } return 0; } 200a5dc: 81 c3 e0 08 retl 200a5e0: 90 10 20 00 clr %o0 =============================================================================== 0200a390 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 200a390: 9d e3 bf a0 save %sp, -96, %sp 200a394: 82 10 00 18 mov %i0, %g1 200a398: 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 ) 200a39c: 80 a0 60 00 cmp %g1, 0 200a3a0: 02 80 00 45 be 200a4b4 <== NEVER TAKEN 200a3a4: b0 10 20 00 clr %i0 return NULL; parent = parent_loc->node_access; 200a3a8: e0 00 40 00 ld [ %g1 ], %l0 fs_info = parent_loc->mt_entry->fs_info; 200a3ac: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 200a3b0: 80 a6 60 07 cmp %i1, 7 200a3b4: 12 80 00 08 bne 200a3d4 200a3b8: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 200a3bc: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 200a3c0: 03 00 80 6a sethi %hi(0x201a800), %g1 200a3c4: 82 10 63 4c or %g1, 0x34c, %g1 ! 201ab4c 200a3c8: 80 a0 80 01 cmp %g2, %g1 200a3cc: 02 80 00 3a be 200a4b4 200a3d0: 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 ); 200a3d4: 03 00 80 6f sethi %hi(0x201bc00), %g1 200a3d8: c2 00 63 54 ld [ %g1 + 0x354 ], %g1 ! 201bf54 200a3dc: 90 10 00 19 mov %i1, %o0 200a3e0: d4 00 60 2c ld [ %g1 + 0x2c ], %o2 200a3e4: 7f ff ff cf call 200a320 200a3e8: 94 2e c0 0a andn %i3, %o2, %o2 if ( !node ) 200a3ec: b0 92 20 00 orcc %o0, 0, %i0 200a3f0: 02 80 00 31 be 200a4b4 200a3f4: 80 a6 60 01 cmp %i1, 1 return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { 200a3f8: 12 80 00 08 bne 200a418 200a3fc: 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 ); 200a400: 82 06 20 50 add %i0, 0x50, %g1 200a404: 84 06 20 54 add %i0, 0x54, %g2 head->next = tail; head->previous = NULL; 200a408: c0 26 20 54 clr [ %i0 + 0x54 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 200a40c: c4 26 20 50 st %g2, [ %i0 + 0x50 ] head->previous = NULL; tail->previous = head; 200a410: 10 80 00 21 b 200a494 200a414: c2 26 20 58 st %g1, [ %i0 + 0x58 ] rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { 200a418: 22 80 00 06 be,a 200a430 200a41c: c2 07 00 00 ld [ %i4 ], %g1 node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { 200a420: 80 a6 60 04 cmp %i1, 4 200a424: 12 80 00 05 bne 200a438 200a428: 80 a6 60 02 cmp %i1, 2 node->info.sym_link.name = info->sym_link.name; 200a42c: c2 07 00 00 ld [ %i4 ], %g1 200a430: 10 80 00 19 b 200a494 200a434: c2 26 20 50 st %g1, [ %i0 + 0x50 ] } else if ( type == IMFS_DEVICE ) { 200a438: 12 80 00 07 bne 200a454 200a43c: 80 a6 60 06 cmp %i1, 6 node->info.device.major = info->device.major; 200a440: c2 07 00 00 ld [ %i4 ], %g1 200a444: c2 26 20 50 st %g1, [ %i0 + 0x50 ] node->info.device.minor = info->device.minor; 200a448: c2 07 20 04 ld [ %i4 + 4 ], %g1 200a44c: 10 80 00 12 b 200a494 200a450: c2 26 20 54 st %g1, [ %i0 + 0x54 ] } else if ( type == IMFS_LINEAR_FILE ) { 200a454: 12 80 00 06 bne 200a46c 200a458: 80 a6 60 05 cmp %i1, 5 node->info.linearfile.size = 0; 200a45c: c0 26 20 50 clr [ %i0 + 0x50 ] 200a460: c0 26 20 54 clr [ %i0 + 0x54 ] node->info.linearfile.direct = 0; 200a464: 10 80 00 0c b 200a494 200a468: c0 26 20 58 clr [ %i0 + 0x58 ] } else if ( type == IMFS_MEMORY_FILE ) { 200a46c: 12 80 00 08 bne 200a48c 200a470: 80 a6 60 07 cmp %i1, 7 node->info.file.size = 0; 200a474: c0 26 20 50 clr [ %i0 + 0x50 ] 200a478: c0 26 20 54 clr [ %i0 + 0x54 ] node->info.file.indirect = 0; 200a47c: c0 26 20 58 clr [ %i0 + 0x58 ] node->info.file.doubly_indirect = 0; 200a480: c0 26 20 5c clr [ %i0 + 0x5c ] node->info.file.triply_indirect = 0; 200a484: 10 80 00 04 b 200a494 200a488: c0 26 20 60 clr [ %i0 + 0x60 ] } else if ( type == IMFS_FIFO ) { 200a48c: 22 80 00 02 be,a 200a494 <== ALWAYS TAKEN 200a490: 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; 200a494: c2 07 60 04 ld [ %i5 + 4 ], %g1 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 200a498: e0 26 20 08 st %l0, [ %i0 + 8 ] node->st_ino = ++fs_info->ino_count; 200a49c: 82 00 60 01 inc %g1 200a4a0: c2 27 60 04 st %g1, [ %i5 + 4 ] 200a4a4: c2 26 20 38 st %g1, [ %i0 + 0x38 ] 200a4a8: 90 04 20 50 add %l0, 0x50, %o0 200a4ac: 7f ff f2 98 call 2006f0c <_Chain_Append> 200a4b0: 92 10 00 18 mov %i0, %o1 rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 200a4b4: 81 c7 e0 08 ret 200a4b8: 81 e8 00 00 restore =============================================================================== 0200a6b4 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 200a6b4: 9d e3 bf 70 save %sp, -144, %sp 200a6b8: f2 27 a0 48 st %i1, [ %fp + 0x48 ] int i = 0; 200a6bc: 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 ) ) { 200a6c0: 80 8e bf f8 btst -8, %i2 200a6c4: 02 80 00 06 be 200a6dc <== ALWAYS TAKEN 200a6c8: ba 10 00 18 mov %i0, %i5 rtems_set_errno_and_return_minus_one( EIO ); 200a6cc: 40 00 11 0a call 200eaf4 <__errno> <== NOT EXECUTED 200a6d0: 01 00 00 00 nop <== NOT EXECUTED 200a6d4: 10 80 00 19 b 200a738 <== NOT EXECUTED 200a6d8: 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; 200a6dc: 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; 200a6e0: 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) ) { 200a6e4: 10 80 00 8d b 200a918 200a6e8: 33 00 80 6f sethi %hi(0x201bc00), %i1 type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 200a6ec: d2 07 a0 48 ld [ %fp + 0x48 ], %o1 200a6f0: 90 07 40 08 add %i5, %o0, %o0 200a6f4: 94 07 bf d0 add %fp, -48, %o2 200a6f8: 40 00 02 25 call 200af8c 200a6fc: 96 07 bf fc add %fp, -4, %o3 pathnamelen -= len; 200a700: c2 07 bf fc ld [ %fp + -4 ], %g1 200a704: c4 07 a0 48 ld [ %fp + 0x48 ], %g2 200a708: 84 20 80 01 sub %g2, %g1, %g2 200a70c: c4 27 a0 48 st %g2, [ %fp + 0x48 ] i += len; 200a710: c4 07 bf f8 ld [ %fp + -8 ], %g2 200a714: 82 00 80 01 add %g2, %g1, %g1 200a718: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !pathloc->node_access ) 200a71c: c2 06 c0 00 ld [ %i3 ], %g1 200a720: 80 a0 60 00 cmp %g1, 0 200a724: 12 80 00 08 bne 200a744 <== ALWAYS TAKEN 200a728: a0 10 00 08 mov %o0, %l0 rtems_set_errno_and_return_minus_one( ENOENT ); 200a72c: 40 00 10 f2 call 200eaf4 <__errno> 200a730: 01 00 00 00 nop 200a734: 82 10 20 02 mov 2, %g1 ! 2 200a738: c2 22 00 00 st %g1, [ %o0 ] 200a73c: 81 c7 e0 08 ret 200a740: 91 e8 3f ff restore %g0, -1, %o0 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 200a744: 80 a2 20 00 cmp %o0, 0 200a748: 02 80 00 10 be 200a788 200a74c: 80 a4 20 03 cmp %l0, 3 if ( node->type == IMFS_DIRECTORY ) 200a750: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a754: 80 a0 60 01 cmp %g1, 1 200a758: 12 80 00 0c bne 200a788 200a75c: 80 a4 20 03 cmp %l0, 3 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 200a760: 90 10 00 1b mov %i3, %o0 200a764: 7f ff ff a0 call 200a5e4 200a768: 92 10 20 01 mov 1, %o1 200a76c: 80 a2 20 00 cmp %o0, 0 200a770: 12 80 00 06 bne 200a788 200a774: 80 a4 20 03 cmp %l0, 3 rtems_set_errno_and_return_minus_one( EACCES ); 200a778: 40 00 10 df call 200eaf4 <__errno> 200a77c: 01 00 00 00 nop 200a780: 10 bf ff ee b 200a738 200a784: 82 10 20 0d mov 0xd, %g1 ! d node = pathloc->node_access; switch( type ) { 200a788: 02 80 00 1c be 200a7f8 200a78c: f8 06 c0 00 ld [ %i3 ], %i4 200a790: 80 a4 20 04 cmp %l0, 4 200a794: 02 80 00 5d be 200a908 200a798: 80 a4 20 02 cmp %l0, 2 200a79c: 12 80 00 60 bne 200a91c 200a7a0: 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 ) 200a7a4: c2 06 63 54 ld [ %i1 + 0x354 ], %g1 200a7a8: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 200a7ac: 80 a7 00 01 cmp %i4, %g1 200a7b0: 02 80 00 5b be 200a91c 200a7b4: 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; 200a7b8: d2 06 e0 10 ld [ %i3 + 0x10 ], %o1 /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { 200a7bc: c2 02 60 1c ld [ %o1 + 0x1c ], %g1 200a7c0: 80 a0 40 1c cmp %g1, %i4 200a7c4: 32 80 00 05 bne,a 200a7d8 200a7c8: 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; 200a7cc: 90 10 00 1b mov %i3, %o0 200a7d0: 10 80 00 5f b 200a94c 200a7d4: 92 02 60 08 add %o1, 8, %o1 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 200a7d8: 80 a7 20 00 cmp %i4, 0 200a7dc: 32 80 00 4f bne,a 200a918 200a7e0: f8 26 c0 00 st %i4, [ %i3 ] rtems_set_errno_and_return_minus_one( ENOENT ); 200a7e4: 40 00 10 c4 call 200eaf4 <__errno> 200a7e8: b0 10 3f ff mov -1, %i0 200a7ec: e0 22 00 00 st %l0, [ %o0 ] 200a7f0: 81 c7 e0 08 ret 200a7f4: 81 e8 00 00 restore case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 200a7f8: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a7fc: 80 a0 60 03 cmp %g1, 3 200a800: 12 80 00 07 bne 200a81c 200a804: 80 a0 60 04 cmp %g1, 4 IMFS_evaluate_hard_link( pathloc, 0 ); 200a808: 90 10 00 1b mov %i3, %o0 200a80c: 7f ff ff 97 call 200a668 200a810: 92 10 20 00 clr %o1 node = pathloc->node_access; 200a814: 10 80 00 0b b 200a840 200a818: 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 ) { 200a81c: 32 80 00 0a bne,a 200a844 200a820: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 result = IMFS_evaluate_sym_link( pathloc, 0 ); 200a824: 90 10 00 1b mov %i3, %o0 200a828: 40 00 00 67 call 200a9c4 200a82c: 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; 200a830: f8 06 c0 00 ld [ %i3 ], %i4 if ( result == -1 ) 200a834: 80 a2 3f ff cmp %o0, -1 200a838: 02 80 00 61 be 200a9bc <== NEVER TAKEN 200a83c: b0 10 00 08 mov %o0, %i0 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 200a840: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a844: 80 a0 60 01 cmp %g1, 1 200a848: 22 80 00 06 be,a 200a860 200a84c: 90 10 00 1c mov %i4, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 200a850: 40 00 10 a9 call 200eaf4 <__errno> 200a854: 01 00 00 00 nop 200a858: 10 bf ff b8 b 200a738 200a85c: 82 10 20 14 mov 0x14, %g1 ! 14 /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); 200a860: 40 00 01 ac call 200af10 200a864: 92 07 bf d0 add %fp, -48, %o1 if ( !node ) 200a868: b8 92 20 00 orcc %o0, 0, %i4 200a86c: 02 bf ff b0 be 200a72c 200a870: 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 )) { 200a874: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a878: 80 a0 60 01 cmp %g1, 1 200a87c: 32 80 00 27 bne,a 200a918 200a880: f8 26 c0 00 st %i4, [ %i3 ] 200a884: c2 07 20 5c ld [ %i4 + 0x5c ], %g1 200a888: 80 a0 60 00 cmp %g1, 0 200a88c: 02 80 00 1d be 200a900 200a890: 90 10 00 1d mov %i5, %o0 IMFS_skip_separator( pathname, &pathnamelen, &i); 200a894: 92 07 a0 48 add %fp, 0x48, %o1 200a898: 7f ff ff 20 call 200a518 200a89c: 94 07 bf f8 add %fp, -8, %o2 if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { 200a8a0: c2 07 bf f8 ld [ %fp + -8 ], %g1 200a8a4: c4 4f 40 01 ldsb [ %i5 + %g1 ], %g2 200a8a8: 80 a0 a0 2e cmp %g2, 0x2e 200a8ac: 12 80 00 06 bne 200a8c4 200a8b0: b0 07 40 01 add %i5, %g1, %i0 200a8b4: c4 4e 20 01 ldsb [ %i0 + 1 ], %g2 200a8b8: 80 a0 a0 2e cmp %g2, 0x2e 200a8bc: 22 80 00 0c be,a 200a8ec 200a8c0: 82 00 60 02 add %g1, 2, %g1 *pathloc = node->info.directory.mt_fs->mt_fs_root; 200a8c4: d2 07 20 5c ld [ %i4 + 0x5c ], %o1 200a8c8: 90 10 00 1b mov %i3, %o0 200a8cc: 92 02 60 1c add %o1, 0x1c, %o1 200a8d0: 40 00 12 e5 call 200f464 200a8d4: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalpath_h)( &pathname[i], 200a8d8: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 200a8dc: 90 10 00 18 mov %i0, %o0 200a8e0: c2 00 40 00 ld [ %g1 ], %g1 200a8e4: 10 80 00 24 b 200a974 200a8e8: d2 07 a0 48 ld [ %fp + 0x48 ], %o1 pathnamelen, flags, pathloc ); } i += 2; pathnamelen -= 2; node = node->Parent; 200a8ec: 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; 200a8f0: c2 27 bf f8 st %g1, [ %fp + -8 ] pathnamelen -= 2; 200a8f4: c2 07 a0 48 ld [ %fp + 0x48 ], %g1 200a8f8: 82 00 7f fe add %g1, -2, %g1 200a8fc: c2 27 a0 48 st %g1, [ %fp + 0x48 ] /* * Set the node access to the point we have found. */ pathloc->node_access = node; break; 200a900: 10 80 00 06 b 200a918 200a904: 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 ); 200a908: 40 00 10 7b call 200eaf4 <__errno> 200a90c: 01 00 00 00 nop 200a910: 10 bf ff 8a b 200a738 200a914: 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) ) { 200a918: 80 a4 20 04 cmp %l0, 4 200a91c: 02 80 00 04 be 200a92c <== NEVER TAKEN 200a920: 80 a4 20 00 cmp %l0, 0 200a924: 32 bf ff 72 bne,a 200a6ec 200a928: 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 ) { 200a92c: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200a930: 80 a0 60 01 cmp %g1, 1 200a934: 12 80 00 15 bne 200a988 200a938: 90 10 00 1b mov %i3, %o0 if ( node->info.directory.mt_fs != NULL ) { 200a93c: d2 07 20 5c ld [ %i4 + 0x5c ], %o1 200a940: 80 a2 60 00 cmp %o1, 0 200a944: 02 80 00 11 be 200a988 <== ALWAYS TAKEN 200a948: 92 02 60 1c add %o1, 0x1c, %o1 *pathloc = node->info.directory.mt_fs->mt_fs_root; 200a94c: 40 00 12 c6 call 200f464 200a950: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalpath_h)( &pathname[i-len], 200a954: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 200a958: c4 07 bf fc ld [ %fp + -4 ], %g2 200a95c: d0 07 bf f8 ld [ %fp + -8 ], %o0 200a960: d2 07 a0 48 ld [ %fp + 0x48 ], %o1 200a964: c2 00 40 00 ld [ %g1 ], %g1 200a968: 90 22 00 02 sub %o0, %g2, %o0 200a96c: 92 00 80 09 add %g2, %o1, %o1 200a970: 90 07 40 08 add %i5, %o0, %o0 200a974: 94 10 00 1a mov %i2, %o2 200a978: 9f c0 40 00 call %g1 200a97c: 96 10 00 1b mov %i3, %o3 200a980: 81 c7 e0 08 ret 200a984: 91 e8 00 08 restore %g0, %o0, %o0 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 200a988: 7f ff fe fc call 200a578 200a98c: 01 00 00 00 nop /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 200a990: 92 10 00 1a mov %i2, %o1 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 200a994: b0 10 00 08 mov %o0, %i0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 200a998: 7f ff ff 13 call 200a5e4 200a99c: 90 10 00 1b mov %i3, %o0 200a9a0: 80 a2 20 00 cmp %o0, 0 200a9a4: 12 80 00 06 bne 200a9bc 200a9a8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 200a9ac: 40 00 10 52 call 200eaf4 <__errno> 200a9b0: b0 10 3f ff mov -1, %i0 ! ffffffff 200a9b4: 82 10 20 0d mov 0xd, %g1 200a9b8: c2 22 00 00 st %g1, [ %o0 ] return result; } 200a9bc: 81 c7 e0 08 ret 200a9c0: 81 e8 00 00 restore =============================================================================== 0200ab04 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 200ab04: 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; 200ab08: 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; 200ab0c: c0 27 bf f4 clr [ %fp + -12 ] node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 200ab10: 90 10 00 18 mov %i0, %o0 200ab14: 40 00 15 90 call 2010154 200ab18: 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 ) 200ab1c: 37 00 80 6f sethi %hi(0x201bc00), %i3 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 200ab20: 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 ); 200ab24: d0 07 bf f4 ld [ %fp + -12 ], %o0 200ab28: d2 07 bf fc ld [ %fp + -4 ], %o1 200ab2c: 90 07 40 08 add %i5, %o0, %o0 200ab30: 94 07 bf d0 add %fp, -48, %o2 200ab34: 40 00 01 16 call 200af8c 200ab38: 96 07 bf f8 add %fp, -8, %o3 pathlen -= len; 200ab3c: c2 07 bf f8 ld [ %fp + -8 ], %g1 200ab40: c4 07 bf fc ld [ %fp + -4 ], %g2 200ab44: 84 20 80 01 sub %g2, %g1, %g2 200ab48: c4 27 bf fc st %g2, [ %fp + -4 ] i += len; 200ab4c: c4 07 bf f4 ld [ %fp + -12 ], %g2 200ab50: 82 00 80 01 add %g2, %g1, %g1 200ab54: c2 27 bf f4 st %g1, [ %fp + -12 ] if ( !pathloc->node_access ) 200ab58: c2 06 40 00 ld [ %i1 ], %g1 200ab5c: 80 a0 60 00 cmp %g1, 0 200ab60: 02 80 00 99 be 200adc4 <== NEVER TAKEN 200ab64: b0 10 00 08 mov %o0, %i0 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 200ab68: 80 a2 20 00 cmp %o0, 0 200ab6c: 02 80 00 10 be 200abac 200ab70: 80 a6 20 02 cmp %i0, 2 if ( node->type == IMFS_DIRECTORY ) 200ab74: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200ab78: 80 a0 60 01 cmp %g1, 1 200ab7c: 12 80 00 0c bne 200abac 200ab80: 80 a6 20 02 cmp %i0, 2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 200ab84: 90 10 00 19 mov %i1, %o0 200ab88: 7f ff fe 97 call 200a5e4 200ab8c: 92 10 20 01 mov 1, %o1 200ab90: 80 a2 20 00 cmp %o0, 0 200ab94: 12 80 00 06 bne 200abac 200ab98: 80 a6 20 02 cmp %i0, 2 rtems_set_errno_and_return_minus_one( EACCES ); 200ab9c: 40 00 0f d6 call 200eaf4 <__errno> 200aba0: 01 00 00 00 nop 200aba4: 10 80 00 9d b 200ae18 200aba8: 82 10 20 0d mov 0xd, %g1 ! d node = pathloc->node_access; switch( type ) { 200abac: 02 80 00 0f be 200abe8 200abb0: f8 06 40 00 ld [ %i1 ], %i4 200abb4: 80 a6 20 02 cmp %i0, 2 200abb8: 18 80 00 07 bgu 200abd4 200abbc: 80 a6 20 03 cmp %i0, 3 200abc0: 80 a6 20 00 cmp %i0, 0 200abc4: 02 80 00 6e be 200ad7c 200abc8: 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 ); 200abcc: 10 bf ff d7 b 200ab28 200abd0: 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 ) { 200abd4: 02 80 00 21 be 200ac58 200abd8: 80 a6 20 04 cmp %i0, 4 200abdc: 32 bf ff d3 bne,a 200ab28 <== NEVER TAKEN 200abe0: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED 200abe4: 30 80 00 6a b,a 200ad8c case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 200abe8: c2 06 e3 54 ld [ %i3 + 0x354 ], %g1 200abec: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 200abf0: 80 a7 00 01 cmp %i4, %g1 200abf4: 02 bf ff cd be 200ab28 200abf8: d0 07 bf f4 ld [ %fp + -12 ], %o0 200abfc: d2 06 60 10 ld [ %i1 + 0x10 ], %o1 /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { 200ac00: c2 02 60 1c ld [ %o1 + 0x1c ], %g1 200ac04: 80 a0 40 1c cmp %g1, %i4 200ac08: 32 80 00 0d bne,a 200ac3c 200ac0c: 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; 200ac10: 90 10 00 19 mov %i1, %o0 200ac14: 92 02 60 08 add %o1, 8, %o1 200ac18: 40 00 12 13 call 200f464 200ac1c: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 200ac20: c2 06 60 0c ld [ %i1 + 0xc ], %g1 200ac24: c4 07 bf f8 ld [ %fp + -8 ], %g2 200ac28: d0 07 bf f4 ld [ %fp + -12 ], %o0 200ac2c: c2 00 60 04 ld [ %g1 + 4 ], %g1 200ac30: 90 22 00 02 sub %o0, %g2, %o0 200ac34: 10 80 00 46 b 200ad4c 200ac38: 90 07 40 08 add %i5, %o0, %o0 } } else { if ( !node->Parent ) 200ac3c: 80 a7 20 00 cmp %i4, 0 200ac40: 32 bf ff b9 bne,a 200ab24 200ac44: f8 26 40 00 st %i4, [ %i1 ] rtems_set_errno_and_return_minus_one( ENOENT ); 200ac48: 40 00 0f ab call 200eaf4 <__errno> 200ac4c: 01 00 00 00 nop 200ac50: 10 80 00 73 b 200ae1c 200ac54: f0 22 00 00 st %i0, [ %o0 ] pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 200ac58: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200ac5c: 80 a0 60 03 cmp %g1, 3 200ac60: 12 80 00 0a bne 200ac88 200ac64: 80 a0 60 04 cmp %g1, 4 result = IMFS_evaluate_link( pathloc, 0 ); 200ac68: 90 10 00 19 mov %i1, %o0 200ac6c: 7f ff ff 78 call 200aa4c 200ac70: 92 10 20 00 clr %o1 if ( result == -1 ) 200ac74: 80 a2 3f ff cmp %o0, -1 200ac78: 12 80 00 0c bne 200aca8 <== ALWAYS TAKEN 200ac7c: b0 10 00 08 mov %o0, %i0 200ac80: 81 c7 e0 08 ret <== NOT EXECUTED 200ac84: 81 e8 00 00 restore <== NOT EXECUTED return -1; } else if ( node->type == IMFS_SYM_LINK ) { 200ac88: 32 80 00 09 bne,a 200acac 200ac8c: d0 06 40 00 ld [ %i1 ], %o0 result = IMFS_evaluate_link( pathloc, 0 ); 200ac90: 90 10 00 19 mov %i1, %o0 200ac94: 7f ff ff 6e call 200aa4c 200ac98: 92 10 20 00 clr %o1 if ( result == -1 ) 200ac9c: 80 a2 3f ff cmp %o0, -1 200aca0: 02 bf ff f8 be 200ac80 <== NEVER TAKEN 200aca4: b0 10 00 08 mov %o0, %i0 return -1; } node = pathloc->node_access; 200aca8: d0 06 40 00 ld [ %i1 ], %o0 if ( !node ) 200acac: 80 a2 20 00 cmp %o0, 0 200acb0: 02 80 00 57 be 200ae0c <== NEVER TAKEN 200acb4: 01 00 00 00 nop /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 200acb8: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 200acbc: 80 a0 60 01 cmp %g1, 1 200acc0: 12 80 00 53 bne 200ae0c 200acc4: 01 00 00 00 nop /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 200acc8: 40 00 00 92 call 200af10 200accc: 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 ) 200acd0: b8 92 20 00 orcc %o0, 0, %i4 200acd4: 02 80 00 32 be 200ad9c 200acd8: c2 07 bf f8 ld [ %fp + -8 ], %g1 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 200acdc: c2 07 20 4c ld [ %i4 + 0x4c ], %g1 200ace0: 80 a0 60 01 cmp %g1, 1 200ace4: 32 bf ff 90 bne,a 200ab24 200ace8: f8 26 40 00 st %i4, [ %i1 ] 200acec: c2 07 20 5c ld [ %i4 + 0x5c ], %g1 200acf0: 80 a0 60 00 cmp %g1, 0 200acf4: 02 80 00 20 be 200ad74 200acf8: 90 10 00 1d mov %i5, %o0 IMFS_skip_separator( path, &pathlen, &i); 200acfc: 92 07 bf fc add %fp, -4, %o1 200ad00: 7f ff fe 06 call 200a518 200ad04: 94 07 bf f4 add %fp, -12, %o2 if ((path[i] != '.') || (path[i + 1] != '.')) { 200ad08: c2 07 bf f4 ld [ %fp + -12 ], %g1 200ad0c: c4 4f 40 01 ldsb [ %i5 + %g1 ], %g2 200ad10: 80 a0 a0 2e cmp %g2, 0x2e 200ad14: 12 80 00 06 bne 200ad2c 200ad18: b0 07 40 01 add %i5, %g1, %i0 200ad1c: c4 4e 20 01 ldsb [ %i0 + 1 ], %g2 200ad20: 80 a0 a0 2e cmp %g2, 0x2e 200ad24: 02 80 00 0f be 200ad60 <== ALWAYS TAKEN 200ad28: 82 00 60 02 add %g1, 2, %g1 *pathloc = node->info.directory.mt_fs->mt_fs_root; 200ad2c: d2 07 20 5c ld [ %i4 + 0x5c ], %o1 200ad30: 90 10 00 19 mov %i1, %o0 200ad34: 92 02 60 1c add %o1, 0x1c, %o1 200ad38: 40 00 11 cb call 200f464 200ad3c: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalformake_h)( &path[i], 200ad40: c2 06 60 0c ld [ %i1 + 0xc ], %g1 200ad44: 90 10 00 18 mov %i0, %o0 200ad48: c2 00 60 04 ld [ %g1 + 4 ], %g1 200ad4c: 92 10 00 19 mov %i1, %o1 200ad50: 9f c0 40 00 call %g1 200ad54: 94 10 00 1a mov %i2, %o2 200ad58: 81 c7 e0 08 ret 200ad5c: 91 e8 00 08 restore %g0, %o0, %o0 pathloc, name ); } i += 2; pathlen -= 2; node = node->Parent; 200ad60: 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; 200ad64: c2 27 bf f4 st %g1, [ %fp + -12 ] pathlen -= 2; 200ad68: c2 07 bf fc ld [ %fp + -4 ], %g1 200ad6c: 82 00 7f fe add %g1, -2, %g1 200ad70: c2 27 bf fc st %g1, [ %fp + -4 ] node = node->Parent; } pathloc->node_access = node; 200ad74: 10 bf ff 6c b 200ab24 200ad78: f8 26 40 00 st %i4, [ %i1 ] } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 200ad7c: 40 00 0f 5e call 200eaf4 <__errno> 200ad80: 01 00 00 00 nop 200ad84: 10 80 00 25 b 200ae18 200ad88: 82 10 20 11 mov 0x11, %g1 ! 11 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 200ad8c: 40 00 0f 5a call 200eaf4 <__errno> 200ad90: 01 00 00 00 nop 200ad94: 10 80 00 21 b 200ae18 200ad98: 82 10 20 5b mov 0x5b, %g1 ! 5b case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 200ad9c: c4 07 bf f4 ld [ %fp + -12 ], %g2 200ada0: 82 20 80 01 sub %g2, %g1, %g1 200ada4: 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++) { 200ada8: 10 80 00 0d b 200addc 200adac: c2 26 80 00 st %g1, [ %i2 ] if ( !IMFS_is_separator( path[ i ] ) ) 200adb0: 7f ff e3 ca call 2003cd8 200adb4: 01 00 00 00 nop 200adb8: 80 a2 20 00 cmp %o0, 0 200adbc: 32 80 00 06 bne,a 200add4 200adc0: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_set_errno_and_return_minus_one( ENOENT ); 200adc4: 40 00 0f 4c call 200eaf4 <__errno> 200adc8: 01 00 00 00 nop 200adcc: 10 80 00 13 b 200ae18 200add0: 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++) { 200add4: 82 00 60 01 inc %g1 200add8: c2 27 bf f4 st %g1, [ %fp + -12 ] 200addc: c2 07 bf f4 ld [ %fp + -12 ], %g1 200ade0: d0 4f 40 01 ldsb [ %i5 + %g1 ], %o0 200ade4: 80 a2 20 00 cmp %o0, 0 200ade8: 12 bf ff f2 bne 200adb0 200adec: 01 00 00 00 nop /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 200adf0: 7f ff fd e2 call 200a578 200adf4: 90 10 00 19 mov %i1, %o0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 200adf8: c2 06 40 00 ld [ %i1 ], %g1 200adfc: c2 00 60 4c ld [ %g1 + 0x4c ], %g1 200ae00: 80 a0 60 01 cmp %g1, 1 200ae04: 02 80 00 08 be 200ae24 <== ALWAYS TAKEN 200ae08: b0 10 00 08 mov %o0, %i0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 200ae0c: 40 00 0f 3a call 200eaf4 <__errno> 200ae10: 01 00 00 00 nop 200ae14: 82 10 20 14 mov 0x14, %g1 ! 14 200ae18: c2 22 00 00 st %g1, [ %o0 ] 200ae1c: 81 c7 e0 08 ret 200ae20: 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 ) ) 200ae24: 90 10 00 19 mov %i1, %o0 200ae28: 7f ff fd ef call 200a5e4 200ae2c: 92 10 20 03 mov 3, %o1 200ae30: 80 a2 20 00 cmp %o0, 0 200ae34: 12 80 00 06 bne 200ae4c 200ae38: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 200ae3c: 40 00 0f 2e call 200eaf4 <__errno> 200ae40: b0 10 3f ff mov -1, %i0 ! ffffffff 200ae44: 82 10 20 0d mov 0xd, %g1 200ae48: c2 22 00 00 st %g1, [ %o0 ] return result; } 200ae4c: 81 c7 e0 08 ret 200ae50: 81 e8 00 00 restore =============================================================================== 0200a5e4 : */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 200a5e4: 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 ) ) 200a5e8: 80 8e 7f f8 btst -8, %i1 200a5ec: 02 80 00 08 be 200a60c <== ALWAYS TAKEN 200a5f0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EPERM ); 200a5f4: 40 00 11 40 call 200eaf4 <__errno> <== NOT EXECUTED 200a5f8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 200a5fc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 200a600: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200a604: 81 c7 e0 08 ret <== NOT EXECUTED 200a608: 81 e8 00 00 restore <== NOT EXECUTED jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 200a60c: 40 00 03 8e call 200b444 200a610: fa 06 00 00 ld [ %i0 ], %i5 st_gid = getegid(); 200a614: 40 00 03 88 call 200b434 200a618: 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 ) 200a61c: c2 17 60 3c lduh [ %i5 + 0x3c ], %g1 200a620: b9 2f 20 10 sll %i4, 0x10, %i4 200a624: b9 37 20 10 srl %i4, 0x10, %i4 200a628: 80 a7 00 01 cmp %i4, %g1 200a62c: 32 80 00 04 bne,a 200a63c 200a630: c2 17 60 3e lduh [ %i5 + 0x3e ], %g1 flags_to_test <<= 6; 200a634: 10 80 00 07 b 200a650 200a638: b3 2e 60 06 sll %i1, 6, %i1 else if ( st_gid == jnode->st_gid ) 200a63c: 91 2a 20 10 sll %o0, 0x10, %o0 200a640: 91 32 20 10 srl %o0, 0x10, %o0 200a644: 80 a2 00 01 cmp %o0, %g1 200a648: 22 80 00 02 be,a 200a650 200a64c: 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 ) 200a650: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 return 1; 200a654: b2 2e 40 01 andn %i1, %g1, %i1 200a658: 80 a0 00 19 cmp %g0, %i1 200a65c: b0 60 3f ff subx %g0, -1, %i0 return 0; } 200a660: 81 c7 e0 08 ret 200a664: 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 cb call 200d588 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 55 call 20107c8 <__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 2a call 200d350 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 39 call 20107c8 <__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 =============================================================================== 0200af10 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 200af10: 9d e3 bf a0 save %sp, -96, %sp /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 200af14: 13 00 80 6a sethi %hi(0x201a800), %o1 200af18: 90 10 00 19 mov %i1, %o0 200af1c: 40 00 12 9d call 200f990 200af20: 92 12 63 b8 or %o1, 0x3b8, %o1 200af24: 80 a2 20 00 cmp %o0, 0 200af28: 02 80 00 09 be 200af4c <== NEVER TAKEN 200af2c: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 200af30: 13 00 80 6a sethi %hi(0x201a800), %o1 200af34: 40 00 12 97 call 200f990 200af38: 92 12 63 c0 or %o1, 0x3c0, %o1 ! 201abc0 200af3c: 80 a2 20 00 cmp %o0, 0 200af40: 32 80 00 05 bne,a 200af54 <== ALWAYS TAKEN 200af44: fa 06 20 50 ld [ %i0 + 0x50 ], %i5 return directory->Parent; 200af48: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 200af4c: 81 c7 e0 08 ret 200af50: 81 e8 00 00 restore the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 200af54: 10 80 00 08 b 200af74 200af58: 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 ) ) 200af5c: 40 00 12 8d call 200f990 200af60: 92 07 60 0c add %i5, 0xc, %o1 200af64: 80 a2 20 00 cmp %o0, 0 200af68: 22 bf ff f9 be,a 200af4c 200af6c: 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 ) { 200af70: 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 ); 200af74: 80 a7 40 18 cmp %i5, %i0 200af78: 12 bf ff f9 bne 200af5c 200af7c: 90 10 00 19 mov %i1, %o0 200af80: b0 10 20 00 clr %i0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 200af84: 81 c7 e0 08 ret 200af88: 81 e8 00 00 restore =============================================================================== 0200ae54 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 200ae54: 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; 200ae58: 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; 200ae5c: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 loc = temp_mt_entry->mt_fs_root; 200ae60: b8 07 bf ec add %fp, -20, %i4 200ae64: 92 06 20 1c add %i0, 0x1c, %o1 200ae68: 40 00 11 7f call 200f464 200ae6c: 90 10 00 1c mov %i4, %o0 200ae70: c0 26 20 1c clr [ %i0 + 0x1c ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 200ae74: f0 07 60 08 ld [ %i5 + 8 ], %i0 loc.node_access = (void *)jnode; 200ae78: fa 27 bf ec st %i5, [ %fp + -20 ] IMFS_Set_handlers( &loc ); 200ae7c: 7f ff fd bf call 200a578 200ae80: 90 10 00 1c mov %i4, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 200ae84: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200ae88: 80 a0 60 01 cmp %g1, 1 200ae8c: 32 80 00 08 bne,a 200aeac 200ae90: 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 ) ) { 200ae94: 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 ); 200ae98: 82 07 60 54 add %i5, 0x54, %g1 200ae9c: 80 a0 80 01 cmp %g2, %g1 200aea0: 12 80 00 09 bne 200aec4 200aea4: 80 a7 60 00 cmp %i5, 0 result = IMFS_unlink( NULL, &loc ); 200aea8: 90 10 20 00 clr %o0 200aeac: 7f ff de 08 call 20026cc 200aeb0: 92 10 00 1c mov %i4, %o1 if (result != 0) 200aeb4: 80 a2 20 00 cmp %o0, 0 200aeb8: 12 80 00 12 bne 200af00 <== NEVER TAKEN 200aebc: ba 10 00 18 mov %i0, %i5 return -1; jnode = next; } if ( jnode != NULL ) { 200aec0: 80 a7 60 00 cmp %i5, 0 200aec4: 02 80 00 11 be 200af08 200aec8: 01 00 00 00 nop if ( jnode->type == IMFS_DIRECTORY ) { 200aecc: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200aed0: 80 a0 60 01 cmp %g1, 1 200aed4: 32 bf ff e9 bne,a 200ae78 <== NEVER TAKEN 200aed8: 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; 200aedc: 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 ); 200aee0: 84 07 60 54 add %i5, 0x54, %g2 if ( jnode_has_children( jnode ) ) 200aee4: 80 a0 40 02 cmp %g1, %g2 200aee8: 02 bf ff e3 be 200ae74 200aeec: 80 a0 60 00 cmp %g1, 0 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 200aef0: 12 bf ff e1 bne 200ae74 <== ALWAYS TAKEN 200aef4: ba 10 00 01 mov %g1, %i5 return 0; 200aef8: 81 c7 e0 08 ret <== NOT EXECUTED 200aefc: 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; 200af00: 81 c7 e0 08 ret <== NOT EXECUTED 200af04: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } } } while (jnode != NULL); return 0; } 200af08: 81 c7 e0 08 ret 200af0c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200af8c : const char *path, int pathlen, char *token, int *token_len ) { 200af8c: 9d e3 bf a0 save %sp, -96, %sp register int i = 0; 200af90: 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) ) { 200af94: 10 80 00 06 b 200afac 200af98: f8 0e 00 00 ldub [ %i0 ], %i4 token[i] = c; if ( i == IMFS_NAME_MAX ) 200af9c: 02 80 00 32 be 200b064 200afa0: 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]; 200afa4: ba 07 60 01 inc %i5 200afa8: 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) ) { 200afac: 91 2f 20 18 sll %i4, 0x18, %o0 200afb0: 7f ff e3 4a call 2003cd8 200afb4: 91 3a 20 18 sra %o0, 0x18, %o0 200afb8: 80 a2 20 00 cmp %o0, 0 200afbc: 12 80 00 04 bne 200afcc 200afc0: 80 a7 40 19 cmp %i5, %i1 200afc4: 06 bf ff f6 bl 200af9c <== ALWAYS TAKEN 200afc8: 80 a7 60 20 cmp %i5, 0x20 /* * Copy a seperator into token. */ if ( i == 0 ) { 200afcc: 80 a7 60 00 cmp %i5, 0 200afd0: 12 80 00 0e bne 200b008 200afd4: 82 06 80 1d add %i2, %i5, %g1 token[i] = c; 200afd8: f8 2e 80 00 stb %i4, [ %i2 ] if ( (token[i] != '\0') && pathlen ) { 200afdc: b9 2f 20 18 sll %i4, 0x18, %i4 200afe0: 80 a7 20 00 cmp %i4, 0 200afe4: 02 80 00 07 be 200b000 200afe8: ba 10 20 00 clr %i5 i++; type = IMFS_CURRENT_DIR; 200afec: b0 10 20 01 mov 1, %i0 */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { 200aff0: 80 a6 60 00 cmp %i1, 0 200aff4: 12 80 00 0a bne 200b01c 200aff8: ba 10 20 01 mov 1, %i5 200affc: ba 10 20 00 clr %i5 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; 200b000: 10 80 00 07 b 200b01c 200b004: b0 10 20 00 clr %i0 } } else if (token[ i-1 ] != '\0') { 200b008: c2 48 7f ff ldsb [ %g1 + -1 ], %g1 200b00c: 80 a0 60 00 cmp %g1, 0 200b010: 02 80 00 03 be 200b01c <== NEVER TAKEN 200b014: b0 10 20 03 mov 3, %i0 token[i] = '\0'; 200b018: 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 ) { 200b01c: 80 a6 20 03 cmp %i0, 3 200b020: 12 80 00 0f bne 200b05c 200b024: fa 26 c0 00 st %i5, [ %i3 ] if ( strcmp( token, "..") == 0 ) 200b028: 90 10 00 1a mov %i2, %o0 200b02c: 13 00 80 6a sethi %hi(0x201a800), %o1 200b030: 40 00 12 58 call 200f990 200b034: 92 12 63 c8 or %o1, 0x3c8, %o1 ! 201abc8 200b038: 80 a2 20 00 cmp %o0, 0 200b03c: 02 80 00 0c be 200b06c 200b040: 90 10 00 1a mov %i2, %o0 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 200b044: 13 00 80 6a sethi %hi(0x201a800), %o1 200b048: 40 00 12 52 call 200f990 200b04c: 92 12 63 d0 or %o1, 0x3d0, %o1 ! 201abd0 200b050: 80 a2 20 00 cmp %o0, 0 200b054: 22 80 00 02 be,a 200b05c 200b058: b0 10 20 01 mov 1, %i0 200b05c: 81 c7 e0 08 ret 200b060: 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; 200b064: 81 c7 e0 08 ret 200b068: 91 e8 20 04 restore %g0, 4, %o0 200b06c: b0 10 20 02 mov 2, %i0 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 200b070: 81 c7 e0 08 ret 200b074: 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 6c ld [ %g1 + 0x26c ], %g1 ! 201be6c 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 69 call 200a4bc 200231c: c2 20 a2 58 st %g1, [ %g2 + 0x258 ] ! 201c658 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 4a call 200f464 2002340: 92 12 63 84 or %o1, 0x384, %o1 ! 201ab84 /* * 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 e4 call 200eaf4 <__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 5c ld [ %g1 + 0x25c ], %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 5c st %g2, [ %g1 + 0x25c ] 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 =============================================================================== 0200d63c : */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 200d63c: 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 ) 200d640: 03 00 80 71 sethi %hi(0x201c400), %g1 200d644: fa 00 62 58 ld [ %g1 + 0x258 ], %i5 ! 201c658 200d648: b9 37 60 02 srl %i5, 2, %i4 200d64c: 92 10 00 1c mov %i4, %o1 200d650: 40 00 28 69 call 20177f4 <.umul> 200d654: 90 07 20 01 add %i4, 1, %o0 200d658: 92 10 00 1c mov %i4, %o1 200d65c: 40 00 28 66 call 20177f4 <.umul> 200d660: 90 02 20 01 inc %o0 200d664: 92 10 00 1d mov %i5, %o1 200d668: 40 00 28 63 call 20177f4 <.umul> 200d66c: 90 02 3f ff add %o0, -1, %o0 200d670: 82 10 20 00 clr %g1 200d674: 80 a0 40 19 cmp %g1, %i1 200d678: 34 80 00 0b bg,a 200d6a4 200d67c: f8 06 20 50 ld [ %i0 + 0x50 ], %i4 200d680: 80 a0 40 19 cmp %g1, %i1 200d684: 12 80 00 04 bne 200d694 <== NEVER TAKEN 200d688: 80 a2 00 1a cmp %o0, %i2 200d68c: 38 80 00 06 bgu,a 200d6a4 200d690: f8 06 20 50 ld [ %i0 + 0x50 ], %i4 rtems_set_errno_and_return_minus_one( EINVAL ); 200d694: 40 00 05 18 call 200eaf4 <__errno> 200d698: 01 00 00 00 nop 200d69c: 10 80 00 29 b 200d740 200d6a0: 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 ) 200d6a4: 80 a6 40 1c cmp %i1, %i4 200d6a8: 14 80 00 07 bg 200d6c4 <== NEVER TAKEN 200d6ac: e0 06 20 54 ld [ %i0 + 0x54 ], %l0 200d6b0: 80 a6 40 1c cmp %i1, %i4 200d6b4: 12 80 00 37 bne 200d790 200d6b8: 80 a6 80 10 cmp %i2, %l0 200d6bc: 08 80 00 35 bleu 200d790 200d6c0: 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; 200d6c4: b7 3f 60 1f sra %i5, 0x1f, %i3 200d6c8: 96 10 00 1d mov %i5, %o3 200d6cc: 94 10 00 1b mov %i3, %o2 200d6d0: 90 10 00 19 mov %i1, %o0 200d6d4: 40 00 29 da call 2017e3c <__divdi3> 200d6d8: 92 10 00 1a mov %i2, %o1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200d6dc: 90 10 00 1c mov %i4, %o0 200d6e0: 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; 200d6e4: a2 10 00 09 mov %o1, %l1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200d6e8: 94 10 00 1b mov %i3, %o2 200d6ec: 40 00 29 d4 call 2017e3c <__divdi3> 200d6f0: 92 10 00 10 mov %l0, %o1 200d6f4: b8 10 00 09 mov %o1, %i4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 200d6f8: 10 80 00 15 b 200d74c 200d6fc: ba 10 00 09 mov %o1, %i5 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 200d700: 7f ff ff 48 call 200d420 200d704: 92 10 00 1d mov %i5, %o1 200d708: 80 a2 20 00 cmp %o0, 0 200d70c: 22 80 00 10 be,a 200d74c 200d710: ba 07 60 01 inc %i5 for ( ; block>=old_blocks ; block-- ) { 200d714: 10 80 00 06 b 200d72c 200d718: 80 a7 40 1c cmp %i5, %i4 IMFS_memfile_remove_block( the_jnode, block ); 200d71c: 90 10 00 18 mov %i0, %o0 200d720: 7f ff ff bb call 200d60c 200d724: 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-- ) { 200d728: 80 a7 40 1c cmp %i5, %i4 200d72c: 1a bf ff fc bcc 200d71c 200d730: 92 10 00 1d mov %i5, %o1 IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 200d734: 40 00 04 f0 call 200eaf4 <__errno> 200d738: 01 00 00 00 nop 200d73c: 82 10 20 1c mov 0x1c, %g1 ! 1c 200d740: c2 22 00 00 st %g1, [ %o0 ] 200d744: 81 c7 e0 08 ret 200d748: 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++ ) { 200d74c: 80 a7 40 11 cmp %i5, %l1 200d750: 08 bf ff ec bleu 200d700 200d754: 90 10 00 18 mov %i0, %o0 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 200d758: f2 26 20 50 st %i1, [ %i0 + 0x50 ] 200d75c: f4 26 20 54 st %i2, [ %i0 + 0x54 ] IMFS_update_ctime(the_jnode); 200d760: 92 10 20 00 clr %o1 200d764: 7f ff d5 c6 call 2002e7c 200d768: 90 07 bf f8 add %fp, -8, %o0 200d76c: c2 07 bf f8 ld [ %fp + -8 ], %g1 IMFS_update_mtime(the_jnode); 200d770: 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); 200d774: c2 26 20 48 st %g1, [ %i0 + 0x48 ] IMFS_update_mtime(the_jnode); 200d778: 7f ff d5 c1 call 2002e7c 200d77c: 92 10 20 00 clr %o1 200d780: c2 07 bf f8 ld [ %fp + -8 ], %g1 200d784: c2 26 20 44 st %g1, [ %i0 + 0x44 ] return 0; 200d788: 81 c7 e0 08 ret 200d78c: 91 e8 20 00 restore %g0, 0, %o0 } 200d790: 81 c7 e0 08 ret 200d794: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200cf94 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 200cf94: 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 ) { 200cf98: 03 00 80 71 sethi %hi(0x201c400), %g1 200cf9c: f8 00 62 58 ld [ %g1 + 0x258 ], %i4 ! 201c658 200cfa0: b9 37 20 02 srl %i4, 2, %i4 200cfa4: 82 07 3f ff add %i4, -1, %g1 200cfa8: 80 a6 40 01 cmp %i1, %g1 200cfac: 18 80 00 18 bgu 200d00c 200cfb0: ba 10 00 18 mov %i0, %i5 p = info->indirect; if ( malloc_it ) { 200cfb4: 80 a6 a0 00 cmp %i2, 0 200cfb8: 02 80 00 0f be 200cff4 200cfbc: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 if ( !p ) { 200cfc0: 80 a0 60 00 cmp %g1, 0 200cfc4: 32 80 00 09 bne,a 200cfe8 200cfc8: f0 07 60 58 ld [ %i5 + 0x58 ], %i0 p = memfile_alloc_block(); 200cfcc: 7f ff ff e5 call 200cf60 200cfd0: b0 10 20 00 clr %i0 if ( !p ) 200cfd4: 80 a2 20 00 cmp %o0, 0 200cfd8: 02 80 00 8a be 200d200 <== NEVER TAKEN 200cfdc: 01 00 00 00 nop return 0; info->indirect = p; 200cfe0: d0 27 60 58 st %o0, [ %i5 + 0x58 ] } return &info->indirect[ my_block ]; 200cfe4: f0 07 60 58 ld [ %i5 + 0x58 ], %i0 200cfe8: b3 2e 60 02 sll %i1, 2, %i1 200cfec: 81 c7 e0 08 ret 200cff0: 91 ee 00 19 restore %i0, %i1, %o0 } if ( !p ) 200cff4: 80 a0 60 00 cmp %g1, 0 200cff8: 02 80 00 82 be 200d200 <== NEVER TAKEN 200cffc: b0 10 20 00 clr %i0 return 0; return &info->indirect[ my_block ]; 200d000: b3 2e 60 02 sll %i1, 2, %i1 200d004: 81 c7 e0 08 ret 200d008: 91 e8 40 19 restore %g1, %i1, %o0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 200d00c: 90 07 20 01 add %i4, 1, %o0 200d010: 40 00 29 f9 call 20177f4 <.umul> 200d014: 92 10 00 1c mov %i4, %o1 200d018: 82 02 3f ff add %o0, -1, %g1 200d01c: 80 a6 40 01 cmp %i1, %g1 200d020: 18 80 00 2f bgu 200d0dc 200d024: b6 10 00 08 mov %o0, %i3 my_block -= FIRST_DOUBLY_INDIRECT; 200d028: b2 26 40 1c sub %i1, %i4, %i1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200d02c: 92 10 00 1c mov %i4, %o1 200d030: 40 00 2a d7 call 2017b8c <.urem> 200d034: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200d038: 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; 200d03c: b6 10 00 08 mov %o0, %i3 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200d040: 40 00 2a 27 call 20178dc <.udiv> 200d044: 90 10 00 19 mov %i1, %o0 p = info->doubly_indirect; if ( malloc_it ) { 200d048: 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; 200d04c: b8 10 00 08 mov %o0, %i4 p = info->doubly_indirect; if ( malloc_it ) { 200d050: 02 80 00 18 be 200d0b0 200d054: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !p ) { 200d058: 80 a2 20 00 cmp %o0, 0 200d05c: 32 80 00 08 bne,a 200d07c 200d060: b9 2f 20 02 sll %i4, 2, %i4 p = memfile_alloc_block(); 200d064: 7f ff ff bf call 200cf60 200d068: b0 10 20 00 clr %i0 if ( !p ) 200d06c: 80 a2 20 00 cmp %o0, 0 200d070: 02 80 00 64 be 200d200 <== NEVER TAKEN 200d074: b9 2f 20 02 sll %i4, 2, %i4 return 0; info->doubly_indirect = p; 200d078: d0 27 60 5c st %o0, [ %i5 + 0x5c ] } p1 = (block_p *)p[ doubly ]; 200d07c: ba 02 00 1c add %o0, %i4, %i5 200d080: d0 02 00 1c ld [ %o0 + %i4 ], %o0 if ( !p1 ) { 200d084: 80 a2 20 00 cmp %o0, 0 200d088: 12 80 00 4f bne 200d1c4 200d08c: b1 2e e0 02 sll %i3, 2, %i0 p1 = memfile_alloc_block(); 200d090: 7f ff ff b4 call 200cf60 200d094: b0 10 20 00 clr %i0 if ( !p1 ) 200d098: 80 a2 20 00 cmp %o0, 0 200d09c: 02 80 00 59 be 200d200 <== NEVER TAKEN 200d0a0: 01 00 00 00 nop return 0; p[ doubly ] = (block_p) p1; 200d0a4: d0 27 40 00 st %o0, [ %i5 ] } return (block_p *)&p1[ singly ]; 200d0a8: 10 80 00 47 b 200d1c4 200d0ac: b1 2e e0 02 sll %i3, 2, %i0 } if ( !p ) 200d0b0: 80 a2 20 00 cmp %o0, 0 200d0b4: 02 80 00 53 be 200d200 <== NEVER TAKEN 200d0b8: b0 10 20 00 clr %i0 return 0; p = (block_p *)p[ doubly ]; 200d0bc: b9 2f 20 02 sll %i4, 2, %i4 200d0c0: c2 02 00 1c ld [ %o0 + %i4 ], %g1 if ( !p ) 200d0c4: 80 a0 60 00 cmp %g1, 0 200d0c8: 02 80 00 4e be 200d200 <== NEVER TAKEN 200d0cc: 01 00 00 00 nop return 0; return (block_p *)&p[ singly ]; 200d0d0: b1 2e e0 02 sll %i3, 2, %i0 200d0d4: 81 c7 e0 08 ret 200d0d8: 91 e8 40 18 restore %g1, %i0, %o0 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 200d0dc: 90 02 20 01 inc %o0 200d0e0: 40 00 29 c5 call 20177f4 <.umul> 200d0e4: 92 10 00 1c mov %i4, %o1 200d0e8: 90 02 3f ff add %o0, -1, %o0 200d0ec: 80 a6 40 08 cmp %i1, %o0 200d0f0: 18 80 00 44 bgu 200d200 <== NEVER TAKEN 200d0f4: b0 10 20 00 clr %i0 my_block -= FIRST_TRIPLY_INDIRECT; 200d0f8: b2 26 40 1b sub %i1, %i3, %i1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200d0fc: 92 10 00 1c mov %i4, %o1 200d100: 40 00 2a a3 call 2017b8c <.urem> 200d104: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200d108: 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; 200d10c: a0 10 00 08 mov %o0, %l0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200d110: 40 00 29 f3 call 20178dc <.udiv> 200d114: 90 10 00 19 mov %i1, %o0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 200d118: 92 10 00 1c mov %i4, %o1 200d11c: 40 00 29 f0 call 20178dc <.udiv> 200d120: b2 10 00 08 mov %o0, %i1 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200d124: 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; 200d128: b6 10 00 08 mov %o0, %i3 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200d12c: 40 00 2a 98 call 2017b8c <.urem> 200d130: 90 10 00 19 mov %i1, %o0 p = info->triply_indirect; if ( malloc_it ) { 200d134: 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; 200d138: b8 10 00 08 mov %o0, %i4 p = info->triply_indirect; if ( malloc_it ) { 200d13c: 02 80 00 24 be 200d1cc 200d140: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 if ( !p ) { 200d144: 80 a2 20 00 cmp %o0, 0 200d148: 12 80 00 08 bne 200d168 200d14c: b7 2e e0 02 sll %i3, 2, %i3 p = memfile_alloc_block(); 200d150: 7f ff ff 84 call 200cf60 200d154: 01 00 00 00 nop if ( !p ) 200d158: 80 a2 20 00 cmp %o0, 0 200d15c: 02 80 00 29 be 200d200 <== NEVER TAKEN 200d160: 01 00 00 00 nop return 0; info->triply_indirect = p; 200d164: d0 27 60 60 st %o0, [ %i5 + 0x60 ] } p1 = (block_p *) p[ triply ]; 200d168: ba 02 00 1b add %o0, %i3, %i5 200d16c: d0 02 00 1b ld [ %o0 + %i3 ], %o0 if ( !p1 ) { 200d170: 80 a2 20 00 cmp %o0, 0 200d174: 32 80 00 08 bne,a 200d194 200d178: b9 2f 20 02 sll %i4, 2, %i4 p1 = memfile_alloc_block(); 200d17c: 7f ff ff 79 call 200cf60 200d180: b0 10 20 00 clr %i0 if ( !p1 ) 200d184: 80 a2 20 00 cmp %o0, 0 200d188: 02 80 00 1e be 200d200 <== NEVER TAKEN 200d18c: b9 2f 20 02 sll %i4, 2, %i4 return 0; p[ triply ] = (block_p) p1; 200d190: d0 27 40 00 st %o0, [ %i5 ] } p2 = (block_p *)p1[ doubly ]; 200d194: ba 02 00 1c add %o0, %i4, %i5 200d198: d0 02 00 1c ld [ %o0 + %i4 ], %o0 if ( !p2 ) { 200d19c: 80 a2 20 00 cmp %o0, 0 200d1a0: 12 80 00 09 bne 200d1c4 200d1a4: b1 2c 20 02 sll %l0, 2, %i0 p2 = memfile_alloc_block(); 200d1a8: 7f ff ff 6e call 200cf60 200d1ac: b0 10 20 00 clr %i0 if ( !p2 ) 200d1b0: 80 a2 20 00 cmp %o0, 0 200d1b4: 02 80 00 13 be 200d200 <== NEVER TAKEN 200d1b8: 01 00 00 00 nop return 0; p1[ doubly ] = (block_p) p2; 200d1bc: d0 27 40 00 st %o0, [ %i5 ] } return (block_p *)&p2[ singly ]; 200d1c0: b1 2c 20 02 sll %l0, 2, %i0 200d1c4: 81 c7 e0 08 ret 200d1c8: 91 ea 00 18 restore %o0, %i0, %o0 } if ( !p ) 200d1cc: 80 a2 20 00 cmp %o0, 0 200d1d0: 02 80 00 0c be 200d200 <== NEVER TAKEN 200d1d4: b7 2e e0 02 sll %i3, 2, %i3 return 0; p1 = (block_p *) p[ triply ]; 200d1d8: c2 02 00 1b ld [ %o0 + %i3 ], %g1 if ( !p1 ) 200d1dc: 80 a0 60 00 cmp %g1, 0 200d1e0: 02 80 00 08 be 200d200 <== NEVER TAKEN 200d1e4: b9 2f 20 02 sll %i4, 2, %i4 return 0; p2 = (block_p *)p1[ doubly ]; 200d1e8: c2 00 40 1c ld [ %g1 + %i4 ], %g1 if ( !p2 ) 200d1ec: 80 a0 60 00 cmp %g1, 0 200d1f0: 02 80 00 04 be 200d200 <== NEVER TAKEN 200d1f4: 01 00 00 00 nop return 0; return (block_p *)&p2[ singly ]; 200d1f8: b1 2c 20 02 sll %l0, 2, %i0 200d1fc: b0 00 40 18 add %g1, %i0, %i0 /* * This means the requested block number is out of range. */ return 0; } 200d200: 81 c7 e0 08 ret 200d204: 81 e8 00 00 restore =============================================================================== 0200d208 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200d208: 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) { 200d20c: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200d210: ba 10 00 18 mov %i0, %i5 200d214: 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) { 200d218: 80 a0 60 06 cmp %g1, 6 200d21c: 12 80 00 1c bne 200d28c 200d220: 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)) 200d224: d8 1e 20 50 ldd [ %i0 + 0x50 ], %o4 200d228: 82 10 20 00 clr %g1 200d22c: 86 a3 40 1a subcc %o5, %i2, %g3 200d230: 84 63 00 19 subx %o4, %i1, %g2 200d234: 80 a0 40 02 cmp %g1, %g2 200d238: 14 80 00 07 bg 200d254 <== NEVER TAKEN 200d23c: d2 06 20 58 ld [ %i0 + 0x58 ], %o1 200d240: 80 a0 40 02 cmp %g1, %g2 200d244: 12 80 00 06 bne 200d25c <== NEVER TAKEN 200d248: 80 a7 00 03 cmp %i4, %g3 200d24c: 28 80 00 05 bleu,a 200d260 <== NEVER TAKEN 200d250: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 200d254: 10 80 00 03 b 200d260 200d258: 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; 200d25c: 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); 200d260: 92 02 40 11 add %o1, %l1, %o1 200d264: 94 10 00 18 mov %i0, %o2 200d268: 40 00 08 7f call 200f464 200d26c: 90 10 00 1b mov %i3, %o0 IMFS_update_atime( the_jnode ); 200d270: 90 07 bf f8 add %fp, -8, %o0 200d274: 7f ff d7 02 call 2002e7c 200d278: 92 10 20 00 clr %o1 200d27c: c2 07 bf f8 ld [ %fp + -8 ], %g1 200d280: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return my_length; 200d284: 81 c7 e0 08 ret 200d288: 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 ) 200d28c: 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; 200d290: 82 10 00 1a mov %i2, %g1 if ( last_byte > the_jnode->info.file.size ) 200d294: 88 10 20 00 clr %g4 200d298: c4 06 20 54 ld [ %i0 + 0x54 ], %g2 200d29c: 80 a1 00 03 cmp %g4, %g3 200d2a0: 14 80 00 08 bg 200d2c0 <== NEVER TAKEN 200d2a4: b4 07 00 1a add %i4, %i2, %i2 200d2a8: 80 a1 00 03 cmp %g4, %g3 200d2ac: 32 80 00 07 bne,a 200d2c8 <== NEVER TAKEN 200d2b0: 03 00 80 71 sethi %hi(0x201c400), %g1 <== NOT EXECUTED 200d2b4: 80 a6 80 02 cmp %i2, %g2 200d2b8: 28 80 00 04 bleu,a 200d2c8 200d2bc: 03 00 80 71 sethi %hi(0x201c400), %g1 my_length = the_jnode->info.file.size - start; 200d2c0: 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; 200d2c4: 03 00 80 71 sethi %hi(0x201c400), %g1 200d2c8: f4 00 62 58 ld [ %g1 + 0x258 ], %i2 ! 201c658 200d2cc: 90 10 00 10 mov %l0, %o0 200d2d0: b1 3e a0 1f sra %i2, 0x1f, %i0 200d2d4: 92 10 00 11 mov %l1, %o1 200d2d8: 94 10 00 18 mov %i0, %o2 200d2dc: 40 00 2b be call 20181d4 <__moddi3> 200d2e0: 96 10 00 1a mov %i2, %o3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200d2e4: 90 10 00 10 mov %l0, %o0 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200d2e8: b2 10 00 09 mov %o1, %i1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200d2ec: 94 10 00 18 mov %i0, %o2 200d2f0: 92 10 00 11 mov %l1, %o1 200d2f4: 40 00 2a d2 call 2017e3c <__divdi3> 200d2f8: 96 10 00 1a mov %i2, %o3 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; 200d2fc: 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; 200d300: a0 10 00 09 mov %o1, %l0 if ( start_offset ) { 200d304: 80 a6 60 00 cmp %i1, 0 200d308: 02 80 00 14 be 200d358 200d30c: 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 ); 200d310: 90 10 00 1d mov %i5, %o0 200d314: 7f ff ff 20 call 200cf94 200d318: 94 10 20 00 clr %o2 if ( !block_ptr ) 200d31c: 80 a2 20 00 cmp %o0, 0 200d320: 02 bf ff d9 be 200d284 <== NEVER TAKEN 200d324: 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; 200d328: 80 a7 00 1a cmp %i4, %i2 200d32c: 08 80 00 03 bleu 200d338 200d330: b0 10 00 1c mov %i4, %i0 200d334: 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 ); 200d338: d2 02 00 00 ld [ %o0 ], %o1 200d33c: 94 10 00 18 mov %i0, %o2 200d340: 90 10 00 1b mov %i3, %o0 200d344: 92 02 40 19 add %o1, %i1, %o1 200d348: 40 00 08 47 call 200f464 200d34c: a2 06 c0 18 add %i3, %i0, %l1 dest += to_copy; block++; 200d350: a0 04 20 01 inc %l0 my_length -= to_copy; 200d354: b8 27 00 18 sub %i4, %i0, %i4 } /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 200d358: 35 00 80 71 sethi %hi(0x201c400), %i2 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200d35c: 10 80 00 0f b 200d398 200d360: f6 06 a2 58 ld [ %i2 + 0x258 ], %i3 ! 201c658 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200d364: 92 10 00 10 mov %l0, %o1 200d368: 7f ff ff 0b call 200cf94 200d36c: 94 10 20 00 clr %o2 if ( !block_ptr ) 200d370: 82 92 20 00 orcc %o0, 0, %g1 200d374: 02 bf ff c4 be 200d284 <== NEVER TAKEN 200d378: 90 10 00 11 mov %l1, %o0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 200d37c: d2 00 40 00 ld [ %g1 ], %o1 200d380: 94 10 00 1b mov %i3, %o2 200d384: 40 00 08 38 call 200f464 200d388: a2 04 40 1b add %l1, %i3, %l1 dest += to_copy; block++; 200d38c: a0 04 20 01 inc %l0 my_length -= to_copy; 200d390: b8 27 00 1b sub %i4, %i3, %i4 copied += to_copy; 200d394: 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 ) { 200d398: c2 06 a2 58 ld [ %i2 + 0x258 ], %g1 200d39c: 80 a7 00 01 cmp %i4, %g1 200d3a0: 1a bf ff f1 bcc 200d364 200d3a4: 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 ) { 200d3a8: 80 a7 20 00 cmp %i4, 0 200d3ac: 02 80 00 0e be 200d3e4 200d3b0: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200d3b4: 90 10 00 1d mov %i5, %o0 200d3b8: 92 10 00 10 mov %l0, %o1 200d3bc: 7f ff fe f6 call 200cf94 200d3c0: 94 10 20 00 clr %o2 if ( !block_ptr ) 200d3c4: 82 92 20 00 orcc %o0, 0, %g1 200d3c8: 02 bf ff af be 200d284 <== NEVER TAKEN 200d3cc: 90 10 00 11 mov %l1, %o0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 200d3d0: d2 00 40 00 ld [ %g1 ], %o1 200d3d4: 94 10 00 1c mov %i4, %o2 200d3d8: 40 00 08 23 call 200f464 200d3dc: b0 07 00 18 add %i4, %i0, %i0 copied += my_length; } IMFS_update_atime( the_jnode ); 200d3e0: 90 07 bf f8 add %fp, -8, %o0 200d3e4: 7f ff d6 a6 call 2002e7c 200d3e8: 92 10 20 00 clr %o1 200d3ec: c2 07 bf f8 ld [ %fp + -8 ], %g1 200d3f0: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return copied; } 200d3f4: 81 c7 e0 08 ret 200d3f8: 81 e8 00 00 restore =============================================================================== 0200d4dc : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 200d4dc: 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; 200d4e0: 03 00 80 71 sethi %hi(0x201c400), %g1 200d4e4: fa 00 62 58 ld [ %g1 + 0x258 ], %i5 ! 201c658 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 200d4e8: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 200d4ec: 80 a0 60 00 cmp %g1, 0 200d4f0: 02 80 00 05 be 200d504 200d4f4: bb 37 60 02 srl %i5, 2, %i5 memfile_free_blocks_in_table( &info->indirect, to_free ); 200d4f8: 90 06 20 58 add %i0, 0x58, %o0 200d4fc: 7f ff ff e5 call 200d490 200d500: 92 10 00 1d mov %i5, %o1 } if ( info->doubly_indirect ) { 200d504: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 200d508: b8 10 20 00 clr %i4 200d50c: 80 a0 60 00 cmp %g1, 0 200d510: 12 80 00 0d bne 200d544 200d514: 37 00 80 71 sethi %hi(0x201c400), %i3 } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 200d518: 10 80 00 15 b 200d56c 200d51c: 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( 200d520: 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] ) { 200d524: 90 00 80 01 add %g2, %g1, %o0 200d528: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200d52c: 80 a0 60 00 cmp %g1, 0 200d530: 22 80 00 05 be,a 200d544 <== NEVER TAKEN 200d534: b8 07 20 01 inc %i4 <== NOT EXECUTED memfile_free_blocks_in_table( 200d538: 7f ff ff d6 call 200d490 200d53c: 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 200d554: 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 ); 200d558: 90 06 20 5c add %i0, 0x5c, %o0 200d55c: 7f ff ff cd call 200d490 200d560: 92 10 00 1d mov %i5, %o1 } if ( info->triply_indirect ) { 200d564: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 200d568: b8 10 20 00 clr %i4 200d56c: 80 a0 60 00 cmp %g1, 0 200d570: 12 80 00 1c bne 200d5e0 200d574: 33 00 80 71 sethi %hi(0x201c400), %i1 memfile_free_blocks_in_table( (block_p **)&info->triply_indirect, to_free ); } return 0; } 200d578: 81 c7 e0 08 ret 200d57c: 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( 200d580: a1 2f 20 02 sll %i4, 2, %l0 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 200d584: f6 00 40 10 ld [ %g1 + %l0 ], %i3 if ( !p ) /* ensure we have a valid pointer */ 200d588: 80 a6 e0 00 cmp %i3, 0 200d58c: 02 80 00 1b be 200d5f8 <== NEVER TAKEN 200d590: 90 06 20 60 add %i0, 0x60, %o0 200d594: 10 80 00 09 b 200d5b8 200d598: b4 10 20 00 clr %i2 break; for ( j=0 ; j <== NEVER TAKEN 200d5a4: 90 10 00 1b mov %i3, %o0 memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 200d5a8: 7f ff ff ba call 200d490 200d5ac: 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 200d5c8: 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( 200d5cc: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 200d5d0: 92 10 00 1d mov %i5, %o1 200d5d4: 90 02 00 10 add %o0, %l0, %o0 200d5d8: 7f ff ff ae call 200d490 200d5dc: b8 07 20 01 inc %i4 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i 200d5f0: 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( 200d5f4: 90 06 20 60 add %i0, 0x60, %o0 200d5f8: 7f ff ff a6 call 200d490 200d5fc: 92 10 00 1d mov %i5, %o1 (block_p **)&info->triply_indirect, to_free ); } return 0; } 200d600: b0 10 20 00 clr %i0 200d604: 81 c7 e0 08 ret 200d608: 81 e8 00 00 restore =============================================================================== 0200d798 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200d798: 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 ) { 200d79c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200d7a0: 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 ) { 200d7a4: 80 a0 60 00 cmp %g1, 0 200d7a8: 06 80 00 09 bl 200d7cc <== NEVER TAKEN 200d7ac: 94 07 00 1a add %i4, %i2, %o2 200d7b0: 80 a0 60 00 cmp %g1, 0 200d7b4: 12 80 00 12 bne 200d7fc <== NEVER TAKEN 200d7b8: 03 00 80 71 sethi %hi(0x201c400), %g1 200d7bc: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 200d7c0: 80 a0 40 0a cmp %g1, %o2 200d7c4: 1a 80 00 0e bcc 200d7fc 200d7c8: 03 00 80 71 sethi %hi(0x201c400), %g1 status = IMFS_memfile_extend( the_jnode, last_byte ); 200d7cc: 90 10 00 1d mov %i5, %o0 200d7d0: 7f ff ff 9b call 200d63c 200d7d4: 92 10 20 00 clr %o1 if ( status ) 200d7d8: 80 a2 20 00 cmp %o0, 0 200d7dc: 02 80 00 08 be 200d7fc 200d7e0: 03 00 80 71 sethi %hi(0x201c400), %g1 rtems_set_errno_and_return_minus_one( ENOSPC ); 200d7e4: 40 00 04 c4 call 200eaf4 <__errno> 200d7e8: b0 10 3f ff mov -1, %i0 200d7ec: 82 10 20 1c mov 0x1c, %g1 200d7f0: c2 22 00 00 st %g1, [ %o0 ] 200d7f4: 81 c7 e0 08 ret 200d7f8: 81 e8 00 00 restore */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200d7fc: e0 00 62 58 ld [ %g1 + 0x258 ], %l0 200d800: 92 10 00 1a mov %i2, %o1 200d804: b1 3c 20 1f sra %l0, 0x1f, %i0 200d808: 96 10 00 10 mov %l0, %o3 200d80c: 94 10 00 18 mov %i0, %o2 200d810: 40 00 2a 71 call 20181d4 <__moddi3> 200d814: 90 10 00 19 mov %i1, %o0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200d818: 94 10 00 18 mov %i0, %o2 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200d81c: a2 10 00 09 mov %o1, %l1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200d820: 90 10 00 19 mov %i1, %o0 200d824: 92 10 00 1a mov %i2, %o1 200d828: 40 00 29 85 call 2017e3c <__divdi3> 200d82c: 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; 200d830: 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 ) { 200d834: 80 a4 60 00 cmp %l1, 0 200d838: 02 80 00 14 be 200d888 200d83c: 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 ); 200d840: 90 10 00 1d mov %i5, %o0 200d844: 7f ff fd d4 call 200cf94 200d848: 94 10 20 00 clr %o2 if ( !block_ptr ) 200d84c: 80 a2 20 00 cmp %o0, 0 200d850: 02 80 00 36 be 200d928 <== NEVER TAKEN 200d854: 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; 200d858: b0 24 00 11 sub %l0, %l1, %i0 200d85c: 80 a6 00 1c cmp %i0, %i4 200d860: 38 80 00 02 bgu,a 200d868 200d864: b0 10 00 1c mov %i4, %i0 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 200d868: d0 02 00 00 ld [ %o0 ], %o0 200d86c: 92 10 00 1b mov %i3, %o1 200d870: 90 02 00 11 add %o0, %l1, %o0 200d874: 94 10 00 18 mov %i0, %o2 200d878: 40 00 06 fb call 200f464 200d87c: b6 06 c0 18 add %i3, %i0, %i3 src += to_copy; block++; 200d880: b4 06 a0 01 inc %i2 my_length -= to_copy; 200d884: b8 27 00 18 sub %i4, %i0, %i4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 200d888: 21 00 80 71 sethi %hi(0x201c400), %l0 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200d88c: 10 80 00 0f b 200d8c8 200d890: f2 04 22 58 ld [ %l0 + 0x258 ], %i1 ! 201c658 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200d894: 92 10 00 1a mov %i2, %o1 200d898: 7f ff fd bf call 200cf94 200d89c: 94 10 20 00 clr %o2 if ( !block_ptr ) 200d8a0: 80 a2 20 00 cmp %o0, 0 200d8a4: 02 bf ff d4 be 200d7f4 <== NEVER TAKEN 200d8a8: 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 ); 200d8ac: d0 02 00 00 ld [ %o0 ], %o0 200d8b0: 94 10 00 19 mov %i1, %o2 200d8b4: 40 00 06 ec call 200f464 200d8b8: b6 06 c0 19 add %i3, %i1, %i3 src += to_copy; block++; 200d8bc: b4 06 a0 01 inc %i2 my_length -= to_copy; 200d8c0: 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( 200d8c4: 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 ) { 200d8c8: c2 04 22 58 ld [ %l0 + 0x258 ], %g1 200d8cc: 80 a7 00 01 cmp %i4, %g1 200d8d0: 1a bf ff f1 bcc 200d894 200d8d4: 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 ) { 200d8d8: 80 a7 20 00 cmp %i4, 0 200d8dc: 02 80 00 0e be 200d914 200d8e0: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200d8e4: 90 10 00 1d mov %i5, %o0 200d8e8: 92 10 00 1a mov %i2, %o1 200d8ec: 7f ff fd aa call 200cf94 200d8f0: 94 10 20 00 clr %o2 if ( !block_ptr ) 200d8f4: 80 a2 20 00 cmp %o0, 0 200d8f8: 02 bf ff bf be 200d7f4 <== NEVER TAKEN 200d8fc: 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 ); 200d900: d0 02 00 00 ld [ %o0 ], %o0 200d904: 94 10 00 1c mov %i4, %o2 200d908: 40 00 06 d7 call 200f464 200d90c: b0 06 00 1c add %i0, %i4, %i0 my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 200d910: 90 07 bf f8 add %fp, -8, %o0 200d914: 7f ff d5 5a call 2002e7c 200d918: 92 10 20 00 clr %o1 200d91c: c2 07 bf f8 ld [ %fp + -8 ], %g1 200d920: c2 27 60 44 st %g1, [ %i5 + 0x44 ] 200d924: c2 27 60 48 st %g1, [ %i5 + 0x48 ] return copied; } 200d928: 81 c7 e0 08 ret 200d92c: 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 62 call 200eaf4 <__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 78 ld [ %i5 + 0x78 ], %g1 ! 2023878 <_impure_ptr> 2004e7c: 90 06 20 0c add %i0, 0xc, %o0 2004e80: 40 00 39 12 call 20132c8 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 78 ld [ %i5 + 0x78 ], %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 78 ld [ %i5 + 0x78 ], %g1 2004eb8: 90 10 20 2f mov 0x2f, %o0 2004ebc: 40 00 38 ce call 20131f4 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 78 ld [ %i5 + 0x78 ], %g1 2004ed0: 13 00 80 86 sethi %hi(0x2021800), %o1 2004ed4: d0 00 60 08 ld [ %g1 + 8 ], %o0 2004ed8: 92 12 60 90 or %o1, 0x90, %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 78 ld [ %i5 + 0x78 ], %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 a8 or %o1, 0xa8, %o1 ! 20218a8 2004efc: 40 00 38 a2 call 2013184 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 78 ld [ %i5 + 0x78 ], %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 9b call 2013184 2004f1c: 92 12 60 b8 or %o1, 0xb8, %o1 ! 20218b8 (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 78 ld [ %i5 + 0x78 ], %g1 2004f30: 10 80 00 05 b 2004f44 2004f34: b0 16 20 c8 or %i0, 0xc8, %i0 return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 2004f38: c2 07 60 78 ld [ %i5 + 0x78 ], %g1 2004f3c: 31 00 80 86 sethi %hi(0x2021800), %i0 2004f40: b0 16 20 e0 or %i0, 0xe0, %i0 ! 20218e0 2004f44: f2 00 60 08 ld [ %g1 + 8 ], %i1 2004f48: 40 00 38 e0 call 20132c8 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 8b call 2013184 <== NOT EXECUTED 2004f5c: 93 ee 60 f8 restore %i1, 0xf8, %o1 <== NOT EXECUTED return; } puts(""); 2004f60: 40 00 3f c5 call 2014e74 2004f64: 91 ee 20 40 restore %i0, 0x40, %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 0d call 2010218 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 =============================================================================== 0200a518 : static void IMFS_skip_separator ( const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { 200a518: 9d e3 bf a0 save %sp, -96, %sp while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 200a51c: 10 80 00 07 b 200a538 200a520: c2 06 80 00 ld [ %i2 ], %g1 ++(*index); 200a524: c2 26 80 00 st %g1, [ %i2 ] --(*len); 200a528: c2 06 40 00 ld [ %i1 ], %g1 200a52c: 82 00 7f ff add %g1, -1, %g1 200a530: 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 ) { 200a534: c2 06 80 00 ld [ %i2 ], %g1 200a538: 7f ff e5 e8 call 2003cd8 200a53c: d0 4e 00 01 ldsb [ %i0 + %g1 ], %o0 200a540: 80 a2 20 00 cmp %o0, 0 200a544: 02 80 00 0b be 200a570 200a548: 01 00 00 00 nop 200a54c: c2 06 80 00 ld [ %i2 ], %g1 200a550: c4 4e 00 01 ldsb [ %i0 + %g1 ], %g2 200a554: 80 a0 a0 00 cmp %g2, 0 200a558: 02 80 00 06 be 200a570 200a55c: 01 00 00 00 nop 200a560: c4 06 40 00 ld [ %i1 ], %g2 200a564: 80 a0 a0 00 cmp %g2, 0 200a568: 12 bf ff ef bne 200a524 <== ALWAYS TAKEN 200a56c: 82 00 60 01 inc %g1 200a570: 81 c7 e0 08 ret 200a574: 81 e8 00 00 restore =============================================================================== 0200b17c : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 200b17c: 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; 200b180: c2 06 00 00 ld [ %i0 ], %g1 switch ( the_jnode->type ) { 200b184: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 200b188: 84 00 bf fe add %g2, -2, %g2 200b18c: 80 a0 a0 05 cmp %g2, 5 200b190: 18 80 00 12 bgu 200b1d8 <== NEVER TAKEN 200b194: 85 28 a0 02 sll %g2, 2, %g2 200b198: 07 00 80 2c sethi %hi(0x200b000), %g3 200b19c: 86 10 e1 64 or %g3, 0x164, %g3 ! 200b164 200b1a0: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 200b1a4: 81 c0 80 00 jmp %g2 200b1a8: 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 ); 200b1ac: c4 00 60 54 ld [ %g1 + 0x54 ], %g2 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 200b1b0: c6 00 60 50 ld [ %g1 + 0x50 ], %g3 200b1b4: c4 26 60 1c st %g2, [ %i1 + 0x1c ] break; 200b1b8: 10 80 00 0e b 200b1f0 200b1bc: c6 26 60 18 st %g3, [ %i1 + 0x18 ] case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 200b1c0: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2 break; 200b1c4: 10 80 00 0b b 200b1f0 200b1c8: c4 3e 60 20 std %g2, [ %i1 + 0x20 ] case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 200b1cc: c0 26 60 20 clr [ %i1 + 0x20 ] break; 200b1d0: 10 80 00 08 b 200b1f0 200b1d4: c0 26 60 24 clr [ %i1 + 0x24 ] default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 200b1d8: 40 00 0e 47 call 200eaf4 <__errno> 200b1dc: b0 10 3f ff mov -1, %i0 200b1e0: 82 10 20 86 mov 0x86, %g1 200b1e4: c2 22 00 00 st %g1, [ %o0 ] 200b1e8: 81 c7 e0 08 ret 200b1ec: 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; 200b1f0: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 200b1f4: 07 00 00 3f sethi %hi(0xfc00), %g3 buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 200b1f8: c4 00 a0 34 ld [ %g2 + 0x34 ], %g2 200b1fc: 86 10 e3 fe or %g3, 0x3fe, %g3 200b200: 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 = 200b204: 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; 200b208: 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 = 200b20c: 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; 200b210: c4 26 60 0c st %g2, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; 200b214: c4 10 60 34 lduh [ %g1 + 0x34 ], %g2 200b218: c4 36 60 10 sth %g2, [ %i1 + 0x10 ] buf->st_ino = the_jnode->st_ino; 200b21c: c4 00 60 38 ld [ %g1 + 0x38 ], %g2 200b220: c4 26 60 08 st %g2, [ %i1 + 8 ] buf->st_uid = the_jnode->st_uid; 200b224: c4 10 60 3c lduh [ %g1 + 0x3c ], %g2 200b228: c4 36 60 12 sth %g2, [ %i1 + 0x12 ] buf->st_gid = the_jnode->st_gid; 200b22c: c4 10 60 3e lduh [ %g1 + 0x3e ], %g2 200b230: c4 36 60 14 sth %g2, [ %i1 + 0x14 ] buf->st_atime = the_jnode->stat_atime; 200b234: c4 00 60 40 ld [ %g1 + 0x40 ], %g2 200b238: c4 26 60 28 st %g2, [ %i1 + 0x28 ] buf->st_mtime = the_jnode->stat_mtime; 200b23c: c4 00 60 44 ld [ %g1 + 0x44 ], %g2 buf->st_ctime = the_jnode->stat_ctime; 200b240: 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; 200b244: c4 26 60 30 st %g2, [ %i1 + 0x30 ] buf->st_ctime = the_jnode->stat_ctime; 200b248: c2 26 60 38 st %g1, [ %i1 + 0x38 ] buf->st_blksize = imfs_rq_memfile_bytes_per_block; 200b24c: 03 00 80 6f sethi %hi(0x201bc00), %g1 200b250: c2 00 62 6c ld [ %g1 + 0x26c ], %g1 ! 201be6c 200b254: c2 26 60 40 st %g1, [ %i1 + 0x40 ] return 0; } 200b258: 81 c7 e0 08 ret 200b25c: 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 00 call 200eaf4 <__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 55 call 200f464 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 97 call 200a578 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 d0 call 200eaf4 <__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 c9 call 200eaf4 <__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 84 or %i1, 0x284, %i1 ! 2018a84 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 61 sethi %hi(0x2018400), %g1 #endif { (*print_handler)( 2002860: f6 06 20 08 ld [ %i0 + 8 ], %i3 2002864: f8 00 63 e0 ld [ %g1 + 0x3e0 ], %i4 2002868: 03 00 80 61 sethi %hi(0x2018400), %g1 200286c: e2 00 63 e4 ld [ %g1 + 0x3e4 ], %l1 ! 20187e4 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 28 or %o1, 0x128, %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 61 sethi %hi(0x2018400), %g2 20028a4: c2 00 63 e0 ld [ %g1 + 0x3e0 ], %g1 20028a8: d0 00 a3 e4 ld [ %g2 + 0x3e4 ], %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 38 or %o1, 0x138, %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 61 sethi %hi(0x2018400), %i3 20028c4: 39 00 80 61 sethi %hi(0x2018400), %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 e3 e0 ld [ %i3 + 0x3e0 ], %g1 20028d0: d0 07 23 e4 ld [ %i4 + 0x3e4 ], %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 48 or %o1, 0x148, %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 61 sethi %hi(0x2018400), %g1 20028f4: c2 00 63 dc ld [ %g1 + 0x3dc ], %g1 ! 20187dc (*print_handler)( print_context, "Unavailable\n" ); 20028f8: d0 07 23 e4 ld [ %i4 + 0x3e4 ], %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 e3 e0 ld [ %i3 + 0x3e0 ], %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 68 or %o1, 0x168, %o1 ! 2017168 <== 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 78 or %o1, 0x178, %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 61 sethi %hi(0x2018400), %g1 200293c: c2 00 63 dc ld [ %g1 + 0x3dc ], %g1 ! 20187dc 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 74 or %g2, 0x274, %g1 2002954: 86 10 e0 0d or %g3, 0xd, %g3 2002958: c6 20 a2 74 st %g3, [ %g2 + 0x274 ] 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 61 f8 ld [ %g1 + 0x1f8 ], %o0 ! 20191f8 <_Per_CPU_Information> 2002988: 80 a2 20 00 cmp %o0, 0 200298c: 02 80 00 0c be 20029bc <== NEVER TAKEN 2002990: 84 10 61 f8 or %g1, 0x1f8, %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 84 or %g1, 0x284, %g2 ! 2018a84 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 84 st %o2, [ %g1 + 0x284 ] (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 20029b4: 40 00 3c 34 call 2011a84 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 61 sethi %hi(0x2018400), %g1 20029c4: c4 20 63 dc st %g2, [ %g1 + 0x3dc ] ! 20187dc 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 80 or %o0, 0x180, %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 90 or %o0, 0x190, %o0 ! 2017190 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 b0 or %o0, 0x1b0, %o0 ! 20171b0 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 21 c8 or %o0, 0x1c8, %o0 ! 20171c8 "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 21 e0 or %o0, 0x1e0, %o0 ! 20171e0 ); 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 21 f8 or %o0, 0x1f8, %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 30 or %o0, 0x230, %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 =============================================================================== 02009170 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 2009170: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 2009174: 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 ); 2009178: 7f ff e9 4e call 20036b0 200917c: fa 00 62 04 ld [ %g1 + 0x204 ], %i5 ! 201a204 <_Per_CPU_Information+0xc> 2009180: 84 10 00 08 mov %o0, %g2 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 2009184: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 2009188: 80 a0 60 00 cmp %g1, 0 200918c: 12 80 00 08 bne 20091ac <_CORE_RWLock_Release+0x3c> 2009190: 80 a0 60 01 cmp %g1, 1 _ISR_Enable( level ); 2009194: 7f ff e9 4b call 20036c0 2009198: b0 10 20 00 clr %i0 executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 200919c: 82 10 20 02 mov 2, %g1 20091a0: c2 27 60 34 st %g1, [ %i5 + 0x34 ] 20091a4: 81 c7 e0 08 ret 20091a8: 81 e8 00 00 restore return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 20091ac: 32 80 00 0b bne,a 20091d8 <_CORE_RWLock_Release+0x68> 20091b0: c0 27 60 34 clr [ %i5 + 0x34 ] the_rwlock->number_of_readers -= 1; 20091b4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 20091b8: 82 00 7f ff add %g1, -1, %g1 if ( the_rwlock->number_of_readers != 0 ) { 20091bc: 80 a0 60 00 cmp %g1, 0 20091c0: 02 80 00 05 be 20091d4 <_CORE_RWLock_Release+0x64> 20091c4: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* must be unlocked again */ _ISR_Enable( level ); 20091c8: 7f ff e9 3e call 20036c0 20091cc: b0 10 20 00 clr %i0 return CORE_RWLOCK_SUCCESSFUL; 20091d0: 30 80 00 24 b,a 2009260 <_CORE_RWLock_Release+0xf0> } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 20091d4: 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; 20091d8: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 20091dc: 7f ff e9 39 call 20036c0 20091e0: 90 10 00 02 mov %g2, %o0 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 20091e4: 40 00 07 7e call 200afdc <_Thread_queue_Dequeue> 20091e8: 90 10 00 18 mov %i0, %o0 if ( next ) { 20091ec: 80 a2 20 00 cmp %o0, 0 20091f0: 22 80 00 1c be,a 2009260 <_CORE_RWLock_Release+0xf0> 20091f4: b0 10 20 00 clr %i0 if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 20091f8: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 20091fc: 80 a0 60 01 cmp %g1, 1 2009200: 32 80 00 05 bne,a 2009214 <_CORE_RWLock_Release+0xa4> 2009204: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 2009208: 82 10 20 02 mov 2, %g1 return CORE_RWLOCK_SUCCESSFUL; 200920c: 10 80 00 14 b 200925c <_CORE_RWLock_Release+0xec> 2009210: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 2009214: 82 00 60 01 inc %g1 2009218: c2 26 20 48 st %g1, [ %i0 + 0x48 ] the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 200921c: 82 10 20 01 mov 1, %g1 2009220: 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 ); 2009224: 40 00 08 aa call 200b4cc <_Thread_queue_First> 2009228: 90 10 00 18 mov %i0, %o0 if ( !next || 200922c: 92 92 20 00 orcc %o0, 0, %o1 2009230: 22 80 00 0c be,a 2009260 <_CORE_RWLock_Release+0xf0> 2009234: b0 10 20 00 clr %i0 2009238: c2 02 60 30 ld [ %o1 + 0x30 ], %g1 200923c: 80 a0 60 01 cmp %g1, 1 2009240: 02 80 00 07 be 200925c <_CORE_RWLock_Release+0xec> <== NEVER TAKEN 2009244: 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; 2009248: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 200924c: 82 00 60 01 inc %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 2009250: 40 00 08 50 call 200b390 <_Thread_queue_Extract> 2009254: c2 26 20 48 st %g1, [ %i0 + 0x48 ] } 2009258: 30 bf ff f3 b,a 2009224 <_CORE_RWLock_Release+0xb4> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 200925c: b0 10 20 00 clr %i0 2009260: 81 c7 e0 08 ret 2009264: 81 e8 00 00 restore =============================================================================== 02009268 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 2009268: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 200926c: 90 10 00 18 mov %i0, %o0 2009270: 40 00 06 8b call 200ac9c <_Thread_Get> 2009274: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2009278: c2 07 bf fc ld [ %fp + -4 ], %g1 200927c: 80 a0 60 00 cmp %g1, 0 2009280: 12 80 00 09 bne 20092a4 <_CORE_RWLock_Timeout+0x3c> <== NEVER TAKEN 2009284: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 2009288: 40 00 08 cf call 200b5c4 <_Thread_queue_Process_timeout> 200928c: 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--; 2009290: 03 00 80 67 sethi %hi(0x2019c00), %g1 2009294: c4 00 60 c0 ld [ %g1 + 0xc0 ], %g2 ! 2019cc0 <_Thread_Dispatch_disable_level> 2009298: 84 00 bf ff add %g2, -1, %g2 200929c: c4 20 60 c0 st %g2, [ %g1 + 0xc0 ] return _Thread_Dispatch_disable_level; 20092a0: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 20092a4: 81 c7 e0 08 ret 20092a8: 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 ba call 2020798 <__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 53 call 2012e10 <_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 2c call 2015594 <_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 e3 call 20124a8 <_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 =============================================================================== 02007300 <_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 ) { 2007300: 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)) ) { 2007304: 90 10 00 18 mov %i0, %o0 2007308: 40 00 07 5b call 2009074 <_Thread_queue_Dequeue> 200730c: ba 10 00 18 mov %i0, %i5 2007310: 80 a2 20 00 cmp %o0, 0 2007314: 12 80 00 0e bne 200734c <_CORE_semaphore_Surrender+0x4c> 2007318: 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 ); 200731c: 7f ff eb 98 call 200217c 2007320: 01 00 00 00 nop if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 2007324: c2 07 60 48 ld [ %i5 + 0x48 ], %g1 2007328: c4 07 60 40 ld [ %i5 + 0x40 ], %g2 200732c: 80 a0 40 02 cmp %g1, %g2 2007330: 1a 80 00 05 bcc 2007344 <_CORE_semaphore_Surrender+0x44> <== NEVER TAKEN 2007334: b0 10 20 04 mov 4, %i0 the_semaphore->count += 1; 2007338: 82 00 60 01 inc %g1 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 200733c: b0 10 20 00 clr %i0 #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 2007340: c2 27 60 48 st %g1, [ %i5 + 0x48 ] else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 2007344: 7f ff eb 92 call 200218c 2007348: 01 00 00 00 nop } return status; } 200734c: 81 c7 e0 08 ret 2007350: 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 73 sethi %hi(0x201cc00), %g4 2006058: 88 11 23 e8 or %g4, 0x3e8, %g4 ! 201cfe8 <_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 74 sethi %hi(0x201d000), %g4 2006080: f2 01 23 e0 ld [ %g4 + 0x3e0 ], %i1 ! 201d3e0 <_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 23 e0 ld [ %g4 + 0x3e0 ], %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 74 sethi %hi(0x201d000), %g1 20060d0: c4 20 63 e0 st %g2, [ %g1 + 0x3e0 ] ! 201d3e0 <_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 bf call 2009c40 <_Watchdog_Remove> 2006148: 90 07 60 48 add %i5, 0x48, %o0 200614c: b2 16 63 f8 or %i1, 0x3f8, %i1 2006150: 40 00 0a 0e call 2008988 <_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 0a f3 call 2008d34 <_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 73 sethi %hi(0x201cc00), %g1 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 200618c: c2 00 63 f4 ld [ %g1 + 0x3f4 ], %g1 ! 201cff4 <_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 74 sethi %hi(0x201d000), %g1 20061a0: c4 00 63 e0 ld [ %g1 + 0x3e0 ], %g2 ! 201d3e0 <_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 63 e0 st %g2, [ %g1 + 0x3e0 ] } 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 ee call 2008988 <_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 62 b0 ld [ %g1 + 0x2b0 ], %g2 ! 201cab0 <_Thread_Dispatch_disable_level> 20061e0: 84 00 bf ff add %g2, -1, %g2 20061e4: c4 20 62 b0 st %g2, [ %g1 + 0x2b0 ] return _Thread_Dispatch_disable_level; 20061e8: c2 00 62 b0 ld [ %g1 + 0x2b0 ], %g1 20061ec: 81 c7 e0 08 ret 20061f0: 81 e8 00 00 restore =============================================================================== 0200c574 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 200c574: 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; 200c578: c0 27 bf f8 clr [ %fp + -8 ] Heap_Block *extend_last_block = NULL; 200c57c: 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; 200c580: 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; 200c584: 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; 200c588: e2 06 20 10 ld [ %i0 + 0x10 ], %l1 uintptr_t const min_block_size = heap->min_block_size; 200c58c: 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; 200c590: 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 ) { 200c594: 80 a7 40 19 cmp %i5, %i1 200c598: 0a 80 00 9f bcs 200c814 <_Heap_Extend+0x2a0> 200c59c: b8 10 20 00 clr %i4 return false; } extend_area_ok = _Heap_Get_first_and_last_block( 200c5a0: 90 10 00 19 mov %i1, %o0 200c5a4: 92 10 00 1a mov %i2, %o1 200c5a8: 94 10 00 11 mov %l1, %o2 200c5ac: 98 07 bf f8 add %fp, -8, %o4 200c5b0: 7f ff eb 27 call 200724c <_Heap_Get_first_and_last_block> 200c5b4: 9a 07 bf fc add %fp, -4, %o5 page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 200c5b8: 80 8a 20 ff btst 0xff, %o0 200c5bc: 02 80 00 96 be 200c814 <_Heap_Extend+0x2a0> 200c5c0: b4 10 00 10 mov %l0, %i2 200c5c4: aa 10 20 00 clr %l5 200c5c8: ac 10 20 00 clr %l6 200c5cc: b8 10 20 00 clr %i4 200c5d0: a8 10 20 00 clr %l4 200c5d4: 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 ( 200c5d8: 80 a0 40 1d cmp %g1, %i5 200c5dc: 1a 80 00 05 bcc 200c5f0 <_Heap_Extend+0x7c> 200c5e0: e6 06 80 00 ld [ %i2 ], %l3 200c5e4: 80 a6 40 13 cmp %i1, %l3 200c5e8: 2a 80 00 8b bcs,a 200c814 <_Heap_Extend+0x2a0> 200c5ec: 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 ) { 200c5f0: 80 a7 40 01 cmp %i5, %g1 200c5f4: 02 80 00 06 be 200c60c <_Heap_Extend+0x98> 200c5f8: 80 a7 40 13 cmp %i5, %l3 merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 200c5fc: 2a 80 00 05 bcs,a 200c610 <_Heap_Extend+0x9c> 200c600: ac 10 00 1a mov %i2, %l6 200c604: 10 80 00 04 b 200c614 <_Heap_Extend+0xa0> 200c608: 90 10 00 13 mov %l3, %o0 200c60c: a8 10 00 1a mov %i2, %l4 200c610: 90 10 00 13 mov %l3, %o0 200c614: 40 00 17 53 call 2012360 <.urem> 200c618: 92 10 00 11 mov %l1, %o1 200c61c: ae 04 ff f8 add %l3, -8, %l7 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 200c620: 80 a4 c0 19 cmp %l3, %i1 200c624: 12 80 00 05 bne 200c638 <_Heap_Extend+0xc4> 200c628: 90 25 c0 08 sub %l7, %o0, %o0 start_block->prev_size = extend_area_end; 200c62c: 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 ) 200c630: 10 80 00 04 b 200c640 <_Heap_Extend+0xcc> 200c634: b8 10 00 08 mov %o0, %i4 merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 200c638: 2a 80 00 02 bcs,a 200c640 <_Heap_Extend+0xcc> 200c63c: 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; 200c640: f4 02 20 04 ld [ %o0 + 4 ], %i2 200c644: 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); 200c648: 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 ); 200c64c: 80 a6 80 10 cmp %i2, %l0 200c650: 12 bf ff e2 bne 200c5d8 <_Heap_Extend+0x64> 200c654: 82 10 00 1a mov %i2, %g1 if ( extend_area_begin < heap->area_begin ) { 200c658: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200c65c: 80 a6 40 01 cmp %i1, %g1 200c660: 3a 80 00 04 bcc,a 200c670 <_Heap_Extend+0xfc> 200c664: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 heap->area_begin = extend_area_begin; 200c668: 10 80 00 05 b 200c67c <_Heap_Extend+0x108> 200c66c: f2 26 20 18 st %i1, [ %i0 + 0x18 ] } else if ( heap->area_end < extend_area_end ) { 200c670: 80 a0 40 1d cmp %g1, %i5 200c674: 2a 80 00 02 bcs,a 200c67c <_Heap_Extend+0x108> 200c678: 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; 200c67c: c4 07 bf f8 ld [ %fp + -8 ], %g2 200c680: c2 07 bf fc ld [ %fp + -4 ], %g1 extend_first_block->prev_size = extend_area_end; 200c684: 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 = 200c688: 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; 200c68c: 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; 200c690: 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 = 200c694: 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 ) { 200c698: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 200c69c: 80 a0 c0 02 cmp %g3, %g2 200c6a0: 08 80 00 04 bleu 200c6b0 <_Heap_Extend+0x13c> 200c6a4: c0 20 60 04 clr [ %g1 + 4 ] heap->first_block = extend_first_block; 200c6a8: 10 80 00 06 b 200c6c0 <_Heap_Extend+0x14c> 200c6ac: c4 26 20 20 st %g2, [ %i0 + 0x20 ] } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 200c6b0: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 200c6b4: 80 a0 80 01 cmp %g2, %g1 200c6b8: 2a 80 00 02 bcs,a 200c6c0 <_Heap_Extend+0x14c> 200c6bc: c2 26 20 24 st %g1, [ %i0 + 0x24 ] heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 200c6c0: 80 a5 20 00 cmp %l4, 0 200c6c4: 02 80 00 14 be 200c714 <_Heap_Extend+0x1a0> 200c6c8: 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; 200c6cc: 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; 200c6d0: 92 10 00 1a mov %i2, %o1 200c6d4: 40 00 17 23 call 2012360 <.urem> 200c6d8: 90 10 00 19 mov %i1, %o0 if ( remainder != 0 ) { 200c6dc: 80 a2 20 00 cmp %o0, 0 200c6e0: 02 80 00 04 be 200c6f0 <_Heap_Extend+0x17c> 200c6e4: c2 05 00 00 ld [ %l4 ], %g1 return value - remainder + alignment; 200c6e8: b2 06 40 1a add %i1, %i2, %i1 200c6ec: 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 = 200c6f0: 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; 200c6f4: 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 = 200c6f8: 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; 200c6fc: 82 10 60 01 or %g1, 1, %g1 _Heap_Free_block( heap, new_first_block ); 200c700: 90 10 00 18 mov %i0, %o0 200c704: 7f ff ff 92 call 200c54c <_Heap_Free_block> 200c708: c2 22 60 04 st %g1, [ %o1 + 4 ] link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 200c70c: 10 80 00 08 b 200c72c <_Heap_Extend+0x1b8> 200c710: 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 ) { 200c714: 80 a5 a0 00 cmp %l6, 0 200c718: 02 80 00 04 be 200c728 <_Heap_Extend+0x1b4> 200c71c: 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; 200c720: 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 = 200c724: ec 20 60 04 st %l6, [ %g1 + 4 ] link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 200c728: 80 a7 20 00 cmp %i4, 0 200c72c: 02 80 00 15 be 200c780 <_Heap_Extend+0x20c> 200c730: 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); 200c734: 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( 200c738: ba 27 40 1c sub %i5, %i4, %i5 200c73c: 40 00 17 09 call 2012360 <.urem> 200c740: 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) 200c744: c4 07 20 04 ld [ %i4 + 4 ], %g2 200c748: 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 = 200c74c: 82 07 40 1c add %i5, %i4, %g1 (last_block->size_and_flag - last_block_new_size) 200c750: 84 20 80 1d sub %g2, %i5, %g2 | HEAP_PREV_BLOCK_USED; 200c754: 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 = 200c758: 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; 200c75c: 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 ); 200c760: 90 10 00 18 mov %i0, %o0 200c764: 82 08 60 01 and %g1, 1, %g1 200c768: 92 10 00 1c mov %i4, %o1 block->size_and_flag = size | flag; 200c76c: ba 17 40 01 or %i5, %g1, %i5 200c770: 7f ff ff 77 call 200c54c <_Heap_Free_block> 200c774: fa 27 20 04 st %i5, [ %i4 + 4 ] extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 200c778: 10 80 00 0f b 200c7b4 <_Heap_Extend+0x240> 200c77c: 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 ) { 200c780: 80 a5 60 00 cmp %l5, 0 200c784: 02 80 00 0b be 200c7b0 <_Heap_Extend+0x23c> 200c788: 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; 200c78c: c6 05 60 04 ld [ %l5 + 4 ], %g3 _Heap_Link_above( 200c790: c2 07 bf fc ld [ %fp + -4 ], %g1 200c794: 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 ); 200c798: 84 20 80 15 sub %g2, %l5, %g2 block->size_and_flag = size | flag; 200c79c: 84 10 c0 02 or %g3, %g2, %g2 200c7a0: c4 25 60 04 st %g2, [ %l5 + 4 ] last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 200c7a4: c4 00 60 04 ld [ %g1 + 4 ], %g2 200c7a8: 84 10 a0 01 or %g2, 1, %g2 200c7ac: c4 20 60 04 st %g2, [ %g1 + 4 ] extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 200c7b0: 80 a7 20 00 cmp %i4, 0 200c7b4: 32 80 00 09 bne,a 200c7d8 <_Heap_Extend+0x264> 200c7b8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200c7bc: 80 a5 20 00 cmp %l4, 0 200c7c0: 32 80 00 06 bne,a 200c7d8 <_Heap_Extend+0x264> 200c7c4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 _Heap_Free_block( heap, extend_first_block ); 200c7c8: d2 07 bf f8 ld [ %fp + -8 ], %o1 200c7cc: 7f ff ff 60 call 200c54c <_Heap_Free_block> 200c7d0: 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 200c7d4: 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( 200c7d8: 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; 200c7dc: 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( 200c7e0: 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; 200c7e4: 86 08 e0 01 and %g3, 1, %g3 block->size_and_flag = size | flag; 200c7e8: 84 10 c0 02 or %g3, %g2, %g2 200c7ec: c4 20 60 04 st %g2, [ %g1 + 4 ] } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 200c7f0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 200c7f4: 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; 200c7f8: a4 20 40 12 sub %g1, %l2, %l2 /* Statistics */ stats->size += extended_size; 200c7fc: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 if ( extended_size_ptr != NULL ) 200c800: 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; 200c804: 82 00 40 12 add %g1, %l2, %g1 if ( extended_size_ptr != NULL ) 200c808: 02 80 00 03 be 200c814 <_Heap_Extend+0x2a0> <== NEVER TAKEN 200c80c: c2 26 20 2c st %g1, [ %i0 + 0x2c ] 200c810: e4 26 c0 00 st %l2, [ %i3 ] *extended_size_ptr = extended_size; return true; } 200c814: b0 0f 20 01 and %i4, 1, %i0 200c818: 81 c7 e0 08 ret 200c81c: 81 e8 00 00 restore =============================================================================== 0200c984 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 200c984: 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; 200c988: 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 ) { 200c98c: 80 a6 60 00 cmp %i1, 0 200c990: 02 80 00 77 be 200cb6c <_Heap_Free+0x1e8> 200c994: 90 10 00 19 mov %i1, %o0 200c998: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200c99c: 40 00 2c 7c call 2017b8c <.urem> 200c9a0: 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 200c9a4: 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); 200c9a8: 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; 200c9ac: 80 a7 40 0d cmp %i5, %o5 200c9b0: 0a 80 00 05 bcs 200c9c4 <_Heap_Free+0x40> 200c9b4: 82 10 20 00 clr %g1 200c9b8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200c9bc: 80 a0 40 1d cmp %g1, %i5 200c9c0: 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 ) ) { 200c9c4: 80 a0 60 00 cmp %g1, 0 200c9c8: 02 80 00 69 be 200cb6c <_Heap_Free+0x1e8> 200c9cc: 88 10 20 00 clr %g4 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 200c9d0: 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; 200c9d4: 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); 200c9d8: 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; 200c9dc: 80 a0 40 0d cmp %g1, %o5 200c9e0: 0a 80 00 05 bcs 200c9f4 <_Heap_Free+0x70> <== NEVER TAKEN 200c9e4: 86 10 20 00 clr %g3 200c9e8: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 200c9ec: 80 a0 c0 01 cmp %g3, %g1 200c9f0: 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 ) ) { 200c9f4: 80 a0 e0 00 cmp %g3, 0 200c9f8: 02 80 00 5d be 200cb6c <_Heap_Free+0x1e8> <== NEVER TAKEN 200c9fc: 88 10 20 00 clr %g4 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 200ca00: de 00 60 04 ld [ %g1 + 4 ], %o7 return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 200ca04: 80 8b e0 01 btst 1, %o7 200ca08: 02 80 00 59 be 200cb6c <_Heap_Free+0x1e8> 200ca0c: 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 200ca10: c8 06 20 24 ld [ %i0 + 0x24 ], %g4 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 200ca14: 80 a0 40 04 cmp %g1, %g4 200ca18: 02 80 00 07 be 200ca34 <_Heap_Free+0xb0> 200ca1c: 98 10 20 00 clr %o4 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 200ca20: 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; 200ca24: c6 00 e0 04 ld [ %g3 + 4 ], %g3 200ca28: 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 )); 200ca2c: 80 a0 00 03 cmp %g0, %g3 200ca30: 98 60 3f ff subx %g0, -1, %o4 if ( !_Heap_Is_prev_used( block ) ) { 200ca34: 80 8a e0 01 btst 1, %o3 200ca38: 12 80 00 25 bne 200cacc <_Heap_Free+0x148> 200ca3c: 80 8b 20 ff btst 0xff, %o4 uintptr_t const prev_size = block->prev_size; 200ca40: 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); 200ca44: 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; 200ca48: 80 a0 c0 0d cmp %g3, %o5 200ca4c: 0a 80 00 04 bcs 200ca5c <_Heap_Free+0xd8> <== NEVER TAKEN 200ca50: 94 10 20 00 clr %o2 200ca54: 80 a1 00 03 cmp %g4, %g3 200ca58: 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 ) ) { 200ca5c: 80 a2 a0 00 cmp %o2, 0 200ca60: 02 80 00 43 be 200cb6c <_Heap_Free+0x1e8> <== NEVER TAKEN 200ca64: 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; 200ca68: 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) ) { 200ca6c: 80 8b 60 01 btst 1, %o5 200ca70: 02 80 00 3f be 200cb6c <_Heap_Free+0x1e8> <== NEVER TAKEN 200ca74: 80 8b 20 ff btst 0xff, %o4 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 200ca78: 02 80 00 0e be 200cab0 <_Heap_Free+0x12c> 200ca7c: 88 00 80 0b add %g2, %o3, %g4 uintptr_t const size = block_size + prev_size + next_block_size; 200ca80: 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; 200ca84: c8 00 60 08 ld [ %g1 + 8 ], %g4 Heap_Block *prev = block->prev; 200ca88: c2 00 60 0c ld [ %g1 + 0xc ], %g1 prev->next = next; 200ca8c: c8 20 60 08 st %g4, [ %g1 + 8 ] next->prev = prev; 200ca90: c2 21 20 0c st %g1, [ %g4 + 0xc ] _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 200ca94: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 200ca98: 82 00 7f ff add %g1, -1, %g1 200ca9c: 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; 200caa0: 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; 200caa4: 82 13 e0 01 or %o7, 1, %g1 200caa8: 10 80 00 27 b 200cb44 <_Heap_Free+0x1c0> 200caac: 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; 200cab0: 9e 11 20 01 or %g4, 1, %o7 200cab4: de 20 e0 04 st %o7, [ %g3 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200cab8: c6 00 60 04 ld [ %g1 + 4 ], %g3 next_block->prev_size = size; 200cabc: 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; 200cac0: 86 08 ff fe and %g3, -2, %g3 200cac4: 10 80 00 20 b 200cb44 <_Heap_Free+0x1c0> 200cac8: c6 20 60 04 st %g3, [ %g1 + 4 ] next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 200cacc: 22 80 00 0d be,a 200cb00 <_Heap_Free+0x17c> 200cad0: 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; 200cad4: c8 00 60 08 ld [ %g1 + 8 ], %g4 Heap_Block *prev = old_block->prev; 200cad8: c2 00 60 0c ld [ %g1 + 0xc ], %g1 new_block->next = next; 200cadc: c8 27 60 08 st %g4, [ %i5 + 8 ] new_block->prev = prev; 200cae0: c2 27 60 0c st %g1, [ %i5 + 0xc ] uintptr_t const size = block_size + next_block_size; 200cae4: 86 03 c0 02 add %o7, %g2, %g3 next->prev = new_block; prev->next = new_block; 200cae8: 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; 200caec: fa 21 20 0c st %i5, [ %g4 + 0xc ] _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 200caf0: 82 10 e0 01 or %g3, 1, %g1 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 200caf4: 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; 200caf8: 10 80 00 13 b 200cb44 <_Heap_Free+0x1c0> 200cafc: c2 27 60 04 st %g1, [ %i5 + 4 ] ) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; 200cb00: f0 27 60 0c st %i0, [ %i5 + 0xc ] Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 200cb04: c6 27 60 08 st %g3, [ %i5 + 8 ] new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 200cb08: 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; 200cb0c: 86 10 a0 01 or %g2, 1, %g3 200cb10: c6 27 60 04 st %g3, [ %i5 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200cb14: c6 00 60 04 ld [ %g1 + 4 ], %g3 next_block->prev_size = block_size; 200cb18: 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; 200cb1c: 86 08 ff fe and %g3, -2, %g3 200cb20: c6 20 60 04 st %g3, [ %g1 + 4 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 200cb24: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 if ( stats->max_free_blocks < stats->free_blocks ) { 200cb28: 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; 200cb2c: 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; 200cb30: fa 26 20 08 st %i5, [ %i0 + 8 ] if ( stats->max_free_blocks < stats->free_blocks ) { 200cb34: 80 a0 c0 01 cmp %g3, %g1 200cb38: 1a 80 00 03 bcc 200cb44 <_Heap_Free+0x1c0> 200cb3c: c2 26 20 38 st %g1, [ %i0 + 0x38 ] stats->max_free_blocks = stats->free_blocks; 200cb40: c2 26 20 3c st %g1, [ %i0 + 0x3c ] } } /* Statistics */ --stats->used_blocks; 200cb44: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 ++stats->frees; stats->free_size += block_size; return( true ); 200cb48: 88 10 20 01 mov 1, %g4 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200cb4c: 82 00 7f ff add %g1, -1, %g1 200cb50: c2 26 20 40 st %g1, [ %i0 + 0x40 ] ++stats->frees; 200cb54: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200cb58: 82 00 60 01 inc %g1 200cb5c: c2 26 20 50 st %g1, [ %i0 + 0x50 ] stats->free_size += block_size; 200cb60: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 200cb64: 84 00 40 02 add %g1, %g2, %g2 200cb68: c4 26 20 30 st %g2, [ %i0 + 0x30 ] return( true ); } 200cb6c: b0 09 20 01 and %g4, 1, %i0 200cb70: 81 c7 e0 08 ret 200cb74: 81 e8 00 00 restore =============================================================================== 02019bb4 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 2019bb4: 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); 2019bb8: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 2019bbc: 7f ff f7 f4 call 2017b8c <.urem> 2019bc0: 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 2019bc4: 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); 2019bc8: 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); 2019bcc: 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; 2019bd0: 80 a2 00 03 cmp %o0, %g3 2019bd4: 0a 80 00 05 bcs 2019be8 <_Heap_Size_of_alloc_area+0x34> 2019bd8: 84 10 20 00 clr %g2 2019bdc: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2019be0: 80 a0 40 08 cmp %g1, %o0 2019be4: 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 ) ) { 2019be8: 80 a0 a0 00 cmp %g2, 0 2019bec: 02 80 00 15 be 2019c40 <_Heap_Size_of_alloc_area+0x8c> 2019bf0: 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; 2019bf4: fa 02 20 04 ld [ %o0 + 4 ], %i5 2019bf8: 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); 2019bfc: 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; 2019c00: 80 a7 40 03 cmp %i5, %g3 2019c04: 0a 80 00 05 bcs 2019c18 <_Heap_Size_of_alloc_area+0x64> <== NEVER TAKEN 2019c08: 84 10 20 00 clr %g2 2019c0c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2019c10: 80 a0 40 1d cmp %g1, %i5 2019c14: 84 60 3f ff subx %g0, -1, %g2 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 2019c18: 80 a0 a0 00 cmp %g2, 0 2019c1c: 02 80 00 09 be 2019c40 <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN 2019c20: 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; 2019c24: c4 07 60 04 ld [ %i5 + 4 ], %g2 !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 2019c28: 80 88 a0 01 btst 1, %g2 2019c2c: 02 80 00 05 be 2019c40 <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN 2019c30: ba 27 40 19 sub %i5, %i1, %i5 return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; 2019c34: 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; 2019c38: ba 07 60 04 add %i5, 4, %i5 2019c3c: fa 26 80 00 st %i5, [ %i2 ] return true; } 2019c40: b0 08 60 01 and %g1, 1, %i0 2019c44: 81 c7 e0 08 ret 2019c48: 81 e8 00 00 restore =============================================================================== 02008148 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 2008148: 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; 200814c: 3b 00 80 20 sethi %hi(0x2008000), %i5 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 2008150: f8 06 20 10 ld [ %i0 + 0x10 ], %i4 uintptr_t const min_block_size = heap->min_block_size; 2008154: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 Heap_Block *const first_block = heap->first_block; 2008158: f6 06 20 20 ld [ %i0 + 0x20 ], %i3 Heap_Block *const last_block = heap->last_block; 200815c: 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; 2008160: 80 a6 a0 00 cmp %i2, 0 2008164: 02 80 00 04 be 2008174 <_Heap_Walk+0x2c> 2008168: ba 17 60 f4 or %i5, 0xf4, %i5 200816c: 3b 00 80 20 sethi %hi(0x2008000), %i5 2008170: ba 17 60 fc or %i5, 0xfc, %i5 ! 20080fc <_Heap_Walk_print> if ( !_System_state_Is_up( _System_state_Get() ) ) { 2008174: 03 00 80 61 sethi %hi(0x2018400), %g1 2008178: c4 00 60 94 ld [ %g1 + 0x94 ], %g2 ! 2018494 <_System_state_Current> 200817c: 80 a0 a0 03 cmp %g2, 3 2008180: 12 80 01 24 bne 2008610 <_Heap_Walk+0x4c8> 2008184: 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)( 2008188: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 200818c: da 06 20 18 ld [ %i0 + 0x18 ], %o5 2008190: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2008194: f6 23 a0 60 st %i3, [ %sp + 0x60 ] 2008198: e2 23 a0 64 st %l1, [ %sp + 0x64 ] 200819c: c2 06 20 08 ld [ %i0 + 8 ], %g1 20081a0: 90 10 00 19 mov %i1, %o0 20081a4: c2 23 a0 68 st %g1, [ %sp + 0x68 ] 20081a8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 20081ac: 92 10 20 00 clr %o1 20081b0: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 20081b4: 15 00 80 56 sethi %hi(0x2015800), %o2 20081b8: 96 10 00 1c mov %i4, %o3 20081bc: 94 12 a0 00 mov %o2, %o2 20081c0: 9f c7 40 00 call %i5 20081c4: 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 ) { 20081c8: 80 a7 20 00 cmp %i4, 0 20081cc: 12 80 00 07 bne 20081e8 <_Heap_Walk+0xa0> 20081d0: 80 8f 20 07 btst 7, %i4 (*printer)( source, true, "page size is zero\n" ); 20081d4: 15 00 80 56 sethi %hi(0x2015800), %o2 20081d8: 90 10 00 19 mov %i1, %o0 20081dc: 92 10 20 01 mov 1, %o1 20081e0: 10 80 00 32 b 20082a8 <_Heap_Walk+0x160> 20081e4: 94 12 a0 98 or %o2, 0x98, %o2 return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 20081e8: 22 80 00 08 be,a 2008208 <_Heap_Walk+0xc0> 20081ec: 90 10 00 10 mov %l0, %o0 (*printer)( 20081f0: 15 00 80 56 sethi %hi(0x2015800), %o2 20081f4: 90 10 00 19 mov %i1, %o0 20081f8: 92 10 20 01 mov 1, %o1 20081fc: 94 12 a0 b0 or %o2, 0xb0, %o2 2008200: 10 80 01 0b b 200862c <_Heap_Walk+0x4e4> 2008204: 96 10 00 1c mov %i4, %o3 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 2008208: 7f ff e6 36 call 2001ae0 <.urem> 200820c: 92 10 00 1c mov %i4, %o1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 2008210: 80 a2 20 00 cmp %o0, 0 2008214: 22 80 00 08 be,a 2008234 <_Heap_Walk+0xec> 2008218: 90 06 e0 08 add %i3, 8, %o0 (*printer)( 200821c: 15 00 80 56 sethi %hi(0x2015800), %o2 2008220: 90 10 00 19 mov %i1, %o0 2008224: 92 10 20 01 mov 1, %o1 2008228: 94 12 a0 d0 or %o2, 0xd0, %o2 200822c: 10 80 01 00 b 200862c <_Heap_Walk+0x4e4> 2008230: 96 10 00 10 mov %l0, %o3 2008234: 7f ff e6 2b call 2001ae0 <.urem> 2008238: 92 10 00 1c mov %i4, %o1 ); return false; } if ( 200823c: 80 a2 20 00 cmp %o0, 0 2008240: 22 80 00 08 be,a 2008260 <_Heap_Walk+0x118> 2008244: c2 06 e0 04 ld [ %i3 + 4 ], %g1 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 2008248: 15 00 80 56 sethi %hi(0x2015800), %o2 200824c: 90 10 00 19 mov %i1, %o0 2008250: 92 10 20 01 mov 1, %o1 2008254: 94 12 a0 f8 or %o2, 0xf8, %o2 2008258: 10 80 00 f5 b 200862c <_Heap_Walk+0x4e4> 200825c: 96 10 00 1b mov %i3, %o3 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 2008260: 80 88 60 01 btst 1, %g1 2008264: 32 80 00 07 bne,a 2008280 <_Heap_Walk+0x138> 2008268: f4 04 60 04 ld [ %l1 + 4 ], %i2 (*printer)( 200826c: 15 00 80 56 sethi %hi(0x2015800), %o2 2008270: 90 10 00 19 mov %i1, %o0 2008274: 92 10 20 01 mov 1, %o1 2008278: 10 80 00 0c b 20082a8 <_Heap_Walk+0x160> 200827c: 94 12 a1 30 or %o2, 0x130, %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; 2008280: 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); 2008284: 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; 2008288: c2 06 a0 04 ld [ %i2 + 4 ], %g1 ); return false; } if ( _Heap_Is_free( last_block ) ) { 200828c: 80 88 60 01 btst 1, %g1 2008290: 12 80 00 0a bne 20082b8 <_Heap_Walk+0x170> 2008294: 80 a6 80 1b cmp %i2, %i3 (*printer)( 2008298: 15 00 80 56 sethi %hi(0x2015800), %o2 200829c: 90 10 00 19 mov %i1, %o0 20082a0: 92 10 20 01 mov 1, %o1 20082a4: 94 12 a1 60 or %o2, 0x160, %o2 20082a8: 9f c7 40 00 call %i5 20082ac: 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; 20082b0: 10 80 00 d8 b 2008610 <_Heap_Walk+0x4c8> 20082b4: 82 10 20 00 clr %g1 ! 0 ); return false; } if ( 20082b8: 02 80 00 06 be 20082d0 <_Heap_Walk+0x188> 20082bc: 15 00 80 56 sethi %hi(0x2015800), %o2 _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 20082c0: 90 10 00 19 mov %i1, %o0 20082c4: 92 10 20 01 mov 1, %o1 20082c8: 10 bf ff f8 b 20082a8 <_Heap_Walk+0x160> 20082cc: 94 12 a1 78 or %o2, 0x178, %o2 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 20082d0: 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; 20082d4: d6 06 20 08 ld [ %i0 + 8 ], %o3 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); 20082d8: 10 80 00 33 b 20083a4 <_Heap_Walk+0x25c> 20082dc: 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; 20082e0: 80 a0 80 0b cmp %g2, %o3 20082e4: 18 80 00 05 bgu 20082f8 <_Heap_Walk+0x1b0> 20082e8: 82 10 20 00 clr %g1 20082ec: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 20082f0: 80 a0 40 0b cmp %g1, %o3 20082f4: 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 ) ) { 20082f8: 80 a0 60 00 cmp %g1, 0 20082fc: 32 80 00 07 bne,a 2008318 <_Heap_Walk+0x1d0> 2008300: 90 02 e0 08 add %o3, 8, %o0 (*printer)( 2008304: 15 00 80 56 sethi %hi(0x2015800), %o2 2008308: 90 10 00 19 mov %i1, %o0 200830c: 92 10 20 01 mov 1, %o1 2008310: 10 80 00 c7 b 200862c <_Heap_Walk+0x4e4> 2008314: 94 12 a1 a8 or %o2, 0x1a8, %o2 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 2008318: d6 27 bf f8 st %o3, [ %fp + -8 ] 200831c: 7f ff e5 f1 call 2001ae0 <.urem> 2008320: 92 10 00 13 mov %l3, %o1 ); return false; } if ( 2008324: 80 a2 20 00 cmp %o0, 0 2008328: 02 80 00 07 be 2008344 <_Heap_Walk+0x1fc> 200832c: d6 07 bf f8 ld [ %fp + -8 ], %o3 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 2008330: 15 00 80 56 sethi %hi(0x2015800), %o2 2008334: 90 10 00 19 mov %i1, %o0 2008338: 92 10 20 01 mov 1, %o1 200833c: 10 80 00 bc b 200862c <_Heap_Walk+0x4e4> 2008340: 94 12 a1 c8 or %o2, 0x1c8, %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; 2008344: c2 02 e0 04 ld [ %o3 + 4 ], %g1 2008348: 82 08 7f fe and %g1, -2, %g1 block = next_block; } while ( block != first_block ); return true; } 200834c: 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; 2008350: c2 00 60 04 ld [ %g1 + 4 ], %g1 ); return false; } if ( _Heap_Is_used( free_block ) ) { 2008354: 80 88 60 01 btst 1, %g1 2008358: 22 80 00 07 be,a 2008374 <_Heap_Walk+0x22c> 200835c: d8 02 e0 0c ld [ %o3 + 0xc ], %o4 (*printer)( 2008360: 15 00 80 56 sethi %hi(0x2015800), %o2 2008364: 90 10 00 19 mov %i1, %o0 2008368: 92 10 20 01 mov 1, %o1 200836c: 10 80 00 b0 b 200862c <_Heap_Walk+0x4e4> 2008370: 94 12 a1 f8 or %o2, 0x1f8, %o2 ); return false; } if ( free_block->prev != prev_block ) { 2008374: 80 a3 00 12 cmp %o4, %l2 2008378: 22 80 00 0a be,a 20083a0 <_Heap_Walk+0x258> 200837c: a4 10 00 0b mov %o3, %l2 (*printer)( 2008380: 15 00 80 56 sethi %hi(0x2015800), %o2 2008384: 90 10 00 19 mov %i1, %o0 2008388: 92 10 20 01 mov 1, %o1 200838c: 94 12 a2 18 or %o2, 0x218, %o2 2008390: 9f c7 40 00 call %i5 2008394: 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; 2008398: 10 80 00 9e b 2008610 <_Heap_Walk+0x4c8> 200839c: 82 10 20 00 clr %g1 ! 0 return false; } prev_block = free_block; free_block = free_block->next; 20083a0: 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 ) { 20083a4: 80 a2 c0 18 cmp %o3, %i0 20083a8: 32 bf ff ce bne,a 20082e0 <_Heap_Walk+0x198> 20083ac: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 20083b0: 2d 00 80 56 sethi %hi(0x2015800), %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)( 20083b4: 2f 00 80 56 sethi %hi(0x2015800), %l7 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 20083b8: ac 15 a3 d8 or %l6, 0x3d8, %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)( 20083bc: ae 15 e3 c0 or %l7, 0x3c0, %l7 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 20083c0: 2b 00 80 56 sethi %hi(0x2015800), %l5 block = next_block; } while ( block != first_block ); return true; } 20083c4: 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; 20083c8: 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; 20083cc: 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); 20083d0: 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; 20083d4: 80 a0 c0 13 cmp %g3, %l3 20083d8: 18 80 00 05 bgu 20083ec <_Heap_Walk+0x2a4> <== NEVER TAKEN 20083dc: 84 10 20 00 clr %g2 20083e0: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 20083e4: 80 a0 80 13 cmp %g2, %l3 20083e8: 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 ) ) { 20083ec: 80 a0 a0 00 cmp %g2, 0 20083f0: 12 80 00 07 bne 200840c <_Heap_Walk+0x2c4> 20083f4: 84 1e 80 11 xor %i2, %l1, %g2 (*printer)( 20083f8: 15 00 80 56 sethi %hi(0x2015800), %o2 20083fc: 90 10 00 19 mov %i1, %o0 2008400: 92 10 20 01 mov 1, %o1 2008404: 10 80 00 2c b 20084b4 <_Heap_Walk+0x36c> 2008408: 94 12 a2 50 or %o2, 0x250, %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; 200840c: 80 a0 00 02 cmp %g0, %g2 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 2008410: c2 27 bf fc st %g1, [ %fp + -4 ] 2008414: a8 40 20 00 addx %g0, 0, %l4 2008418: 90 10 00 12 mov %l2, %o0 200841c: 7f ff e5 b1 call 2001ae0 <.urem> 2008420: 92 10 00 1c mov %i4, %o1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 2008424: 80 a2 20 00 cmp %o0, 0 2008428: 02 80 00 0c be 2008458 <_Heap_Walk+0x310> 200842c: c2 07 bf fc ld [ %fp + -4 ], %g1 2008430: 80 8d 20 ff btst 0xff, %l4 2008434: 02 80 00 0a be 200845c <_Heap_Walk+0x314> 2008438: 80 a4 80 10 cmp %l2, %l0 (*printer)( 200843c: 15 00 80 56 sethi %hi(0x2015800), %o2 2008440: 90 10 00 19 mov %i1, %o0 2008444: 92 10 20 01 mov 1, %o1 2008448: 94 12 a2 80 or %o2, 0x280, %o2 200844c: 96 10 00 1a mov %i2, %o3 2008450: 10 bf ff d0 b 2008390 <_Heap_Walk+0x248> 2008454: 98 10 00 12 mov %l2, %o4 ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 2008458: 80 a4 80 10 cmp %l2, %l0 200845c: 1a 80 00 0d bcc 2008490 <_Heap_Walk+0x348> 2008460: 80 a4 c0 1a cmp %l3, %i2 2008464: 80 8d 20 ff btst 0xff, %l4 2008468: 02 80 00 0a be 2008490 <_Heap_Walk+0x348> <== NEVER TAKEN 200846c: 80 a4 c0 1a cmp %l3, %i2 (*printer)( 2008470: 15 00 80 56 sethi %hi(0x2015800), %o2 2008474: 90 10 00 19 mov %i1, %o0 2008478: 92 10 20 01 mov 1, %o1 200847c: 94 12 a2 b0 or %o2, 0x2b0, %o2 2008480: 96 10 00 1a mov %i2, %o3 2008484: 98 10 00 12 mov %l2, %o4 2008488: 10 80 00 3d b 200857c <_Heap_Walk+0x434> 200848c: 9a 10 00 10 mov %l0, %o5 ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 2008490: 38 80 00 0c bgu,a 20084c0 <_Heap_Walk+0x378> 2008494: a8 08 60 01 and %g1, 1, %l4 2008498: 80 8d 20 ff btst 0xff, %l4 200849c: 02 80 00 09 be 20084c0 <_Heap_Walk+0x378> 20084a0: a8 08 60 01 and %g1, 1, %l4 (*printer)( 20084a4: 15 00 80 56 sethi %hi(0x2015800), %o2 20084a8: 90 10 00 19 mov %i1, %o0 20084ac: 92 10 20 01 mov 1, %o1 20084b0: 94 12 a2 e0 or %o2, 0x2e0, %o2 20084b4: 96 10 00 1a mov %i2, %o3 20084b8: 10 bf ff b6 b 2008390 <_Heap_Walk+0x248> 20084bc: 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; 20084c0: c2 04 e0 04 ld [ %l3 + 4 ], %g1 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 20084c4: 80 88 60 01 btst 1, %g1 20084c8: 12 80 00 40 bne 20085c8 <_Heap_Walk+0x480> 20084cc: 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 ? 20084d0: 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)( 20084d4: c2 06 20 08 ld [ %i0 + 8 ], %g1 20084d8: 05 00 80 55 sethi %hi(0x2015400), %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; 20084dc: c8 06 20 0c ld [ %i0 + 0xc ], %g4 20084e0: 80 a3 40 01 cmp %o5, %g1 20084e4: 02 80 00 07 be 2008500 <_Heap_Walk+0x3b8> 20084e8: 86 10 a3 c0 or %g2, 0x3c0, %g3 block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 20084ec: 80 a3 40 18 cmp %o5, %i0 20084f0: 12 80 00 04 bne 2008500 <_Heap_Walk+0x3b8> 20084f4: 86 15 63 88 or %l5, 0x388, %g3 20084f8: 07 00 80 55 sethi %hi(0x2015400), %g3 20084fc: 86 10 e3 d0 or %g3, 0x3d0, %g3 ! 20157d0 <_Status_Object_name_errors_to_status+0x48> block->next, block->next == last_free_block ? 2008500: 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)( 2008504: 1f 00 80 55 sethi %hi(0x2015400), %o7 2008508: 80 a0 80 04 cmp %g2, %g4 200850c: 02 80 00 07 be 2008528 <_Heap_Walk+0x3e0> 2008510: 82 13 e3 e0 or %o7, 0x3e0, %g1 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 2008514: 80 a0 80 18 cmp %g2, %i0 2008518: 12 80 00 04 bne 2008528 <_Heap_Walk+0x3e0> 200851c: 82 15 63 88 or %l5, 0x388, %g1 2008520: 03 00 80 55 sethi %hi(0x2015400), %g1 2008524: 82 10 63 f0 or %g1, 0x3f0, %g1 ! 20157f0 <_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)( 2008528: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 200852c: c4 23 a0 60 st %g2, [ %sp + 0x60 ] 2008530: c2 23 a0 64 st %g1, [ %sp + 0x64 ] 2008534: 90 10 00 19 mov %i1, %o0 2008538: 92 10 20 00 clr %o1 200853c: 15 00 80 56 sethi %hi(0x2015800), %o2 2008540: 96 10 00 1a mov %i2, %o3 2008544: 94 12 a3 18 or %o2, 0x318, %o2 2008548: 9f c7 40 00 call %i5 200854c: 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 ) { 2008550: da 04 c0 00 ld [ %l3 ], %o5 2008554: 80 a4 80 0d cmp %l2, %o5 2008558: 02 80 00 0d be 200858c <_Heap_Walk+0x444> 200855c: 80 a5 20 00 cmp %l4, 0 (*printer)( 2008560: 15 00 80 56 sethi %hi(0x2015800), %o2 2008564: e6 23 a0 5c st %l3, [ %sp + 0x5c ] 2008568: 90 10 00 19 mov %i1, %o0 200856c: 92 10 20 01 mov 1, %o1 2008570: 94 12 a3 50 or %o2, 0x350, %o2 2008574: 96 10 00 1a mov %i2, %o3 2008578: 98 10 00 12 mov %l2, %o4 200857c: 9f c7 40 00 call %i5 2008580: 01 00 00 00 nop 2008584: 10 80 00 23 b 2008610 <_Heap_Walk+0x4c8> 2008588: 82 10 20 00 clr %g1 ! 0 ); return false; } if ( !prev_used ) { 200858c: 32 80 00 0a bne,a 20085b4 <_Heap_Walk+0x46c> 2008590: c2 06 20 08 ld [ %i0 + 8 ], %g1 (*printer)( 2008594: 15 00 80 56 sethi %hi(0x2015800), %o2 2008598: 90 10 00 19 mov %i1, %o0 200859c: 92 10 20 01 mov 1, %o1 20085a0: 10 80 00 22 b 2008628 <_Heap_Walk+0x4e0> 20085a4: 94 12 a3 90 or %o2, 0x390, %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 ) { 20085a8: 02 80 00 17 be 2008604 <_Heap_Walk+0x4bc> 20085ac: 80 a4 c0 1b cmp %l3, %i3 return true; } free_block = free_block->next; 20085b0: 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 ) { 20085b4: 80 a0 40 18 cmp %g1, %i0 20085b8: 12 bf ff fc bne 20085a8 <_Heap_Walk+0x460> 20085bc: 80 a0 40 1a cmp %g1, %i2 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 20085c0: 10 80 00 17 b 200861c <_Heap_Walk+0x4d4> 20085c4: 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) { 20085c8: 80 a5 20 00 cmp %l4, 0 20085cc: 02 80 00 08 be 20085ec <_Heap_Walk+0x4a4> 20085d0: 92 10 20 00 clr %o1 (*printer)( 20085d4: 94 10 00 17 mov %l7, %o2 20085d8: 96 10 00 1a mov %i2, %o3 20085dc: 9f c7 40 00 call %i5 20085e0: 98 10 00 12 mov %l2, %o4 block->prev_size ); } block = next_block; } while ( block != first_block ); 20085e4: 10 80 00 08 b 2008604 <_Heap_Walk+0x4bc> 20085e8: 80 a4 c0 1b cmp %l3, %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 20085ec: da 06 80 00 ld [ %i2 ], %o5 20085f0: 94 10 00 16 mov %l6, %o2 20085f4: 96 10 00 1a mov %i2, %o3 20085f8: 9f c7 40 00 call %i5 20085fc: 98 10 00 12 mov %l2, %o4 block->prev_size ); } block = next_block; } while ( block != first_block ); 2008600: 80 a4 c0 1b cmp %l3, %i3 2008604: 12 bf ff 70 bne 20083c4 <_Heap_Walk+0x27c> 2008608: b4 10 00 13 mov %l3, %i2 return true; 200860c: 82 10 20 01 mov 1, %g1 } 2008610: b0 08 60 01 and %g1, 1, %i0 2008614: 81 c7 e0 08 ret 2008618: 81 e8 00 00 restore return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 200861c: 90 10 00 19 mov %i1, %o0 2008620: 92 10 20 01 mov 1, %o1 2008624: 94 12 a0 00 mov %o2, %o2 2008628: 96 10 00 1a mov %i2, %o3 200862c: 9f c7 40 00 call %i5 2008630: 01 00 00 00 nop 2008634: 10 bf ff f7 b 2008610 <_Heap_Walk+0x4c8> 2008638: 82 10 20 00 clr %g1 ! 0 =============================================================================== 02007924 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2007924: 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 ) 2007928: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 200792c: 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 ) 2007930: 80 a0 60 00 cmp %g1, 0 2007934: 02 80 00 20 be 20079b4 <_Objects_Allocate+0x90> <== NEVER TAKEN 2007938: 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 ); 200793c: b8 07 60 20 add %i5, 0x20, %i4 2007940: 7f ff fd 87 call 2006f5c <_Chain_Get> 2007944: 90 10 00 1c mov %i4, %o0 if ( information->auto_extend ) { 2007948: c2 0f 60 12 ldub [ %i5 + 0x12 ], %g1 200794c: 80 a0 60 00 cmp %g1, 0 2007950: 02 80 00 19 be 20079b4 <_Objects_Allocate+0x90> 2007954: 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 ) { 2007958: 80 a2 20 00 cmp %o0, 0 200795c: 32 80 00 0a bne,a 2007984 <_Objects_Allocate+0x60> 2007960: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 _Objects_Extend_information( information ); 2007964: 40 00 00 1d call 20079d8 <_Objects_Extend_information> 2007968: 90 10 00 1d mov %i5, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 200796c: 7f ff fd 7c call 2006f5c <_Chain_Get> 2007970: 90 10 00 1c mov %i4, %o0 } if ( the_object ) { 2007974: b0 92 20 00 orcc %o0, 0, %i0 2007978: 02 80 00 0f be 20079b4 <_Objects_Allocate+0x90> 200797c: 01 00 00 00 nop uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 2007980: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 2007984: d0 16 20 0a lduh [ %i0 + 0xa ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 2007988: d2 17 60 14 lduh [ %i5 + 0x14 ], %o1 200798c: 40 00 3f d4 call 20178dc <.udiv> 2007990: 90 22 00 01 sub %o0, %g1, %o0 information->inactive_per_block[ block ]--; 2007994: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 2007998: 91 2a 20 02 sll %o0, 2, %o0 200799c: c4 00 40 08 ld [ %g1 + %o0 ], %g2 20079a0: 84 00 bf ff add %g2, -1, %g2 20079a4: c4 20 40 08 st %g2, [ %g1 + %o0 ] information->inactive--; 20079a8: c2 17 60 2c lduh [ %i5 + 0x2c ], %g1 20079ac: 82 00 7f ff add %g1, -1, %g1 20079b0: c2 37 60 2c sth %g1, [ %i5 + 0x2c ] ); } #endif return the_object; } 20079b4: 81 c7 e0 08 ret 20079b8: 81 e8 00 00 restore =============================================================================== 02007d30 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 2007d30: 9d e3 bf a0 save %sp, -96, %sp Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 2007d34: 80 a6 60 00 cmp %i1, 0 2007d38: 02 80 00 17 be 2007d94 <_Objects_Get_information+0x64> 2007d3c: 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 ); 2007d40: 40 00 13 8e call 200cb78 <_Objects_API_maximum_class> 2007d44: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum == 0 ) 2007d48: 80 a2 20 00 cmp %o0, 0 2007d4c: 02 80 00 12 be 2007d94 <_Objects_Get_information+0x64> 2007d50: 80 a6 40 08 cmp %i1, %o0 return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 2007d54: 18 80 00 10 bgu 2007d94 <_Objects_Get_information+0x64> 2007d58: 03 00 80 72 sethi %hi(0x201c800), %g1 return NULL; if ( !_Objects_Information_table[ the_api ] ) 2007d5c: b1 2e 20 02 sll %i0, 2, %i0 2007d60: 82 10 62 18 or %g1, 0x218, %g1 2007d64: c2 00 40 18 ld [ %g1 + %i0 ], %g1 2007d68: 80 a0 60 00 cmp %g1, 0 2007d6c: 02 80 00 0a be 2007d94 <_Objects_Get_information+0x64> <== NEVER TAKEN 2007d70: b3 2e 60 02 sll %i1, 2, %i1 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 2007d74: fa 00 40 19 ld [ %g1 + %i1 ], %i5 if ( !info ) 2007d78: 80 a7 60 00 cmp %i5, 0 2007d7c: 02 80 00 06 be 2007d94 <_Objects_Get_information+0x64> <== NEVER TAKEN 2007d80: 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 ) 2007d84: c2 17 60 10 lduh [ %i5 + 0x10 ], %g1 return NULL; 2007d88: 80 a0 00 01 cmp %g0, %g1 2007d8c: 82 60 20 00 subx %g0, 0, %g1 2007d90: ba 0f 40 01 and %i5, %g1, %i5 #endif return info; } 2007d94: 81 c7 e0 08 ret 2007d98: 91 e8 00 1d restore %g0, %i5, %o0 =============================================================================== 02008864 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 2008864: 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; 2008868: 92 96 20 00 orcc %i0, 0, %o1 200886c: 12 80 00 06 bne 2008884 <_Objects_Id_to_name+0x20> 2008870: 83 32 60 18 srl %o1, 0x18, %g1 2008874: 03 00 80 78 sethi %hi(0x201e000), %g1 2008878: c2 00 63 d4 ld [ %g1 + 0x3d4 ], %g1 ! 201e3d4 <_Per_CPU_Information+0xc> 200887c: d2 00 60 08 ld [ %g1 + 8 ], %o1 2008880: 83 32 60 18 srl %o1, 0x18, %g1 2008884: 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 ) 2008888: 84 00 7f ff add %g1, -1, %g2 200888c: 80 a0 a0 02 cmp %g2, 2 2008890: 18 80 00 16 bgu 20088e8 <_Objects_Id_to_name+0x84> 2008894: 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 ] ) 2008898: 10 80 00 16 b 20088f0 <_Objects_Id_to_name+0x8c> 200889c: 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 ]; 20088a0: 85 28 a0 02 sll %g2, 2, %g2 20088a4: d0 00 40 02 ld [ %g1 + %g2 ], %o0 if ( !information ) 20088a8: 80 a2 20 00 cmp %o0, 0 20088ac: 02 80 00 0f be 20088e8 <_Objects_Id_to_name+0x84> <== NEVER TAKEN 20088b0: 01 00 00 00 nop return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 20088b4: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 20088b8: 80 a0 60 00 cmp %g1, 0 20088bc: 12 80 00 0b bne 20088e8 <_Objects_Id_to_name+0x84> <== NEVER TAKEN 20088c0: 01 00 00 00 nop return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 20088c4: 7f ff ff ca call 20087ec <_Objects_Get> 20088c8: 94 07 bf fc add %fp, -4, %o2 if ( !the_object ) 20088cc: 80 a2 20 00 cmp %o0, 0 20088d0: 02 80 00 06 be 20088e8 <_Objects_Id_to_name+0x84> 20088d4: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; 20088d8: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 20088dc: 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(); 20088e0: 40 00 03 7e call 20096d8 <_Thread_Enable_dispatch> 20088e4: c2 26 40 00 st %g1, [ %i1 ] return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 20088e8: 81 c7 e0 08 ret 20088ec: 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 ] ) 20088f0: 05 00 80 77 sethi %hi(0x201dc00), %g2 20088f4: 84 10 a1 f8 or %g2, 0x1f8, %g2 ! 201ddf8 <_Objects_Information_table> 20088f8: c2 00 80 01 ld [ %g2 + %g1 ], %g1 20088fc: 80 a0 60 00 cmp %g1, 0 2008900: 12 bf ff e8 bne 20088a0 <_Objects_Id_to_name+0x3c> 2008904: 85 32 60 1b srl %o1, 0x1b, %g2 2008908: 30 bf ff f8 b,a 20088e8 <_Objects_Id_to_name+0x84> =============================================================================== 0200e1bc <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 200e1bc: 9d e3 bf a0 save %sp, -96, %sp Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); 200e1c0: 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; 200e1c4: 39 00 80 73 sethi %hi(0x201cc00), %i4 200e1c8: 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 ]; 200e1cc: b7 2e e0 10 sll %i3, 0x10, %i3 200e1d0: b4 0e a0 07 and %i2, 7, %i2 200e1d4: b7 36 e0 0e srl %i3, 0xe, %i3 200e1d8: b4 06 a0 04 add %i2, 4, %i2 200e1dc: 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; 200e1e0: 82 17 22 c8 or %i4, 0x2c8, %g1 done = true; for ( index = 1 ; index <= max ; ++index ) { 200e1e4: ba 10 20 01 mov 1, %i5 */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; 200e1e8: 84 10 20 01 mov 1, %g2 for ( index = 1 ; index <= max ; ++index ) { 200e1ec: 10 80 00 18 b 200e24c <_POSIX_Keys_Run_destructors+0x90> 200e1f0: f2 10 60 10 lduh [ %g1 + 0x10 ], %i1 POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; 200e1f4: 86 17 22 c8 or %i4, 0x2c8, %g3 Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) 200e1f8: c6 00 e0 1c ld [ %g3 + 0x1c ], %g3 200e1fc: 83 28 60 02 sll %g1, 2, %g1 200e200: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { 200e204: 80 a0 60 00 cmp %g1, 0 200e208: 22 80 00 11 be,a 200e24c <_POSIX_Keys_Run_destructors+0x90> 200e20c: ba 07 60 01 inc %i5 200e210: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 200e214: 80 a0 e0 00 cmp %g3, 0 200e218: 02 80 00 0c be 200e248 <_POSIX_Keys_Run_destructors+0x8c> 200e21c: 86 00 40 1a add %g1, %i2, %g3 void *value = key->Values [ thread_api ][ thread_index ]; 200e220: c6 00 e0 04 ld [ %g3 + 4 ], %g3 200e224: d0 00 c0 1b ld [ %g3 + %i3 ], %o0 if ( value != NULL ) { 200e228: 80 a2 20 00 cmp %o0, 0 200e22c: 22 80 00 08 be,a 200e24c <_POSIX_Keys_Run_destructors+0x90><== ALWAYS TAKEN 200e230: ba 07 60 01 inc %i5 key->Values [ thread_api ][ thread_index ] = NULL; 200e234: c0 20 c0 1b clr [ %g3 + %i3 ] <== NOT EXECUTED (*key->destructor)( value ); 200e238: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 200e23c: 9f c0 40 00 call %g1 <== NOT EXECUTED 200e240: 01 00 00 00 nop <== NOT EXECUTED done = false; 200e244: 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 ) { 200e248: ba 07 60 01 inc %i5 200e24c: 83 2f 60 10 sll %i5, 0x10, %g1 200e250: 83 30 60 10 srl %g1, 0x10, %g1 200e254: 80 a0 40 19 cmp %g1, %i1 200e258: 08 bf ff e7 bleu 200e1f4 <_POSIX_Keys_Run_destructors+0x38> 200e25c: 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 ) { 200e260: 02 bf ff e1 be 200e1e4 <_POSIX_Keys_Run_destructors+0x28> <== NEVER TAKEN 200e264: 82 17 22 c8 or %i4, 0x2c8, %g1 done = false; } } } } } 200e268: 81 c7 e0 08 ret 200e26c: 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 9c or %o0, 0x9c, %o0 200b464: 40 00 0c a8 call 200e704 <_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 3f bne 200b570 <_POSIX_Message_queue_Receive_support+0x11c> 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 4d call 200f5c4 <_Thread_Enable_dispatch> 200b494: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); 200b498: 40 00 2a 06 call 2015cb0 <__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 43 call 200f5c4 <_Thread_Enable_dispatch> 200b4bc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EMSGSIZE ); 200b4c0: 40 00 29 fc call 2015cb0 <__errno> 200b4c4: 01 00 00 00 nop 200b4c8: 82 10 20 7a mov 0x7a, %g1 ! 7a 200b4cc: 10 80 00 27 b 200b568 <_POSIX_Message_queue_Receive_support+0x114> 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><== NEVER TAKEN 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: 9a 10 00 1d mov %i5, %o5 200b4f8: 90 02 20 1c add %o0, 0x1c, %o0 200b4fc: 92 10 00 18 mov %i0, %o1 200b500: 94 10 00 19 mov %i1, %o2 200b504: 96 07 bf fc add %fp, -4, %o3 200b508: 40 00 08 53 call 200d654 <_CORE_message_queue_Seize> 200b50c: 98 0b 20 01 and %o4, 1, %o4 &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 200b510: 40 00 10 2d call 200f5c4 <_Thread_Enable_dispatch> 200b514: 3b 00 80 9c sethi %hi(0x2027000), %i5 *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 200b518: ba 17 61 08 or %i5, 0x108, %i5 ! 2027108 <_Per_CPU_Information> 200b51c: c2 07 60 0c ld [ %i5 + 0xc ], %g1 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); 200b520: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 if ( !_Thread_Executing->Wait.return_code ) 200b524: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 200b528: 85 38 e0 1f sra %g3, 0x1f, %g2 200b52c: 86 18 80 03 xor %g2, %g3, %g3 200b530: 84 20 c0 02 sub %g3, %g2, %g2 200b534: 80 a0 60 00 cmp %g1, 0 200b538: 12 80 00 05 bne 200b54c <_POSIX_Message_queue_Receive_support+0xf8> 200b53c: c4 26 c0 00 st %g2, [ %i3 ] return length_out; 200b540: f0 07 bf fc ld [ %fp + -4 ], %i0 200b544: 81 c7 e0 08 ret 200b548: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( 200b54c: 40 00 29 d9 call 2015cb0 <__errno> 200b550: 01 00 00 00 nop 200b554: c2 07 60 0c ld [ %i5 + 0xc ], %g1 200b558: b8 10 00 08 mov %o0, %i4 200b55c: 40 00 00 9b call 200b7c8 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 200b560: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 200b564: d0 27 00 00 st %o0, [ %i4 ] 200b568: 81 c7 e0 08 ret 200b56c: 91 e8 3f ff restore %g0, -1, %o0 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 200b570: 40 00 29 d0 call 2015cb0 <__errno> 200b574: b0 10 3f ff mov -1, %i0 200b578: 82 10 20 09 mov 9, %g1 200b57c: c2 22 00 00 st %g1, [ %o0 ] } 200b580: 81 c7 e0 08 ret 200b584: 81 e8 00 00 restore =============================================================================== 0200b6d4 <_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 ]; 200b6d4: c2 02 21 5c ld [ %o0 + 0x15c ], %g1 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 200b6d8: c4 00 60 d8 ld [ %g1 + 0xd8 ], %g2 200b6dc: 80 a0 a0 00 cmp %g2, 0 200b6e0: 12 80 00 13 bne 200b72c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x58><== NEVER TAKEN 200b6e4: 01 00 00 00 nop 200b6e8: c4 00 60 dc ld [ %g1 + 0xdc ], %g2 200b6ec: 80 a0 a0 01 cmp %g2, 1 200b6f0: 12 80 00 0f bne 200b72c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x58> 200b6f4: 01 00 00 00 nop thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 200b6f8: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1 200b6fc: 80 a0 60 00 cmp %g1, 0 200b700: 02 80 00 0b be 200b72c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x58> 200b704: 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--; 200b708: 03 00 80 5c sethi %hi(0x2017000), %g1 200b70c: c4 00 61 20 ld [ %g1 + 0x120 ], %g2 ! 2017120 <_Thread_Dispatch_disable_level> thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 200b710: 92 10 3f ff mov -1, %o1 200b714: 84 00 bf ff add %g2, -1, %g2 200b718: c4 20 61 20 st %g2, [ %g1 + 0x120 ] return _Thread_Dispatch_disable_level; 200b71c: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 200b720: 82 13 c0 00 mov %o7, %g1 200b724: 40 00 01 b6 call 200bdfc <_POSIX_Thread_Exit> 200b728: 9e 10 40 00 mov %g1, %o7 } else _Thread_Enable_dispatch(); 200b72c: 82 13 c0 00 mov %o7, %g1 200b730: 7f ff f4 dd call 2008aa4 <_Thread_Enable_dispatch> 200b734: 9e 10 40 00 mov %g1, %o7 =============================================================================== 0200ca90 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 200ca90: 9d e3 bf a0 save %sp, -96, %sp if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 200ca94: d0 06 40 00 ld [ %i1 ], %o0 200ca98: 7f ff ff f3 call 200ca64 <_POSIX_Priority_Is_valid> 200ca9c: ba 10 00 18 mov %i0, %i5 200caa0: 80 8a 20 ff btst 0xff, %o0 200caa4: 02 80 00 11 be 200cae8 <_POSIX_Thread_Translate_sched_param+0x58><== NEVER TAKEN 200caa8: b0 10 20 16 mov 0x16, %i0 return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 200caac: c0 26 80 00 clr [ %i2 ] *budget_callout = NULL; if ( policy == SCHED_OTHER ) { 200cab0: 80 a7 60 00 cmp %i5, 0 200cab4: 12 80 00 06 bne 200cacc <_POSIX_Thread_Translate_sched_param+0x3c> 200cab8: c0 26 c0 00 clr [ %i3 ] *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 200cabc: 82 10 20 01 mov 1, %g1 200cac0: c2 26 80 00 st %g1, [ %i2 ] return 0; 200cac4: 81 c7 e0 08 ret 200cac8: 91 e8 20 00 restore %g0, 0, %o0 } if ( policy == SCHED_FIFO ) { 200cacc: 80 a7 60 01 cmp %i5, 1 200cad0: 02 80 00 06 be 200cae8 <_POSIX_Thread_Translate_sched_param+0x58> 200cad4: b0 10 20 00 clr %i0 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 200cad8: 80 a7 60 02 cmp %i5, 2 200cadc: 32 80 00 05 bne,a 200caf0 <_POSIX_Thread_Translate_sched_param+0x60> 200cae0: 80 a7 60 04 cmp %i5, 4 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 200cae4: fa 26 80 00 st %i5, [ %i2 ] return 0; 200cae8: 81 c7 e0 08 ret 200caec: 81 e8 00 00 restore } if ( policy == SCHED_SPORADIC ) { 200caf0: 12 bf ff fe bne 200cae8 <_POSIX_Thread_Translate_sched_param+0x58> 200caf4: b0 10 20 16 mov 0x16, %i0 if ( (param->sched_ss_repl_period.tv_sec == 0) && 200caf8: c2 06 60 08 ld [ %i1 + 8 ], %g1 200cafc: 80 a0 60 00 cmp %g1, 0 200cb00: 32 80 00 07 bne,a 200cb1c <_POSIX_Thread_Translate_sched_param+0x8c> 200cb04: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 200cb08: c2 06 60 0c ld [ %i1 + 0xc ], %g1 200cb0c: 80 a0 60 00 cmp %g1, 0 200cb10: 02 80 00 1d be 200cb84 <_POSIX_Thread_Translate_sched_param+0xf4> 200cb14: 01 00 00 00 nop (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 200cb18: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 200cb1c: 80 a0 60 00 cmp %g1, 0 200cb20: 12 80 00 06 bne 200cb38 <_POSIX_Thread_Translate_sched_param+0xa8> 200cb24: 01 00 00 00 nop 200cb28: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 200cb2c: 80 a0 60 00 cmp %g1, 0 200cb30: 02 bf ff ee be 200cae8 <_POSIX_Thread_Translate_sched_param+0x58> 200cb34: 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 ) < 200cb38: 7f ff f6 23 call 200a3c4 <_Timespec_To_ticks> 200cb3c: 90 06 60 08 add %i1, 8, %o0 _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; 200cb40: 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 ) < 200cb44: ba 10 00 08 mov %o0, %i5 _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) 200cb48: 7f ff f6 1f call 200a3c4 <_Timespec_To_ticks> 200cb4c: 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 ) < 200cb50: 80 a7 40 08 cmp %i5, %o0 200cb54: 0a 80 00 0c bcs 200cb84 <_POSIX_Thread_Translate_sched_param+0xf4> 200cb58: 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 ) ) 200cb5c: 7f ff ff c2 call 200ca64 <_POSIX_Priority_Is_valid> 200cb60: d0 06 60 04 ld [ %i1 + 4 ], %o0 200cb64: 80 8a 20 ff btst 0xff, %o0 200cb68: 02 bf ff e0 be 200cae8 <_POSIX_Thread_Translate_sched_param+0x58> 200cb6c: 82 10 20 03 mov 3, %g1 return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 200cb70: c2 26 80 00 st %g1, [ %i2 ] *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; 200cb74: 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; 200cb78: 03 00 80 19 sethi %hi(0x2006400), %g1 200cb7c: 82 10 62 f0 or %g1, 0x2f0, %g1 ! 20066f0 <_POSIX_Threads_Sporadic_budget_callout> 200cb80: c2 26 c0 00 st %g1, [ %i3 ] return 0; } return EINVAL; } 200cb84: 81 c7 e0 08 ret 200cb88: 81 e8 00 00 restore =============================================================================== 0200bde0 <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 200bde0: 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 ]; 200bde4: f0 06 61 5c ld [ %i1 + 0x15c ], %i0 /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 200bde8: 40 00 08 db call 200e154 <_POSIX_Threads_cancel_run> 200bdec: 90 10 00 19 mov %i1, %o0 /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 200bdf0: 90 10 00 19 mov %i1, %o0 200bdf4: 40 00 08 f2 call 200e1bc <_POSIX_Keys_Run_destructors> 200bdf8: 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 )) ) 200bdfc: 10 80 00 03 b 200be08 <_POSIX_Threads_Delete_extension+0x28> 200be00: f8 06 60 28 ld [ %i1 + 0x28 ], %i4 *(void **)the_thread->Wait.return_argument = value_ptr; 200be04: 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 )) ) 200be08: 7f ff f4 9b call 2009074 <_Thread_queue_Dequeue> 200be0c: 90 10 00 1d mov %i5, %o0 200be10: 80 a2 20 00 cmp %o0, 0 200be14: 32 bf ff fc bne,a 200be04 <_POSIX_Threads_Delete_extension+0x24><== NEVER TAKEN 200be18: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 200be1c: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 200be20: 80 a0 60 04 cmp %g1, 4 200be24: 32 80 00 05 bne,a 200be38 <_POSIX_Threads_Delete_extension+0x58> 200be28: c0 26 61 5c clr [ %i1 + 0x15c ] (void) _Watchdog_Remove( &api->Sporadic_timer ); 200be2c: 7f ff f7 85 call 2009c40 <_Watchdog_Remove> 200be30: 90 06 20 a8 add %i0, 0xa8, %o0 deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 200be34: c0 26 61 5c clr [ %i1 + 0x15c ] _Workspace_Free( api ); 200be38: 7f ff f7 f4 call 2009e08 <_Workspace_Free> 200be3c: 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 64 or %g1, 0x364, %g1 ! 201c764 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 ca call 200cb8c 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 d3 call 200cbbc 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 df call 200cbf8 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 f0 call 2008468 <_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 =============================================================================== 0200bf50 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 200bf50: 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 ]; 200bf54: 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 ); 200bf58: 40 00 03 c9 call 200ce7c <_Timespec_To_ticks> 200bf5c: 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); 200bf60: 03 00 80 6f sethi %hi(0x201bc00), %g1 200bf64: d2 08 61 8c ldub [ %g1 + 0x18c ], %o1 ! 201bd8c 200bf68: c2 07 60 88 ld [ %i5 + 0x88 ], %g1 the_thread->cpu_time_budget = ticks; 200bf6c: d0 26 60 78 st %o0, [ %i1 + 0x78 ] 200bf70: 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 ) { 200bf74: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 200bf78: 80 a0 60 00 cmp %g1, 0 200bf7c: 12 80 00 08 bne 200bf9c <_POSIX_Threads_Sporadic_budget_TSR+0x4c><== NEVER TAKEN 200bf80: 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 ) { 200bf84: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 200bf88: 80 a0 40 09 cmp %g1, %o1 200bf8c: 08 80 00 04 bleu 200bf9c <_POSIX_Threads_Sporadic_budget_TSR+0x4c> 200bf90: 90 10 00 19 mov %i1, %o0 _Thread_Change_priority( the_thread, new_priority, true ); 200bf94: 7f ff f2 37 call 2008870 <_Thread_Change_priority> 200bf98: 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 ); 200bf9c: 40 00 03 b8 call 200ce7c <_Timespec_To_ticks> 200bfa0: 90 07 60 90 add %i5, 0x90, %o0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200bfa4: 31 00 80 72 sethi %hi(0x201c800), %i0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200bfa8: d0 27 60 b4 st %o0, [ %i5 + 0xb4 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200bfac: b0 16 23 6c or %i0, 0x36c, %i0 200bfb0: 7f ff f6 ca call 2009ad8 <_Watchdog_Insert> 200bfb4: 93 ef 60 a8 restore %i5, 0xa8, %o1 =============================================================================== 0200bfb8 <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200bfb8: 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 */ 200bfbc: 86 10 3f ff mov -1, %g3 200bfc0: c4 00 a0 8c ld [ %g2 + 0x8c ], %g2 200bfc4: c6 22 20 78 st %g3, [ %o0 + 0x78 ] 200bfc8: 07 00 80 6f sethi %hi(0x201bc00), %g3 200bfcc: d2 08 e1 8c ldub [ %g3 + 0x18c ], %o1 ! 201bd8c 200bfd0: 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 ) { 200bfd4: c4 02 20 1c ld [ %o0 + 0x1c ], %g2 200bfd8: 80 a0 a0 00 cmp %g2, 0 200bfdc: 12 80 00 09 bne 200c000 <_POSIX_Threads_Sporadic_budget_callout+0x48><== NEVER TAKEN 200bfe0: 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 ) { 200bfe4: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 200bfe8: 80 a0 40 09 cmp %g1, %o1 200bfec: 1a 80 00 05 bcc 200c000 <_POSIX_Threads_Sporadic_budget_callout+0x48><== NEVER TAKEN 200bff0: 94 10 20 01 mov 1, %o2 _Thread_Change_priority( the_thread, new_priority, true ); 200bff4: 82 13 c0 00 mov %o7, %g1 200bff8: 7f ff f2 1e call 2008870 <_Thread_Change_priority> 200bffc: 9e 10 40 00 mov %g1, %o7 200c000: 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 75 call 200c780 <_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 bd call 20078b4 <_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 58 call 200c334 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 =============================================================================== 0200e270 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 200e270: 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, 200e274: 98 10 20 01 mov 1, %o4 200e278: 90 10 00 18 mov %i0, %o0 200e27c: 92 10 00 19 mov %i1, %o1 200e280: 94 07 bf f4 add %fp, -12, %o2 200e284: 40 00 00 2e call 200e33c <_POSIX_signals_Clear_signals> 200e288: 96 10 00 1a mov %i2, %o3 200e28c: 80 8a 20 ff btst 0xff, %o0 200e290: 02 80 00 28 be 200e330 <_POSIX_signals_Check_signal+0xc0> 200e294: 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 ) 200e298: 85 2e 60 02 sll %i1, 2, %g2 200e29c: 35 00 80 74 sethi %hi(0x201d000), %i2 200e2a0: b7 2e 60 04 sll %i1, 4, %i3 200e2a4: b4 16 a0 40 or %i2, 0x40, %i2 200e2a8: b6 26 c0 02 sub %i3, %g2, %i3 200e2ac: 84 06 80 1b add %i2, %i3, %g2 200e2b0: fa 00 a0 08 ld [ %g2 + 8 ], %i5 200e2b4: 80 a7 60 01 cmp %i5, 1 200e2b8: 02 80 00 1e be 200e330 <_POSIX_signals_Check_signal+0xc0> <== NEVER TAKEN 200e2bc: 90 07 bf cc add %fp, -52, %o0 return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 200e2c0: f8 06 20 d0 ld [ %i0 + 0xd0 ], %i4 api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 200e2c4: c2 00 a0 04 ld [ %g2 + 4 ], %g1 200e2c8: 82 10 40 1c or %g1, %i4, %g1 200e2cc: 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, 200e2d0: 03 00 80 73 sethi %hi(0x201cc00), %g1 200e2d4: d2 00 63 f4 ld [ %g1 + 0x3f4 ], %o1 ! 201cff4 <_Per_CPU_Information+0xc> 200e2d8: 94 10 20 28 mov 0x28, %o2 200e2dc: 40 00 04 62 call 200f464 200e2e0: 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 ) { 200e2e4: c2 06 80 1b ld [ %i2 + %i3 ], %g1 200e2e8: 80 a0 60 02 cmp %g1, 2 200e2ec: 12 80 00 07 bne 200e308 <_POSIX_signals_Check_signal+0x98> 200e2f0: 90 10 00 19 mov %i1, %o0 case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 200e2f4: 92 07 bf f4 add %fp, -12, %o1 200e2f8: 9f c7 40 00 call %i5 200e2fc: 94 10 20 00 clr %o2 signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; 200e300: 10 80 00 05 b 200e314 <_POSIX_signals_Check_signal+0xa4> 200e304: 03 00 80 73 sethi %hi(0x201cc00), %g1 default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 200e308: 9f c7 40 00 call %i5 200e30c: 01 00 00 00 nop } /* * Restore the blocking information */ memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information, 200e310: 03 00 80 73 sethi %hi(0x201cc00), %g1 200e314: d0 00 63 f4 ld [ %g1 + 0x3f4 ], %o0 ! 201cff4 <_Per_CPU_Information+0xc> 200e318: 92 07 bf cc add %fp, -52, %o1 200e31c: 90 02 20 20 add %o0, 0x20, %o0 200e320: 40 00 04 51 call 200f464 200e324: 94 10 20 28 mov 0x28, %o2 /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; 200e328: 82 10 20 01 mov 1, %g1 sizeof( Thread_Wait_information )); /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 200e32c: f8 26 20 d0 st %i4, [ %i0 + 0xd0 ] return true; } 200e330: b0 08 60 01 and %g1, 1, %i0 200e334: 81 c7 e0 08 ret 200e338: 81 e8 00 00 restore =============================================================================== 0200ea50 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 200ea50: 9d e3 bf a0 save %sp, -96, %sp clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 200ea54: 7f ff cd ca call 200217c 200ea58: 01 00 00 00 nop if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 200ea5c: 85 2e 20 04 sll %i0, 4, %g2 200ea60: 83 2e 20 02 sll %i0, 2, %g1 200ea64: 82 20 80 01 sub %g2, %g1, %g1 200ea68: 05 00 80 74 sethi %hi(0x201d000), %g2 200ea6c: 84 10 a0 40 or %g2, 0x40, %g2 ! 201d040 <_POSIX_signals_Vectors> 200ea70: c4 00 80 01 ld [ %g2 + %g1 ], %g2 200ea74: 80 a0 a0 02 cmp %g2, 2 200ea78: 12 80 00 0a bne 200eaa0 <_POSIX_signals_Clear_process_signals+0x50> 200ea7c: 84 10 20 01 mov 1, %g2 if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 200ea80: 05 00 80 74 sethi %hi(0x201d000), %g2 200ea84: 84 10 a2 38 or %g2, 0x238, %g2 ! 201d238 <_POSIX_signals_Siginfo> 200ea88: 86 00 40 02 add %g1, %g2, %g3 200ea8c: 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 ); 200ea90: 86 00 e0 04 add %g3, 4, %g3 200ea94: 80 a0 40 03 cmp %g1, %g3 200ea98: 12 80 00 08 bne 200eab8 <_POSIX_signals_Clear_process_signals+0x68><== NEVER TAKEN 200ea9c: 84 10 20 01 mov 1, %g2 clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 200eaa0: 03 00 80 74 sethi %hi(0x201d000), %g1 200eaa4: b0 06 3f ff add %i0, -1, %i0 200eaa8: b1 28 80 18 sll %g2, %i0, %i0 200eaac: c4 00 62 34 ld [ %g1 + 0x234 ], %g2 200eab0: b0 28 80 18 andn %g2, %i0, %i0 200eab4: f0 20 62 34 st %i0, [ %g1 + 0x234 ] } _ISR_Enable( level ); 200eab8: 7f ff cd b5 call 200218c 200eabc: 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 =============================================================================== 020197d8 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 20197d8: 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 ) ) { 20197dc: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 20197e0: 3b 04 00 20 sethi %hi(0x10008000), %i5 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 20197e4: 84 06 7f ff add %i1, -1, %g2 20197e8: 86 10 20 01 mov 1, %g3 20197ec: 9e 08 40 1d and %g1, %i5, %o7 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 20197f0: 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 ]; 20197f4: 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 ) ) { 20197f8: 80 a3 c0 1d cmp %o7, %i5 20197fc: 12 80 00 1c bne 201986c <_POSIX_signals_Unblock_thread+0x94> 2019800: 85 28 c0 02 sll %g3, %g2, %g2 if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 2019804: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2019808: 80 88 80 01 btst %g2, %g1 201980c: 12 80 00 07 bne 2019828 <_POSIX_signals_Unblock_thread+0x50> 2019810: 82 10 20 04 mov 4, %g1 2019814: c2 01 20 d0 ld [ %g4 + 0xd0 ], %g1 2019818: 80 a8 80 01 andncc %g2, %g1, %g0 201981c: 02 80 00 3f be 2019918 <_POSIX_signals_Unblock_thread+0x140> 2019820: ba 10 20 00 clr %i5 the_thread->Wait.return_code = EINTR; 2019824: 82 10 20 04 mov 4, %g1 2019828: c2 26 20 34 st %g1, [ %i0 + 0x34 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 201982c: 80 a2 60 00 cmp %o1, 0 2019830: 12 80 00 07 bne 201984c <_POSIX_signals_Unblock_thread+0x74> 2019834: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 the_info->si_signo = signo; the_info->si_code = SI_USER; 2019838: 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; 201983c: f2 22 00 00 st %i1, [ %o0 ] the_info->si_code = SI_USER; 2019840: c2 22 20 04 st %g1, [ %o0 + 4 ] the_info->si_value.sival_int = 0; 2019844: 10 80 00 04 b 2019854 <_POSIX_signals_Unblock_thread+0x7c> 2019848: c0 22 20 08 clr [ %o0 + 8 ] } else { *the_info = *info; 201984c: 7f ff d7 06 call 200f464 2019850: 94 10 20 0c mov 0xc, %o2 } _Thread_queue_Extract_with_proxy( the_thread ); 2019854: 90 10 00 18 mov %i0, %o0 2019858: 7f ff be f4 call 2009428 <_Thread_queue_Extract_with_proxy> 201985c: ba 10 20 01 mov 1, %i5 2019860: b0 0f 60 01 and %i5, 1, %i0 2019864: 81 c7 e0 08 ret 2019868: 81 e8 00 00 restore } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 201986c: c8 01 20 d0 ld [ %g4 + 0xd0 ], %g4 2019870: 80 a8 80 04 andncc %g2, %g4, %g0 2019874: 02 80 00 29 be 2019918 <_POSIX_signals_Unblock_thread+0x140> 2019878: 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 ) ) { 201987c: 05 04 00 00 sethi %hi(0x10000000), %g2 2019880: 80 88 40 02 btst %g1, %g2 2019884: 02 80 00 19 be 20198e8 <_POSIX_signals_Unblock_thread+0x110> 2019888: 80 a0 60 00 cmp %g1, 0 the_thread->Wait.return_code = EINTR; 201988c: 84 10 20 04 mov 4, %g2 2019890: 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) ) 2019894: 05 00 00 ef sethi %hi(0x3bc00), %g2 2019898: 84 10 a2 e0 or %g2, 0x2e0, %g2 ! 3bee0 201989c: 80 88 40 02 btst %g1, %g2 20198a0: 02 80 00 07 be 20198bc <_POSIX_signals_Unblock_thread+0xe4> 20198a4: 80 88 60 08 btst 8, %g1 _Thread_queue_Extract_with_proxy( the_thread ); 20198a8: 7f ff be e0 call 2009428 <_Thread_queue_Extract_with_proxy> 20198ac: 90 10 00 18 mov %i0, %o0 20198b0: b0 0f 60 01 and %i5, 1, %i0 20198b4: 81 c7 e0 08 ret 20198b8: 81 e8 00 00 restore else if ( _States_Is_delaying(the_thread->current_state) ) { 20198bc: 22 80 00 18 be,a 201991c <_POSIX_signals_Unblock_thread+0x144><== NEVER TAKEN 20198c0: b0 0f 60 01 and %i5, 1, %i0 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 20198c4: 7f ff c0 df call 2009c40 <_Watchdog_Remove> 20198c8: 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 ); 20198cc: 90 10 00 18 mov %i0, %o0 20198d0: 13 04 00 ff sethi %hi(0x1003fc00), %o1 20198d4: 7f ff bc 2d call 2008988 <_Thread_Clear_state> 20198d8: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 20198dc: b0 0f 60 01 and %i5, 1, %i0 20198e0: 81 c7 e0 08 ret 20198e4: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 20198e8: 32 80 00 0d bne,a 201991c <_POSIX_signals_Unblock_thread+0x144><== NEVER TAKEN 20198ec: b0 0f 60 01 and %i5, 1, %i0 <== NOT EXECUTED if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 20198f0: 03 00 80 73 sethi %hi(0x201cc00), %g1 20198f4: 82 10 63 e8 or %g1, 0x3e8, %g1 ! 201cfe8 <_Per_CPU_Information> 20198f8: c4 00 60 08 ld [ %g1 + 8 ], %g2 20198fc: 80 a0 a0 00 cmp %g2, 0 2019900: 22 80 00 07 be,a 201991c <_POSIX_signals_Unblock_thread+0x144> 2019904: b0 0f 60 01 and %i5, 1, %i0 2019908: c4 00 60 0c ld [ %g1 + 0xc ], %g2 201990c: 80 a6 00 02 cmp %i0, %g2 2019910: 22 80 00 02 be,a 2019918 <_POSIX_signals_Unblock_thread+0x140><== ALWAYS TAKEN 2019914: c6 28 60 18 stb %g3, [ %g1 + 0x18 ] _Thread_Dispatch_necessary = true; } } return false; } 2019918: b0 0f 60 01 and %i5, 1, %i0 201991c: 81 c7 e0 08 ret 2019920: 81 e8 00 00 restore =============================================================================== 02008e48 <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 2008e48: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; 2008e4c: 80 a6 60 00 cmp %i1, 0 2008e50: 02 80 00 73 be 200901c <_RBTree_Extract_unprotected+0x1d4> 2008e54: 01 00 00 00 nop /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { 2008e58: c2 06 20 08 ld [ %i0 + 8 ], %g1 2008e5c: 80 a6 40 01 cmp %i1, %g1 2008e60: 32 80 00 0d bne,a 2008e94 <_RBTree_Extract_unprotected+0x4c> 2008e64: c2 06 20 0c ld [ %i0 + 0xc ], %g1 if (the_node->child[RBT_RIGHT]) 2008e68: c2 06 60 08 ld [ %i1 + 8 ], %g1 2008e6c: 80 a0 60 00 cmp %g1, 0 2008e70: 22 80 00 04 be,a 2008e80 <_RBTree_Extract_unprotected+0x38> 2008e74: c2 06 40 00 ld [ %i1 ], %g1 the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; 2008e78: 10 80 00 06 b 2008e90 <_RBTree_Extract_unprotected+0x48> 2008e7c: 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, 2008e80: 80 a6 00 01 cmp %i0, %g1 2008e84: 12 80 00 03 bne 2008e90 <_RBTree_Extract_unprotected+0x48> 2008e88: c2 26 20 08 st %g1, [ %i0 + 8 ] the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; 2008e8c: 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]) { 2008e90: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2008e94: 80 a6 40 01 cmp %i1, %g1 2008e98: 12 80 00 0b bne 2008ec4 <_RBTree_Extract_unprotected+0x7c> 2008e9c: c2 06 60 04 ld [ %i1 + 4 ], %g1 if (the_node->child[RBT_LEFT]) 2008ea0: 80 a0 60 00 cmp %g1, 0 2008ea4: 22 80 00 04 be,a 2008eb4 <_RBTree_Extract_unprotected+0x6c> 2008ea8: c4 06 40 00 ld [ %i1 ], %g2 the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; 2008eac: 10 80 00 06 b 2008ec4 <_RBTree_Extract_unprotected+0x7c> 2008eb0: 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, 2008eb4: 80 a6 00 02 cmp %i0, %g2 2008eb8: 12 80 00 03 bne 2008ec4 <_RBTree_Extract_unprotected+0x7c> 2008ebc: c4 26 20 0c st %g2, [ %i0 + 0xc ] the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; 2008ec0: 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]) { 2008ec4: ba 90 60 00 orcc %g1, 0, %i5 2008ec8: 02 80 00 36 be 2008fa0 <_RBTree_Extract_unprotected+0x158> 2008ecc: f8 06 60 08 ld [ %i1 + 8 ], %i4 2008ed0: 80 a7 20 00 cmp %i4, 0 2008ed4: 32 80 00 05 bne,a 2008ee8 <_RBTree_Extract_unprotected+0xa0> 2008ed8: c2 07 60 08 ld [ %i5 + 8 ], %g1 2008edc: 10 80 00 35 b 2008fb0 <_RBTree_Extract_unprotected+0x168> 2008ee0: 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]; 2008ee4: c2 07 60 08 ld [ %i5 + 8 ], %g1 2008ee8: 80 a0 60 00 cmp %g1, 0 2008eec: 32 bf ff fe bne,a 2008ee4 <_RBTree_Extract_unprotected+0x9c> 2008ef0: 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]; 2008ef4: f8 07 60 04 ld [ %i5 + 4 ], %i4 if(leaf) { 2008ef8: 80 a7 20 00 cmp %i4, 0 2008efc: 02 80 00 05 be 2008f10 <_RBTree_Extract_unprotected+0xc8> 2008f00: 01 00 00 00 nop leaf->parent = target->parent; 2008f04: c2 07 40 00 ld [ %i5 ], %g1 2008f08: 10 80 00 04 b 2008f18 <_RBTree_Extract_unprotected+0xd0> 2008f0c: c2 27 00 00 st %g1, [ %i4 ] } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); 2008f10: 7f ff ff 53 call 2008c5c <_RBTree_Extract_validate_unprotected> 2008f14: 90 10 00 1d mov %i5, %o0 } victim_color = target->color; dir = target != target->parent->child[0]; 2008f18: 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; 2008f1c: c2 07 60 0c ld [ %i5 + 0xc ], %g1 dir = target != target->parent->child[0]; 2008f20: c6 00 a0 04 ld [ %g2 + 4 ], %g3 2008f24: 86 1f 40 03 xor %i5, %g3, %g3 2008f28: 80 a0 00 03 cmp %g0, %g3 2008f2c: 86 40 20 00 addx %g0, 0, %g3 target->parent->child[dir] = leaf; 2008f30: 87 28 e0 02 sll %g3, 2, %g3 2008f34: 84 00 80 03 add %g2, %g3, %g2 2008f38: f8 20 a0 04 st %i4, [ %g2 + 4 ] /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 2008f3c: c4 06 40 00 ld [ %i1 ], %g2 2008f40: c6 00 a0 04 ld [ %g2 + 4 ], %g3 2008f44: 86 1e 40 03 xor %i1, %g3, %g3 2008f48: 80 a0 00 03 cmp %g0, %g3 2008f4c: 86 40 20 00 addx %g0, 0, %g3 the_node->parent->child[dir] = target; 2008f50: 87 28 e0 02 sll %g3, 2, %g3 2008f54: 84 00 80 03 add %g2, %g3, %g2 2008f58: 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]; 2008f5c: c4 06 60 08 ld [ %i1 + 8 ], %g2 2008f60: c4 27 60 08 st %g2, [ %i5 + 8 ] if (the_node->child[RBT_RIGHT]) 2008f64: c4 06 60 08 ld [ %i1 + 8 ], %g2 2008f68: 80 a0 a0 00 cmp %g2, 0 2008f6c: 32 80 00 02 bne,a 2008f74 <_RBTree_Extract_unprotected+0x12c><== ALWAYS TAKEN 2008f70: fa 20 80 00 st %i5, [ %g2 ] the_node->child[RBT_RIGHT]->parent = target; target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; 2008f74: c4 06 60 04 ld [ %i1 + 4 ], %g2 2008f78: c4 27 60 04 st %g2, [ %i5 + 4 ] if (the_node->child[RBT_LEFT]) 2008f7c: c4 06 60 04 ld [ %i1 + 4 ], %g2 2008f80: 80 a0 a0 00 cmp %g2, 0 2008f84: 32 80 00 02 bne,a 2008f8c <_RBTree_Extract_unprotected+0x144> 2008f88: 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; 2008f8c: c4 06 40 00 ld [ %i1 ], %g2 2008f90: c4 27 40 00 st %g2, [ %i5 ] target->color = the_node->color; 2008f94: c4 06 60 0c ld [ %i1 + 0xc ], %g2 2008f98: 10 80 00 14 b 2008fe8 <_RBTree_Extract_unprotected+0x1a0> 2008f9c: 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 ) { 2008fa0: 80 a7 20 00 cmp %i4, 0 2008fa4: 32 80 00 04 bne,a 2008fb4 <_RBTree_Extract_unprotected+0x16c> 2008fa8: c2 06 40 00 ld [ %i1 ], %g1 2008fac: 30 80 00 04 b,a 2008fbc <_RBTree_Extract_unprotected+0x174> leaf->parent = the_node->parent; 2008fb0: c2 06 40 00 ld [ %i1 ], %g1 2008fb4: 10 80 00 04 b 2008fc4 <_RBTree_Extract_unprotected+0x17c> 2008fb8: 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); 2008fbc: 7f ff ff 28 call 2008c5c <_RBTree_Extract_validate_unprotected> 2008fc0: 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]; 2008fc4: 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; 2008fc8: c2 06 60 0c ld [ %i1 + 0xc ], %g1 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 2008fcc: c6 00 a0 04 ld [ %g2 + 4 ], %g3 2008fd0: 86 1e 40 03 xor %i1, %g3, %g3 2008fd4: 80 a0 00 03 cmp %g0, %g3 2008fd8: 86 40 20 00 addx %g0, 0, %g3 the_node->parent->child[dir] = leaf; 2008fdc: 87 28 e0 02 sll %g3, 2, %g3 2008fe0: 84 00 80 03 add %g2, %g3, %g2 2008fe4: 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 */ 2008fe8: 80 a0 60 00 cmp %g1, 0 2008fec: 32 80 00 06 bne,a 2009004 <_RBTree_Extract_unprotected+0x1bc> 2008ff0: c2 06 20 04 ld [ %i0 + 4 ], %g1 if (leaf) { 2008ff4: 80 a7 20 00 cmp %i4, 0 2008ff8: 32 80 00 02 bne,a 2009000 <_RBTree_Extract_unprotected+0x1b8> 2008ffc: 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; 2009000: 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; 2009004: c0 26 60 08 clr [ %i1 + 8 ] 2009008: c0 26 60 04 clr [ %i1 + 4 ] 200900c: 80 a0 60 00 cmp %g1, 0 2009010: 02 80 00 03 be 200901c <_RBTree_Extract_unprotected+0x1d4> 2009014: c0 26 40 00 clr [ %i1 ] 2009018: c0 20 60 0c clr [ %g1 + 0xc ] 200901c: 81 c7 e0 08 ret 2009020: 81 e8 00 00 restore =============================================================================== 02008c5c <_RBTree_Extract_validate_unprotected>: * of the extract operation. */ void _RBTree_Extract_validate_unprotected( RBTree_Node *the_node ) { 2008c5c: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; 2008c60: fa 06 00 00 ld [ %i0 ], %i5 if(!parent->parent) return; 2008c64: c2 07 40 00 ld [ %i5 ], %g1 2008c68: 80 a0 60 00 cmp %g1, 0 2008c6c: 02 80 00 6e be 2008e24 <_RBTree_Extract_validate_unprotected+0x1c8> 2008c70: 90 10 00 18 mov %i0, %o0 sibling = _RBTree_Sibling(the_node); 2008c74: 7f ff ff ca call 2008b9c <_RBTree_Sibling> 2008c78: 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) { 2008c7c: 10 80 00 5d b 2008df0 <_RBTree_Extract_validate_unprotected+0x194> 2008c80: 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); 2008c84: 22 80 00 15 be,a 2008cd8 <_RBTree_Extract_validate_unprotected+0x7c><== NEVER TAKEN 2008c88: c4 02 20 08 ld [ %o0 + 8 ], %g2 <== NOT EXECUTED 2008c8c: c2 02 20 0c ld [ %o0 + 0xc ], %g1 2008c90: 80 a0 60 01 cmp %g1, 1 2008c94: 32 80 00 11 bne,a 2008cd8 <_RBTree_Extract_validate_unprotected+0x7c> 2008c98: 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; 2008c9c: c2 27 60 0c st %g1, [ %i5 + 0xc ] sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 2008ca0: 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; 2008ca4: c0 22 20 0c clr [ %o0 + 0xc ] dir = the_node != parent->child[0]; 2008ca8: 82 1e 00 01 xor %i0, %g1, %g1 2008cac: 80 a0 00 01 cmp %g0, %g1 _RBTree_Rotate(parent, dir); 2008cb0: 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]; 2008cb4: b8 40 20 00 addx %g0, 0, %i4 _RBTree_Rotate(parent, dir); 2008cb8: 7f ff ff ca call 2008be0 <_RBTree_Rotate> 2008cbc: 92 10 00 1c mov %i4, %o1 sibling = parent->child[!dir]; 2008cc0: 80 a0 00 1c cmp %g0, %i4 2008cc4: 82 60 3f ff subx %g0, -1, %g1 2008cc8: 83 28 60 02 sll %g1, 2, %g1 2008ccc: 82 07 40 01 add %i5, %g1, %g1 2008cd0: 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]) && 2008cd4: c4 02 20 08 ld [ %o0 + 8 ], %g2 2008cd8: 80 a0 a0 00 cmp %g2, 0 2008cdc: 02 80 00 06 be 2008cf4 <_RBTree_Extract_validate_unprotected+0x98> 2008ce0: 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( 2008ce4: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 2008ce8: 82 18 60 01 xor %g1, 1, %g1 2008cec: 80 a0 00 01 cmp %g0, %g1 2008cf0: 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]) && 2008cf4: 80 a0 60 00 cmp %g1, 0 2008cf8: 32 80 00 14 bne,a 2008d48 <_RBTree_Extract_validate_unprotected+0xec> 2008cfc: c2 07 60 04 ld [ %i5 + 4 ], %g1 !_RBTree_Is_red(sibling->child[RBT_LEFT])) { 2008d00: c4 02 20 04 ld [ %o0 + 4 ], %g2 2008d04: 80 a0 a0 00 cmp %g2, 0 2008d08: 02 80 00 07 be 2008d24 <_RBTree_Extract_validate_unprotected+0xc8> 2008d0c: 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( 2008d10: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 2008d14: 82 18 60 01 xor %g1, 1, %g1 2008d18: 80 a0 00 01 cmp %g0, %g1 2008d1c: 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]) && 2008d20: 80 a0 60 00 cmp %g1, 0 2008d24: 32 80 00 09 bne,a 2008d48 <_RBTree_Extract_validate_unprotected+0xec> 2008d28: c2 07 60 04 ld [ %i5 + 4 ], %g1 !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; 2008d2c: f4 22 20 0c st %i2, [ %o0 + 0xc ] 2008d30: c2 07 60 0c ld [ %i5 + 0xc ], %g1 2008d34: 80 a0 60 01 cmp %g1, 1 2008d38: 32 80 00 3d bne,a 2008e2c <_RBTree_Extract_validate_unprotected+0x1d0> 2008d3c: f8 07 40 00 ld [ %i5 ], %i4 if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; 2008d40: 10 80 00 33 b 2008e0c <_RBTree_Extract_validate_unprotected+0x1b0> 2008d44: 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]; 2008d48: 82 1e 00 01 xor %i0, %g1, %g1 2008d4c: 80 a0 00 01 cmp %g0, %g1 2008d50: b8 40 20 00 addx %g0, 0, %i4 if (!_RBTree_Is_red(sibling->child[!dir])) { 2008d54: 80 a0 00 1c cmp %g0, %i4 2008d58: b6 60 3f ff subx %g0, -1, %i3 2008d5c: 83 2e e0 02 sll %i3, 2, %g1 2008d60: 82 02 00 01 add %o0, %g1, %g1 2008d64: c4 00 60 04 ld [ %g1 + 4 ], %g2 2008d68: 80 a0 a0 00 cmp %g2, 0 2008d6c: 02 80 00 06 be 2008d84 <_RBTree_Extract_validate_unprotected+0x128> 2008d70: 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( 2008d74: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 2008d78: 82 18 60 01 xor %g1, 1, %g1 2008d7c: 80 a0 00 01 cmp %g0, %g1 2008d80: 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])) { 2008d84: 80 a0 60 00 cmp %g1, 0 2008d88: 32 80 00 0e bne,a 2008dc0 <_RBTree_Extract_validate_unprotected+0x164> 2008d8c: c2 07 60 0c ld [ %i5 + 0xc ], %g1 sibling->color = RBT_RED; 2008d90: 82 10 20 01 mov 1, %g1 2008d94: c2 22 20 0c st %g1, [ %o0 + 0xc ] sibling->child[dir]->color = RBT_BLACK; 2008d98: 83 2f 20 02 sll %i4, 2, %g1 2008d9c: 82 02 00 01 add %o0, %g1, %g1 2008da0: c2 00 60 04 ld [ %g1 + 4 ], %g1 _RBTree_Rotate(sibling, !dir); 2008da4: 92 1f 20 01 xor %i4, 1, %o1 2008da8: 7f ff ff 8e call 2008be0 <_RBTree_Rotate> 2008dac: c0 20 60 0c clr [ %g1 + 0xc ] sibling = parent->child[!dir]; 2008db0: 83 2e e0 02 sll %i3, 2, %g1 2008db4: 82 07 40 01 add %i5, %g1, %g1 2008db8: d0 00 60 04 ld [ %g1 + 4 ], %o0 } sibling->color = parent->color; 2008dbc: c2 07 60 0c ld [ %i5 + 0xc ], %g1 parent->color = RBT_BLACK; sibling->child[!dir]->color = RBT_BLACK; 2008dc0: 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; 2008dc4: c2 22 20 0c st %g1, [ %o0 + 0xc ] parent->color = RBT_BLACK; sibling->child[!dir]->color = RBT_BLACK; 2008dc8: 90 02 00 1b add %o0, %i3, %o0 2008dcc: 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; 2008dd0: c0 27 60 0c clr [ %i5 + 0xc ] sibling->child[!dir]->color = RBT_BLACK; 2008dd4: c0 20 60 0c clr [ %g1 + 0xc ] _RBTree_Rotate(parent, dir); 2008dd8: 90 10 00 1d mov %i5, %o0 2008ddc: 7f ff ff 81 call 2008be0 <_RBTree_Rotate> 2008de0: 92 10 00 1c mov %i4, %o1 break; /* done */ 2008de4: 10 80 00 0b b 2008e10 <_RBTree_Extract_validate_unprotected+0x1b4> 2008de8: 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) { 2008dec: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2008df0: 80 a0 60 01 cmp %g1, 1 2008df4: 22 80 00 07 be,a 2008e10 <_RBTree_Extract_validate_unprotected+0x1b4> 2008df8: c2 06 00 00 ld [ %i0 ], %g1 2008dfc: c2 07 40 00 ld [ %i5 ], %g1 2008e00: 80 a0 60 00 cmp %g1, 0 2008e04: 12 bf ff a0 bne 2008c84 <_RBTree_Extract_validate_unprotected+0x28> 2008e08: 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; 2008e0c: c2 06 00 00 ld [ %i0 ], %g1 2008e10: c2 00 40 00 ld [ %g1 ], %g1 2008e14: 80 a0 60 00 cmp %g1, 0 2008e18: 12 80 00 0a bne 2008e40 <_RBTree_Extract_validate_unprotected+0x1e4> 2008e1c: 01 00 00 00 nop 2008e20: c0 26 20 0c clr [ %i0 + 0xc ] 2008e24: 81 c7 e0 08 ret 2008e28: 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); 2008e2c: 90 10 00 1d mov %i5, %o0 2008e30: 7f ff ff 5b call 2008b9c <_RBTree_Sibling> 2008e34: b0 10 00 1d mov %i5, %i0 2008e38: 10 bf ff ed b 2008dec <_RBTree_Extract_validate_unprotected+0x190> 2008e3c: ba 10 00 1c mov %i4, %i5 2008e40: 81 c7 e0 08 ret 2008e44: 81 e8 00 00 restore =============================================================================== 02009098 <_RBTree_Find>: RBTree_Node *_RBTree_Find( RBTree_Control *the_rbtree, RBTree_Node *search_node ) { 2009098: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; RBTree_Node *return_node; return_node = NULL; _ISR_Disable( level ); 200909c: 7f ff e7 ec call 200304c 20090a0: ba 10 00 18 mov %i0, %i5 20090a4: b8 10 00 08 mov %o0, %i4 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { RBTree_Node* iter_node = the_rbtree->root; 20090a8: 10 80 00 0d b 20090dc <_RBTree_Find+0x44> 20090ac: f0 06 20 04 ld [ %i0 + 4 ], %i0 int compare_result; while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); 20090b0: 90 10 00 19 mov %i1, %o0 20090b4: 9f c0 40 00 call %g1 20090b8: 92 10 00 18 mov %i0, %o1 if (compare_result == 0) { 20090bc: 80 a2 20 00 cmp %o0, 0 20090c0: 02 80 00 0a be 20090e8 <_RBTree_Find+0x50> 20090c4: 90 38 00 08 xnor %g0, %o0, %o0 return(iter_node); } RBTree_Direction dir = (compare_result != -1); 20090c8: 80 a0 00 08 cmp %g0, %o0 20090cc: 82 40 20 00 addx %g0, 0, %g1 iter_node = iter_node->child[dir]; 20090d0: 83 28 60 02 sll %g1, 2, %g1 20090d4: b0 06 00 01 add %i0, %g1, %i0 20090d8: f0 06 20 04 ld [ %i0 + 4 ], %i0 RBTree_Node *the_node ) { RBTree_Node* iter_node = the_rbtree->root; int compare_result; while (iter_node) { 20090dc: 80 a6 20 00 cmp %i0, 0 20090e0: 32 bf ff f4 bne,a 20090b0 <_RBTree_Find+0x18> <== ALWAYS TAKEN 20090e4: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 return_node = _RBTree_Find_unprotected( the_rbtree, search_node ); _ISR_Enable( level ); 20090e8: 7f ff e7 dd call 200305c 20090ec: 90 10 00 1c mov %i4, %o0 return return_node; } 20090f0: 81 c7 e0 08 ret 20090f4: 81 e8 00 00 restore =============================================================================== 0200938c <_RBTree_Initialize>: void *compare_function, void *starting_address, size_t number_nodes, size_t node_size ) { 200938c: 9d e3 bf a0 save %sp, -96, %sp size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; 2009390: 80 a6 20 00 cmp %i0, 0 2009394: 02 80 00 0f be 20093d0 <_RBTree_Initialize+0x44> <== NEVER TAKEN 2009398: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _RBTree_Initialize_empty( RBTree_Control *the_rbtree, void *compare_function ) { the_rbtree->permanent_null = NULL; 200939c: c0 26 00 00 clr [ %i0 ] the_rbtree->root = NULL; 20093a0: c0 26 20 04 clr [ %i0 + 4 ] the_rbtree->first[0] = NULL; 20093a4: c0 26 20 08 clr [ %i0 + 8 ] the_rbtree->first[1] = NULL; 20093a8: c0 26 20 0c clr [ %i0 + 0xc ] /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function); count = number_nodes; next = starting_address; while ( count-- ) { 20093ac: 10 80 00 06 b 20093c4 <_RBTree_Initialize+0x38> 20093b0: f2 26 20 10 st %i1, [ %i0 + 0x10 ] _RBTree_Insert(the_rbtree, next); 20093b4: 90 10 00 18 mov %i0, %o0 20093b8: 7f ff ff ec call 2009368 <_RBTree_Insert> 20093bc: b4 06 80 1c add %i2, %i4, %i2 * node_size - size of node in bytes * * Output parameters: NONE */ void _RBTree_Initialize( 20093c0: b6 06 ff ff add %i3, -1, %i3 /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function); count = number_nodes; next = starting_address; while ( count-- ) { 20093c4: 80 a6 e0 00 cmp %i3, 0 20093c8: 12 bf ff fb bne 20093b4 <_RBTree_Initialize+0x28> 20093cc: 92 10 00 1a mov %i2, %o1 20093d0: 81 c7 e0 08 ret 20093d4: 81 e8 00 00 restore =============================================================================== 020025cc <_RBTree_Sibling>: */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; 20025cc: 80 a2 20 00 cmp %o0, 0 20025d0: 02 80 00 0e be 2002608 <_RBTree_Sibling+0x3c> 20025d4: 82 10 20 00 clr %g1 if(!(the_node->parent)) return NULL; 20025d8: c4 02 00 00 ld [ %o0 ], %g2 20025dc: 80 a0 a0 00 cmp %g2, 0 20025e0: 02 80 00 0a be 2002608 <_RBTree_Sibling+0x3c> <== NEVER TAKEN 20025e4: 01 00 00 00 nop if(!(the_node->parent->parent)) return NULL; 20025e8: c6 00 80 00 ld [ %g2 ], %g3 20025ec: 80 a0 e0 00 cmp %g3, 0 20025f0: 02 80 00 06 be 2002608 <_RBTree_Sibling+0x3c> 20025f4: 01 00 00 00 nop if(the_node == the_node->parent->child[RBT_LEFT]) 20025f8: c2 00 a0 04 ld [ %g2 + 4 ], %g1 20025fc: 80 a2 00 01 cmp %o0, %g1 2002600: 22 80 00 02 be,a 2002608 <_RBTree_Sibling+0x3c> 2002604: c2 00 a0 08 ld [ %g2 + 8 ], %g1 return the_node->parent->child[RBT_RIGHT]; else return the_node->parent->child[RBT_LEFT]; } 2002608: 81 c3 e0 08 retl 200260c: 90 10 00 01 mov %g1, %o0 =============================================================================== 020091b0 <_RBTree_Validate_insert_unprotected>: * append operation. */ void _RBTree_Validate_insert_unprotected( RBTree_Node *the_node ) { 20091b0: 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))) { 20091b4: 10 80 00 1f b 2009230 <_RBTree_Validate_insert_unprotected+0x80> 20091b8: 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; 20091bc: 80 a0 60 00 cmp %g1, 0 20091c0: 02 80 00 27 be 200925c <_RBTree_Validate_insert_unprotected+0xac><== NEVER TAKEN 20091c4: 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]) 20091c8: 80 a2 00 01 cmp %o0, %g1 20091cc: 22 80 00 02 be,a 20091d4 <_RBTree_Validate_insert_unprotected+0x24> 20091d0: 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); 20091d4: 80 a0 60 00 cmp %g1, 0 20091d8: 22 80 00 21 be,a 200925c <_RBTree_Validate_insert_unprotected+0xac> 20091dc: c2 07 60 04 ld [ %i5 + 4 ], %g1 20091e0: c4 00 60 0c ld [ %g1 + 0xc ], %g2 20091e4: 80 a0 a0 01 cmp %g2, 1 20091e8: 32 80 00 1d bne,a 200925c <_RBTree_Validate_insert_unprotected+0xac> 20091ec: 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; 20091f0: c0 22 20 0c clr [ %o0 + 0xc ] u->color = RBT_BLACK; 20091f4: c0 20 60 0c clr [ %g1 + 0xc ] g->color = RBT_RED; 20091f8: c4 27 60 0c st %g2, [ %i5 + 0xc ] 20091fc: 10 80 00 0d b 2009230 <_RBTree_Validate_insert_unprotected+0x80> 2009200: 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); 2009204: 7f ff ff cc call 2009134 <_RBTree_Rotate> 2009208: 92 10 00 1c mov %i4, %o1 the_node = the_node->child[pdir]; 200920c: 83 2f 20 02 sll %i4, 2, %g1 2009210: b0 06 00 01 add %i0, %g1, %i0 2009214: f0 06 20 04 ld [ %i0 + 4 ], %i0 } the_node->parent->color = RBT_BLACK; 2009218: 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)); 200921c: 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; 2009220: c0 20 60 0c clr [ %g1 + 0xc ] g->color = RBT_RED; 2009224: f6 27 60 0c st %i3, [ %i5 + 0xc ] /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); 2009228: 7f ff ff c3 call 2009134 <_RBTree_Rotate> 200922c: 92 26 c0 1c sub %i3, %i4, %o1 ISR_Level level; _ISR_Disable( level ); _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } 2009230: 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; 2009234: fa 02 00 00 ld [ %o0 ], %i5 2009238: 80 a7 60 00 cmp %i5, 0 200923c: 22 80 00 14 be,a 200928c <_RBTree_Validate_insert_unprotected+0xdc> 2009240: 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); 2009244: c2 02 20 0c ld [ %o0 + 0xc ], %g1 2009248: 80 a0 60 01 cmp %g1, 1 200924c: 12 80 00 10 bne 200928c <_RBTree_Validate_insert_unprotected+0xdc> 2009250: 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; 2009254: 10 bf ff da b 20091bc <_RBTree_Validate_insert_unprotected+0xc> 2009258: 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]; 200925c: 82 1a 00 01 xor %o0, %g1, %g1 2009260: 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]; 2009264: c2 02 20 04 ld [ %o0 + 4 ], %g1 RBTree_Direction pdir = the_node->parent != g->child[0]; 2009268: 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]; 200926c: 82 1e 00 01 xor %i0, %g1, %g1 2009270: 80 a0 00 01 cmp %g0, %g1 2009274: 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) { 2009278: 80 a0 40 1c cmp %g1, %i4 200927c: 12 bf ff e2 bne 2009204 <_RBTree_Validate_insert_unprotected+0x54> 2009280: 01 00 00 00 nop _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; } the_node->parent->color = RBT_BLACK; 2009284: 10 bf ff e6 b 200921c <_RBTree_Validate_insert_unprotected+0x6c> 2009288: c2 06 00 00 ld [ %i0 ], %g1 200928c: 81 c7 e0 08 ret 2009290: 81 e8 00 00 restore =============================================================================== 020076c8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 20076c8: 9d e3 bf 98 save %sp, -104, %sp 20076cc: 11 00 80 79 sethi %hi(0x201e400), %o0 20076d0: 92 10 00 18 mov %i0, %o1 20076d4: 90 12 23 f4 or %o0, 0x3f4, %o0 20076d8: 40 00 07 e3 call 2009664 <_Objects_Get> 20076dc: 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 ) { 20076e0: c2 07 bf fc ld [ %fp + -4 ], %g1 20076e4: 80 a0 60 00 cmp %g1, 0 20076e8: 12 80 00 25 bne 200777c <_Rate_monotonic_Timeout+0xb4> <== NEVER TAKEN 20076ec: ba 10 00 08 mov %o0, %i5 case OBJECTS_LOCAL: the_thread = the_period->owner; 20076f0: d0 02 20 40 ld [ %o0 + 0x40 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 20076f4: 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); 20076f8: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 20076fc: 80 88 80 01 btst %g2, %g1 2007700: 22 80 00 0b be,a 200772c <_Rate_monotonic_Timeout+0x64> 2007704: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 2007708: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 200770c: c2 07 60 08 ld [ %i5 + 8 ], %g1 2007710: 80 a0 80 01 cmp %g2, %g1 2007714: 32 80 00 06 bne,a 200772c <_Rate_monotonic_Timeout+0x64> 2007718: 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 ); 200771c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2007720: 40 00 0a af call 200a1dc <_Thread_Clear_state> 2007724: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 2007728: 30 80 00 06 b,a 2007740 <_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 ) { 200772c: 80 a0 60 01 cmp %g1, 1 2007730: 12 80 00 0d bne 2007764 <_Rate_monotonic_Timeout+0x9c> 2007734: 82 10 20 04 mov 4, %g1 the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 2007738: 82 10 20 03 mov 3, %g1 200773c: c2 27 60 38 st %g1, [ %i5 + 0x38 ] _Rate_monotonic_Initiate_statistics( the_period ); 2007740: 7f ff fe 70 call 2007100 <_Rate_monotonic_Initiate_statistics> 2007744: 90 10 00 1d mov %i5, %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2007748: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200774c: 11 00 80 7a sethi %hi(0x201e800), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2007750: c2 27 60 1c st %g1, [ %i5 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2007754: 90 12 22 1c or %o0, 0x21c, %o0 2007758: 40 00 0f 57 call 200b4b4 <_Watchdog_Insert> 200775c: 92 07 60 10 add %i5, 0x10, %o1 2007760: 30 80 00 02 b,a 2007768 <_Rate_monotonic_Timeout+0xa0> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 2007764: 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--; 2007768: 03 00 80 7a sethi %hi(0x201e800), %g1 200776c: c4 00 61 60 ld [ %g1 + 0x160 ], %g2 ! 201e960 <_Thread_Dispatch_disable_level> 2007770: 84 00 bf ff add %g2, -1, %g2 2007774: c4 20 61 60 st %g2, [ %g1 + 0x160 ] return _Thread_Dispatch_disable_level; 2007778: c2 00 61 60 ld [ %g1 + 0x160 ], %g1 200777c: 81 c7 e0 08 ret 2007780: 81 e8 00 00 restore =============================================================================== 020085b0 <_Scheduler_priority_Tick>: #include #include void _Scheduler_priority_Tick( void ) { 20085b0: 9d e3 bf a0 save %sp, -96, %sp Thread_Control *executing; executing = _Thread_Executing; 20085b4: 03 00 80 73 sethi %hi(0x201cc00), %g1 20085b8: fa 00 63 f4 ld [ %g1 + 0x3f4 ], %i5 ! 201cff4 <_Per_CPU_Information+0xc> /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 20085bc: c2 0f 60 74 ldub [ %i5 + 0x74 ], %g1 20085c0: 80 a0 60 00 cmp %g1, 0 20085c4: 02 80 00 25 be 2008658 <_Scheduler_priority_Tick+0xa8> 20085c8: 01 00 00 00 nop return; if ( !_States_Is_ready( executing->current_state ) ) 20085cc: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 20085d0: 80 a0 60 00 cmp %g1, 0 20085d4: 12 80 00 21 bne 2008658 <_Scheduler_priority_Tick+0xa8> 20085d8: 01 00 00 00 nop /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 20085dc: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 20085e0: 80 a0 60 01 cmp %g1, 1 20085e4: 0a 80 00 14 bcs 2008634 <_Scheduler_priority_Tick+0x84> 20085e8: 80 a0 60 02 cmp %g1, 2 20085ec: 28 80 00 07 bleu,a 2008608 <_Scheduler_priority_Tick+0x58> 20085f0: c2 07 60 78 ld [ %i5 + 0x78 ], %g1 20085f4: 80 a0 60 03 cmp %g1, 3 20085f8: 12 80 00 18 bne 2008658 <_Scheduler_priority_Tick+0xa8> <== NEVER TAKEN 20085fc: 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 ) 2008600: 10 80 00 0f b 200863c <_Scheduler_priority_Tick+0x8c> 2008604: 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 ) { 2008608: 82 00 7f ff add %g1, -1, %g1 200860c: 80 a0 60 00 cmp %g1, 0 2008610: 14 80 00 09 bg 2008634 <_Scheduler_priority_Tick+0x84> 2008614: 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(); 2008618: 03 00 80 6f sethi %hi(0x201bc00), %g1 200861c: c2 00 62 40 ld [ %g1 + 0x240 ], %g1 ! 201be40 <_Scheduler+0xc> 2008620: 9f c0 40 00 call %g1 2008624: 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; 2008628: 03 00 80 72 sethi %hi(0x201c800), %g1 200862c: c2 00 62 14 ld [ %g1 + 0x214 ], %g1 ! 201ca14 <_Thread_Ticks_per_timeslice> 2008630: c2 27 60 78 st %g1, [ %i5 + 0x78 ] 2008634: 81 c7 e0 08 ret 2008638: 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 ) 200863c: 82 00 7f ff add %g1, -1, %g1 2008640: 80 a0 60 00 cmp %g1, 0 2008644: 12 bf ff fc bne 2008634 <_Scheduler_priority_Tick+0x84> 2008648: c2 27 60 78 st %g1, [ %i5 + 0x78 ] (*executing->budget_callout)( executing ); 200864c: c2 07 60 80 ld [ %i5 + 0x80 ], %g1 2008650: 9f c0 40 00 call %g1 2008654: 90 10 00 1d mov %i5, %o0 2008658: 81 c7 e0 08 ret 200865c: 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 60 c8 ld [ %g1 + 0xc8 ], %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 05 call 2019984 <.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 18 or %g3, 0x18, %g3 ! 201d018 <_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 =============================================================================== 02008870 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 2008870: 9d e3 bf a0 save %sp, -96, %sp States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 2008874: 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 ); 2008878: 40 00 03 62 call 2009600 <_Thread_Set_transient> 200887c: 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 ) 2008880: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2008884: 80 a0 40 19 cmp %g1, %i1 2008888: 02 80 00 05 be 200889c <_Thread_Change_priority+0x2c> 200888c: ba 10 00 18 mov %i0, %i5 _Thread_Set_priority( the_thread, new_priority ); 2008890: 90 10 00 18 mov %i0, %o0 2008894: 40 00 03 42 call 200959c <_Thread_Set_priority> 2008898: 92 10 00 19 mov %i1, %o1 _ISR_Disable( level ); 200889c: 7f ff e6 38 call 200217c 20088a0: 01 00 00 00 nop 20088a4: 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; 20088a8: f2 07 60 10 ld [ %i5 + 0x10 ], %i1 if ( state != STATES_TRANSIENT ) { 20088ac: 80 a6 60 04 cmp %i1, 4 20088b0: 02 80 00 10 be 20088f0 <_Thread_Change_priority+0x80> 20088b4: 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 ) ) 20088b8: 80 a7 20 00 cmp %i4, 0 20088bc: 12 80 00 03 bne 20088c8 <_Thread_Change_priority+0x58> <== NEVER TAKEN 20088c0: 82 0e 7f fb and %i1, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 20088c4: c2 27 60 10 st %g1, [ %i5 + 0x10 ] _ISR_Enable( level ); 20088c8: 7f ff e6 31 call 200218c 20088cc: 90 10 00 1b mov %i3, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 20088d0: 03 00 00 ef sethi %hi(0x3bc00), %g1 20088d4: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 20088d8: 80 8e 40 01 btst %i1, %g1 20088dc: 02 80 00 29 be 2008980 <_Thread_Change_priority+0x110> 20088e0: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 20088e4: f0 07 60 44 ld [ %i5 + 0x44 ], %i0 20088e8: 40 00 02 ff call 20094e4 <_Thread_queue_Requeue> 20088ec: 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 ) ) { 20088f0: 80 a7 20 00 cmp %i4, 0 20088f4: 12 80 00 0b bne 2008920 <_Thread_Change_priority+0xb0> <== NEVER TAKEN 20088f8: 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 ); 20088fc: c0 27 60 10 clr [ %i5 + 0x10 ] if ( prepend_it ) 2008900: 80 a6 a0 00 cmp %i2, 0 2008904: 02 80 00 04 be 2008914 <_Thread_Change_priority+0xa4> 2008908: 82 10 62 34 or %g1, 0x234, %g1 */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 200890c: 10 80 00 03 b 2008918 <_Thread_Change_priority+0xa8> 2008910: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 2008914: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 2008918: 9f c0 40 00 call %g1 200891c: 90 10 00 1d mov %i5, %o0 _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 2008920: 7f ff e6 1b call 200218c 2008924: 90 10 00 1b mov %i3, %o0 2008928: 7f ff e6 15 call 200217c 200892c: 01 00 00 00 nop 2008930: 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(); 2008934: 03 00 80 6f sethi %hi(0x201bc00), %g1 2008938: c2 00 62 3c ld [ %g1 + 0x23c ], %g1 ! 201be3c <_Scheduler+0x8> 200893c: 9f c0 40 00 call %g1 2008940: 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 ); 2008944: 03 00 80 73 sethi %hi(0x201cc00), %g1 2008948: 82 10 63 e8 or %g1, 0x3e8, %g1 ! 201cfe8 <_Per_CPU_Information> 200894c: 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() && 2008950: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 2008954: 80 a0 80 03 cmp %g2, %g3 2008958: 02 80 00 08 be 2008978 <_Thread_Change_priority+0x108> 200895c: 01 00 00 00 nop 2008960: c4 08 a0 74 ldub [ %g2 + 0x74 ], %g2 2008964: 80 a0 a0 00 cmp %g2, 0 2008968: 02 80 00 04 be 2008978 <_Thread_Change_priority+0x108> 200896c: 01 00 00 00 nop _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 2008970: 84 10 20 01 mov 1, %g2 ! 1 2008974: c4 28 60 18 stb %g2, [ %g1 + 0x18 ] _ISR_Enable( level ); 2008978: 7f ff e6 05 call 200218c 200897c: 81 e8 00 00 restore 2008980: 81 c7 e0 08 ret 2008984: 81 e8 00 00 restore =============================================================================== 02008b74 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 2008b74: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 2008b78: 90 10 00 18 mov %i0, %o0 2008b7c: 40 00 00 6e call 2008d34 <_Thread_Get> 2008b80: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2008b84: c2 07 bf fc ld [ %fp + -4 ], %g1 2008b88: 80 a0 60 00 cmp %g1, 0 2008b8c: 12 80 00 09 bne 2008bb0 <_Thread_Delay_ended+0x3c> <== NEVER TAKEN 2008b90: 13 04 00 00 sethi %hi(0x10000000), %o1 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 2008b94: 7f ff ff 7d call 2008988 <_Thread_Clear_state> 2008b98: 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--; 2008b9c: 03 00 80 72 sethi %hi(0x201c800), %g1 2008ba0: c4 00 62 b0 ld [ %g1 + 0x2b0 ], %g2 ! 201cab0 <_Thread_Dispatch_disable_level> 2008ba4: 84 00 bf ff add %g2, -1, %g2 2008ba8: c4 20 62 b0 st %g2, [ %g1 + 0x2b0 ] return _Thread_Dispatch_disable_level; 2008bac: c2 00 62 b0 ld [ %g1 + 0x2b0 ], %g1 2008bb0: 81 c7 e0 08 ret 2008bb4: 81 e8 00 00 restore =============================================================================== 02008bb8 <_Thread_Dispatch>: * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 2008bb8: 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++; 2008bbc: 03 00 80 72 sethi %hi(0x201c800), %g1 2008bc0: c4 00 62 b0 ld [ %g1 + 0x2b0 ], %g2 ! 201cab0 <_Thread_Dispatch_disable_level> 2008bc4: 84 00 a0 01 inc %g2 2008bc8: c4 20 62 b0 st %g2, [ %g1 + 0x2b0 ] return _Thread_Dispatch_disable_level; 2008bcc: c2 00 62 b0 ld [ %g1 + 0x2b0 ], %g1 #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; 2008bd0: 33 00 80 73 sethi %hi(0x201cc00), %i1 2008bd4: b4 16 63 e8 or %i1, 0x3e8, %i2 ! 201cfe8 <_Per_CPU_Information> _ISR_Disable( level ); 2008bd8: 7f ff e5 69 call 200217c 2008bdc: 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; 2008be0: 21 00 80 72 sethi %hi(0x201c800), %l0 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 2008be4: b4 06 a0 1c add %i2, 0x1c, %i2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2008be8: 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 ) { 2008bec: 10 80 00 38 b 2008ccc <_Thread_Dispatch+0x114> 2008bf0: 37 00 80 72 sethi %hi(0x201c800), %i3 heir = _Thread_Heir; _Thread_Dispatch_necessary = false; 2008bf4: 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 ) 2008bf8: 80 a7 00 1d cmp %i4, %i5 2008bfc: 02 80 00 39 be 2008ce0 <_Thread_Dispatch+0x128> 2008c00: 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 ) 2008c04: c2 07 20 7c ld [ %i4 + 0x7c ], %g1 2008c08: 80 a0 60 01 cmp %g1, 1 2008c0c: 12 80 00 03 bne 2008c18 <_Thread_Dispatch+0x60> 2008c10: c2 04 22 14 ld [ %l0 + 0x214 ], %g1 heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 2008c14: c2 27 20 78 st %g1, [ %i4 + 0x78 ] _ISR_Enable( level ); 2008c18: 7f ff e5 5d call 200218c 2008c1c: 01 00 00 00 nop #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 2008c20: 40 00 0e cd call 200c754 <_TOD_Get_uptime> 2008c24: 90 07 bf f0 add %fp, -16, %o0 _Timestamp_Subtract( 2008c28: 90 10 00 1a mov %i2, %o0 2008c2c: 92 07 bf f0 add %fp, -16, %o1 2008c30: 40 00 02 ed call 20097e4 <_Timespec_Subtract> 2008c34: 94 07 bf f8 add %fp, -8, %o2 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 2008c38: 90 07 60 84 add %i5, 0x84, %o0 2008c3c: 40 00 02 d1 call 2009780 <_Timespec_Add_to> 2008c40: 92 07 bf f8 add %fp, -8, %o1 _Thread_Time_of_last_context_switch = uptime; 2008c44: c4 07 bf f0 ld [ %fp + -16 ], %g2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2008c48: c2 06 23 38 ld [ %i0 + 0x338 ], %g1 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 2008c4c: c4 26 80 00 st %g2, [ %i2 ] 2008c50: c4 07 bf f4 ld [ %fp + -12 ], %g2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2008c54: 80 a0 60 00 cmp %g1, 0 2008c58: 02 80 00 06 be 2008c70 <_Thread_Dispatch+0xb8> <== NEVER TAKEN 2008c5c: c4 26 a0 04 st %g2, [ %i2 + 4 ] executing->libc_reent = *_Thread_libc_reent; 2008c60: c4 00 40 00 ld [ %g1 ], %g2 2008c64: c4 27 61 54 st %g2, [ %i5 + 0x154 ] *_Thread_libc_reent = heir->libc_reent; 2008c68: c4 07 21 54 ld [ %i4 + 0x154 ], %g2 2008c6c: c4 20 40 00 st %g2, [ %g1 ] } _User_extensions_Thread_switch( executing, heir ); 2008c70: 90 10 00 1d mov %i5, %o0 2008c74: 40 00 03 8a call 2009a9c <_User_extensions_Thread_switch> 2008c78: 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 ); 2008c7c: 90 07 60 c8 add %i5, 0xc8, %o0 2008c80: 40 00 04 b0 call 2009f40 <_CPU_Context_switch> 2008c84: 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) && 2008c88: c2 07 61 50 ld [ %i5 + 0x150 ], %g1 2008c8c: 80 a0 60 00 cmp %g1, 0 2008c90: 02 80 00 0c be 2008cc0 <_Thread_Dispatch+0x108> 2008c94: d0 06 e3 34 ld [ %i3 + 0x334 ], %o0 2008c98: 80 a7 40 08 cmp %i5, %o0 2008c9c: 02 80 00 09 be 2008cc0 <_Thread_Dispatch+0x108> 2008ca0: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 2008ca4: 02 80 00 04 be 2008cb4 <_Thread_Dispatch+0xfc> 2008ca8: 01 00 00 00 nop _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 2008cac: 40 00 04 6b call 2009e58 <_CPU_Context_save_fp> 2008cb0: 90 02 21 50 add %o0, 0x150, %o0 _Context_Restore_fp( &executing->fp_context ); 2008cb4: 40 00 04 86 call 2009ecc <_CPU_Context_restore_fp> 2008cb8: 90 07 61 50 add %i5, 0x150, %o0 _Thread_Allocated_fp = executing; 2008cbc: fa 26 e3 34 st %i5, [ %i3 + 0x334 ] if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 2008cc0: 82 16 63 e8 or %i1, 0x3e8, %g1 _ISR_Disable( level ); 2008cc4: 7f ff e5 2e call 200217c 2008cc8: 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 ) { 2008ccc: 82 16 63 e8 or %i1, 0x3e8, %g1 2008cd0: c4 08 60 18 ldub [ %g1 + 0x18 ], %g2 2008cd4: 80 a0 a0 00 cmp %g2, 0 2008cd8: 32 bf ff c7 bne,a 2008bf4 <_Thread_Dispatch+0x3c> 2008cdc: f8 00 60 10 ld [ %g1 + 0x10 ], %i4 * This routine sets thread dispatch level to the * value passed in. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_set_disable_level(uint32_t value) { _Thread_Dispatch_disable_level = value; 2008ce0: 03 00 80 72 sethi %hi(0x201c800), %g1 2008ce4: c0 20 62 b0 clr [ %g1 + 0x2b0 ] ! 201cab0 <_Thread_Dispatch_disable_level> } post_switch: _Thread_Dispatch_set_disable_level( 0 ); _ISR_Enable( level ); 2008ce8: 7f ff e5 29 call 200218c 2008cec: 01 00 00 00 nop _API_extensions_Run_postswitch(); 2008cf0: 7f ff f8 3e call 2006de8 <_API_extensions_Run_postswitch> 2008cf4: 01 00 00 00 nop } 2008cf8: 81 c7 e0 08 ret 2008cfc: 81 e8 00 00 restore =============================================================================== 0200e8a8 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 200e8a8: 9d e3 bf a0 save %sp, -96, %sp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 200e8ac: 03 00 80 73 sethi %hi(0x201cc00), %g1 200e8b0: fa 00 63 f4 ld [ %g1 + 0x3f4 ], %i5 ! 201cff4 <_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(); 200e8b4: 3f 00 80 3a sethi %hi(0x200e800), %i7 200e8b8: be 17 e0 a8 or %i7, 0xa8, %i7 ! 200e8a8 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 200e8bc: d0 07 60 ac ld [ %i5 + 0xac ], %o0 _ISR_Set_level(level); 200e8c0: 7f ff ce 33 call 200218c 200e8c4: 91 2a 20 08 sll %o0, 8, %o0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 200e8c8: 03 00 80 71 sethi %hi(0x201c400), %g1 doneConstructors = 1; 200e8cc: 84 10 20 01 mov 1, %g2 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 200e8d0: f8 08 63 6c ldub [ %g1 + 0x36c ], %i4 doneConstructors = 1; 200e8d4: c4 28 63 6c stb %g2, [ %g1 + 0x36c ] #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 200e8d8: c2 07 61 50 ld [ %i5 + 0x150 ], %g1 200e8dc: 80 a0 60 00 cmp %g1, 0 200e8e0: 02 80 00 0c be 200e910 <_Thread_Handler+0x68> 200e8e4: 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 ); 200e8e8: d0 00 63 34 ld [ %g1 + 0x334 ], %o0 ! 201cb34 <_Thread_Allocated_fp> 200e8ec: 80 a7 40 08 cmp %i5, %o0 200e8f0: 02 80 00 08 be 200e910 <_Thread_Handler+0x68> 200e8f4: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 200e8f8: 22 80 00 06 be,a 200e910 <_Thread_Handler+0x68> 200e8fc: fa 20 63 34 st %i5, [ %g1 + 0x334 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200e900: 7f ff ed 56 call 2009e58 <_CPU_Context_save_fp> 200e904: 90 02 21 50 add %o0, 0x150, %o0 _Thread_Allocated_fp = executing; 200e908: 03 00 80 72 sethi %hi(0x201c800), %g1 200e90c: fa 20 63 34 st %i5, [ %g1 + 0x334 ] ! 201cb34 <_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 ); 200e910: 7f ff eb f4 call 20098e0 <_User_extensions_Thread_begin> 200e914: 90 10 00 1d mov %i5, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 200e918: 7f ff e8 fa call 2008d00 <_Thread_Enable_dispatch> 200e91c: b9 2f 20 18 sll %i4, 0x18, %i4 /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { 200e920: 80 a7 20 00 cmp %i4, 0 200e924: 32 80 00 05 bne,a 200e938 <_Thread_Handler+0x90> 200e928: c2 07 60 94 ld [ %i5 + 0x94 ], %g1 INIT_NAME (); 200e92c: 40 00 34 f9 call 201bd10 <_init> 200e930: 01 00 00 00 nop #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 200e934: c2 07 60 94 ld [ %i5 + 0x94 ], %g1 200e938: 80 a0 60 00 cmp %g1, 0 200e93c: 12 80 00 05 bne 200e950 <_Thread_Handler+0xa8> 200e940: 80 a0 60 01 cmp %g1, 1 executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 200e944: c2 07 60 90 ld [ %i5 + 0x90 ], %g1 200e948: 10 80 00 06 b 200e960 <_Thread_Handler+0xb8> 200e94c: 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 ) { 200e950: 12 80 00 07 bne 200e96c <_Thread_Handler+0xc4> <== NEVER TAKEN 200e954: 01 00 00 00 nop executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 200e958: c2 07 60 90 ld [ %i5 + 0x90 ], %g1 200e95c: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 200e960: 9f c0 40 00 call %g1 200e964: 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 = 200e968: 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 ); 200e96c: 7f ff eb ee call 2009924 <_User_extensions_Thread_exitted> 200e970: 90 10 00 1d mov %i5, %o0 _Internal_error_Occurred( 200e974: 90 10 20 00 clr %o0 200e978: 92 10 20 01 mov 1, %o1 200e97c: 7f ff e3 be call 2007874 <_Internal_error_Occurred> 200e980: 94 10 20 05 mov 5, %o2 =============================================================================== 02008de4 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 2008de4: 9d e3 bf a0 save %sp, -96, %sp 2008de8: 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; 2008dec: c0 26 61 58 clr [ %i1 + 0x158 ] 2008df0: c0 26 61 5c clr [ %i1 + 0x15c ] extensions_area = NULL; the_thread->libc_reent = NULL; 2008df4: 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 ) { 2008df8: e0 07 a0 60 ld [ %fp + 0x60 ], %l0 2008dfc: 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 ) { 2008e00: 80 a6 a0 00 cmp %i2, 0 2008e04: 12 80 00 0d bne 2008e38 <_Thread_Initialize+0x54> 2008e08: e4 0f a0 5f ldub [ %fp + 0x5f ], %l2 actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 2008e0c: 90 10 00 19 mov %i1, %o0 2008e10: 40 00 02 0b call 200963c <_Thread_Stack_Allocate> 2008e14: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 2008e18: 80 a2 00 1b cmp %o0, %i3 2008e1c: 0a 80 00 6a bcs 2008fc4 <_Thread_Initialize+0x1e0> 2008e20: 80 a2 20 00 cmp %o0, 0 2008e24: 02 80 00 68 be 2008fc4 <_Thread_Initialize+0x1e0> <== NEVER TAKEN 2008e28: 82 10 20 01 mov 1, %g1 return false; /* stack allocation failed */ stack = the_thread->Start.stack; 2008e2c: f4 06 60 c4 ld [ %i1 + 0xc4 ], %i2 the_thread->Start.core_allocated_stack = true; 2008e30: 10 80 00 04 b 2008e40 <_Thread_Initialize+0x5c> 2008e34: c2 2e 60 b4 stb %g1, [ %i1 + 0xb4 ] } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 2008e38: c0 2e 60 b4 clrb [ %i1 + 0xb4 ] 2008e3c: 90 10 00 1b mov %i3, %o0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 2008e40: f4 26 60 bc st %i2, [ %i1 + 0xbc ] the_stack->size = size; 2008e44: 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 ) { 2008e48: 80 a7 20 00 cmp %i4, 0 2008e4c: 02 80 00 07 be 2008e68 <_Thread_Initialize+0x84> 2008e50: b6 10 20 00 clr %i3 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 2008e54: 40 00 03 e5 call 2009de8 <_Workspace_Allocate> 2008e58: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) 2008e5c: b6 92 20 00 orcc %o0, 0, %i3 2008e60: 02 80 00 4a be 2008f88 <_Thread_Initialize+0x1a4> 2008e64: b8 10 20 00 clr %i4 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2008e68: 03 00 80 72 sethi %hi(0x201c800), %g1 2008e6c: d0 00 63 44 ld [ %g1 + 0x344 ], %o0 ! 201cb44 <_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; 2008e70: f6 26 61 50 st %i3, [ %i1 + 0x150 ] the_thread->Start.fp_context = fp_area; 2008e74: f6 26 60 c0 st %i3, [ %i1 + 0xc0 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2008e78: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 2008e7c: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 2008e80: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 2008e84: c0 26 60 6c clr [ %i1 + 0x6c ] #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2008e88: 80 a2 20 00 cmp %o0, 0 2008e8c: 02 80 00 08 be 2008eac <_Thread_Initialize+0xc8> 2008e90: b8 10 20 00 clr %i4 extensions_area = _Workspace_Allocate( 2008e94: 90 02 20 01 inc %o0 2008e98: 40 00 03 d4 call 2009de8 <_Workspace_Allocate> 2008e9c: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 2008ea0: b8 92 20 00 orcc %o0, 0, %i4 2008ea4: 02 80 00 3a be 2008f8c <_Thread_Initialize+0x1a8> 2008ea8: 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 ) { 2008eac: 80 a7 20 00 cmp %i4, 0 2008eb0: 02 80 00 0c be 2008ee0 <_Thread_Initialize+0xfc> 2008eb4: f8 26 61 60 st %i4, [ %i1 + 0x160 ] for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 2008eb8: 03 00 80 72 sethi %hi(0x201c800), %g1 2008ebc: c4 00 63 44 ld [ %g1 + 0x344 ], %g2 ! 201cb44 <_Thread_Maximum_extensions> 2008ec0: 10 80 00 05 b 2008ed4 <_Thread_Initialize+0xf0> 2008ec4: 82 10 20 00 clr %g1 the_thread->extensions[i] = NULL; 2008ec8: 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++ ) 2008ecc: 82 00 60 01 inc %g1 the_thread->extensions[i] = NULL; 2008ed0: 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++ ) 2008ed4: 80 a0 40 02 cmp %g1, %g2 2008ed8: 28 bf ff fc bleu,a 2008ec8 <_Thread_Initialize+0xe4> 2008edc: 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; 2008ee0: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 2008ee4: e4 2e 60 a0 stb %l2, [ %i1 + 0xa0 ] the_thread->Start.budget_algorithm = budget_algorithm; 2008ee8: e0 26 60 a4 st %l0, [ %i1 + 0xa4 ] the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { 2008eec: 80 a4 20 02 cmp %l0, 2 2008ef0: 12 80 00 05 bne 2008f04 <_Thread_Initialize+0x120> 2008ef4: 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; 2008ef8: 03 00 80 72 sethi %hi(0x201c800), %g1 2008efc: c2 00 62 14 ld [ %g1 + 0x214 ], %g1 ! 201ca14 <_Thread_Ticks_per_timeslice> 2008f00: c2 26 60 78 st %g1, [ %i1 + 0x78 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 2008f04: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 2008f08: c0 26 60 44 clr [ %i1 + 0x44 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 2008f0c: c2 26 60 ac st %g1, [ %i1 + 0xac ] the_thread->current_state = STATES_DORMANT; 2008f10: 82 10 20 01 mov 1, %g1 2008f14: c2 26 60 10 st %g1, [ %i1 + 0x10 ] */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); 2008f18: 03 00 80 6f sethi %hi(0x201bc00), %g1 2008f1c: c2 00 62 4c ld [ %g1 + 0x24c ], %g1 ! 201be4c <_Scheduler+0x18> the_thread->Wait.queue = NULL; the_thread->resource_count = 0; 2008f20: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->real_priority = priority; 2008f24: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; 2008f28: fa 26 60 b0 st %i5, [ %i1 + 0xb0 ] 2008f2c: 9f c0 40 00 call %g1 2008f30: 90 10 00 19 mov %i1, %o0 sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 2008f34: b4 92 20 00 orcc %o0, 0, %i2 2008f38: 02 80 00 15 be 2008f8c <_Thread_Initialize+0x1a8> 2008f3c: 90 10 00 19 mov %i1, %o0 goto failed; _Thread_Set_priority( the_thread, priority ); 2008f40: 40 00 01 97 call 200959c <_Thread_Set_priority> 2008f44: 92 10 00 1d mov %i5, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2008f48: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 2008f4c: 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 ); 2008f50: c0 26 60 84 clr [ %i1 + 0x84 ] 2008f54: c0 26 60 88 clr [ %i1 + 0x88 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2008f58: 83 28 60 02 sll %g1, 2, %g1 2008f5c: f2 20 80 01 st %i1, [ %g2 + %g1 ] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2008f60: 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 ); 2008f64: 90 10 00 19 mov %i1, %o0 2008f68: 40 00 02 90 call 20099a8 <_User_extensions_Thread_create> 2008f6c: b0 10 20 01 mov 1, %i0 if ( extension_status ) 2008f70: 80 8a 20 ff btst 0xff, %o0 2008f74: 02 80 00 06 be 2008f8c <_Thread_Initialize+0x1a8> 2008f78: 01 00 00 00 nop 2008f7c: b0 0e 20 01 and %i0, 1, %i0 2008f80: 81 c7 e0 08 ret 2008f84: 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; 2008f88: 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 ); 2008f8c: 40 00 03 9f call 2009e08 <_Workspace_Free> 2008f90: d0 06 61 54 ld [ %i1 + 0x154 ], %o0 for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 2008f94: 40 00 03 9d call 2009e08 <_Workspace_Free> 2008f98: d0 06 61 58 ld [ %i1 + 0x158 ], %o0 2008f9c: 40 00 03 9b call 2009e08 <_Workspace_Free> 2008fa0: d0 06 61 5c ld [ %i1 + 0x15c ], %o0 _Workspace_Free( extensions_area ); 2008fa4: 40 00 03 99 call 2009e08 <_Workspace_Free> 2008fa8: 90 10 00 1c mov %i4, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 2008fac: 40 00 03 97 call 2009e08 <_Workspace_Free> 2008fb0: 90 10 00 1b mov %i3, %o0 #endif _Workspace_Free( sched ); 2008fb4: 40 00 03 95 call 2009e08 <_Workspace_Free> 2008fb8: 90 10 00 1a mov %i2, %o0 _Thread_Stack_Free( the_thread ); 2008fbc: 40 00 01 b7 call 2009698 <_Thread_Stack_Free> 2008fc0: 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 */ 2008fc4: b0 10 20 00 clr %i0 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 2008fc8: b0 0e 20 01 and %i0, 1, %i0 2008fcc: 81 c7 e0 08 ret 2008fd0: 81 e8 00 00 restore =============================================================================== 02009698 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 2009698: 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 ) 200969c: c2 0e 20 b4 ldub [ %i0 + 0xb4 ], %g1 20096a0: 80 a0 60 00 cmp %g1, 0 20096a4: 02 80 00 0d be 20096d8 <_Thread_Stack_Free+0x40> <== NEVER TAKEN 20096a8: 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 ) 20096ac: 03 00 80 6f sethi %hi(0x201bc00), %g1 20096b0: c2 00 61 70 ld [ %g1 + 0x170 ], %g1 ! 201bd70 20096b4: 80 a0 60 00 cmp %g1, 0 20096b8: 02 80 00 06 be 20096d0 <_Thread_Stack_Free+0x38> 20096bc: d0 06 20 bc ld [ %i0 + 0xbc ], %o0 (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 20096c0: 9f c0 40 00 call %g1 20096c4: 01 00 00 00 nop 20096c8: 81 c7 e0 08 ret 20096cc: 81 e8 00 00 restore else _Workspace_Free( the_thread->Start.Initial_stack.area ); 20096d0: 40 00 01 ce call 2009e08 <_Workspace_Free> 20096d4: 91 e8 00 08 restore %g0, %o0, %o0 20096d8: 81 c7 e0 08 ret <== NOT EXECUTED 20096dc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020094e4 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 20094e4: 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 ) 20094e8: 80 a6 20 00 cmp %i0, 0 20094ec: 02 80 00 19 be 2009550 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 20094f0: 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 ) { 20094f4: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 20094f8: 80 a7 20 01 cmp %i4, 1 20094fc: 12 80 00 15 bne 2009550 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 2009500: 01 00 00 00 nop Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 2009504: 7f ff e3 1e call 200217c 2009508: 01 00 00 00 nop 200950c: ba 10 00 08 mov %o0, %i5 2009510: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 2009514: 03 00 00 ef sethi %hi(0x3bc00), %g1 2009518: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200951c: 80 88 80 01 btst %g2, %g1 2009520: 02 80 00 0a be 2009548 <_Thread_queue_Requeue+0x64> <== NEVER TAKEN 2009524: 90 10 00 18 mov %i0, %o0 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 2009528: 92 10 00 19 mov %i1, %o1 200952c: 94 10 20 01 mov 1, %o2 2009530: 40 00 0d f8 call 200cd10 <_Thread_queue_Extract_priority_helper> 2009534: f8 26 20 30 st %i4, [ %i0 + 0x30 ] (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 2009538: 90 10 00 18 mov %i0, %o0 200953c: 92 10 00 19 mov %i1, %o1 2009540: 7f ff ff 50 call 2009280 <_Thread_queue_Enqueue_priority> 2009544: 94 07 bf fc add %fp, -4, %o2 } _ISR_Enable( level ); 2009548: 7f ff e3 11 call 200218c 200954c: 90 10 00 1d mov %i5, %o0 2009550: 81 c7 e0 08 ret 2009554: 81 e8 00 00 restore =============================================================================== 02009558 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 2009558: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 200955c: 90 10 00 18 mov %i0, %o0 2009560: 7f ff fd f5 call 2008d34 <_Thread_Get> 2009564: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2009568: c2 07 bf fc ld [ %fp + -4 ], %g1 200956c: 80 a0 60 00 cmp %g1, 0 2009570: 12 80 00 09 bne 2009594 <_Thread_queue_Timeout+0x3c> <== NEVER TAKEN 2009574: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 2009578: 40 00 0e 1d call 200cdec <_Thread_queue_Process_timeout> 200957c: 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--; 2009580: 03 00 80 72 sethi %hi(0x201c800), %g1 2009584: c4 00 62 b0 ld [ %g1 + 0x2b0 ], %g2 ! 201cab0 <_Thread_Dispatch_disable_level> 2009588: 84 00 bf ff add %g2, -1, %g2 200958c: c4 20 62 b0 st %g2, [ %g1 + 0x2b0 ] return _Thread_Dispatch_disable_level; 2009590: c2 00 62 b0 ld [ %g1 + 0x2b0 ], %g1 2009594: 81 c7 e0 08 ret 2009598: 81 e8 00 00 restore =============================================================================== 0201718c <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 201718c: 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; 2017190: 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; 2017194: a8 07 bf e8 add %fp, -24, %l4 2017198: a4 07 bf ec add %fp, -20, %l2 201719c: b6 07 bf f4 add %fp, -12, %i3 20171a0: b4 07 bf f8 add %fp, -8, %i2 20171a4: e4 27 bf e8 st %l2, [ %fp + -24 ] head->previous = NULL; 20171a8: c0 27 bf ec clr [ %fp + -20 ] tail->previous = head; 20171ac: 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; 20171b0: f4 27 bf f4 st %i2, [ %fp + -12 ] head->previous = NULL; 20171b4: c0 27 bf f8 clr [ %fp + -8 ] tail->previous = head; 20171b8: 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 ); 20171bc: 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 ); 20171c0: 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 ); 20171c4: 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 ); 20171c8: 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; 20171cc: 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(); 20171d0: 2b 00 80 ed sethi %hi(0x203b400), %l5 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 20171d4: c2 04 e0 2c ld [ %l3 + 0x2c ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 20171d8: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 20171dc: 94 10 00 1b mov %i3, %o2 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 20171e0: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 20171e4: 90 10 00 19 mov %i1, %o0 20171e8: 40 00 11 ed call 201b99c <_Watchdog_Adjust_to_chain> 20171ec: 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; 20171f0: 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(); 20171f4: fa 05 63 ac ld [ %l5 + 0x3ac ], %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 ) { 20171f8: 80 a7 40 0a cmp %i5, %o2 20171fc: 08 80 00 06 bleu 2017214 <_Timer_server_Body+0x88> 2017200: 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 ); 2017204: 90 10 00 1c mov %i4, %o0 2017208: 40 00 11 e5 call 201b99c <_Watchdog_Adjust_to_chain> 201720c: 94 10 00 1b mov %i3, %o2 2017210: 30 80 00 06 b,a 2017228 <_Timer_server_Body+0x9c> } else if ( snapshot < last_snapshot ) { 2017214: 1a 80 00 05 bcc 2017228 <_Timer_server_Body+0x9c> 2017218: 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 ); 201721c: 92 10 20 01 mov 1, %o1 2017220: 40 00 11 b8 call 201b900 <_Watchdog_Adjust> 2017224: 94 22 80 1d sub %o2, %i5, %o2 } watchdogs->last_snapshot = snapshot; 2017228: 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 ); 201722c: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 2017230: 40 00 02 d9 call 2017d94 <_Chain_Get> 2017234: 01 00 00 00 nop if ( timer == NULL ) { 2017238: 92 92 20 00 orcc %o0, 0, %o1 201723c: 02 80 00 0c be 201726c <_Timer_server_Body+0xe0> 2017240: 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 ) { 2017244: c2 02 60 38 ld [ %o1 + 0x38 ], %g1 2017248: 80 a0 60 01 cmp %g1, 1 201724c: 02 80 00 05 be 2017260 <_Timer_server_Body+0xd4> 2017250: 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 ) { 2017254: 80 a0 60 03 cmp %g1, 3 2017258: 12 bf ff f5 bne 201722c <_Timer_server_Body+0xa0> <== NEVER TAKEN 201725c: 90 10 00 1c mov %i4, %o0 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 2017260: 40 00 12 01 call 201ba64 <_Watchdog_Insert> 2017264: 92 02 60 10 add %o1, 0x10, %o1 2017268: 30 bf ff f1 b,a 201722c <_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 ); 201726c: 7f ff e3 95 call 20100c0 2017270: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 2017274: c2 07 bf e8 ld [ %fp + -24 ], %g1 2017278: 80 a0 40 12 cmp %g1, %l2 201727c: 12 80 00 0a bne 20172a4 <_Timer_server_Body+0x118> <== NEVER TAKEN 2017280: 01 00 00 00 nop ts->insert_chain = NULL; 2017284: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 2017288: 7f ff e3 92 call 20100d0 201728c: 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 ) ) { 2017290: c2 07 bf f4 ld [ %fp + -12 ], %g1 2017294: 80 a0 40 1a cmp %g1, %i2 2017298: 12 80 00 06 bne 20172b0 <_Timer_server_Body+0x124> 201729c: 01 00 00 00 nop 20172a0: 30 80 00 18 b,a 2017300 <_Timer_server_Body+0x174> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 20172a4: 7f ff e3 8b call 20100d0 <== NOT EXECUTED 20172a8: 01 00 00 00 nop <== NOT EXECUTED 20172ac: 30 bf ff ca b,a 20171d4 <_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 ); 20172b0: 7f ff e3 84 call 20100c0 20172b4: 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; 20172b8: 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)) 20172bc: 80 a7 40 1a cmp %i5, %i2 20172c0: 02 80 00 0d be 20172f4 <_Timer_server_Body+0x168> 20172c4: 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; 20172c8: c2 07 40 00 ld [ %i5 ], %g1 head->next = new_first; new_first->previous = head; 20172cc: 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; 20172d0: c2 27 bf f4 st %g1, [ %fp + -12 ] watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 20172d4: c0 27 60 08 clr [ %i5 + 8 ] _ISR_Enable( level ); 20172d8: 7f ff e3 7e call 20100d0 20172dc: 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 ); 20172e0: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 20172e4: d0 07 60 20 ld [ %i5 + 0x20 ], %o0 20172e8: 9f c0 40 00 call %g1 20172ec: d2 07 60 24 ld [ %i5 + 0x24 ], %o1 } 20172f0: 30 bf ff f0 b,a 20172b0 <_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 ); 20172f4: 7f ff e3 77 call 20100d0 20172f8: 01 00 00 00 nop 20172fc: 30 bf ff b4 b,a 20171cc <_Timer_server_Body+0x40> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 2017300: c0 2e 20 7c clrb [ %i0 + 0x7c ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); 2017304: 7f ff ff 73 call 20170d0 <_Thread_Disable_dispatch> 2017308: 01 00 00 00 nop _Thread_Set_state( ts->thread, STATES_DELAYING ); 201730c: d0 06 00 00 ld [ %i0 ], %o0 2017310: 40 00 10 02 call 201b318 <_Thread_Set_state> 2017314: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 2017318: 7f ff ff 75 call 20170ec <_Timer_server_Reset_interval_system_watchdog> 201731c: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 2017320: 7f ff ff 87 call 201713c <_Timer_server_Reset_tod_system_watchdog> 2017324: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 2017328: 40 00 0d aa call 201a9d0 <_Thread_Enable_dispatch> 201732c: 01 00 00 00 nop ts->active = true; 2017330: 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 ); 2017334: 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; 2017338: 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 ); 201733c: 40 00 12 24 call 201bbcc <_Watchdog_Remove> 2017340: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 2017344: 40 00 12 22 call 201bbcc <_Watchdog_Remove> 2017348: 90 10 00 10 mov %l0, %o0 201734c: 30 bf ff a0 b,a 20171cc <_Timer_server_Body+0x40> =============================================================================== 02017350 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 2017350: 9d e3 bf a0 save %sp, -96, %sp if ( ts->insert_chain == NULL ) { 2017354: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 2017358: 80 a0 60 00 cmp %g1, 0 201735c: 12 80 00 49 bne 2017480 <_Timer_server_Schedule_operation_method+0x130> 2017360: 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(); 2017364: 7f ff ff 5b call 20170d0 <_Thread_Disable_dispatch> 2017368: 01 00 00 00 nop if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 201736c: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 2017370: 80 a0 60 01 cmp %g1, 1 2017374: 12 80 00 1f bne 20173f0 <_Timer_server_Schedule_operation_method+0xa0> 2017378: 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 ); 201737c: 7f ff e3 51 call 20100c0 2017380: 01 00 00 00 nop snapshot = _Watchdog_Ticks_since_boot; 2017384: 03 00 80 ee sethi %hi(0x203b800), %g1 2017388: c4 00 60 2c ld [ %g1 + 0x2c ], %g2 ! 203b82c <_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; 201738c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 2017390: 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 ); 2017394: 86 06 20 34 add %i0, 0x34, %g3 if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 2017398: 80 a0 40 03 cmp %g1, %g3 201739c: 02 80 00 08 be 20173bc <_Timer_server_Schedule_operation_method+0x6c> 20173a0: 88 20 80 04 sub %g2, %g4, %g4 /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; 20173a4: de 00 60 10 ld [ %g1 + 0x10 ], %o7 if (delta_interval > delta) { 20173a8: 80 a3 c0 04 cmp %o7, %g4 20173ac: 08 80 00 03 bleu 20173b8 <_Timer_server_Schedule_operation_method+0x68> 20173b0: 86 10 20 00 clr %g3 delta_interval -= delta; 20173b4: 86 23 c0 04 sub %o7, %g4, %g3 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 20173b8: c6 20 60 10 st %g3, [ %g1 + 0x10 ] } ts->Interval_watchdogs.last_snapshot = snapshot; 20173bc: c4 26 20 3c st %g2, [ %i0 + 0x3c ] _ISR_Enable( level ); 20173c0: 7f ff e3 44 call 20100d0 20173c4: 01 00 00 00 nop _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 20173c8: 90 06 20 30 add %i0, 0x30, %o0 20173cc: 40 00 11 a6 call 201ba64 <_Watchdog_Insert> 20173d0: 92 07 60 10 add %i5, 0x10, %o1 if ( !ts->active ) { 20173d4: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 20173d8: 80 a0 60 00 cmp %g1, 0 20173dc: 12 80 00 27 bne 2017478 <_Timer_server_Schedule_operation_method+0x128> 20173e0: 01 00 00 00 nop _Timer_server_Reset_interval_system_watchdog( ts ); 20173e4: 7f ff ff 42 call 20170ec <_Timer_server_Reset_interval_system_watchdog> 20173e8: 90 10 00 18 mov %i0, %o0 20173ec: 30 80 00 23 b,a 2017478 <_Timer_server_Schedule_operation_method+0x128> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 20173f0: 12 80 00 22 bne 2017478 <_Timer_server_Schedule_operation_method+0x128> 20173f4: 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 ); 20173f8: 7f ff e3 32 call 20100c0 20173fc: 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; 2017400: c4 06 20 68 ld [ %i0 + 0x68 ], %g2 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; 2017404: 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(); 2017408: 03 00 80 ed sethi %hi(0x203b400), %g1 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 201740c: 86 06 20 6c add %i0, 0x6c, %g3 last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 2017410: 80 a0 80 03 cmp %g2, %g3 2017414: 02 80 00 0d be 2017448 <_Timer_server_Schedule_operation_method+0xf8> 2017418: c2 00 63 ac ld [ %g1 + 0x3ac ], %g1 first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 201741c: c8 00 a0 10 ld [ %g2 + 0x10 ], %g4 if ( snapshot > last_snapshot ) { 2017420: 80 a0 40 0f cmp %g1, %o7 } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 2017424: 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 ) { 2017428: 08 80 00 07 bleu 2017444 <_Timer_server_Schedule_operation_method+0xf4> 201742c: 86 20 c0 01 sub %g3, %g1, %g3 /* * We advanced in time. */ delta = snapshot - last_snapshot; 2017430: 9e 20 40 0f sub %g1, %o7, %o7 if (delta_interval > delta) { 2017434: 80 a1 00 0f cmp %g4, %o7 2017438: 08 80 00 03 bleu 2017444 <_Timer_server_Schedule_operation_method+0xf4><== NEVER TAKEN 201743c: 86 10 20 00 clr %g3 delta_interval -= delta; 2017440: 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; 2017444: c6 20 a0 10 st %g3, [ %g2 + 0x10 ] } ts->TOD_watchdogs.last_snapshot = snapshot; 2017448: c2 26 20 74 st %g1, [ %i0 + 0x74 ] _ISR_Enable( level ); 201744c: 7f ff e3 21 call 20100d0 2017450: 01 00 00 00 nop _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 2017454: 90 06 20 68 add %i0, 0x68, %o0 2017458: 40 00 11 83 call 201ba64 <_Watchdog_Insert> 201745c: 92 07 60 10 add %i5, 0x10, %o1 if ( !ts->active ) { 2017460: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 2017464: 80 a0 60 00 cmp %g1, 0 2017468: 12 80 00 04 bne 2017478 <_Timer_server_Schedule_operation_method+0x128> 201746c: 01 00 00 00 nop _Timer_server_Reset_tod_system_watchdog( ts ); 2017470: 7f ff ff 33 call 201713c <_Timer_server_Reset_tod_system_watchdog> 2017474: 90 10 00 18 mov %i0, %o0 } } _Thread_Enable_dispatch(); 2017478: 40 00 0d 56 call 201a9d0 <_Thread_Enable_dispatch> 201747c: 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 ); 2017480: f0 06 20 78 ld [ %i0 + 0x78 ], %i0 2017484: 40 00 02 30 call 2017d44 <_Chain_Append> 2017488: 81 e8 00 00 restore =============================================================================== 02009828 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 2009828: 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; 200982c: 03 00 80 6f sethi %hi(0x201bc00), %g1 2009830: 82 10 61 4c or %g1, 0x14c, %g1 ! 201bd4c ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 2009834: 05 00 80 73 sethi %hi(0x201cc00), %g2 initial_extensions = Configuration.User_extension_table; 2009838: 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; 200983c: f6 00 60 38 ld [ %g1 + 0x38 ], %i3 2009840: 82 10 a0 98 or %g2, 0x98, %g1 2009844: 86 00 60 04 add %g1, 4, %g3 head->previous = NULL; 2009848: c0 20 60 04 clr [ %g1 + 4 ] tail->previous = head; 200984c: 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; 2009850: c6 20 a0 98 st %g3, [ %g2 + 0x98 ] 2009854: 05 00 80 72 sethi %hi(0x201c800), %g2 2009858: 82 10 a2 b4 or %g2, 0x2b4, %g1 ! 201cab4 <_User_extensions_Switches_list> 200985c: 86 00 60 04 add %g1, 4, %g3 head->previous = NULL; 2009860: c0 20 60 04 clr [ %g1 + 4 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 2009864: c6 20 a2 b4 st %g3, [ %g2 + 0x2b4 ] initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 2009868: 80 a6 a0 00 cmp %i2, 0 200986c: 02 80 00 1b be 20098d8 <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN 2009870: c2 20 60 08 st %g1, [ %g1 + 8 ] extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) 2009874: 83 2e e0 02 sll %i3, 2, %g1 2009878: bb 2e e0 04 sll %i3, 4, %i5 200987c: ba 27 40 01 sub %i5, %g1, %i5 2009880: ba 07 40 1b add %i5, %i3, %i5 2009884: 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 *) 2009888: 40 00 01 66 call 2009e20 <_Workspace_Allocate_or_fatal_error> 200988c: 90 10 00 1d mov %i5, %o0 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 2009890: 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 *) 2009894: b8 10 00 08 mov %o0, %i4 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 2009898: 92 10 20 00 clr %o1 200989c: 40 00 17 2e call 200f554 20098a0: ba 10 20 00 clr %i5 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 20098a4: 10 80 00 0b b 20098d0 <_User_extensions_Handler_initialization+0xa8> 20098a8: 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; 20098ac: 90 07 20 14 add %i4, 0x14, %o0 20098b0: 92 06 80 09 add %i2, %o1, %o1 20098b4: 40 00 16 ec call 200f464 20098b8: 94 10 20 20 mov 0x20, %o2 _User_extensions_Add_set( extension ); 20098bc: 90 10 00 1c mov %i4, %o0 20098c0: 40 00 0d 8b call 200ceec <_User_extensions_Add_set> 20098c4: ba 07 60 01 inc %i5 _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 20098c8: 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++ ) { 20098cc: 80 a7 40 1b cmp %i5, %i3 20098d0: 12 bf ff f7 bne 20098ac <_User_extensions_Handler_initialization+0x84> 20098d4: 93 2f 60 05 sll %i5, 5, %o1 20098d8: 81 c7 e0 08 ret 20098dc: 81 e8 00 00 restore =============================================================================== 0200b5a4 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200b5a4: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 200b5a8: 7f ff de 94 call 2002ff8 200b5ac: 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; 200b5b0: 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 ); 200b5b4: 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 ) ) { 200b5b8: 80 a0 40 1c cmp %g1, %i4 200b5bc: 02 80 00 1f be 200b638 <_Watchdog_Adjust+0x94> 200b5c0: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200b5c4: 02 80 00 1a be 200b62c <_Watchdog_Adjust+0x88> 200b5c8: b6 10 20 01 mov 1, %i3 200b5cc: 80 a6 60 01 cmp %i1, 1 200b5d0: 12 80 00 1a bne 200b638 <_Watchdog_Adjust+0x94> <== NEVER TAKEN 200b5d4: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200b5d8: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200b5dc: 10 80 00 07 b 200b5f8 <_Watchdog_Adjust+0x54> 200b5e0: b4 00 80 1a add %g2, %i2, %i2 break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 200b5e4: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200b5e8: 80 a6 80 02 cmp %i2, %g2 200b5ec: 3a 80 00 05 bcc,a 200b600 <_Watchdog_Adjust+0x5c> 200b5f0: f6 20 60 10 st %i3, [ %g1 + 0x10 ] _Watchdog_First( header )->delta_interval -= units; 200b5f4: b4 20 80 1a sub %g2, %i2, %i2 break; 200b5f8: 10 80 00 10 b 200b638 <_Watchdog_Adjust+0x94> 200b5fc: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } else { units -= _Watchdog_First( header )->delta_interval; 200b600: b4 26 80 02 sub %i2, %g2, %i2 _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); 200b604: 7f ff de 81 call 2003008 200b608: 01 00 00 00 nop _Watchdog_Tickle( header ); 200b60c: 40 00 00 90 call 200b84c <_Watchdog_Tickle> 200b610: 90 10 00 1d mov %i5, %o0 _ISR_Disable( level ); 200b614: 7f ff de 79 call 2002ff8 200b618: 01 00 00 00 nop if ( _Chain_Is_empty( header ) ) 200b61c: c2 07 40 00 ld [ %i5 ], %g1 200b620: 80 a0 40 1c cmp %g1, %i4 200b624: 02 80 00 05 be 200b638 <_Watchdog_Adjust+0x94> 200b628: 01 00 00 00 nop switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200b62c: 80 a6 a0 00 cmp %i2, 0 200b630: 32 bf ff ed bne,a 200b5e4 <_Watchdog_Adjust+0x40> <== ALWAYS TAKEN 200b634: c2 07 40 00 ld [ %i5 ], %g1 } break; } } _ISR_Enable( level ); 200b638: 7f ff de 74 call 2003008 200b63c: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02009c40 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 2009c40: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 2009c44: 7f ff e1 4e call 200217c 2009c48: ba 10 00 18 mov %i0, %i5 previous_state = the_watchdog->state; 2009c4c: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 2009c50: 80 a6 20 01 cmp %i0, 1 2009c54: 22 80 00 1d be,a 2009cc8 <_Watchdog_Remove+0x88> 2009c58: c0 27 60 08 clr [ %i5 + 8 ] 2009c5c: 0a 80 00 1c bcs 2009ccc <_Watchdog_Remove+0x8c> 2009c60: 03 00 80 72 sethi %hi(0x201c800), %g1 2009c64: 80 a6 20 03 cmp %i0, 3 2009c68: 18 80 00 19 bgu 2009ccc <_Watchdog_Remove+0x8c> <== NEVER TAKEN 2009c6c: 01 00 00 00 nop 2009c70: c2 07 40 00 ld [ %i5 ], %g1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 2009c74: c0 27 60 08 clr [ %i5 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 2009c78: c4 00 40 00 ld [ %g1 ], %g2 2009c7c: 80 a0 a0 00 cmp %g2, 0 2009c80: 02 80 00 07 be 2009c9c <_Watchdog_Remove+0x5c> 2009c84: 05 00 80 72 sethi %hi(0x201c800), %g2 next_watchdog->delta_interval += the_watchdog->delta_interval; 2009c88: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 2009c8c: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 2009c90: 84 00 c0 02 add %g3, %g2, %g2 2009c94: c4 20 60 10 st %g2, [ %g1 + 0x10 ] if ( _Watchdog_Sync_count ) 2009c98: 05 00 80 72 sethi %hi(0x201c800), %g2 2009c9c: c4 00 a3 b8 ld [ %g2 + 0x3b8 ], %g2 ! 201cbb8 <_Watchdog_Sync_count> 2009ca0: 80 a0 a0 00 cmp %g2, 0 2009ca4: 22 80 00 07 be,a 2009cc0 <_Watchdog_Remove+0x80> 2009ca8: c4 07 60 04 ld [ %i5 + 4 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 2009cac: 05 00 80 73 sethi %hi(0x201cc00), %g2 2009cb0: c6 00 a3 f0 ld [ %g2 + 0x3f0 ], %g3 ! 201cff0 <_Per_CPU_Information+0x8> 2009cb4: 05 00 80 72 sethi %hi(0x201c800), %g2 2009cb8: c6 20 a3 58 st %g3, [ %g2 + 0x358 ] ! 201cb58 <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 2009cbc: c4 07 60 04 ld [ %i5 + 4 ], %g2 next->previous = previous; 2009cc0: c4 20 60 04 st %g2, [ %g1 + 4 ] previous->next = next; 2009cc4: c2 20 80 00 st %g1, [ %g2 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 2009cc8: 03 00 80 72 sethi %hi(0x201c800), %g1 2009ccc: c2 00 63 bc ld [ %g1 + 0x3bc ], %g1 ! 201cbbc <_Watchdog_Ticks_since_boot> 2009cd0: c2 27 60 18 st %g1, [ %i5 + 0x18 ] _ISR_Enable( level ); 2009cd4: 7f ff e1 2e call 200218c 2009cd8: 01 00 00 00 nop return( previous_state ); } 2009cdc: 81 c7 e0 08 ret 2009ce0: 81 e8 00 00 restore =============================================================================== 0200ad90 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 200ad90: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 200ad94: 7f ff df 69 call 2002b38 200ad98: ba 10 00 18 mov %i0, %i5 200ad9c: b0 10 00 08 mov %o0, %i0 printk( "Watchdog Chain: %s %p\n", name, header ); 200ada0: 11 00 80 72 sethi %hi(0x201c800), %o0 200ada4: 94 10 00 19 mov %i1, %o2 200ada8: 90 12 20 c0 or %o0, 0xc0, %o0 200adac: 7f ff e6 19 call 2004610 200adb0: 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; 200adb4: 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 ); 200adb8: b2 06 60 04 add %i1, 4, %i1 if ( !_Chain_Is_empty( header ) ) { 200adbc: 80 a7 00 19 cmp %i4, %i1 200adc0: 12 80 00 04 bne 200add0 <_Watchdog_Report_chain+0x40> 200adc4: 92 10 00 1c mov %i4, %o1 _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 200adc8: 10 80 00 0d b 200adfc <_Watchdog_Report_chain+0x6c> 200adcc: 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 ); 200add0: 40 00 00 0f call 200ae0c <_Watchdog_Report> 200add4: 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 ) 200add8: 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 ) ; 200addc: 80 a7 00 19 cmp %i4, %i1 200ade0: 12 bf ff fc bne 200add0 <_Watchdog_Report_chain+0x40> <== NEVER TAKEN 200ade4: 92 10 00 1c mov %i4, %o1 { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 200ade8: 11 00 80 72 sethi %hi(0x201c800), %o0 200adec: 92 10 00 1d mov %i5, %o1 200adf0: 7f ff e6 08 call 2004610 200adf4: 90 12 20 d8 or %o0, 0xd8, %o0 200adf8: 30 80 00 03 b,a 200ae04 <_Watchdog_Report_chain+0x74> } else { printk( "Chain is empty\n" ); 200adfc: 7f ff e6 05 call 2004610 200ae00: 90 12 20 e8 or %o0, 0xe8, %o0 } _ISR_Enable( level ); 200ae04: 7f ff df 51 call 2002b48 200ae08: 81 e8 00 00 restore =============================================================================== 02012d68 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 2012d68: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 2012d6c: 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; 2012d70: c0 27 bf fc clr [ %fp + -4 ] uint32_t c = 0; while (count > 0) 2012d74: 10 80 00 18 b 2012dd4 <_fat_block_read+0x6c> 2012d78: b0 10 20 00 clr %i0 { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 2012d7c: 92 10 00 19 mov %i1, %o1 2012d80: 94 10 20 01 mov 1, %o2 2012d84: 7f ff ff 20 call 2012a04 2012d88: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2012d8c: 80 a2 20 00 cmp %o0, 0 2012d90: 12 80 00 16 bne 2012de8 <_fat_block_read+0x80> <== NEVER TAKEN 2012d94: 01 00 00 00 nop return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 2012d98: e0 17 40 00 lduh [ %i5 ], %l0 2012d9c: a0 24 00 1a sub %l0, %i2, %l0 2012da0: 80 a4 00 1b cmp %l0, %i3 2012da4: 38 80 00 02 bgu,a 2012dac <_fat_block_read+0x44> 2012da8: a0 10 00 1b mov %i3, %l0 memcpy((buff + cmpltd), (block->buffer + ofs), c); 2012dac: c2 07 bf fc ld [ %fp + -4 ], %g1 2012db0: 90 07 00 18 add %i4, %i0, %o0 2012db4: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 2012db8: 94 10 00 10 mov %l0, %o2 2012dbc: 92 02 40 1a add %o1, %i2, %o1 2012dc0: 40 00 27 df call 201cd3c 2012dc4: b6 26 c0 10 sub %i3, %l0, %i3 count -= c; cmpltd += c; 2012dc8: b0 04 00 18 add %l0, %i0, %i0 blk++; 2012dcc: b2 06 60 01 inc %i1 ofs = 0; 2012dd0: 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) 2012dd4: 80 a6 e0 00 cmp %i3, 0 2012dd8: 12 bf ff e9 bne 2012d7c <_fat_block_read+0x14> 2012ddc: 90 10 00 1d mov %i5, %o0 2012de0: 81 c7 e0 08 ret 2012de4: 81 e8 00 00 restore cmpltd += c; blk++; ofs = 0; } return cmpltd; } 2012de8: 81 c7 e0 08 ret <== NOT EXECUTED 2012dec: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02012e88 <_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); 2012e88: d0 02 20 34 ld [ %o0 + 0x34 ], %o0 <== NOT EXECUTED 2012e8c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2012e90: 7f ff ff 5c call 2012c00 <== NOT EXECUTED 2012e94: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02012df0 <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 2012df0: 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; 2012df4: a2 10 20 01 mov 1, %l1 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2012df8: 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; 2012dfc: c0 27 bf fc clr [ %fp + -4 ] uint32_t c = 0; while(count > 0) 2012e00: 10 80 00 1b b 2012e6c <_fat_block_write+0x7c> 2012e04: b0 10 20 00 clr %i0 { c = MIN(count, (fs_info->vol.bps - ofs)); 2012e08: a0 20 40 1a sub %g1, %i2, %l0 2012e0c: 80 a4 00 1b cmp %l0, %i3 2012e10: 38 80 00 02 bgu,a 2012e18 <_fat_block_write+0x28> 2012e14: 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); 2012e18: 90 10 00 1d mov %i5, %o0 2012e1c: 92 10 00 19 mov %i1, %o1 while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) 2012e20: 80 a4 00 01 cmp %l0, %g1 2012e24: 02 80 00 03 be 2012e30 <_fat_block_write+0x40> 2012e28: 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); 2012e2c: 94 10 20 01 mov 1, %o2 2012e30: 7f ff fe f5 call 2012a04 2012e34: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2012e38: 80 a2 20 00 cmp %o0, 0 2012e3c: 12 80 00 11 bne 2012e80 <_fat_block_write+0x90> <== NEVER TAKEN 2012e40: c2 07 bf fc ld [ %fp + -4 ], %g1 return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 2012e44: 92 07 00 18 add %i4, %i0, %o1 2012e48: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 2012e4c: 94 10 00 10 mov %l0, %o2 2012e50: 90 02 00 1a add %o0, %i2, %o0 2012e54: 40 00 27 ba call 201cd3c 2012e58: b6 26 c0 10 sub %i3, %l0, %i3 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 2012e5c: b0 04 00 18 add %l0, %i0, %i0 2012e60: e2 2f 60 84 stb %l1, [ %i5 + 0x84 ] blk++; 2012e64: b2 06 60 01 inc %i1 ofs = 0; 2012e68: 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) 2012e6c: 80 a6 e0 00 cmp %i3, 0 2012e70: 32 bf ff e6 bne,a 2012e08 <_fat_block_write+0x18> 2012e74: c2 17 40 00 lduh [ %i5 ], %g1 2012e78: 81 c7 e0 08 ret 2012e7c: 81 e8 00 00 restore cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 2012e80: 81 c7 e0 08 ret <== NOT EXECUTED 2012e84: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02011d88 <_hash_search>: rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { 2011d88: 9d e3 bf a0 save %sp, -96, %sp uint32_t mod = (key1) % FAT_HASH_MODULE; 2011d8c: 84 0e a0 01 and %i2, 1, %g2 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 2011d90: 87 28 a0 02 sll %g2, 2, %g3 2011d94: 83 28 a0 04 sll %g2, 4, %g1 2011d98: 82 20 40 03 sub %g1, %g3, %g1 2011d9c: 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; 2011da0: fa 06 40 01 ld [ %i1 + %g1 ], %i5 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 2011da4: 10 80 00 11 b 2011de8 <_hash_search+0x60> 2011da8: 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); 2011dac: 7f ff ff e5 call 2011d40 2011db0: 92 07 60 20 add %i5, 0x20, %o1 if ( (key1) == ck) 2011db4: 80 a6 80 08 cmp %i2, %o0 2011db8: 32 80 00 0c bne,a 2011de8 <_hash_search+0x60> 2011dbc: fa 07 40 00 ld [ %i5 ], %i5 { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 2011dc0: 80 a6 e0 00 cmp %i3, 0 2011dc4: 22 80 00 07 be,a 2011de0 <_hash_search+0x58> <== ALWAYS TAKEN 2011dc8: fa 27 00 00 st %i5, [ %i4 ] 2011dcc: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED 2011dd0: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED 2011dd4: 32 80 00 05 bne,a 2011de8 <_hash_search+0x60> <== NOT EXECUTED 2011dd8: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED { *ret = (void *)the_node; 2011ddc: fa 27 00 00 st %i5, [ %i4 ] <== NOT EXECUTED return 0; 2011de0: 81 c7 e0 08 ret 2011de4: 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) ; ) 2011de8: 80 a7 40 19 cmp %i5, %i1 2011dec: 12 bf ff f0 bne 2011dac <_hash_search+0x24> 2011df0: 90 10 00 18 mov %i0, %o0 } } the_node = the_node->next; } return -1; } 2011df4: 81 c7 e0 08 ret 2011df8: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 0201f454 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 201f454: 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 ); 201f458: 7f ff 96 b7 call 2004f34 201f45c: 90 10 00 19 mov %i1, %o0 201f460: b8 10 00 08 mov %o0, %i4 if ( old_parent_pathlen == 0 ) 201f464: 80 a7 20 00 cmp %i4, 0 201f468: 12 80 00 08 bne 201f488 <_rename_r+0x34> 201f46c: 90 10 00 19 mov %i1, %o0 rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 201f470: 92 07 bf f8 add %fp, -8, %o1 201f474: 94 07 bf d0 add %fp, -48, %o2 201f478: 7f ff 9c 9f call 20066f4 201f47c: ba 10 20 00 clr %i5 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 201f480: 10 80 00 0c b 201f4b0 <_rename_r+0x5c> 201f484: 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, 201f488: 92 10 00 1c mov %i4, %o1 201f48c: 94 10 20 02 mov 2, %o2 201f490: 96 07 bf d0 add %fp, -48, %o3 201f494: 98 10 20 00 clr %o4 201f498: 7f ff 96 98 call 2004ef8 201f49c: b0 10 3f ff mov -1, %i0 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 201f4a0: 80 a2 20 00 cmp %o0, 0 201f4a4: 12 80 00 1e bne 201f51c <_rename_r+0xc8> <== NEVER TAKEN 201f4a8: 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; 201f4ac: 94 10 20 14 mov 0x14, %o2 201f4b0: 92 07 bf d0 add %fp, -48, %o1 201f4b4: 7f ff ca 4b call 2011de0 201f4b8: 90 07 bf bc add %fp, -68, %o0 name = old + old_parent_pathlen; 201f4bc: b2 06 40 1c add %i1, %i4, %i1 201f4c0: f2 27 bf fc st %i1, [ %fp + -4 ] name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 201f4c4: 7f ff cd 3a call 20129ac 201f4c8: 90 10 00 19 mov %i1, %o0 201f4cc: 92 10 00 08 mov %o0, %o1 201f4d0: 7f ff 96 a8 call 2004f70 201f4d4: 90 10 00 19 mov %i1, %o0 201f4d8: b2 06 40 08 add %i1, %o0, %i1 201f4dc: f2 27 bf fc st %i1, [ %fp + -4 ] result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 201f4e0: 7f ff cd 33 call 20129ac 201f4e4: 90 10 00 19 mov %i1, %o0 201f4e8: 94 10 20 00 clr %o2 201f4ec: 92 10 00 08 mov %o0, %o1 201f4f0: 96 07 bf bc add %fp, -68, %o3 201f4f4: 90 10 00 19 mov %i1, %o0 201f4f8: 7f ff 96 64 call 2004e88 201f4fc: 98 10 20 00 clr %o4 0, &old_loc, false ); if ( result != 0 ) { 201f500: 80 a2 20 00 cmp %o0, 0 201f504: 02 80 00 08 be 201f524 <_rename_r+0xd0> 201f508: 80 8f 60 ff btst 0xff, %i5 if ( free_old_parentloc ) 201f50c: 02 80 00 04 be 201f51c <_rename_r+0xc8> 201f510: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( &old_parent_loc ); 201f514: 7f ff 96 eb call 20050c0 201f518: 90 07 bf d0 add %fp, -48, %o0 201f51c: 81 c7 e0 08 ret 201f520: 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 ); 201f524: 90 10 00 1a mov %i2, %o0 201f528: 92 07 bf f8 add %fp, -8, %o1 201f52c: 7f ff 9c 72 call 20066f4 201f530: 94 07 bf e4 add %fp, -28, %o2 result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 201f534: c2 07 bf f0 ld [ %fp + -16 ], %g1 201f538: d0 07 bf f8 ld [ %fp + -8 ], %o0 201f53c: c2 00 60 04 ld [ %g1 + 4 ], %g1 201f540: 90 06 80 08 add %i2, %o0, %o0 201f544: 92 07 bf e4 add %fp, -28, %o1 201f548: 9f c0 40 00 call %g1 201f54c: 94 07 bf fc add %fp, -4, %o2 if ( result != 0 ) { 201f550: 80 a2 20 00 cmp %o0, 0 201f554: 02 80 00 0d be 201f588 <_rename_r+0x134> 201f558: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_filesystem_freenode( &new_parent_loc ); 201f55c: 7f ff 96 d9 call 20050c0 201f560: 90 07 bf e4 add %fp, -28, %o0 if ( free_old_parentloc ) 201f564: 80 8f 60 ff btst 0xff, %i5 201f568: 02 80 00 04 be 201f578 <_rename_r+0x124> 201f56c: 01 00 00 00 nop rtems_filesystem_freenode( &old_parent_loc ); 201f570: 7f ff 96 d4 call 20050c0 201f574: 90 07 bf d0 add %fp, -48, %o0 rtems_filesystem_freenode( &old_loc ); 201f578: 7f ff 96 d2 call 20050c0 201f57c: 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 ); 201f580: 81 c7 e0 08 ret 201f584: 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 ) { 201f588: c4 07 bf e0 ld [ %fp + -32 ], %g2 201f58c: 80 a0 80 01 cmp %g2, %g1 201f590: 02 80 00 11 be 201f5d4 <_rename_r+0x180> 201f594: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &new_parent_loc ); 201f598: 7f ff 96 ca call 20050c0 201f59c: 90 07 bf e4 add %fp, -28, %o0 if ( free_old_parentloc ) 201f5a0: 80 8f 60 ff btst 0xff, %i5 201f5a4: 02 80 00 04 be 201f5b4 <_rename_r+0x160> 201f5a8: 01 00 00 00 nop rtems_filesystem_freenode( &old_parent_loc ); 201f5ac: 7f ff 96 c5 call 20050c0 201f5b0: 90 07 bf d0 add %fp, -48, %o0 rtems_filesystem_freenode( &old_loc ); 201f5b4: 7f ff 96 c3 call 20050c0 201f5b8: 90 07 bf bc add %fp, -68, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 201f5bc: 7f ff c7 ad call 2011470 <__errno> 201f5c0: 01 00 00 00 nop 201f5c4: 82 10 20 12 mov 0x12, %g1 ! 12 201f5c8: c2 22 00 00 st %g1, [ %o0 ] 201f5cc: 81 c7 e0 08 ret 201f5d0: 91 e8 3f ff restore %g0, -1, %o0 } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 201f5d4: d6 07 bf fc ld [ %fp + -4 ], %o3 201f5d8: c2 00 60 40 ld [ %g1 + 0x40 ], %g1 201f5dc: 92 07 bf bc add %fp, -68, %o1 201f5e0: 94 07 bf e4 add %fp, -28, %o2 201f5e4: 9f c0 40 00 call %g1 201f5e8: 90 07 bf d0 add %fp, -48, %o0 201f5ec: b0 10 00 08 mov %o0, %i0 rtems_filesystem_freenode( &new_parent_loc ); 201f5f0: 7f ff 96 b4 call 20050c0 201f5f4: 90 07 bf e4 add %fp, -28, %o0 if ( free_old_parentloc ) 201f5f8: 80 8f 60 ff btst 0xff, %i5 201f5fc: 02 80 00 04 be 201f60c <_rename_r+0x1b8> 201f600: 01 00 00 00 nop rtems_filesystem_freenode( &old_parent_loc ); 201f604: 7f ff 96 af call 20050c0 201f608: 90 07 bf d0 add %fp, -48, %o0 rtems_filesystem_freenode( &old_loc ); 201f60c: 7f ff 96 ad call 20050c0 201f610: 90 07 bf bc add %fp, -68, %o0 return result; } 201f614: 81 c7 e0 08 ret 201f618: 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 2c or %i5, 0x32c, %o0 ! 2018b2c if (fcntl (fildes, F_GETFD) < 0) { 200681c: 90 10 00 18 mov %i0, %o0 2006820: 40 00 1c 94 call 200da70 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 2c or %i5, 0x32c, %o0 rtems_set_errno_and_return_minus_one (EBADF); 200683c: 40 00 29 e6 call 2010fd4 <__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 74 or %o0, 0x374, %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 2c or %i5, 0x32c, %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 2c or %i5, 0x32c, %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 2c or %i5, 0x32c, %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 74 or %o0, 0x374, %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 2c or %i5, 0x32c, %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 99 call 2010fd4 <__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 2c or %i5, 0x32c, %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 1a call 200da70 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 63 call 2010fd4 <__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 25 call 200da70 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 64 call 2010fd4 <__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 19 fe call 200da70 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 3e call 2010fd4 <__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 94 ld [ %i4 + 0x394 ], %i5 ! 2021f94 2004d34: 03 00 80 8a sethi %hi(0x2022800), %g1 2004d38: 82 10 61 54 or %g1, 0x154, %g1 ! 2022954 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 94 ld [ %i4 + 0x394 ], %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 c4 call 2011470 <__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 98 or %o0, 0x98, %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 af call 2011470 <__errno> 2004db8: b0 10 3f ff mov -1, %i0 2004dbc: 40 00 31 ad call 2011470 <__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 94 ld [ %i5 + 0x394 ], %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 94 ld [ %i5 + 0x394 ], %o0 2004de8: 92 07 bf ec add %fp, -20, %o1 2004dec: 94 10 20 14 mov 0x14, %o2 2004df0: 40 00 33 fc call 2011de0 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 39 call 200f734 <__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 ca call 2007d90 <_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 de call 2007e00 <_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 25 call 200f734 <__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 1f call 200f734 <__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 0c call 200f734 <__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 50 ld [ %g1 + 0x150 ], %g2 2005f18: 84 00 a0 01 inc %g2 2005f1c: c4 20 61 50 st %g2, [ %g1 + 0x150 ] return _Thread_Dispatch_disable_level; 2005f20: c2 00 61 50 ld [ %g1 + 0x150 ], %g1 _Thread_Disable_dispatch(); _TOD_Set( tp ); 2005f24: 40 00 07 cd call 2007e58 <_TOD_Set> 2005f28: b0 10 20 00 clr %i0 _Thread_Enable_dispatch(); 2005f2c: 40 00 0e 01 call 2009730 <_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 25 f9 call 200f734 <__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 25 f3 call 200f734 <__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 00 ld [ %g1 + 0x300 ], %l1 ! 2019700 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 04 ld [ %g1 + 0x304 ], %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 ea call 2013078 <== 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 04 st %l0, [ %g1 + 0x304 ] ! 2019704 <== NOT EXECUTED disktab_size = new_size; 20028e0: 03 00 80 65 sethi %hi(0x2019400), %g1 <== NOT EXECUTED 20028e4: f8 20 63 00 st %i4, [ %g1 + 0x300 ] ! 2019700 <== NOT EXECUTED } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 20028e8: 03 00 80 65 sethi %hi(0x2019400), %g1 20028ec: e4 00 63 04 ld [ %g1 + 0x304 ], %l2 ! 2019704 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 c8 call 2013078 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 8f call 20133f0 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 =============================================================================== 0200a074 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 200a074: 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 ) ) 200a078: 80 8e bf f8 btst -8, %i2 200a07c: 22 80 00 06 be,a 200a094 <== ALWAYS TAKEN 200a080: fa 06 c0 00 ld [ %i3 ], %i5 rtems_set_errno_and_return_minus_one( EPERM ); 200a084: 40 00 0a ea call 200cc2c <__errno> <== NOT EXECUTED 200a088: 01 00 00 00 nop <== NOT EXECUTED 200a08c: 10 80 00 09 b 200a0b0 <== NOT EXECUTED 200a090: 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) 200a094: b8 10 20 00 clr %i4 200a098: 80 a7 60 00 cmp %i5, 0 200a09c: 12 80 00 24 bne 200a12c 200a0a0: 21 00 80 60 sethi %hi(0x2018000), %l0 rtems_set_errno_and_return_minus_one( EFAULT ); 200a0a4: 40 00 0a e2 call 200cc2c <__errno> 200a0a8: 01 00 00 00 nop 200a0ac: 82 10 20 0e mov 0xe, %g1 ! e 200a0b0: c2 22 00 00 st %g1, [ %o0 ] 200a0b4: 81 c7 e0 08 ret 200a0b8: 91 e8 3f ff restore %g0, -1, %o0 for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 200a0bc: 80 a6 a0 00 cmp %i2, 0 200a0c0: 02 80 00 19 be 200a124 200a0c4: 90 10 00 18 mov %i0, %o0 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 200a0c8: 92 10 00 1a mov %i2, %o1 200a0cc: 40 00 10 3a call 200e1b4 200a0d0: 94 10 00 19 mov %i1, %o2 200a0d4: 80 a2 20 00 cmp %o0, 0 200a0d8: 32 80 00 14 bne,a 200a128 200a0dc: b8 07 20 01 inc %i4 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 200a0e0: c2 4e 80 19 ldsb [ %i2 + %i1 ], %g1 200a0e4: 80 a0 60 00 cmp %g1, 0 200a0e8: 32 80 00 10 bne,a 200a128 200a0ec: 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; 200a0f0: 03 00 80 60 sethi %hi(0x2018000), %g1 200a0f4: 82 10 63 2c or %g1, 0x32c, %g1 ! 201832c 200a0f8: c2 26 e0 08 st %g1, [ %i3 + 8 ] pathloc->ops = &devFS_ops; 200a0fc: 03 00 80 60 sethi %hi(0x2018000), %g1 200a100: 82 10 63 64 or %g1, 0x364, %g1 ! 2018364 200a104: c2 26 e0 0c st %g1, [ %i3 + 0xc ] pathloc->mt_entry = rtems_filesystem_root.mt_entry; 200a108: 03 00 80 60 sethi %hi(0x2018000), %g1 200a10c: c2 00 63 cc ld [ %g1 + 0x3cc ], %g1 ! 20183cc if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 200a110: fa 26 c0 00 st %i5, [ %i3 ] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 200a114: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 200a118: c2 26 e0 10 st %g1, [ %i3 + 0x10 ] return 0; 200a11c: 81 c7 e0 08 ret 200a120: 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++) { 200a124: b8 07 20 01 inc %i4 200a128: ba 07 60 14 add %i5, 0x14, %i5 200a12c: c2 04 22 64 ld [ %l0 + 0x264 ], %g1 200a130: 80 a7 00 01 cmp %i4, %g1 200a134: 2a bf ff e2 bcs,a 200a0bc 200a138: 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 ); 200a13c: 40 00 0a bc call 200cc2c <__errno> 200a140: b0 10 3f ff mov -1, %i0 200a144: 82 10 20 02 mov 2, %g1 200a148: c2 22 00 00 st %g1, [ %o0 ] } 200a14c: 81 c7 e0 08 ret 200a150: 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 be call 200cc2c <__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 b2 call 200cc2c <__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 af call 200e03c 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 a6 call 200cc2c <__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 64 ld [ %l2 + 0x264 ], %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 97 call 200cc2c <__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 ba call 200e0f0 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 62 fc ld [ %g1 + 0x2fc ], %o0 ! 20196fc 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 62 f8 stb %g2, [ %g1 + 0x2f8 ] 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 62 f8 clrb [ %g1 + 0x2f8 ] ! 20196f8 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 62 fc ld [ %g1 + 0x2fc ], %o0 ! 20196fc 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 14 ld [ %g1 + 0x114 ], %g1 ! 201c114 <__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 40 ld [ %g1 + 0x240 ], %o0 ! 2017640 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 2e fc call 200f5f4 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 60 ld [ %g1 + 0x160 ], %o0 ! 2017560 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 61 call 200f5f4 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 14 ld [ %i3 + 0x114 ], %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 14 ld [ %i3 + 0x114 ], %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 14 ld [ %i3 + 0x114 ], %g1 2004c8c: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 2004c90: 02 80 00 0d be 2004cc4 <== NOT EXECUTED 2004c94: c2 06 e1 14 ld [ %i3 + 0x114 ], %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 14 ld [ %i3 + 0x114 ], %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 14 ld [ %i3 + 0x114 ], %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 88 or %i2, 0x188, %i2 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 2004d2c: b0 16 21 80 or %i0, 0x180, %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 =============================================================================== 02012a04 : #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) { 2012a04: 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) 2012a08: c2 0e 20 85 ldub [ %i0 + 0x85 ], %g1 2012a0c: 80 a0 60 00 cmp %g1, 0 2012a10: 32 80 00 15 bne,a 2012a64 2012a14: 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); 2012a18: 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) 2012a1c: 80 a6 a0 01 cmp %i2, 1 2012a20: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 2012a24: 12 80 00 06 bne 2012a3c 2012a28: 96 06 20 88 add %i0, 0x88, %o3 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 2012a2c: 7f ff f9 ae call 20110e4 2012a30: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 2012a34: 10 80 00 05 b 2012a48 2012a38: 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); 2012a3c: 7f ff f9 75 call 2011010 2012a40: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 2012a44: 80 a2 20 00 cmp %o0, 0 2012a48: 12 80 00 62 bne 2012bd0 <== NEVER TAKEN 2012a4c: 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; 2012a50: 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; 2012a54: f2 26 20 80 st %i1, [ %i0 + 0x80 ] fs_info->c.modified = 0; 2012a58: c0 2e 20 84 clrb [ %i0 + 0x84 ] fs_info->c.state = FAT_CACHE_ACTUAL; 2012a5c: c2 2e 20 85 stb %g1, [ %i0 + 0x85 ] } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2012a60: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 2012a64: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 2012a68: 80 a0 40 02 cmp %g1, %g2 2012a6c: 0a 80 00 05 bcs 2012a80 <== NEVER TAKEN 2012a70: b8 10 20 00 clr %i4 2012a74: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 2012a78: 80 a0 40 02 cmp %g1, %g2 2012a7c: 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) 2012a80: 80 a0 40 19 cmp %g1, %i1 2012a84: 22 80 00 5c be,a 2012bf4 2012a88: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 { if (fs_info->c.modified) 2012a8c: c2 0e 20 84 ldub [ %i0 + 0x84 ], %g1 2012a90: 80 a0 60 00 cmp %g1, 0 2012a94: 02 80 00 3c be 2012b84 2012a98: 80 8f 20 ff btst 0xff, %i4 { if (sec_of_fat && !fs_info->vol.mirror) 2012a9c: 02 80 00 0b be 2012ac8 <== ALWAYS TAKEN 2012aa0: 01 00 00 00 nop 2012aa4: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 2012aa8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2012aac: 12 80 00 07 bne 2012ac8 <== NOT EXECUTED 2012ab0: 01 00 00 00 nop <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, 2012ab4: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 <== NOT EXECUTED 2012ab8: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 2012abc: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 <== NOT EXECUTED 2012ac0: 40 00 28 9f call 201cd3c <== NOT EXECUTED 2012ac4: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 2012ac8: 7f ff fa 5d call 201143c 2012acc: d0 06 20 88 ld [ %i0 + 0x88 ], %o0 fs_info->c.state = FAT_CACHE_EMPTY; 2012ad0: c0 2e 20 85 clrb [ %i0 + 0x85 ] fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 2012ad4: 80 a2 20 00 cmp %o0, 0 2012ad8: 12 80 00 3e bne 2012bd0 <== NEVER TAKEN 2012adc: c0 2e 20 84 clrb [ %i0 + 0x84 ] rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 2012ae0: 80 8f 20 ff btst 0xff, %i4 2012ae4: 02 80 00 2e be 2012b9c <== ALWAYS TAKEN 2012ae8: 94 10 00 19 mov %i1, %o2 2012aec: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 2012af0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2012af4: 02 80 00 1d be 2012b68 <== NOT EXECUTED 2012af8: 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) 2012afc: 10 80 00 29 b 2012ba0 <== NOT EXECUTED 2012b00: 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, 2012b04: 40 00 58 6b call 2028cb0 <.umul> <== NOT EXECUTED 2012b08: 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, 2012b0c: d4 06 20 80 ld [ %i0 + 0x80 ], %o2 <== NOT EXECUTED 2012b10: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED 2012b14: 94 02 00 0a add %o0, %o2, %o2 <== NOT EXECUTED 2012b18: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED 2012b1c: 7f ff f9 3d call 2011010 <== NOT EXECUTED 2012b20: 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) 2012b24: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012b28: 12 80 00 0c bne 2012b58 <== NOT EXECUTED 2012b2c: 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); 2012b30: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2012b34: d2 06 20 8c ld [ %i0 + 0x8c ], %o1 <== NOT EXECUTED 2012b38: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 <== NOT EXECUTED 2012b3c: 40 00 28 80 call 201cd3c <== NOT EXECUTED 2012b40: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 2012b44: 7f ff fa 3e call 201143c <== NOT EXECUTED 2012b48: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 2012b4c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012b50: 22 80 00 06 be,a 2012b68 <== NOT EXECUTED 2012b54: a0 04 20 01 inc %l0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 2012b58: 40 00 25 aa call 201c200 <__errno> <== NOT EXECUTED 2012b5c: 01 00 00 00 nop <== NOT EXECUTED 2012b60: 10 80 00 1f b 2012bdc <== NOT EXECUTED 2012b64: 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++) 2012b68: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 <== NOT EXECUTED 2012b6c: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 2012b70: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 2012b74: 2a bf ff e4 bcs,a 2012b04 <== NOT EXECUTED 2012b78: 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); 2012b7c: 10 80 00 08 b 2012b9c <== NOT EXECUTED 2012b80: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 2012b84: 7f ff f9 f2 call 201134c 2012b88: d0 06 20 88 ld [ %i0 + 0x88 ], %o0 fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) 2012b8c: 80 a2 20 00 cmp %o0, 0 2012b90: 12 80 00 10 bne 2012bd0 <== NEVER TAKEN 2012b94: 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); 2012b98: 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) 2012b9c: 80 a6 a0 01 cmp %i2, 1 2012ba0: d0 1e 20 58 ldd [ %i0 + 0x58 ], %o0 2012ba4: 12 80 00 06 bne 2012bbc 2012ba8: 96 06 20 88 add %i0, 0x88, %o3 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 2012bac: 7f ff f9 4e call 20110e4 2012bb0: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 2012bb4: 10 80 00 05 b 2012bc8 2012bb8: 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); 2012bbc: 7f ff f9 15 call 2011010 2012bc0: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 2012bc4: 80 a2 20 00 cmp %o0, 0 2012bc8: 02 80 00 08 be 2012be8 <== ALWAYS TAKEN 2012bcc: 82 10 20 01 mov 1, %g1 rtems_set_errno_and_return_minus_one(EIO); 2012bd0: 40 00 25 8c call 201c200 <__errno> <== NOT EXECUTED 2012bd4: 01 00 00 00 nop <== NOT EXECUTED 2012bd8: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2012bdc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012be0: 81 c7 e0 08 ret <== NOT EXECUTED 2012be4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED fs_info->c.blk_num = blk; 2012be8: f2 26 20 80 st %i1, [ %i0 + 0x80 ] fs_info->c.state = FAT_CACHE_ACTUAL; 2012bec: c2 2e 20 85 stb %g1, [ %i0 + 0x85 ] } *buf = fs_info->c.buf; 2012bf0: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 2012bf4: c2 26 c0 00 st %g1, [ %i3 ] return RC_OK; } 2012bf8: 81 c7 e0 08 ret 2012bfc: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02012c00 : int fat_buf_release(fat_fs_info_t *fs_info) { 2012c00: 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) 2012c04: c2 0e 20 85 ldub [ %i0 + 0x85 ], %g1 return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 2012c08: 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) 2012c0c: 80 a0 60 00 cmp %g1, 0 2012c10: 02 80 00 54 be 2012d60 2012c14: b0 10 20 00 clr %i0 return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2012c18: c2 06 e0 80 ld [ %i3 + 0x80 ], %g1 2012c1c: c4 16 e0 14 lduh [ %i3 + 0x14 ], %g2 2012c20: 80 a0 40 02 cmp %g1, %g2 2012c24: 0a 80 00 05 bcs 2012c38 <== NEVER TAKEN 2012c28: b8 10 20 00 clr %i4 *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) 2012c2c: c4 06 e0 1c ld [ %i3 + 0x1c ], %g2 2012c30: 80 a0 40 02 cmp %g1, %g2 2012c34: 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) 2012c38: c2 0e e0 84 ldub [ %i3 + 0x84 ], %g1 2012c3c: 80 a0 60 00 cmp %g1, 0 2012c40: 02 80 00 3b be 2012d2c 2012c44: 80 8f 20 ff btst 0xff, %i4 { if (sec_of_fat && !fs_info->vol.mirror) 2012c48: 02 80 00 0b be 2012c74 2012c4c: 01 00 00 00 nop 2012c50: c2 0e e0 48 ldub [ %i3 + 0x48 ], %g1 2012c54: 80 a0 60 00 cmp %g1, 0 2012c58: 12 80 00 07 bne 2012c74 <== NEVER TAKEN 2012c5c: 01 00 00 00 nop memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 2012c60: c2 06 e0 88 ld [ %i3 + 0x88 ], %g1 2012c64: d0 06 e0 8c ld [ %i3 + 0x8c ], %o0 2012c68: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 2012c6c: 40 00 28 34 call 201cd3c 2012c70: d4 16 c0 00 lduh [ %i3 ], %o2 sc = rtems_bdbuf_release_modified(fs_info->c.buf); 2012c74: 7f ff f9 f2 call 201143c 2012c78: d0 06 e0 88 ld [ %i3 + 0x88 ], %o0 if (sc != RTEMS_SUCCESSFUL) 2012c7c: 80 a2 20 00 cmp %o0, 0 2012c80: 12 80 00 30 bne 2012d40 <== NEVER TAKEN 2012c84: 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) 2012c88: 80 8f 20 ff btst 0xff, %i4 2012c8c: 02 80 00 33 be 2012d58 2012c90: c0 2e e0 84 clrb [ %i3 + 0x84 ] 2012c94: c2 0e e0 48 ldub [ %i3 + 0x48 ], %g1 2012c98: 80 a0 60 00 cmp %g1, 0 2012c9c: 02 80 00 1d be 2012d10 <== ALWAYS TAKEN 2012ca0: 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; 2012ca4: 10 80 00 2e b 2012d5c <== NOT EXECUTED 2012ca8: 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, 2012cac: 40 00 58 01 call 2028cb0 <.umul> 2012cb0: 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, 2012cb4: d4 06 e0 80 ld [ %i3 + 0x80 ], %o2 2012cb8: 92 10 00 1d mov %i5, %o1 2012cbc: 94 02 00 0a add %o0, %o2, %o2 2012cc0: 96 07 bf fc add %fp, -4, %o3 2012cc4: 7f ff f8 d3 call 2011010 2012cc8: 90 10 00 1c mov %i4, %o0 fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 2012ccc: 80 a2 20 00 cmp %o0, 0 2012cd0: 12 80 00 0c bne 2012d00 <== NEVER TAKEN 2012cd4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 2012cd8: c2 07 bf fc ld [ %fp + -4 ], %g1 2012cdc: d2 06 e0 8c ld [ %i3 + 0x8c ], %o1 2012ce0: d0 00 60 24 ld [ %g1 + 0x24 ], %o0 2012ce4: 40 00 28 16 call 201cd3c 2012ce8: d4 16 c0 00 lduh [ %i3 ], %o2 sc = rtems_bdbuf_release_modified(b); 2012cec: 7f ff f9 d4 call 201143c 2012cf0: d0 07 bf fc ld [ %fp + -4 ], %o0 if ( sc != RTEMS_SUCCESSFUL) 2012cf4: 80 a2 20 00 cmp %o0, 0 2012cf8: 22 80 00 06 be,a 2012d10 <== ALWAYS TAKEN 2012cfc: b4 06 a0 01 inc %i2 rtems_set_errno_and_return_minus_one(ENOMEM); 2012d00: 40 00 25 40 call 201c200 <__errno> <== NOT EXECUTED 2012d04: 01 00 00 00 nop <== NOT EXECUTED 2012d08: 10 80 00 11 b 2012d4c <== NOT EXECUTED 2012d0c: 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++) 2012d10: c2 0e e0 09 ldub [ %i3 + 9 ], %g1 2012d14: 90 0e a0 ff and %i2, 0xff, %o0 2012d18: 80 a2 00 01 cmp %o0, %g1 2012d1c: 2a bf ff e4 bcs,a 2012cac 2012d20: 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; 2012d24: 10 80 00 0e b 2012d5c 2012d28: c0 2e e0 85 clrb [ %i3 + 0x85 ] } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 2012d2c: 7f ff f9 88 call 201134c 2012d30: d0 06 e0 88 ld [ %i3 + 0x88 ], %o0 if (sc != RTEMS_SUCCESSFUL) 2012d34: 80 a2 20 00 cmp %o0, 0 2012d38: 22 80 00 09 be,a 2012d5c <== ALWAYS TAKEN 2012d3c: c0 2e e0 85 clrb [ %i3 + 0x85 ] rtems_set_errno_and_return_minus_one(EIO); 2012d40: 40 00 25 30 call 201c200 <__errno> <== NOT EXECUTED 2012d44: 01 00 00 00 nop <== NOT EXECUTED 2012d48: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2012d4c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012d50: 81 c7 e0 08 ret <== NOT EXECUTED 2012d54: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; 2012d58: c0 2e e0 85 clrb [ %i3 + 0x85 ] return RC_OK; 2012d5c: b0 10 20 00 clr %i0 } 2012d60: 81 c7 e0 08 ret 2012d64: 81 e8 00 00 restore =============================================================================== 02011d08 : 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)) ) 2011d08: 80 a2 60 00 cmp %o1, 0 2011d0c: 32 80 00 08 bne,a 2011d2c 2011d10: c2 0a 20 05 ldub [ %o0 + 5 ], %g1 2011d14: c2 0a 20 0a ldub [ %o0 + 0xa ], %g1 2011d18: 80 88 60 03 btst 3, %g1 2011d1c: 22 80 00 04 be,a 2011d2c <== NEVER TAKEN 2011d20: c2 0a 20 05 ldub [ %o0 + 5 ], %g1 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2011d24: 81 c3 e0 08 retl 2011d28: d0 02 20 1c ld [ %o0 + 0x1c ], %o0 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2011d2c: 92 02 7f fe add %o1, -2, %o1 2011d30: 93 2a 40 01 sll %o1, %g1, %o1 2011d34: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 fs_info->vol.data_fsec); } 2011d38: 81 c3 e0 08 retl 2011d3c: 90 02 40 01 add %o1, %g1, %o0 =============================================================================== 02012e98 : fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 2012e98: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 2012e9c: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); 2012ea0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2012ea4: 7f ff fe ca call 20129cc <== NOT EXECUTED 2012ea8: 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); 2012eac: c2 0f 60 02 ldub [ %i5 + 2 ], %g1 <== NOT EXECUTED 2012eb0: 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 ) { 2012eb4: 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, 2012eb8: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED 2012ebc: b7 2e c0 01 sll %i3, %g1, %i3 <== NOT EXECUTED 2012ec0: 7f ff ff aa call 2012d68 <_fat_block_read> <== NOT EXECUTED 2012ec4: 95 e8 20 00 restore %g0, 0, %o2 <== NOT EXECUTED =============================================================================== 020130c4 : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 20130c4: 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; 20130c8: 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); 20130cc: 7f ff fe 34 call 201299c <== NOT EXECUTED 20130d0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 20130d4: d0 27 bf f8 st %o0, [ %fp + -8 ] <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 20130d8: 7f ff fe 31 call 201299c <== NOT EXECUTED 20130dc: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 20130e0: 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); 20130e4: d0 27 bf fc st %o0, [ %fp + -4 ] <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 20130e8: 94 10 21 e8 mov 0x1e8, %o2 <== NOT EXECUTED 20130ec: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 20130f0: 98 07 bf f8 add %fp, -8, %o4 <== NOT EXECUTED 20130f4: 7f ff ff 3f call 2012df0 <_fat_block_write> <== NOT EXECUTED 20130f8: 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, 20130fc: 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, 2013100: 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, 2013104: 94 10 21 ec mov 0x1ec, %o2 <== NOT EXECUTED 2013108: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201310c: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2013110: 7f ff ff 38 call 2012df0 <_fat_block_write> <== NOT EXECUTED 2013114: 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) ) 2013118: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201311c: 06 80 00 04 bl 201312c <== NOT EXECUTED 2013120: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 2013124: 16 80 00 03 bge 2013130 <== NOT EXECUTED 2013128: b0 10 20 00 clr %i0 <== NOT EXECUTED return -1; 201312c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return RC_OK; } 2013130: 81 c7 e0 08 ret <== NOT EXECUTED 2013134: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02012228 : int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2012228: 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) 201222c: c2 06 60 08 ld [ %i1 + 8 ], %g1 2012230: 80 a0 60 01 cmp %g1, 1 2012234: 08 80 00 06 bleu 201224c 2012238: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 { fat_fd->links_num--; 201223c: 82 00 7f ff add %g1, -1, %g1 return rc; 2012240: 90 10 20 00 clr %o0 2012244: 10 80 00 25 b 20122d8 2012248: 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) 201224c: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 2012250: 80 88 60 01 btst 1, %g1 2012254: 02 80 00 14 be 20122a4 <== ALWAYS TAKEN 2012258: 90 10 00 18 mov %i0, %o0 { rc = fat_file_truncate(mt_entry, fat_fd, 0); 201225c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2012260: 7f ff ff ae call 2012118 <== NOT EXECUTED 2012264: 94 10 20 00 clr %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2012268: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201226c: 12 80 00 1b bne 20122d8 <== NOT EXECUTED 2012270: 01 00 00 00 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 2012274: 7f ff e2 35 call 200ab48 <_Chain_Extract> <== NOT EXECUTED 2012278: 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) ) 201227c: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED 2012280: 40 00 03 8c call 20130b0 <== NOT EXECUTED 2012284: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2012288: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED 201228c: 02 80 00 0f be 20122c8 <== NOT EXECUTED 2012290: 01 00 00 00 nop <== NOT EXECUTED fat_free_unique_ino(mt_entry, fat_fd->ino); 2012294: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED 2012298: 40 00 03 7a call 2013080 <== NOT EXECUTED 201229c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20122a0: 30 80 00 0a b,a 20122c8 <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 20122a4: 40 00 03 83 call 20130b0 20122a8: d2 06 60 0c ld [ %i1 + 0xc ], %o1 20122ac: 80 8a 20 ff btst 0xff, %o0 20122b0: 02 80 00 04 be 20122c0 <== ALWAYS TAKEN 20122b4: 01 00 00 00 nop { fat_fd->links_num = 0; 20122b8: 10 80 00 06 b 20122d0 <== NOT EXECUTED 20122bc: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED 20122c0: 7f ff e2 22 call 200ab48 <_Chain_Extract> 20122c4: 90 10 00 19 mov %i1, %o0 } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 20122c8: 7f ff ce 69 call 2005c6c 20122cc: 90 10 00 19 mov %i1, %o0 } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 20122d0: 40 00 02 4c call 2012c00 20122d4: 91 e8 00 1c restore %g0, %i4, %o0 return rc; } 20122d8: 81 c7 e0 08 ret 20122dc: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 020127fc : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 20127fc: 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; 2012800: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; 2012804: 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; 2012808: 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) 201280c: 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 ) { 2012810: 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; 2012814: 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) 2012818: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201281c: 02 80 00 07 be 2012838 <== NOT EXECUTED 2012820: 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); 2012824: 40 00 00 f7 call 2012c00 <== NOT EXECUTED 2012828: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED if (rc != RC_OK) 201282c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2012830: 02 80 00 24 be 20128c0 <== NOT EXECUTED 2012834: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED 2012838: 81 c7 e0 08 ret <== NOT EXECUTED 201283c: 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); 2012840: 7f ff fd 32 call 2011d08 <== NOT EXECUTED 2012844: b6 10 20 00 clr %i3 <== NOT EXECUTED /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 2012848: 10 80 00 13 b 2012894 <== NOT EXECUTED 201284c: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 2012850: 94 06 c0 1a add %i3, %i2, %o2 <== NOT EXECUTED 2012854: 7f ff fa 24 call 20110e4 <== NOT EXECUTED 2012858: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 201285c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012860: 12 80 00 07 bne 201287c <== NOT EXECUTED 2012864: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 2012868: 7f ff fb 1b call 20114d4 <== NOT EXECUTED 201286c: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 2012870: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012874: 22 80 00 08 be,a 2012894 <== NOT EXECUTED 2012878: b6 06 e0 01 inc %i3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 201287c: 40 00 26 61 call 201c200 <__errno> <== NOT EXECUTED 2012880: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2012884: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2012888: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201288c: 81 c7 e0 08 ret <== NOT EXECUTED 2012890: 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++ ) 2012894: c2 0f 20 04 ldub [ %i4 + 4 ], %g1 <== NOT EXECUTED 2012898: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED 201289c: 2a bf ff ed bcs,a 2012850 <== NOT EXECUTED 20128a0: 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); 20128a4: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED 20128a8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20128ac: 40 00 1e 88 call 201a2cc <== NOT EXECUTED 20128b0: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 20128b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20128b8: 12 80 00 0a bne 20128e0 <== NOT EXECUTED 20128bc: 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) 20128c0: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED 20128c4: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 <== NOT EXECUTED 20128c8: 84 0a 40 02 and %o1, %g2, %g2 <== NOT EXECUTED 20128cc: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 20128d0: 2a bf ff dc bcs,a 2012840 <== NOT EXECUTED 20128d4: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 <== NOT EXECUTED 20128d8: 81 c7 e0 08 ret <== NOT EXECUTED 20128dc: 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); 20128e0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED if ( rc != RC_OK ) return rc; } return rc; } 20128e4: 81 c7 e0 08 ret <== NOT EXECUTED 20128e8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020123b4 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 20123b4: 9d e3 bf 90 save %sp, -112, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 20123b8: 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; 20123bc: f4 26 c0 00 st %i2, [ %i3 ] if (new_length <= fat_fd->fat_file_size) 20123c0: 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; 20123c4: 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; 20123c8: 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 ) { 20123cc: 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) 20123d0: 80 a6 80 12 cmp %i2, %l2 20123d4: 08 80 00 2d bleu 2012488 20123d8: b0 10 20 00 clr %i0 return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 20123dc: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 20123e0: 80 a0 60 01 cmp %g1, 1 20123e4: 32 80 00 0b bne,a 2012410 <== ALWAYS TAKEN 20123e8: c4 17 20 06 lduh [ %i4 + 6 ], %g2 20123ec: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED 20123f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20123f4: 32 80 00 07 bne,a 2012410 <== NOT EXECUTED 20123f8: c4 17 20 06 lduh [ %i4 + 6 ], %g2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 20123fc: 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)) && 2012400: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 2012404: 12 80 00 1d bne 2012478 <== NOT EXECUTED 2012408: 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))) & 201240c: c4 17 20 06 lduh [ %i4 + 6 ], %g2 <== NOT EXECUTED 2012410: 82 00 bf ff add %g2, -1, %g1 2012414: a0 08 40 12 and %g1, %l2, %l0 (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 2012418: 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 - 201241c: a0 20 80 10 sub %g2, %l0, %l0 2012420: 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) 2012424: 80 a4 80 10 cmp %l2, %l0 2012428: 08 80 00 18 bleu 2012488 201242c: 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) 2012430: a4 a4 80 10 subcc %l2, %l0, %l2 2012434: 02 80 00 15 be 2012488 <== NEVER TAKEN 2012438: a2 04 bf ff add %l2, -1, %l1 return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 201243c: c2 0f 20 08 ldub [ %i4 + 8 ], %g1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2012440: 90 10 00 1d mov %i5, %o0 * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 2012444: a3 34 40 01 srl %l1, %g1, %l1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2012448: 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; 201244c: a2 04 60 01 inc %l1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2012450: 96 07 bf fc add %fp, -4, %o3 2012454: 94 10 00 11 mov %l1, %o2 2012458: 40 00 20 ec call 201a808 201245c: 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) 2012460: b0 92 20 00 orcc %o0, 0, %i0 2012464: 12 80 00 09 bne 2012488 <== NEVER TAKEN 2012468: 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)) 201246c: 80 94 00 01 orcc %l0, %g1, %g0 2012470: 12 80 00 08 bne 2012490 <== ALWAYS TAKEN 2012474: 80 a4 40 01 cmp %l1, %g1 rtems_set_errno_and_return_minus_one(ENOSPC); 2012478: 40 00 27 62 call 201c200 <__errno> <== NOT EXECUTED 201247c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2012480: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 2012484: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012488: 81 c7 e0 08 ret 201248c: 81 e8 00 00 restore /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 2012490: 02 80 00 0b be 20124bc <== ALWAYS TAKEN 2012494: 82 38 00 01 xnor %g0, %g1, %g1 *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 2012498: c4 0f 20 08 ldub [ %i4 + 8 ], %g2 <== NOT EXECUTED 201249c: a2 00 40 11 add %g1, %l1, %l1 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 20124a0: 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) - 20124a4: a3 2c 40 02 sll %l1, %g2, %l1 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 20124a8: 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 - 20124ac: 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)); 20124b0: 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) - 20124b4: 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 - 20124b8: 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 ) 20124bc: d6 06 60 18 ld [ %i1 + 0x18 ], %o3 20124c0: 80 a2 e0 00 cmp %o3, 0 20124c4: 32 80 00 07 bne,a 20124e0 20124c8: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 { fat_fd->map.disk_cln = fat_fd->cln = chain; 20124cc: c2 07 bf f0 ld [ %fp + -16 ], %g1 fat_fd->map.file_cln = 0; 20124d0: 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; 20124d4: c2 26 60 1c st %g1, [ %i1 + 0x1c ] 20124d8: 10 80 00 1d b 201254c 20124dc: c2 26 60 38 st %g1, [ %i1 + 0x38 ] fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 20124e0: 80 a0 7f ff cmp %g1, -1 20124e4: 02 80 00 04 be 20124f4 <== NEVER TAKEN 20124e8: 90 10 00 1d mov %i5, %o0 { old_last_cl = fat_fd->map.last_cln; 20124ec: 10 80 00 0a b 2012514 20124f0: c2 27 bf f4 st %g1, [ %fp + -12 ] } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, 20124f4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20124f8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 20124fc: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 2012500: 7f ff ff 78 call 20122e0 <== NOT EXECUTED 2012504: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 2012508: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED 201250c: 12 80 00 09 bne 2012530 <== NOT EXECUTED 2012510: 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); 2012514: d2 07 bf f4 ld [ %fp + -12 ], %o1 2012518: d4 07 bf f0 ld [ %fp + -16 ], %o2 201251c: 40 00 1f dc call 201a48c 2012520: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) 2012524: b6 92 20 00 orcc %o0, 0, %i3 2012528: 02 80 00 07 be 2012544 <== ALWAYS TAKEN 201252c: d2 07 bf f0 ld [ %fp + -16 ], %o1 { fat_free_fat_clusters_chain(mt_entry, chain); 2012530: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2012534: 40 00 20 85 call 201a748 <== NOT EXECUTED 2012538: b0 10 00 1b mov %i3, %i0 <== NOT EXECUTED return rc; 201253c: 81 c7 e0 08 ret <== NOT EXECUTED 2012540: 81 e8 00 00 restore <== NOT EXECUTED } fat_buf_release(fs_info); 2012544: 40 00 01 af call 2012c00 2012548: 90 10 00 1c mov %i4, %o0 } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 201254c: c2 07 bf fc ld [ %fp + -4 ], %g1 2012550: 80 a0 60 00 cmp %g1, 0 2012554: 22 bf ff cd be,a 2012488 <== NEVER TAKEN 2012558: f4 26 60 18 st %i2, [ %i1 + 0x18 ] <== NOT EXECUTED { fat_fd->map.last_cln = last_cl; 201255c: c2 07 bf f8 ld [ %fp + -8 ], %g1 2012560: c2 26 60 3c st %g1, [ %i1 + 0x3c ] if (fat_fd->fat_file_type == FAT_DIRECTORY) 2012564: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 2012568: 80 a0 60 01 cmp %g1, 1 201256c: 32 bf ff c7 bne,a 2012488 2012570: f4 26 60 18 st %i2, [ %i1 + 0x18 ] { rc = fat_init_clusters_chain(mt_entry, chain); 2012574: d2 07 bf f0 ld [ %fp + -16 ], %o1 2012578: 40 00 02 60 call 2012ef8 201257c: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) 2012580: b8 92 20 00 orcc %o0, 0, %i4 2012584: 22 bf ff c1 be,a 2012488 <== ALWAYS TAKEN 2012588: f4 26 60 18 st %i2, [ %i1 + 0x18 ] { fat_free_fat_clusters_chain(mt_entry, chain); 201258c: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED 2012590: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2012594: 40 00 20 6d call 201a748 <== NOT EXECUTED 2012598: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED return rc; 201259c: 81 c7 e0 08 ret <== NOT EXECUTED 20125a0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020122e0 : fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 20122e0: 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); 20122e4: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 20122e8: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 20122ec: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 20122f0: 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; 20122f4: 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); 20122f8: 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, ...) { 20122fc: 90 10 00 18 mov %i0, %o0 2012300: 92 10 00 19 mov %i1, %o1 uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 2012304: 80 a6 a0 01 cmp %i2, 1 2012308: 12 80 00 24 bne 2012398 <== NEVER TAKEN 201230c: c6 06 20 34 ld [ %i0 + 0x34 ], %g3 { case F_CLU_NUM: pos = va_arg(ap, uint32_t); ret = va_arg(ap, uint32_t *); 2012310: 84 07 a0 58 add %fp, 0x58, %g2 2012314: c4 27 bf fc st %g2, [ %fp + -4 ] /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 2012318: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); 201231c: 82 10 00 1b mov %i3, %g1 ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 2012320: 80 a6 c0 02 cmp %i3, %g2 2012324: 0a 80 00 06 bcs 201233c <== ALWAYS TAKEN 2012328: ba 10 00 1c mov %i4, %i5 va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); 201232c: 40 00 27 b5 call 201c200 <__errno> <== NOT EXECUTED 2012330: 01 00 00 00 nop <== NOT EXECUTED 2012334: 10 80 00 1c b 20123a4 <== NOT EXECUTED 2012338: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 201233c: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 2012340: 80 a0 a0 01 cmp %g2, 1 2012344: 32 80 00 0d bne,a 2012378 2012348: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 201234c: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 2012350: 80 a0 a0 00 cmp %g2, 0 2012354: 32 80 00 09 bne,a 2012378 <== NEVER TAKEN 2012358: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 201235c: 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)) && 2012360: 80 88 a0 03 btst 3, %g2 2012364: 22 80 00 05 be,a 2012378 <== NEVER TAKEN 2012368: 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; 201236c: c0 27 00 00 clr [ %i4 ] rc = RC_OK; break; 2012370: 10 80 00 0f b 20123ac 2012374: 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); 2012378: 96 07 bf f8 add %fp, -8, %o3 201237c: 7f ff fe 3d call 2011c70 2012380: 95 30 40 0a srl %g1, %o2, %o2 if ( rc != RC_OK ) 2012384: 80 a2 60 00 cmp %o1, 0 2012388: 12 80 00 09 bne 20123ac <== NEVER TAKEN 201238c: c2 07 bf f8 ld [ %fp + -8 ], %g1 break; *ret = cur_cln; break; 2012390: 10 80 00 07 b 20123ac 2012394: c2 27 40 00 st %g1, [ %i5 ] default: errno = EINVAL; 2012398: 40 00 27 9a call 201c200 <__errno> <== NOT EXECUTED 201239c: 01 00 00 00 nop <== NOT EXECUTED 20123a0: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 20123a4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = -1; 20123a8: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED break; } va_end(ap); return rc; } 20123ac: 81 c7 e0 08 ret 20123b0: 91 e8 00 09 restore %g0, %o1, %o0 =============================================================================== 02011c70 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 2011c70: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 2011c74: f8 06 60 34 ld [ %i1 + 0x34 ], %i4 2011c78: 80 a6 80 1c cmp %i2, %i4 2011c7c: 12 80 00 07 bne 2011c98 <== NEVER TAKEN 2011c80: 01 00 00 00 nop *disk_cln = fat_fd->map.disk_cln; 2011c84: 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; 2011c88: 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; 2011c8c: 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; 2011c90: 81 c7 e0 08 ret 2011c94: 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) 2011c98: 28 80 00 06 bleu,a 2011cb0 <== NOT EXECUTED 2011c9c: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED { cur_cln = fat_fd->map.disk_cln; 2011ca0: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; 2011ca4: 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; 2011ca8: 10 80 00 04 b 2011cb8 <== NOT EXECUTED 2011cac: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 2011cb0: b8 10 00 1a mov %i2, %i4 <== NOT EXECUTED 2011cb4: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2011cb8: 10 80 00 0b b 2011ce4 <== NOT EXECUTED 2011cbc: ba 10 20 00 clr %i5 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2011cc0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2011cc4: 40 00 21 82 call 201a2cc <== NOT EXECUTED 2011cc8: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2011ccc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2011cd0: 22 80 00 05 be,a 2011ce4 <== NOT EXECUTED 2011cd4: ba 07 60 01 inc %i5 <== NOT EXECUTED return rc; 2011cd8: b1 3a 20 1f sra %o0, 0x1f, %i0 <== NOT EXECUTED 2011cdc: 81 c7 e0 08 ret <== NOT EXECUTED 2011ce0: 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++) 2011ce4: 80 a7 40 1c cmp %i5, %i4 <== NOT EXECUTED 2011ce8: 12 bf ff f6 bne 2011cc0 <== NOT EXECUTED 2011cec: 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; 2011cf0: f4 26 60 34 st %i2, [ %i1 + 0x34 ] <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 2011cf4: d2 26 60 38 st %o1, [ %i1 + 0x38 ] <== NOT EXECUTED *disk_cln = cur_cln; 2011cf8: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED } return RC_OK; 2011cfc: b0 10 20 00 clr %i0 <== NOT EXECUTED } 2011d00: 81 c7 e0 08 ret <== NOT EXECUTED 2011d04: 93 e8 20 00 restore %g0, 0, %o1 <== NOT EXECUTED =============================================================================== 020127a8 : void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 20127a8: 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); 20127ac: 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; 20127b0: 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); 20127b4: 7f ff fd 63 call 2011d40 <== NOT EXECUTED 20127b8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20127bc: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED 20127c0: 7f ff e0 e2 call 200ab48 <_Chain_Extract> <== NOT EXECUTED 20127c4: 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); 20127c8: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED 20127cc: b8 0f 20 01 and %i4, 1, %i4 <== NOT EXECUTED 20127d0: 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 ); 20127d4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20127d8: b9 2f 20 04 sll %i4, 4, %i4 <== NOT EXECUTED 20127dc: b8 27 00 01 sub %i4, %g1, %i4 <== NOT EXECUTED 20127e0: 7f ff e0 cf call 200ab1c <_Chain_Append> <== NOT EXECUTED 20127e4: 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; 20127e8: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 <== NOT EXECUTED 20127ec: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 20127f0: c2 2e 60 30 stb %g1, [ %i1 + 0x30 ] <== NOT EXECUTED } 20127f4: 81 c7 e0 08 ret <== NOT EXECUTED 20127f8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02011dfc : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 2011dfc: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2011e00: 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); 2011e04: 90 10 00 18 mov %i0, %o0 2011e08: 92 10 00 19 mov %i1, %o1 2011e0c: 7f ff ff cd call 2011d40 2011e10: c0 27 bf fc clr [ %fp + -4 ] /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); 2011e14: 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); 2011e18: 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 ) { 2011e1c: 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); 2011e20: 90 10 00 18 mov %i0, %o0 2011e24: 94 10 00 1c mov %i4, %o2 2011e28: 96 10 20 00 clr %o3 2011e2c: 7f ff ff d7 call 2011d88 <_hash_search> 2011e30: 98 07 bf fc add %fp, -4, %o4 if ( rc == RC_OK ) 2011e34: b0 92 20 00 orcc %o0, 0, %i0 2011e38: 12 80 00 08 bne 2011e58 2011e3c: c2 07 bf fc ld [ %fp + -4 ], %g1 { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; lfat_fd->links_num++; 2011e40: 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; 2011e44: c2 26 80 00 st %g1, [ %i2 ] lfat_fd->links_num++; 2011e48: 84 00 a0 01 inc %g2 2011e4c: c4 20 60 08 st %g2, [ %g1 + 8 ] return rc; 2011e50: 81 c7 e0 08 ret 2011e54: 81 e8 00 00 restore } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); 2011e58: d2 06 e0 6c ld [ %i3 + 0x6c ], %o1 2011e5c: 94 10 00 1c mov %i4, %o2 2011e60: 96 10 00 1c mov %i4, %o3 2011e64: 98 07 bf fc add %fp, -4, %o4 2011e68: 7f ff ff c8 call 2011d88 <_hash_search> 2011e6c: 90 10 00 1d mov %i5, %o0 2011e70: a0 10 00 08 mov %o0, %l0 lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 2011e74: 7f ff d1 39 call 2006358 2011e78: 90 10 20 44 mov 0x44, %o0 2011e7c: d0 26 80 00 st %o0, [ %i2 ] 2011e80: d0 27 bf fc st %o0, [ %fp + -4 ] if ( lfat_fd == NULL ) 2011e84: 80 a2 20 00 cmp %o0, 0 2011e88: 02 80 00 1f be 2011f04 <== NEVER TAKEN 2011e8c: b0 10 00 08 mov %o0, %i0 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 2011e90: 92 10 20 00 clr %o1 2011e94: 40 00 2b e6 call 201ce2c 2011e98: 94 10 20 44 mov 0x44, %o2 lfat_fd->links_num = 1; 2011e9c: 82 10 20 01 mov 1, %g1 2011ea0: c2 26 20 08 st %g1, [ %i0 + 8 ] lfat_fd->flags &= ~FAT_FILE_REMOVED; 2011ea4: c2 0e 20 30 ldub [ %i0 + 0x30 ], %g1 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 2011ea8: 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; 2011eac: 82 08 7f fe and %g1, -2, %g1 2011eb0: c2 2e 20 30 stb %g1, [ %i0 + 0x30 ] lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 2011eb4: 82 10 3f ff mov -1, %g1 lfat_fd->dir_pos = *dir_pos; 2011eb8: 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; 2011ebc: c2 26 20 3c st %g1, [ %i0 + 0x3c ] lfat_fd->dir_pos = *dir_pos; 2011ec0: 40 00 2b 9f call 201cd3c 2011ec4: 94 10 20 10 mov 0x10, %o2 if ( rc != RC_OK ) 2011ec8: 80 a4 20 00 cmp %l0, 0 2011ecc: 02 80 00 04 be 2011edc <== NEVER TAKEN 2011ed0: 01 00 00 00 nop lfat_fd->ino = key; 2011ed4: 10 80 00 12 b 2011f1c 2011ed8: f8 26 20 0c st %i4, [ %i0 + 0xc ] else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 2011edc: 40 00 04 35 call 2012fb0 <== NOT EXECUTED 2011ee0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 2011ee4: 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); 2011ee8: d0 26 20 0c st %o0, [ %i0 + 0xc ] <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 2011eec: c2 00 60 0c ld [ %g1 + 0xc ], %g1 <== NOT EXECUTED 2011ef0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2011ef4: 32 80 00 0b bne,a 2011f20 <== NOT EXECUTED 2011ef8: d0 06 e0 68 ld [ %i3 + 0x68 ], %o0 <== NOT EXECUTED { free((*fat_fd)); 2011efc: 7f ff cf 5c call 2005c6c <== NOT EXECUTED 2011f00: 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 ); 2011f04: 40 00 28 bf call 201c200 <__errno> <== NOT EXECUTED 2011f08: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2011f0c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2011f10: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2011f14: 81 c7 e0 08 ret <== NOT EXECUTED 2011f18: 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); 2011f1c: d0 06 e0 68 ld [ %i3 + 0x68 ], %o0 2011f20: d2 07 bf fc ld [ %fp + -4 ], %o1 2011f24: b8 0f 20 01 and %i4, 1, %i4 2011f28: 83 2f 20 02 sll %i4, 2, %g1 /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; 2011f2c: 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); 2011f30: b9 2f 20 04 sll %i4, 4, %i4 2011f34: b8 27 00 01 sub %i4, %g1, %i4 2011f38: 7f ff e2 f9 call 200ab1c <_Chain_Append> 2011f3c: 90 02 00 1c add %o0, %i4, %o0 * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 2011f40: 81 c7 e0 08 ret 2011f44: 81 e8 00 00 restore =============================================================================== 02011f5c : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 2011f5c: 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; 2011f60: c0 27 bf fc clr [ %fp + -4 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 2011f64: 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; 2011f68: 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) 2011f6c: 80 a6 e0 00 cmp %i3, 0 2011f70: 02 80 00 63 be 20120fc <== NEVER TAKEN 2011f74: 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 ) 2011f78: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 2011f7c: 80 a6 80 01 cmp %i2, %g1 2011f80: 1a 80 00 5f bcc 20120fc <== NEVER TAKEN 2011f84: 80 a6 c0 01 cmp %i3, %g1 return FAT_EOF; if ((count > fat_fd->fat_file_size) || 2011f88: 38 80 00 07 bgu,a 2011fa4 <== NEVER TAKEN 2011f8c: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) 2011f90: 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) || 2011f94: 80 a6 80 02 cmp %i2, %g2 2011f98: 28 80 00 04 bleu,a 2011fa8 <== ALWAYS TAKEN 2011f9c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 2011fa0: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2011fa4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2011fa8: 80 a0 60 01 cmp %g1, 1 2011fac: 32 80 00 1c bne,a 201201c 2011fb0: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 2011fb4: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 2011fb8: 80 a0 60 00 cmp %g1, 0 2011fbc: 32 80 00 18 bne,a 201201c <== NEVER TAKEN 2011fc0: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2011fc4: 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)) && 2011fc8: 80 88 60 03 btst 3, %g1 2011fcc: 22 80 00 14 be,a 201201c <== NEVER TAKEN 2011fd0: 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); 2011fd4: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 2011fd8: 7f ff ff 4c call 2011d08 2011fdc: 90 10 00 10 mov %l0, %o0 sec += (start >> fs_info->vol.sec_log2); 2011fe0: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = start & (fs_info->vol.bps - 1); 2011fe4: 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); 2011fe8: 93 36 80 09 srl %i2, %o1, %o1 byte = start & (fs_info->vol.bps - 1); 2011fec: 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); 2011ff0: 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); 2011ff4: 94 0e 80 0a and %i2, %o2, %o2 2011ff8: 90 10 00 1d mov %i5, %o0 2011ffc: 96 10 00 1b mov %i3, %o3 2012000: 40 00 03 5a call 2012d68 <_fat_block_read> 2012004: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 2012008: b0 92 20 00 orcc %o0, 0, %i0 201200c: 16 80 00 41 bge 2012110 <== ALWAYS TAKEN 2012010: 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; 2012014: 81 c7 e0 08 ret <== NOT EXECUTED 2012018: 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); 201201c: e2 14 20 06 lduh [ %l0 + 6 ], %l1 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2012020: 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); 2012024: a6 07 bf fc add %fp, -4, %l3 2012028: 90 10 00 1d mov %i5, %o0 201202c: 92 10 00 19 mov %i1, %o1 2012030: 94 10 00 12 mov %l2, %o2 2012034: 7f ff ff 0f call 2011c70 2012038: 96 10 00 13 mov %l3, %o3 if (rc != RC_OK) 201203c: b0 92 60 00 orcc %o1, 0, %i0 2012040: 12 80 00 2f bne 20120fc <== NEVER TAKEN 2012044: 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); 2012048: a3 34 60 10 srl %l1, 0x10, %l1 201204c: a2 04 7f ff add %l1, -1, %l1 2012050: b4 0e 80 11 and %i2, %l1, %i2 2012054: a2 10 20 00 clr %l1 2012058: 10 80 00 1f b 20120d4 201205c: a8 10 00 1a mov %i2, %l4 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 2012060: a2 24 40 14 sub %l1, %l4, %l1 2012064: 80 a4 40 1b cmp %l1, %i3 2012068: 38 80 00 02 bgu,a 2012070 201206c: a2 10 00 1b mov %i3, %l1 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 2012070: d2 07 bf fc ld [ %fp + -4 ], %o1 2012074: 7f ff ff 25 call 2011d08 2012078: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 sec += (ofs >> fs_info->vol.sec_log2); 201207c: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = ofs & (fs_info->vol.bps - 1); 2012080: 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); 2012084: 93 35 00 09 srl %l4, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); 2012088: 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); 201208c: 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); 2012090: 94 0d 00 0a and %l4, %o2, %o2 2012094: 90 10 00 1d mov %i5, %o0 2012098: 96 10 00 11 mov %l1, %o3 201209c: 40 00 03 33 call 2012d68 <_fat_block_read> 20120a0: 98 07 00 18 add %i4, %i0, %o4 if ( ret < 0 ) 20120a4: 80 a2 20 00 cmp %o0, 0 20120a8: 06 80 00 17 bl 2012104 <== NEVER TAKEN 20120ac: b6 26 c0 11 sub %i3, %l1, %i3 return -1; count -= c; cmpltd += c; 20120b0: b0 06 00 11 add %i0, %l1, %i0 save_cln = cur_cln; 20120b4: e2 07 bf fc ld [ %fp + -4 ], %l1 rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 20120b8: 90 10 00 1d mov %i5, %o0 20120bc: 92 10 00 11 mov %l1, %o1 20120c0: 40 00 20 83 call 201a2cc 20120c4: 94 10 00 13 mov %l3, %o2 if ( rc != RC_OK ) 20120c8: 80 a2 20 00 cmp %o0, 0 20120cc: 12 80 00 10 bne 201210c <== NEVER TAKEN 20120d0: 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) 20120d4: 80 a6 e0 00 cmp %i3, 0 20120d8: 32 bf ff e2 bne,a 2012060 20120dc: 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); 20120e0: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 20120e4: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 20120e8: 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); 20120ec: b4 06 80 18 add %i2, %i0, %i2 20120f0: 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 + 20120f4: a4 06 80 12 add %i2, %l2, %l2 20120f8: 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; 20120fc: 81 c7 e0 08 ret 2012100: 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; 2012104: 81 c7 e0 08 ret <== NOT EXECUTED 2012108: 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); 201210c: 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; } 2012110: 81 c7 e0 08 ret 2012114: 81 e8 00 00 restore =============================================================================== 020128ec : int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 20128ec: 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; 20128f0: 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 ) { 20128f4: 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; 20128f8: 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)) && 20128fc: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2012900: 80 a0 60 01 cmp %g1, 1 2012904: 12 80 00 0d bne 2012938 <== ALWAYS TAKEN 2012908: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 201290c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED 2012910: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2012914: 32 80 00 0a bne,a 201293c <== NOT EXECUTED 2012918: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 201291c: 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)) && 2012920: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 2012924: 22 80 00 06 be,a 201293c <== NOT EXECUTED 2012928: 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; 201292c: c2 07 20 28 ld [ %i4 + 0x28 ], %g1 <== NOT EXECUTED 2012930: 10 80 00 18 b 2012990 <== NOT EXECUTED 2012934: c2 26 60 18 st %g1, [ %i1 + 0x18 ] <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; 2012938: c0 26 60 18 clr [ %i1 + 0x18 ] while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 201293c: 10 80 00 0d b 2012970 2012940: 82 10 20 00 clr %g1 { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2012944: 92 10 00 1b mov %i3, %o1 2012948: 40 00 1e 61 call 201a2cc 201294c: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2012950: 80 a2 20 00 cmp %o0, 0 2012954: 12 80 00 10 bne 2012994 <== NEVER TAKEN 2012958: 01 00 00 00 nop return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 201295c: c2 17 20 06 lduh [ %i4 + 6 ], %g1 2012960: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 2012964: 82 00 80 01 add %g2, %g1, %g1 2012968: 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; 201296c: 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) 2012970: f6 07 bf fc ld [ %fp + -4 ], %i3 2012974: c6 07 20 0c ld [ %i4 + 0xc ], %g3 2012978: c4 07 20 10 ld [ %i4 + 0x10 ], %g2 201297c: 86 0e c0 03 and %i3, %g3, %g3 2012980: 80 a0 c0 02 cmp %g3, %g2 2012984: 0a bf ff f0 bcs 2012944 2012988: 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; 201298c: c2 26 60 3c st %g1, [ %i1 + 0x3c ] return rc; 2012990: 90 10 20 00 clr %o0 } 2012994: 81 c7 e0 08 ret 2012998: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02012118 : fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 2012118: 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; 201211c: 82 10 3f ff mov -1, %g1 2012120: c2 27 bf fc st %g1, [ %fp + -4 ] if ( new_length >= fat_fd->fat_file_size ) 2012124: 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; 2012128: 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 ) { 201212c: 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 ) 2012130: 80 a6 80 01 cmp %i2, %g1 2012134: 1a 80 00 3a bcc 201221c <== NEVER TAKEN 2012138: c6 06 20 34 ld [ %i0 + 0x34 ], %g3 return rc; assert(fat_fd->fat_file_size); 201213c: 80 a0 60 00 cmp %g1, 0 2012140: 32 80 00 0a bne,a 2012168 <== ALWAYS TAKEN 2012144: c4 08 e0 08 ldub [ %g3 + 8 ], %g2 2012148: 11 00 80 af sethi %hi(0x202bc00), %o0 <== NOT EXECUTED 201214c: 15 00 80 af sethi %hi(0x202bc00), %o2 <== NOT EXECUTED 2012150: 17 00 80 af sethi %hi(0x202bc00), %o3 <== NOT EXECUTED 2012154: 90 12 21 80 or %o0, 0x180, %o0 <== NOT EXECUTED 2012158: 92 10 22 6d mov 0x26d, %o1 <== NOT EXECUTED 201215c: 94 12 a1 e0 or %o2, 0x1e0, %o2 <== NOT EXECUTED 2012160: 40 00 09 fc call 2014950 <__assert_func> <== NOT EXECUTED 2012164: 96 12 e1 c8 or %o3, 0x1c8, %o3 <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 2012168: c6 10 e0 06 lduh [ %g3 + 6 ], %g3 201216c: 86 00 ff ff add %g3, -1, %g3 2012170: b4 00 c0 1a add %g3, %i2, %i2 2012174: b5 36 80 02 srl %i2, %g2, %i2 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 2012178: 85 2e 80 02 sll %i2, %g2, %g2 201217c: 80 a0 80 01 cmp %g2, %g1 2012180: 1a 80 00 28 bcc 2012220 <== NEVER TAKEN 2012184: 92 10 20 00 clr %o1 return RC_OK; if (cl_start != 0) 2012188: 80 a6 a0 00 cmp %i2, 0 201218c: 02 80 00 0a be 20121b4 <== ALWAYS TAKEN 2012190: 90 10 00 1d mov %i5, %o0 { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 2012194: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2012198: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 201219c: 94 06 bf ff add %i2, -1, %o2 <== NOT EXECUTED 20121a0: 7f ff fe b4 call 2011c70 <== NOT EXECUTED 20121a4: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED if (rc != RC_OK) 20121a8: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 20121ac: 12 80 00 1d bne 2012220 <== NOT EXECUTED 20121b0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 20121b4: 92 10 00 19 mov %i1, %o1 20121b8: 94 10 00 1a mov %i2, %o2 20121bc: 7f ff fe ad call 2011c70 20121c0: 96 07 bf f8 add %fp, -8, %o3 if (rc != RC_OK) 20121c4: 80 a2 60 00 cmp %o1, 0 20121c8: 12 80 00 16 bne 2012220 <== NEVER TAKEN 20121cc: 01 00 00 00 nop return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); 20121d0: d2 07 bf f8 ld [ %fp + -8 ], %o1 20121d4: 40 00 21 5d call 201a748 20121d8: 90 10 00 1d mov %i5, %o0 if (rc != RC_OK) 20121dc: 92 92 20 00 orcc %o0, 0, %o1 20121e0: 12 80 00 10 bne 2012220 <== NEVER TAKEN 20121e4: 80 a6 a0 00 cmp %i2, 0 return rc; if (cl_start != 0) 20121e8: 02 80 00 0e be 2012220 <== ALWAYS TAKEN 20121ec: 90 10 00 1d mov %i5, %o0 { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 20121f0: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED 20121f4: 40 00 20 a6 call 201a48c <== NOT EXECUTED 20121f8: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 20121fc: 92 92 20 00 orcc %o0, 0, %o1 <== NOT EXECUTED 2012200: 12 80 00 08 bne 2012220 <== NOT EXECUTED 2012204: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; 2012208: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 201220c: 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; 2012210: 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; 2012214: 10 80 00 03 b 2012220 <== NOT EXECUTED 2012218: 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; 201221c: 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; } 2012220: 81 c7 e0 08 ret 2012224: 91 e8 00 09 restore %g0, %o1, %o0 =============================================================================== 020125a4 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 20125a4: 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; 20125a8: 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; 20125ac: c0 27 bf fc clr [ %fp + -4 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 20125b0: ba 10 00 18 mov %i0, %i5 int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 20125b4: 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 ) 20125b8: 80 a6 e0 00 cmp %i3, 0 20125bc: 02 80 00 79 be 20127a0 <== NEVER TAKEN 20125c0: 90 10 20 00 clr %o0 return cmpltd; if ( start > fat_fd->fat_file_size ) 20125c4: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 20125c8: 80 a6 80 01 cmp %i2, %g1 20125cc: 18 80 00 09 bgu 20125f0 <== NEVER TAKEN 20125d0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 20125d4: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 20125d8: 80 a6 c0 01 cmp %i3, %g1 20125dc: 18 80 00 05 bgu 20125f0 <== NEVER TAKEN 20125e0: 82 20 40 1b sub %g1, %i3, %g1 20125e4: 80 a6 80 01 cmp %i2, %g1 20125e8: 08 80 00 07 bleu 2012604 <== ALWAYS TAKEN 20125ec: a2 06 c0 1a add %i3, %i2, %l1 (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); 20125f0: 40 00 27 04 call 201c200 <__errno> <== NOT EXECUTED 20125f4: 01 00 00 00 nop <== NOT EXECUTED 20125f8: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 20125fc: 10 80 00 68 b 201279c <== NOT EXECUTED 2012600: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = fat_file_extend(mt_entry, fat_fd, start + count, &c); 2012604: 90 10 00 18 mov %i0, %o0 2012608: 92 10 00 19 mov %i1, %o1 201260c: 94 10 00 11 mov %l1, %o2 2012610: 7f ff ff 69 call 20123b4 2012614: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2012618: 80 a2 20 00 cmp %o0, 0 201261c: 12 80 00 61 bne 20127a0 <== NEVER TAKEN 2012620: 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)) 2012624: 80 a0 40 11 cmp %g1, %l1 2012628: 32 80 00 02 bne,a 2012630 <== NEVER TAKEN 201262c: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2012630: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2012634: 80 a0 60 01 cmp %g1, 1 2012638: 32 80 00 1c bne,a 20126a8 201263c: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 2012640: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 2012644: 80 a0 60 00 cmp %g1, 0 2012648: 32 80 00 18 bne,a 20126a8 <== NEVER TAKEN 201264c: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2012650: 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)) && 2012654: 80 88 60 03 btst 3, %g1 2012658: 22 80 00 14 be,a 20126a8 <== NEVER TAKEN 201265c: 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); 2012660: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 2012664: 7f ff fd a9 call 2011d08 2012668: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 sec += (start >> fs_info->vol.sec_log2); 201266c: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = start & (fs_info->vol.bps - 1); 2012670: 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); 2012674: 93 36 80 09 srl %i2, %o1, %o1 byte = start & (fs_info->vol.bps - 1); 2012678: 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); 201267c: 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); 2012680: 94 0e 80 0a and %i2, %o2, %o2 2012684: 90 10 00 1d mov %i5, %o0 2012688: 96 10 00 1b mov %i3, %o3 201268c: 40 00 01 d9 call 2012df0 <_fat_block_write> 2012690: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 2012694: 80 a2 20 00 cmp %o0, 0 2012698: 16 80 00 42 bge 20127a0 <== ALWAYS TAKEN 201269c: 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; 20126a0: 10 80 00 40 b 20127a0 <== NOT EXECUTED 20126a4: 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); 20126a8: e2 14 20 06 lduh [ %l0 + 6 ], %l1 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 20126ac: 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); 20126b0: a6 07 bf f8 add %fp, -8, %l3 20126b4: 90 10 00 1d mov %i5, %o0 20126b8: 92 10 00 19 mov %i1, %o1 20126bc: 94 10 00 12 mov %l2, %o2 20126c0: 7f ff fd 6c call 2011c70 20126c4: 96 10 00 13 mov %l3, %o3 if (rc != RC_OK) 20126c8: 90 92 60 00 orcc %o1, 0, %o0 20126cc: 12 80 00 35 bne 20127a0 <== NEVER TAKEN 20126d0: 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); 20126d4: a3 34 60 10 srl %l1, 0x10, %l1 20126d8: a2 04 7f ff add %l1, -1, %l1 20126dc: a8 10 20 00 clr %l4 20126e0: b4 0e 80 11 and %i2, %l1, %i2 20126e4: a2 10 20 00 clr %l1 20126e8: 10 80 00 21 b 201276c 20126ec: aa 10 00 1a mov %i2, %l5 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 20126f0: b0 26 00 15 sub %i0, %l5, %i0 20126f4: 80 a6 00 1b cmp %i0, %i3 20126f8: 38 80 00 02 bgu,a 2012700 20126fc: b0 10 00 1b mov %i3, %i0 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 2012700: d2 07 bf f8 ld [ %fp + -8 ], %o1 2012704: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 2012708: 7f ff fd 80 call 2011d08 201270c: f0 27 bf fc st %i0, [ %fp + -4 ] sec += (ofs >> fs_info->vol.sec_log2); 2012710: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = ofs & (fs_info->vol.bps - 1); 2012714: 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); 2012718: 93 35 40 09 srl %l5, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); 201271c: 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); 2012720: 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); 2012724: 94 0d 40 0a and %l5, %o2, %o2 2012728: 90 10 00 1d mov %i5, %o0 201272c: 96 10 00 18 mov %i0, %o3 2012730: 40 00 01 b0 call 2012df0 <_fat_block_write> 2012734: 98 07 00 11 add %i4, %l1, %o4 if ( ret < 0 ) 2012738: 80 a2 20 00 cmp %o0, 0 201273c: 06 80 00 18 bl 201279c <== NEVER TAKEN 2012740: c2 07 bf fc ld [ %fp + -4 ], %g1 return -1; count -= c; cmpltd += c; save_cln = cur_cln; 2012744: 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; 2012748: b6 26 c0 01 sub %i3, %g1, %i3 cmpltd += c; 201274c: a2 04 40 01 add %l1, %g1, %l1 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2012750: 90 10 00 1d mov %i5, %o0 2012754: 92 10 00 14 mov %l4, %o1 2012758: 40 00 1e dd call 201a2cc 201275c: 94 10 00 13 mov %l3, %o2 if ( rc != RC_OK ) 2012760: 80 a2 20 00 cmp %o0, 0 2012764: 12 80 00 0f bne 20127a0 <== NEVER TAKEN 2012768: 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) 201276c: 80 a6 e0 00 cmp %i3, 0 2012770: 32 bf ff e0 bne,a 20126f0 2012774: 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); 2012778: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 201277c: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 2012780: 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); 2012784: b4 06 80 11 add %i2, %l1, %i2 fat_fd->map.disk_cln = save_cln; return cmpltd; 2012788: 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); 201278c: 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 + 2012790: 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; 2012794: 10 80 00 03 b 20127a0 2012798: 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; 201279c: 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; } 20127a0: 81 c7 e0 08 ret 20127a4: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0201a748 : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 201a748: 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; 201a74c: b6 10 20 00 clr %i3 int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 201a750: ba 10 00 18 mov %i0, %i5 int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 201a754: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 uint32_t cur_cln = chain; uint32_t next_cln = 0; 201a758: 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; 201a75c: 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) 201a760: 10 80 00 19 b 201a7c4 201a764: a0 10 20 00 clr %l0 { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 201a768: 92 10 00 1a mov %i2, %o1 201a76c: 7f ff fe d8 call 201a2cc 201a770: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 201a774: b0 92 20 00 orcc %o0, 0, %i0 201a778: 02 80 00 0b be 201a7a4 <== ALWAYS TAKEN 201a77c: 90 10 00 1d mov %i5, %o0 { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 201a780: c2 07 20 40 ld [ %i4 + 0x40 ], %g1 <== NOT EXECUTED 201a784: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 201a788: 02 80 00 03 be 201a794 <== NOT EXECUTED 201a78c: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 201a790: f6 27 20 40 st %i3, [ %i4 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 201a794: 7f ff e1 1b call 2012c00 <== NOT EXECUTED 201a798: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED return rc; 201a79c: 81 c7 e0 08 ret <== NOT EXECUTED 201a7a0: 81 e8 00 00 restore <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 201a7a4: 92 10 00 1a mov %i2, %o1 201a7a8: 7f ff ff 39 call 201a48c 201a7ac: 94 10 20 00 clr %o2 if ( rc != RC_OK ) 201a7b0: 80 a2 20 00 cmp %o0, 0 201a7b4: 32 80 00 02 bne,a 201a7bc <== NEVER TAKEN 201a7b8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; 201a7bc: 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++; 201a7c0: 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) 201a7c4: c4 07 20 0c ld [ %i4 + 0xc ], %g2 201a7c8: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 201a7cc: 84 0e 80 02 and %i2, %g2, %g2 201a7d0: 80 a0 80 01 cmp %g2, %g1 201a7d4: 0a bf ff e5 bcs 201a768 201a7d8: 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) 201a7dc: c2 07 20 40 ld [ %i4 + 0x40 ], %g1 201a7e0: 80 a0 7f ff cmp %g1, -1 201a7e4: 02 80 00 04 be 201a7f4 <== ALWAYS TAKEN 201a7e8: f2 27 20 44 st %i1, [ %i4 + 0x44 ] fs_info->vol.free_cls += freed_cls_cnt; 201a7ec: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED 201a7f0: f6 27 20 40 st %i3, [ %i4 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 201a7f4: 90 10 00 1c mov %i4, %o0 201a7f8: 7f ff e1 02 call 2012c00 201a7fc: b0 10 00 10 mov %l0, %i0 if (rc1 != RC_OK) return rc1; return RC_OK; } 201a800: 81 c7 e0 08 ret 201a804: 81 e8 00 00 restore =============================================================================== 02013080 : 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; 2013080: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 2013084: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED 2013088: c4 00 60 7c ld [ %g1 + 0x7c ], %g2 <== NOT EXECUTED 201308c: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 <== NOT EXECUTED 2013090: 84 22 40 02 sub %o1, %g2, %g2 <== NOT EXECUTED 2013094: 87 30 a0 03 srl %g2, 3, %g3 <== NOT EXECUTED 2013098: 84 08 a0 07 and %g2, 7, %g2 <== NOT EXECUTED 201309c: 85 29 00 02 sll %g4, %g2, %g2 <== NOT EXECUTED 20130a0: c8 08 40 03 ldub [ %g1 + %g3 ], %g4 <== NOT EXECUTED 20130a4: 84 29 00 02 andn %g4, %g2, %g2 <== NOT EXECUTED } 20130a8: 81 c3 e0 08 retl <== NOT EXECUTED 20130ac: c4 28 40 03 stb %g2, [ %g1 + %g3 ] <== NOT EXECUTED =============================================================================== 0201a2cc : fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 201a2cc: 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; 201a2d0: 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)) ) 201a2d4: 80 a6 60 01 cmp %i1, 1 201a2d8: 08 80 00 64 bleu 201a468 <== NEVER TAKEN 201a2dc: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 201a2e0: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 201a2e4: 82 00 60 01 inc %g1 201a2e8: 80 a6 40 01 cmp %i1, %g1 201a2ec: 18 80 00 5f bgu 201a468 <== NEVER TAKEN 201a2f0: 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) + 201a2f4: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 201a2f8: b7 36 60 01 srl %i1, 1, %i3 201a2fc: 84 88 60 01 andcc %g1, 1, %g2 201a300: 12 80 00 06 bne 201a318 <== ALWAYS TAKEN 201a304: b6 06 c0 19 add %i3, %i1, %i3 201a308: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 201a30c: 02 80 00 03 be 201a318 <== NOT EXECUTED 201a310: b7 2e 60 02 sll %i1, 2, %i3 <== NOT EXECUTED 201a314: b7 2e 60 01 sll %i1, 1, %i3 <== NOT EXECUTED 201a318: 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); 201a31c: 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) + 201a320: b7 36 c0 03 srl %i3, %g3, %i3 201a324: 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); 201a328: b8 07 00 19 add %i4, %i1, %i4 201a32c: 80 a0 a0 00 cmp %g2, 0 201a330: 12 80 00 06 bne 201a348 <== ALWAYS TAKEN 201a334: b6 06 c0 03 add %i3, %g3, %i3 201a338: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 201a33c: 02 80 00 03 be 201a348 <== NOT EXECUTED 201a340: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED 201a344: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED 201a348: e0 17 40 00 lduh [ %i5 ], %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 201a34c: 90 10 00 1d mov %i5, %o0 201a350: 92 10 00 1b mov %i3, %o1 201a354: 94 10 20 01 mov 1, %o2 201a358: 7f ff e1 ab call 2012a04 201a35c: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 201a360: b0 92 20 00 orcc %o0, 0, %i0 201a364: 12 80 00 38 bne 201a444 <== NEVER TAKEN 201a368: a1 2c 20 10 sll %l0, 0x10, %l0 return rc; switch ( fs_info->vol.type ) 201a36c: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 201a370: 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); 201a374: a1 34 20 10 srl %l0, 0x10, %l0 201a378: 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 ) 201a37c: 02 80 00 27 be 201a418 <== NEVER TAKEN 201a380: b8 0f 00 10 and %i4, %l0, %i4 201a384: 80 a0 60 04 cmp %g1, 4 201a388: 02 80 00 31 be 201a44c <== NEVER TAKEN 201a38c: 80 a0 60 01 cmp %g1, 1 201a390: 12 80 00 36 bne 201a468 <== NEVER TAKEN 201a394: 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) ) 201a398: 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))); 201a39c: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 if ( ofs == (fs_info->vol.bps - 1) ) 201a3a0: 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))); 201a3a4: c2 08 80 1c ldub [ %g2 + %i4 ], %g1 if ( ofs == (fs_info->vol.bps - 1) ) 201a3a8: 80 a7 00 03 cmp %i4, %g3 201a3ac: 12 80 00 0f bne 201a3e8 <== ALWAYS TAKEN 201a3b0: c2 26 80 00 st %g1, [ %i2 ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 201a3b4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 201a3b8: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 201a3bc: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 201a3c0: 7f ff e1 91 call 2012a04 <== NOT EXECUTED 201a3c4: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 201a3c8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201a3cc: 12 80 00 2d bne 201a480 <== NOT EXECUTED 201a3d0: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 201a3d4: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED 201a3d8: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED 201a3dc: c2 08 40 00 ldub [ %g1 ], %g1 <== NOT EXECUTED 201a3e0: 10 80 00 05 b 201a3f4 <== NOT EXECUTED 201a3e4: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 201a3e8: b8 00 80 1c add %g2, %i4, %i4 201a3ec: c4 0f 20 01 ldub [ %i4 + 1 ], %g2 201a3f0: 85 28 a0 08 sll %g2, 8, %g2 201a3f4: 82 10 80 01 or %g2, %g1, %g1 201a3f8: c2 26 80 00 st %g1, [ %i2 ] } if ( FAT_CLUSTER_IS_ODD(cln) ) 201a3fc: 80 8e 60 01 btst 1, %i1 201a400: 02 80 00 04 be 201a410 201a404: c2 06 80 00 ld [ %i2 ], %g1 *ret_val = (*ret_val) >> FAT12_SHIFT; 201a408: 10 80 00 0e b 201a440 201a40c: 83 30 60 04 srl %g1, 4, %g1 else *ret_val = (*ret_val) & FAT_FAT12_MASK; 201a410: 10 80 00 0c b 201a440 201a414: 82 08 6f ff and %g1, 0xfff, %g1 break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 201a418: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 201a41c: 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)); 201a420: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 201a424: 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)); 201a428: c2 10 40 1c lduh [ %g1 + %i4 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 201a42c: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 201a430: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED 201a434: 83 30 60 08 srl %g1, 8, %g1 <== NOT EXECUTED 201a438: 82 08 40 03 and %g1, %g3, %g1 <== NOT EXECUTED 201a43c: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 201a440: c2 26 80 00 st %g1, [ %i2 ] break; 201a444: 81 c7 e0 08 ret 201a448: 81 e8 00 00 restore case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); 201a44c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 201a450: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_L(*ret_val); 201a454: 7f ff ff 92 call 201a29c <== NOT EXECUTED 201a458: d0 00 40 1c ld [ %g1 + %i4 ], %o0 <== NOT EXECUTED 201a45c: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED break; 201a460: 81 c7 e0 08 ret <== NOT EXECUTED 201a464: 81 e8 00 00 restore <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one(EIO); 201a468: 40 00 07 66 call 201c200 <__errno> <== NOT EXECUTED 201a46c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201a470: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 201a474: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201a478: 81 c7 e0 08 ret <== NOT EXECUTED 201a47c: 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) 201a480: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 201a484: 81 c7 e0 08 ret <== NOT EXECUTED 201a488: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02012fb0 : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 2012fb0: 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)) 2012fb4: 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; 2012fb8: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) 2012fbc: 10 80 00 2a b 2013064 <== NOT EXECUTED 2012fc0: 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)) 2012fc4: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED 2012fc8: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED 2012fcc: 9e 00 c0 02 add %g3, %g2, %o7 <== NOT EXECUTED 2012fd0: da 08 c0 02 ldub [ %g3 + %g2 ], %o5 <== NOT EXECUTED 2012fd4: c4 48 c0 02 ldsb [ %g3 + %g2 ], %g2 <== NOT EXECUTED 2012fd8: 88 08 60 07 and %g1, 7, %g4 <== NOT EXECUTED 2012fdc: 85 38 80 04 sra %g2, %g4, %g2 <== NOT EXECUTED 2012fe0: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 2012fe4: 12 80 00 0a bne 201300c <== NOT EXECUTED 2012fe8: 82 00 60 01 inc %g1 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 2012fec: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2012ff0: 89 28 40 04 sll %g1, %g4, %g4 <== NOT EXECUTED 2012ff4: 88 11 00 0d or %g4, %o5, %g4 <== NOT EXECUTED 2012ff8: c8 2b c0 00 stb %g4, [ %o7 ] <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 2012ffc: f0 07 60 74 ld [ %i5 + 0x74 ], %i0 <== NOT EXECUTED 2013000: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED 2013004: 81 c7 e0 08 ret <== NOT EXECUTED 2013008: 91 ee 00 01 restore %i0, %g1, %o0 <== NOT EXECUTED } fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) 201300c: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 2013010: 0a 80 00 03 bcs 201301c <== NOT EXECUTED 2013014: c2 27 60 74 st %g1, [ %i5 + 0x74 ] <== NOT EXECUTED fs_info->index = 0; 2013018: 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++) 201301c: 92 02 60 01 inc %o1 <== NOT EXECUTED 2013020: 80 a2 40 18 cmp %o1, %i0 <== NOT EXECUTED 2013024: 32 bf ff e8 bne,a 2012fc4 <== NOT EXECUTED 2013028: 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)) 201302c: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 <== NOT EXECUTED 2013030: 93 2a 60 01 sll %o1, 1, %o1 <== NOT EXECUTED 2013034: 82 27 00 01 sub %i4, %g1, %g1 <== NOT EXECUTED 2013038: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED 201303c: 1a 80 00 0d bcc 2013070 <== NOT EXECUTED 2013040: 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); 2013044: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED 2013048: 7f ff d0 12 call 2007090 <== NOT EXECUTED 201304c: d2 27 60 78 st %o1, [ %i5 + 0x78 ] <== NOT EXECUTED if (fs_info->uino != NULL) 2013050: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2013054: 02 80 00 09 be 2013078 <== NOT EXECUTED 2013058: d0 27 60 70 st %o0, [ %i5 + 0x70 ] <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 201305c: c2 07 60 78 ld [ %i5 + 0x78 ], %g1 <== NOT EXECUTED 2013060: 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++) 2013064: f0 07 60 78 ld [ %i5 + 0x78 ], %i0 <== NOT EXECUTED 2013068: 10 bf ff ee b 2013020 <== NOT EXECUTED 201306c: 92 10 20 00 clr %o1 <== NOT EXECUTED resrc_unsuff = true; } else resrc_unsuff = true; } return 0; 2013070: 81 c7 e0 08 ret <== NOT EXECUTED 2013074: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } 2013078: 81 c7 e0 08 ret <== NOT EXECUTED 201307c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 02012ef8 : int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 2012ef8: 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; 2012efc: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 uint32_t cur_cln = start_cln; 2012f00: f2 27 bf fc st %i1, [ %fp + -4 ] char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 2012f04: d0 17 60 06 lduh [ %i5 + 6 ], %o0 2012f08: 92 10 20 01 mov 1, %o1 2012f0c: 7f ff ca 25 call 20057a0 2012f10: b8 10 00 18 mov %i0, %i4 if ( buf == NULL ) 2012f14: b6 92 20 00 orcc %o0, 0, %i3 2012f18: 12 80 00 1b bne 2012f84 <== ALWAYS TAKEN 2012f1c: d2 07 bf fc ld [ %fp + -4 ], %o1 rtems_set_errno_and_return_minus_one( EIO ); 2012f20: 40 00 24 b8 call 201c200 <__errno> <== NOT EXECUTED 2012f24: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2012f28: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2012f2c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012f30: 81 c7 e0 08 ret <== NOT EXECUTED 2012f34: 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); 2012f38: 7f ff ff e4 call 2012ec8 2012f3c: 94 10 00 1b mov %i3, %o2 if ( ret == -1 ) 2012f40: 80 a2 3f ff cmp %o0, -1 2012f44: 12 80 00 06 bne 2012f5c <== ALWAYS TAKEN 2012f48: d2 07 bf fc ld [ %fp + -4 ], %o1 { free(buf); 2012f4c: 7f ff cb 48 call 2005c6c <== NOT EXECUTED 2012f50: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED return -1; 2012f54: 81 c7 e0 08 ret <== NOT EXECUTED 2012f58: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2012f5c: 90 10 00 1c mov %i4, %o0 2012f60: 40 00 1c db call 201a2cc 2012f64: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2012f68: b0 92 20 00 orcc %o0, 0, %i0 2012f6c: 02 80 00 06 be 2012f84 <== ALWAYS TAKEN 2012f70: d2 07 bf fc ld [ %fp + -4 ], %o1 { free(buf); 2012f74: 7f ff cb 3e call 2005c6c <== NOT EXECUTED 2012f78: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED return rc; 2012f7c: 81 c7 e0 08 ret <== NOT EXECUTED 2012f80: 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) 2012f84: c4 07 60 0c ld [ %i5 + 0xc ], %g2 2012f88: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 2012f8c: 84 0a 40 02 and %o1, %g2, %g2 2012f90: 80 a0 80 01 cmp %g2, %g1 2012f94: 0a bf ff e9 bcs 2012f38 2012f98: 90 10 00 1c mov %i4, %o0 free(buf); return rc; } } free(buf); 2012f9c: 90 10 00 1b mov %i3, %o0 2012fa0: 7f ff cb 33 call 2005c6c 2012fa4: b0 10 20 00 clr %i0 return rc; } 2012fa8: 81 c7 e0 08 ret 2012fac: 81 e8 00 00 restore =============================================================================== 0201324c : * 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) { 201324c: 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); 2013250: 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; 2013254: 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) { 2013258: 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; 201325c: c0 27 bf fc clr [ %fp + -4 ] rc = stat(mt_entry->dev, &stat_buf); 2013260: 7f ff d0 2e call 2007318 2013264: 92 07 bf a8 add %fp, -88, %o1 if (rc == -1) 2013268: 80 a2 3f ff cmp %o0, -1 201326c: 02 80 01 68 be 201380c <== NEVER TAKEN 2013270: b0 10 00 08 mov %o0, %i0 return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 2013274: c4 07 bf b4 ld [ %fp + -76 ], %g2 2013278: 03 00 00 3c sethi %hi(0xf000), %g1 201327c: 84 08 80 01 and %g2, %g1, %g2 2013280: 03 00 00 18 sethi %hi(0x6000), %g1 2013284: 80 a0 80 01 cmp %g2, %g1 2013288: 02 80 00 06 be 20132a0 <== ALWAYS TAKEN 201328c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(ENOTTY); 2013290: 40 00 23 dc call 201c200 <__errno> <== NOT EXECUTED 2013294: 01 00 00 00 nop <== NOT EXECUTED 2013298: 10 80 01 ab b 2013944 <== NOT EXECUTED 201329c: 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); 20132a0: 7f ff c6 b1 call 2004d64 20132a4: d0 1f bf c0 ldd [ %fp + -64 ], %o0 if (vol->dd == NULL) 20132a8: 80 a2 20 00 cmp %o0, 0 20132ac: 02 80 00 3e be 20133a4 <== NEVER TAKEN 20132b0: d0 27 60 60 st %o0, [ %i5 + 0x60 ] rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; 20132b4: 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); 20132b8: 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; 20132bc: 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); 20132c0: 7f ff f7 89 call 20110e4 20132c4: 96 07 bf fc add %fp, -4, %o3 if (sc != RTEMS_SUCCESSFUL) 20132c8: 80 a2 20 00 cmp %o0, 0 20132cc: 12 80 00 34 bne 201339c <== NEVER TAKEN 20132d0: 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); 20132d4: d0 07 bf fc ld [ %fp + -4 ], %o0 20132d8: de 02 20 24 ld [ %o0 + 0x24 ], %o7 20132dc: d6 0b e0 17 ldub [ %o7 + 0x17 ], %o3 20132e0: f4 0b e0 20 ldub [ %o7 + 0x20 ], %i2 20132e4: d6 2f bf 99 stb %o3, [ %fp + -103 ] 20132e8: d6 0b e0 23 ldub [ %o7 + 0x23 ], %o3 20132ec: f4 2f bf 9a stb %i2, [ %fp + -102 ] 20132f0: d6 2f bf 97 stb %o3, [ %fp + -105 ] 20132f4: d6 0b e0 2c ldub [ %o7 + 0x2c ], %o3 20132f8: da 0b e0 0b ldub [ %o7 + 0xb ], %o5 20132fc: d6 2f bf 9d stb %o3, [ %fp + -99 ] 2013300: d6 0b e0 2d ldub [ %o7 + 0x2d ], %o3 2013304: d8 0b e0 0c ldub [ %o7 + 0xc ], %o4 2013308: d6 2f bf 9c stb %o3, [ %fp + -100 ] 201330c: d6 0b e0 2e ldub [ %o7 + 0x2e ], %o3 2013310: c6 0b e0 0e ldub [ %o7 + 0xe ], %g3 2013314: d6 2f bf 9b stb %o3, [ %fp + -101 ] 2013318: d6 0b e0 2f ldub [ %o7 + 0x2f ], %o3 201331c: c8 0b e0 0f ldub [ %o7 + 0xf ], %g4 2013320: c2 0b e0 11 ldub [ %o7 + 0x11 ], %g1 2013324: c4 0b e0 12 ldub [ %o7 + 0x12 ], %g2 2013328: f6 0b e0 0d ldub [ %o7 + 0xd ], %i3 201332c: f2 0b e0 10 ldub [ %o7 + 0x10 ], %i1 2013330: e2 0b e0 13 ldub [ %o7 + 0x13 ], %l1 2013334: e4 0b e0 14 ldub [ %o7 + 0x14 ], %l2 2013338: ee 0b e0 16 ldub [ %o7 + 0x16 ], %l7 201333c: e0 0b e0 21 ldub [ %o7 + 0x21 ], %l0 2013340: f0 0b e0 22 ldub [ %o7 + 0x22 ], %i0 2013344: e8 0b e0 24 ldub [ %o7 + 0x24 ], %l4 2013348: ec 0b e0 25 ldub [ %o7 + 0x25 ], %l6 201334c: ea 0b e0 26 ldub [ %o7 + 0x26 ], %l5 2013350: e6 0b e0 27 ldub [ %o7 + 0x27 ], %l3 2013354: f4 0b e0 28 ldub [ %o7 + 0x28 ], %i2 2013358: d6 2f bf a7 stb %o3, [ %fp + -89 ] 201335c: d6 0b e0 30 ldub [ %o7 + 0x30 ], %o3 2013360: de 0b e0 31 ldub [ %o7 + 0x31 ], %o7 2013364: d6 2f bf 9f stb %o3, [ %fp + -97 ] sc = rtems_bdbuf_release( block); 2013368: c2 27 bf 8c st %g1, [ %fp + -116 ] 201336c: c4 3f bf 80 std %g2, [ %fp + -128 ] 2013370: c8 27 bf 7c st %g4, [ %fp + -132 ] 2013374: 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); 2013378: de 2f bf 9e stb %o7, [ %fp + -98 ] sc = rtems_bdbuf_release( block); 201337c: 7f ff f7 f4 call 201134c 2013380: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 2013384: c2 07 bf 8c ld [ %fp + -116 ], %g1 2013388: 80 a2 20 00 cmp %o0, 0 201338c: c4 1f bf 80 ldd [ %fp + -128 ], %g2 2013390: c8 07 bf 7c ld [ %fp + -132 ], %g4 2013394: 02 80 00 08 be 20133b4 <== ALWAYS TAKEN 2013398: d8 1f bf 70 ldd [ %fp + -144 ], %o4 { rtems_disk_release(vol->dd); 201339c: 7f ff c6 91 call 2004de0 <== NOT EXECUTED 20133a0: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 20133a4: 40 00 23 97 call 201c200 <__errno> <== NOT EXECUTED 20133a8: 01 00 00 00 nop <== NOT EXECUTED 20133ac: 10 80 01 66 b 2013944 <== NOT EXECUTED 20133b0: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 20133b4: 98 0b 20 ff and %o4, 0xff, %o4 20133b8: 9a 0b 60 ff and %o5, 0xff, %o5 20133bc: 99 2b 20 08 sll %o4, 8, %o4 20133c0: 9a 13 00 0d or %o4, %o5, %o5 if ( (vol->bps != 512) && 20133c4: 9f 2b 60 10 sll %o5, 0x10, %o7 20133c8: 9f 33 e0 10 srl %o7, 0x10, %o7 20133cc: 80 a3 e4 00 cmp %o7, 0x400 20133d0: 02 80 00 0b be 20133fc <== NEVER TAKEN 20133d4: da 37 40 00 sth %o5, [ %i5 ] 20133d8: 80 a3 e2 00 cmp %o7, 0x200 20133dc: 22 80 00 09 be,a 2013400 <== ALWAYS TAKEN 20133e0: 9f 2b 60 10 sll %o5, 0x10, %o7 (vol->bps != 1024) && 20133e4: 80 a3 e8 00 cmp %o7, 0x800 <== NOT EXECUTED 20133e8: 02 80 00 05 be 20133fc <== NOT EXECUTED 20133ec: 19 00 00 04 sethi %hi(0x1000), %o4 <== NOT EXECUTED (vol->bps != 2048) && 20133f0: 80 a3 c0 0c cmp %o7, %o4 <== NOT EXECUTED 20133f4: 12 80 00 d2 bne 201373c <== NOT EXECUTED 20133f8: 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; 20133fc: 9f 2b 60 10 sll %o5, 0x10, %o7 <== NOT EXECUTED 2013400: c0 2f 60 03 clrb [ %i5 + 3 ] 2013404: 10 80 00 05 b 2013418 2013408: 9f 33 e0 19 srl %o7, 0x19, %o7 i >>= 1, vol->sec_mul++); 201340c: 9f 3b e0 01 sra %o7, 1, %o7 <== NOT EXECUTED 2013410: 98 03 20 01 inc %o4 <== NOT EXECUTED 2013414: 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; 2013418: 80 8b e0 01 btst 1, %o7 201341c: 22 bf ff fc be,a 201340c <== NEVER TAKEN 2013420: 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; 2013424: 9b 2b 60 10 sll %o5, 0x10, %o5 2013428: c0 2f 60 02 clrb [ %i5 + 2 ] 201342c: 93 33 60 10 srl %o5, 0x10, %o1 2013430: 10 80 00 05 b 2013444 2013434: 9e 10 00 09 mov %o1, %o7 i >>= 1, vol->sec_log2++); 2013438: 9f 3b e0 01 sra %o7, 1, %o7 201343c: 9a 03 60 01 inc %o5 2013440: 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; 2013444: 80 8b e0 01 btst 1, %o7 2013448: 22 bf ff fc be,a 2013438 201344c: 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) 2013450: 9a 8e e0 ff andcc %i3, 0xff, %o5 2013454: 02 80 00 ba be 201373c <== NEVER TAKEN 2013458: 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; 201345c: 10 80 00 05 b 2013470 2013460: c0 2f 60 05 clrb [ %i5 + 5 ] i >>= 1, vol->spc_log2++); 2013464: 9e 03 e0 01 inc %o7 2013468: 9b 3b 60 01 sra %o5, 1, %o5 201346c: 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; 2013470: 80 8b 60 01 btst 1, %o5 2013474: 02 bf ff fc be 2013464 2013478: 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) 201347c: 9f 2a 40 0f sll %o1, %o7, %o7 2013480: de 37 60 06 sth %o7, [ %i5 + 6 ] 2013484: 1b 00 00 20 sethi %hi(0x8000), %o5 2013488: 9f 2b e0 10 sll %o7, 0x10, %o7 201348c: 9f 33 e0 10 srl %o7, 0x10, %o7 2013490: 80 a3 c0 0d cmp %o7, %o5 2013494: 18 80 00 aa bgu 201373c <== NEVER TAKEN 2013498: 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; 201349c: 10 80 00 05 b 20134b0 20134a0: c0 2f 60 08 clrb [ %i5 + 8 ] i >>= 1, vol->bpc_log2++); 20134a4: 9f 3b e0 01 sra %o7, 1, %o7 20134a8: 9a 03 60 01 inc %o5 20134ac: 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; 20134b0: 80 8b e0 01 btst 1, %o7 20134b4: 22 bf ff fc be,a 20134a4 20134b8: 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); 20134bc: 84 08 a0 ff and %g2, 0xff, %g2 20134c0: 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); 20134c4: f2 2f 60 09 stb %i1, [ %i5 + 9 ] vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 20134c8: 88 09 20 ff and %g4, 0xff, %g4 20134cc: 86 08 e0 ff and %g3, 0xff, %g3 20134d0: 89 29 20 08 sll %g4, 8, %g4 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 20134d4: 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); 20134d8: 86 11 00 03 or %g4, %g3, %g3 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 20134dc: 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); 20134e0: c6 37 60 14 sth %g3, [ %i5 + 0x14 ] vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 20134e4: 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)) / 20134e8: 84 02 7f ff add %o1, -1, %g2 20134ec: 83 28 60 10 sll %g1, 0x10, %g1 20134f0: c6 27 bf 84 st %g3, [ %fp + -124 ] 20134f4: 91 30 60 0b srl %g1, 0xb, %o0 20134f8: 40 00 56 2a call 2028da0 <.div> 20134fc: 90 02 00 02 add %o0, %g2, %o0 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 2013500: 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)) / 2013504: d0 27 60 24 st %o0, [ %i5 + 0x24 ] vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 2013508: 85 2a 00 02 sll %o0, %g2, %g2 201350c: c4 27 60 28 st %g2, [ %i5 + 0x28 ] if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 2013510: c4 0f bf 99 ldub [ %fp + -103 ], %g2 2013514: ae 0d e0 ff and %l7, 0xff, %l7 2013518: 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)) / 201351c: 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) 2013520: ae 10 80 17 or %g2, %l7, %l7 2013524: af 2d e0 10 sll %l7, 0x10, %l7 2013528: 80 a5 e0 00 cmp %l7, 0 201352c: 02 80 00 05 be 2013540 <== NEVER TAKEN 2013530: c6 07 bf 84 ld [ %fp + -124 ], %g3 vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 2013534: af 35 e0 10 srl %l7, 0x10, %l7 2013538: 10 80 00 0c b 2013568 201353c: ee 27 60 18 st %l7, [ %i5 + 0x18 ] else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 2013540: ac 0d a0 ff and %l6, 0xff, %l6 <== NOT EXECUTED 2013544: aa 0d 60 ff and %l5, 0xff, %l5 <== NOT EXECUTED 2013548: ad 2d a0 08 sll %l6, 8, %l6 <== NOT EXECUTED 201354c: ab 2d 60 10 sll %l5, 0x10, %l5 <== NOT EXECUTED 2013550: a8 0d 20 ff and %l4, 0xff, %l4 <== NOT EXECUTED 2013554: aa 15 80 15 or %l6, %l5, %l5 <== NOT EXECUTED 2013558: a7 2c e0 18 sll %l3, 0x18, %l3 <== NOT EXECUTED 201355c: a8 15 40 14 or %l5, %l4, %l4 <== NOT EXECUTED 2013560: a6 15 00 13 or %l4, %l3, %l3 <== NOT EXECUTED 2013564: e6 27 60 18 st %l3, [ %i5 + 0x18 ] <== NOT EXECUTED vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 2013568: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 201356c: 87 28 e0 10 sll %g3, 0x10, %g3 2013570: c2 27 bf 8c st %g1, [ %fp + -116 ] 2013574: a7 30 e0 10 srl %g3, 0x10, %l3 2013578: 40 00 55 ce call 2028cb0 <.umul> 201357c: 90 0e 60 ff and %i1, 0xff, %o0 2013580: c2 07 bf 8c ld [ %fp + -116 ], %g1 2013584: 90 04 c0 08 add %l3, %o0, %o0 2013588: 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; 201358c: d0 27 60 1c st %o0, [ %i5 + 0x1c ] if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 2013590: a4 0c a0 ff and %l2, 0xff, %l2 2013594: a2 0c 60 ff and %l1, 0xff, %l1 2013598: a5 2c a0 08 sll %l2, 8, %l2 201359c: a2 14 80 11 or %l2, %l1, %l1 20135a0: a3 2c 60 10 sll %l1, 0x10, %l1 20135a4: 80 a4 60 00 cmp %l1, 0 20135a8: 02 80 00 05 be 20135bc <== NEVER TAKEN 20135ac: c2 27 60 30 st %g1, [ %i5 + 0x30 ] vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 20135b0: a3 34 60 10 srl %l1, 0x10, %l1 20135b4: 10 80 00 0d b 20135e8 20135b8: e2 27 60 2c st %l1, [ %i5 + 0x2c ] else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 20135bc: c6 0f bf 9a ldub [ %fp + -102 ], %g3 <== NOT EXECUTED 20135c0: c8 0f bf 97 ldub [ %fp + -105 ], %g4 <== NOT EXECUTED 20135c4: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED 20135c8: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED 20135cc: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 20135d0: b1 2e 20 10 sll %i0, 0x10, %i0 <== NOT EXECUTED 20135d4: 84 10 80 18 or %g2, %i0, %g2 <== NOT EXECUTED 20135d8: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 20135dc: 87 29 20 18 sll %g4, 0x18, %g3 <== NOT EXECUTED 20135e0: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 20135e4: c4 27 60 2c st %g2, [ %i5 + 0x2c ] <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; 20135e8: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 vol->data_cls = data_secs / vol->spc; 20135ec: 92 0e e0 ff and %i3, 0xff, %o1 20135f0: 40 00 55 ea call 2028d98 <.udiv> 20135f4: 90 22 00 01 sub %o0, %g1, %o0 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 20135f8: 80 a2 2f f4 cmp %o0, 0xff4 20135fc: 18 80 00 08 bgu 201361c <== NEVER TAKEN 2013600: d0 27 60 34 st %o0, [ %i5 + 0x34 ] { vol->type = FAT_FAT12; 2013604: 82 10 20 01 mov 1, %g1 2013608: c2 2f 60 0a stb %g1, [ %i5 + 0xa ] vol->mask = FAT_FAT12_MASK; 201360c: 82 10 2f ff mov 0xfff, %g1 2013610: c2 27 60 0c st %g1, [ %i5 + 0xc ] vol->eoc_val = FAT_FAT12_EOC; 2013614: 10 80 00 0f b 2013650 2013618: 82 10 2f f8 mov 0xff8, %g1 } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 201361c: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 2013620: 84 10 63 f4 or %g1, 0x3f4, %g2 ! fff4 <== NOT EXECUTED 2013624: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 2013628: 38 80 00 05 bgu,a 201363c <== NOT EXECUTED 201362c: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED { vol->type = FAT_FAT16; 2013630: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED 2013634: 10 80 00 04 b 2013644 <== NOT EXECUTED 2013638: 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; 201363c: c2 2f 60 0a stb %g1, [ %i5 + 0xa ] <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 2013640: 03 03 ff ff sethi %hi(0xffffc00), %g1 <== NOT EXECUTED 2013644: 84 10 63 ff or %g1, 0x3ff, %g2 ! fffffff <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 2013648: 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; 201364c: c4 27 60 0c st %g2, [ %i5 + 0xc ] <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 2013650: c2 27 60 10 st %g1, [ %i5 + 0x10 ] } } if (vol->type == FAT_FAT32) 2013654: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 2013658: 80 a0 60 04 cmp %g1, 4 201365c: 12 80 00 6e bne 2013814 <== ALWAYS TAKEN 2013660: 82 10 3f ff mov -1, %g1 { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 2013664: c4 0f bf 9c ldub [ %fp + -100 ], %g2 <== NOT EXECUTED 2013668: c2 0f bf 9b ldub [ %fp + -101 ], %g1 <== NOT EXECUTED 201366c: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 2013670: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 2013674: d6 0f bf a7 ldub [ %fp + -89 ], %o3 <== NOT EXECUTED 2013678: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 201367c: c4 0f bf 9d ldub [ %fp + -99 ], %g2 <== NOT EXECUTED 2013680: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 2013684: 85 2a e0 18 sll %o3, 0x18, %g2 <== NOT EXECUTED 2013688: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 201368c: c2 27 60 38 st %g1, [ %i5 + 0x38 ] <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 2013690: 82 0e bf 80 and %i2, -128, %g1 <== NOT EXECUTED if (vol->mirror) 2013694: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED 2013698: 02 80 00 05 be 20136ac <== NOT EXECUTED 201369c: 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; 20136a0: b4 0e a0 0f and %i2, 0xf, %i2 <== NOT EXECUTED 20136a4: 10 80 00 03 b 20136b0 <== NOT EXECUTED 20136a8: f4 2f 60 50 stb %i2, [ %i5 + 0x50 ] <== NOT EXECUTED else vol->afat = 0; 20136ac: c0 2f 60 50 clrb [ %i5 + 0x50 ] <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 20136b0: d2 0f bf 9e ldub [ %fp + -98 ], %o1 <== NOT EXECUTED 20136b4: c2 0f bf 9f ldub [ %fp + -97 ], %g1 <== NOT EXECUTED 20136b8: 93 2a 60 08 sll %o1, 8, %o1 <== NOT EXECUTED 20136bc: 92 12 40 01 or %o1, %g1, %o1 <== NOT EXECUTED 20136c0: d2 37 60 3c sth %o1, [ %i5 + 0x3c ] <== NOT EXECUTED if( vol->info_sec == 0 ) 20136c4: 93 2a 60 10 sll %o1, 0x10, %o1 <== NOT EXECUTED 20136c8: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 20136cc: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 20136d0: 02 80 00 1b be 201373c <== NOT EXECUTED 20136d4: 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, 20136d8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 20136dc: 94 10 20 00 clr %o2 <== NOT EXECUTED 20136e0: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 20136e4: 7f ff fd a1 call 2012d68 <_fat_block_read> <== NOT EXECUTED 20136e8: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 20136ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20136f0: 06 80 00 23 bl 201377c <== NOT EXECUTED 20136f4: 01 00 00 00 nop <== NOT EXECUTED { rtems_disk_release(vol->dd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 20136f8: c2 0f bf f2 ldub [ %fp + -14 ], %g1 <== NOT EXECUTED 20136fc: c4 0f bf f1 ldub [ %fp + -15 ], %g2 <== NOT EXECUTED 2013700: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 2013704: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 2013708: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 201370c: c2 0f bf f0 ldub [ %fp + -16 ], %g1 <== NOT EXECUTED 2013710: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 2013714: c2 0f bf f3 ldub [ %fp + -13 ], %g1 <== NOT EXECUTED 2013718: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 201371c: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 2013720: 03 10 58 54 sethi %hi(0x41615000), %g1 <== NOT EXECUTED 2013724: 82 10 62 52 or %g1, 0x252, %g1 ! 41615252 <== NOT EXECUTED 2013728: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 201372c: 22 80 00 0a be,a 2013754 <== NOT EXECUTED 2013730: 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); 2013734: 7f ff fd 33 call 2012c00 <== NOT EXECUTED 2013738: 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); 201373c: 7f ff c5 a9 call 2004de0 <== NOT EXECUTED 2013740: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 2013744: 40 00 22 af call 201c200 <__errno> <== NOT EXECUTED 2013748: 01 00 00 00 nop <== NOT EXECUTED 201374c: 10 80 00 7e b 2013944 <== NOT EXECUTED 2013750: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, 2013754: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 2013758: 94 10 21 e4 mov 0x1e4, %o2 <== NOT EXECUTED 201375c: 96 10 20 0c mov 0xc, %o3 <== NOT EXECUTED 2013760: 7f ff fd 82 call 2012d68 <_fat_block_read> <== NOT EXECUTED 2013764: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 2013768: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201376c: 16 80 00 08 bge 201378c <== NOT EXECUTED 2013770: 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); 2013774: 7f ff fd 23 call 2012c00 <== NOT EXECUTED 2013778: 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); 201377c: 7f ff c5 99 call 2004de0 <== NOT EXECUTED 2013780: 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 ); 2013784: 81 c7 e0 08 ret <== NOT EXECUTED 2013788: 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); 201378c: c2 0f bf f6 ldub [ %fp + -10 ], %g1 <== NOT EXECUTED 2013790: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 2013794: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 2013798: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 201379c: 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, 20137a0: 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); 20137a4: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 20137a8: 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, 20137ac: 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); 20137b0: 85 28 a0 18 sll %g2, 0x18, %g2 <== NOT EXECUTED 20137b4: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 20137b8: 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); 20137bc: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 20137c0: c2 0f bf fa ldub [ %fp + -6 ], %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 f8 ldub [ %fp + -8 ], %g2 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 20137d4: 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); 20137d8: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 20137dc: c4 0f bf fb ldub [ %fp + -5 ], %g2 <== NOT EXECUTED 20137e0: 85 28 a0 18 sll %g2, 0x18, %g2 <== NOT EXECUTED 20137e4: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 20137e8: 7f ff fe 37 call 20130c4 <== NOT EXECUTED 20137ec: c2 27 60 44 st %g1, [ %i5 + 0x44 ] <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 20137f0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 20137f4: 02 80 00 0d be 2013828 <== NOT EXECUTED 20137f8: 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); 20137fc: 7f ff fd 01 call 2012c00 <== NOT EXECUTED 2013800: 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); 2013804: 7f ff c5 77 call 2004de0 <== NOT EXECUTED 2013808: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED return rc; 201380c: 81 c7 e0 08 ret 2013810: 81 e8 00 00 restore } } } else { vol->rdir_cl = 0; 2013814: c0 27 60 38 clr [ %i5 + 0x38 ] vol->mirror = 0; 2013818: c0 2f 60 48 clrb [ %i5 + 0x48 ] vol->afat = 0; 201381c: c0 2f 60 50 clrb [ %i5 + 0x50 ] vol->free_cls = 0xFFFFFFFF; 2013820: c2 27 60 40 st %g1, [ %i5 + 0x40 ] vol->next_cl = 0xFFFFFFFF; 2013824: 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); 2013828: 7f ff fc f6 call 2012c00 201382c: 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; 2013830: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 2013834: 40 00 55 1f call 2028cb0 <.umul> 2013838: d0 0f 60 50 ldub [ %i5 + 0x50 ], %o0 201383c: 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)); 2013840: 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; 2013844: 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)); 2013848: 90 10 20 02 mov 2, %o0 201384c: 7f ff c7 d5 call 20057a0 2013850: c2 27 60 4c st %g1, [ %i5 + 0x4c ] if ( fs_info->vhash == NULL ) 2013854: 80 a2 20 00 cmp %o0, 0 2013858: 02 80 00 12 be 20138a0 <== NEVER TAKEN 201385c: 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 ); 2013860: 82 02 20 04 add %o0, 4, %g1 2013864: 84 02 20 10 add %o0, 0x10, %g2 head->next = tail; 2013868: 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 ); 201386c: 82 02 20 0c add %o0, 0xc, %g1 head->next = tail; head->previous = NULL; 2013870: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 2013874: 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; 2013878: c4 22 20 0c st %g2, [ %o0 + 0xc ] head->previous = NULL; 201387c: c0 22 20 10 clr [ %o0 + 0x10 ] tail->previous = head; 2013880: 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)); 2013884: 92 10 20 0c mov 0xc, %o1 2013888: 7f ff c7 c6 call 20057a0 201388c: 90 10 20 02 mov 2, %o0 if ( fs_info->rhash == NULL ) 2013890: 80 a2 20 00 cmp %o0, 0 2013894: 12 80 00 06 bne 20138ac <== ALWAYS TAKEN 2013898: d0 27 60 6c st %o0, [ %i5 + 0x6c ] 201389c: 30 80 00 1c b,a 201390c <== 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); 20138a0: 7f ff c5 50 call 2004de0 <== NOT EXECUTED 20138a4: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED 20138a8: 30 80 00 24 b,a 2013938 <== 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 ); 20138ac: 82 02 20 04 add %o0, 4, %g1 head->next = tail; 20138b0: 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 ); 20138b4: 82 02 20 0c add %o0, 0xc, %g1 head->next = tail; head->previous = NULL; 20138b8: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 20138bc: c2 22 20 14 st %g1, [ %o0 + 0x14 ] 20138c0: 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; 20138c4: 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 ); 20138c8: 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; 20138cc: 82 10 21 00 mov 0x100, %g1 head->next = tail; 20138d0: c4 22 20 0c st %g2, [ %o0 + 0xc ] 20138d4: c2 27 60 78 st %g1, [ %i5 + 0x78 ] fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 20138d8: c4 07 60 2c ld [ %i5 + 0x2c ], %g2 20138dc: c2 0f 60 03 ldub [ %i5 + 3 ], %g1 fs_info->index = 0; 20138e0: 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; 20138e4: 83 28 80 01 sll %g2, %g1, %g1 20138e8: 83 28 60 04 sll %g1, 4, %g1 fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 20138ec: 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; 20138f0: c2 27 60 7c st %g1, [ %i5 + 0x7c ] fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 20138f4: 7f ff c7 ab call 20057a0 20138f8: 92 10 20 01 mov 1, %o1 if ( fs_info->uino == NULL ) 20138fc: 80 a2 20 00 cmp %o0, 0 2013900: 12 80 00 14 bne 2013950 <== ALWAYS TAKEN 2013904: d0 27 60 70 st %o0, [ %i5 + 0x70 ] 2013908: 30 80 00 05 b,a 201391c <== 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); 201390c: 7f ff c5 35 call 2004de0 <== NOT EXECUTED 2013910: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 2013914: 10 80 00 07 b 2013930 <== NOT EXECUTED 2013918: 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); 201391c: 7f ff c5 31 call 2004de0 <== NOT EXECUTED 2013920: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 2013924: 7f ff c8 d2 call 2005c6c <== NOT EXECUTED 2013928: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 201392c: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED 2013930: 7f ff c8 cf call 2005c6c <== NOT EXECUTED 2013934: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 2013938: 40 00 22 32 call 201c200 <__errno> <== NOT EXECUTED 201393c: 01 00 00 00 nop <== NOT EXECUTED 2013940: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2013944: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2013948: 81 c7 e0 08 ret <== NOT EXECUTED 201394c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 2013950: d0 17 40 00 lduh [ %i5 ], %o0 2013954: 7f ff c7 93 call 20057a0 2013958: 92 10 20 01 mov 1, %o1 201395c: d0 27 60 8c st %o0, [ %i5 + 0x8c ] if (fs_info->sec_buf == NULL) 2013960: 80 a2 20 00 cmp %o0, 0 2013964: 12 bf ff aa bne 201380c <== ALWAYS TAKEN 2013968: b0 10 20 00 clr %i0 { rtems_disk_release(vol->dd); 201396c: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED 2013970: 7f ff c5 1c call 2004de0 <== NOT EXECUTED 2013974: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED free(fs_info->vhash); 2013978: 7f ff c8 bd call 2005c6c <== NOT EXECUTED 201397c: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 2013980: 7f ff c8 bb call 2005c6c <== NOT EXECUTED 2013984: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED free(fs_info->uino); 2013988: 7f ff c8 b9 call 2005c6c <== NOT EXECUTED 201398c: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 2013990: 40 00 22 1c call 201c200 <__errno> <== NOT EXECUTED 2013994: 01 00 00 00 nop <== NOT EXECUTED 2013998: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 201399c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return RC_OK; } 20139a0: 81 c7 e0 08 ret <== NOT EXECUTED 20139a4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0201a808 : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 201a808: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 201a80c: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 uint32_t cl4find = 2; uint32_t next_cln = 0; 201a810: c0 27 bf fc clr [ %fp + -4 ] uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 201a814: e8 04 60 34 ld [ %l1 + 0x34 ], %l4 uint32_t i = 2; *cls_added = 0; 201a818: c0 26 c0 00 clr [ %i3 ] uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 201a81c: 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; 201a820: a8 05 20 02 add %l4, 2, %l4 uint32_t i = 2; *cls_added = 0; if (count == 0) 201a824: 80 a6 a0 00 cmp %i2, 0 201a828: 02 80 00 16 be 201a880 <== NEVER TAKEN 201a82c: b0 10 20 00 clr %i0 return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 201a830: e0 04 60 44 ld [ %l1 + 0x44 ], %l0 201a834: 80 a4 3f ff cmp %l0, -1 201a838: 22 80 00 02 be,a 201a840 201a83c: a0 10 20 02 mov 2, %l0 } } i++; cl4find++; if (cl4find >= data_cls_val) cl4find = 2; 201a840: a6 10 20 02 mov 2, %l3 201a844: 10 80 00 55 b 201a998 201a848: 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); 201a84c: 92 10 00 10 mov %l0, %o1 201a850: 7f ff fe 9f call 201a2cc 201a854: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 201a858: b0 92 20 00 orcc %o0, 0, %i0 201a85c: 02 80 00 0b be 201a888 <== ALWAYS TAKEN 201a860: c2 07 bf fc ld [ %fp + -4 ], %g1 { if (*cls_added != 0) 201a864: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 201a868: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 201a86c: 02 80 00 5b be 201a9d8 <== NOT EXECUTED 201a870: 01 00 00 00 nop <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); 201a874: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 201a878: 7f ff ff b4 call 201a748 <== NOT EXECUTED 201a87c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 201a880: 81 c7 e0 08 ret <== NOT EXECUTED 201a884: 81 e8 00 00 restore <== NOT EXECUTED return rc; } if (next_cln == FAT_GENFAT_FREE) 201a888: 80 a0 60 00 cmp %g1, 0 201a88c: 32 80 00 3f bne,a 201a988 201a890: 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) 201a894: c2 06 c0 00 ld [ %i3 ], %g1 201a898: 80 a0 60 00 cmp %g1, 0 201a89c: 12 80 00 0b bne 201a8c8 <== NEVER TAKEN 201a8a0: 90 10 00 1d mov %i5, %o0 { *chain = cl4find; 201a8a4: e0 26 40 00 st %l0, [ %i1 ] rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 201a8a8: 92 10 00 10 mov %l0, %o1 201a8ac: 7f ff fe f8 call 201a48c 201a8b0: 94 10 3f ff mov -1, %o2 if ( rc != RC_OK ) 201a8b4: 80 a2 20 00 cmp %o0, 0 201a8b8: 22 80 00 22 be,a 201a940 <== ALWAYS TAKEN 201a8bc: 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); 201a8c0: 81 c7 e0 08 ret <== NOT EXECUTED 201a8c4: 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); 201a8c8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 201a8cc: 7f ff fe f0 call 201a48c <== NOT EXECUTED 201a8d0: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 201a8d4: aa 10 00 08 mov %o0, %l5 <== NOT EXECUTED if ( rc != RC_OK ) 201a8d8: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED 201a8dc: 02 80 00 07 be 201a8f8 <== NOT EXECUTED 201a8e0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 201a8e4: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 201a8e8: 7f ff ff 98 call 201a748 <== NOT EXECUTED 201a8ec: b0 10 00 15 mov %l5, %i0 <== NOT EXECUTED return rc; 201a8f0: 81 c7 e0 08 ret <== NOT EXECUTED 201a8f4: 81 e8 00 00 restore <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 201a8f8: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 201a8fc: 7f ff fe e4 call 201a48c <== NOT EXECUTED 201a900: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 201a904: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 201a908: 22 80 00 0e be,a 201a940 <== NOT EXECUTED 201a90c: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 201a910: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 201a914: 7f ff ff 8d call 201a748 <== NOT EXECUTED 201a918: 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); 201a91c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 201a920: 94 10 20 00 clr %o2 <== NOT EXECUTED 201a924: 7f ff fe da call 201a48c <== NOT EXECUTED 201a928: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED fat_buf_release(fs_info); 201a92c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 201a930: 7f ff e0 b4 call 2012c00 <== NOT EXECUTED 201a934: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED return rc; 201a938: 81 c7 e0 08 ret <== NOT EXECUTED 201a93c: 81 e8 00 00 restore <== NOT EXECUTED } } save_cln = cl4find; (*cls_added)++; 201a940: 82 00 60 01 inc %g1 /* have we satisfied request ? */ if (*cls_added == count) 201a944: 80 a0 40 1a cmp %g1, %i2 201a948: 12 80 00 0e bne 201a980 <== NEVER TAKEN 201a94c: c2 26 c0 00 st %g1, [ %i3 ] { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 201a950: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 201a954: 80 a0 7f ff cmp %g1, -1 201a958: 02 80 00 05 be 201a96c <== ALWAYS TAKEN 201a95c: e0 24 60 44 st %l0, [ %l1 + 0x44 ] fs_info->vol.free_cls -= (*cls_added); 201a960: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 201a964: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 201a968: c2 24 60 40 st %g1, [ %l1 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 201a96c: e0 27 00 00 st %l0, [ %i4 ] fat_buf_release(fs_info); 201a970: 7f ff e0 a4 call 2012c00 201a974: 90 10 00 11 mov %l1, %o0 return rc; 201a978: 81 c7 e0 08 ret 201a97c: 81 e8 00 00 restore save_cln = cl4find; (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) 201a980: a4 10 00 10 mov %l0, %l2 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } } i++; cl4find++; 201a984: a0 04 20 01 inc %l0 <== NOT EXECUTED if (cl4find >= data_cls_val) 201a988: 80 a4 00 14 cmp %l0, %l4 201a98c: 0a 80 00 03 bcs 201a998 <== ALWAYS TAKEN 201a990: a6 04 e0 01 inc %l3 cl4find = 2; 201a994: 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) 201a998: 80 a4 c0 14 cmp %l3, %l4 201a99c: 0a bf ff ac bcs 201a84c <== ALWAYS TAKEN 201a9a0: 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) 201a9a4: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 <== NOT EXECUTED 201a9a8: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 201a9ac: 02 80 00 05 be 201a9c0 <== NOT EXECUTED 201a9b0: e4 24 60 44 st %l2, [ %l1 + 0x44 ] <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 201a9b4: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 201a9b8: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 201a9bc: c2 24 60 40 st %g1, [ %l1 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 201a9c0: e4 27 00 00 st %l2, [ %i4 ] <== NOT EXECUTED fat_buf_release(fs_info); 201a9c4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 201a9c8: 7f ff e0 8e call 2012c00 <== NOT EXECUTED 201a9cc: b0 10 20 00 clr %i0 <== NOT EXECUTED return RC_OK; 201a9d0: 81 c7 e0 08 ret <== NOT EXECUTED 201a9d4: 81 e8 00 00 restore <== NOT EXECUTED } 201a9d8: 81 c7 e0 08 ret <== NOT EXECUTED 201a9dc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0201a48c : fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 201a48c: 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; 201a490: c0 27 bf fc clr [ %fp + -4 ] /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 201a494: 80 a6 60 01 cmp %i1, 1 201a498: 08 80 00 07 bleu 201a4b4 <== NEVER TAKEN 201a49c: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 201a4a0: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 201a4a4: 82 00 60 01 inc %g1 201a4a8: 80 a6 40 01 cmp %i1, %g1 201a4ac: 28 80 00 08 bleu,a 201a4cc <== ALWAYS TAKEN 201a4b0: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 rtems_set_errno_and_return_minus_one(EIO); 201a4b4: 40 00 07 53 call 201c200 <__errno> <== NOT EXECUTED 201a4b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201a4bc: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 201a4c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201a4c4: 81 c7 e0 08 ret <== NOT EXECUTED 201a4c8: 81 e8 00 00 restore <== NOT EXECUTED sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 201a4cc: b7 36 60 01 srl %i1, 1, %i3 201a4d0: 84 88 60 01 andcc %g1, 1, %g2 201a4d4: 12 80 00 06 bne 201a4ec <== ALWAYS TAKEN 201a4d8: b6 06 c0 19 add %i3, %i1, %i3 201a4dc: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 201a4e0: 02 80 00 03 be 201a4ec <== NOT EXECUTED 201a4e4: b7 2e 60 02 sll %i1, 2, %i3 <== NOT EXECUTED 201a4e8: b7 2e 60 01 sll %i1, 1, %i3 <== NOT EXECUTED 201a4ec: 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); 201a4f0: 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) + 201a4f4: b7 36 c0 03 srl %i3, %g3, %i3 201a4f8: 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); 201a4fc: b8 07 00 19 add %i4, %i1, %i4 201a500: 80 a0 a0 00 cmp %g2, 0 201a504: 12 80 00 06 bne 201a51c <== ALWAYS TAKEN 201a508: b6 06 c0 03 add %i3, %g3, %i3 201a50c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 201a510: 02 80 00 03 be 201a51c <== NOT EXECUTED 201a514: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED 201a518: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED 201a51c: e0 17 40 00 lduh [ %i5 ], %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 201a520: 90 10 00 1d mov %i5, %o0 201a524: 92 10 00 1b mov %i3, %o1 201a528: 94 10 20 01 mov 1, %o2 201a52c: 7f ff e1 36 call 2012a04 201a530: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 201a534: b0 92 20 00 orcc %o0, 0, %i0 201a538: 12 bf ff e3 bne 201a4c4 <== NEVER TAKEN 201a53c: 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); 201a540: a1 34 20 10 srl %l0, 0x10, %l0 201a544: a0 04 3f ff add %l0, -1, %l0 201a548: 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 ) 201a54c: f8 0f 60 0a ldub [ %i5 + 0xa ], %i4 201a550: 80 a7 20 02 cmp %i4, 2 201a554: 02 80 00 5f be 201a6d0 <== NEVER TAKEN 201a558: 80 a7 20 04 cmp %i4, 4 201a55c: 02 80 00 65 be 201a6f0 <== NEVER TAKEN 201a560: 80 a7 20 01 cmp %i4, 1 201a564: 12 80 00 73 bne 201a730 <== NEVER TAKEN 201a568: 80 8e 60 01 btst 1, %i1 { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 201a56c: 02 80 00 29 be 201a610 201a570: 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; 201a574: 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)) = 201a578: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 201a57c: 84 08 a0 0f and %g2, 0xf, %g2 201a580: c4 28 40 10 stb %g2, [ %g1 + %l0 ] (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 201a584: 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)) = 201a588: 85 2e a0 04 sll %i2, 4, %g2 (*((uint8_t *)(block0->buffer + ofs))) | 201a58c: 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)) = 201a590: c6 08 40 10 ldub [ %g1 + %l0 ], %g3 201a594: 84 10 c0 02 or %g3, %g2, %g2 201a598: 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) ) 201a59c: c2 17 40 00 lduh [ %i5 ], %g1 201a5a0: 82 00 7f ff add %g1, -1, %g1 201a5a4: 80 a4 00 01 cmp %l0, %g1 201a5a8: 12 80 00 11 bne 201a5ec <== ALWAYS TAKEN 201a5ac: f8 2f 60 84 stb %i4, [ %i5 + 0x84 ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 201a5b0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 201a5b4: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 201a5b8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 201a5bc: 7f ff e1 12 call 2012a04 <== NOT EXECUTED 201a5c0: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 201a5c4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 201a5c8: 12 bf ff bf bne 201a4c4 <== NOT EXECUTED 201a5cc: 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); 201a5d0: 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; 201a5d4: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 201a5d8: 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; 201a5dc: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 201a5e0: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 201a5e4: 10 80 00 27 b 201a680 <== NOT EXECUTED 201a5e8: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 201a5ec: c2 07 bf fc ld [ %fp + -4 ], %g1 201a5f0: a0 04 20 01 inc %l0 201a5f4: 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); 201a5f8: b5 2e a0 14 sll %i2, 0x14, %i2 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 201a5fc: c0 28 40 10 clrb [ %g1 + %l0 ] *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 201a600: c2 07 bf fc ld [ %fp + -4 ], %g1 (uint8_t )((fat16_clv & 0xFF00)>>8); 201a604: 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))) | 201a608: 10 80 00 2d b 201a6bc 201a60c: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 201a610: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 201a614: b4 0e af ff and %i2, 0xfff, %i2 *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 201a618: c0 28 40 10 clrb [ %g1 + %l0 ] *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 201a61c: c2 07 bf fc ld [ %fp + -4 ], %g1 201a620: 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)) = 201a624: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 201a628: 84 16 80 02 or %i2, %g2, %g2 201a62c: 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) ) 201a630: c2 17 40 00 lduh [ %i5 ], %g1 201a634: 82 00 7f ff add %g1, -1, %g1 201a638: 80 a4 00 01 cmp %l0, %g1 201a63c: 12 80 00 17 bne 201a698 <== ALWAYS TAKEN 201a640: f8 2f 60 84 stb %i4, [ %i5 + 0x84 ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 201a644: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 201a648: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 201a64c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 201a650: 7f ff e0 ed call 2012a04 <== NOT EXECUTED 201a654: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 201a658: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 201a65c: 12 bf ff 9a bne 201a4c4 <== NOT EXECUTED 201a660: 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); 201a664: 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; 201a668: 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)) = 201a66c: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 201a670: 84 08 bf f0 and %g2, -16, %g2 <== NOT EXECUTED 201a674: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 201a678: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 201a67c: 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)) = 201a680: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 201a684: b4 16 80 02 or %i2, %g2, %i2 <== NOT EXECUTED 201a688: 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; 201a68c: f8 2f 60 84 stb %i4, [ %i5 + 0x84 ] <== NOT EXECUTED 201a690: 81 c7 e0 08 ret <== NOT EXECUTED 201a694: 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; 201a698: c2 07 bf fc ld [ %fp + -4 ], %g1 201a69c: a0 04 20 01 inc %l0 201a6a0: 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); 201a6a4: b5 36 a0 08 srl %i2, 8, %i2 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 201a6a8: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 201a6ac: 84 08 bf f0 and %g2, -16, %g2 201a6b0: 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))) | 201a6b4: c2 07 bf fc ld [ %fp + -4 ], %g1 201a6b8: 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)) = 201a6bc: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 201a6c0: b4 10 80 1a or %g2, %i2, %i2 201a6c4: f4 28 40 10 stb %i2, [ %g1 + %l0 ] 201a6c8: 81 c7 e0 08 ret 201a6cc: 81 e8 00 00 restore } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 201a6d0: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 201a6d4: b5 2e a0 10 sll %i2, 0x10, %i2 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 201a6d8: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 201a6dc: 85 36 a0 08 srl %i2, 8, %g2 <== NOT EXECUTED 201a6e0: b5 36 a0 18 srl %i2, 0x18, %i2 <== NOT EXECUTED 201a6e4: b4 10 80 1a or %g2, %i2, %i2 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 201a6e8: 10 80 00 0e b 201a720 <== NOT EXECUTED 201a6ec: 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)); 201a6f0: 11 3c 00 00 sethi %hi(0xf0000000), %o0 <== NOT EXECUTED 201a6f4: 7f ff fe ea call 201a29c <== NOT EXECUTED 201a6f8: 90 2e 80 08 andn %i2, %o0, %o0 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 201a6fc: 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)); 201a700: b6 10 00 08 mov %o0, %i3 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 201a704: f8 00 60 24 ld [ %g1 + 0x24 ], %i4 <== NOT EXECUTED 201a708: 7f ff fe e5 call 201a29c <== NOT EXECUTED 201a70c: 11 3c 00 00 sethi %hi(0xf0000000), %o0 <== NOT EXECUTED 201a710: c2 07 00 10 ld [ %i4 + %l0 ], %g1 <== NOT EXECUTED 201a714: 82 0a 00 01 and %o0, %g1, %g1 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = fat32_clv | (*((uint32_t *)(block0->buffer + ofs))); 201a718: 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)) = 201a71c: f6 27 00 10 st %i3, [ %i4 + %l0 ] <== NOT EXECUTED 201a720: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 201a724: c2 2f 60 84 stb %g1, [ %i5 + 0x84 ] <== NOT EXECUTED 201a728: 81 c7 e0 08 ret <== NOT EXECUTED 201a72c: 81 e8 00 00 restore <== NOT EXECUTED fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 201a730: 40 00 06 b4 call 201c200 <__errno> <== NOT EXECUTED 201a734: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201a738: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 201a73c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED break; } return RC_OK; } 201a740: 81 c7 e0 08 ret <== NOT EXECUTED 201a744: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02013138 : * 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) { 2013138: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 201313c: 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) { 2013140: 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) 2013144: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 <== NOT EXECUTED 2013148: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 201314c: 02 80 00 08 be 201316c <== NOT EXECUTED 2013150: b8 10 20 00 clr %i4 <== NOT EXECUTED { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, 2013154: d2 07 60 40 ld [ %i5 + 0x40 ], %o1 <== NOT EXECUTED 2013158: 7f ff ff db call 20130c4 <== NOT EXECUTED 201315c: d4 07 60 44 ld [ %i5 + 0x44 ], %o2 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 2013160: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED 2013164: 32 80 00 02 bne,a 201316c <== NOT EXECUTED 2013168: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED rc = -1; } fat_buf_release(fs_info); 201316c: 7f ff fe a5 call 2012c00 <== NOT EXECUTED 2013170: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 2013174: 7f ff f9 35 call 2011648 <== NOT EXECUTED 2013178: d0 1f 60 58 ldd [ %i5 + 0x58 ], %o0 <== NOT EXECUTED 201317c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2013180: 32 80 00 02 bne,a 2013188 <== NOT EXECUTED 2013184: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED rc = -1; 2013188: 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; 201318c: f4 07 60 68 ld [ %i5 + 0x68 ], %i2 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 2013190: 10 80 00 04 b 20131a0 <== NOT EXECUTED 2013194: b4 06 80 1b add %i2, %i3, %i2 <== NOT EXECUTED free(node); 2013198: 7f ff ca b5 call 2005c6c <== NOT EXECUTED 201319c: 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 ); 20131a0: 7f ff de 73 call 200ab6c <_Chain_Get> <== NOT EXECUTED 20131a4: 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 ) 20131a8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20131ac: 12 bf ff fb bne 2013198 <== NOT EXECUTED 20131b0: 01 00 00 00 nop <== NOT EXECUTED 20131b4: 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++) 20131b8: 80 a6 e0 18 cmp %i3, 0x18 <== NOT EXECUTED 20131bc: 32 bf ff f5 bne,a 2013190 <== NOT EXECUTED 20131c0: f4 07 60 68 ld [ %i5 + 0x68 ], %i2 <== NOT EXECUTED 20131c4: 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; 20131c8: f4 07 60 6c ld [ %i5 + 0x6c ], %i2 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 20131cc: 10 80 00 04 b 20131dc <== NOT EXECUTED 20131d0: b4 06 80 1b add %i2, %i3, %i2 <== NOT EXECUTED free(node); 20131d4: 7f ff ca a6 call 2005c6c <== NOT EXECUTED 20131d8: 01 00 00 00 nop <== NOT EXECUTED 20131dc: 7f ff de 64 call 200ab6c <_Chain_Get> <== NOT EXECUTED 20131e0: 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 ) 20131e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20131e8: 12 bf ff fb bne 20131d4 <== NOT EXECUTED 20131ec: 01 00 00 00 nop <== NOT EXECUTED 20131f0: 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++) 20131f4: 80 a6 e0 18 cmp %i3, 0x18 <== NOT EXECUTED 20131f8: 32 bf ff f5 bne,a 20131cc <== NOT EXECUTED 20131fc: f4 07 60 6c ld [ %i5 + 0x6c ], %i2 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 2013200: 7f ff ca 9b call 2005c6c <== NOT EXECUTED 2013204: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 2013208: 7f ff ca 99 call 2005c6c <== NOT EXECUTED 201320c: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 <== NOT EXECUTED free(fs_info->uino); 2013210: 7f ff ca 97 call 2005c6c <== NOT EXECUTED 2013214: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED free(fs_info->sec_buf); 2013218: 7f ff ca 95 call 2005c6c <== NOT EXECUTED 201321c: d0 07 60 8c ld [ %i5 + 0x8c ], %o0 <== NOT EXECUTED rtems_disk_release(fs_info->vol.dd); 2013220: 7f ff c6 f0 call 2004de0 <== NOT EXECUTED 2013224: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED if (rc) 2013228: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 201322c: 02 80 00 06 be 2013244 <== NOT EXECUTED 2013230: 01 00 00 00 nop <== NOT EXECUTED errno = EIO; 2013234: 40 00 23 f3 call 201c200 <__errno> <== NOT EXECUTED 2013238: 01 00 00 00 nop <== NOT EXECUTED 201323c: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2013240: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return rc; } 2013244: 81 c7 e0 08 ret <== NOT EXECUTED 2013248: 91 e8 00 1c restore %g0, %i4, %o0 <== NOT EXECUTED =============================================================================== 0201a014 : int fcntl( int fd, int cmd, ... ) { 201a014: 9d e3 bf 98 save %sp, -104, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 201a018: 05 00 80 73 sethi %hi(0x201cc00), %g2 201a01c: c6 00 a0 f0 ld [ %g2 + 0xf0 ], %g3 ! 201ccf0 ... ) { int ret; va_list ap; va_start( ap, cmd ); 201a020: 82 07 a0 4c add %fp, 0x4c, %g1 201a024: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 201a028: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 201a02c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 201a030: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 201a034: 80 a6 00 03 cmp %i0, %g3 201a038: 1a 80 00 0a bcc 201a060 201a03c: c2 27 bf fc st %g1, [ %fp + -4 ] iop = rtems_libio_iop( fd ); 201a040: 05 00 80 75 sethi %hi(0x201d400), %g2 201a044: c4 00 a3 c0 ld [ %g2 + 0x3c0 ], %g2 ! 201d7c0 201a048: bb 2e 20 06 sll %i0, 6, %i5 201a04c: ba 00 80 1d add %g2, %i5, %i5 rtems_libio_check_is_open(iop); 201a050: d0 07 60 18 ld [ %i5 + 0x18 ], %o0 201a054: 80 8a 21 00 btst 0x100, %o0 201a058: 12 80 00 06 bne 201a070 201a05c: 80 a6 60 09 cmp %i1, 9 201a060: 7f ff d5 18 call 200f4c0 <__errno> 201a064: 01 00 00 00 nop 201a068: 10 80 00 40 b 201a168 201a06c: 82 10 20 09 mov 9, %g1 ! 9 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 201a070: 18 80 00 3b bgu 201a15c 201a074: 89 2e 60 02 sll %i1, 2, %g4 201a078: 39 00 80 67 sethi %hi(0x2019c00), %i4 201a07c: b8 17 23 ec or %i4, 0x3ec, %i4 ! 2019fec <_calloc_r+0x14> 201a080: c8 07 00 04 ld [ %i4 + %g4 ], %g4 201a084: 81 c1 00 00 jmp %g4 201a088: 01 00 00 00 nop case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 201a08c: c2 00 40 00 ld [ %g1 ], %g1 if ( fd2 ) 201a090: 80 a0 60 00 cmp %g1, 0 201a094: 02 80 00 07 be 201a0b0 201a098: 80 a0 40 03 cmp %g1, %g3 diop = rtems_libio_iop( fd2 ); 201a09c: 1a 80 00 0a bcc 201a0c4 <== NEVER TAKEN 201a0a0: b8 10 20 00 clr %i4 201a0a4: b9 28 60 06 sll %g1, 6, %i4 201a0a8: 10 80 00 07 b 201a0c4 201a0ac: b8 00 80 1c add %g2, %i4, %i4 else { /* allocate a file control block */ diop = rtems_libio_allocate(); 201a0b0: 7f ff a5 7d call 20036a4 201a0b4: 01 00 00 00 nop if ( diop == 0 ) { 201a0b8: b8 92 20 00 orcc %o0, 0, %i4 201a0bc: 02 80 00 3d be 201a1b0 <== NEVER TAKEN 201a0c0: 01 00 00 00 nop ret = -1; break; } } diop->flags = iop->flags; 201a0c4: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 diop->pathinfo = iop->pathinfo; 201a0c8: 90 07 20 1c add %i4, 0x1c, %o0 ret = -1; break; } } diop->flags = iop->flags; 201a0cc: c2 27 20 18 st %g1, [ %i4 + 0x18 ] diop->pathinfo = iop->pathinfo; 201a0d0: 92 07 60 1c add %i5, 0x1c, %o1 201a0d4: 7f ff d8 78 call 20102b4 201a0d8: 94 10 20 14 mov 0x14, %o2 ret = (int) (diop - rtems_libio_iops); 201a0dc: 03 00 80 75 sethi %hi(0x201d400), %g1 201a0e0: f0 00 63 c0 ld [ %g1 + 0x3c0 ], %i0 ! 201d7c0 201a0e4: b8 27 00 18 sub %i4, %i0, %i4 201a0e8: 10 80 00 22 b 201a170 201a0ec: b1 3f 20 06 sra %i4, 6, %i0 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 201a0f0: 90 0a 28 00 and %o0, 0x800, %o0 201a0f4: 80 a0 00 08 cmp %g0, %o0 201a0f8: 10 80 00 21 b 201a17c 201a0fc: 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 ) ) 201a100: c2 00 40 00 ld [ %g1 ], %g1 201a104: 80 a0 60 00 cmp %g1, 0 201a108: 22 80 00 0e be,a 201a140 201a10c: 90 0a 37 ff and %o0, -2049, %o0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 201a110: 10 80 00 0c b 201a140 201a114: 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 ); 201a118: 7f ff a5 4d call 200364c 201a11c: 01 00 00 00 nop 201a120: 10 80 00 14 b 201a170 201a124: b0 10 00 08 mov %o0, %i0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 201a128: 7f ff a5 3c call 2003618 201a12c: 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); 201a130: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 201a134: 90 0a 22 01 and %o0, 0x201, %o0 201a138: 82 08 7d fe and %g1, -514, %g1 201a13c: 90 12 00 01 or %o0, %g1, %o0 201a140: 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; 201a144: 10 80 00 0e b 201a17c 201a148: b0 10 20 00 clr %i0 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 201a14c: 7f ff d4 dd call 200f4c0 <__errno> 201a150: 01 00 00 00 nop 201a154: 10 80 00 05 b 201a168 201a158: 82 10 20 86 mov 0x86, %g1 ! 86 ret = -1; break; default: errno = EINVAL; 201a15c: 7f ff d4 d9 call 200f4c0 <__errno> 201a160: 01 00 00 00 nop 201a164: 82 10 20 16 mov 0x16, %g1 ! 16 201a168: 10 80 00 12 b 201a1b0 201a16c: 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) { 201a170: 80 a6 20 00 cmp %i0, 0 201a174: 06 80 00 0d bl 201a1a8 <== NEVER TAKEN 201a178: 01 00 00 00 nop int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); 201a17c: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 201a180: 92 10 00 1d mov %i5, %o1 201a184: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 201a188: 9f c0 40 00 call %g1 201a18c: 90 10 00 19 mov %i1, %o0 if (err) { 201a190: ba 92 20 00 orcc %o0, 0, %i5 201a194: 02 80 00 05 be 201a1a8 <== ALWAYS TAKEN 201a198: 01 00 00 00 nop errno = err; 201a19c: 7f ff d4 c9 call 200f4c0 <__errno> <== NOT EXECUTED 201a1a0: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 201a1a4: 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; } 201a1a8: 81 c7 e0 08 ret 201a1ac: 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); 201a1b0: 81 c7 e0 08 ret 201a1b4: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 0200cd7c : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200cd7c: 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) { 200cd80: 37 00 80 84 sethi %hi(0x2021000), %i3 200cd84: c2 06 e0 dc ld [ %i3 + 0xdc ], %g1 ! 20210dc */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200cd88: ba 10 00 18 mov %i0, %i5 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 200cd8c: 80 a0 60 00 cmp %g1, 0 200cd90: 12 80 00 1a bne 200cdf8 200cd94: b8 16 e0 dc or %i3, 0xdc, %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 ); 200cd98: 03 00 80 84 sethi %hi(0x2021000), %g1 200cd9c: d0 00 62 5c ld [ %g1 + 0x25c ], %o0 ! 202125c 200cda0: 92 10 20 00 clr %o1 200cda4: 7f ff ed 0a call 20081cc 200cda8: 94 10 20 00 clr %o2 rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 200cdac: c2 06 e0 dc ld [ %i3 + 0xdc ], %g1 200cdb0: 80 a0 60 00 cmp %g1, 0 200cdb4: 12 80 00 0a bne 200cddc <== NEVER TAKEN 200cdb8: b6 10 20 00 clr %i3 sc = rtems_semaphore_create( 200cdbc: 11 14 12 54 sethi %hi(0x50495000), %o0 200cdc0: 92 10 20 01 mov 1, %o1 200cdc4: 90 12 20 45 or %o0, 0x45, %o0 200cdc8: 94 10 20 54 mov 0x54, %o2 200cdcc: 96 10 20 00 clr %o3 200cdd0: 7f ff ec 65 call 2007f64 200cdd4: 98 10 00 1c mov %i4, %o4 200cdd8: b6 10 00 08 mov %o0, %i3 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 200cddc: 03 00 80 84 sethi %hi(0x2021000), %g1 200cde0: d0 00 62 5c ld [ %g1 + 0x25c ], %o0 ! 202125c 200cde4: 7f ff ed 44 call 20082f4 200cde8: b0 10 3f f4 mov -12, %i0 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 200cdec: 80 a6 e0 00 cmp %i3, 0 200cdf0: 12 80 00 f3 bne 200d1bc 200cdf4: 01 00 00 00 nop sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 200cdf8: 03 00 80 84 sethi %hi(0x2021000), %g1 200cdfc: d0 00 60 dc ld [ %g1 + 0xdc ], %o0 ! 20210dc 200ce00: 92 10 20 00 clr %o1 200ce04: 94 10 20 00 clr %o2 200ce08: 7f ff ec f1 call 20081cc 200ce0c: b0 10 3f f4 mov -12, %i0 } if (sc == RTEMS_SUCCESSFUL) { 200ce10: 80 a2 20 00 cmp %o0, 0 200ce14: 12 80 00 ea bne 200d1bc <== NEVER TAKEN 200ce18: 01 00 00 00 nop err = pipe_lock(); if (err) return err; pipe = *pipep; 200ce1c: f8 07 40 00 ld [ %i5 ], %i4 if (pipe == NULL) { 200ce20: 80 a7 20 00 cmp %i4, 0 200ce24: 32 80 00 56 bne,a 200cf7c 200ce28: 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)); 200ce2c: 7f ff df ff call 2004e28 200ce30: 90 10 20 34 mov 0x34, %o0 if (pipe == NULL) 200ce34: b8 92 20 00 orcc %o0, 0, %i4 200ce38: 02 80 00 4e be 200cf70 200ce3c: 92 10 20 00 clr %o1 return err; memset(pipe, 0, sizeof(pipe_control_t)); 200ce40: 40 00 13 11 call 2011a84 200ce44: 94 10 20 34 mov 0x34, %o2 pipe->Size = PIPE_BUF; 200ce48: 82 10 22 00 mov 0x200, %g1 pipe->Buffer = malloc(pipe->Size); 200ce4c: 90 10 22 00 mov 0x200, %o0 200ce50: 7f ff df f6 call 2004e28 200ce54: c2 27 20 04 st %g1, [ %i4 + 4 ] if (! pipe->Buffer) 200ce58: 80 a2 20 00 cmp %o0, 0 200ce5c: 02 80 00 43 be 200cf68 <== NEVER TAKEN 200ce60: d0 27 00 00 st %o0, [ %i4 ] goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), 200ce64: 37 00 80 82 sethi %hi(0x2020800), %i3 200ce68: d0 4e e0 dc ldsb [ %i3 + 0xdc ], %o0 ! 20208dc if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 200ce6c: 35 14 12 5c sethi %hi(0x50497000), %i2 200ce70: 82 16 a2 00 or %i2, 0x200, %g1 ! 50497200 200ce74: 92 10 20 00 clr %o1 200ce78: 90 12 00 01 or %o0, %g1, %o0 200ce7c: 94 10 20 00 clr %o2 200ce80: 40 00 06 0d call 200e6b4 200ce84: 96 07 20 2c add %i4, 0x2c, %o3 200ce88: 80 a2 20 00 cmp %o0, 0 200ce8c: 12 80 00 35 bne 200cf60 200ce90: d0 4e e0 dc ldsb [ %i3 + 0xdc ], %o0 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 200ce94: 03 14 12 5d sethi %hi(0x50497400), %g1 200ce98: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 200ce9c: 92 10 20 00 clr %o1 200cea0: 90 12 00 01 or %o0, %g1, %o0 200cea4: 94 10 20 00 clr %o2 200cea8: 40 00 06 03 call 200e6b4 200ceac: 96 07 20 30 add %i4, 0x30, %o3 200ceb0: 80 a2 20 00 cmp %o0, 0 200ceb4: 12 80 00 29 bne 200cf58 200ceb8: d0 4e e0 dc ldsb [ %i3 + 0xdc ], %o0 rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 200cebc: b4 16 a3 00 or %i2, 0x300, %i2 200cec0: 92 10 20 01 mov 1, %o1 200cec4: 90 12 00 1a or %o0, %i2, %o0 200cec8: 94 10 20 10 mov 0x10, %o2 200cecc: 96 10 20 00 clr %o3 200ced0: 7f ff ec 25 call 2007f64 200ced4: 98 07 20 28 add %i4, 0x28, %o4 200ced8: 80 a2 20 00 cmp %o0, 0 200cedc: 12 80 00 1d bne 200cf50 200cee0: 94 07 bf fc add %fp, -4, %o2 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 200cee4: d2 07 20 2c ld [ %i4 + 0x2c ], %o1 200cee8: 31 00 80 87 sethi %hi(0x2021c00), %i0 200ceec: 7f ff f2 ea call 2009a94 <_Objects_Get> 200cef0: 90 16 21 50 or %i0, 0x150, %o0 ! 2021d50 <_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; 200cef4: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 200cef8: 35 04 00 00 sethi %hi(0x10000000), %i2 200cefc: 82 10 40 1a or %g1, %i2, %g1 _Thread_Enable_dispatch(); 200cf00: 7f ff f6 82 call 200a908 <_Thread_Enable_dispatch> 200cf04: c2 22 20 4c st %g1, [ %o0 + 0x4c ] 200cf08: d2 07 20 30 ld [ %i4 + 0x30 ], %o1 200cf0c: 94 07 bf fc add %fp, -4, %o2 200cf10: 7f ff f2 e1 call 2009a94 <_Objects_Get> 200cf14: 90 16 21 50 or %i0, 0x150, %o0 _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; 200cf18: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 200cf1c: b4 10 40 1a or %g1, %i2, %i2 _Thread_Enable_dispatch(); 200cf20: 7f ff f6 7a call 200a908 <_Thread_Enable_dispatch> 200cf24: f4 22 20 4c st %i2, [ %o0 + 0x4c ] #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 200cf28: c2 0e e0 dc ldub [ %i3 + 0xdc ], %g1 200cf2c: 84 00 60 01 add %g1, 1, %g2 200cf30: 83 28 60 18 sll %g1, 0x18, %g1 200cf34: 83 38 60 18 sra %g1, 0x18, %g1 200cf38: 80 a0 60 7a cmp %g1, 0x7a 200cf3c: 12 80 00 0f bne 200cf78 200cf40: c4 2e e0 dc stb %g2, [ %i3 + 0xdc ] c = 'a'; 200cf44: 82 10 20 61 mov 0x61, %g1 200cf48: 10 80 00 0c b 200cf78 200cf4c: c2 2e e0 dc stb %g1, [ %i3 + 0xdc ] return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 200cf50: 40 00 06 0a call 200e778 200cf54: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 err_wbar: rtems_barrier_delete(pipe->readBarrier); 200cf58: 40 00 06 08 call 200e778 200cf5c: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 err_rbar: free(pipe->Buffer); 200cf60: 7f ff dd c5 call 2004674 200cf64: d0 07 00 00 ld [ %i4 ], %o0 err_buf: free(pipe); 200cf68: 7f ff dd c3 call 2004674 200cf6c: 90 10 00 1c mov %i4, %o0 if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 200cf70: 10 80 00 13 b 200cfbc 200cf74: b0 10 3f f4 mov -12, %i0 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200cf78: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200cf7c: 92 10 20 00 clr %o1 200cf80: 7f ff ec 93 call 20081cc 200cf84: 94 10 20 00 clr %o2 err = -EINTR; if (*pipep == NULL) { 200cf88: c2 07 40 00 ld [ %i5 ], %g1 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200cf8c: 80 a0 00 08 cmp %g0, %o0 200cf90: b0 60 20 00 subx %g0, 0, %i0 err = -EINTR; if (*pipep == NULL) { 200cf94: 80 a0 60 00 cmp %g1, 0 200cf98: 12 80 00 09 bne 200cfbc 200cf9c: b0 0e 3f fc and %i0, -4, %i0 if (err) 200cfa0: 80 a6 20 00 cmp %i0, 0 200cfa4: 22 80 00 06 be,a 200cfbc <== ALWAYS TAKEN 200cfa8: f8 27 40 00 st %i4, [ %i5 ] pipe_free(pipe); 200cfac: 7f ff ff 37 call 200cc88 <== NOT EXECUTED 200cfb0: 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); 200cfb4: 10 80 00 03 b 200cfc0 <== NOT EXECUTED 200cfb8: 03 00 80 84 sethi %hi(0x2021000), %g1 <== NOT EXECUTED 200cfbc: 03 00 80 84 sethi %hi(0x2021000), %g1 200cfc0: 7f ff ec cd call 20082f4 200cfc4: d0 00 60 dc ld [ %g1 + 0xdc ], %o0 ! 20210dc pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 200cfc8: 80 a6 20 00 cmp %i0, 0 200cfcc: 12 80 00 7c bne 200d1bc 200cfd0: 01 00 00 00 nop return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 200cfd4: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200cfd8: 82 08 60 06 and %g1, 6, %g1 200cfdc: 80 a0 60 04 cmp %g1, 4 200cfe0: 02 80 00 2e be 200d098 200cfe4: f8 07 40 00 ld [ %i5 ], %i4 200cfe8: 80 a0 60 06 cmp %g1, 6 200cfec: 02 80 00 56 be 200d144 200cff0: 80 a0 60 02 cmp %g1, 2 200cff4: 12 80 00 6a bne 200d19c <== NEVER TAKEN 200cff8: 01 00 00 00 nop case LIBIO_FLAGS_READ: pipe->readerCounter ++; 200cffc: c2 07 20 20 ld [ %i4 + 0x20 ], %g1 200d000: 82 00 60 01 inc %g1 200d004: c2 27 20 20 st %g1, [ %i4 + 0x20 ] if (pipe->Readers ++ == 0) 200d008: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200d00c: 84 00 60 01 add %g1, 1, %g2 200d010: 80 a0 60 00 cmp %g1, 0 200d014: 12 80 00 05 bne 200d028 <== NEVER TAKEN 200d018: c4 27 20 10 st %g2, [ %i4 + 0x10 ] PIPE_WAKEUPWRITERS(pipe); 200d01c: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 200d020: 40 00 05 ff call 200e81c 200d024: 92 07 bf f8 add %fp, -8, %o1 if (pipe->Writers == 0) { 200d028: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 200d02c: 80 a0 60 00 cmp %g1, 0 200d030: 12 80 00 5b bne 200d19c 200d034: 01 00 00 00 nop /* Not an error */ if (LIBIO_NODELAY(iop)) 200d038: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200d03c: 80 88 60 01 btst 1, %g1 200d040: 12 80 00 57 bne 200d19c 200d044: 01 00 00 00 nop break; prevCounter = pipe->writerCounter; 200d048: f6 07 20 24 ld [ %i4 + 0x24 ], %i3 err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 200d04c: 7f ff ec aa call 20082f4 200d050: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 if (! PIPE_READWAIT(pipe)) 200d054: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 200d058: 40 00 06 08 call 200e878 200d05c: 92 10 20 00 clr %o1 200d060: 80 a2 20 00 cmp %o0, 0 200d064: 12 80 00 52 bne 200d1ac <== NEVER TAKEN 200d068: 92 10 20 00 clr %o1 goto out_error; if (! PIPE_LOCK(pipe)) 200d06c: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200d070: 7f ff ec 57 call 20081cc 200d074: 94 10 20 00 clr %o2 200d078: 80 a2 20 00 cmp %o0, 0 200d07c: 32 80 00 4d bne,a 200d1b0 <== NEVER TAKEN 200d080: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 200d084: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200d088: 80 a6 c0 01 cmp %i3, %g1 200d08c: 02 bf ff f0 be 200d04c <== NEVER TAKEN 200d090: 01 00 00 00 nop 200d094: 30 80 00 42 b,a 200d19c } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 200d098: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200d09c: 82 00 60 01 inc %g1 200d0a0: c2 27 20 24 st %g1, [ %i4 + 0x24 ] if (pipe->Writers ++ == 0) 200d0a4: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 200d0a8: 84 00 60 01 add %g1, 1, %g2 200d0ac: 80 a0 60 00 cmp %g1, 0 200d0b0: 12 80 00 05 bne 200d0c4 <== NEVER TAKEN 200d0b4: c4 27 20 14 st %g2, [ %i4 + 0x14 ] PIPE_WAKEUPREADERS(pipe); 200d0b8: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 200d0bc: 40 00 05 d8 call 200e81c 200d0c0: 92 07 bf f8 add %fp, -8, %o1 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 200d0c4: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200d0c8: 80 a0 60 00 cmp %g1, 0 200d0cc: 12 80 00 34 bne 200d19c 200d0d0: 01 00 00 00 nop 200d0d4: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200d0d8: 80 88 60 01 btst 1, %g1 200d0dc: 22 80 00 07 be,a 200d0f8 200d0e0: f6 07 20 20 ld [ %i4 + 0x20 ], %i3 PIPE_UNLOCK(pipe); 200d0e4: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200d0e8: 7f ff ec 83 call 20082f4 200d0ec: b0 10 3f fa mov -6, %i0 err = -ENXIO; goto out_error; 200d0f0: 10 80 00 31 b 200d1b4 200d0f4: 90 10 00 1d mov %i5, %o0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 200d0f8: 7f ff ec 7f call 20082f4 200d0fc: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 if (! PIPE_WRITEWAIT(pipe)) 200d100: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 200d104: 40 00 05 dd call 200e878 200d108: 92 10 20 00 clr %o1 200d10c: 80 a2 20 00 cmp %o0, 0 200d110: 12 80 00 27 bne 200d1ac <== NEVER TAKEN 200d114: 92 10 20 00 clr %o1 goto out_error; if (! PIPE_LOCK(pipe)) 200d118: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200d11c: 7f ff ec 2c call 20081cc 200d120: 94 10 20 00 clr %o2 200d124: 80 a2 20 00 cmp %o0, 0 200d128: 32 80 00 22 bne,a 200d1b0 <== NEVER TAKEN 200d12c: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 200d130: c2 07 20 20 ld [ %i4 + 0x20 ], %g1 200d134: 80 a6 c0 01 cmp %i3, %g1 200d138: 02 bf ff f0 be 200d0f8 <== NEVER TAKEN 200d13c: 01 00 00 00 nop 200d140: 30 80 00 17 b,a 200d19c } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 200d144: c2 07 20 20 ld [ %i4 + 0x20 ], %g1 200d148: 82 00 60 01 inc %g1 200d14c: c2 27 20 20 st %g1, [ %i4 + 0x20 ] if (pipe->Readers ++ == 0) 200d150: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200d154: 84 00 60 01 add %g1, 1, %g2 200d158: 80 a0 60 00 cmp %g1, 0 200d15c: 12 80 00 05 bne 200d170 <== NEVER TAKEN 200d160: c4 27 20 10 st %g2, [ %i4 + 0x10 ] PIPE_WAKEUPWRITERS(pipe); 200d164: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 200d168: 40 00 05 ad call 200e81c 200d16c: 92 07 bf f8 add %fp, -8, %o1 pipe->writerCounter ++; 200d170: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200d174: 82 00 60 01 inc %g1 200d178: c2 27 20 24 st %g1, [ %i4 + 0x24 ] if (pipe->Writers ++ == 0) 200d17c: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 200d180: 84 00 60 01 add %g1, 1, %g2 200d184: 80 a0 60 00 cmp %g1, 0 200d188: 12 80 00 05 bne 200d19c <== NEVER TAKEN 200d18c: c4 27 20 14 st %g2, [ %i4 + 0x14 ] PIPE_WAKEUPREADERS(pipe); 200d190: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 200d194: 40 00 05 a2 call 200e81c 200d198: 92 07 bf f8 add %fp, -8, %o1 break; } PIPE_UNLOCK(pipe); 200d19c: 7f ff ec 56 call 20082f4 200d1a0: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 return 0; 200d1a4: 81 c7 e0 08 ret 200d1a8: 81 e8 00 00 restore goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 200d1ac: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 200d1b0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 200d1b4: 7f ff fe c0 call 200ccb4 200d1b8: 92 10 00 19 mov %i1, %o1 return err; } 200d1bc: 81 c7 e0 08 ret 200d1c0: 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 70 ld [ %g1 + 0x70 ], %g1 ! 2016c70 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 62 c0 ld [ %g1 + 0x2c0 ], %g1 ! 20176c0 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 04 call 200f57c <__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 d2 call 200f57c <__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 00 or %g1, 0x100, %g1 ! 201c900 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 04 ld [ %g1 + 4 ], %g1 ! 201cc04 <_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 44 ld [ %g1 + 0x244 ], %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 30 ld [ %i5 + 0x230 ], %o0 ! 201be30 2002e4c: 40 00 14 bf call 2008148 <_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 30 ld [ %i5 + 0x230 ], %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 20 f8 restore %i0, 0xf8, %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 54 or %g1, 0x154, %g1 ! 2022954 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 00 ld [ %g1 + 0x300 ], %g2 ! 2019700 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 04 ld [ %g2 + 0x304 ], %g2 ! 2019704 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 =============================================================================== 0201a280 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 201a280: 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 ); 201a284: 03 00 80 73 sethi %hi(0x201cc00), %g1 201a288: c2 00 60 f0 ld [ %g1 + 0xf0 ], %g1 ! 201ccf0 201a28c: 80 a6 00 01 cmp %i0, %g1 201a290: 1a 80 00 06 bcc 201a2a8 <== NEVER TAKEN 201a294: ba 10 20 00 clr %i5 201a298: 03 00 80 75 sethi %hi(0x201d400), %g1 201a29c: fa 00 63 c0 ld [ %g1 + 0x3c0 ], %i5 ! 201d7c0 201a2a0: b1 2e 20 06 sll %i0, 6, %i0 201a2a4: ba 07 40 18 add %i5, %i0, %i5 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 201a2a8: 92 07 60 1c add %i5, 0x1c, %o1 201a2ac: 94 10 20 14 mov 0x14, %o2 201a2b0: 7f ff d8 01 call 20102b4 201a2b4: 90 07 bf ec add %fp, -20, %o0 if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 201a2b8: c2 07 bf f8 ld [ %fp + -8 ], %g1 201a2bc: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 201a2c0: 9f c0 40 00 call %g1 201a2c4: 90 07 bf ec add %fp, -20, %o0 201a2c8: 80 a2 20 01 cmp %o0, 1 201a2cc: 22 80 00 08 be,a 201a2ec 201a2d0: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 201a2d4: 7f ff d4 7b call 200f4c0 <__errno> 201a2d8: b0 10 3f ff mov -1, %i0 201a2dc: 82 10 20 14 mov 0x14, %g1 201a2e0: c2 22 00 00 st %g1, [ %o0 ] 201a2e4: 81 c7 e0 08 ret 201a2e8: 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 ); 201a2ec: 90 10 00 1d mov %i5, %o0 201a2f0: c2 00 60 08 ld [ %g1 + 8 ], %g1 201a2f4: 92 10 00 19 mov %i1, %o1 201a2f8: 9f c0 40 00 call %g1 201a2fc: 94 10 00 1a mov %i2, %o2 } 201a300: 81 c7 e0 08 ret 201a304: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200dd2c : 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 ) 200dd2c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 200dd30: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 200dd34: 80 a0 a0 01 cmp %g2, 1 200dd38: 12 80 00 05 bne 200dd4c <== NEVER TAKEN 200dd3c: 82 10 3f ff mov -1, %g1 return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 200dd40: c0 22 20 10 clr [ %o0 + 0x10 ] 200dd44: c0 22 20 14 clr [ %o0 + 0x14 ] return 0; 200dd48: 82 10 20 00 clr %g1 } 200dd4c: 81 c3 e0 08 retl 200dd50: 90 10 00 01 mov %g1, %o0 =============================================================================== 0200df58 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 200df58: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 200df5c: 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 ) ) 200df60: 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 ); 200df64: 82 07 60 54 add %i5, 0x54, %g1 200df68: 80 a0 80 01 cmp %g2, %g1 200df6c: 22 80 00 06 be,a 200df84 200df70: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 200df74: 40 00 02 e0 call 200eaf4 <__errno> 200df78: 01 00 00 00 nop 200df7c: 10 80 00 0d b 200dfb0 200df80: 82 10 20 5a mov 0x5a, %g1 ! 5a /* * You cannot remove the file system root node. */ if ( rtems_filesystem_is_root_location(pathloc) ) 200df84: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 200df88: 80 a0 40 1d cmp %g1, %i5 200df8c: 02 80 00 06 be 200dfa4 200df90: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 200df94: c2 07 60 5c ld [ %i5 + 0x5c ], %g1 200df98: 80 a0 60 00 cmp %g1, 0 200df9c: 02 80 00 08 be 200dfbc <== ALWAYS TAKEN 200dfa0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBUSY ); 200dfa4: 40 00 02 d4 call 200eaf4 <__errno> 200dfa8: 01 00 00 00 nop 200dfac: 82 10 20 10 mov 0x10, %g1 ! 10 200dfb0: c2 22 00 00 st %g1, [ %o0 ] 200dfb4: 81 c7 e0 08 ret 200dfb8: 91 e8 3f ff restore %g0, -1, %o0 IMFS_create_orphan( the_jnode ); 200dfbc: 7f ff f4 2f call 200b078 200dfc0: 90 10 00 1d mov %i5, %o0 IMFS_check_node_remove( the_jnode ); 200dfc4: 90 10 00 1d mov %i5, %o0 200dfc8: 7f ff f4 3e call 200b0c0 200dfcc: b0 10 20 00 clr %i0 return 0; } 200dfd0: 81 c7 e0 08 ret 200dfd4: 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 78 ldsb [ %g1 + 0x78 ], %g2 ! 2017478 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 78 stb %g2, [ %g1 + 0x78 ] mkdir("/etc", 0777); 20034a0: 11 00 80 57 sethi %hi(0x2015c00), %o0 20034a4: 40 00 02 53 call 2003df0 20034a8: 90 12 23 50 or %o0, 0x350, %o0 ! 2015f50 /* * 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 58 or %i5, 0x358, %o0 20034b8: 40 00 32 2e call 200fd70 20034bc: 92 12 63 68 or %o1, 0x368, %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 58 or %i5, 0x358, %o0 20034d0: 13 00 80 57 sethi %hi(0x2015c00), %o1 20034d4: 40 00 32 27 call 200fd70 20034d8: 92 12 63 70 or %o1, 0x370, %o1 ! 2015f70 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 4d call 200fe20 20034f0: 90 12 23 78 or %o0, 0x378, %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 3f call 200f5f4 20034fc: 01 00 00 00 nop } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 2003500: 3b 00 80 57 sethi %hi(0x2015c00), %i5 2003504: 13 00 80 57 sethi %hi(0x2015c00), %o1 2003508: 90 17 63 e0 or %i5, 0x3e0, %o0 200350c: 40 00 32 19 call 200fd70 2003510: 92 12 63 68 or %o1, 0x368, %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 63 e0 or %i5, 0x3e0, %o0 2003524: 13 00 80 57 sethi %hi(0x2015c00), %o1 2003528: 40 00 32 12 call 200fd70 200352c: 92 12 63 70 or %o1, 0x370, %o1 ! 2015f70 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 57 sethi %hi(0x2015c00), %o0 2003540: 92 10 00 18 mov %i0, %o1 2003544: 40 00 32 37 call 200fe20 2003548: 90 12 23 f0 or %o0, 0x3f0, %o0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 200354c: 40 00 30 2a call 200f5f4 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 14 ld [ %g1 + 0x114 ], %g1 ! 201c114 <__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 4c ld [ %g1 + 0x34c ], %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 =============================================================================== 020194c4 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 20194c4: 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() ) 20194c8: 7f ff fe f2 call 2019090 20194cc: 01 00 00 00 nop 20194d0: 80 a6 00 08 cmp %i0, %o0 20194d4: 02 80 00 06 be 20194ec 20194d8: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); 20194dc: 7f ff d5 86 call 200eaf4 <__errno> 20194e0: 01 00 00 00 nop 20194e4: 10 80 00 a5 b 2019778 20194e8: 82 10 20 03 mov 3, %g1 ! 3 /* * Validate the signal passed. */ if ( !sig ) 20194ec: 02 80 00 06 be 2019504 20194f0: 01 00 00 00 nop static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 20194f4: ba 06 7f ff add %i1, -1, %i5 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 20194f8: 80 a7 60 1f cmp %i5, 0x1f 20194fc: 28 80 00 06 bleu,a 2019514 2019500: 83 2e 60 02 sll %i1, 2, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 2019504: 7f ff d5 7c call 200eaf4 <__errno> 2019508: 01 00 00 00 nop 201950c: 10 80 00 9b b 2019778 2019510: 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 ) 2019514: 85 2e 60 04 sll %i1, 4, %g2 2019518: 84 20 80 01 sub %g2, %g1, %g2 201951c: 03 00 80 74 sethi %hi(0x201d000), %g1 2019520: 82 10 60 40 or %g1, 0x40, %g1 ! 201d040 <_POSIX_signals_Vectors> 2019524: 82 00 40 02 add %g1, %g2, %g1 2019528: c2 00 60 08 ld [ %g1 + 8 ], %g1 201952c: 80 a0 60 01 cmp %g1, 1 2019530: 02 80 00 7b be 201971c 2019534: 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 ) ) 2019538: 80 a6 60 04 cmp %i1, 4 201953c: 02 80 00 06 be 2019554 2019540: 80 a6 60 08 cmp %i1, 8 2019544: 02 80 00 04 be 2019554 2019548: 80 a6 60 0b cmp %i1, 0xb 201954c: 12 80 00 08 bne 201956c 2019550: 82 10 20 01 mov 1, %g1 return pthread_kill( pthread_self(), sig ); 2019554: 40 00 01 2e call 2019a0c 2019558: 01 00 00 00 nop 201955c: 40 00 00 f2 call 2019924 2019560: 92 10 00 19 mov %i1, %o1 2019564: 81 c7 e0 08 ret 2019568: 91 e8 00 08 restore %g0, %o0, %o0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 201956c: f2 27 bf f4 st %i1, [ %fp + -12 ] siginfo->si_code = SI_USER; 2019570: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !value ) { 2019574: 80 a6 a0 00 cmp %i2, 0 2019578: 12 80 00 04 bne 2019588 201957c: bb 28 40 1d sll %g1, %i5, %i5 siginfo->si_value.sival_int = 0; 2019580: 10 80 00 04 b 2019590 2019584: c0 27 bf fc clr [ %fp + -4 ] } else { siginfo->si_value = *value; 2019588: c2 06 80 00 ld [ %i2 ], %g1 201958c: 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++; 2019590: 03 00 80 72 sethi %hi(0x201c800), %g1 2019594: c4 00 62 b0 ld [ %g1 + 0x2b0 ], %g2 ! 201cab0 <_Thread_Dispatch_disable_level> 2019598: 84 00 a0 01 inc %g2 201959c: c4 20 62 b0 st %g2, [ %g1 + 0x2b0 ] return _Thread_Dispatch_disable_level; 20195a0: c2 00 62 b0 ld [ %g1 + 0x2b0 ], %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; 20195a4: 03 00 80 73 sethi %hi(0x201cc00), %g1 20195a8: d0 00 63 f4 ld [ %g1 + 0x3f4 ], %o0 ! 201cff4 <_Per_CPU_Information+0xc> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 20195ac: c2 02 21 5c ld [ %o0 + 0x15c ], %g1 20195b0: c2 00 60 d0 ld [ %g1 + 0xd0 ], %g1 20195b4: 80 af 40 01 andncc %i5, %g1, %g0 20195b8: 12 80 00 51 bne 20196fc 20195bc: 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; 20195c0: d0 00 61 cc ld [ %g1 + 0x1cc ], %o0 ! 201d1cc <_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 ); 20195c4: 03 00 80 74 sethi %hi(0x201d000), %g1 20195c8: 10 80 00 0a b 20195f0 20195cc: 82 10 61 d0 or %g1, 0x1d0, %g1 ! 201d1d0 <_POSIX_signals_Wait_queue+0x4> #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 20195d0: 80 8f 40 03 btst %i5, %g3 20195d4: 12 80 00 4a bne 20196fc 20195d8: 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) 20195dc: c4 00 a0 d0 ld [ %g2 + 0xd0 ], %g2 20195e0: 80 af 40 02 andncc %i5, %g2, %g0 20195e4: 12 80 00 47 bne 2019700 20195e8: 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 ) { 20195ec: 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 ); 20195f0: 80 a2 00 01 cmp %o0, %g1 20195f4: 32 bf ff f7 bne,a 20195d0 20195f8: c6 02 20 30 ld [ %o0 + 0x30 ], %g3 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 20195fc: 03 00 80 6f sethi %hi(0x201bc00), %g1 2019600: c4 08 61 8c ldub [ %g1 + 0x18c ], %g2 ! 201bd8c * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; 2019604: 90 10 20 00 clr %o0 interested_priority = PRIORITY_MAXIMUM + 1; 2019608: 84 00 a0 01 inc %g2 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 201960c: 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 ] ) 2019610: 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); 2019614: 31 04 00 00 sethi %hi(0x10000000), %i0 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 2019618: 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 ] ) 201961c: 86 13 22 18 or %o4, 0x218, %g3 2019620: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 2019624: 80 a0 60 00 cmp %g1, 0 2019628: 22 80 00 2f be,a 20196e4 <== NEVER TAKEN 201962c: 88 01 20 01 inc %g4 <== NOT EXECUTED continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 2019630: 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++ ) { 2019634: b4 10 20 01 mov 1, %i2 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 2019638: d4 10 60 10 lduh [ %g1 + 0x10 ], %o2 object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 201963c: 10 80 00 26 b 20196d4 2019640: d6 00 60 1c ld [ %g1 + 0x1c ], %o3 the_thread = (Thread_Control *) object_table[ index ]; 2019644: c2 02 c0 01 ld [ %o3 + %g1 ], %g1 if ( !the_thread ) 2019648: 80 a0 60 00 cmp %g1, 0 201964c: 22 80 00 22 be,a 20196d4 2019650: 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 ) 2019654: c6 00 60 14 ld [ %g1 + 0x14 ], %g3 2019658: 80 a0 c0 02 cmp %g3, %g2 201965c: 38 80 00 1e bgu,a 20196d4 2019660: b4 06 a0 01 inc %i2 #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) 2019664: de 00 61 5c ld [ %g1 + 0x15c ], %o7 2019668: de 03 e0 d0 ld [ %o7 + 0xd0 ], %o7 201966c: 80 af 40 0f andncc %i5, %o7, %g0 2019670: 22 80 00 19 be,a 20196d4 2019674: 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 ) { 2019678: 80 a0 c0 02 cmp %g3, %g2 201967c: 2a 80 00 14 bcs,a 20196cc 2019680: 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 ) ) { 2019684: 80 a2 20 00 cmp %o0, 0 2019688: 22 80 00 13 be,a 20196d4 <== NEVER TAKEN 201968c: b4 06 a0 01 inc %i2 <== NOT EXECUTED 2019690: da 02 20 10 ld [ %o0 + 0x10 ], %o5 2019694: 80 a3 60 00 cmp %o5, 0 2019698: 22 80 00 0f be,a 20196d4 <== NEVER TAKEN 201969c: b4 06 a0 01 inc %i2 <== NOT EXECUTED /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 20196a0: de 00 60 10 ld [ %g1 + 0x10 ], %o7 20196a4: 80 a3 e0 00 cmp %o7, 0 20196a8: 22 80 00 09 be,a 20196cc 20196ac: 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) ) { 20196b0: 80 8b 40 18 btst %o5, %i0 20196b4: 32 80 00 08 bne,a 20196d4 20196b8: b4 06 a0 01 inc %i2 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 20196bc: 80 8b c0 18 btst %o7, %i0 20196c0: 22 80 00 05 be,a 20196d4 20196c4: 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 ) ) { 20196c8: 84 10 00 03 mov %g3, %g2 20196cc: 90 10 00 01 mov %g1, %o0 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 20196d0: b4 06 a0 01 inc %i2 20196d4: 80 a6 80 0a cmp %i2, %o2 20196d8: 08 bf ff db bleu 2019644 20196dc: 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++) { 20196e0: 88 01 20 01 inc %g4 20196e4: 80 a1 20 04 cmp %g4, 4 20196e8: 12 bf ff cd bne 201961c 20196ec: 83 29 20 02 sll %g4, 2, %g1 } } } } if ( interested ) { 20196f0: 80 a2 20 00 cmp %o0, 0 20196f4: 02 80 00 0c be 2019724 20196f8: 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 ) ) { 20196fc: 92 10 00 19 mov %i1, %o1 2019700: 40 00 00 36 call 20197d8 <_POSIX_signals_Unblock_thread> 2019704: 94 07 bf f4 add %fp, -12, %o2 2019708: 80 8a 20 ff btst 0xff, %o0 201970c: 02 80 00 06 be 2019724 2019710: 01 00 00 00 nop _Thread_Enable_dispatch(); 2019714: 7f ff bd 7b call 2008d00 <_Thread_Enable_dispatch> 2019718: b0 10 20 00 clr %i0 ! 0 return 0; 201971c: 81 c7 e0 08 ret 2019720: 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 ); 2019724: 40 00 00 24 call 20197b4 <_POSIX_signals_Set_process_signals> 2019728: 90 10 00 1d mov %i5, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 201972c: 83 2e 60 02 sll %i1, 2, %g1 2019730: b3 2e 60 04 sll %i1, 4, %i1 2019734: b2 26 40 01 sub %i1, %g1, %i1 2019738: 03 00 80 74 sethi %hi(0x201d000), %g1 201973c: 82 10 60 40 or %g1, 0x40, %g1 ! 201d040 <_POSIX_signals_Vectors> 2019740: c2 00 40 19 ld [ %g1 + %i1 ], %g1 2019744: 80 a0 60 02 cmp %g1, 2 2019748: 12 80 00 17 bne 20197a4 201974c: 11 00 80 74 sethi %hi(0x201d000), %o0 psiginfo = (POSIX_signals_Siginfo_node *) 2019750: 7f ff b6 03 call 2006f5c <_Chain_Get> 2019754: 90 12 21 c0 or %o0, 0x1c0, %o0 ! 201d1c0 <_POSIX_signals_Inactive_siginfo> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 2019758: ba 92 20 00 orcc %o0, 0, %i5 201975c: 12 80 00 0a bne 2019784 2019760: 92 07 bf f4 add %fp, -12, %o1 _Thread_Enable_dispatch(); 2019764: 7f ff bd 67 call 2008d00 <_Thread_Enable_dispatch> 2019768: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EAGAIN ); 201976c: 7f ff d4 e2 call 200eaf4 <__errno> 2019770: 01 00 00 00 nop 2019774: 82 10 20 0b mov 0xb, %g1 ! b 2019778: c2 22 00 00 st %g1, [ %o0 ] 201977c: 81 c7 e0 08 ret 2019780: 91 e8 3f ff restore %g0, -1, %o0 } psiginfo->Info = *siginfo; 2019784: 90 07 60 08 add %i5, 8, %o0 2019788: 7f ff d7 37 call 200f464 201978c: 94 10 20 0c mov 0xc, %o2 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 2019790: 11 00 80 74 sethi %hi(0x201d000), %o0 2019794: 92 10 00 1d mov %i5, %o1 2019798: 90 12 22 38 or %o0, 0x238, %o0 201979c: 7f ff b5 dc call 2006f0c <_Chain_Append> 20197a0: 90 02 00 19 add %o0, %i1, %o0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 20197a4: 7f ff bd 57 call 2008d00 <_Thread_Enable_dispatch> 20197a8: b0 10 20 00 clr %i0 return 0; } 20197ac: 81 c7 e0 08 ret 20197b0: 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 04 ld [ %g1 + 4 ], %g1 ! 201cc04 <_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 62 d0 ld [ %g1 + 0x2d0 ], %i5 ! 201b2d0 <_global_impure_ptr> 200368c: c2 07 21 18 ld [ %i4 + 0x118 ], %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 52 call 200f7e4 <_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 18 st %i5, [ %i4 + 0x118 ] * * 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 18 ld [ %i5 + 0x118 ], %g1 ! 201c118 <_impure_ptr> 20036b0: 40 00 2d 63 call 200ec3c 20036b4: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 20036b8: c2 07 61 18 ld [ %i5 + 0x118 ], %g1 20036bc: 40 00 2d 60 call 200ec3c 20036c0: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 20036c4: c2 07 61 18 ld [ %i5 + 0x118 ], %g1 20036c8: f0 00 60 0c ld [ %g1 + 0xc ], %i0 20036cc: 40 00 2d 5c call 200ec3c 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 00 or %g1, 0x100, %g1 ! 201c900 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 04 ld [ %g1 + 4 ], %g1 ! 201cc04 <_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 30 ld [ %g1 + 0x230 ], %o0 ! 201be30 20031a0: 92 10 00 1d mov %i5, %o1 20031a4: 94 10 20 00 clr %o2 20031a8: 40 00 13 da call 2008110 <_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 40 ld [ %g1 + 0x240 ], %g1 ! 201c640 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 43 call 200eaf4 <__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 3c ld [ %g1 + 0x23c ], %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 44 ld [ %g1 + 0x244 ], %g1 ! 201c644 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 60 f8 ld [ %g1 + 0xf8 ], %i5 ! 20160f8 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 55 call 20120b0 <.udiv> 2002f60: 90 06 00 1d add %i0, %i5, %o0 2002f64: 40 00 3c 19 call 2011fc8 <.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 20 e0 ld [ %i4 + 0xe0 ], %o0 ! 20154e0 2002f88: 40 00 13 77 call 2007d64 <_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 8a call 200e9cc <__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 20 e0 ld [ %i4 + 0xe0 ], %i0 return (void *) 0; } MSBUMP(space_available, the_size); 2002fc0: c4 00 60 c8 ld [ %g1 + 0xc8 ], %g2 2002fc4: b4 10 20 00 clr %i2 2002fc8: ba 07 40 02 add %i5, %g2, %i5 2002fcc: fa 20 60 c8 st %i5, [ %g1 + 0xc8 ] 2002fd0: 40 00 13 57 call 2007d2c <_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 60 f8 st %i1, [ %g1 + 0xf8 ] ! 20160f8 * 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 =============================================================================== 0200da00 : */ int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 200da00: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 200da04: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 */ int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 200da08: 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 ) 200da0c: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 200da10: 80 a0 40 19 cmp %g1, %i1 200da14: 06 80 00 09 bl 200da38 <== NEVER TAKEN 200da18: 94 10 00 1a mov %i2, %o2 200da1c: 80 a0 40 19 cmp %g1, %i1 200da20: 32 80 00 0a bne,a 200da48 200da24: d2 27 60 50 st %o1, [ %i5 + 0x50 ] 200da28: c2 07 60 54 ld [ %i5 + 0x54 ], %g1 200da2c: 80 a0 40 1a cmp %g1, %i2 200da30: 3a 80 00 06 bcc,a 200da48 200da34: d2 27 60 50 st %o1, [ %i5 + 0x50 ] return IMFS_memfile_extend( the_jnode, length ); 200da38: 7f ff ff 01 call 200d63c 200da3c: 90 10 00 1d mov %i5, %o0 200da40: 81 c7 e0 08 ret 200da44: 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; 200da48: d4 27 60 54 st %o2, [ %i5 + 0x54 ] iop->size = the_jnode->info.file.size; 200da4c: d2 26 20 08 st %o1, [ %i0 + 8 ] 200da50: d4 26 20 0c st %o2, [ %i0 + 0xc ] IMFS_update_atime( the_jnode ); 200da54: 90 07 bf f8 add %fp, -8, %o0 200da58: 7f ff d5 09 call 2002e7c 200da5c: 92 10 20 00 clr %o1 200da60: c2 07 bf f8 ld [ %fp + -8 ], %g1 200da64: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return 0; } 200da68: 81 c7 e0 08 ret 200da6c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200da70 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 200da70: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 200da74: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 if (the_jnode->type == IMFS_LINEAR_FILE) { 200da78: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200da7c: 80 a0 60 06 cmp %g1, 6 200da80: 32 80 00 11 bne,a 200dac4 200da84: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 if (iop->offset > the_jnode->info.linearfile.size) 200da88: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 200da8c: c6 06 20 10 ld [ %i0 + 0x10 ], %g3 200da90: 80 a0 c0 01 cmp %g3, %g1 200da94: 14 80 00 09 bg 200dab8 <== NEVER TAKEN 200da98: c4 07 60 54 ld [ %i5 + 0x54 ], %g2 200da9c: 80 a0 c0 01 cmp %g3, %g1 200daa0: 32 80 00 19 bne,a 200db04 <== NEVER TAKEN 200daa4: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 <== NOT EXECUTED 200daa8: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 200daac: 80 a0 c0 02 cmp %g3, %g2 200dab0: 28 80 00 15 bleu,a 200db04 <== ALWAYS TAKEN 200dab4: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 iop->offset = the_jnode->info.linearfile.size; 200dab8: c2 26 20 10 st %g1, [ %i0 + 0x10 ] <== NOT EXECUTED 200dabc: 10 80 00 11 b 200db00 <== NOT EXECUTED 200dac0: 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 )) 200dac4: 90 10 00 1d mov %i5, %o0 200dac8: 92 10 00 02 mov %g2, %o1 200dacc: 7f ff fe dc call 200d63c 200dad0: 94 10 00 03 mov %g3, %o2 200dad4: 80 a2 20 00 cmp %o0, 0 200dad8: 22 80 00 09 be,a 200dafc 200dadc: c4 1f 60 50 ldd [ %i5 + 0x50 ], %g2 rtems_set_errno_and_return_minus_one( ENOSPC ); 200dae0: 40 00 04 05 call 200eaf4 <__errno> 200dae4: 31 3f ff ff sethi %hi(0xfffffc00), %i0 200dae8: 82 10 20 1c mov 0x1c, %g1 200daec: c2 22 00 00 st %g1, [ %o0 ] 200daf0: b0 16 23 ff or %i0, 0x3ff, %i0 200daf4: 81 c7 e0 08 ret 200daf8: 93 e8 00 18 restore %g0, %i0, %o1 iop->size = the_jnode->info.file.size; 200dafc: c4 3e 20 08 std %g2, [ %i0 + 8 ] } return iop->offset; 200db00: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 } 200db04: 81 c7 e0 08 ret 200db08: 81 e8 00 00 restore =============================================================================== 0200d964 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 200d964: 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)) 200d968: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 200d96c: 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)) 200d970: 80 88 62 04 btst 0x204, %g1 200d974: 02 80 00 19 be 200d9d8 200d978: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 && (the_jnode->type == IMFS_LINEAR_FILE)) { 200d97c: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200d980: 80 a0 60 06 cmp %g1, 6 200d984: 32 80 00 16 bne,a 200d9dc <== ALWAYS TAKEN 200d988: c2 07 20 18 ld [ %i4 + 0x18 ], %g1 uint32_t count = the_jnode->info.linearfile.size; 200d98c: d8 07 60 54 ld [ %i5 + 0x54 ], %o4 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 200d990: d6 07 60 58 ld [ %i5 + 0x58 ], %o3 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 200d994: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED the_jnode->info.file.size = 0; 200d998: 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; 200d99c: c2 27 60 4c st %g1, [ %i5 + 0x4c ] <== NOT EXECUTED the_jnode->info.file.size = 0; 200d9a0: c0 27 60 54 clr [ %i5 + 0x54 ] <== NOT EXECUTED the_jnode->info.file.indirect = 0; 200d9a4: c0 27 60 58 clr [ %i5 + 0x58 ] <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 200d9a8: c0 27 60 5c clr [ %i5 + 0x5c ] <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; if ((count != 0) 200d9ac: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 200d9b0: 02 80 00 0a be 200d9d8 <== NOT EXECUTED 200d9b4: c0 27 60 60 clr [ %i5 + 0x60 ] <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 200d9b8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 200d9bc: 92 10 20 00 clr %o1 <== NOT EXECUTED 200d9c0: 94 10 20 00 clr %o2 <== NOT EXECUTED 200d9c4: 7f ff ff 75 call 200d798 <== NOT EXECUTED 200d9c8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200d9cc: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 200d9d0: 02 80 00 0a be 200d9f8 <== NOT EXECUTED 200d9d4: 01 00 00 00 nop <== NOT EXECUTED return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 200d9d8: c2 07 20 18 ld [ %i4 + 0x18 ], %g1 200d9dc: 80 88 62 00 btst 0x200, %g1 200d9e0: 02 80 00 04 be 200d9f0 200d9e4: c4 1f 60 50 ldd [ %i5 + 0x50 ], %g2 iop->offset = the_jnode->info.file.size; 200d9e8: c4 3f 20 10 std %g2, [ %i4 + 0x10 ] iop->size = the_jnode->info.file.size; 200d9ec: c4 1f 60 50 ldd [ %i5 + 0x50 ], %g2 return 0; 200d9f0: 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; 200d9f4: c4 3f 20 08 std %g2, [ %i4 + 8 ] return 0; } 200d9f8: 81 c7 e0 08 ret 200d9fc: 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 20 fe call 200b7c8 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 c4 call 200eaf4 <__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 00 mov %l3, %l3 ! 201a400 size_t filesystemtype_size = strlen( filesystemtype ) + 1; 200340c: 40 00 33 52 call 2010154 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 4c call 2010154 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 49 call 2010154 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 2f fe call 200f464 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 2f f8 call 200f464 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 2f f2 call 200f464 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 ea call 200f464 20034c0: 92 12 61 30 or %o1, 0x130, %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 87 call 200eaf4 <__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 73 call 200eaf4 <__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 69 call 200eaf4 <__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 34 ld [ %g1 + 0x334 ], %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 34 or %g1, 0x334, %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 4e call 200eaf4 <__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 34 or %o0, 0x334, %o0 ! 201bf34 2003610: 03 00 80 72 sethi %hi(0x201c800), %g1 2003614: 40 00 0b ed call 20065c8 2003618: d0 00 60 ec ld [ %g1 + 0xec ], %o0 ! 201c8ec 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 54 ld [ %g1 + 0x354 ], %o0 ! 201bf54 200362c: 92 07 60 1c add %i5, 0x1c, %o1 2003630: 94 10 20 14 mov 0x14, %o2 2003634: 40 00 2f 8c call 200f464 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 18 call 200e944 <__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 =============================================================================== 0201766c : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 201766c: 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; 2017670: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 2017674: 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; 2017678: 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; 201767c: 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); 2017680: 92 10 20 00 clr %o1 2017684: c2 27 bf f0 st %g1, [ %fp + -16 ] dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 2017688: c2 27 bf f4 st %g1, [ %fp + -12 ] 201768c: 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; 2017690: c0 27 bf f8 clr [ %fp + -8 ] time_t time_ret = 0; uint16_t time_val = 0; 2017694: c0 37 bf fc clrh [ %fp + -4 ] uint16_t date = 0; 2017698: 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; 201769c: c0 27 bf e8 clr [ %fp + -24 ] dir_pos->sname.ofs = 0; 20176a0: 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); 20176a4: 40 00 15 e2 call 201ce2c 20176a8: 90 07 bf a8 add %fp, -88, %o0 memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 20176ac: 92 10 20 00 clr %o1 20176b0: 94 10 20 40 mov 0x40, %o2 20176b4: 40 00 15 de call 201ce2c 20176b8: 90 07 bf 68 add %fp, -152, %o0 name_type = msdos_long_to_short (name, name_len, 20176bc: 92 10 00 1b mov %i3, %o1 20176c0: 94 07 bf a8 add %fp, -88, %o2 20176c4: 96 10 20 0b mov 0xb, %o3 20176c8: 40 00 04 28 call 2018768 20176cc: 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) { 20176d0: 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, 20176d4: 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; 20176d8: c0 2f bf b4 clrb [ %fp + -76 ] /* set up last write date and time */ time_ret = time(NULL); 20176dc: 90 10 20 00 clr %o0 20176e0: 40 00 23 91 call 2020524